public static class Translet._CAT<R> extends Translet.Parser<R>
Modifier and Type | Field and Description |
---|---|
protected Format |
name
Pretty-printed name, similar to the call to a factory method.
|
protected @Opt Map<String,R> |
results
Maps input strings to result objects.
|
protected List<String> |
sortedStrings
List of names sorted by increasing length ???? FIXME
|
protected List<String> |
strings
List of names as input to the constructor.
|
Constructor and Description |
---|
_CAT(List<String> s)
Constructs a catalog parser with a list of inputs texts, which are directly the result.
|
_CAT(Map<String,R> results)
Constructs a catalog parser with an explicit map of inputs texts ot result objects.
|
_CAT(String... s)
Constructs a catalog parser with a list of inputs texts, which are directly the 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)
Return the longest possible match of catalog entries.
|
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 List<String> sortedStrings
@Opt protected final @Opt Map<String,R> results
protected Format name
public _CAT(Map<String,R> results)
public _CAT(String... s)
public boolean isTerminal()
Translet.Parser
Translet._CONST
, Translet._CAT
and Translet._REGEX
).isTerminal
in class Translet.Parser<R>
public String unparse(Object key)
Translet.Parser
unparse
in class Translet.Parser<R>
protected Set<Translet.State<R>> parseOneState(Translet.State<?> st, Set<Translet.Alternative> alternatives)
parseOneState
in class Translet.Parser<R>
public Format name(boolean full, Map<Translet.Recursive,String> names)
Translet.Parser
name
in class Translet.Parser<R>
full
- whether storage constructs do appear in the rendering.names
- a map for managing the renderings of recursive callsname