8 ms·
My first introduction to creating languages was encountering lex/yacc. I tried that and quickly run away in disgust.
by TeMPOraL 10y ago
My first introduction to creating languages was encountering lex/yacc. I tried that and quickly run away in disgust.
- loup-vaillant 10y agoMany of lex/yacc flaws (flaky syntax, global mutable state…) have nothing to do with their fundamentals. Also, LALR is bad, you want a generalised parser that can work on any context free grammar (Bison has such a mode). We need no-nonsense lexer and parser generators, that are easy to use, easy to deploy, not too hard to implement, and generate fast parsers. My own studies¹ suggest it can be done. Unfortunately, I'm busy earning a salary right now. [1]: http://loup-vaillant.fr/tutorials/earley-parsing/ http://loup-vaillant.fr/tutorials/earley-parsing/
- pjmlp 10y agoYou just gave something to go over during the weekend. :)