[Newbies] How to approach this PEGParser Grammar Fix.

tty gettimothy at zoho.com
Thu Sep 5 15:42:22 UTC 2019


So, to answer my initial questions...

The way to debug this is from the bottom up.

the rule 

Page <- (Paragraph)*  and a breakpoint in the PEGActor's Paragraph method
shows that the rule for Paragraph

Line <- Flow{1,"\n"}
Paragraph <- Line

while wrong(it wraps the entire page in a paragraph), IS being captured by
the Actor.

Interesting, the Paragraph is executed before the Page..this tells me that
its an inverse onion approach. 

Get the inner rules correct and work outwards.

So, I have a broken Grammar for WikiText and now I have a method to approach
this problem.

1. try to define a rule.
2. put a breakpoint in the method that has a pragma for that rule.
3. ???
4. profilt







--
Sent from: http://forum.world.st/Squeak-Beginners-f107673.html


More information about the Beginners mailing list