Open Temtaime opened 8 years ago
Maybe this is caused by the call to decimateTree()
in opCall()
in the generated parser?
Hi,
On Thu, Mar 31, 2016 at 10:10 PM, Temtaime notifications@github.com wrote:
For example if i call certain rule from my grammar, it returns a parsetree with all the internal « or / and / etc » nodes. But when i call all the grammar there's no such nodes.
That's explained in the docs :
https://github.com/PhilippeSigaud/Pegged/wiki/Using-a-Grammar#calling-a-rule
Calling a rule directly is more 'low-level' than calling the grammar.
Also it seems there's no flags for this behavior. How can i get rid of such nodes ?
Use 'decimateTree()'. See the previous link, and also:
https://github.com/PhilippeSigaud/Pegged/wiki/Tree-Decimation#tree-decimation
For example if i call certain rule from my grammar, it returns a parsetree with all the internal « or / and / etc » nodes. But when i call the grammar itself there's no such nodes. Also it seems there's no flags for this behavior. How can i get rid of such nodes ?