kolibrios/programs/other/graph/branches/tcc_current/parser.h
vitalkrilov 2e97f212ae Graph (branch: tcc_current): added missing files... (oops)
git-svn-id: svn://kolibrios.org@9763 a494cfbc-eb01-0410-851d-a64ba20cac60
2022-04-12 00:42:06 +00:00

32 lines
969 B
C
Executable File

#ifndef PARSER_H
#define PARSER_H
void set_exp(char* exp, double x);
void putback(double* hold); // puts the token back to line
int get_exp(double* hold); // gets the expression. This function is used externally
void level2(double* hold); // works with +-
void level3(double* hold); // works with */%
void level4(double* hold); // works with ^
void level5(double* hold); // works with ()
void level6(double* hold); // works with elementary tokens
void primitive(double* hold); // gets value of number, function or variable
void arith(char op, double* r, double* h); // performs arithmetical operation
void unary(char op, double* r); // performs unary (one-operand) operation
double find_var(const char* s); // gets variable value by name
void serror(int code); // stops execution of parser and return error code
int look_up(const char* s); // checks the function table to see if such a function exists
#endif /* PARSER_H */