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): self

Reports grammar source that yielded no production rules.

Parameters

$dialectstringGrammar flavour that was being read, e.g. "Bison"

Returns

self Exception naming the grammar flavour
Test cases 2
Called from 1
Calls 1

Test cases 3§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 2
Other tests reaching this symbol 1

Relations§

Static calls 1