[antlr-interest] Generation of CPP

Anders Karlsson anders at globe-trotter.us
Thu Jul 24 20:25:25 PDT 2008


Hi all,

I am new to this list because I have a problem generating CPP files from within AntlrWorks 1.1.7 and was hoping somebody could help me.

I get the error "Cannot generate the grammar because: error(10): internal error: no such group file cpp.stg"

however both CSharp and C work seem to work but when specifying cpp (see below)

#######################################
grammar expeval;

options { language = cpp; }

prog 	:	stat+;

stat 	:	expr NEWLINE*
	;

expr 	:	INT unary_operator expr
	|	INT 
	|	'(' expr ')'
	;

unary_operator
    : '*'
    | '+'
    | '-'
    ;    
	
NEWLINE :	 '\r'? '\n'? ;
INT	:	('0' | '1'..'9' '0'..'9'*);
#######################################
I get the error.

What am I doing wrong? I found the cpp.stg inside the .jar but seems not to be found.

I start AntlrWorks with

java -jar antlrworks-1.1.7.jar

Would be grateful for any help.  

Note: I don't know that much about Java, just the basics

Thank you
Anders.





More information about the antlr-interest mailing list