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

Writes rules back as Lemon reads them.

Methods§

public function print(Rule $rule): string

Writes one rule on one line, without the line break.

Parameters

$ruleRuleThe rule

Returns

string `lhs(alias) ::= items. [PREC] {NEVER-REDUCE} {code}`
Test cases 1
Called from 1
Calls 1
public function item(RhsItem $item): string

Writes one position of a right-hand side.

Parameters

$itemRhsItemThe position

Returns

string The symbols joined by `|`, then the alias in parentheses
Test cases 1
Called from 1
Calls 2

Test cases 5§

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 3

Relations§

Instantiated in 1
Method calls 1
Type declarations 1