[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re:
Jan De Bo wrote:
I've got problems with the transformation from a cst to ast in
particular with
equality_rule = [left]:concept_label equals [right]:concept_label
{-> New equality_rule([concept_label])};
when I run sablecc I always get the error message :
[126,31] concept_label must be one of the elements on the left side of
the arrow or is already refered to in this alternative
You must specify which "concept_label" you want to keep in the AST; is
it "left" or "right"?
In other words, SableCC expects the name ("left") of the element not the
type ("concept_label") on the right hand side of "{->". Of course, the name
and type are the same unless you explicitly provide a name using the "[]:"
notation, as you did above.
You could try this:
equality_rule = [left]:concept_label equals [right]:concept_label
{-> New equality_rule([left])};
Have fun!
Etienne
--
Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/
SableVM: http://www.sablevm.org/
SableCC: http://www.sablecc.org/