[antlr-interest] Java Target Generation Problem

Jim Idle jimi at temporal-wave.com
Sun Nov 8 09:18:34 PST 2009


Actually it is because it thinks it is a documentation comment like Javadoc and you can only have one. The new parsres we are working on will give better error messages about such things.

 

If you used:

/* *****************

 

Then you won't get the issue - the lexer looks for /** at the comment start.

 

Jim

 

From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-bounces at antlr.org] On Behalf Of Steve McFarlin
Sent: Sunday, November 08, 2009 12:44 AM
To: antlr-interest at antlr.org
Subject: [antlr-interest] Java Target Generation Problem

 

Hello,

 

ANTLR Version 3.2

Error -  Cannot generate the grammar because:

error(100) : ... : syntax error: antlr: ... : unexpected token: /************* comment 2 *********/

 

This is a very minor issue you could assign a priority of -1 to. Placing block comments in a grammar file with nothing between them will cause a generation error. e.g.

 

 

prog   :           test;

 

/******

 comment 1

******/

 

/*********

 comment 2

*********/

 

test     :           'a' ;

 

 

 

Steve McFarlin

 

 

 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20091108/10a6b9bf/attachment.html 


More information about the antlr-interest mailing list