summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/express.c
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-04-19 08:08:34 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2015-04-19 08:08:34 +0200
commit3c3ee1d1775274c0358425c8692b5f9b82c99a8a (patch)
tree3008504411bee0cb64628d9aae7cb21aecfb8df0 /src/emu/debug/express.c
parent6540842bc7c2af3fe02292dcbf00485a449539d9 (diff)
more conversions to std::string (nw)
Diffstat (limited to 'src/emu/debug/express.c')
-rw-r--r--src/emu/debug/express.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/emu/debug/express.c b/src/emu/debug/express.c
index 28b2e408e3b..6269a25aa3a 100644
--- a/src/emu/debug/express.c
+++ b/src/emu/debug/express.c
@@ -861,14 +861,14 @@ void parsed_expression::parse_symbol_or_number(parse_token &token, const char *&
{
// accumulate a lower-case version of the symbol
const char *stringstart = string;
- astring buffer;
+ std::string buffer;
while (1)
{
static const char valid[] = "abcdefghijklmnopqrstuvwxyz0123456789_$#.:";
char val = tolower((UINT8)string[0]);
if (val == 0 || strchr(valid, val) == NULL)
break;
- buffer.cat(&val, 1);
+ buffer.append(&val, 1);
string++;
}
@@ -880,49 +880,49 @@ void parsed_expression::parse_symbol_or_number(parse_token &token, const char *&
}
// empty string is automatically invalid
- if (!buffer)
+ if (buffer.empty())
throw expression_error(expression_error::INVALID_TOKEN, token.offset());
// check for wordy variants on standard operators
- if (buffer == "bnot")
+ if (buffer.compare("bnot")==0)
{ token.configure_operator(TVL_NOT, 2); return; }
- if (buffer == "plus")
+ if (buffer.compare("plus") == 0)
{ token.configure_operator(TVL_ADD, 4); return; }
- if (buffer == "minus")
+ if (buffer.compare("minus") == 0)
{ token.configure_operator(TVL_SUBTRACT, 4); return; }
- if (buffer == "times" || buffer == "mul")
+ if (buffer.compare("times") == 0 || buffer.compare("mul") == 0)
{ token.configure_operator(TVL_MULTIPLY, 3); return; }
- if (buffer == "div")
+ if (buffer.compare("div") == 0)
{ token.configure_operator(TVL_DIVIDE, 3); return; }
- if (buffer == "mod")
+ if (buffer.compare("mod") == 0)
{ token.configure_operator(TVL_MODULO, 3); return; }
- if (buffer == "lt")
+ if (buffer.compare("lt") == 0)
{ token.configure_operator(TVL_LESS, 6); return; }
- if (buffer == "le")
+ if (buffer.compare("le") == 0)
{ token.configure_operator(TVL_LESSOREQUAL, 6); return; }
- if (buffer == "gt")
+ if (buffer.compare("gt") == 0)
{ token.configure_operator(TVL_GREATER, 6); return; }
- if (buffer == "ge")
+ if (buffer.compare("ge") == 0)
{ token.configure_operator(TVL_GREATEROREQUAL, 6); return; }
- if (buffer == "eq")
+ if (buffer.compare("eq") == 0)
{ token.configure_operator(TVL_EQUAL, 7); return; }
- if (buffer == "ne")
+ if (buffer.compare("ne") == 0)
{ token.configure_operator(TVL_NOTEQUAL, 7); return; }
- if (buffer == "not")
+ if (buffer.compare("not") == 0)
{ token.configure_operator(TVL_COMPLEMENT, 2); return; }
- if (buffer == "and")
+ if (buffer.compare("and") == 0)
{ token.configure_operator(TVL_LAND, 8); return; }
- if (buffer == "band")
+ if (buffer.compare("band") == 0)
{ token.configure_operator(TVL_BAND, 8); return; }
- if (buffer == "or")
+ if (buffer.compare("or") == 0)
{ token.configure_operator(TVL_LOR, 12); return; }
- if (buffer == "bor")
+ if (buffer.compare("bor") == 0)
{ token.configure_operator(TVL_BOR, 10); return; }
- if (buffer == "bxor")
+ if (buffer.compare("bxor") == 0)
{ token.configure_operator(TVL_BXOR, 9); return; }
- if (buffer == "lshift")
+ if (buffer.compare("lshift") == 0)
{ token.configure_operator(TVL_LSHIFT, 5); return; }
- if (buffer == "rshift")
+ if (buffer.compare("rshift") == 0)
{ token.configure_operator(TVL_RSHIFT, 5); return; }
// if we have an 0x prefix, we must be a hex value