[antlr-interest] Visually display the DFA ANTLR generates

Geoffrey Zhu gzhu at peak6.com
Wed Jun 27 11:53:26 PDT 2007


Unfortunately  the mail server does these things automatically.

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Randall R Schulz
Sent: Wednesday, June 27, 2007 1:21 PM
To: antlr-interest at antlr.org
Subject: Re: [antlr-interest] Visually display the DFA ANTLR generates

Geoffrey,

- Please do not include Disposition Notification headers in postings to
lists.
- 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
productions?

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
running stand-alone.

Again, if not, put together a repeatable, self-contained example and
submit it as a bug report.


Randall Schulz



_______________________________________________________=0A=
=0A=
The  information in this email or in any file attached=0A=
hereto is intended only for the personal and confiden-=0A=
tial  use  of  the individual or entity to which it is=0A=
addressed and may contain information that is  propri-=0A=
etary  and  confidential.  If you are not the intended=0A=
recipient of this message you are hereby notified that=0A=
any  review, dissemination, distribution or copying of=0A=
this message is strictly prohibited.  This  communica-=0A=
tion  is  for information purposes only and should not=0A=
be regarded as an offer to sell or as  a  solicitation=0A=
of an offer to buy any financial product. Email trans-=0A=
mission cannot be guaranteed to be  secure  or  error-=0A=
free. P6070214


More information about the antlr-interest mailing list