public static class Translet.HeadParser<A> extends Translet.Parser<A>
Translet.State object, discarding all the tail.| Modifier and Type | Field and Description |
|---|---|
protected Translet.Parser<A> |
p1
The hear parser, result of which will become the result of this.
|
protected List<Translet.Parser<?>> |
seps
List of following parsers, not contributing to result.
|
| Constructor and Description |
|---|
HeadParser(Translet.Parser<A> p1,
List<Translet.Parser<?>> seps)
Only constructor, setting the first and the following parsers.
|
HeadParser(Translet.Parser<A> p1,
Translet.Parser<?>[] seps)
Only constructor, setting the first and the trailing parsers.
|
| Modifier and Type | Method and Description |
|---|---|
Format |
name(boolean full,
Map<Translet.Recursive,String> names)
Returns a user-readable text representation.
|
Set<Translet.State<A>> |
parseOneState(Translet.State<?> inState,
Set<Translet.Alternative> alternatives)
Calculate a set of possible successor states by applying this parser
to the incoming state and append all altenatives found underways to
the parameter "alternatives".
|
String |
unparse(Object key)
Reverse the parsing process (as far as possible) and deliver a
string representation which when parsed delivered the parse result.
|
executeStoring, isTerminal, mparse, name, parseEpsilon, stripOpt, toString, toString, wrapResultprotected Translet.Parser<A> p1
protected List<Translet.Parser<?>> seps
public HeadParser(Translet.Parser<A> p1, Translet.Parser<?>[] seps)
public HeadParser(Translet.Parser<A> p1, List<Translet.Parser<?>> seps)
public String unparse(Object key)
Translet.Parserunparse in class Translet.Parser<A>public Set<Translet.State<A>> parseOneState(Translet.State<?> inState, Set<Translet.Alternative> alternatives)
Translet.ParserparseOneState in class Translet.Parser<A>public Format name(boolean full, Map<Translet.Recursive,String> names)
Translet.Parsername in class Translet.Parser<A>full - whether storage constructs do appear in the rendering.names - a map for managing the renderings of recursive calls