Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

skParser Class Reference

This class is used to parse a string of Simkin code. More...

#include <skParser.h>

List of all members.

Public Member Functions

 skParser (const skString &code, const skString &location)
 constructor

 ~skParser ()
 Destructor - destroys the temporary nodes and strings.

skMethodDefNodeparseMethod ()
 this method instructs the parser to begin parsing the string passed into the constructor The string is assumed to contain a method definition

skExprNode * parseExpression ()
 this method instructs the parser to begin parsing the string passed into the constructor The string is assumed to contain an expression, beginning with "="

void setTopNode (skParseNode *pNode)
 sets the current top-level parse node

void removeTempString (skString *str)
 removes a string from the temporary string list

void addParseNode (skParseNode *pNode)
 Saves a parse node to the list of temporary nodes.

void appendError (const skString &msg)
 this adds a compile error message to the list of messages

void appendError (const Char *msg)
 this adds a compile error message to the list of messages

skCompileErrorListgetErrList ()
 This returns the current compile error list.

int lex (void *lvalp, void *lloc)
 This message returns the next token in the stream.


Detailed Description

This class is used to parse a string of Simkin code.


Constructor & Destructor Documentation

skParser::skParser const skString code,
const skString location
 

constructor

Parameters:
code a string containing the Simkin code
location the location of the script (used for compile/parse errors)


Member Function Documentation

void skParser::addParseNode skParseNode pNode  ) 
 

Saves a parse node to the list of temporary nodes.

If an error occurs these will be cleared up

Exceptions:
Symbian - a leaving function

void skParser::appendError const Char *  msg  ) 
 

this adds a compile error message to the list of messages

Exceptions:
Symbian - a leaving function

void skParser::appendError const skString msg  ) 
 

this adds a compile error message to the list of messages

Exceptions:
Symbian - a leaving function

int skParser::lex void *  lvalp,
void *  lloc
 

This message returns the next token in the stream.

Parameters:
lvalp pointer to the YYSTYPE (token structure)
lloc pointer to the YYLTYPE (token position structure)
Exceptions:
Symbian - a leaving function

skExprNode * skParser::parseExpression  ) 
 

this method instructs the parser to begin parsing the string passed into the constructor The string is assumed to contain an expression, beginning with "="

Returns:
If the parse is valid, then this will return the top of the parse tree, which the caller should delete
Exceptions:
Symbian - a leaving function

skMethodDefNode * skParser::parseMethod  ) 
 

this method instructs the parser to begin parsing the string passed into the constructor The string is assumed to contain a method definition

Returns:
If the parse is valid, then this will return the top of the parse tree, which the caller should delete
Exceptions:
Symbian - a leaving function

void skParser::removeTempString skString str  ) 
 

removes a string from the temporary string list

Parameters:
str the string to remove

void skParser::setTopNode skParseNode pNode  ) 
 

sets the current top-level parse node

Parameters:
pNode the method definition or expression node


The documentation for this class was generated from the following files:
Generated on Fri Dec 17 20:27:35 2004 for Simkin by doxygen1.3