|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Left values and assignmentsHi,
I'm having trouble with SableCC's CST->AST transformations. I'm trying to write productions for assignments and left values because I have C-like structs in my language. Here is what I have: simple_statement {-> statement} = {assign} lvalue assign exp semi {-> New statement.assign(lvalue,exp) } basic_exp {-> exp} = (...) | {lvalue} lvalue {-> New exp.lvalue(lvalue) } How should I define lvalue to be able to parse this? x.number = 10; print(x.number); Thanks. -- Henrique Rocha www.hmrocha.com ExpertRating Certified Windows XP Professional ExpertRating Certified Unix Shell Script Professional ExpertRating Certified Unix Professional ExpertRating Certified Object-Oriented Concepts Professional ExpertRating Certified Professional Computer Technician Skills ExpertRating Certified HTML 4 Professional _______________________________________________ SableCC-Discussion mailing list SableCC-Discussion@... http://lists.sablecc.org/listinfo/sablecc-discussion |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |