|
From: | Bauer, Thomas |
Subject: | [Grammatica-users] Add token image to node values automatically |
Date: | Thu, 30 May 2013 13:57:49 +0000 |
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
|
[Prev in Thread] | Current Thread | [Next in Thread] |