X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Finput_lexer.ll;h=18f78818746e0bbd82fd31b2650d1be3b2cb6417;hp=04b71e832b2f17bd17b17090811d357607541ba5;hb=8493b91ebc3b9f748dc663ac12239e9ce0fa5b26;hpb=fa792492f853255f78b3e10c6f727fd10ad45cac diff --git a/ginac/input_lexer.ll b/ginac/input_lexer.ll index 04b71e83..18f78818 100644 --- a/ginac/input_lexer.ll +++ b/ginac/input_lexer.ll @@ -69,7 +69,7 @@ struct sym_def { ex sym; bool predefined; // true = user supplied symbol, false = lexer generated symbol }; -typedef map sym_tab; +typedef std::map sym_tab; static sym_tab syms; // lex input function @@ -111,6 +111,10 @@ Digits ginac_yylval = (long)Digits; return T_DIGITS; /* numbers */ {D}+ | +"#"{D}+"R"{AN}+ | +"#b"([01])+ | +"#o"[0-7]+ | +"#x"[0-9a-fA-F]+ | {D}+"."{D}*({E})? | {D}*"."{D}+({E})? | {D}+{E} ginac_yylval = numeric(yytext); return T_NUMBER; @@ -121,7 +125,7 @@ Digits ginac_yylval = (long)Digits; return T_DIGITS; if (i == syms.end()) { syms[yytext] = sym_def(ginac_yylval = *(new symbol(yytext)), false); } else - ginac_yylval = i->second.sym; + ginac_yylval = (*i).second.sym; return T_SYMBOL; } @@ -136,7 +140,7 @@ Digits ginac_yylval = (long)Digits; return T_DIGITS; */ // The string from which we will read -static string lexer_string; +static std::string lexer_string; // The current position within the string static int curr_pos = 0; @@ -165,7 +169,7 @@ namespace GiNaC { #endif // ndef NO_NAMESPACE_GINAC // Set the input string -void set_lexer_string(const string &s) +void set_lexer_string(const std::string &s) { lexer_string = s; curr_pos = 0; @@ -190,7 +194,7 @@ bool is_lexer_symbol_predefined(const ex &s) if (i == syms.end()) return false; else - return i->second.predefined; + return (*i).second.predefined; } #ifndef NO_NAMESPACE_GINAC