Flex/Bison-like functionality within PHP

前端 未结 3 950
长情又很酷
长情又很酷 2021-02-14 02:27

I\'m looking for a way to get Flex/Bison (or Lex/Yacc, et. al.) support in PHP. Specifically, I\'m implementing a boolean query parser in a web UI and would rather keep all ope

3条回答
  •  情深已故
    2021-02-14 02:38

    The PEAR library has the classes LexerGenerator and ParserGenerator. The LexerGenerator syntax is compatible with re2c, ParserGenerator syntax is compatible with the Lemon Parser generator.

提交回复
热议问题