Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. #ifndef PARSER_H
  2. #define PARSER_H
  3.  
  4. void set_exp(char* exp, double x);
  5.  
  6. void putback(double* hold); // puts the token back to line
  7.  
  8. int get_exp(double* hold); // gets the expression. This function is used externally
  9.  
  10. void level2(double* hold); // works with +-
  11.  
  12. void level3(double* hold); // works with */%
  13.  
  14. void level4(double* hold); // works with ^
  15.  
  16. void level5(double* hold); // works with ()
  17.  
  18. void level6(double* hold); // works with elementary tokens
  19.  
  20. void primitive(double* hold); // gets value of number, function or variable
  21.  
  22. void arith(char op, double* r, double* h); // performs arithmetical operation
  23.  
  24. void unary(char op, double* r); // performs unary (one-operand) operation
  25.  
  26. double find_var(const char* s); // gets variable value by name
  27.  
  28. void serror(int code); // stops execution of parser and return error code
  29.  
  30. int look_up(const char* s); // checks the function table to see if such a function exists
  31.  
  32. #endif /* PARSER_H */