Carpeg generator interface for node
$ npm install carpeg-cli
$ carpeg generate inputGrammar.cpeg outputFile.php --target php --name MyParserName
include("./outputFile.php");
$parsed = MyParserName::parse('input string');
echo $parsed->hadError; // true