relaxngcc.grammar

## Class Grammar

- java.lang.Object
- - relaxngcc.grammar.Pattern
  - - relaxngcc.grammar.Scope
    - - relaxngcc.grammar.Grammar

    public final class Grammar
    extends Scope

Set of `Scope`s.

Grammar as `Scope` holds information about the start pattern. This allows us to easily recognize Grammar in the parsed tree.

Author:
  Kohsuke Kawaguchi (kk@kohsuke.org)

### Field Summary

Fields
`Grammar` `parent` Parent `Grammar` object, if any.

### Fields inherited from class relaxngcc.grammar.Scope

`name`

### Constructor Summary

Constructors
Constructor and Description
`Grammar(ParserRuntime rt)`

### Method Summary

Methods
`Scope` `get(java.lang.String name)` Gets the Scope object or return null.
`Scope` `getOrCreate(ParserRuntime rt, java.lang.String name)`
`java.util.Iterator` `iterateScopes()` Iterates all the named `Scope`s in this grammar.
`Scope` `redefine(ParserRuntime rt, java.lang.String name)`

### Methods inherited from class relaxngcc.grammar.Scope

`append, appendBody, appendImport, apply, clear, getBody, getImport, getParam, getParamCount, getPattern, setParam`

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

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

### Field Detail

#### parent

    public final Grammar parent

Parent `Grammar` object, if any. Otherwise null.

### Constructor Detail

#### Grammar

    public Grammar(ParserRuntime rt)

### Method Detail

#### get

    public Scope get(java.lang.String name)

Gets the Scope object or return null.

#### getOrCreate

    public Scope getOrCreate(ParserRuntime rt,
                    java.lang.String name)

#### redefine

    public Scope redefine(ParserRuntime rt,
                 java.lang.String name)

#### iterateScopes

    public java.util.Iterator iterateScopes()

Iterates all the named `Scope`s in this grammar.