[antlr-interest] Error: rule classDef trapped

mzukowski at yci.com mzukowski at yci.com
Wed Oct 16 08:08:53 PDT 2002


It says it is expecting a single quote.  Maybe you have an unterminated
string?  A missing semicolon?

Monty

> -----Original Message-----
> From: Benhur [mailto:krupa_gadde at yahoo.com]
> Sent: Wednesday, October 16, 2002 1:35 AM
> To: antlr-interest at yahoogroups.com
> Subject: [antlr-interest] Error: rule classDef trapped
> 
> 
> Hi all,
> 
> Whenever I compile grammar where MyParser which extends TreeParser, 
> I get the following error. Any pointers why is it so? I am also 
> attaching the sub-rule at which this error is occuring.
> 
> ---------------------------------------------------------------------
> ANTLR Parser Generator   Version 2.7.1   1989-2000 jGuru.com
> error: Token stream error reading grammar
> (s):antlr.TokenStreamRecognitionException: expecting ''', found '{'
> BenhurPLSQL.g: error: rule classDef trapped: BenhurPLSQL.g:229: 
> unexpected token: (
> error: aborting grammar 'BenhurPLSqlParser' due to errors
> TokenStreamException: unexpected char: %
> ---------------------------------------------------------------------
> 
> Code --- I am getting error at the line	#( (START_LABEL 
> label_name 
> END_LABEL)?. I defined START_LABEL and END_LABEL as tokens and also 
> defined them in MyLexer
> 
> plsql_block:
> 	#( (START_LABEL label_name END_LABEL)?
> 	(("declare")? (declare_spec)+)? 
> 	("begin")?
>      	seq_of_statements
>      	("exception" exception_handler (exception_handler)*)? 
>      	("end" (label_name)? SEMI!)? )
>         ;
> 
> Thanks
> Benhur
> 
> 
>  
> 
> Your use of Yahoo! Groups is subject to 
http://docs.yahoo.com/info/terms/ 


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list