1#set( $symbol_pound = '#' ) 2#set( $symbol_dollar = '$' ) 3#set( $symbol_escape = '\' ) 4package ${package}; 5 6import org.antlr.runtime.CharStream; 7import org.antlr.runtime.Lexer; 8import org.antlr.runtime.RecognizerSharedState; 9 10/** 11 12 * This is the super class for the lexer. It is extended by the lexer class 13 * generated from TLexer.g. 14 * 15 * Do not place code and declarations in the lexer .g files, use 16 * a superclass like this and place all the support methods and 17 * error overrides etc in the super class. This way you will keep 18 * the lexer grammar clean and hunky dory. 19 * 20 * @author Jim Idle - Temporal Wave LLC (jimi@idle.ws) 21 */ 22public abstract class AbstractTLexer 23 extends Lexer 24 25{ 26 /** 27 * Default constructor for the lexer, when you do not yet know what 28 * the character stream to be provided is. 29 */ 30 public AbstractTLexer() { 31 } 32 33 /** 34 * Create a new instance of the lexer using the given character stream as 35 * the input to lex into tokens. 36 * 37 * @param input A valid character stream that contains the ruleSrc code you 38 * wish to compile (or lex at least) 39 */ 40 public AbstractTLexer(CharStream input) { 41 this(input, new RecognizerSharedState()); 42 } 43 44 /** 45 * Internal constructor for ANTLR - do not use. 46 * 47 * @param input The character stream we are going to lex 48 * @param state The shared state object, shared between all lexer comonents 49 */ 50 public AbstractTLexer(CharStream input, RecognizerSharedState state) { 51 super(input,state); 52 } 53 54} 55 56