Package | Description |
---|---|
org.stekikun.dolmen.codegen |
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 |
BaseParser._jl_lexbuf
The underlying lexing buffer
|
protected Token |
BaseParser._jl_nextToken
The last token read and not yet consumed, or
null
if the next token must be fetched from BaseParser._jl_tokens |
protected int |
LexBuffer.absPos
Absolute position of the start of the buffer
|
protected int |
LexBuffer.curPos
Current buffer input position
|
protected int[] |
LexBuffer.memory
Memory cells
|
protected int |
LexBuffer.startPos
Buffer input position of the token start
|
Modifier and Type | Method and Description |
---|---|
protected Token |
BaseParser.eat()
Consumes the next token and returns it
|
protected void |
LexBuffer.endToken()
Ends the matching of the current token
|
protected void |
BaseParser.WithPositions.enter(int ruleSize)
Enters a new rule of the grammar, with room for the locations
of
ruleSize production items (i.e. terminals or non-terminals) |
protected char |
LexBuffer.getNextChar() |
protected String |
LexBuffer.getSubLexeme(int start,
int end) |
protected char |
LexBuffer.getSubLexemeChar(int pos) |
protected Optional<String> |
LexBuffer.getSubLexemeOpt(int start,
int end) |
protected Optional<Character> |
LexBuffer.getSubLexemeOptChar(int pos) |
protected void |
BaseParser.WithPositions.leave(@Nullable String name)
Reduces the current top-level rule, which means that the
the stack's current top-level element is popped from the
stack and its overall range is appended to the stack's
new top-level element.
|
protected void |
LexBuffer.mark(int action)
Marks the current position as the last terminal
state encountered
|
protected Token |
BaseParser.peek() |
protected void |
BaseParser.WithPositions.rewind()
Rewinds the current rule at the top of the location stack,
meaning that the positions will be overwritten as new tokens
are shifted.
|
protected int |
LexBuffer.rewind()
Resets the current position to the last terminal
state encountered
|
protected void |
BaseParser.WithPositions.shift(@Nullable String name)
Shifts the last consumed token, which means its position
will be registered on the location stack's current top-level
element.
|
protected void |
LexBuffer.startToken()
Starts the matching of a new token
|