summaryrefslogtreecommitdiff
path: root/src/plugins/plain/PlainFormatStreamReader.hpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-08 18:49:02 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-08 18:49:02 +0100
commit51f09f4faa7cd4b6a0576758881d322e31e896ba (patch)
tree74660d05494ed41a788fcb5d6c7efd8a5407d57c /src/plugins/plain/PlainFormatStreamReader.hpp
parentf066b4887f6f2896fe602f14ede9c02a9f5a7e1a (diff)
Ported PlainFormatStreamReader to DynamicTokenizer
Diffstat (limited to 'src/plugins/plain/PlainFormatStreamReader.hpp')
-rw-r--r--src/plugins/plain/PlainFormatStreamReader.hpp34
1 files changed, 33 insertions, 1 deletions
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 <core/common/Variant.hpp>
+#include "DynamicTokenizer.hpp"
+
namespace ousia {
// Forward declarations
@@ -123,6 +125,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).
*/
@@ -141,6 +148,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.
*/
size_t fieldIdx;
@@ -153,7 +185,7 @@ private:
/**
* Function used internally to parse a generic comment.
*/
- void parseComment();
+ void parseLineComment();
public:
/**