Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Scanner Class Reference

#include <Token.h>

List of all members.

Public Types

enum  Need { Demand, Request }

Public Member Functions

 Scanner (Reader *r=0)
 Scanner (const Text &s)
 Scanner (const Scanner &rhs)
virtual ~Scanner ()
Scanneroperator= (const Scanner &rhs)
void Load (const Text &s)
virtual Token Get (Need n=Demand)
void PutBack ()
int GetCursor ()
int GetLine ()
void Reset (int c, int l)
Token Best () const

Protected Member Functions

virtual int GetNumeric ()
virtual bool IsSymbolic (char c)
virtual bool IsAlpha (char c)

Protected Attributes

Readerreader
char * str
const char * p
const char * eos
size_t index
size_t old_index
Token best
size_t length
size_t line
size_t old_line
size_t lineStart

Detailed Description

Definition at line 105 of file Token.h.


Member Enumeration Documentation

Enumerator:
Demand 
Request 

Definition at line 117 of file Token.h.


Constructor & Destructor Documentation

Scanner::Scanner ( Reader r = 0)

Definition at line 290 of file Token.cpp.

Scanner::Scanner ( const Text s)

Definition at line 304 of file Token.cpp.

Scanner::Scanner ( const Scanner rhs)

Definition at line 295 of file Token.cpp.

Scanner::~Scanner ( )
virtual

Definition at line 312 of file Token.cpp.


Member Function Documentation

Token Scanner::Best ( ) const
inline

Definition at line 124 of file Token.h.

Token Scanner::Get ( Need  n = Demand)
virtual

Definition at line 357 of file Token.cpp.

int Scanner::GetCursor ( )
inline

Definition at line 121 of file Token.h.

int Scanner::GetLine ( )
inline

Definition at line 122 of file Token.h.

int Scanner::GetNumeric ( )
protectedvirtual

Definition at line 503 of file Token.cpp.

bool Scanner::IsAlpha ( char  c)
protectedvirtual

Definition at line 534 of file Token.cpp.

bool Scanner::IsSymbolic ( char  c)
protectedvirtual

Definition at line 542 of file Token.cpp.

void Scanner::Load ( const Text s)

Definition at line 339 of file Token.cpp.

Scanner & Scanner::operator= ( const Scanner rhs)

Definition at line 320 of file Token.cpp.

void Scanner::PutBack ( )
inline

Definition at line 120 of file Token.h.

void Scanner::Reset ( int  c,
int  l 
)
inline

Definition at line 123 of file Token.h.


Member Data Documentation

Token Scanner::best
protected

Definition at line 139 of file Token.h.

const char* Scanner::eos
protected

Definition at line 135 of file Token.h.

size_t Scanner::index
protected

Definition at line 137 of file Token.h.

size_t Scanner::length
protected

Definition at line 140 of file Token.h.

size_t Scanner::line
protected

Definition at line 141 of file Token.h.

size_t Scanner::lineStart
protected

Definition at line 143 of file Token.h.

size_t Scanner::old_index
protected

Definition at line 138 of file Token.h.

size_t Scanner::old_line
protected

Definition at line 142 of file Token.h.

const char* Scanner::p
protected

Definition at line 134 of file Token.h.

Reader* Scanner::reader
protected

Definition at line 131 of file Token.h.

char* Scanner::str
protected

Definition at line 132 of file Token.h.


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