Class Translet.StorageWrapper<S>

java.lang.Object
eu.bandm.tscore.base.Translet.Parser<S>
eu.bandm.tscore.base.Translet.StorageWrapper<S>
Direct Known Subclasses:
Translet.Store_1, Translet.Store_I, Translet.Store_M
Enclosing class:
Translet

public abstract static class Translet.StorageWrapper<S> extends Translet.Parser<S>
Common superclass of the storing oeprators. Its direct sub-parser calculates the result for storing and its type must match the storage object (Map or Multimap). The corresponding Translet.State object is the immediate predecessor of the state of the StorageWrapper. The storage operation is not performed when parsing, but later, ex-parte-post, when one of the solutions (=complete and rest-less parsing trees) will have been been selected.
  • Field Details

  • Constructor Details

  • Method Details

    • parseOneState

      public Set<Translet.State<S>> 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.
      Specified by:
      parseOneState in class Translet.Parser<S>
    • 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<S>
      Parameters:
      full - whether storage constructs do appear in the rendering.
      names - a map for managing the renderings of recursive calls
    • storageName

      protected abstract Format storageName()
      Return an identity indication for the storage container object.