a bug(maybe fixed) on antlr grammer file
Yang Jiang
yang.jiang.z at gmail.com
Thu Oct 22 10:01:55 PDT 2009
The file you have is the latest one. It hasn't been changed for a while.
Not sure why you get that result, but I just tried to parse your input
with with ANTLRWorks 1.3(latest build) with no problem.
You can try to set up Java.g in ANTLRWorks and see how it works,
following this link:
http://openjdk.java.net/projects/compiler-grammar/antlrworks/index.html
Note that you have to start ANTLRWorks like this
java -Xmx1024m -jar ANTLRWorks.jar
then, go to ANTLRWorks' menu, File->Preference->ANTLR options, put
-Xconversiontimeout 1000000 there, then try to run/debug your grammar.
Yang
williamyuan wrote:
> Hi Jon,
> Thanks for you reply
>
> But I tested it on antlrworks, it can not parse this
>
> public class AOPHandler{
> public Object invoke() throws A{
> return result;
> }
> }
> it will be recognized as an annotation but not a method
> it's caused by the 'throws' remove 'throws A' it will be fine.
>
> can you give me a copy of lastest grammer file ?
>
> thanks
>
> BILL
>
> >
> > williamyuan wrote:
> > > hi all
> > > i downloaded the antlr grammer from
> > > http://openjdk.java.net/projects/compiler-grammar/antlrworks/Java.g
> > > and found it can not recognize the method with a throws keyword,
> > > i found this link and downloaded it from the antlr.org
> > > it said it's last updated in Jan 2009. so i am not sure whether
> > > somebody fixed it.
> > >
> > > how to get a copy of the lastest version of the antlr grammer file for
> > > openjdk ?
> > >
> > >
> > > thanks,
> > > BILL
> > >
> > William,
> >
> > I would be surprised if what you say is true, since the file was very
> > heavily tested. That being said, there is regrettably no one maintaining
> > this file at this time.
> >
> > -- Jon
>
More information about the compiler-grammar-dev
mailing list