diff options
author | 2016-03-12 14:03:04 +0100 | |
---|---|---|
committer | 2016-03-12 14:03:04 +0100 | |
commit | 0ef696a4cd1e4436851ba01953b515ea9e3e44ad (patch) | |
tree | f72c24918a46f7e63528f831d74a432b392557db /src/lib/netlist/plib/pparser.cpp | |
parent | 0c629d09009873e9c1e3cf120e622bb39118c154 (diff) | |
parent | 616b09924f40a0122bc1763b4c6700a2ca9e4742 (diff) |
Merge pull request #4 from mamedev/master
Update to 0.171
Diffstat (limited to 'src/lib/netlist/plib/pparser.cpp')
-rw-r--r-- | src/lib/netlist/plib/pparser.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/lib/netlist/plib/pparser.cpp b/src/lib/netlist/plib/pparser.cpp index f61a1677ced..4b5d7995658 100644 --- a/src/lib/netlist/plib/pparser.cpp +++ b/src/lib/netlist/plib/pparser.cpp @@ -21,22 +21,22 @@ pstring ptokenizer::currentline_str() void ptokenizer::skipeol() { - pstring::code_t c = getc(); + pstring::code_t c = _getc(); while (c) { if (c == 10) { - c = getc(); + c = _getc(); if (c != 13) - ungetc(); + _ungetc(); return; } - c = getc(); + c = _getc(); } } -pstring::code_t ptokenizer::getc() +pstring::code_t ptokenizer::_getc() { if (m_px >= m_cur_line.len()) { @@ -51,7 +51,7 @@ pstring::code_t ptokenizer::getc() return m_cur_line.code_at(m_px++); } -void ptokenizer::ungetc() +void ptokenizer::_ungetc() { m_px--; } @@ -159,10 +159,10 @@ ptokenizer::token_t ptokenizer::get_token() ptokenizer::token_t ptokenizer::get_token_internal() { /* skip ws */ - pstring::code_t c = getc(); + pstring::code_t c = _getc(); while (m_whitespace.find(c)>=0) { - c = getc(); + c = _getc(); if (eof()) { return token_t(ENDOFFILE); @@ -182,9 +182,9 @@ ptokenizer::token_t ptokenizer::get_token_internal() else if (m_number_chars.find(c)<0) break; tokstr += c; - c = getc(); + c = _getc(); } - ungetc(); + _ungetc(); return token_t(ret, tokstr); } else if (m_identifier_chars.find(c)>=0) @@ -193,9 +193,9 @@ ptokenizer::token_t ptokenizer::get_token_internal() pstring tokstr = ""; while (m_identifier_chars.find(c)>=0) { tokstr += c; - c = getc(); + c = _getc(); } - ungetc(); + _ungetc(); token_id_t id = token_id_t(m_tokens.indexof(tokstr)); if (id.id() >= 0) return token_t(id, tokstr); @@ -207,11 +207,11 @@ ptokenizer::token_t ptokenizer::get_token_internal() else if (c == m_string) { pstring tokstr = ""; - c = getc(); + c = _getc(); while (c != m_string) { tokstr += c; - c = getc(); + c = _getc(); } return token_t(STRING, tokstr); } @@ -228,9 +228,9 @@ ptokenizer::token_t ptokenizer::get_token_internal() if (id.id() >= 0) return token_t(id, tokstr); } - c = getc(); + c = _getc(); } - ungetc(); + _ungetc(); token_id_t id = token_id_t(m_tokens.indexof(tokstr)); if (id.id() >= 0) return token_t(id, tokstr); |