Compiler compiler in C#

后端 未结 7 981
遥遥无期
遥遥无期 2021-02-03 13:28

I\'m looking for a customizable parser and/or lexer that can allow me to build a custom syntax checker in C#. Essentially the user will enter code a line of code (custom), and t

7条回答
  •  伪装坚强ぢ
    2021-02-03 13:58

    I use a recursive descent parser which combines parsing and lexing that I wrote from scratch in C# in my own language project. I found it made writing grammar rules relatively easy. See here for an example grammar and see here for the unit tests.

提交回复
热议问题