Re:Pratt parsing is a black box
by nagaiaida on Wednesday November 04, 2026 @03:12AM
(#50362668)
for another perspective, raku lets you carry around reusable grammars, but each time you parse something with them you have the option to specify an actions class, the methods of which are invoked and passed the corresponding matches from the grammar (this lets you reuse the actual grammar matched against; sometimes you just want to typecheck cli arguments to main against a grammar and aren't actually going to use the match as anything other than an ornate boolean, but you might as well keep the actual grammar in sync between that nop/bool parser and another parser that actually builds something useful later).
so that's another community's vote for actions as something belonging to The Parser over and above the strict grammar by which that parsing is done.
so that's another community's vote for actions as something belonging to The Parser over and above the strict grammar by which that parsing is done.