SamyaDaleh / CL-Toolbox

A Parsing-as-Deduction system that parses with different parsing algorithms and some related tools for educational purposes.
7 stars 4 forks source link

Maybe implement SLR(1) #197

Open SamyaDaleh opened 5 years ago

SamyaDaleh commented 5 years ago

... if it differs from my LR(1).

Init, Closure, Shift like #196.

Reduce: [A -> alpha dot B beta, h, i], [B -> gamma dot, i, j], [a, j, j+1] __ a in Follow(B) [A -> alpha B dot beta, h, j]

Source: Sikkel, Parsing Schemata p. 286.

SamyaDaleh commented 5 years ago

For reduced acyclic grammars without indirect left recursion.

SamyaDaleh commented 5 years ago

This is interesting. It's like Earley with lookahead. Maybe I can even implement SLR(k).