Logo Search packages:      
Sourcecode: antlr version File versions

antlr::actions::csharp::ActionLexer Class Reference

Inheritance diagram for antlr::actions::csharp::ActionLexer:

List of all members.


Detailed Description

Perform the following translations:

AST related translations

## -> currentRule_AST #(x,y,z) -> codeGenerator.getASTCreateString(vector-of(x,y,z)) #[x] -> codeGenerator.getASTCreateString(x) x -> codeGenerator.mapTreeId(x)

Inside context of #(...), you can ref (x,y,z), [x], and x as shortcuts.

Text related translations

$append(x) -> text.append(x) $setText(x) -> text.setLength(_begin); text.append(x) $getText -> new String(text.getBuffer(),_begin,text.length()-_begin) $setToken(x) -> _token = x $setType(x) -> _ttype = x $FOLLOW(r) -> FOLLOW set name for rule r (optional arg) $FIRST(r) -> FIRST set name for rule r (optional arg)

Definition at line 54 of file ActionLexer.java.


Public Member Functions

 ActionLexer (LexerSharedInputState state)
 ActionLexer (InputBuffer ib)
 ActionLexer (Reader in)
 ActionLexer (InputStream in)
 ActionLexer (String s, RuleBlock currentRule, CodeGenerator generator, ActionTransInfo transInfo)
