com.sonar.sslr.impl.channel
Class RegexpChannel

java.lang.Object
  extended by org.sonar.channel.Channel<Lexer>
      extended by com.sonar.sslr.impl.channel.RegexpChannel

public class RegexpChannel
extends org.sonar.channel.Channel<Lexer>

Creates token of specified type from characters, which match given regular expression.

See Also:
RegexpChannelBuilder

Constructor Summary
RegexpChannel(TokenType type, String regexp)
           
 
Method Summary
 boolean consume(org.sonar.channel.CodeReader code, Lexer lexer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexpChannel

public RegexpChannel(TokenType type,
                     String regexp)
Throws:
PatternSyntaxException - if the expression's syntax is invalid
Method Detail

consume

public boolean consume(org.sonar.channel.CodeReader code,
                       Lexer lexer)
Specified by:
consume in class org.sonar.channel.Channel<Lexer>


Copyright © 2009-2014 SonarSource. All Rights Reserved.