X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Finput_lexer.h;h=df9e29af3b44c4cf9d6594881ebf438161aa46db;hp=0ba72d1ac5bb40bd538fae496c2fc27bd8b9e04f;hb=0c9cc6886e62e476de252b017161203f049edc8f;hpb=5b61a513b51d5cb316616a5ab43ed09b842ab570 diff --git a/ginac/input_lexer.h b/ginac/input_lexer.h index 0ba72d1a..df9e29af 100644 --- a/ginac/input_lexer.h +++ b/ginac/input_lexer.h @@ -4,7 +4,7 @@ * This file must be processed with flex. */ /* - * GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2005 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __GINAC_INPUT_LEXER_H__ @@ -27,7 +27,7 @@ extern "C" { #include } - + #include "config.h" // yacc stack type @@ -37,20 +37,17 @@ extern "C" { extern int ginac_yyerror(char *s); extern int ginac_yylex(void); extern void ginac_yyrestart(FILE *f); -#if YYTEXT_POINTER extern char *ginac_yytext; -#else -extern char ginac_yytext[]; -#endif -#ifndef NO_NAMESPACE_GINAC namespace GiNaC { -#endif // ndef NO_NAMESPACE_GINAC class ex; /** Set the input string to be parsed by ginac_yyparse() (used internally). */ -extern void set_lexer_string(const string &s); +extern void set_lexer_string(const std::string &s); + +/** Get name of symbol/index (used internally). */ +extern std::string get_symbol_name(const ex & s); /** Set the list of predefined symbols for the lexer (used internally). */ extern void set_lexer_symbols(ex l); @@ -59,16 +56,14 @@ extern void set_lexer_symbols(ex l); extern bool is_lexer_symbol_predefined(const ex &s); /** The expression parser function (used internally). */ -extern int ginac_yyparse(); +extern int ginac_yyparse(void); /** 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 -#endif // ndef NO_NAMESPACE_GINAC #endif // ndef __GINAC_INPUT_LEXER_H__