PetitParser
PetitParser copied to clipboard
PetitParser Browser Tally and Profile tabs are broken
In a Moose 7.0 image (fetched via Pharo Launcher) the Tally and Profile tabs in the lower-right corner of the PetitParser Browser window are blank/empty after attempting a sample parse.
(Noticed this when working though examples in the Deeper Into Pharo book's PetitParser chapter.)
I asked about this in the #moose channel on the Pharo Discord server.
@badetitou graciously responded to my question, and noticed that changing the method code of PPBrowserStream>>step from:
step
positions addLast: position.
stamps addLast: Time millisecondClockValue.
"(thisContext findContextSuchThat: [ :ctxt | ctxt receiver isKindOf: PPSea ])
ifNotNil: [ :aContext | parsers addLast: aContext receiver ]."
to:
step
positions addLast: position.
stamps addLast: Time millisecondClockValue.
(thisContext findContextSuchThat: [ :ctxt | ctxt receiver isKindOf: PPParser ])
ifNotNil: [ :aContext | parsers addLast: aContext receiver ].
at least restores the Tally figures in the PetitParser Browser. Profile figures also appear after the above change, but they are identical to the Tally figures, which is likely incorrect.
So, the Profile figures also need correction.