From ed7a63015c1583d5544ac18bbaccaedc95f3e5e3 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Fri, 8 Nov 2019 19:49:40 +0300 Subject: [texo] Full rewrite of inner representation. --- src/importer.hpp | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'src/importer.hpp') 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 +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * 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; }; -- cgit v1.2.3