PHP code example of tmilos / gold-parser
1. Go to this page and download the library: Download tmilos/gold-parser library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tmilos / gold-parser example snippets
$parser = Loader::fromFile('grammar.cgt')->createNewParser();
$nonTerminal = $parser->parse($inputString);
$parser->isAccepted(); // true