• DoctypeDeclaration{http://etl.sf.net/etl/doctype/0.2.1}:
    • publicId: "-//IDN etl.sf.net//ETL//Grammar 0.2.1"
  • Grammar{http://etl.sf.net/etl/grammar/0.2.1}:
    • name:
      • calculator
      • CalculatorBasic
    • content:
      • Namespace{http://etl.sf.net/etl/grammar/0.2.1}:
        • defaultModifier:
          • Modifier{http://etl.sf.net/etl/grammar/0.2.1}:
            • value: default
        • prefix: t
        • uri: "http://etl.sf.net/samples/calculator"
      • Context{http://etl.sf.net/etl/grammar/0.2.1}:
        • defaultModifier:
          • Modifier{http://etl.sf.net/etl/grammar/0.2.1}:
            • value: default
        • name: Expressions
        • content:
          • OperatorDefinition{http://etl.sf.net/etl/grammar/0.2.1}:
            • isComposite:
              • Modifier{http://etl.sf.net/etl/grammar/0.2.1}:
                • value: composite
            • name: NumberLiteral
            • associativity: f
            • syntax:
              • Let{http://etl.sf.net/etl/grammar/0.2.1}:
                • name: value
                • operator: =
                • expression:
                  • ChoiceOp{http://etl.sf.net/etl/grammar/0.2.1}:
                    • options:
                      • FloatOp{http://etl.sf.net/etl/grammar/0.2.1}:
                      • options:
                        • IntegerOp{http://etl.sf.net/etl/grammar/0.2.1}:
              • OperatorDefinition{http://etl.sf.net/etl/grammar/0.2.1}:
                • isComposite:
                  • Modifier{http://etl.sf.net/etl/grammar/0.2.1}:
                    • value: composite
                • name: StringValue
                • associativity: f
                • syntax:
                  • ExpressionStatement{http://etl.sf.net/etl/grammar/0.2.1}:
                    • syntax:
                      • ObjectOp{http://etl.sf.net/etl/grammar/0.2.1}:
                        • name:
                          • ObjectName{http://etl.sf.net/etl/grammar/0.2.1}:
                            • prefix: t
                            • name: StringLiteral
                        • syntax:
                          • Sequence{http://etl.sf.net/etl/grammar/0.2.1}:
                            • syntax:
                              • Let{http://etl.sf.net/etl/grammar/0.2.1}:
                                • name: value
                                • operator: =
                                • expression:
                                  • StringOp{http://etl.sf.net/etl/grammar/0.2.1}:
                • Statement{http://etl.sf.net/etl/grammar/0.2.1}:
                  • name: PrintStatement
                  • syntax:
                    • ExpressionStatement{http://etl.sf.net/etl/grammar/0.2.1}:
                      • syntax:
                        • Sequence{http://etl.sf.net/etl/grammar/0.2.1}:
                          • syntax:
                            • KeywordStatement{http://etl.sf.net/etl/grammar/0.2.1}:
                              • text: print
                • Statement{http://etl.sf.net/etl/grammar/0.2.1}:
                  • name: ExpressionStatement
                  • syntax:
                    • Let{http://etl.sf.net/etl/grammar/0.2.1}:
                      • name: value
                      • operator: =
                      • expression:
                        • ExpressionRef{http://etl.sf.net/etl/grammar/0.2.1}:
               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: };
          
          • LEXICAL_ERROR: calculator-basic-with-errors.g.etl(12,40,487)-(12,44,491): New line encountered in string. If you want to insert new line use \n syntax
          • SEGMENT_ERROR: calculator-basic-with-errors.g.etl(13,13,504)-(13,13,504): Unterminated segment, semicolon expected here
          • SYNTAX_ERROR: calculator-basic-with-errors.g.etl(13,13,504)-(13,13,504): Structural error. Expecting tokens "LA[phraseTokens=[];tokens={STRING[quote="]=[null], STRING[quote=']=[null]}]".
          • SYNTAX_ERROR: calculator-basic-with-errors.g.etl(17,13,585)-(17,13,585): Syntax error. Expecting end of segment.
          • SEGMENT_ERROR: calculator-basic-with-errors.g.etl(23,9,741)-(23,9,741): Unterminated segment, semicolon expected here