[antlr-interest] Does not report error when generating code
    孙纪刚 Jigang (Robert) Sun 
    sunjigang1965 at yahoo.com.cn
       
    Thu Sep 21 16:45:36 PDT 2006
    
    
  
Please have a look at a simple grammar:
grammar CL;
options {
    language  = CSharp;
     output = AST;
}
program: basicValue;
basicValue: INT |REAL ;
INT:Num;
REAL:  Num '.' Num;
fragment Num: Digit+;
fragment Digit:'0'..'9';
WS      : (' '|'\t'|'\n')+ {channel=99;};
When generating c# code, it seems normal, but I tried to run the generated code, compiling errors
were given:
Error	4	The name 'dfa3_transition1' does not exist in the current context
Error	5	The name 'dfa3_transition0' does not exist in the current context	
for code segment
...
  public static readonly short[][] DFA3_transition = {
    	dfa3_transition1,
    	dfa3_transition0,
    	dfa3_transition_null,
    	dfa3_transition_null,
    	dfa3_transition_null
        };
...
in CLLexer.cs.
Thanks.
Jigang
	
	
		
___________________________________________________________ 
Mp3疯狂搜-新歌热歌高速下
http://music.yahoo.com.cn/?source=mail_mailbox_footer
    
    
More information about the antlr-interest
mailing list