Class ExpansionSequence

  • All Implemented Interfaces:
    JavaCCConstants, Node, freemarker.template.TemplateHashModel, freemarker.template.TemplateModel, freemarker.template.TemplateNodeModel, freemarker.template.TemplateScalarModel, Comparable<Node>

    public class ExpansionSequence
    extends Expansion
    • Constructor Detail

      • ExpansionSequence

        public ExpansionSequence()
    • Method Detail

      • allUnits

        public List<Expansion> allUnits()
        Returns:
        a List that includes child expansions that are inside of superfluous parentheses.
      • firstNonEmpty

        public Expansion firstNonEmpty()
      • setLookahead

        public void setLookahead​(Lookahead lookahead)
      • isPossiblyEmpty

        public boolean isPossiblyEmpty()
        Specified by:
        isPossiblyEmpty in class Expansion
        Returns:
        Can this expansion be matched by the empty string.
      • getMinimumSize

        public int getMinimumSize()
        Specified by:
        getMinimumSize in class Expansion
        Returns:
        the minimum number of tokens that this expansion consumes.
      • getMaximumSize

        public int getMaximumSize()
        Specified by:
        getMaximumSize in class Expansion
        Returns:
        the maximum number of tokens that this expansion consumes.
      • getHasScanLimit

        public boolean getHasScanLimit()
        Overrides:
        getHasScanLimit in class Expansion
        Returns:
        whether we have a scan limit, including an implicit one inside a nested NonTerminal
      • getHasExplicitScanLimit

        public boolean getHasExplicitScanLimit()
        Returns:
        whether we have an explicit scan limit, i.e. not including one that is inside a NonTerminal expansion.