diff options
author | 2020-08-05 21:43:54 +0200 | |
---|---|---|
committer | 2020-08-06 09:44:59 +0200 | |
commit | d524688df1535b2825773cbdf430bf5377aff189 (patch) | |
tree | e7494fd21962fc50ee27e296c9d9f3104301b278 /src/lib/netlist/core/setup.h | |
parent | bca7016758229428934398a13406847604d77152 (diff) |
netlist: Refactored pokenizer.
* Separated tokenizing and reading of tokens.
* This enables caching of parsing results on the token level.
* Implemented caching of token stream.
* Overall this significantly improves parsing performance (~10x)
* Next step towards a bare-bone nltool which does not depend on macro
devices.
Diffstat (limited to 'src/lib/netlist/core/setup.h')
-rw-r--r-- | src/lib/netlist/core/setup.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/netlist/core/setup.h b/src/lib/netlist/core/setup.h index 0f1f12b0e29..5048c2ae765 100644 --- a/src/lib/netlist/core/setup.h +++ b/src/lib/netlist/core/setup.h @@ -283,6 +283,22 @@ namespace netlist pstring m_filename; }; + class source_pattern_t : public source_netlist_t + { + public: + + explicit source_pattern_t(const pstring &pat) + : m_pattern(pat) + { + } + + protected: + stream_ptr stream(const pstring &name) override; + + private: + pstring m_pattern; + }; + class source_mem_t : public source_netlist_t { public: |