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>

Inheritance diagram for skParser:

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 "="

 operator TCleanupItem ()
 Conversion operator to Symbian TCleanupItem.

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.


Static Public Member Functions

void Cleanup (TAny *s)
 Called via Symbian CleanupStack in the event of a leave.


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

void skParser::Cleanup TAny *  s  )  [static]
 

Called via Symbian CleanupStack in the event of a leave.

This calls the cleanupTempNodes method in the parser

Remarks:
only available in Symbian version

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

skParser::operator TCleanupItem  ) 
 

Conversion operator to Symbian TCleanupItem.

This is provided to allow this object to be pushed by value onto the Symbian Cleanup Stack

Remarks:
only available in Symbian version

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 file:
Generated on Fri Dec 17 20:28:27 2004 for Simkin C++ for Symbian by doxygen1.3