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

Represents a non-terminal symbol in a formal grammar.

Non-terminal symbols can be expanded via production rules. They correspond to grammar rules and are replaced during derivation.

Properties§

public string $value

Methods§

public function __construct(public string $value)

Parameters

$valuestringName of the symbol as the grammar spells it
public function value(): string

Answers the symbol's name.

Returns

string Name of the symbol as the grammar spells it
Test cases 2

Test cases 268§

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 266

Relations§

Instantiated in 6
Type checks 14
Type declarations 2