diff options
author | 2019-11-08 23:52:14 +0100 | |
---|---|---|
committer | 2019-11-08 23:52:14 +0100 | |
commit | 88f702b416ba9eb930e6c1e932124d5f24b1a24c (patch) | |
tree | 955f3047b79156d7b2bbab55fcbd4fbc94661f1d /src/lib/netlist/plib/ptokenizer.cpp | |
parent | 731c4fe52073a7a7561bf04559e9f0b3b791388d (diff) |
netlist: code maintenance and bug fixes. (nw)
- comment style migration continues.
- Fixed a two bugs in the truthtable ignore inputs code
- refactored the truthtable code a bit for better readability.
- updated netlist specific gitignore.
Diffstat (limited to 'src/lib/netlist/plib/ptokenizer.cpp')
-rw-r--r-- | src/lib/netlist/plib/ptokenizer.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/lib/netlist/plib/ptokenizer.cpp b/src/lib/netlist/plib/ptokenizer.cpp index 0e8cabe4e8b..23d0903ae2a 100644 --- a/src/lib/netlist/plib/ptokenizer.cpp +++ b/src/lib/netlist/plib/ptokenizer.cpp @@ -1,9 +1,5 @@ // license:GPL-2.0+ // copyright-holders:Couriersud -/* - * ptokenizer.cpp - * - */ #include "ptokenizer.h" #include "palloc.h" @@ -198,7 +194,7 @@ namespace plib { ptokenizer::token_t ptokenizer::get_token_internal() { - /* skip ws */ + // skip ws pstring::value_type c = getc(); while (m_whitespace.find(c) != pstring::npos) { @@ -212,10 +208,8 @@ namespace plib { return token_t(LINEMARKER, "#"); else if (m_number_chars_start.find(c) != pstring::npos) { - /* read number while we receive number or identifier chars - * treat it as an identifier when there are identifier chars in it - * - */ + // read number while we receive number or identifier chars + // treat it as an identifier when there are identifier chars in it token_type ret = NUMBER; pstring tokstr = ""; while (true) { @@ -231,7 +225,7 @@ namespace plib { } else if (m_identifier_chars.find(c) != pstring::npos) { - /* read identifier till non identifier char */ + // read identifier till non identifier char pstring tokstr = ""; while (m_identifier_chars.find(c) != pstring::npos) { @@ -258,12 +252,12 @@ namespace plib { } else { - /* read identifier till first identifier char or ws */ + // read identifier till first identifier char or ws pstring tokstr = ""; while ((m_identifier_chars.find(c) == pstring::npos) && (m_whitespace.find(c) == pstring::npos)) { tokstr += c; - /* expensive, check for single char tokens */ + // expensive, check for single char tokens if (tokstr.length() == 1) { auto id = m_tokens.find(tokstr); |