Token Stream Exception while reading Grammer
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Gunjan_Gupta
Posted On:   Monday, February 2, 2009 03:43 AM

Hi All, I am new to Antlr. So i need some help on this. While running this as follows on command prompt. D:ActuateSamplelexer-parserConversionTool>java antlr.Tool vb_org.txt ANTLR Parser Generator Version 2.7.5 (20050128) 1989-2005 jGuru.com error: Token stream error reading grammar(s): vb_org.txt:45:7: expecting ''', found 'p' TokenStreamException: expecting ''', found 'p' as seen, i am getting TokenStream Exception. But when i am using AntlrWorks to check the Grammer syntax, it is showing correct to me. Could anybody help me on this ? I would like to send my Grammer as reference. Any help would be a   More>>

Hi All,
I am new to Antlr. So i need some help on this.


While running this as follows on command prompt.


D:ActuateSamplelexer-parserConversionTool>java antlr.Tool vb_org.txt

ANTLR Parser Generator Version 2.7.5 (20050128) 1989-2005 jGuru.com

error: Token stream error reading grammar(s):
vb_org.txt:45:7: expecting ''', found 'p'
TokenStreamException: expecting ''', found 'p'


as seen, i am getting TokenStream Exception. But when i am using AntlrWorks to check the Grammer syntax, it is showing correct to me.


Could anybody help me on this ?
I would like to send my Grammer as reference.


Any help would be appreciated.

regards,

   <<Less

Re: Token Stream Exception while reading Grammer

Posted By:   Gunjan_Gupta  
Posted On:   Tuesday, February 3, 2009 11:07 PM

hi Gavin,

Thanks for quick Response.

It was really helpful to me.


After trying with the antlr v3 , I am getting different error in console.


D:ActuateSamplelexer-parserConversionTool>java org.antlr.Tool D:ActuateVBv
b_org.g

ANTLR Parser Generator Version 3.1.1

error(100): D:ActuateVBvb_org.g:1:1: syntax error: antlr: D:ActuateVBvb_or
g.g:1:1: unexpected token: class

warning(149): D:ActuateVBvb_org.g:0:0: rewrite syntax or operator with no out
put option; setting output=AST

error(150): grammar file D:ActuateVBvb_org.g has no rules

error(100): D:ActuateVBvb_org.g:0:0: syntax error: assign.types: :0:0: u
nexpected end of subtree

error(100): D:ActuateVBvb_org.g:0:0: syntax error: define: :0:0: unexpec
ted end of subtree


i am attching my .g file for reference.
Any help would be appriciated.
regards,
Gunjan

About | Sitemap | Contact