Package relaxngcc

Class NGCCGrammar

java.lang.Object
relaxngcc.NGCCGrammar

public class NGCCGrammar extends Object
Keeps information about the global setting effective across the entire grammar.

A "grammar" in RELAX NG could be nested inside another grammar, so we need a bit different name. This class needs a better name.

Author:
Kohsuke Kawaguchi (kk@kohsuke.org)
  • Field Details

    • grammar

      public final Grammar grammar
      Parsed grammar.
    • packageName

      public final String packageName
      Package name to which generated classes should go. The value will be the empty string if the classes will be generated into the root package.
    • globalImportDecls

      public final String globalImportDecls
      globally effective import statements.
    • globalBody

      public final String globalBody
      globally effective <java-body> statements.
  • Constructor Details

  • Method Details

    • getRuntimeTypeShortName

      public String getRuntimeTypeShortName()
      Gets the class name of the runtime type alone without the package name.
    • getRuntimeTypeFullName

      public String getRuntimeTypeFullName()
    • getScopeInfo

      public ScopeInfo getScopeInfo(Scope scope)
    • iterateScopeInfos

      public Iterator iterateScopeInfos()
    • buildAutomaton

      public void buildAutomaton()
    • dump

      public void dump(PrintStream strm)
    • dumpAutomata

      public void dumpAutomata(File outDir)
      generates automaton gif files.
    • output

      public boolean output(Options opt, long sourceTimestamp) throws IOException, NoDefinitionException
      Generates the source code.
      Returns:
      true if files are in fact generated.
      Throws:
      IOException
      NoDefinitionException