[antlr-interest] ANTLRWorks interpreter question
VAUCHER Laurent
VAUCHER at fermat.eu
Fri Nov 10 02:33:23 PST 2006
Hi and a big thank you for ANTLRWorks. It would make a great Eclipse
plug-in, but it is already very useful as a standalone tool.
I just wondered if the interpreter is 'guaranteed' to run exactly as
the final generated code.
I don't use semantic predicates, only syntactic ones, and the
interpreter chokes on inputs that the 'debugger' swallows easily.
I use v1.0b5 and the interpreter gives me errors like
'FailedPredicateException'.
Here is a sample grammar file that exhibits the problem when trying to
parse "a.b" as a table_spec.
------------------------------------------------------------------------
--
grammar testInterpreter;
table_spec
: ( schema_name DOT ) => schema_name DOT table_name
| table_name
;
schema_name : IDENTIFIER ;
table_name : IDENTIFIER ;
DOT : '.' ;
ASTERISK : '*' ;
IDENTIFIER : LETTER+ ;
LETTER : 'a'..'z' | 'A'..'Z' ;
------------------------------------------------------------------------
--
Laurent.
More information about the antlr-interest
mailing list