[antlr-interest] Re: Found a BUG ! (maybe)

rigpa_man maswann at verizon.net
Sat Mar 20 15:00:37 PST 2004


Hi again, Ter,

You were right. I tried charVocab='\003'..'\377' and it worked. 
Actually it didn't initially work so I changed charVocab to 
charVocabulary and then it worked. 

I would like to say, however, that setting charVocabulary this way 
should not be necessary especially since none of the examples I saw 
that used (~'\n')* '\n' (such as the c++ comment ->  "//" 
(~'\n')* '\n') mentioned that it would not work unless you defined 
charVocabulary. There should already be a default charVocabulary that 
is usable without modification.

Thanks,

Mark

--- In antlr-interest at yahoogroups.com, Terence Parr <parrt at c...> 
wrote:
> 
> On Mar 19, 2004, at 8:29 PM, rigpa_man wrote:
> 
> > Thanks for responding, Ter.
> >
> > I do recall trying charVocab='\003'..'\377' without success. I 
will
> > try it again in case my memory is not serving me.
> >
> > However! It still does not make sense that the generated code 
would
> > do an LA(1) for a semi-colon after the semi-colon had already been
> > matched,
> 
> Howdy.
> 
> It would if ~'\n' includes ';', right? ;)
> 
> >  especially since the rule did not make explicit mention of
> > caring about semi-colons after finding the first one. It also 
makes
> > no sense to detect a semi-colon in the look-ahead queue if you are
> > going to turn right around and do a matchNot('\n').
> 
> Yeah, it's all in how antlr does the analysis...
> 
> > I give much humble prostration to the great ANTLR guru but this 
time
> > I think he has a bug.
> 
> Oh honored prostate supplicant...guru says "there are many 
bugs...this 
> just ain't one of 'em" ;)
> 
> > Your humble servant and student of the divine ANTLR scriptures, ;-
)
> 
> <snicker>
> 
> Seriously though I think that behavior is fully explained by the 
> charVocab :)
> 
> Ter



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list