org.sonar.sslr.internal.vm
Class TokenExpression

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

public class TokenExpression
extends Object
implements Matcher, ParsingExpression


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

Constructor Detail

TokenExpression

public TokenExpression(TokenType tokenType,
                       ParsingExpression subExpression)
Method Detail

getTokenType

public TokenType getTokenType()

compile

public Instruction[] compile(CompilationHandler compiler)
Compiles this expression into a sequence of instructions:
 Call L1
 Jump L2
 L1: subExpression
 Return
 L2: ...
 

Specified by:
compile in interface ParsingExpression

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2014 SonarSource. All Rights Reserved.