Re: Java Comment-Preserving Grammar

Sreenivasa Viswanadha <sreeni@viswanadha.net>
30 May 2004 13:18:08 -0400

          From comp.compilers

Related articles
Java Comment-Preserving Grammar matthew-google@faredge.com.au (2004-05-24)
Re: Java Comment-Preserving Grammar sreeni@viswanadha.net (Sreenivasa Viswanadha) (2004-05-30)
Re: Java Comment-Preserving Grammar martin@cs.uu.nl (Martin Bravenboer) (2004-05-30)
Re: Java Comment-Preserving Grammar cdodd@acm.org (Chris Dodd) (2004-05-30)
Re: Java Comment-Preserving Grammar dobes@dobesland.com (Dobes Vandermeer) (2004-05-30)
Re: Java Comment-Preserving Grammar tbauer@cadrc.calpoly.edu (Tim Bauer) (2004-05-30)
Re: Java Comment-Preserving Grammar jens.troeger@light-speed.de (2004-06-06)
Re: Java Comment-Preserving Grammar clint@0lsen.net (Clint Olsen) (2004-06-06)
[5 later articles]
| List of all articles for this month |

From: Sreenivasa Viswanadha <sreeni@viswanadha.net>
Newsgroups: comp.compilers
Date: 30 May 2004 13:18:08 -0400
Organization: Comcast Online
References: 04-05-075
Keywords: Java, parse
Posted-Date: 30 May 2004 13:18:08 EDT

> Is there an available Java grammar which preserves comments in an
> output AST tree? I know there are plenty of java grammars out there,
> but all ignore comments. I'm happy to use any tool providing I can
> gain access to the comments in the tree.


You can try the Java grammar that comes with JavaCC. It preserves
comments in the token stream. And it is relatively easy to put those in
the AST. You can get it from:


        http://javacc.dev.java.net


Sreeni.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.