| Package | Description |
|---|---|
| org.stekikun.dolmen.codegen | |
| org.stekikun.dolmen.syntax |
| Modifier and Type | Field and Description |
|---|---|
protected LexBuffer.Position |
BaseParser._jl_lastTokenEnd
The end position of the last token that was consumed by
the parser, or the start-of-input position if no token
was consumed yet
|
protected LexBuffer.Position |
BaseParser._jl_lastTokenStart
The start position of the last token that was consumed by
the parser, or the start-of-input position if no token
was consumed yet
|
protected LexBuffer.Position |
LexBuffer.curLoc
Current token position
|
protected static LexBuffer.Position |
LexBuffer.DUMMY_POS
A dummy position used for
LexBuffer.startLoc and LexBuffer.curLoc
when position tracking is disabled. |
LexBuffer.Position |
SourceMapping.Mapping.origin
Original position of the mapped region
|
@Nullable LexBuffer.Position |
BaseParser.ParsingException.pos
The position in input at which the error occurred
|
@Nullable LexBuffer.Position |
LexBuffer.LexicalError.pos
The position in input at which the error occurred
|
protected LexBuffer.Position |
LexBuffer.startLoc
Position of the last token start
|
| Modifier and Type | Method and Description |
|---|---|
protected LexBuffer.Position |
BaseParser.WithPositions.getEndPos() |
protected LexBuffer.Position |
BaseParser.WithPositions.getEndPos(int i)
Items are numbered from 1, and include all terminals and
non-terminals, bound or not.
|
protected LexBuffer.Position |
BaseParser.WithPositions.getEndPos(String id) |
LexBuffer.Position |
LexBuffer.getLexemeEnd() |
LexBuffer.Position |
LexBuffer.getLexemeStart() |
protected LexBuffer.Position |
BaseParser.WithPositions.getStartPos() |
protected LexBuffer.Position |
BaseParser.WithPositions.getStartPos(int i)
Items are numbered from 1, and include all terminals and
non-terminals, bound or not.
|
protected LexBuffer.Position |
BaseParser.WithPositions.getStartPos(String id) |
protected LexBuffer.Position |
BaseParser.WithPositions.getSymbolStartPos()
In comparison to
BaseParser.WithPositions.getStartPos(), this is often a better
representation of the production's starting position when the
first items in a production can match the empty string. |
| 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. |
protected void |
LexBuffer.savePosition(Runnable runnable,
LexBuffer.Position saved)
This method runs the given
runnable but takes
care to restore the current token start position to the
position given as the saved parameter. |
protected <T> T |
LexBuffer.savePosition(Supplier<T> supplier,
LexBuffer.Position saved)
This method runs the given
supplier routine but takes
care to restore the current token start position to the
position given as the saved parameter. |
CodeBuilder |
CodeBuilder.startTrackedRange(LexBuffer.Position pos)
Starts tracking a new region from the current position
in the emitted code.
|
| Constructor and Description |
|---|
LexicalError(@Nullable LexBuffer.Position pos,
@Nullable String msg) |
ParsingException(LexBuffer.Position pos,
int length,
String msg)
A parsing error exception with the given error message,
specifying the position and length of the part in the input
stream where the error occurred
|
ParsingException(@Nullable LexBuffer.Position pos,
String msg)
A parsing error exception with the given error message,
optionally specifying the position in the input stream
where the error occurred
|
| Modifier and Type | Field and Description |
|---|---|
LexBuffer.Position |
Located.end
The end position of the value in the input file
|
LexBuffer.Position |
Located.start
The start position of the value in the input file
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Located<T> |
Located.of(T val,
LexBuffer.Position start,
LexBuffer.Position end) |