shinobu / lemon-php
Parser Generator for PHP
Installs: 185
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 15
Language:C
pkg:composer/shinobu/lemon-php
This package is not auto-updated.
Last update: 2025-10-12 01:13:37 UTC
README
-- This Fork is made for use on https://github.com/shinobu/PHP-SparqlParser It is based on https://github.com/indeyets/lemon-php Fork from https://github.com/wez/lemon-php/ -- (for licensing and copyright information, see COPYING) This is an adaptation of lemon that optionally emits PHP code to implement a parser for the grammar described in a .y file. Usage: cc -o lemon lemon.c lemon -LPHP my.y This will output my.php, which contains a PHP class that implements your parser. Usage is along the lines of: $P = new ParseParser(); $S = new Yylex(); // you can get one of these using the JLexPHP package while ($t = $S->yylex()) { $P->Parse($t->type, $t); } $P->Parse(0); You can find out more about the lemon syntax from: http://www.hwaci.com/sw/lemon/lemon.html Enjoy! --Wez.