#include "parse.hpp"
#include "eval.hpp"
#include <sstream>
Functions | |
void | parse_eval_print (string sexpr) |
Parse and evaluate the s-expression, and print the result. | |
void | readsinglesymbol (ifstream &fin, string &str) |
Read single single symbol into the end of a string buffer. | |
void | readfile (ifstream &fin) |
Read, parse, evaluate, and print the expression one by one from the input stream. | |
void | readfile (char *fn) |
Read the expressions from the file. | |
void | readconsole () |
Read, parse, evaluate, and print the expression one by one from the standard input, interactively. | |
int | main (int argc, char *argv[]) |
Call either the batch or interactive main drivers. |
int main | ( | int | argc, | |
char * | argv[] | |||
) |
void parse_eval_print | ( | string | sexpr | ) |
Parse and evaluate the s-expression, and print the result.
sexpr | The string vaule holding the s-expression. |
References eval(), nil, and parse().
Referenced by readconsole(), and readfile().
void readconsole | ( | ) |
Read, parse, evaluate, and print the expression one by one from the standard input, interactively.
References parse_eval_print().
Referenced by main().
void readfile | ( | char * | fn | ) |
void readfile | ( | ifstream & | fin | ) |
Read, parse, evaluate, and print the expression one by one from the input stream.
fin | The input file stream. |
References iswhitespace(), parse_eval_print(), and readsinglesymbol().
Referenced by main(), and readfile().
void readsinglesymbol | ( | ifstream & | fin, | |
string & | str | |||
) |
Read single single symbol into the end of a string buffer.
fin | The input file stream. | |
str | The string buffer. |
References iswhitespace().
Referenced by readfile(), and separate_parse().