summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/nl_parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/nl_parser.h')
-rw-r--r--src/lib/netlist/nl_parser.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/lib/netlist/nl_parser.h b/src/lib/netlist/nl_parser.h
index 077f1b10792..cbc757307d5 100644
--- a/src/lib/netlist/nl_parser.h
+++ b/src/lib/netlist/nl_parser.h
@@ -9,6 +9,7 @@
#define NL_PARSER_H_
#include "nltypes.h" // for setup_t
+#include "core/setup.h"
#include "plib/ptokenizer.h"
#include <unordered_map>
@@ -89,7 +90,27 @@ namespace netlist
std::unordered_map<pstring, token_store> m_local;
token_store *m_cur_local;
-};
+ };
+
+ class source_token_t : public source_netlist_t
+ {
+ public:
+ source_token_t(const pstring &name, const parser_t::token_store &store)
+ : m_store(store)
+ , m_name(name)
+ {
+ }
+
+ bool parse(nlparse_t &setup, const pstring &name) override;
+
+ protected:
+ plib::istream_uptr stream(const pstring &name) override;
+
+ private:
+ parser_t::token_store m_store;
+ pstring m_name;
+ };
+
} // namespace netlist