diff options
author | 2020-08-10 21:13:27 +0200 | |
---|---|---|
committer | 2020-08-12 20:17:10 +0200 | |
commit | 167da15753419aceb58cc3dea4abc042f9be0185 (patch) | |
tree | 498b9edd7eb081fd944870ea32ed15c50459f4a0 /src/lib/netlist/nl_parser.h | |
parent | 4985e1e9b97637cc66dbc98cdce327349f18551b (diff) |
netlist: improve parsing performance
* preparational work for easier device addition.
Diffstat (limited to 'src/lib/netlist/nl_parser.h')
-rw-r--r-- | src/lib/netlist/nl_parser.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/netlist/nl_parser.h b/src/lib/netlist/nl_parser.h index c552663af6a..5e00c7c8470 100644 --- a/src/lib/netlist/nl_parser.h +++ b/src/lib/netlist/nl_parser.h @@ -26,7 +26,7 @@ namespace netlist parser_t(nlparse_t &setup); bool parse(plib::psource_t::stream_ptr &&strm, const pstring &nlname); - bool parse(token_store &tokstor, const pstring &nlname); + bool parse(const token_store &tokstor, const pstring &nlname); void parse_tokens(plib::psource_t::stream_ptr &&strm, token_store &tokstor); protected: @@ -44,12 +44,16 @@ namespace netlist void net_submodel(); void net_include(); void net_local_source(); + void net_external_source(); void net_register_dev(); void net_truthtable_start(const pstring &nlname); void verror(const pstring &msg) override; private: + void register_local_as_source(const pstring &name); + pstring stringify_expression(token_t &tok); + token_id_t m_tok_paren_left; token_id_t m_tok_paren_right; token_id_t m_tok_comma; @@ -65,8 +69,10 @@ namespace netlist token_id_t m_tok_NET_REGISTER_DEV; token_id_t m_tok_NETLIST_START; token_id_t m_tok_NETLIST_END; + token_id_t m_tok_NETLIST_EXTERNAL; token_id_t m_tok_SUBMODEL; token_id_t m_tok_INCLUDE; + token_id_t m_tok_EXTERNAL_SOURCE; token_id_t m_tok_LOCAL_SOURCE; token_id_t m_tok_LOCAL_LIB_ENTRY; token_id_t m_tok_TRUTHTABLE_START; |