Package org.antlr.v4.runtime
Class TokenStreamRewriter.ReplaceOp
java.lang.Object
org.antlr.v4.runtime.TokenStreamRewriter.RewriteOperation
org.antlr.v4.runtime.TokenStreamRewriter.ReplaceOp
- Enclosing class:
TokenStreamRewriter
I'm going to try replacing range from x..y with (y-x)+1 ReplaceOp
instructions.
-
Field Summary
FieldsFields inherited from class org.antlr.v4.runtime.TokenStreamRewriter.RewriteOperation
index, instructionIndex, text
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
execute
(StringBuilder buf) Execute the rewrite operation by possibly adding to the buffer.toString()
-
Field Details
-
lastIndex
protected int lastIndex
-
-
Constructor Details
-
ReplaceOp
-
-
Method Details
-
execute
Description copied from class:TokenStreamRewriter.RewriteOperation
Execute the rewrite operation by possibly adding to the buffer. Return the index of the next token to operate on.- Overrides:
execute
in classTokenStreamRewriter.RewriteOperation
-
toString
- Overrides:
toString
in classTokenStreamRewriter.RewriteOperation
-