summaryrefslogtreecommitdiffstats
path: root/src/lib/netlist/nl_parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/nl_parser.cpp')
-rw-r--r--src/lib/netlist/nl_parser.cpp25
1 files changed, 4 insertions, 21 deletions
diff --git a/src/lib/netlist/nl_parser.cpp b/src/lib/netlist/nl_parser.cpp
index 365054fc7d0..15f185ea712 100644
--- a/src/lib/netlist/nl_parser.cpp
+++ b/src/lib/netlist/nl_parser.cpp
@@ -7,6 +7,7 @@
#include "nl_parser.h"
#include "nl_factory.h"
+#include "nl_errstr.h"
#include "devices/nld_truthtable.h"
namespace netlist
@@ -68,14 +69,13 @@ bool parser_t::parse(const pstring nlname)
if (token.is_type(ENDOFFILE))
{
return false;
- //error("EOF while searching for <{1}>", nlname);
}
if (token.is(m_tok_NETLIST_END))
{
require_token(m_tok_param_left);
if (!in_nl)
- error("Unexpected NETLIST_END");
+ error (MF_0_UNEXPECTED_NETLIST_END);
else
{
in_nl = false;
@@ -85,7 +85,7 @@ bool parser_t::parse(const pstring nlname)
else if (token.is(m_tok_NETLIST_START))
{
if (in_nl)
- error("Unexpected NETLIST_START");
+ error (MF_0_UNEXPECTED_NETLIST_START);
require_token(m_tok_param_left);
token_t name = get_token();
require_token(m_tok_param_right);
@@ -415,7 +415,6 @@ nl_double parser_t::eval_param(const token_t tok)
for (i=1; i<6;i++)
if (tok.str().equals(macs[i]))
f = i;
-#if 1
if (f>0)
{
require_token(m_tok_param_left);
@@ -431,22 +430,6 @@ nl_double parser_t::eval_param(const token_t tok)
}
return ret * facs[f];
-#else
- if (f>0)
- {
- require_token(m_tok_param_left);
- val = get_identifier();
- }
- else
- val = tok.str();
-
- ret = val.as_double(&e);
-
- if (e)
- fatal("Error with parameter ...\n");
- if (f>0)
- require_token(m_tok_param_right);
- return ret * facs[f];
-#endif
}
+
}