Package org.sonar.sslr.internal.vm
Class Instruction
- java.lang.Object
-
- org.sonar.sslr.internal.vm.Instruction
-
- Direct Known Subclasses:
Instruction.BackCommitInstruction
,Instruction.BacktrackInstruction
,Instruction.CallInstruction
,Instruction.ChoiceInstruction
,Instruction.CommitInstruction
,Instruction.CommitVerifyInstruction
,Instruction.EndInstruction
,Instruction.FailTwiceInstruction
,Instruction.IgnoreErrorsInstruction
,Instruction.JumpInstruction
,Instruction.PredicateChoiceInstruction
,Instruction.RetInstruction
,NativeExpression
public abstract class Instruction extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Instruction.BackCommitInstruction
static class
Instruction.BacktrackInstruction
static class
Instruction.CallInstruction
static class
Instruction.ChoiceInstruction
static class
Instruction.CommitInstruction
static class
Instruction.CommitVerifyInstruction
static class
Instruction.EndInstruction
static class
Instruction.FailTwiceInstruction
static class
Instruction.IgnoreErrorsInstruction
static class
Instruction.JumpInstruction
static class
Instruction.PredicateChoiceInstruction
Instruction dedicated for predicates.static class
Instruction.RetInstruction
-
Constructor Summary
Constructors Constructor Description Instruction()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static void
addAll(List<Instruction> list, Instruction[] array)
static Instruction
backCommit(int offset)
static Instruction
backtrack()
static Instruction
call(int offset, Matcher matcher)
static Instruction
choice(int offset)
static Instruction
commit(int offset)
static Instruction
commitVerify(int offset)
static Instruction
end()
abstract void
execute(Machine machine)
Executes this instruction.static Instruction
failTwice()
static Instruction
ignoreErrors()
static Instruction
jump(int offset)
static Instruction
predicateChoice(int offset)
static Instruction
ret()
-
-
-
Method Detail
-
addAll
public static void addAll(List<Instruction> list, Instruction[] array)
-
jump
public static Instruction jump(int offset)
-
call
public static Instruction call(int offset, Matcher matcher)
-
ret
public static Instruction ret()
-
backtrack
public static Instruction backtrack()
-
end
public static Instruction end()
-
choice
public static Instruction choice(int offset)
-
predicateChoice
public static Instruction predicateChoice(int offset)
-
commit
public static Instruction commit(int offset)
-
commitVerify
public static Instruction commitVerify(int offset)
-
failTwice
public static Instruction failTwice()
-
backCommit
public static Instruction backCommit(int offset)
-
ignoreErrors
public static Instruction ignoreErrors()
-
execute
public abstract void execute(Machine machine)
Executes this instruction.
-
-