summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/netlist/plib/pparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/netlist/plib/pparser.c')
-rw-r--r--src/emu/netlist/plib/pparser.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/emu/netlist/plib/pparser.c b/src/emu/netlist/plib/pparser.c
index 6022eef1426..98b26a1b85f 100644
--- a/src/emu/netlist/plib/pparser.c
+++ b/src/emu/netlist/plib/pparser.c
@@ -97,6 +97,16 @@ pstring ptokenizer::get_identifier()
return tok.str();
}
+pstring ptokenizer::get_identifier_or_number()
+{
+ token_t tok = get_token();
+ if (!(tok.is_type(IDENTIFIER) || tok.is_type(NUMBER)))
+ {
+ error("Error: expected an identifier, got <%s>\n", tok.str().cstr());
+ }
+ return tok.str();
+}
+
double ptokenizer::get_number_double()
{
token_t tok = get_token();