public abstract class GeneratorFactory<T> extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
GeneratorFactory.Replacement |
| Modifier | Constructor and Description |
|---|---|
protected |
GeneratorFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected Choices |
choices() |
Generator |
generator(Grammar grammar) |
Generator |
generator(Path path,
Grammar.ParserOption... options) |
Generator |
generatorResource(String resource,
Grammar.ParserOption... options) |
protected abstract T |
newContext()
Creates a new context object for use by the generator.
|
ProductionReplacement<T> |
replacement(String production) |
protected abstract T newContext()
ScopeListener - TODO: is this a good design?
TODO: should scope notification be part of tree building or string generation?
-- An idea: we could make the Scope notion create a nested context object, so new context for new scope...public final Generator generatorResource(String resource, Grammar.ParserOption... options) throws ParserConfigurationException, SAXException, IOException
public final Generator generator(Path path, Grammar.ParserOption... options) throws IOException, SAXException, ParserConfigurationException
protected Choices choices()
public final ProductionReplacement<T> replacement(String production)
Copyright © 2019. All rights reserved.