1: doctype public "-//IDN etl.sf.net//ETL//Grammar 0.2.1";
2: grammar calculator.CalculatorBasic {
3: namespace default t = "http://etl.sf.net/samples/calculator";
4: context default Expressions {
5: op composite NumberLiteral(f) {
6: @ value = float | integer;
7: };
8: op composite StringValue(f) {
9: ^ t:StringLiteral {
10: @ value = string(quote='"');
11: };
12: };
13: statement PrintStatement {
14: % print;
15: @ values += list , {
16: expression;
17: };
18: };
19: statement ExpressionStatement {
20: @ value = expression;
21: };
22: };
23: };