summaryrefslogtreecommitdiff
path: root/src/formats/osml/OsmlStreamParser.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/formats/osml/OsmlStreamParser.hpp')
-rw-r--r--src/formats/osml/OsmlStreamParser.hpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/formats/osml/OsmlStreamParser.hpp b/src/formats/osml/OsmlStreamParser.hpp
index 10d5296..b7e64f7 100644
--- a/src/formats/osml/OsmlStreamParser.hpp
+++ b/src/formats/osml/OsmlStreamParser.hpp
@@ -32,6 +32,8 @@
#include <cstdint>
#include <memory>
+#include <core/parser/stack/Callbacks.hpp>
+
namespace ousia {
// Forward declarations
@@ -50,10 +52,10 @@ class Variant;
* syntactically valid and tries to recorver from most errors. If an error is
* irrecoverable (this is the case for errors with wrong nesting of commands or
* fields, as this would lead to too many consecutive errors) a
- * LoggableException is thrown. The OsmlStreamParser can be compared to a SAX
- * parser for XML.
+ * LoggableException is thrown. In short, the OsmlStreamParser can be described
+ * as a SAX parser for OSML.
*/
-class OsmlStreamParser {
+class OsmlStreamParser: public parser_stack::ParserCallbacks {
public:
/**
* Enum used to indicate which state the OsmlStreamParser class is in
@@ -204,6 +206,9 @@ public:
* "{!" syntax).
*/
bool inDefaultField() const;
+
+ TokenId registerToken(const std::string &token) override;
+ void unregisterToken(TokenId token) override;
};
}