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

Represents a terminal symbol in a formal grammar.

Terminal symbols cannot be further expanded. They are the "leaves" of the derivation tree and correspond to actual tokens in the output.

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 347§

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 345

Relations§

Instantiated in 4
Type checks 7
Type declarations 1