[antlr-interest] ANTLR V3 Comments parsing (and retaining them)
ben.corne at gmail.com
Sun Feb 27 14:14:56 PST 2011
I want to create a documentation tool for some language, this involves
introducing new syntax which can be ignored by the normal parser, but is
taken into account when feeding a program to the documenter-parser.
Here's where I started off with: (the language itself is added after I get
the comments right)
ANTLR complains with warnings about line 29, 30 and 39.
Any explanation why it warns me?
line 29 & 30 boil down to this:
//@<anything until a newline>
//<anything until a newline>
I don't see what is wrong with it. Note however that when removing the
multiline comments, it does build:
however still with warnings (stating that documentation can match COMMENT
(for which I see no problem: // some text //more commented text)
When I remove the documentation rule part, "life is peachy" (cfr javadude's
Any clues what goes wrong? I guess I should get rid of the warnings in the
annotation part before adding multiline comment/annotation
More information about the antlr-interest