[antlr-interest] Unexpected token (antlr 2.7.6)

Prashant Deva prashant.deva at gmail.com
Sat May 13 05:42:19 PDT 2006


You can put javadoc style comments only at the begining of rules in an antlr
grammar.
For the rest, you gotta use the normal multi-line style comments.

You are getting an error message cause antlr was expecting a rule definition
after the javadoc comment.



-- 
Prashant Deva
Creator, ANTLR Studio
Founder, Placid Systems, www.placidsystems.com

On 5/13/06, Vidar Håkestad <vidar at hawkis.com> wrote:
>
> The Antlr compiler generates the error message:
>
> line x:y: unexpected token: class
>
> when I put a Java documentation in front of my lexer class definition in
> the
> grammar:
>
> /**
> * Some description of the MyLexer
> */
> class MyLexer extends Lexer;
>
> I'm mostly using the plugin for Eclipse.
> Do not experience this using the commend line tool, but that i version
> 2.7.5.
>
> Anyone else experiencing the same?
>
>
> Regards
> Hawkis
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060513/932c2aa1/attachment.html


More information about the antlr-interest mailing list