From williamyuan at yeah.net Thu Oct 22 09:22:30 2009 From: williamyuan at yeah.net (williamyuan) Date: Fri, 23 Oct 2009 00:22:30 +0800 (CST) Subject: a bug(maybe fixed) on antlr grammer file Message-ID: <247836132.536681256228550762.JavaMail.coremail@app4.yeah.net> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/compiler-grammar-dev/attachments/20091023/80d7e9bb/attachment.html From Jonathan.Gibbons at Sun.COM Thu Oct 22 09:35:27 2009 From: Jonathan.Gibbons at Sun.COM (Jonathan Gibbons) Date: Thu, 22 Oct 2009 09:35:27 -0700 Subject: a bug(maybe fixed) on antlr grammer file In-Reply-To: <247836132.536681256228550762.JavaMail.coremail@app4.yeah.net> References: <247836132.536681256228550762.JavaMail.coremail@app4.yeah.net> Message-ID: <4AE089CF.4060808@sun.com> 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 From williamyuan at yeah.net Thu Oct 22 09:45:08 2009 From: williamyuan at yeah.net (williamyuan) Date: Fri, 23 Oct 2009 00:45:08 +0800 (CST) Subject: a bug(maybe fixed) on antlr grammer file In-Reply-To: <4AE089CF.4060808@sun.com> References: <4AE089CF.4060808@sun.com> <247836132.536681256228550762.JavaMail.coremail@app4.yeah.net> Message-ID: <957608055.538211256229908293.JavaMail.coremail@app4.yeah.net> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/compiler-grammar-dev/attachments/20091023/aa9af6d3/attachment.html From yang.jiang.z at gmail.com Thu Oct 22 10:01:55 2009 From: yang.jiang.z at gmail.com (Yang Jiang) Date: Thu, 22 Oct 2009 10:01:55 -0700 Subject: a bug(maybe fixed) on antlr grammer file In-Reply-To: <957608055.538211256229908293.JavaMail.coremail@app4.yeah.net> References: <4AE089CF.4060808@sun.com> <247836132.536681256228550762.JavaMail.coremail@app4.yeah.net> <957608055.538211256229908293.JavaMail.coremail@app4.yeah.net> Message-ID: <4AE09003.5000700@gmail.com> 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 > From williamyuan at yeah.net Thu Oct 22 10:39:50 2009 From: williamyuan at yeah.net (williamyuan) Date: Fri, 23 Oct 2009 01:39:50 +0800 (CST) Subject: a bug(maybe fixed) on antlr grammer file In-Reply-To: <4AE09003.5000700@gmail.com> References: <4AE09003.5000700@gmail.com> <4AE089CF.4060808@sun.com> <247836132.536681256228550762.JavaMail.coremail@app4.yeah.net> <957608055.538211256229908293.JavaMail.coremail@app4.yeah.net> Message-ID: <1235948733.1941256233190222.JavaMail.coremail@app4.yeah.net> Thanks for Yang Jiang, the grammer is right , the arg '-Xconversiontimeout 1000000' is very useful , the grammer is correct , Sorry to disturb all , Thansk for Jon, Best Regards, BILL ?> -----????????----- > ??????: "Yang Jiang" > ????????: 2009??10??23?? ?????? > ??????: williamyuan > ????: compiler-grammar-dev at openjdk.java.net > ????: Re: a bug(maybe fixed) on antlr grammer file > > 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 > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/compiler-grammar-dev/attachments/20091023/c6ff8404/attachment.html