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