virtual void append (string s)
virtual void append (char c)
void append (String s)
void append (char c)
virtual void commit ()
void commit ()
virtual void consume ()
void consume () throws CharStreamException
virtual void consumeUntil (BitSet bset)
virtual void consumeUntil (int c)
void consumeUntil (BitSet set) throws CharStreamException
void consumeUntil (int c) throws CharStreamException
virtual bool getCaseSensitive ()
boolean getCaseSensitive ()
bool getCaseSensitiveLiterals ()
final boolean getCaseSensitiveLiterals ()
virtual int getColumn ()
int getColumn ()
virtual bool getCommitToPath ()
boolean getCommitToPath ()
virtual string getFilename ()
String getFilename ()
virtual InputBuffer getInputBuffer ()
InputBuffer getInputBuffer ()
virtual LexerSharedInputState getInputState ()
LexerSharedInputState getInputState ()
virtual int getLine ()
int getLine ()
virtual int getTabSize ()
int getTabSize ()
virtual string getText ()
String getText ()
virtual Token getTokenObject ()
Token getTokenObject ()
virtual char LA (int i)
char LA (int i) throws CharStreamException
final void mACTION (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
virtual int mark ()
int mark ()
virtual void match (string s)
virtual void match (BitSet b)
virtual void match (int c)
virtual void match (char c)
void match (String s) throws MismatchedCharException, CharStreamException
void match (BitSet b) throws MismatchedCharException, CharStreamException
void match (char c) throws MismatchedCharException, CharStreamException
virtual void matchNot (int c)
virtual void matchNot (char c)
void matchNot (char c) throws MismatchedCharException, CharStreamException
virtual void matchRange (char c1, char c2)
virtual void matchRange (int c1, int c2)
void matchRange (char c1, char c2) throws MismatchedCharException, CharStreamException
virtual void newline ()
void newline ()
Token nextToken () throws TokenStreamException
virtual void panic (string s)
 This method is executed by ANTLR internally when it detected an illegal state that cannot be recovered from. The previous implementation of this method called Environment.Exit and writes directly to Console.Error, which is usually not appropriate when a translator is embedded into a larger application.
virtual void panic ()
void panic (String s)
void panic ()
virtual void reportError (string s)
void reportError (String s)
void reportError (RecognitionException e)
virtual void reportWarning (string s)
void reportWarning (String s)
virtual void resetText ()
void resetText ()
virtual void rewind (int pos)
void rewind (int pos)
virtual void setCaseSensitive (bool t)
void setCaseSensitive (boolean t)
virtual void setColumn (int c)
void setColumn (int c)
virtual void setCommitToPath (bool commit)
void setCommitToPath (boolean commit)
virtual void setFilename (string f)
void setFilename (String f)
virtual void setInputState (LexerSharedInputState state)
void setInputState (LexerSharedInputState state)
virtual void setLine (int line)
void setLine (int line)
void setLineOffset (int lineOffset)
virtual void setTabSize (int size)
void setTabSize (int size)
virtual void setText (string s)
void setText (String s)
virtual void setTokenObjectClass (string cl)
void setTokenObjectClass (String cl)
void setTool (Tool tool)
virtual void tab ()
void tab ()
virtual int testLiteralsTable (string someText, int ttype)
virtual int testLiteralsTable (int ttype)
int testLiteralsTable (String text, int ttype)
int testLiteralsTable (int ttype)
virtual char toLower (int c)
char toLower (char c)
virtual void traceIn (string rname)
void traceIn (String rname) throws CharStreamException
virtual void traceIndent ()
void traceIndent ()
virtual void traceOut (string rname)
void traceOut (String rname) throws CharStreamException
virtual void uponEOF ()
void uponEOF () throws TokenStreamException, CharStreamException

Public Attributes

int ACTION = 4
int ARG = 16
int AST_CONSTRUCTOR = 10
int AST_CTOR_ELEMENT = 11
int AST_ITEM = 6
int CHAR = 22
int COMMENT = 19
int DIGIT = 25
int ESC = 24
int ID = 17
int ID_ELEMENT = 12
int INT = 26
int INT_OR_FLOAT = 27
int ML_COMMENT = 21
int NULL_TREE_LOOKAHEAD = 3
int SL_COMMENT = 20
int STRING = 23
int STUFF = 5
int TEXT_ARG = 13
int TEXT_ARG_ELEMENT = 14
int TEXT_ARG_ID_ELEMENT = 15
int TEXT_ITEM = 7
int TREE = 8
int TREE_ELEMENT = 9
int VAR_ASSIGN = 18
int WS = 28

Static Public Attributes

static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0())
static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1())
static final BitSet _tokenSet_10 = new BitSet(mk_tokenSet_10())
static final BitSet _tokenSet_11 = new BitSet(mk_tokenSet_11())
static final BitSet _tokenSet_12 = new BitSet(mk_tokenSet_12())
static final BitSet _tokenSet_13 = new BitSet(mk_tokenSet_13())
static final BitSet _tokenSet_14 = new BitSet(mk_tokenSet_14())
static final BitSet _tokenSet_15 = new BitSet(mk_tokenSet_15())
static final BitSet _tokenSet_16 = new BitSet(mk_tokenSet_16())
static final BitSet _tokenSet_17 = new BitSet(mk_tokenSet_17())
static final BitSet _tokenSet_18 = new BitSet(mk_tokenSet_18())
static final BitSet _tokenSet_19 = new BitSet(mk_tokenSet_19())
static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2())
static final BitSet _tokenSet_20 = new BitSet(mk_tokenSet_20())
static final BitSet _tokenSet_21 = new BitSet(mk_tokenSet_21())
static final BitSet _tokenSet_22 = new BitSet(mk_tokenSet_22())
static final BitSet _tokenSet_23 = new BitSet(mk_tokenSet_23())
static final BitSet _tokenSet_24 = new BitSet(mk_tokenSet_24())
static final BitSet _tokenSet_25 = new BitSet(mk_tokenSet_25())
static final BitSet _tokenSet_26 = new BitSet(mk_tokenSet_26())
static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3())
static final BitSet _tokenSet_4 = new BitSet(mk_tokenSet_4())
static final BitSet _tokenSet_5 = new BitSet(mk_tokenSet_5())
static final BitSet _tokenSet_6 = new BitSet(mk_tokenSet_6())
static final BitSet _tokenSet_7 = new BitSet(mk_tokenSet_7())
static final BitSet _tokenSet_8 = new BitSet(mk_tokenSet_8())
static final BitSet _tokenSet_9 = new BitSet(mk_tokenSet_9())
static readonly char EOF_CHAR = Char.MaxValue
static final char EOF_CHAR = (char)-1

