summaryrefslogtreecommitdiff
path: root/src/importer.hpp
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2019-11-08 19:49:40 +0300
committerAleksey Veresov <aleksey@veresov.pro>2019-11-08 19:56:11 +0300
commit3047ed6100a56a529f26e43ada0a3fc3c3815c3e (patch)
tree9648d5a74bae9cbd90670a8bfa0af47189e4536f /src/importer.hpp
parentc6419eed96f2832b1de2b94d711552efaa9b172d (diff)
downloadtexo-3047ed6100a56a529f26e43ada0a3fc3c3815c3e.tar
texo-3047ed6100a56a529f26e43ada0a3fc3c3815c3e.tar.xz
texo-3047ed6100a56a529f26e43ada0a3fc3c3815c3e.zip
[texo] Full rewrite of inner representation.
Diffstat (limited to 'src/importer.hpp')
-rw-r--r--src/importer.hpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/importer.hpp b/src/importer.hpp
index 3a31fab..9280a34 100644
--- a/src/importer.hpp
+++ b/src/importer.hpp
@@ -5,18 +5,34 @@
#include <stdio.h>
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Texo Importer
+ * Texo interface for parsers from input characters into inner representation,
+ * described by Texo Producer.
+ */
class TexoImporter {
public:
TexoImporter(TexoProducer &producer);
+ ~TexoImporter();
- virtual void End();
- virtual void Put(char c) = 0;
- virtual void Put(const ScriptVariable &str);
- virtual void Put(FILE *file);
+ bool End();
+ bool Put(char c);
+ bool Put(const ScriptVariable &s);
+ bool Put(FILE *f);
+
protected:
+ virtual bool TrueEnd();
+
+
+ virtual bool TruePut(char c) = 0;
+ virtual bool TruePut(const ScriptVariable &str);
+ virtual bool TruePut(FILE *file);
+
+
TexoProducer &producer;
+ bool ok;
};