org.sonar.sslr.internal.vm
Class OneOrMoreExpression

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

public class OneOrMoreExpression
extends Object
implements ParsingExpression


Constructor Summary
OneOrMoreExpression(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

OneOrMoreExpression

public OneOrMoreExpression(ParsingExpression subExpression)
Method Detail

compile

public Instruction[] compile(CompilationHandler compiler)
Compiles this expression into a sequence of instructions:
 Choice L3
 L1: subExpression
 CommitVerify L2
 L2: Choice L4
 Jump L1
 L3: Fail
 L4: ....
 
Should be noted that can be compiled with help of ZeroOrMoreExpression:
 subExpresson
 L1: Choice L2
 subExpression
 CommitVerify L1
 L2: ...
 

Specified by:
compile in interface ParsingExpression

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2014 SonarSource. All Rights Reserved.