summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2017-03-27 20:32:07 +0200
committer Olivier Galibert <galibert@pobox.com>2017-03-27 20:37:38 +0200
commita43db4ab229df5934b7275c4560037a6c017064a (patch)
treea62a20b9361c61f613d646dc8acc49aa19ebf9e7
parent0dd55128b9288d6056a3623eac210a3d206bb2d3 (diff)
express: More robust parsing fix (nw)
-rw-r--r--src/emu/debug/express.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/emu/debug/express.cpp b/src/emu/debug/express.cpp
index 951a1899869..198b9428837 100644
--- a/src/emu/debug/express.cpp
+++ b/src/emu/debug/express.cpp
@@ -873,12 +873,17 @@ void parsed_expression::parse_symbol_or_number(parse_token &token, const char *&
string++;
}
- // check for memory @ operators
- if ((string[0] == '@' || string[0] == '!') && (buffer.back() == 'b' || buffer.back() == 'w' || buffer.back() == 'd' || buffer.back() == 'q'))
+ // check for memory @ and ! operators
+ if (string[0] == '@' || string[0] == '!')
{
- bool with_se = string[0] == '!';
- string += 1;
- return parse_memory_operator(token, buffer.c_str(), with_se);
+ try {
+ bool with_se = string[0] == '!';
+ parse_memory_operator(token, buffer.c_str(), with_se);
+ string += 1;
+ return;
+ } catch(const expression_error &e) {
+ // Try some other operator instead
+ }
}
// empty string is automatically invalid