Closed enjoysmath closed 1 year ago
Not sure what example you are referring to. If you want to see an example of how a ParseTree
is used in real life, there is one inside Pegged itself: https://github.com/PhilippeSigaud/Pegged/blob/913c545472e523031ad57065a47fd3c717dae86b/pegged/grammar.d#L196
This is how Pegged interprets its own grammar to generate the PEG parser from a user-supplied grammar.
Can you link me to that example that has the switch-case statement of the different Wikipedia hierarchical sections?
I'm not parsing Wikipedia, I just think it's a good example of what to do with the ParseTree.