Conversation

LALRPOP: Mature, good error messages, generates LALR(1). Mine: Prototype, terrible error messages, generates canonical LR(1). I'm using mine as a research device and for learning. I will be implementing GLR, good errors + error recovery etc.
1
1
Replying to
Very interesting post! I think I agree that lossless parse trees are a good idea and semantic actions feel like a "layering violation". tree-sitter gets this right. I should probably implement a mode in my parser generator to disallow semantic actions and return lossless trees.
2
1
Re: lexing non-regular syntax: I had came up the same idea myself when designing lexgen, but decided that the lexer states is not too bad, and it's already widely used in lexer generators, so I decided to implement lexer states instead. I'm not convinced that the idea ...
1
1
Show replies