Package eu.bandm.tscore.base
Class Translet.Alternative
java.lang.Object
eu.bandm.tscore.base.Translet.Alternative
- Enclosing class:
- Translet
Realizes a protocol tree of alternatives to the parsing results.
An instance is newly constructed for every unsuccessful attempt to
apply a particular parser in a particular state.
(In method
Translet.Parser.mparse(Set,Set)
.)
This is meant as a diagnostic hint for the (domain expert) user,
at which earlier positions in the input a possible parser had been
missed and where thus a typo/mis-spelling in the input data could have happened.
The set of alteratives is passed in parallel to the current (valid) input state,
and when testing the subsequent parsers, these will not only be tested but also
be appended to expected
by calling append(Translet.Parser)
.-
Field Summary
Modifier and TypeFieldDescriptionprotected List<Translet.Parser<?>>
All parsers which have been tested to continue the state.protected Translet.State<?>
The parsing state in which these alternatives have been considered. -
Constructor Summary
ModifierConstructorDescriptionprotected
Alternative
(Translet.State pre, Translet.Parser<?> parser) Set state and a first parser. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
append
(Translet.Parser<?> parser) Add a further parser as alternative to continue this state.
-
Field Details
-
pre
The parsing state in which these alternatives have been considered. (This field is always != null becaouse there is always a simple state for the start). FIXME STIMMT DAS ?? -
expected
All parsers which have been tested to continue the state.
-
-
Constructor Details
-
Alternative
Set state and a first parser.
-
-
Method Details
-
append
Add a further parser as alternative to continue this state.
-