Protected Member Functions

virtual internal Token makeToken (int t)
Token makeToken (int t)
final void mARG (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mAST_CONSTRUCTOR (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mAST_CTOR_ELEMENT (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mAST_ITEM (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mCHAR (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mCOMMENT (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mDIGIT (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mESC (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mID (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final boolean mID_ELEMENT (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mINT (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mINT_OR_FLOAT (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mML_COMMENT (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mSL_COMMENT (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mSTRING (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mSTUFF (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mTEXT_ARG (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mTEXT_ARG_ELEMENT (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mTEXT_ARG_ID_ELEMENT (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mTEXT_ITEM (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mTREE (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mTREE_ELEMENT (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mVAR_ASSIGN (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException
final void mWS (boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException

Protected Attributes

Token _returnToken = null
internal bool caseSensitive = true
boolean caseSensitive = true
internal bool caseSensitiveLiterals = true
boolean caseSensitiveLiterals = true
internal bool commitToPath = false
boolean commitToPath = false
RuleBlock currentRule
CodeGenerator generator
ANTLRHashString hashString
internal LexerSharedInputState inputState
LexerSharedInputState inputState
int lineOffset = 0
internal Hashtable literals
Hashtable literals
internal Token returnToken_ = null
internal bool saveConsumedInput = true
boolean saveConsumedInput = true
internal int tabsize = 8
int tabsize = 8
internal StringBuilder text
ANTLRStringBuffer text
Class tokenObjectClass
Type tokenObjectType
internal string tokenObjectTypeName
internal int traceDepth = 0
int traceDepth = 0

Package Attributes

int EOF = 1
ActionTransInfo transInfo

Static Package Attributes

static final char NO_CHAR = 0

Properties

TokenEventHandler CharLA
TokenEventHandler ConsumedChar
TraceEventHandler Done
TraceEventHandler EnterRule
MessageEventHandler ErrorReported
internal EventHandlerList Events [get]
TraceEventHandler ExitRule
NewLineEventHandler HitNewLine
MatchEventHandler MatchedChar
MatchEventHandler MatchedNotChar
MatchEventHandler MisMatchedChar
MatchEventHandler MisMatchedNotChar
SemanticPredicateEventHandler SemPredEvaluated
SyntacticPredicateEventHandler SynPredFailed
SyntacticPredicateEventHandler SynPredStarted
SyntacticPredicateEventHandler SynPredSucceeded
MessageEventHandler WarningReported

Static Private Member Functions

static final long[] mk_tokenSet_0 ()
static final long[] mk_tokenSet_1 ()
static final long[] mk_tokenSet_10 ()
static final long[] mk_tokenSet_11 ()
static final long[] mk_tokenSet_12 ()
static final long[] mk_tokenSet_13 ()
static final long[] mk_tokenSet_14 ()
static final long[] mk_tokenSet_15 ()
static final long[] mk_tokenSet_16 ()
static final long[] mk_tokenSet_17 ()
static final long[] mk_tokenSet_18 ()
static final long[] mk_tokenSet_19 ()
static final long[] mk_tokenSet_2 ()
static final long[] mk_tokenSet_20 ()
static final long[] mk_tokenSet_21 ()
static final long[] mk_tokenSet_22 ()
static final long[] mk_tokenSet_23 ()
static final long[] mk_tokenSet_24 ()
static final long[] mk_tokenSet_25 ()
static final long[] mk_tokenSet_26 ()
static final long[] mk_tokenSet_3 ()
static final long[] mk_tokenSet_4 ()
static final long[] mk_tokenSet_5 ()
static final long[] mk_tokenSet_6 ()
static final long[] mk_tokenSet_7 ()
static final long[] mk_tokenSet_8 ()
static final long[] mk_tokenSet_9 ()

Private Attributes

Tool antlrTool

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index