OpenWalnut
1.4.0
|
namespace WStructuredTextParser { /** The grammar describing the structured format. More...
#include <WStructuredTextParser.h>
Public Member Functions | |
Grammar (std::ostream &error) | |
Constructor and grammar description. More... | |
Public Attributes | |
qi::rule< Iterator, ObjectType(), ascii::space_type > | object |
Rule for objects. More... | |
qi::rule< Iterator, FileType(), ascii::space_type > | file |
Rule for files. More... | |
qi::rule< Iterator, CommentType(), ascii::space_type > | comment |
Rule for comments. More... | |
qi::rule< Iterator, KeyValueType(), ascii::space_type > | kvpair |
Key-value pair rule. More... | |
qi::rule< Iterator, KeyType() > | key |
Key rule. More... | |
qi::rule< Iterator, ValueType() > | value |
Value rule. More... | |
namespace WStructuredTextParser { /** The grammar describing the structured format.
It uses the boost::spirit features to parse the input. There are several rules to comply to successfully parse a file:
For more details please see the test fixture file in core/common/test/fixtures/WStrutcuredTextParser_test.txt.
Iterator | the iterator, used to get the input stream |
Definition at line 179 of file WStructuredTextParser.h.
Constructor and grammar description.
It contains the EBNF (Extended Backus Naur Form) of the format we can parse.
error | Will contain error message if any occurs during functions execution |
Definition at line 186 of file WStructuredTextParser.h.
References Grammar< Iterator >::comment, Grammar< Iterator >::file, Grammar< Iterator >::key, Grammar< Iterator >::kvpair, Grammar< Iterator >::object, and Grammar< Iterator >::value.
qi::rule< Iterator, CommentType(), ascii::space_type > Grammar< Iterator >::comment |
Rule for comments.
Ignored.
Definition at line 235 of file WStructuredTextParser.h.
Referenced by Grammar< Iterator >::Grammar().
qi::rule< Iterator, FileType(), ascii::space_type > Grammar< Iterator >::file |
Rule for files.
Basically the same as an object but without name
Definition at line 230 of file WStructuredTextParser.h.
Referenced by Grammar< Iterator >::Grammar().
qi::rule< Iterator, KeyType() > Grammar< Iterator >::key |
Key rule.
See constructor for exact definition.
Definition at line 245 of file WStructuredTextParser.h.
Referenced by Grammar< Iterator >::Grammar().
qi::rule< Iterator, KeyValueType(), ascii::space_type > Grammar< Iterator >::kvpair |
Key-value pair rule.
See constructor for exact definition.
Definition at line 240 of file WStructuredTextParser.h.
Referenced by Grammar< Iterator >::Grammar().
qi::rule< Iterator, ObjectType(), ascii::space_type > Grammar< Iterator >::object |
Rule for objects.
Attribute is ObjectType and is the start rule of the grammar. See constructor for exact definition.
Definition at line 225 of file WStructuredTextParser.h.
Referenced by Grammar< Iterator >::Grammar().
Value rule.
See constructor for exact definition.
Definition at line 250 of file WStructuredTextParser.h.
Referenced by Grammar< Iterator >::Grammar().