final class Directives
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

The directives Bison's scanner knows, and the spellings it accepts for them.

Bison accepts an underscore for the hyphen of a few old directives and reads %term, %binary and %defines as %token, %nonassoc and %header. The canonical name is the modern hyphenated one.

Constants§

public const SPELLINGS = ['binary' => 'nonassoc', 'code' => 'code', 'debug' => 'debug', 'default-prec' =…

Canonical name by every accepted spelling, without the percent sign.

public const FLAGS = ['debug', 'default-prec', 'error-verbose', 'fixed-output-files', 'glr-parser', …

Directives that take no argument.

public const OPTIONS = ['file-prefix' => false, 'header' => true, 'language' => false, 'name-prefix' =…

Directives that take a string, and whether the string may be omitted.

public const EQUAL_OPTIONAL = ['file-prefix', 'name-prefix', 'output']

Directives after which the scanner swallows an optional = before the argument.

public const DASH_OR_UNDERSCORE = ['default-prec', 'error-verbose', 'expect-rr', 'fixed-output-files', 'name-pref…

Directives Bison also reads with underscores in place of any of the dashes, as deprecated spellings.

Methods§

public static function canonical(string $spelling): string|null

Answers the canonical name of a directive as spelled.

Parameters

$spellingstringThe directive without its percent sign, as written

Returns

string|null The canonical name, or null when Bison knows no such directive
Test cases 1
Called from 1
Calls 4

Test cases 9§

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

Dedicated tests 1
Other tests reaching this symbol 8

Relations§

Static calls 1
Constant reads 4