[antlr-interest] Migrating from ANTLR 2 to ANTLR 3 :-

jalil hassan jalil_hassan at yahoo.co.uk
Wed Aug 6 19:06:37 PDT 2008


I am working on the grammer file which has been made using antlr v2.I hava to convert it into v3 .I am new to antlr if somebody can help me in understanding and fixing these errors given by antlr tool.
 
ANTLR Parser Generator  Version 3.1b1 (May 20, 2008)  1989-2008
error(100): new.g:32:6: syntax error: antlr: new.g:32:6: unexpected token: 
int CurrentType = 0;
error(100): new.g:35:17: syntax error: antlr: new.g:35:17: unexpected token:  CurrentType = PRNPROC;
error(100): new.g:36:17: syntax error: antlr: new.g:36:17: unexpected token: CurrentType = PRNCHAN;
error(100): new.g:37:17: syntax error: antlr: new.g:37:17: unexpected token: CurrentType = PRNACT;
error(100): new.g:38:17: syntax error: antlr: new.g:38:17: unexpected token: CurrentType = PRNSEQ;
error(100): new.g:41:17: syntax error: antlr: new.g:41:17: unexpected token: CurrentType = PRNINT;
error(100): new.g:44:5: syntax error: antlr: new.g:44:5: unexpected token: ;
error(100): new.g:48:20: syntax error: antlr: new.g:48:20: unexpected token: A
error(100): new.g:53:11: syntax error: antlr: new.g:53:11: unexpected token: A
error(100): new.g:53:18: syntax error: antlr: new.g:53:18: unexpected token: B
error(100): new.g:73:11: syntax error: antlr: new.g:73:11: unexpected token: A
error(100): new.g:73:39: syntax error: antlr: new.g:73:39: unexpected token: B
error(100): new.g:78:11: syntax error: antlr: new.g:78:11: unexpected token: A
error(100): new.g:78:31: syntax error: antlr: new.g:78:31: unexpected token: B
error(100): new.g:80:11: syntax error: antlr: new.g:80:11: unexpected token: C
error(100): new.g:86:28: syntax error: antlr: new.g:86:28: unexpected token: A
error(100): new.g:86:46: syntax error: antlr: new.g:86:46: unexpected token: B
error(100): new.g:86:63: syntax error: antlr: new.g:86:63: unexpected token: C
error(100): new.g:88:27: syntax error: antlr: new.g:88:27: unexpected token: D
error(100): new.g:88:44: syntax error: antlr: new.g:88:44: unexpected token: E
error(100): new.g:90:9: syntax error: antlr: new.g:90:9: unexpected token: F
error(100): new.g:108:9: syntax error: antlr: new.g:108:9: unexpected token: A
error(100): new.g:131:19: syntax error: antlr: new.g:131:19: unexpected token: A
error(100): new.g:176:9: syntax error: antlr: new.g:176:9: unexpected token: A
error(100): new.g:176:41: syntax error: antlr: new.g:176:41: unexpected token: B
error(100): new.g:176:70: syntax error: antlr: new.g:176:70: unexpected token: C
error(100): new.g:241:20: syntax error: antlr: new.g:241:20: unexpected token: A
error(100): new.g:270:9: syntax error: antlr: new.g:270:9: unexpected token: A
error(100): new.g:287:33: syntax error: antlr: new.g:287:33: unexpected token: A
error(100): new.g:287:40: syntax error: antlr: new.g:287:40: unexpected token: B
error(100): new.g:296:25: syntax error: antlr: new.g:296:25: unexpected token: C
error(100): new.g:296:32: syntax error: antlr: new.g:296:32: unexpected token: D
error(100): new.g:304:18: syntax error: antlr: new.g:304:18: unexpected token: E
error(100): new.g:308:15: syntax error: antlr: new.g:308:15: unexpected token: A
error(100): new.g:322:13: syntax error: antlr: new.g:322:13: unexpected token: A
error(100): new.g:334:15: syntax error: antlr: new.g:334:15: unexpected token: A
error(10):  internal error: Exception new.g:760:1: expecting '}', found '<EOF>'@org.antlr.tool.ANTLRLexer.nextToken(ANTLRLexer.java:333): unexpected stream error from parsing new.g 
warning(149): new.g:0:0: rewrite syntax or operator with no output option; setting output=AST
error(150):  grammar file new.g has no rules
error(100): new.g:0:0: syntax error: assign.types: <AST>:0:0: unexpected end of subtree
error(100): new.g:0:0: syntax error: define: <AST>:0:0: unexpected end of subtree
  
My grammer file is attached with 
thanking ,
hassan


      __________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080807/441efdd3/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nn.g
Type: application/octet-stream
Size: 16678 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20080807/441efdd3/attachment-0001.obj 


More information about the antlr-interest mailing list