Flex/Bison-like functionality within PHP

前端 未结 3 955
长情又很酷
长情又很酷 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:30

    Have you tried looking at PEG parser generators in PHP: https://github.com/maetl/php-peg ?

    Or a parser combinator approach: http://qntm.org/locoparser ?

提交回复
热议问题