22 #ifndef TOOLS_SCHEMA_SOURCEPARSER_HPP_INCLUDED
23 #define TOOLS_SCHEMA_SOURCEPARSER_HPP_INCLUDED
148 std::map<std::string,std::string>
types_;
222 #endif // TOOLS_SCHEMA_SOURCEPARSER_HPP_INCLUDED
const std::string & get_parent_end()
Template to check closing of parent block.
void test_regex(std::ostream &f)
Writes to the file regex templates list.
const std::string & get_allow_global()
Template to check allow{global} block.
bool parse_source()
Parses file line-by-line, checking every line to open WIKI block Please, notice that main input work ...
bool check_valid(const std::string &s)
check the input line with a template check if the line is valid (still in block)
const std::string & get_table_key_begin()
Template to check begining of table{config} storing key values.
std::vector< class_tag > current_
Stack of opened tags.
bool check_remove_key(const std::string &s)
Checks removed keys.
bool check_wiki(const std::string &s)
Read tag form the line and add it to stack.
bool getline(std::string &s)
Gets a line from file and returns it.
const std::string & get_tag_begin()
Template to check if line contains opening of tag block.
const std::string & get_table_end()
Template to check if table is closed.
bool check_keys_begin(const std::string &s)
Checks beginning of keys.
const std::string & get_valid()
A few regex templates.
This file contains object "error_container", which are used to store error messages while annotation ...
bool parse_tag()
Parses lines inside tag block.
std::map< std::string, std::string > types_
Allowed types.
bool parse_keys()
Read key table and add keys to tag on the top of the stack.
bool check_tag_begin(const std::string &s)
Checks line for tag annotation.
const std::string & get_tag_end()
Template to check end of tag block.
std::string output_
name of output file to print schema
bool check_parent_begin(const std::string &s)
Opens parrent block.
const std::vector< class_tag > & see_orphans() const
bool save_schema()
Saves tag tree to schema file.
This file contains objects "tag" and "key", which are used to store information about tags and keys w...
void set_input(const std::string &s)
void expand()
Expands all tags.
void expand_all(class_tag &root)
Calls the expansion on each child.
void close_opened_tags(int i)
Сhecks stack of opened tags.
const std::string & get_key_value()
Template to get key value.
int line_
number of current read line.
std::vector< class_tag > orphan_tags_
List of tags without parents.
std::vector< std::string > forbidden_
Types to remove.
bool check_tag_end(const std::string &s)
Puts closed tag to child list of previous tag.
const class_error_container & see_errors() const
Grants access to error container.
std::string parent_name_
Name of current parent.
bool check_allow_type(const std::string &s)
Checks allowed types.
bool check_keys_end(const std::string &s)
Checks end of keys.
bool check_allow_link(const std::string &s)
Checks links.
const std::string & get_allow_link()
Template to check allow{link} block.
bool parse_block()
Parses WIKI block line-by-line, checking every line to open annotation block.
class_tag root_
Root of the schema tree.
Container of errors, which are generated while schema generator tool is parsing source files...
void set_output(const std::string &s)
void add_open_tag_error(int i)
Generates errors for each opened tag.
const std::string & get_wiki()
Template to check line is beginnnig of Wiki block.
const std::string & get_parent_begin()
Template to check begining of parent block.
std::string input_
name of input file to be parsed
bool check_parent_end(const std::string &s)
Closes parent block.
GLsizei const GLcharARB ** string
Stores information about tag.
bool check_remove_type(const std::string &s)
Checks removed types.
class_error_container errors_
used to store errors
bool check_allow_global(const std::string &s)
Checks allowed global tags.