relaxngcc.grammar
Class Grammar

java.lang.Object
  extended by relaxngcc.grammar.Pattern
      extended by relaxngcc.grammar.Scope
          extended by relaxngcc.grammar.Grammar

public final class Grammar
extends Scope

Set of Scopes.

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
 Grammar parent
          Parent Grammar object, if any.
 
Fields inherited from class relaxngcc.grammar.Scope
name
 
Constructor Summary
Grammar(ParserRuntime rt)
           
 
Method Summary
 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 Scopes 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 Scopes in this grammar.