X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Finput_lexer.h;h=a7c8c06fffb35d0e8e3d4989ab6d58f98d004934;hp=575c836c75c9bca76adbcccbf38446e0a3084ce9;hb=bd2d7351b89743eb68ce7d3bfa7ab62c331f9522;hpb=956a3ad3779759028bfd742456ed9eafc3e85063 diff --git a/ginac/input_lexer.h b/ginac/input_lexer.h index 575c836c..a7c8c06f 100644 --- a/ginac/input_lexer.h +++ b/ginac/input_lexer.h @@ -24,8 +24,10 @@ #ifndef __GINAC_INPUT_LEXER_H__ #define __GINAC_INPUT_LEXER_H__ +extern "C" { #include - +} + #include "config.h" // yacc stack type @@ -47,20 +49,23 @@ namespace GiNaC { class ex; -/** Set the input string to be parsed by yyparse(). */ +/** Set the input string to be parsed by ginac_yyparse() (used internally). */ extern void set_lexer_string(const string &s); -/** Set the list of predefined symbols for the lexer (used internally for stream input). */ +/** Set the list of predefined symbols for the lexer (used internally). */ extern void set_lexer_symbols(ex l); -/** The expression parser function (used internally for stream input). */ -extern int yyparse(); +/** Check whether lexer symbol was predefined (vs. created by the lexer, e.g. function names). */ +extern bool is_lexer_symbol_predefined(const ex &s); + +/** The expression parser function (used internally). */ +extern int ginac_yyparse(); -/** The expression returned by the parser (used internally for stream input). */ +/** The expression returned by the parser (used internally). */ extern ex parsed_ex; /** Get error message from the parser. */ -extern string get_parser_error(void); +extern std::string get_parser_error(void); #ifndef NO_NAMESPACE_GINAC } // namespace GiNaC