classGrammarParseException
final class GrammarParseException
extends RuntimeException
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Reports that grammar source text could not be turned into a grammar.
Bison and Lemon grammars are read from files that ship with the server they describe, so a grammar that declares tokens but no rules, or that ends before its rules section, is a property of the input rather than a defect in the parser. Callers that load grammars at runtime are expected to handle this.
Methods§
public static function noRulesParsed(string $dialect): selfReports grammar source that yielded no production rules.
Parameters
$dialect | string | Grammar flavour that was being read, e.g. "Bison" |
Returns
self Exception naming the grammar flavourTest cases 2
Called from 1
Calls 1
- new
selfline 31
Test cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.