Uses of Class
eu.bandm.tscore.base.Translet.State
Package
Description
Generic and low level data types and transformation algorithms,
to be used by very different applications of the
tscore
framework.-
Uses of Translet.State in eu.bandm.tscore.base
Modifier and TypeFieldDescriptionprotected Translet.State<?>
Translet.Alternative.pre
The parsing state in which these alternatives have been considered.(package private) final @Opt Translet.State<?>
Translet.State.pre
The preceding state.Modifier and TypeFieldDescriptionstatic final Predicate<Translet.State>
Translet.State.p_atEnd
protected Multimap<Translet.Parser<?>,
Translet.State<?>> Translet.PermutationParser.parser2state
Maps all sub-parsers to all states the created during all parsing apptempts.Modifier and TypeMethodDescriptionstatic Translet.State<Object>
Create an initial state with only the input data, no parser or result yet.protected @Opt Translet.State<?>
Translet.Parser.parseEpsilon
(Translet.State<?> inState) Find one parse result which consumes no characters.<N,
M extends N>
Translet.State<N>Translet.State.succ
(Translet.Parser<N> parser, int pos, M result) Return a new State, which is successor of "this", and in which "parser" has delivered "result" and consumed input up to "pos".<N,
M extends N>
Translet.State<N>Translet.State.succ
(Translet.Parser<N> parser, M result) Return a new State, which is successor of "this", and in which "parser" has delivered "result", but no input has been consumed.Modifier and TypeMethodDescriptionprotected static <R> Set<Translet.State<R>>
Translet.__SET_CAST
(Set<? extends Translet.State<?>> set) Aux function for casting a "Set<State<?>>" into a "Set<State<R>>", where R must be given explicitly by "Translet.<R>setCast(...)".final Set<Translet.State<R>>
Translet.Parser.mparse
(Set<? extends Translet.State<?>> inStates, Set<Translet.Alternative> alternatives) "*M*ultiple Parse" means to apply the parser to a set of incomingTranslet.State
s, which represent the parsing situations reached so far.protected Set<Translet.State<R>>
Translet._CAT.parseOneState
(Translet.State<?> st, Set<Translet.Alternative> alternatives) Return the longest possible match of catalog entries.protected Set<Translet.State<R>>
Translet._CONST.parseOneState
(Translet.State<?> st, Set<Translet.Alternative> alternatives) protected Set<Translet.State<String>>
Translet._REGEX.parseOneState
(Translet.State<?> st, Set<Translet.Alternative> alternatives) Translet.FramedParser.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Translet.HeadParser.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Translet.OptionParser.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Translet.OrCoTupleParser.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Try to parse all sub-parsers byTranslet.disj_testOneBranch(DisjunctionParser,Parser,List,int,State,Set,Set)
.Translet.OrLimesParser.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Try to parse all sub-parsers byTranslet.disj_testOneBranch(DisjunctionParser,Parser,List,int,State,Set,Set)
.protected abstract Set<Translet.State<R>>
Translet.Parser.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".Translet.PermutationParser.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Translet.PriorCoTupleParser.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Try to parse all sub-parsers byTranslet.disj_testOneBranch(DisjunctionParser,Parser,List,int,State,Set,Set)
.Translet.PriorLimesParser.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Try to parse all sub-parsers byTranslet.disj_testOneBranch(DisjunctionParser,Parser,List,int,State,Set,Set)
.Translet.Recursive.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Set<Translet.State<List<D>>>
Translet.RepParser.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".Translet.SequParser.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Parse breadth-first the list of sub-parsers and memorize all resulting states for later result retrieval.Translet.StorageWrapper.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Simply memorizes this parser by inserting a new state after the states resulting from the sub-parser.TransletLib._TEST.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) protected Set<? extends Translet.State<?>>
Translet.PermutationParser.test2
(Translet.State<?> oneState, BitSet tested, BitSet toEpsilon, Set<Translet.Alternative> alternatives) Tests all permutations by breadth first search: first testing all sub-parsers once, and then calling this function recursively for all states resulting from these calls.Modifier and TypeMethodDescriptionprotected Object[]
Translet.PermutationParser.args
(Translet.State<?> s) Collects results of sub-parsers out of the selected parse tree "s" and stores them in one array for constructor application by reflection.protected Object[]
Translet.SequParser.collectResults
(Translet.State<?> s, List<Set<? extends Translet.State<?>>> afterSubRess) Returns the arguments for function application for one particular resultTranslet.State
by searching the chain of predecessor states and cutting them with those related to the sub-parsers in the different positions in "afterSubRess".protected static void
Translet.disj_makeAlternative
(Translet.disj_flavour flavour, Translet.State<?> inState, Set<Translet.Alternative> alternatives, List<Translet.Parser<?>> notHit, Set<Translet.Alternative> subAlts) Constructs a new disjunction parser of the given kind with all failed sub-parser, to add this new expression to alternatives.protected static <R,
S> void Translet.disj_testOneBranch
(Translet.DisjunctionParser<S> disj_parser, Translet.Parser<R> parser, List<Translet.Parser<?>> notHit, int index, Translet.State<?> inState, Set<Translet.State<S>> outStates, Set<Translet.Alternative> alternatives) Tests one of the branch-parsers (with the given index) of the disj_parser, with the given start state.static <R> void
Translet.displayBindings
(CatalogByString cat, List<String> prefs, PrintStream ps, int width, boolean full, Object locationtext, Translet.Parser<?> parser, Set<Translet.State<R>> results, @Opt Translet.State<R> selected, @Opt Set<Translet.State<R>> rests, @Opt Set<Translet.Alternative> alts, Modifiers modifiers, boolean showAlts, boolean showRests) Presents all collected prefixes of possible parse trees to the user for error diagnosis.static <R> void
Translet.displayBindings
(CatalogByString cat, List<String> prefs, PrintWriter pw, int width, boolean full, @Opt Object locationtext, Translet.Parser<?> parser, @Opt Set<Translet.State<R>> results, @Opt Translet.State<R> selected, Set<Translet.State<R>> rests, Set<Translet.Alternative> alts, Modifiers modifiers, boolean showAlts, boolean showRests) Show complete parsing situation on a PrintStream, possibly multi-lingual.static int
Translet.displayOneBinding
(PrintWriter pw, Translet.FormatPrinter_memo positions, @Opt Translet.State<?> result, Modifiers modifiers) Prints one prefix of a parse tree, i.e.void
Translet.Parser.executeStoring
(Translet.State<R> s, Event e, eu.bandm.tools.location.Location<eu.bandm.tools.util.xml.XMLDocumentIdentifier> loc, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) Execute the store operation represented by "this" parser.void
Translet.Recursive.executeStoring
(Translet.State<R> s, Event e, eu.bandm.tools.location.Location<eu.bandm.tools.util.xml.XMLDocumentIdentifier> loc, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) void
Translet.Store_1.executeStoring
(Translet.State<S> s, Event e, eu.bandm.tools.location.Location<eu.bandm.tools.util.xml.XMLDocumentIdentifier> loc, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) Execute the storing operation.void
Translet.Store_I.executeStoring
(Translet.State<S> s, Event e, eu.bandm.tools.location.Location<eu.bandm.tools.util.xml.XMLDocumentIdentifier> loc, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) Execute the storing operation.void
Translet.Store_M.executeStoring
(Translet.State<S> s, Event e, eu.bandm.tools.location.Location<eu.bandm.tools.util.xml.XMLDocumentIdentifier> loc, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) Execute the storing operation.protected static <R> R
Translet.findResult
(Translet.State<?> start, Set<Translet.State<R>> set) Provide "deflt=null" forTranslet.findResult(State, Set, Object)
.protected static <R> R
Translet.findResult
(Translet.State<?> start, Set<Translet.State<R>> set, R deflt) Search the chain of all predecessors starting with "start" and return the ".result" value of the first state which is contained in "set".protected <R> R
Translet.PermutationParser.findResult_p
(Translet.State<?> s, Translet.Parser<R> p) Aux function for casting only: find the result of the application of parser "p" in the (successful) parse tree ending in state "s".protected static Object
Translet.findResult_untyp
(Translet.State<?> start, Set<? extends Translet.State<?>> set) Provide "deflt=null" forTranslet.findResult_untyp(State, Set, Object)
.Translet.findResult_untyp
(Translet.State<?> start, Set<? extends Translet.State<?>> set, @Opt Object deflt) protected @Opt Translet.State<?>
Translet.Parser.parseEpsilon
(Translet.State<?> inState) Find one parse result which consumes no characters.protected Set<Translet.State<R>>
Translet._CAT.parseOneState
(Translet.State<?> st, Set<Translet.Alternative> alternatives) Return the longest possible match of catalog entries.protected Set<Translet.State<R>>
Translet._CONST.parseOneState
(Translet.State<?> st, Set<Translet.Alternative> alternatives) protected Set<Translet.State<String>>
Translet._REGEX.parseOneState
(Translet.State<?> st, Set<Translet.Alternative> alternatives) Translet.FramedParser.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Translet.HeadParser.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Translet.OptionParser.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Translet.OrCoTupleParser.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Try to parse all sub-parsers byTranslet.disj_testOneBranch(DisjunctionParser,Parser,List,int,State,Set,Set)
.Translet.OrLimesParser.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Try to parse all sub-parsers byTranslet.disj_testOneBranch(DisjunctionParser,Parser,List,int,State,Set,Set)
.protected abstract Set<Translet.State<R>>
Translet.Parser.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".Translet.PermutationParser.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Translet.PriorCoTupleParser.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Try to parse all sub-parsers byTranslet.disj_testOneBranch(DisjunctionParser,Parser,List,int,State,Set,Set)
.Translet.PriorLimesParser.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Try to parse all sub-parsers byTranslet.disj_testOneBranch(DisjunctionParser,Parser,List,int,State,Set,Set)
.Translet.Recursive.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Set<Translet.State<List<D>>>
Translet.RepParser.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".Translet.SequParser.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Parse breadth-first the list of sub-parsers and memorize all resulting states for later result retrieval.Translet.StorageWrapper.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) Simply memorizes this parser by inserting a new state after the states resulting from the sub-parser.TransletLib._TEST.parseOneState
(Translet.State<?> inState, Set<Translet.Alternative> alternatives) protected void
Translet.RepParser.parseProlongation
(List<D> prefix, Translet.State<?> inState, Set<Translet.Alternative> alternatives, Set<Translet.State<List<D>>> allResults) Basic parser procedure for all four kinds of RepParsers.protected Set<? extends Translet.State<?>>
Translet.PermutationParser.test2
(Translet.State<?> oneState, BitSet tested, BitSet toEpsilon, Set<Translet.Alternative> alternatives) Tests all permutations by breadth first search: first testing all sub-parsers once, and then calling this function recursively for all states resulting from these calls.Translet.CoTupleParser.wrapResult
(int index, Translet.State<?> resultState) Wraps the result of a successful sub-parser into the CoTuple type.protected abstract R
Translet.DisjunctionParser.wrapResult
(int index, Translet.State<?> resultState) Wrap the result of a disjunction, either by creating an instance of a subclass ofCoTuple
, or by casting it up into the limes class.protected A
Translet.LimesParser.wrapResult
(int index, Translet.State<?> resultState) Cast the result of a successful sub-parser to the limes typeModifier and TypeMethodDescriptionprotected static <R> Set<Translet.State<R>>
Translet.__SET_CAST
(Set<? extends Translet.State<?>> set) Aux function for casting a "Set<State<?>>" into a "Set<State<R>>", where R must be given explicitly by "Translet.<R>setCast(...)".protected Object[]
Translet.SequParser.collectResults
(Translet.State<?> s, List<Set<? extends Translet.State<?>>> afterSubRess) Returns the arguments for function application for one particular resultTranslet.State
by searching the chain of predecessor states and cutting them with those related to the sub-parsers in the different positions in "afterSubRess".protected static <R,
S> void Translet.disj_testOneBranch
(Translet.DisjunctionParser<S> disj_parser, Translet.Parser<R> parser, List<Translet.Parser<?>> notHit, int index, Translet.State<?> inState, Set<Translet.State<S>> outStates, Set<Translet.Alternative> alternatives) Tests one of the branch-parsers (with the given index) of the disj_parser, with the given start state.static <R> void
Translet.displayBindings
(CatalogByString cat, List<String> prefs, PrintStream ps, int width, boolean full, Object locationtext, Translet.Parser<?> parser, Set<Translet.State<R>> results, @Opt Translet.State<R> selected, @Opt Set<Translet.State<R>> rests, @Opt Set<Translet.Alternative> alts, Modifiers modifiers, boolean showAlts, boolean showRests) Presents all collected prefixes of possible parse trees to the user for error diagnosis.static <R> void
Translet.displayBindings
(CatalogByString cat, List<String> prefs, PrintWriter pw, int width, boolean full, @Opt Object locationtext, Translet.Parser<?> parser, @Opt Set<Translet.State<R>> results, @Opt Translet.State<R> selected, Set<Translet.State<R>> rests, Set<Translet.Alternative> alts, Modifiers modifiers, boolean showAlts, boolean showRests) Show complete parsing situation on a PrintStream, possibly multi-lingual.protected static <R> R
Translet.findResult
(Translet.State<?> start, Set<Translet.State<R>> set) Provide "deflt=null" forTranslet.findResult(State, Set, Object)
.protected static <R> R
Translet.findResult
(Translet.State<?> start, Set<Translet.State<R>> set, R deflt) Search the chain of all predecessors starting with "start" and return the ".result" value of the first state which is contained in "set".protected static Object
Translet.findResult_untyp
(Translet.State<?> start, Set<? extends Translet.State<?>> set) Provide "deflt=null" forTranslet.findResult_untyp(State, Set, Object)
.Translet.findResult_untyp
(Translet.State<?> start, Set<? extends Translet.State<?>> set, @Opt Object deflt) final Set<Translet.State<R>>
Translet.Parser.mparse
(Set<? extends Translet.State<?>> inStates, Set<Translet.Alternative> alternatives) "*M*ultiple Parse" means to apply the parser to a set of incomingTranslet.State
s, which represent the parsing situations reached so far.ModifierConstructorDescriptionprotected
Alternative
(Translet.State pre, Translet.Parser<?> parser) Set state and a first parser.