summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/nl_parser.h
diff options
context:
space:
mode:
author andreasnaive <andreasnaive@gmail.com>2019-03-25 22:44:58 +0100
committer andreasnaive <andreasnaive@gmail.com>2019-03-25 22:44:58 +0100
commitc24473ddff715ecec2e258a6eb38960cf8c8e98e (patch)
tree8ea44b6396a6129913c0aac13859b5de9965e972 /src/lib/netlist/nl_parser.h
parent009cba4fb8102102168ef32870892438327f3705 (diff)
parent598cd5227223c3b04ca31f0dbc1981256d9ea3ff (diff)
conflict resolution (nw)
Diffstat (limited to 'src/lib/netlist/nl_parser.h')
-rw-r--r--src/lib/netlist/nl_parser.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/lib/netlist/nl_parser.h b/src/lib/netlist/nl_parser.h
index a813629faa0..92459c4b87b 100644
--- a/src/lib/netlist/nl_parser.h
+++ b/src/lib/netlist/nl_parser.h
@@ -16,8 +16,12 @@ namespace netlist
class parser_t : public plib::ptokenizer
{
public:
- parser_t(plib::putf8_reader &strm, setup_t &setup)
- : plib::ptokenizer(strm), m_setup(setup) {}
+ template <typename T>
+ parser_t(T &&strm, nlparse_t &setup)
+ : plib::ptokenizer(std::forward<T>(strm))
+ , m_setup(setup)
+ {
+ }
bool parse(const pstring &nlname = "");
@@ -39,12 +43,12 @@ namespace netlist
void net_truthtable_start(const pstring &nlname);
/* for debugging messages */
- netlist_t &netlist() { return m_setup.netlist(); }
+ //netlist_state_t &netlist() { return m_setup.netlist(); }
- virtual void verror(const pstring &msg, int line_num, const pstring &line) override;
+ void verror(const pstring &msg, int line_num, const pstring &line) override;
private:
- nl_double eval_param(const token_t tok);
+ nl_double eval_param(const token_t &tok);
token_id_t m_tok_param_left;
token_id_t m_tok_param_right;
@@ -68,9 +72,9 @@ namespace netlist
token_id_t m_tok_TT_LINE;
token_id_t m_tok_TT_FAMILY;
- setup_t &m_setup;
+ nlparse_t &m_setup;
};
-}
+} // namespace netlist
#endif /* NL_PARSER_H_ */