File tree 9 files changed +32
-2
lines changed
9 files changed +32
-2
lines changed Original file line number Diff line number Diff line change
1
+ // / @file
2
+ // / @brief Dump syntax trees as GraphML
1
3
#ifndef DUMP_HH
2
4
#define DUMP_HH
3
5
Original file line number Diff line number Diff line change
1
+ // / @file
2
+ // / @brief grammar: Value expression productions
3
+
1
4
#ifndef EXPR_HH
2
5
#define EXPR_HH
3
6
Original file line number Diff line number Diff line change
1
+ // / @file
2
+ // / @brief grammar: Top-level and unsorted grammar productions
3
+
1
4
#ifndef GRAMMAR_HH
2
5
#define GRAMMAR_HH
3
6
Original file line number Diff line number Diff line change 1
- /* Provide feedback to the grammar about failed queries to weed out
2
- unsupported productions. */
1
+ // / @file
2
+ // / @brief feedback to the grammar about failed productions
3
+
3
4
4
5
#ifndef IMPEDANCE_HH
5
6
#define IMPEDANCE_HH
Original file line number Diff line number Diff line change
1
+ // / @file
2
+ // / @brief logging
3
+
1
4
#ifndef LOG_HH
2
5
#define LOG_HH
3
6
7
10
8
11
#include " prod.hh"
9
12
13
+ // / logger base class
10
14
struct logger {
11
15
virtual void generated (prod &query) { }
12
16
virtual void executed (prod &query) { }
13
17
virtual void error (prod &query, const pqxx::failure &e) { }
14
18
};
15
19
20
+ // / logger for statistics collection
16
21
struct stats_collecting_logger : logger {
17
22
long queries = 0 ;
18
23
float sum_nodes = 0 ;
@@ -21,6 +26,7 @@ struct stats_collecting_logger : logger {
21
26
virtual void generated (prod &query);
22
27
};
23
28
29
+ // / stderr logger
24
30
struct cerr_logger : stats_collecting_logger {
25
31
const int columns = 80 ;
26
32
std::map<std::string, long > errors;
@@ -31,6 +37,7 @@ struct cerr_logger : stats_collecting_logger {
31
37
void report (prod &p);
32
38
};
33
39
40
+ // / logger to postgres database
34
41
struct pqxx_logger : stats_collecting_logger {
35
42
long id;
36
43
std::shared_ptr<pqxx::connection> c;
Original file line number Diff line number Diff line change
1
+ // / @file
2
+ // / @brief Base class for grammar productions
3
+
1
4
#include < string>
2
5
#include < iostream>
3
6
4
7
#ifndef PROD_HH
5
8
#define PROD_HH
6
9
10
+ // / Base class for walking the AST
7
11
struct prod_visitor {
8
12
virtual void visit (struct prod *p) = 0;
9
13
virtual ~prod_visitor () { }
10
14
};
11
15
16
+ // / Base class for AST nodes
12
17
struct prod {
13
18
struct prod *pprod;
14
19
struct scope *scope;
Original file line number Diff line number Diff line change
1
+ // / @file
2
+ // / @brief randomness
3
+
1
4
#ifndef RANDOM_HH
2
5
#define RANDOM_HH
3
6
Original file line number Diff line number Diff line change
1
+ // / @file
2
+ // / @brief supporting classes for the grammar
3
+
1
4
#ifndef RELMODEL_HH
2
5
#define RELMODEL_HH
3
6
#include < string>
Original file line number Diff line number Diff line change
1
+ // / @file
2
+ // / @brief schema information for grammar
3
+
1
4
#ifndef SCHEMA_HH
2
5
#define SCHEMA_HH
3
6
You can’t perform that action at this time.
0 commit comments