Package relaxngcc.builder

# Class ScopeInfo

java.lang.Object
relaxngcc.builder.ScopeInfo

public final class ScopeInfo extends Object
information about a scope

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`final class`
`ScopeInfo.Action`
User-defined code fragment.

## Field Summary

Fields
Modifier and Type
Field
Description
`final NGCCGrammar`
`_grammar`
`final Scope`
`_scope`
Scope object to which this object is attached.

## Constructor Summary

Constructors
Constructor
Description
`ScopeInfo(NGCCGrammar g, Scope scope)`

## Method Summary

Modifier and Type
Method
Description
`Alias`
`addAlias(CDType type, String name)`
`void`
`addNSURI(String nsuri)`
`void`
`addState(State state)`
`void`
`appendHeaderSection(String c)`
`void`
`calcAFOLLOW()`
Computes the AFOLLOW set of this _scope
`ScopeInfo.Action`
`createAction(String code)`
Creates a new Action object inside this _scope.
`ScopeInfo.Action`
`createAction(StringBuffer code)`
`void`
`dump(PrintStream strm)`
`void`
`dumpAutomaton(File target)`
Writes the automaton by using GraphViz.
`String`
`getClassName()`
`Alias[]`
`getConstructorParams()`
`String`
`getHeaderSection()`
`State`
`getInitialState()`
`String`
`getNSStringConstant(String uri)`
`int`
`getStateCount()`
`Set`
`head()`
Computes the HEAD set of this _scope (that doesn't include EVERYTHING_ELSE token) and returns them in a new set.
`void`
`head(Set result)`
Computes the HEAD set of this _scope (that doesn't include EVERYTHING_ELSE token.) See
invalid reference

    Head

for the definition.
`boolean`
`isNullable()`
`boolean`
`isRoot()`
Returns true if this is the start pattern.
`boolean`
`isUserDefinedField(String name)`
`Iterator`
`iterateAcceptableStates()`
`Iterator`
`iterateActions()`
`final Iterator`
`iterateAliases()`
Iterate all the aliases.
`Iterator`
`iterateAllStates()`
`Iterator`
`iterateNSURIConstants()`
`Iterator`
`iterateStatesHaving(int alphabetTypes)`
Iterates states that have transitions with one of specified alphabets.
`void`
`minimizeStates()`
Makes the automaton smaller.
`void`
`setInitialState(State s)`
`void`
`setNullable(boolean v)`
`void`
`simplifyAutomaton()`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### _grammar

public final NGCCGrammar _grammar

### _scope

public final Scope _scope
Scope object to which this object is attached.

## Constructor Details

### ScopeInfo

public ScopeInfo(NGCCGrammar g, Scope scope)

## 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
invalid reference

    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