[antlr-interest] Eclipse plugin status

Scott Stanchfield scott at javadude.com
Mon Apr 11 04:22:09 PDT 2005


Just a quick note on the eclipse plugin status (and antlr 2.7.6).

Shmuel Siegel recommended running "organize imports" to clean up the
generated code. I've got that working, but then I started on a quest to get
rid of other warnings as well...

In many cases, it's just adding javadoc comments to the rules in the grammar
(this is up to the grammar writer), but antlr adds exceptions and sometimes
extra parameters to methods.

So I tweaked the code generator to add in javadoc tags for the generated
exceptions and parameters. SO far so good.

I've got some parsers coming up with no warnings! Woohoo! (I hate it when a
project shows warnings if I can avoid it). Lexers tend to have lots of empty
blocks, which gives a warning the way I have eclipse configured. I may try
to add a comment in each empty block in the gen'd code... Not sure how
tricky that will be to detect. Worst case, I turn off that warning in
eclipse ;)

I just ran a test of the debugging and oops! The organize imports threw the
line mapping off... Grrr! Arg!

So I'm going to try to have the plugin scan the gen'd code before and after
the org imports and find the offset, then re-write the smap file. Fun...

More soon...
-- Scott






More information about the antlr-interest mailing list