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
Test cases 1032
public function value(): string

Answers the symbol's name.

Returns

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

Test cases 1253§

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 1251

Relations§

Instantiated in 4
Type checks 11
Type declarations 2