[antlr-interest] Visually display the DFA ANTLR generates
Randall R Schulz
rschulz at sonic.net
Wed Jun 27 11:21:28 PDT 2007
- Please do not include Disposition Notification headers in postings to
- Please do not include bogus disclaimers in postings to lists.
- Please use standard message quoting marks.
Top-posting isn't too cool, either.
On Wednesday 27 June 2007 11:07, Geoffrey Zhu wrote:
> For example, for the input "( security" the interpreter works well on
> the below grammar, but the ANTLR genereated code chokes on it. I
> guess that as long as there are two code bases (ANTLR and WORKS),
> there are discrepencies. Maybe Works can employ antlr to do the work.
> Then there is no discrepency.
> ID : ('a'..'z')+;
> fragment WS : ' ' | '\t' ;
> LPAREN : '(' ;
> LP_SELECT : '(' WS* 'select';
> prog: (ID|LPAREN|LP_SELECT|WS)+ ;
Are you using backtracking in your grammar? Does ANTLRWorks show
synthesized syntactic predicates in the racetrack diagrams for your
What do you mean by "chokes?"
Of course, it's possible there are bugs, but I do believe that
ANTLRWorks is does replicates the code of ANTLR itself and apart from
the inherent limitations of the ANTLRWorks Interpreter, it (the
debugger, i.e.) should be fully consistent with the behavior of parsers
Again, if not, put together a repeatable, self-contained example and
submit it as a bug report.
More information about the antlr-interest