Package | Description |
---|---|
org.stekikun.dolmen.codegen | |
org.stekikun.dolmen.syntax | |
org.stekikun.dolmen.unparam |
Modifier and Type | Method and Description |
---|---|
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 | Field and Description |
---|---|
Reporter |
Lexer.Builder.reporter
Problems reported when building this lexer
|
Reporter |
PGrammar.Builder.reporter
Problems reported when building this grammar
|
Modifier and Type | Method and Description |
---|---|
static Map<String,List<PGrammars.Sort>> |
PGrammars.analyseGrammar(PGrammar grammar,
@Nullable PGrammars.Dependencies dependencies_,
Reporter reporter)
This analyses various rule applications in the parametric
grammar
grammar by inferring sorts
for all the rules' formal parameters and checking that
effective parameters in all applications are abiding by
the constraints expressed by the sorts. |
static void |
PGrammars.findUnusedSymbols(PGrammar grammar,
PGrammars.Dependencies deps,
Reporter reporter)
Analyses the
grammar 's dependencies deps to
determine non-terminals and terminals which are not really being
used in this grammar description. |
Modifier and Type | Field and Description |
---|---|
Reporter |
Grammar.Builder.reporter
Problems reported when building this grammar
|
Modifier and Type | Method and Description |
---|---|
static Grammars.NTermsInfo |
Grammars.analyseGrammar(Grammar grammar,
@Nullable Grammars.Dependencies deps_,
@Nullable Reporter reporter)
Analyze the given
grammar and compute for every non-terminal
whether it is nullable, and the associated FIRST and FOLLOW
sets. |