Writing a formal language parser with Lisp

后端 未结 3 1766
灰色年华
灰色年华 2020-12-30 10:44

My company is designing a new domain specific scripting language; I have to implement a parser that translates our brand new programming language into a common scripting lan

3条回答
  •  情深已故
    2020-12-30 11:04

    To cover the Racket part of it:

    People often write parsers and there are many ways to do so:

    • Write a recursive descent parser manually.
    • Use the parser-tools library in Racket, which is lex/yacc style.
    • Use Ragg, an AST generator generator letting you write BNF.
    • Use Parsack, a monadic parser combinator library similar to Haskell's Parsec.
    • I'm probably overlooking at least a half-dozen other options (e.g. I know there's at least one PEG style lib for Racket).

提交回复
热议问题