summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pparser.cpp
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2016-08-10 23:08:20 +0200
committer couriersud <couriersud@arcor.de>2016-08-10 23:08:35 +0200
commitd0970c215f9e3dfa4a44a7627dcde675a48e006e (patch)
treee68365f92e0eb4f36c2aae1e9c57b5f5a1b8f892 /src/lib/netlist/plib/pparser.cpp
parent65d5cf75929d58a4c100e87cd9bd746fd898ec1a (diff)
Add a preliminary parser for RINF netlist format. (nw)
Diffstat (limited to 'src/lib/netlist/plib/pparser.cpp')
-rw-r--r--src/lib/netlist/plib/pparser.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/netlist/plib/pparser.cpp b/src/lib/netlist/plib/pparser.cpp
index 4f41c73d6f8..0a19685316d 100644
--- a/src/lib/netlist/plib/pparser.cpp
+++ b/src/lib/netlist/plib/pparser.cpp
@@ -106,7 +106,7 @@ pstring ptokenizer::get_identifier_or_number()
token_t tok = get_token();
if (!(tok.is_type(IDENTIFIER) || tok.is_type(NUMBER)))
{
- error(pfmt("Expected an identifier, got <{1}>")(tok.str()) );
+ error(pfmt("Expected an identifier or number, got <{1}>")(tok.str()) );
}
return tok.str();
}
@@ -203,7 +203,8 @@ ptokenizer::token_t ptokenizer::get_token_internal()
{
/* read identifier till non identifier char */
pstring tokstr = "";
- while (m_identifier_chars.find(c) != m_identifier_chars.end()) {
+ while (m_identifier_chars.find(c) != m_identifier_chars.end())
+ {
tokstr += c;
c = getc();
}
@@ -229,7 +230,8 @@ ptokenizer::token_t ptokenizer::get_token_internal()
{
/* read identifier till first identifier char or ws */
pstring tokstr = "";
- while ((m_identifier_chars.find(c)) == m_identifier_chars.end() && (m_whitespace.find(c) == m_whitespace.end())) {
+ while ((m_identifier_chars.find(c) == m_identifier_chars.end()) && (m_whitespace.find(c) == m_whitespace.end()))
+ {
tokstr += c;
/* expensive, check for single char tokens */
if (tokstr.len() == 1)