Package eu.bandm.tscore.base
Class Translet.LimesParser<A>
java.lang.Object
eu.bandm.tscore.base.Translet.Parser<R>
eu.bandm.tscore.base.Translet.DisjunctionParser<A>
eu.bandm.tscore.base.Translet.LimesParser<A>
- Direct Known Subclasses:
Translet.OrLimesParser
,Translet.PriorLimesParser
- Enclosing class:
- Translet
Common superclass for Parsers which accept one of many alternatives
and return the upper limit of the different result classes (OR1 and PRIOR1).
Currently maximally four(4) sub-parsers are supported.
There are four flavours of disjunctions: Acceptance can follow a priority, or be nondeterministic; the result can be a common superclass, or a
There are four flavours of disjunctions: Acceptance can follow a priority, or be nondeterministic; the result can be a common superclass, or a
CoTuple
.-
Field Summary
Modifier and TypeFieldDescriptionprotected Translet.Parser<? extends A>
protected Translet.Parser<? extends A>
protected Translet.Parser<? extends A>
protected Translet.Parser<? extends A>
-
Constructor Summary
ConstructorDescriptionLimesParser
(Translet.Parser<? extends A> p1, Translet.Parser<? extends A> p2, Translet.Parser<? extends A> p3, Translet.Parser<? extends A> p4) Constructor called only by sub-classs constructors. -
Method Summary
Modifier and TypeMethodDescriptionReverse the parsing process (as far as possible) and deliver a string representation which when parsed delivered the parse result.protected A
wrapResult
(int index, Translet.State<?> resultState) Cast the result of a successful sub-parser to the limes typeMethods inherited from class eu.bandm.tscore.base.Translet.Parser
executeStoring, isTerminal, mparse, name, name, parseEpsilon, parseOneState, stripOpt, toString, toString
-
Field Details
-
p1
-
p2
-
p3
-
p4
-
-
Constructor Details
-
LimesParser
public LimesParser(Translet.Parser<? extends A> p1, Translet.Parser<? extends A> p2, Translet.Parser<? extends A> p3, Translet.Parser<? extends A> p4) Constructor called only by sub-classs constructors.
-
-
Method Details
-
unparse
Description copied from class:Translet.Parser
Reverse the parsing process (as far as possible) and deliver a string representation which when parsed delivered the parse result.- Specified by:
unparse
in classTranslet.Parser<A>
-
wrapResult
Cast the result of a successful sub-parser to the limes type- Specified by:
wrapResult
in classTranslet.DisjunctionParser<A>
- Parameters:
index
- the index of the accepted variantresultState
- the result object to be wrapped
-