I
- input stream symbol typeA
- parser result typepublic class Ref<I,A> extends Object implements Parser<I,A>
Parser
.
At creation the reference is typically uninitialised.
Any of the Parser
methods will throw if invoked on an uninitialised Ref
.
It is subsequently initialised (via the set(Parser)
method) with a Parser
Ref
is typically used to allow parsers for grammars with circular
dependencies to be constructed.
Modifier and Type | Method and Description |
---|---|
Lazy<Boolean> |
acceptsEmpty()
Indicate whether this parser accepts the empty symbol.
|
Result<I,A> |
apply(Input<I> in,
SymSet<I> follow)
Apply this parser to the input stream.
|
Lazy<SymSet<I>> |
firstSet()
The First Set for this parser.
|
Parser<I,A> |
set(Parser<I,A> impl)
Initialise this reference
|
public Parser<I,A> set(Parser<I,A> impl)
impl
- the parserpublic Lazy<Boolean> acceptsEmpty()
Parser
acceptsEmpty
in interface Parser<I,A>
public Lazy<SymSet<I>> firstSet()
Parser
Copyright © 2019. All rights reserved.