dk.brics.grammar.parser
Class AST2Grammar
java.lang.Object
dk.brics.grammar.parser.AST2Grammar
public class AST2Grammar
- extends Object
Converter from AST
s representing grammars to Grammar
objects.
Constructor Summary |
AST2Grammar()
Constructs a new converter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AST2Grammar
public AST2Grammar()
- Constructs a new converter.
convert
public Grammar convert(AST a,
PrintWriter out)
throws GrammarException
- Converts the given AST.
- Parameters:
a
- ASTout
- 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.