public class PatternExpression extends NativeExpression implements Matcher
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 and Description |
---|
PatternExpression(String regex) |
Modifier and Type | Method and Description |
---|---|
void |
execute(Machine machine)
Executes this instruction.
|
String |
toString() |
compile
addAll, backCommit, backtrack, call, choice, commit, commitVerify, end, failTwice, ignoreErrors, jump, predicateChoice, ret
public PatternExpression(String regex)
PatternSyntaxException
- if the expression's syntax is invalidpublic void execute(Machine machine)
Instruction
execute
in class Instruction
GrammarException
- if execution of regular expression has led to StackOverflowErrorCopyright © 2009–2017 SonarSource. All rights reserved.