@root classes

class Parser

^ 
Class to parse a string and build a Expression tree representing the mathematical value of that string

Source:
parser.h:28
Author:
jhc7@duke.edu
Version:
unknown

Contents

^ 
EntityTypeScopeShort Description
~Parserdestructor publicautomatically generated
Parserconstructor public Parser() - default constructor for a Parser
Parserconstructor publicautomatically generated
getNumParsedmethod public this function returns the number of expressions that have already been parsed.
operator =operator publicautomatically generated
parseExpressionmethod public This function is the main function that will be used to interact with a parser.
updateCurrentmethod public Takes what the user entered and the results of that input and updates the 'current' variable if the input was neither a history command, a comment, a variable assignment, or evaluating a variable

destructor ~Parser

? ^  > 
automatically generated
Source:
parser.h
Code:
public ~ Parser ( )

constructor Parser

? ^  < > 
Parser() - default constructor for a Parser
Source:
parser.h:34
Code:
public Parser ( )

constructor Parser

? ^  < > 
automatically generated
Source:
parser.h
Code:
public Parser ( const Parser & )

method getNumParsed

? ^  < > 
this function returns the number of expressions that have already been parsed.

This is needed for displaying the line number on the prompts for the user

Source:
parser.h:50
Code:
public int getNumParsed ( )

operator =

? ^  < > 
automatically generated
Source:
parser.h
Code:
public Parser & operator = ( const Parser & )

method parseExpression

? ^  < > 
This function is the main function that will be used to interact with a parser.

it uses private helper functions in order to validate input and to construct a expression tree

Source:
parser.h:42
Code:
public Expression * parseExpression ( string exp )

method updateCurrent

? ^  < > 
Takes what the user entered and the results of that input and updates the 'current' variable if the input was neither a history command, a comment, a variable assignment, or evaluating a variable
Source:
parser.h:58
Code:
public void updateCurrent ( string exp ,
Expression * result )

Created Sun Oct 6 20:57:01 2002.
This documentation was generated automatically by
ccdoc v0.8 r26 2001/11/28 bin_opt_suncc_solaris-2.8.
Click here to submit a bug report or feature request.
Click here to return to the top of the page.