[antlr-interest] Adding extra key words into Java programming language
Terence Parr
parrt at jguru.com
Wed Jan 22 18:03:00 PST 2003
On Wednesday, January 22, 2003, at 05:56 PM, tdknghi
<nk.truong at student.qut.edu.au> wrote:
> Hi,
>
> I would like to add one extra keyword into the java grammar file so
> that the parser will recognize a java program with has my keyword.
> Do you have any idea how to do it?
>
Sure. Just use the keyword where you want (Like I did with "assert").
I'm not sure what the problem is with the java stuff...works great for
me. Line 246 is:
if ( inputState.guessing==0 ) {
which implies that something is pretty screwy. Did you modify
Main.java or anything?
Terence
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Lecturer in Comp. Sci., University of San Francisco
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list