Logo Search packages:      
Sourcecode: wims version File versions  Download package

edu::hws::jcm::data::ParserContext Class Reference

List of all members.


Detailed Description

A ParserContext holds all the state data for a parsing operation, including the string that is being parsed, a pointer to the current position in that string, and the most recently parsed token from the string. The ParserContext object does the tokenization. Token types are retrieved by calling look() and next(). Attributes of the token are then available in the member variables tokenString, tokenObject, and tokenValue. You will probably only use this if you write a ParserExtension.

Definition at line 36 of file ParserContext.java.


Public Member Functions

void add (MathObject sym)
MathObject get (String name)
int look ()
void mark ()
int next ()
 ParserContext (String data, int options, SymbolTable symbols)
void revert ()

Public Attributes

String data
int options
int pos
ExpressionProgram prog
int token
MathObject tokenObject
String tokenString
double tokenValue

Static Public Attributes

static final int END_OF_STRING = 1
static final int IDENTIFIER = 3
static final int NUMBER = 2
static final int OPCHARS = 4

Protected Attributes

SymbolTable symbols

Private Member Functions

void readToken ()

Private Attributes

StringBuffer tokBuf = new StringBuffer()

Static Private Attributes

static final int NONE = 0

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

Generated by  Doxygen 1.6.0   Back to index