1:
2:
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