Hi all

The following grammar compiles with ANTLRWorks 1.2.3 but when I debug it
with "1+2+3" it generates a Parse Tree with the following elements:
root->statement->MissingTokenException.

In the file SimplePlusGrammar.g:
grammar SimplePlusGrammar;
statement : INTEGER (PLUS INTEGER)*;
PLUS    : '+';
DIGIT   : ('0'..'9');
INTEGER : DIGIT+;


   - Can you explain what is missing in the grammar to generate a valid
   Parse Tree out of "1+2+3"
   - In many examples so far I have seen Java Code inside the *.g file. Is
   it possible to have only the grammar definition in the *.g file so that it
   can be used by different programming languages

I'm posting my questions here because I haven't found a forum or something
similar where I can put them.

Kind regards

Simon Gubler

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Reply via email to