|
From: | Per Cederberg |
Subject: | Re: [Grammatica-users] Add token image to node values automatically |
Date: | Thu, 30 May 2013 17:06:39 +0200 |
Dear Per,
as to my understanding if I want to have my productions to have values I need to add those values in my token callbacks. For example as seen in ArithmeticCalculator.cs
public override Node ExitAdd(Token node) {
node.Values.Add("+");
return node;
}
Instead of this I could also write node.Values.Add(node.Image); right?
But … isn’t this some kind of default behaviour, to have those token image values as node values. I am wondering because now I need to override every token callback to add each token value to the node values list. And there are a lot of tokens. So I ask myself whether I misunderstood something or why isn’t this by default generated in Analyzer code or at least having an option provided to do so?
regards
Thomas
_______________________________________________
Grammatica-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/grammatica-users
[Prev in Thread] | Current Thread | [Next in Thread] |