Package eu.bandm.tscore.base
Class Translet.PriorCoTupleParser<A,B,C,D>
java.lang.Object
eu.bandm.tscore.base.Translet.Parser<R>
eu.bandm.tscore.base.Translet.DisjunctionParser<CoTuple<A,B,C,D>>
eu.bandm.tscore.base.Translet.CoTupleParser<A,B,C,D>
eu.bandm.tscore.base.Translet.PriorCoTupleParser<A,B,C,D>
- Enclosing class:
- Translet
Realizes disjunction which is priorized and returns a CoTuple.
-
Field Summary
Fields inherited from class eu.bandm.tscore.base.Translet.CoTupleParser
p1, p2, p3, p4
-
Constructor Summary
ConstructorDescriptionPriorCoTupleParser
(Translet.Parser<A> p1, Translet.Parser<B> p2, Translet.Parser<C> p3, Translet.Parser<D> p4) Constructor called by factory methods. -
Method Summary
Modifier and TypeMethodDescriptionname
(boolean full, Map<Translet.Recursive, String> names) Returns a user-readable text representation.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Try to parse all sub-parsers byTranslet.disj_testOneBranch(DisjunctionParser,Parser,List,int,State,Set,Set)
.Reverse the parsing process (as far as possible) and deliver a string representation which when parsed delivered the parse result.Methods inherited from class eu.bandm.tscore.base.Translet.CoTupleParser
wrapResult
Methods inherited from class eu.bandm.tscore.base.Translet.Parser
executeStoring, isTerminal, mparse, name, parseEpsilon, stripOpt, toString, toString
-
Constructor Details
-
PriorCoTupleParser
public PriorCoTupleParser(Translet.Parser<A> p1, Translet.Parser<B> p2, Translet.Parser<C> p3, Translet.Parser<D> p4) Constructor called by factory methods.
-
-
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. -
parseOneState
public Set<Translet.State<CoTuple<A,B, parseOneStateC, D>>> (Translet.State<?> inState, Set<Translet.Alternative> alternatives) Try to parse all sub-parsers byTranslet.disj_testOneBranch(DisjunctionParser,Parser,List,int,State,Set,Set)
. If no single alternative is hit, simply null is returned and a new Alternative is created one level above. If some sub-parsers are not hit, one new Alternative is constructed, joining them to a new disjunction.- Specified by:
parseOneState
in classTranslet.Parser<CoTuple<A,
B, C, D>>
-
name
Description copied from class:Translet.Parser
Returns a user-readable text representation. This is in most cases, but not always, source text to construct the parser.
-