[antlr-interest] hyperslabs
Henry Butowsky
henryb at ntlworld.com
Tue Nov 29 08:40:27 PST 2005
Hi Guys,
Im using a vary basic C grammer for a scientific application
I want to be able to use "hyper-slabs" on the left and right hand
side
of an assignment statement
var1(expr,expr,expr)
The relevent grammar is:
assign_statement:
hyper_slb ASSIGN^ expr SEMI!
;
hyper_slb: VAR_ID (arg_list)?
;
arg_list
: LPAREN! expr ( COMMA! expr )* RPAREN!
{ #arg_list = #( [ARG_LIST, "arg_list"], #arg_list ); }
;
so for say temperaure(2,3,10*2)=100;
I want to get the tree to be something like
( = temperature ( arg_list (20),(3), (*(10,2) ) ) 100)
At the momnet Im only getting only the first argument in the tree.
Any Ideas ?
Regards Henry
More information about the antlr-interest
mailing list