dk.brics.grammar.parser
Class AST2Grammar

java.lang.Object
  extended by dk.brics.grammar.parser.AST2Grammar

public class AST2Grammar
extends Object

Converter from ASTs representing grammars to Grammar objects.


Constructor Summary
AST2Grammar()
          Constructs a new converter.
 
Method Summary
 Grammar convert(AST a, PrintWriter out)
          Converts the given AST.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AST2Grammar

public AST2Grammar()
Constructs a new converter.

Method Detail

convert

public Grammar convert(AST a,
                       PrintWriter out)
                throws GrammarException
Converts the given AST.

Parameters:
a - AST
out - grammar warnings are printed to this stream if non-null (currently checking for unused regular expressions and issues described in GrammarChecker.check(Grammar,PrintWriter))
Returns:
grammar
Throws:
GrammarException - if the grammar is not well-defined


Copyright © 2005-2008 Anders Møller.