-
Notifications
You must be signed in to change notification settings - Fork 30
/
ObSynTree.h
99 lines (93 loc) · 1.84 KB
/
ObSynTree.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#ifndef __OB_SYNTREE__
#define __OB_SYNTREE__
// This file was automatically generated by EbnfStudio; don't modify it!
#include <Oberon/ObTokenType.h>
#include <Oberon/ObToken.h>
#include <QList>
namespace Ob {
struct SynTree {
enum ParserRule {
R_First = TT_Max + 1,
R_ActualParameters_,
R_AddOperator,
R_ArrayType,
R_BaseType,
R_Case,
R_CaseLabelList,
R_CaseStatement,
R_ConstDeclaration,
R_DeclarationSequence,
R_DeclarationSequence2,
R_ElseStatement,
R_ElsifStatement,
R_ElsifStatement2,
R_ExitStatement,
R_ExpList,
R_FPSection,
R_FieldList,
R_FieldListSequence,
R_ForStatement,
R_FormalParameters,
R_FormalType,
R_Guard,
R_IdentList,
R_IfStatement,
R_ImportList,
R_LabelRange,
R_LengthList,
R_LoopStatement,
R_MulOperator,
R_NamedType,
R_Oberon,
R_PointerType,
R_ProcedureBody,
R_ProcedureCall_,
R_ProcedureDeclaration,
R_ProcedureHeading,
R_ProcedureType,
R_Receiver,
R_RecordType,
R_RepeatStatement,
R_ReturnStatement,
R_SimpleExpression,
R_StatementSequence,
R_TypeDeclaration,
R_VariableDeclaration,
R_WhileStatement,
R_WithStatement,
R_assignment_,
R_assignmentOrProcedureCall,
R_comment_,
R_definition,
R_designator,
R_directive_,
R_element,
R_expression,
R_factor,
R_hexstringdelim_,
R_identdef,
R_import,
R_label,
R_literal,
R_module,
R_number,
R_obnx_,
R_qualident,
R_relation,
R_selector,
R_set,
R_statement,
R_term,
R_type,
R_variableOrFunctionCall,
R_Last
};
SynTree(quint16 r = Tok_Invalid, const Token& = Token() );
SynTree(const Token& t ):d_tok(t){}
~SynTree() { foreach(SynTree* n, d_children) delete n; }
static const char* rToStr( quint16 r );
Ob::Token d_tok;
QList<SynTree*> d_children;
};
}
#endif // __OB_SYNTREE__