Hello,
I am trying to create parser for object-oriented language - Loglan82. I
am also quite new to ANTLR and I have an error at the very beginning.
I get: FailedPredicateException while I am using Interpeter (Eclipse
plugin) to check if parser is recognizing 'varDecl'.
This kind of declaration is valid in Loglan82: 'var
you,are:integer,totally,correct:Type2;'
And here are my gammar rules:
varDecl: VAR IDENT (COMMA IDENT)* COLON type (COMMA IDENT (COMMA IDENT)*
COLON type)*;
type: ARRAY* (systemType | simpleType | IDENT);
systemType: PROCES | COROUTINE;
simpleType: INTEGER | REAL | BOOLEAN | CHARACTER | STRING | FILE |
SEMAPHORE;
I get error when parser meets first comma (',') after 'you' identifier.
I am using Antlr 3.3v and all necessary Eclipse plugins.
Grammar options backtrack=true and memoize=true.
When I write this kind of rule: 'var you:Type2;' everything is correct.
I think this might be problem of '*' and lookahead - but I am not sure.
What might cause the problem? How this can be fixed?
Thank you for your time,
Adam.
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.