org.sonar.sslr.internal.vm
Class NextExpression

java.lang.Object
  extended by org.sonar.sslr.internal.vm.NextExpression
All Implemented Interfaces:
Matcher, ParsingExpression

public class NextExpression
extends Object
implements ParsingExpression


Constructor Summary
NextExpression(ParsingExpression subExpression)
           
 
Method Summary
 Instruction[] compile(CompilationHandler compiler)
          Compiles this expression into a sequence of instructions:
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NextExpression

public NextExpression(ParsingExpression subExpression)
Method Detail

compile

public Instruction[] compile(CompilationHandler compiler)
Compiles this expression into a sequence of instructions:
 Choice L1
 subExpression
 BackCommit L2
 L1: Fail
 L2: ...
 
Should be noted that can be compiled without usage of instruction "BackCommit":
 Choice L1
 Choice L2
 subExpression
 L2: Commit L3
 L3: Fail
 L1: ...
 

Specified by:
compile in interface ParsingExpression

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2014 SonarSource. All Rights Reserved.