Package | Description |
---|---|
org.stekikun.dolmen.codegen |
Modifier and Type | Field and Description |
---|---|
static Config |
Config.DEFAULT
The default configuration for grammar generation
|
Modifier and Type | Method and Description |
---|---|
Config |
Config.Builder.done() |
static Config |
Config.ofGrammar(Grammar grammar,
@Nullable Reporter reporter)
|
static Config |
Config.ofLexer(Lexer lexer,
@Nullable Reporter reporter)
|
static Config |
Config.ofOptions(Config.Relevance relevance,
List<Option> options,
@Nullable Reporter reporter)
This method never fails to build a valid configuration, but
can report unexpected things such as illegal keys or values
through the reporter.
|
static Config |
Config.ofPGrammar(PGrammar grammar,
@Nullable Reporter reporter)
|
Modifier and Type | Method and Description |
---|---|
static SourceMapping |
AutomataOutput.output(Writer writer,
String className,
Config config,
Automata aut)
Generates the code from the automata
aut in
a Java class with name className , exported
using the given writer and parameterized
by the configuration config . |
static SourceMapping |
GrammarOutput.output(Writer writer,
String className,
Config config,
Grammar grammar,
Grammars.PredictionTable predict)
Outputs to
writer the definition of a top-down
parser for the given grammar , provided the prediction table
predict has no conflicts. |
static void |
TokensOutput.output(Writer writer,
String className,
Config config,
int level,
List<TokenDecl> tokenDecls)
Outputs to
writer the definition of a token class
for the tokens described in tokenDecls . |
Constructor and Description |
---|
TokensOutput(String className,
Config config,
List<TokenDecl> tokenDecls,
CodeBuilder buf) |