Menu

#17 Outline get corrupt when javadoc comment is added...

UI
open
nobody
None
5
2014-11-14
2006-01-19
Anonymous
No

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

Discussion

  • Scott Stanchfield

    Logged In: YES
    user_id=230522

    I can reproduce this -- not sure when I can try to fix it
    though.

     
  • Kristof Szabados

    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.

     

Log in to post a comment.