Re:LALRPOP, an LR(1) parser generator for Rust
by ibraheemdev on Monday January 25, 2021 @02:03PM
(#25907205)
I believe there is a work in progress implementation of a proc-macro interface for lalrpop here [0]
Re:LALRPOP, an LR(1) parser generator for Rust
by conradludgate on Monday January 25, 2021 @02:25PM
(#25907546)
Not saying it's ever sensible to go against dtolnay and his infinite wisdom when it comes to proc macros, but I think i might create my own alternative implementation. I'm not sure though, I'll need to play around with lalrpop some more first and figure out some complex scenarios before I decide
Perhaps the output won't be so smart if its only building the parser element by element rather than seeing the full picture. Also grammers like `"(" Term ")"` would probably be implemented as a struct and that's a bit less developer friendly to quickly code. (Although it could be tuple `(LParen, Term, RParen)` which isn't too far off)
Maybe I'll take a deeper look into the code when I have some free time, but I think I would prefer a proc macro based system