Class DGrammarPattern

  • All Implemented Interfaces:
    java.lang.Iterable<DDefine>, ParsedPattern

    public class DGrammarPattern
    extends DPattern
    implements java.lang.Iterable<DDefine>
    <grammar> pattern, which is a collection of named patterns.
    • Constructor Detail

      • DGrammarPattern

        public DGrammarPattern()
    • Method Detail

      • getStart

        public DPattern getStart()
        Gets the start pattern.
      • get

        public DDefine get​(java.lang.String name)
        Gets the named pattern by its name.
        Returns:
        null if not found.
      • iterator

        public java.util.Iterator<DDefine> iterator()
        Iterates all the DDefines in this grammar.
        Specified by:
        iterator in interface java.lang.Iterable<DDefine>
      • isNullable

        public boolean isNullable()
        Description copied from class: DPattern
        Returns true if this pattern is nullable. A nullable pattern is a pattern that can match the empty sequence.
        Specified by:
        isNullable in class DPattern