[antlr-interest] 回复: Re: V3 grammar line count

孙纪刚 Jigang (Robert) Sun sunjigang1965 at yahoo.com.cn
Thu Sep 21 01:24:00 PDT 2006


Attached is the grammar, error message is as follow:

D:\cleanV3>java org.antlr.Tool lex.g
no such locale file org/antlr/tool/templates/messages/zh.stg retrying with English locale
ANTLR Parser Generator   Early Access Version 3.0b4 (??, 2006)  1989-2006
lex.g:40:11: The following token definitions are unreachable: Sign,Slash,UpperCaseChar,LowerCa
seChar,SpecialChar,Digit,OctDigit,HexDigit,StringEsc,CharEsc,AnyChar

You can see line 40 is an empty line. Sometimes the grammar problem is in line 34 which reported
as lin35.

Regards
Jigang 

--- Jim Idle <jimi at intersystems.com>写道:

> You need to post the error output and the lines around the specified location to get more help.
> There will be an error there somewhere, but error reporting/recovery is not as good as it will
> be once antlr3 is built with itself.
> 
> Jim
> 
> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-bounces at antlr.org] On Behalf Of
> ??? Jigang (Robert) Sun
> Sent: Wednesday, September 20, 2006 3:54 PM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] V3 grammar line count
> 
> The v3.0b is reporting a problem with my lexer grammar. But the line being indicated is an blank
> line - there is nothing wrong with this empty rule.  I am using Microsoft Visual studio to edit
> grammar file.
> 
> Jigang
> 
> 
> 		
> ___________________________________________________________ 
> 雅虎免费邮箱-3.5G容量,20M附件 
> http://cn.mail.yahoo.com/
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.405 / Virus Database: 268.12.5/450 - Release Date: 9/18/2006
>  
> 
> -- 
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.405 / Virus Database: 268.12.5/450 - Release Date: 9/18/2006
>  
> 


		
___________________________________________________________ 
雅虎免费邮箱-3.5G容量,20M附件 
http://cn.mail.yahoo.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lex.g
Type: application/octet-stream
Size: 1307 bytes
Desc: 2935795476-lex.g
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20060921/46aa4a21/attachment.obj 


More information about the antlr-interest mailing list