rocs/RocsCore
DotGrammar.cpp
Go to the documentation of this file.
101 // The parser is implemented to fulfull exactly the DOT file specification. For details on the DOT
102 // file format see /usr/share/doc/graphviz/html/info/lang.html or the graphviz website. The used
125 // * any string of alphabetic ([a-zA-Z'200-'377]) characters, underscores ('_') or digits ([0-9]), not beginning with a digit;
165 >> (distinct::keyword["graph"][&undirectedDataStructure] | distinct::keyword["digraph"][&directedDataStructure])
180 attr_stmt = ( (distinct::keyword["graph"][phx::ref(phelper->attributed)="graph"] >> attr_list[&applyAttributeList])[&setDataStructureAttributes]
181 | (distinct::keyword["node"][phx::ref(phelper->attributed)="node"] >> attr_list[&applyAttributeList])
182 | (distinct::keyword["edge"][phx::ref(phelper->attributed)="edge"] >> attr_list[&applyAttributeList])
191 (node_id[&edgebound] | subgraph) >> edgeRHS >> -(attr_list[phx::ref(phelper->attributed)="edge"])
198 )[phx::ref(phelper->attributed)="node"][&createAttributeList][&applyAttributeList][&setDataAttributes][&removeAttributeList];
428 if (((phelper->gd->pointerType(0)->direction() == PointerType::Unidirectional) && (str.compare("->") == 0)) ||
429 ((phelper->gd->pointerType(0)->direction() == PointerType::Bidirectional) && (str.compare("--") == 0)))
void dataStructureId(const std::string &str)
Definition: DotGrammar.cpp:280
bool parseIntegers(const std::string &str, std::vector< int > &v)
Definition: DotGrammar.cpp:461
void applyAttributedList()
Generates a new attribute list from all unprocessed attributes and set the corresponding attribute li...
Definition: DotGraphParsingHelper.cpp:93
traits::distinct_spec< Tail >::type distinct_spec(Tail const &tail)
Definition: DotGrammar.cpp:75
Definition: GraphStructure.h:29
Definition: PointerType.h:48
AttributesMap pointerAttributes
Definition: DotGraphParsingHelper.h:81
bool contains(const Key &key) const
traits::char_spec< String >::type char_spec(String const &str)
Definition: DotGrammar.cpp:84
AttributesMap unprocessedAttributes
Definition: DotGraphParsingHelper.h:78
void insertAttributeIntoAttributeList()
Definition: DotGrammar.cpp:340
void setDataStructureAttributes()
Definition: DotGrammar.cpp:398
boost::shared_ptr< Rocs::GraphStructure > dataStructure
Definition: DotGraphParsingHelper.h:88
Definition: PointerType.h:47
void clear()
std::string attributed
Definition: DotGraphParsingHelper.h:76
QString fromStdString(const std::string &str)
QList< AttributesMap > dataStructureAttributeStack
Definition: DotGraphParsingHelper.h:82
DataStructurePtr addDataStructure(const QString &name=QString())
Add data structure to graph document with name name.
Definition: Document.cpp:333
traits::char_spec< std::string >::type charset_tag_type
Definition: DotGrammar.cpp:91
traits::distinct_spec< charset_tag_type >::type keyword_tag_type
Definition: DotGrammar.cpp:92
void setSubDataStructureId(QString identifier)
Definition: DotGraphParsingHelper.cpp:152
void checkEdgeOperator(const std::string &str)
Definition: DotGrammar.cpp:422
void leaveSubDataStructure()
Leaves current group, i.e., leave current sub data structure and switches focus to ancestor group or ...
Definition: DotGraphParsingHelper.cpp:163
QList< AttributesMap > pointerAttributeStack
Definition: DotGraphParsingHelper.h:84
Definition: Document.h:41
void setDataStructureAttributes()
Definition: DotGraphParsingHelper.cpp:68
QList< AttributesMap > dataAttributeStack
Definition: DotGraphParsingHelper.h:83
std::string const keyword_spec("0-9a-zA-Z_")
typedef BOOST_TYPEOF(SKIPPER) skipper_type
AttributesMap dataAttributes
Definition: DotGraphParsingHelper.h:80
void createData(QString identifier)
Creates new data element and registers the identifier in data map.
Definition: DotGraphParsingHelper.cpp:127
QMap< QString, DataPtr > dataMap
Definition: DotGraphParsingHelper.h:95
iterator insert(const Key &key, const T &value)
bool parse(const std::string &str, Document *graphDoc)
Parse the given string str that represents the textual respresentation of a graph in DOT/Graphviz for...
Definition: DotGrammar.cpp:474
void subDataStructureId(const std::string &str)
Definition: DotGrammar.cpp:308
void addEdgeBound(QString bound)
Definition: DotGraphParsingHelper.h:69
void setDataAttributes()
Definition: DotGraphParsingHelper.cpp:77
AttributesMap dataStructureAttributes
Definition: DotGraphParsingHelper.h:79
void createSubDataStructure()
Creates new sub data structure and enters it.
Definition: DotGraphParsingHelper.cpp:145
void createPointers()
Definition: DotGraphParsingHelper.cpp:172
QString attributeId
Definition: DotGraphParsingHelper.h:74
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.