3 ms·
Unfortunately, there is a catch: http://loup-vaillant.fr/tutorials/earley-parsing/parser http://loup-vaillant.fr/tutorials/earley-parsing/parser Once you have
by kazinator 11y ago
Unfortunately, there is a catch:
http://loup-vaillant.fr/tutorials/earley-parsing/parser http://loup-vaillant.fr/tutorials/earley-parsing/parser
Once you have a successful parse, extracting the tree from it is a little bit like pulling teeth. You have to perform searches on the Early set data, and deal with ambiguities at that point.
None of the mainstream method have any major difficulty with popping out abstract syntax trees in a straightforward syntax-directed manner.
- yxhuvud 11y agoThere are efficient ways to do it though (the article link to Scott), even if they are not always very easy to understand.