-
Notifications
You must be signed in to change notification settings - Fork 3
/
LnSynTree.cpp
86 lines (84 loc) · 3.42 KB
/
LnSynTree.cpp
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
// This file was automatically generated by EbnfStudio; don't modify it!
#include "LnSynTree.h"
using namespace Ln;
SynTree::SynTree(quint16 r, const Token& t ):d_tok(r){
d_tok.d_lineNr = t.d_lineNr;
d_tok.d_colNr = t.d_colNr;
d_tok.d_sourcePath = t.d_sourcePath;
}
const char* SynTree::rToStr( quint16 r ) {
switch(r) {
case R_AddOperator: return "AddOperator";
case R_ArrayType: return "ArrayType";
case R_BaseType: return "BaseType";
case R_Case: return "Case";
case R_CaseLabelList: return "CaseLabelList";
case R_CaseStatement: return "CaseStatement";
case R_ConstDeclaration: return "ConstDeclaration";
case R_ConstExpression: return "ConstExpression";
case R_DeclarationSequence: return "DeclarationSequence";
case R_DictType: return "DictType";
case R_ElseStatement: return "ElseStatement";
case R_ElsifStatement: return "ElsifStatement";
case R_ExitStatement: return "ExitStatement";
case R_ExpList: return "ExpList";
case R_FPSection: return "FPSection";
case R_FieldList: return "FieldList";
case R_ForStatement: return "ForStatement";
case R_FormalParameters: return "FormalParameters";
case R_FormalType: return "FormalType";
case R_IdentList: return "IdentList";
case R_IfStatement: return "IfStatement";
case R_ImportList: return "ImportList";
case R_LabelRange: return "LabelRange";
case R_LoopStatement: return "LoopStatement";
case R_Luon: return "Luon";
case R_MetaActuals: return "MetaActuals";
case R_MetaParams: return "MetaParams";
case R_MetaSection: return "MetaSection";
case R_MulOperator: return "MulOperator";
case R_NamedType: return "NamedType";
case R_ProcedureBody: return "ProcedureBody";
case R_ProcedureDeclaration: return "ProcedureDeclaration";
case R_ProcedureHeading: return "ProcedureHeading";
case R_ProcedureType: return "ProcedureType";
case R_Receiver: return "Receiver";
case R_RecordType: return "RecordType";
case R_RepeatStatement: return "RepeatStatement";
case R_ReturnStatement: return "ReturnStatement";
case R_ReturnType: return "ReturnType";
case R_SimpleExpression: return "SimpleExpression";
case R_StatementSequence: return "StatementSequence";
case R_TypeDeclaration: return "TypeDeclaration";
case R_VariableDeclaration: return "VariableDeclaration";
case R_WhileStatement: return "WhileStatement";
case R_assignmentOrProcedureCall: return "assignmentOrProcedureCall";
case R_block: return "block";
case R_comment_: return "comment";
case R_component: return "component";
case R_constEnum: return "constEnum";
case R_constructor: return "constructor";
case R_designator: return "designator";
case R_directive_: return "directive";
case R_enumeration: return "enumeration";
case R_expression: return "expression";
case R_factor: return "factor";
case R_hexstringdelim_: return "hexstringdelim";
case R_identdef: return "identdef";
case R_import: return "import";
case R_label: return "label";
case R_length: return "length";
case R_literal: return "literal";
case R_module: return "module";
case R_number: return "number";
case R_procedure: return "procedure";
case R_qualident: return "qualident";
case R_relation: return "relation";
case R_selector: return "selector";
case R_statement: return "statement";
case R_term: return "term";
case R_type: return "type";
case R_variableOrFunctionCall: return "variableOrFunctionCall";
default: if(r<R_First) return tokenTypeName(r); else return "";
}
}