org.eclipse.xtext.parser.antlr
Class Lexer

java.lang.Object
  extended by org.antlr.runtime.BaseRecognizer
      extended by org.antlr.runtime.Lexer
          extended by org.eclipse.xtext.parser.antlr.Lexer
All Implemented Interfaces:
org.antlr.runtime.TokenSource
Direct Known Subclasses:
CodetemplatesHighlightingLexer, CodetemplatesLexer, InternalCodetemplatesLexer, InternalSingleCodetemplateLexer, SingleCodetemplateHighlightingLexer, SingleCodetemplateLexer

public abstract class Lexer
extends org.antlr.runtime.Lexer

Hack: As AntLR does not allow to define the superclass of the generated lexer, we call this class Lexer and import it to be used instead of the original lexer class.

Author:
Jan Köhnlein - Initial contribution and API

Field Summary
 
Fields inherited from class org.antlr.runtime.Lexer
input
 
Fields inherited from class org.antlr.runtime.BaseRecognizer
DEFAULT_TOKEN_CHANNEL, HIDDEN, INITIAL_FOLLOW_STACK_SIZE, MEMO_RULE_FAILED, MEMO_RULE_UNKNOWN, NEXT_TOKEN_RULE_NAME, state
 
Constructor Summary
Lexer()
           
Lexer(org.antlr.runtime.CharStream input)
           
Lexer(org.antlr.runtime.CharStream input, org.antlr.runtime.RecognizerSharedState state)
           
 
Method Summary
 void emitErrorMessage(java.lang.String msg)
          Override this method to change where error messages go
 java.lang.String getErrorMessage(org.antlr.runtime.Token t)
           
 org.antlr.runtime.Token nextToken()
          Return a token from this source; i.e., match a token on the char stream.
 
Methods inherited from class org.antlr.runtime.Lexer
emit, emit, getCharErrorDisplay, getCharIndex, getCharPositionInLine, getCharStream, getErrorMessage, getLine, getSourceName, getText, match, match, matchAny, matchRange, mTokens, recover, reportError, reset, setCharStream, setText, skip, traceIn, traceOut
 
Methods inherited from class org.antlr.runtime.BaseRecognizer
alreadyParsedRule, beginResync, combineFollows, computeContextSensitiveRuleFOLLOW, computeErrorRecoverySet, consumeUntil, consumeUntil, displayRecognitionError, endResync, failed, getBacktrackingLevel, getCurrentInputSymbol, getErrorHeader, getGrammarFileName, getMissingSymbol, getNumberOfSyntaxErrors, getRuleInvocationStack, getRuleInvocationStack, getRuleMemoization, getRuleMemoizationCacheSize, getTokenErrorDisplay, getTokenNames, match, matchAny, memoize, mismatchIsMissingToken, mismatchIsUnwantedToken, pushFollow, recover, recoverFromMismatchedSet, recoverFromMismatchedToken, setBacktrackingLevel, toStrings, traceIn, traceOut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Lexer

public Lexer()

Lexer

public Lexer(org.antlr.runtime.CharStream input)

Lexer

public Lexer(org.antlr.runtime.CharStream input,
             org.antlr.runtime.RecognizerSharedState state)
Method Detail

nextToken

public org.antlr.runtime.Token nextToken()
Description copied from class: org.antlr.runtime.Lexer
Return a token from this source; i.e., match a token on the char stream.

Specified by:
nextToken in interface org.antlr.runtime.TokenSource
Overrides:
nextToken in class org.antlr.runtime.Lexer

getErrorMessage

public java.lang.String getErrorMessage(org.antlr.runtime.Token t)

emitErrorMessage

public void emitErrorMessage(java.lang.String msg)
Description copied from class: org.antlr.runtime.BaseRecognizer
Override this method to change where error messages go

Overrides:
emitErrorMessage in class org.antlr.runtime.BaseRecognizer