org.sonar.sslr.internal.vm
Class PatternExpression

java.lang.Object
  extended by org.sonar.sslr.internal.vm.Instruction
      extended by org.sonar.sslr.internal.vm.NativeExpression
          extended by org.sonar.sslr.internal.vm.PatternExpression
All Implemented Interfaces:
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
PatternExpression(String regex)
           
 
Method Summary
 void execute(Machine machine)
          Executes this instruction.
 String toString()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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: Instruction
Executes this instruction.

Specified by:
execute in class Instruction
Throws:
GrammarException - if execution of regular expression has led to StackOverflowError

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2014 SonarSource. All Rights Reserved.