From 51f09f4faa7cd4b6a0576758881d322e31e896ba Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Sun, 8 Feb 2015 18:49:02 +0100 Subject: Ported PlainFormatStreamReader to DynamicTokenizer --- src/plugins/plain/PlainFormatStreamReader.hpp | 34 ++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'src/plugins/plain/PlainFormatStreamReader.hpp') diff --git a/src/plugins/plain/PlainFormatStreamReader.hpp b/src/plugins/plain/PlainFormatStreamReader.hpp index 1a136cd..b2ea378 100644 --- a/src/plugins/plain/PlainFormatStreamReader.hpp +++ b/src/plugins/plain/PlainFormatStreamReader.hpp @@ -31,6 +31,8 @@ #include +#include "DynamicTokenizer.hpp" + namespace ousia { // Forward declarations @@ -122,6 +124,11 @@ private: */ Logger &logger; + /** + * Tokenizer instance used to read individual tokens from the text. + */ + DynamicTokenizer tokenizer; + /** * Variant containing the current command name (always is a string variant, * but additionally contains the correct locatino of the name). @@ -140,6 +147,31 @@ private: */ Variant data; + /** + * Id of the backslash token. + */ + TokenTypeId tokenBackslash; + + /** + * Id of the linebreak token. + */ + TokenTypeId tokenLinebreak; + + /** + * Id of the line comment token. + */ + TokenTypeId tokenLineComment; + + /** + * Id of the block comment start token. + */ + TokenTypeId tokenBlockCommentStart; + + /** + * If of the block comment end token. + */ + TokenTypeId tokenBlockCommentEnd; + /** * Contains the field index of the current command. */ @@ -153,7 +185,7 @@ private: /** * Function used internally to parse a generic comment. */ - void parseComment(); + void parseLineComment(); public: /** -- cgit v1.2.3