diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2019-11-08 19:49:40 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2019-11-08 19:49:40 +0300 |
commit | ed7a63015c1583d5544ac18bbaccaedc95f3e5e3 (patch) | |
tree | 9648d5a74bae9cbd90670a8bfa0af47189e4536f /src/importer.hpp | |
parent | c6419eed96f2832b1de2b94d711552efaa9b172d (diff) | |
download | texo-ed7a63015c1583d5544ac18bbaccaedc95f3e5e3.tar texo-ed7a63015c1583d5544ac18bbaccaedc95f3e5e3.tar.xz texo-ed7a63015c1583d5544ac18bbaccaedc95f3e5e3.zip |
[texo] Full rewrite of inner representation.
Diffstat (limited to 'src/importer.hpp')
-rw-r--r-- | src/importer.hpp | 24 |
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; }; |