public static class Translet._CONST<R> extends Translet.Parser<R>
Modifier and Type | Field and Description |
---|---|
protected R |
res
The constant result returned by this parser.
|
protected String |
s
The constant string accepted by this parser.
|
Constructor and Description |
---|
_CONST(String s,
R res)
Only constructor, sets the accepted string and the returned result.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isTerminal()
Whether the parser does directly consume character data.
|
Format |
name(boolean full,
Map<Translet.Recursive,String> names)
Returns a user-readable text representation.
|
protected Set<Translet.State<R>> |
parseOneState(Translet.State<?> st,
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, mparse, name, parseEpsilon, stripOpt, toString, toString, wrapResult
protected final String s
protected final R res
public String unparse(Object key)
Translet.Parser
unparse
in class Translet.Parser<R>
public boolean isTerminal()
Translet.Parser
Translet._CONST
, Translet._CAT
and Translet._REGEX
).isTerminal
in class Translet.Parser<R>
protected Set<Translet.State<R>> parseOneState(Translet.State<?> st, Set<Translet.Alternative> alternatives)
Translet.Parser
parseOneState
in class Translet.Parser<R>
public Format name(boolean full, Map<Translet.Recursive,String> names)
"..."
.name
in class Translet.Parser<R>
full
- whether storing operators do appear in the rendering.names
- a map for managing the renderings of recursive calls