hand coding a parser

后端 未结 5 949
故里飘歌
故里飘歌 2020-12-23 02:13

For all you compiler gurus, I wanna write a recursive descent parser and I wanna do it with just code. No generating lexers and parsers from some other grammar and don\'t te

5条回答
  •  醉话见心
    2020-12-23 03:05

    If you want to use the parser to also handle not-well-formed expressions, you really want a recursive descent parser. Much easier to get the error handling and reporting usable.

    For literature, I'd recommend some of the old work of Niklaus Wirth. He knows how to write. Algorithms + Data Structures = Programs is what I used, but you can find his Compiler Construction online.

提交回复
热议问题