fr.umlv.tatoo.cc.common.generator
Class Generator
java.lang.Object
fr.umlv.tatoo.cc.common.generator.Generator
- Direct Known Subclasses:
- ASTGenerator, LexerGenerator, ParserGenerator, ToolsGenerator
public class Generator
- extends Object
Generate enums that represents at runtimn
productions, terminals, non-terminals, rules and parser tables
using respectively an array of
ProductionDecl
,
TerminalDecl
,
NonTerminalDecl
,
RuleDecl
,
ParserTableDecl
.
- Author:
- remi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Generator
public Generator(File sourceDir,
Class<?> clazz)
generate
public void generate(Map<String,?> root,
Map<AliasPrototype,? extends Alias> aliasMap,
AliasPrototype prototype)
throws GeneratorException
- Throws:
GeneratorException
generate
protected void generate(Map<String,?> map,
String templateName,
Type type)
throws GeneratorException
- Generates the source code of a type using a template.
- Parameters:
map
- a map containg properties.templateName
- the name of the velocity template.type
- the generated type.
- Throws:
GeneratorException