| Package | Description |
|---|---|
| org.stekikun.dolmen.codegen | |
| org.stekikun.dolmen.syntax | |
| org.stekikun.dolmen.unparam |
| Modifier and Type | Method and Description |
|---|---|
void |
SourceMapping.add(int offset,
int length,
LexBuffer.Position origin,
@Nullable CExtent extent)
Adds a new mapping to
this, describing that
the range starting at position offset and spanning
length bytes corresponds to the range of the same
length at position origin in the original source. |
CodeBuilder |
CodeBuilder.emitTracked(CExtent extent)
Convenient helper which emits the content of some
verbatim piece of code described by the given extent,
and maps it to the extent's original position.
|
CodeBuilder |
CodeBuilder.emitTrackedIf(boolean cond,
CExtent extent)
Same as
CodeBuilder.emitTracked(CExtent) but is only
performed if the given condition holds. |
CodeBuilder |
CodeBuilder.endTrackedRange(@Nullable CExtent extent)
Closes the currently tracked region and maps it to
the source position given in the corresponding call
to
CodeBuilder.startTrackedRange(LexBuffer.Position). |
| Modifier and Type | Class and Description |
|---|---|
class |
Extent
Instances of this class describe ranges of characters
in files, and are used to link parsed entities with
their concrete representation in the original sources.
|
class |
PExtent
Instances of this class describe ranges of characters
in files, and are used to link parsed entities with
their concrete representation in the original sources.
|
| Modifier and Type | Method and Description |
|---|---|
CExtent |
PExtent.compose(String ruleName,
Map<String,CExtent> replacements)
NB: Except in the special case where the receiver had no holes
the returned
Extent will be inlined, i.e. information about
the original location in the source will be lost. |
static CExtent |
CExtent.of(PExtent extent,
List<CExtent> children,
String ruleName) |
| Modifier and Type | Method and Description |
|---|---|
static IReport |
IReport.of(String message,
IReport.Severity severity,
CExtent extent) |
| Modifier and Type | Method and Description |
|---|---|
CExtent |
PExtent.compose(String ruleName,
Map<String,CExtent> replacements)
NB: Except in the special case where the receiver had no holes
the returned
Extent will be inlined, i.e. information about
the original location in the source will be lost. |
static CExtent |
CExtent.of(PExtent extent,
List<CExtent> children,
String ruleName) |
| Modifier and Type | Field and Description |
|---|---|
@Nullable CExtent |
Production.Actual.args
The Java arguments to the production item, if any.
|
@Nullable CExtent |
GrammarRule.args
The formal arguments for this rule, if any
|
CExtent |
Production.ActionItem.extent
The in-source extent for this semantic action
|
CExtent |
GrammarRule.returnType
This rule's return type
|
| Modifier and Type | Method and Description |
|---|---|
Production.Builder |
Production.Builder.addAction(CExtent extent)
Adds a semantic action item
|
| Constructor and Description |
|---|
ActionItem(CExtent extent)
Builds a semantic action item from the given extent
|
Actual(@Nullable Located<String> binding,
Located<String> item,
@Nullable CExtent args)
Builds a production item based on the given parameters
|
Builder(boolean visibility,
CExtent returnType,
Located<String> name,
@Nullable CExtent args)
Returns a fresh builder with the given parameters
|
Builder(boolean visibility,
CExtent returnType,
Located<String> name,
@Nullable CExtent args)
Returns a fresh builder with the given parameters
|
GrammarRule(boolean visibility,
CExtent returnType,
Located<String> name,
@Nullable CExtent args,
List<Production> productions)
Builds a grammar rule from the given parameters
|
GrammarRule(boolean visibility,
CExtent returnType,
Located<String> name,
@Nullable CExtent args,
List<Production> productions)
Builds a grammar rule from the given parameters
|