Class Translet.FramedParser<A>

java.lang.Object
eu.bandm.tscore.base.Translet.Parser<A>
eu.bandm.tscore.base.Translet.FramedParser<A>
Enclosing class:
Translet

public static class Translet.FramedParser<A> extends Translet.Parser<A>
Accepts a sequence "A,B,C", where only the middle parsing/processing result is stored as result in the Translet.State object, discarding the frame.
  • Field Details

    • sep0

      protected Translet.Parser<?> sep0
      The left frame subparser.
    • p1

      protected Translet.Parser<A> p1
      The central parser, result of which will become the result of this.
    • sep1

      protected Translet.Parser<?> sep1
      The right frame subparser.
  • Constructor Details

  • Method Details

    • unparse

      public String unparse(Object key)
      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 class Translet.Parser<A>
    • parseOneState

      public Set<Translet.State<A>> parseOneState(Translet.State<?> inState, Set<Translet.Alternative> alternatives)
      Description copied from class: Translet.Parser
      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". This method is specific to and overridden by the subclasses of Parser.
      Specified by:
      parseOneState in class Translet.Parser<A>
    • name

      public Format name(boolean full, Map<Translet.Recursive,String> names)
      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.
      Specified by:
      name in class Translet.Parser<A>
      Parameters:
      full - whether storage constructs do appear in the rendering.
      names - a map for managing the renderings of recursive calls