[antlr-interest] Problems with " and/or ""
Matthew.Ford at forward.com.au
Wed Dec 15 11:06:09 PST 2004
Sounds great Ter,
just to clarify does
('"' | """ | "&) (greedy=false : . )* ('"' | """) ;
work also and also does
('"' | """ | "“" | "”" ) (greedy=false : . )* ('"' ! |
""" ! | "“" ! | "”" ! ) ;
Looking forward to 3.0 !!! :-)
----- Original Message -----
From: "Terence Parr" <parrt at cs.usfca.edu>
To: <antlr-interest at yahoogroups.com>
Sent: Thursday, December 16, 2004 4:51 AM
Subject: Re: [antlr-interest] Problems with " and/or ""
> On Dec 14, 2004, at 11:16 PM, matthew ford wrote:
> > There should be an easier (and more strightforward) way to do this.
> > But if there is I have not found it yet.
> > Ter can you get greedy = false to work for this case?
> The unfortunate truth is that greedy=false was an afterthought and
> apparently not properly integrated.
> You'll note in 3.0 that this plain works:
> Q : """ (greedy=false : . )* """ ;
> I just verified the generated Java (no bytecodes in this case) and the
> DFA. Everything is cool. It will terminate on """ and more
> importantly, it figured out the k=6 lookahead depth out all by itself.
> :) Hooray. Believe me when I say that I've actually gotten time to
> think before coding this time around. 1.x was a prototype. 2.x was
> done in a hurry to shut out JavaCC and was done while I was in a
> start-up working like mad. I've been working on just the parsing
> algorithm and code generator for 1.5 years now. :) I should have the
> error handling done in a month or two. Then I clean up the tool and by
> May we may have a parser/lexer combo that works with no support for
> trees etc... We may also have a prototype gui.
> CS Professor & Grad Director, University of San Francisco
> Creator, ANTLR Parser Generator, http://www.antlr.org
> Cofounder, http://www.jguru.com
> Cofounder, http://www.knowspam.net enjoy email again!
> Yahoo! Groups Links
Yahoo! Groups Links
<*> To visit your group on the web, go to:
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
More information about the antlr-interest