Hi,

I have started using antlr to catch up my lack of knowledge in
parsers. This is a great product, thanks a lot !

I am trying to create my own DSL, and started very simply with parsing
the following

name: foo;

But got a problem while using antlworks. I get space-related problem:

name:foo; -> works
name: foo; -> antlrworks gives me an error (mismatchedTokenExpression exception)

But if I use the generated parser from antlworks, both expressions
with and without spaces are correctly parsed.

The grammar boils down to:

grammar T;
program :       statement+;
statement
        :       metadata;       
metadata
        :       'name:'  WORD ENDSTMT;  
WORD: 'a'..'z'+ ;
WS: (' ' | '\n' | '\r' )+ {$channel=HIDDEN};
ENDSTMT :       ';';

I use python for the generated parser, if that matters,

thank you,

David

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

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to