Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Token Class Reference

#include <Lex.H>

List of all members.

Public Member Functions

 Token ()
void Init (const Text &model, ShortId sid)
void Next ()
void LexFlush ()
void StartBytes ()
void AppendChar (char c)
void UnAppendChar ()
void EndBytes ()
char * Bytes ()
Text AsText ()
int Length ()
void TokenAssign (Token &tk)

Public Attributes

TokenClass tclass
Expr expr
SrcLocloc

Private Member Functions

void ScanIdNumber (char c)
void ScanText ()
bool ScanPragma ()
void ScanComment (char c)
 Token (const Token &)
Tokenoperator= (const Token &)

Private Attributes

char * bytes
int bytesLength
int length


Constructor & Destructor Documentation

Token::Token  ) 
 

Definition at line 53 of file Lex.C.

References bytes, length, and NEW_PTRFREE_ARRAY.

Token::Token const Token  )  [private]
 


Member Function Documentation

void Token::AppendChar char  c  ) 
 

Definition at line 59 of file Lex.C.

References bytes, bytesLength, length, and NEW_PTRFREE_ARRAY.

Referenced by Next(), ScanIdNumber(), ScanPragma(), and ScanText().

Text Token::AsText  )  [inline]
 

Definition at line 84 of file Lex.H.

References bytes.

Referenced by Assign(), DelimPath(), EatArc(), Expect(), Expr4(), Expr5(), and Primary().

char* Token::Bytes  )  [inline]
 

Definition at line 83 of file Lex.H.

References bytes.

Referenced by AtArc(), AtDelimiter(), AtToken(), Formals(), ScanIdNumber(), ScanText(), and Stmt().

void Token::EndBytes  )  [inline]
 

Definition at line 82 of file Lex.H.

References bytes, and length.

Referenced by Next(), ScanIdNumber(), ScanPragma(), and ScanText().

void Token::Init const Text model,
ShortId  sid
 

Definition at line 551 of file Lex.C.

References expr, SrcLoc::Init(), loc, tclass, and TkErr.

Referenced by InitState().

int Token::Length  )  [inline]
 

Definition at line 85 of file Lex.H.

References length.

Referenced by ScanIdNumber().

void Token::LexFlush  ) 
 

Definition at line 544 of file Lex.C.

References lexIn.

Referenced by Parse().

void Token::Next  ) 
 

Definition at line 431 of file Lex.C.

References AppendChar(), bytes, SrcLoc::character, charNumber, SrcLoc::Copy(), EndBytes(), Error(), GetChar(), SrcLoc::line, lineNumber, loc, Basics::mutex::lock(), outputMu, ScanComment(), ScanIdNumber(), ScanPragma(), ScanText(), StartBytes(), tclass, TkEOF, TkLess, TkLessEq, TkSlash, UnAppendChar(), and Basics::mutex::unlock().

Referenced by NextToken().

Token& Token::operator= const Token  )  [private]
 

void Token::ScanComment char  c  )  [private]
 

Definition at line 144 of file Lex.C.

References charNumber, Error(), SrcLoc::file, GetChar(), lineNumber, loc, Basics::mutex::lock(), outputMu, SrcLoc::shortId, and Basics::mutex::unlock().

Referenced by Next().

void Token::ScanIdNumber char  c  )  [private]
 

Definition at line 253 of file Lex.C.

References AppendChar(), Bytes(), SrcLoc::Copy(), EndBytes(), Error(), expr, GetChar(), Length(), loc, Basics::mutex::lock(), NEW_CONSTR, outputMu, tclass, TkId, TkNumber, and Basics::mutex::unlock().

Referenced by Next().

bool Token::ScanPragma  )  [private]
 

Definition at line 191 of file Lex.C.

References AppendChar(), bytes, SrcLoc::Copy(), EndBytes(), Error(), GetChar(), length, loc, Basics::mutex::lock(), outputMu, StartBytes(), tclass, TkPragma, and Basics::mutex::unlock().

Referenced by Next().

void Token::ScanText  )  [private]
 

Definition at line 334 of file Lex.C.

References AppendChar(), Bytes(), SrcLoc::Copy(), EndBytes(), Error(), expr, GetChar(), loc, Basics::mutex::lock(), NEW_CONSTR, outputMu, tclass, TkString, and Basics::mutex::unlock().

Referenced by Next().

void Token::StartBytes  )  [inline]
 

Definition at line 78 of file Lex.H.

References bytes, and length.

Referenced by Next(), and ScanPragma().

void Token::TokenAssign Token tk  ) 
 

Definition at line 70 of file Lex.C.

References bytes, bytesLength, expr, length, loc, and tclass.

Referenced by EatArc(), EatDelimiter(), EatName(), EatPragma(), EatToken(), and NextToken().

void Token::UnAppendChar  )  [inline]
 

Definition at line 80 of file Lex.H.

References length.

Referenced by Next().


Member Data Documentation

char* Token::bytes [private]
 

Definition at line 90 of file Lex.H.

Referenced by AppendChar(), AsText(), Bytes(), EndBytes(), Next(), ScanPragma(), StartBytes(), Token(), and TokenAssign().

int Token::bytesLength [private]
 

Definition at line 91 of file Lex.H.

Referenced by AppendChar(), and TokenAssign().

Expr Token::expr
 

Definition at line 71 of file Lex.H.

Referenced by EatName(), GetName(), Init(), Primary(), ScanIdNumber(), ScanText(), and TokenAssign().

int Token::length [private]
 

Definition at line 92 of file Lex.H.

Referenced by AppendChar(), EndBytes(), Length(), ScanPragma(), StartBytes(), Token(), TokenAssign(), and UnAppendChar().

SrcLoc* Token::loc
 

Definition at line 72 of file Lex.H.

Referenced by Actuals(), BindElem(), Block(), Control(), ConvertToBindElem(), EatArc(), Expr1(), Expr2(), Expr3(), Expr4(), Expr5(), Expr6(), Expr7(), Expr8(), Expression(), FileItem(), FileList(), Files(), Formals(), Func(), Imports(), IncItem(), IncList(), Init(), Iterate(), Next(), PError(), Primary(), ScanComment(), ScanIdNumber(), ScanPragma(), ScanText(), TokenAssign(), and Type().

TokenClass Token::tclass
 

Definition at line 70 of file Lex.H.

Referenced by AtArc(), AtDelimiter(), AtToken(), BindElem(), Block(), EatPragma(), Expect(), Expr4(), Init(), Next(), Primary(), ScanIdNumber(), ScanPragma(), ScanText(), and TokenAssign().


The documentation for this class was generated from the following files:
Generated on Mon May 8 00:49:15 2006 for Vesta by  doxygen 1.4.2