[antlr-interest] matchSetTrack.st

Craig Main craig at palantir.co.za
Thu Jul 27 06:40:41 PDT 2006


Hi,

I have started working on migrating my 2.7.6 grammar to version 3.0.
I am using the 11 ea version of studio.

I get an IllegalArgumentException, cannot find template matchSetTrack.st
org.antlr.stringtemplate.StringTemplateGroup.lookupTemplate.

My grammar, WIP

grammar RuleParser;
options {
	output = AST;
	ASTLabelType = CommonTree;
}

start		: statement+
		;
statement	: assign
		;
assign	: ID ASSIGN expression
		;
expression	: lvalue=term (operator=(PLUS|MINUS) rvalue=term)* ->
^($operator $lvalue $rvalue)
		;
term		: factor ((MULTIPLY|DIVIDE) factor)*
		;
factor	: literal
		;
literal	: ID
		| FLOAT
		;
/* tokens */
ID 		: ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*
		;
ASSIGN     	: '=' ;
MULTIPLY        : '*' ;
DIVIDE          : '/' ;
PLUS            : '+' ;
MINUS           : '-' ;
DIGIT		: '0'..'9' ;
FLOAT		: (DIGIT)+ ('.' (DIGIT)*)?

Regards
Craig





More information about the antlr-interest mailing list