main page
namespaces
classes
files
GGL home
Generated on Wed Apr 29 2015 11:51:40 for GGL-4.1.2 by
doxygen
1.8.3.1
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
src
ggl
Rule_GMLparser.hh
Go to the documentation of this file.
1
#ifndef GGL_RULE_GML_PARSER_HH_
2
#define GGL_RULE_GML_PARSER_HH_
3
4
#include <utility>
5
6
#include "
ggl/Rule.hh
"
7
#include "
ggl/Rule_GML_error.hh
"
8
9
namespace
ggl {
10
11
12
13
/*! @brief Graph grammar rule parser
14
*
15
* Wrapper for ggl::Rule_GML_grammar BNF grammar parser that parses a
16
* GML string representation of a ggl::Rule object. See there for further
17
* details.
18
*
19
* @author Martin Mann (c) 2012 http://www.bioinf.uni-freiburg.de/~mmann/
20
*
21
*/
22
class
Rule_GMLparser
23
{
24
25
public
:
26
27
/*!
28
* Parses a GML string and generates a Rule object
29
*
30
* @param GML_string the string to parse
31
*
32
* @return pair.first = the graph encoding of the molecule
33
* pair.second = -1 if parsing was successful,
34
* in error case it returns the string position that caused
35
* the parsing error
36
*
37
* @throw ggl::Rule_GML_error if parsing error occur
38
*/
39
static
40
std::pair< Rule, int >
41
parseRule
(
const
std::string & GML_string )
throw
(
Rule_GML_error
);
42
43
/*!
44
* Parses a GRAPH GML string that encodes a compacted RULE GML
45
* and generates a Rule object.
46
*
47
* NOTE: rule constraints, its label, or wildcard information are not
48
* parsed, just the nodes and edges!
49
*
50
* @param GML_string the string to parse
51
*
52
* @return pair.first = the graph encoding of the molecule
53
* pair.second = -1 if parsing was successful,
54
* in error case it returns the string position that caused
55
* the parsing error
56
*
57
* @throw ggl::Rule_GML_error if parsing error occur
58
*/
59
static
60
std::pair< Rule, int >
61
parseCompactRule
(
const
std::string & GML_string )
throw
(
Rule_GML_error
);
62
63
};
64
65
66
}
// namespace ggl
67
68
#endif
/*RULE_GML_PARSER_HH_*/