Package org.sonar.sslr.internal.vm
Class PatternExpression
- java.lang.Object
-
- org.sonar.sslr.internal.vm.Instruction
-
- org.sonar.sslr.internal.vm.NativeExpression
-
- org.sonar.sslr.internal.vm.PatternExpression
-
- All Implemented Interfaces:
Matcher,Matcher,ParsingExpression
public class PatternExpression extends NativeExpression implements Matcher
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.sonar.sslr.internal.vm.Instruction
Instruction.BackCommitInstruction, Instruction.BacktrackInstruction, Instruction.CallInstruction, Instruction.ChoiceInstruction, Instruction.CommitInstruction, Instruction.CommitVerifyInstruction, Instruction.EndInstruction, Instruction.FailTwiceInstruction, Instruction.IgnoreErrorsInstruction, Instruction.JumpInstruction, Instruction.PredicateChoiceInstruction, Instruction.RetInstruction
-
-
Constructor Summary
Constructors Constructor Description PatternExpression(String regex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(Machine machine)Executes this instruction.StringtoString()-
Methods inherited from class org.sonar.sslr.internal.vm.NativeExpression
compile
-
Methods inherited from class org.sonar.sslr.internal.vm.Instruction
addAll, backCommit, backtrack, call, choice, commit, commitVerify, end, failTwice, ignoreErrors, jump, predicateChoice, ret
-
-
-
-
Constructor Detail
-
PatternExpression
public PatternExpression(String regex)
- Throws:
PatternSyntaxException- if the expression's syntax is invalid
-
-
Method Detail
-
execute
public void execute(Machine machine)
Description copied from class:InstructionExecutes this instruction.- Specified by:
executein classInstruction- Throws:
GrammarException- if execution of regular expression has led to StackOverflowError
-
-