diff options
author | 2016-07-21 11:05:55 +0200 | |
---|---|---|
committer | 2016-07-21 11:05:55 +0200 | |
commit | 1e40d95e8b47d834d1ede706921dc19850aaaff2 (patch) | |
tree | f2e74d4451a527313fdc52f49b10955153f1dbd5 /src/lib/netlist/nl_parser.cpp | |
parent | 7a69d48edd6e1f59c92271eb7fa217eaf0a714c7 (diff) |
Netlist updates:
- Removed trampolines (OUTLOGIC, INPLOGIC and friends).
- Started using doxygen comment and documentation style. Added doxygen
files to documentation folder.
- Refactored code triggered by doxygen output.
- Moved internal and support classes into namespace detail.
- Use an anordered map in parser.
- -Wconversion fixes - All done now.
- Fixed -Wold-style-cast warnings in netlist code.
- Added iterators to pstring.
- Moved two macros, added more RAII and improved exceptions. Fixed some
bugs in parser code.
- Fixed a number of bugs in parser code and exception handling.
[Couriersud]
Diffstat (limited to 'src/lib/netlist/nl_parser.cpp')
-rw-r--r-- | src/lib/netlist/nl_parser.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/netlist/nl_parser.cpp b/src/lib/netlist/nl_parser.cpp index c0b0b56bdf1..6760873a4af 100644 --- a/src/lib/netlist/nl_parser.cpp +++ b/src/lib/netlist/nl_parser.cpp @@ -152,9 +152,9 @@ void parser_t::net_truthtable_start() { pstring name = get_identifier(); require_token(m_tok_comma); - unsigned ni = get_number_long(); + long ni = get_number_long(); require_token(m_tok_comma); - unsigned no = get_number_long(); + long no = get_number_long(); require_token(m_tok_comma); pstring def_param = get_string(); require_token(m_tok_param_right); @@ -162,8 +162,8 @@ void parser_t::net_truthtable_start() netlist::tt_desc desc; desc.classname = name; desc.name = name; - desc.ni = ni; - desc.no = no; + desc.ni = static_cast<unsigned long>(ni); + desc.no = static_cast<unsigned long>(no); desc.def_param = "+" + def_param; desc.family = ""; @@ -317,8 +317,8 @@ void parser_t::dippins() } if ((pins.size() % 2) == 1) error("You must pass an equal number of pins to DIPPINS"); - unsigned n = pins.size(); - for (unsigned i = 0; i < n / 2; i++) + std::size_t n = pins.size(); + for (std::size_t i = 0; i < n / 2; i++) { m_setup.register_alias(plib::pfmt("{1}")(i+1), pins[i*2]); m_setup.register_alias(plib::pfmt("{1}")(n-i), pins[i*2 + 1]); |