Outline get corrupt when javadoc comment is added...
Brought to you by:
tjuerge
The eclipe outline get corrupt when javadoc comment is
added to the second class definition in the grammar file.
If you use the following example the lexer class
(FooLex) is not displayd in the outline.
---------------------------------
/**
* Javadoc comment
*/
class Foo extends Parser;
rule : TOKEN EOF ;
/**
* another Javadoc comment
*/
class FooLex extends Lexer;
TOKEN : "foo" ;
---------------------------------
mailto:bibodo@lycos.de
Logged In: YES
user_id=230522
I can reproduce this -- not sure when I can try to fix it
though.
Hi, I just played with this bug a bit.
The problem is in org.antlr.eclipse.core.parser/antlr.g line 149.
If there is a JavaDoc comment the parser will assume that a new rule follows, creating an exception when it finds the class keyword.
This comes from the ambiguity that both grammars and rules can have their own JavaDoc comments.