Skip to content
Snippets Groups Projects
Commit ee8ffaea authored by ilor's avatar ilor
Browse files

flags in xmlreader

parent ad825b13
No related merge requests found
...@@ -43,6 +43,14 @@ public: ...@@ -43,6 +43,14 @@ public:
disamb_sh_ = v; disamb_sh_ = v;
} }
void set_warn_on_inconsistent(bool v) {
warn_on_inconsistent_ = v;
}
void set_warn_on_unexpected(bool v) {
warn_on_unexpected_ = v;
}
protected: protected:
std::string get_type_from_attributes(const AttributeList& attributes) const; std::string get_type_from_attributes(const AttributeList& attributes) const;
...@@ -81,10 +89,13 @@ protected: ...@@ -81,10 +89,13 @@ protected:
static const int STATE_LEMMA = 6; static const int STATE_LEMMA = 6;
static const int STATE_TAG = 7; static const int STATE_TAG = 7;
/// The state of the parser
int state_; int state_;
/// Flag signyfying there was a sentence outside of a chunk
bool chunkless_; bool chunkless_;
/// Flag signyfying there was a token outside of a sentence/chunk
bool out_of_chunk_; bool out_of_chunk_;
/// Whitespace for the next token /// Whitespace for the next token
...@@ -111,10 +122,13 @@ protected: ...@@ -111,10 +122,13 @@ protected:
/// Read Pantera-like disamb_sh diamb tag markings /// Read Pantera-like disamb_sh diamb tag markings
bool disamb_sh_; bool disamb_sh_;
/// Flag to control warning messages on state errors
bool warn_on_inconsistent_; bool warn_on_inconsistent_;
/// Floag to control warning messages on unknown tags
bool warn_on_unexpected_; bool warn_on_unexpected_;
/// Tag name for sentence objects, customized in child class ctors
std::string sentence_tag_name_; std::string sentence_tag_name_;
}; };
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment