Class Translet.DisjunctionParser<R>

java.lang.Object
eu.bandm.tscore.base.Translet.Parser<R>
eu.bandm.tscore.base.Translet.DisjunctionParser<R>
Type Parameters:
R - the result type of the parser, either a CoTuple or a limes.
Direct Known Subclasses:
Translet.CoTupleParser, Translet.LimesParser
Enclosing class:
Translet

public abstract static class Translet.DisjunctionParser<R> extends Translet.Parser<R>
Common superclass for Parsers which accept one of many alternatives.
  • Constructor Details

    • DisjunctionParser

      public DisjunctionParser()
  • Method Details

    • wrapResult

      protected abstract R wrapResult(int index, Translet.State<?> resultState)
      Wrap the result of a disjunction, either by creating an instance of a subclass of CoTuple, or by casting it up into the limes class.
      Parameters:
      index - the index of the accepted variant
      resultState - the result object to be wrapped