├── .github └── workflows │ └── php.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── LICENSE.md ├── README.md ├── bin └── phpyacc ├── composer.json ├── composer.lock ├── examples ├── 00-basic-usage │ ├── grammar.y │ ├── parser.diff │ ├── parser.kmyacc.php │ ├── parser.phpyacc.php │ ├── parser.template.php │ ├── y.diff │ ├── y.kmyacc.output │ └── y.phpyacc.output ├── 01-expression-support │ ├── grammar.y │ ├── parser.diff │ ├── parser.kmyacc.php │ ├── parser.phpyacc.php │ ├── parser.template.php │ ├── y.diff │ ├── y.kmyacc.output │ └── y.phpyacc.output ├── 02-complex-expression-support │ ├── grammar.y │ ├── parser.diff │ ├── parser.kmyacc.php │ ├── parser.phpyacc.php │ ├── parser.template.php │ ├── y.diff │ ├── y.kmyacc.output │ └── y.phpyacc.output ├── 10-php7 │ ├── grammar.y │ ├── parser.diff │ ├── parser.kmyacc.php │ ├── parser.phpyacc.php │ ├── parser.template.php │ ├── y.diff │ ├── y.kmyacc.output │ └── y.phpyacc.output ├── 20-custom-parser │ ├── grammar.y │ ├── parser.diff │ ├── parser.kmyacc.php │ ├── parser.phpyacc.php │ ├── parser.template.php │ ├── y.diff │ ├── y.kmyacc.output │ └── y.phpyacc.output └── rebuild.php └── lib ├── CodeGen ├── Language.php ├── Language │ └── PHP.php └── Template.php ├── Compress ├── Auxiliary.php ├── Compress.php ├── CompressResult.php ├── Preimage.php ├── TRow.php └── functions.php ├── Exception ├── LexingException.php ├── LogicException.php ├── ParseException.php ├── PhpYaccException.php └── TemplateException.php ├── Generator.php ├── Grammar ├── Context.php ├── State.php └── Symbol.php ├── Lalr ├── ArrayBitset.php ├── Bitset.php ├── Conflict.php ├── Conflict │ ├── ReduceReduce.php │ └── ShiftReduce.php ├── Generator.php ├── Item.php ├── LalrResult.php ├── Lr1.php ├── Reduce.php ├── StringBitset.php └── functions.php ├── Macro.php ├── Yacc ├── Lexer.php ├── LexerTest.php ├── Macro │ └── DollarExpansion.php ├── MacroAbstract.php ├── MacroSet.php ├── Parser.php ├── ParserTest.php ├── Production.php ├── ProductionTest.php ├── Token.php └── TokenTest.php └── functions.php /.github/workflows/php.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/.github/workflows/php.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/.gitignore -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/CODE_OF_CONDUCT.md -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/LICENSE.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/README.md -------------------------------------------------------------------------------- /bin/phpyacc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/bin/phpyacc -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/composer.json -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/composer.lock -------------------------------------------------------------------------------- /examples/00-basic-usage/grammar.y: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/00-basic-usage/grammar.y -------------------------------------------------------------------------------- /examples/00-basic-usage/parser.diff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/00-basic-usage/parser.diff -------------------------------------------------------------------------------- /examples/00-basic-usage/parser.kmyacc.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/00-basic-usage/parser.kmyacc.php -------------------------------------------------------------------------------- /examples/00-basic-usage/parser.phpyacc.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/00-basic-usage/parser.phpyacc.php -------------------------------------------------------------------------------- /examples/00-basic-usage/parser.template.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/00-basic-usage/parser.template.php -------------------------------------------------------------------------------- /examples/00-basic-usage/y.diff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/00-basic-usage/y.diff -------------------------------------------------------------------------------- /examples/00-basic-usage/y.kmyacc.output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/00-basic-usage/y.kmyacc.output -------------------------------------------------------------------------------- /examples/00-basic-usage/y.phpyacc.output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/00-basic-usage/y.phpyacc.output -------------------------------------------------------------------------------- /examples/01-expression-support/grammar.y: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/01-expression-support/grammar.y -------------------------------------------------------------------------------- /examples/01-expression-support/parser.diff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/01-expression-support/parser.diff -------------------------------------------------------------------------------- /examples/01-expression-support/parser.kmyacc.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/01-expression-support/parser.kmyacc.php -------------------------------------------------------------------------------- /examples/01-expression-support/parser.phpyacc.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/01-expression-support/parser.phpyacc.php -------------------------------------------------------------------------------- /examples/01-expression-support/parser.template.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/01-expression-support/parser.template.php -------------------------------------------------------------------------------- /examples/01-expression-support/y.diff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/01-expression-support/y.diff -------------------------------------------------------------------------------- /examples/01-expression-support/y.kmyacc.output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/01-expression-support/y.kmyacc.output -------------------------------------------------------------------------------- /examples/01-expression-support/y.phpyacc.output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/01-expression-support/y.phpyacc.output -------------------------------------------------------------------------------- /examples/02-complex-expression-support/grammar.y: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/02-complex-expression-support/grammar.y -------------------------------------------------------------------------------- /examples/02-complex-expression-support/parser.diff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/02-complex-expression-support/parser.diff -------------------------------------------------------------------------------- /examples/02-complex-expression-support/parser.kmyacc.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/02-complex-expression-support/parser.kmyacc.php -------------------------------------------------------------------------------- /examples/02-complex-expression-support/parser.phpyacc.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/02-complex-expression-support/parser.phpyacc.php -------------------------------------------------------------------------------- /examples/02-complex-expression-support/parser.template.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/02-complex-expression-support/parser.template.php -------------------------------------------------------------------------------- /examples/02-complex-expression-support/y.diff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/02-complex-expression-support/y.diff -------------------------------------------------------------------------------- /examples/02-complex-expression-support/y.kmyacc.output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/02-complex-expression-support/y.kmyacc.output -------------------------------------------------------------------------------- /examples/02-complex-expression-support/y.phpyacc.output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/02-complex-expression-support/y.phpyacc.output -------------------------------------------------------------------------------- /examples/10-php7/grammar.y: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/10-php7/grammar.y -------------------------------------------------------------------------------- /examples/10-php7/parser.diff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/10-php7/parser.diff -------------------------------------------------------------------------------- /examples/10-php7/parser.kmyacc.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/10-php7/parser.kmyacc.php -------------------------------------------------------------------------------- /examples/10-php7/parser.phpyacc.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/10-php7/parser.phpyacc.php -------------------------------------------------------------------------------- /examples/10-php7/parser.template.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/10-php7/parser.template.php -------------------------------------------------------------------------------- /examples/10-php7/y.diff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/10-php7/y.diff -------------------------------------------------------------------------------- /examples/10-php7/y.kmyacc.output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/10-php7/y.kmyacc.output -------------------------------------------------------------------------------- /examples/10-php7/y.phpyacc.output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/10-php7/y.phpyacc.output -------------------------------------------------------------------------------- /examples/20-custom-parser/grammar.y: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/20-custom-parser/grammar.y -------------------------------------------------------------------------------- /examples/20-custom-parser/parser.diff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/20-custom-parser/parser.diff -------------------------------------------------------------------------------- /examples/20-custom-parser/parser.kmyacc.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/20-custom-parser/parser.kmyacc.php -------------------------------------------------------------------------------- /examples/20-custom-parser/parser.phpyacc.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/20-custom-parser/parser.phpyacc.php -------------------------------------------------------------------------------- /examples/20-custom-parser/parser.template.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/20-custom-parser/parser.template.php -------------------------------------------------------------------------------- /examples/20-custom-parser/y.diff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/20-custom-parser/y.diff -------------------------------------------------------------------------------- /examples/20-custom-parser/y.kmyacc.output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/20-custom-parser/y.kmyacc.output -------------------------------------------------------------------------------- /examples/20-custom-parser/y.phpyacc.output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/20-custom-parser/y.phpyacc.output -------------------------------------------------------------------------------- /examples/rebuild.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/examples/rebuild.php -------------------------------------------------------------------------------- /lib/CodeGen/Language.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/CodeGen/Language.php -------------------------------------------------------------------------------- /lib/CodeGen/Language/PHP.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/CodeGen/Language/PHP.php -------------------------------------------------------------------------------- /lib/CodeGen/Template.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/CodeGen/Template.php -------------------------------------------------------------------------------- /lib/Compress/Auxiliary.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Compress/Auxiliary.php -------------------------------------------------------------------------------- /lib/Compress/Compress.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Compress/Compress.php -------------------------------------------------------------------------------- /lib/Compress/CompressResult.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Compress/CompressResult.php -------------------------------------------------------------------------------- /lib/Compress/Preimage.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Compress/Preimage.php -------------------------------------------------------------------------------- /lib/Compress/TRow.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Compress/TRow.php -------------------------------------------------------------------------------- /lib/Compress/functions.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Compress/functions.php -------------------------------------------------------------------------------- /lib/Exception/LexingException.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Exception/LexingException.php -------------------------------------------------------------------------------- /lib/Exception/LogicException.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Exception/LogicException.php -------------------------------------------------------------------------------- /lib/Exception/ParseException.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Exception/ParseException.php -------------------------------------------------------------------------------- /lib/Exception/PhpYaccException.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Exception/PhpYaccException.php -------------------------------------------------------------------------------- /lib/Exception/TemplateException.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Exception/TemplateException.php -------------------------------------------------------------------------------- /lib/Generator.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Generator.php -------------------------------------------------------------------------------- /lib/Grammar/Context.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Grammar/Context.php -------------------------------------------------------------------------------- /lib/Grammar/State.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Grammar/State.php -------------------------------------------------------------------------------- /lib/Grammar/Symbol.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Grammar/Symbol.php -------------------------------------------------------------------------------- /lib/Lalr/ArrayBitset.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Lalr/ArrayBitset.php -------------------------------------------------------------------------------- /lib/Lalr/Bitset.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Lalr/Bitset.php -------------------------------------------------------------------------------- /lib/Lalr/Conflict.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Lalr/Conflict.php -------------------------------------------------------------------------------- /lib/Lalr/Conflict/ReduceReduce.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Lalr/Conflict/ReduceReduce.php -------------------------------------------------------------------------------- /lib/Lalr/Conflict/ShiftReduce.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Lalr/Conflict/ShiftReduce.php -------------------------------------------------------------------------------- /lib/Lalr/Generator.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Lalr/Generator.php -------------------------------------------------------------------------------- /lib/Lalr/Item.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Lalr/Item.php -------------------------------------------------------------------------------- /lib/Lalr/LalrResult.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Lalr/LalrResult.php -------------------------------------------------------------------------------- /lib/Lalr/Lr1.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Lalr/Lr1.php -------------------------------------------------------------------------------- /lib/Lalr/Reduce.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Lalr/Reduce.php -------------------------------------------------------------------------------- /lib/Lalr/StringBitset.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Lalr/StringBitset.php -------------------------------------------------------------------------------- /lib/Lalr/functions.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Lalr/functions.php -------------------------------------------------------------------------------- /lib/Macro.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Macro.php -------------------------------------------------------------------------------- /lib/Yacc/Lexer.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Yacc/Lexer.php -------------------------------------------------------------------------------- /lib/Yacc/LexerTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Yacc/LexerTest.php -------------------------------------------------------------------------------- /lib/Yacc/Macro/DollarExpansion.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Yacc/Macro/DollarExpansion.php -------------------------------------------------------------------------------- /lib/Yacc/MacroAbstract.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Yacc/MacroAbstract.php -------------------------------------------------------------------------------- /lib/Yacc/MacroSet.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Yacc/MacroSet.php -------------------------------------------------------------------------------- /lib/Yacc/Parser.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Yacc/Parser.php -------------------------------------------------------------------------------- /lib/Yacc/ParserTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Yacc/ParserTest.php -------------------------------------------------------------------------------- /lib/Yacc/Production.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Yacc/Production.php -------------------------------------------------------------------------------- /lib/Yacc/ProductionTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Yacc/ProductionTest.php -------------------------------------------------------------------------------- /lib/Yacc/Token.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Yacc/Token.php -------------------------------------------------------------------------------- /lib/Yacc/TokenTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/Yacc/TokenTest.php -------------------------------------------------------------------------------- /lib/functions.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ircmaxell/PHP-Yacc/HEAD/lib/functions.php --------------------------------------------------------------------------------