Class ScopeInfo

java.lang.Object
relaxngcc.builder.ScopeInfo

public final class ScopeInfo extends Object
information about a scope
  • Field Details

    • _grammar

      public final NGCCGrammar _grammar
    • _scope

      public final Scope _scope
      Scope object to which this object is attached.
  • Constructor Details

  • Method Details

    • iterateNSURIConstants

      public Iterator iterateNSURIConstants()
    • getInitialState

      public State getInitialState()
    • setInitialState

      public void setInitialState(State s)
    • isNullable

      public boolean isNullable()
    • setNullable

      public void setNullable(boolean v)
    • getStateCount

      public int getStateCount()
    • getClassName

      public String getClassName()
    • getConstructorParams

      public Alias[] getConstructorParams()
    • minimizeStates

      public void minimizeStates()
      Makes the automaton smaller. In actuality, this method only removes unreachable states.
    • appendHeaderSection

      public void appendHeaderSection(String c)
    • getHeaderSection

      public String getHeaderSection()
    • isUserDefinedField

      public boolean isUserDefinedField(String name)
    • iterateActions

      public Iterator iterateActions()
    • createAction

      public ScopeInfo.Action createAction(String code)
      Creates a new Action object inside this _scope.
    • createAction

      public ScopeInfo.Action createAction(StringBuffer code)
    • iterateAliases

      public final Iterator iterateAliases()
      Iterate all the aliases.
    • simplifyAutomaton

      public void simplifyAutomaton()
    • addNSURI

      public void addNSURI(String nsuri)
    • getNSStringConstant

      public String getNSStringConstant(String uri)
    • iterateStatesHaving

      public Iterator iterateStatesHaving(int alphabetTypes)
      Iterates states that have transitions with one of specified alphabets.
    • iterateAcceptableStates

      public Iterator iterateAcceptableStates()
    • iterateAllStates

      public Iterator iterateAllStates()
    • addState

      public void addState(State state)
    • addAlias

      public Alias addAlias(CDType type, String name)
    • isRoot

      public boolean isRoot()
      Returns true if this is the start pattern.
    • dump

      public void dump(PrintStream strm)
    • dumpAutomaton

      public void dumpAutomaton(File target) throws IOException, InterruptedException
      Writes the automaton by using GraphViz.
      Throws:
      IOException
      InterruptedException
    • head

      public void head(Set result)
      Computes the HEAD set of this _scope (that doesn't include EVERYTHING_ELSE token.) See Head for the definition.
    • head

      public Set head()
      Computes the HEAD set of this _scope (that doesn't include EVERYTHING_ELSE token) and returns them in a new set.
    • calcAFOLLOW

      public void calcAFOLLOW()
      Computes the AFOLLOW set of this _scope