1: doctype public "-//IDN etl.sf.net//ETL//Grammar 0.2.1";
     2: 
     3: /// This is a test grammar used to test fallback
     4: /// functionality in the parser.
     5: grammar net.sf.etl.tests.data.fallbacks.Fallbacks {
     6: 	namespace default t = "http://etl.sf.net/2006/tests/fallbacks";
     7: 	/// Base context. It contains definitions of documentation and attributes 
     8: 	/// that will be used in later sections.
     9: 	context abstract Base {
    10: 		
    11: 		/// Simple documentation production
    12: 		documentation Documentation {
    13: 			@ documentation += doclines;
    14: 		};
    15: 		
    16: 		/// Simple attributes production
    17: 		attributes Attributes {
    18: 			% @ % [ {
    19: 				@ attributes += list , {
    20: 					identifier;
    21: 				};		
    22: 			} % ];
    23: 		};
    24: 	};
    25: 
    26: 	/// A context with empty fallbacks
    27: 	context EmptyFallbacks {
    28: 		include Base;
    29: 		
    30: 		/// This is a blank statement
    31: 		statement BlankStatement {
    32: 		};
    33: 
    34: 		/// Some non-empty statement
    35: 		statement SomeStatement {
    36: 			% some {
    37: 				@ value = identifier;
    38: 			};
    39: 		};
    40: 	};
    41: 
    42: 	/// A context with non-empty fallbacks
    43: 	context NonEmptyFallbacks {
    44: 		include Base;
    45: 		
    46: 		/// Some non-empty statement that is designated as statement
    47: 		statement SomeStatement {
    48: 			% some {
    49: 				@ value = identifier;
    50: 			};
    51: 		};
    52: 	};
    53: };