1: doctype public "-//IDN etl.sf.net//ETL//Grammar 0.2.1";
     2: 
     3: grammar samples.Events {
     4: 	namespace default e = "urn:x-etl:samples:events";
     5: 	context default TopLevel {
     6: 		statement Events {
     7: 			% events;
     8: 			@ events += block(DefList);
     9: 		};
    10: 		statement ResetEvents {
    11: 			% resetEvents;
    12: 			@ events += list , {
    13: 				identifier wrapper e:ResetEvent.name;
    14: 			};
    15: 		};
    16: 		statement Commands {
    17: 			% commands;
    18: 			@ commands += block(DefList);
    19: 		};
    20: 		statement State {
    21: 			% state;
    22: 			@ name = identifier;
    23: 			@ contents += block(StateContext);
    24: 		};
    25: 	};
    26: 
    27: 	context DefList {
    28: 		statement Def {
    29: 			@ name = identifier;
    30: 			@ code = identifier;
    31: 		};
    32: 	};
    33: 
    34: 
    35: 	context StateContext {
    36: 		statement Actions {
    37: 			% actions;
    38: 			@ commands += list , { identifier wrapper e:Action.name;};
    39: 		};
    40: 		statement Transtion {
    41: 			% on;
    42: 			@ event = identifier;
    43: 			% =>;
    44: 			@ target = identifier; 
    45: 		};
    46: 	};
    47: };