parse.hpp File Reference

#include "cons.hpp"

Go to the source code of this file.


Cell * parse (string sexpr)
 Recursively parse sexpr and build the parse tree.
bool iswhitespace (char ch)
 Check whether the character is whitespace.

Detailed Description

Encapsulates the interface for the expression parsing function, which analyzes a string containing an s-expression, and determines its tree structure.

Function Documentation

bool iswhitespace ( char  ch  ) 

Check whether the character is whitespace.

True if it is character, false else.
ch The character to check.

Referenced by clearwhitespace(), readfile(), readsinglesymbol(), and separate_parse().

Cell* parse ( string  sexpr  ) 

Recursively parse sexpr and build the parse tree.

sexpr The s-expression stored in a string variable (note that this version of parse has side effects: it may alter the contents of sexpr).
A pointer to the conspair cell at the root of the parse tree.

References clearwhitespace(), is_legalexpr(), makecell(), and separate_parse().

Referenced by parse_eval_print(), and separate_parse().

Generated on Fri Apr 3 00:19:12 2009 for a1 by  doxygen 1.5.8