-
Notifications
You must be signed in to change notification settings - Fork 1
/
NonTerminals.def
101 lines (87 loc) · 2.13 KB
/
NonTerminals.def
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
100
101
(*!m2r10*) (* Copyright (c) 2015 B.Kowarsch. All rights reserved. *)
DEFINITION MODULE NonTerminals;
(* FIRST/FOLLOW set database for Modula-2 R10 Bootstrap Compiler *)
IMPORT M2Token, M2TokenSet;
(* Productions *)
TYPE NonTerminals =
( CompilationUnit,
ProgramModule,
DefintionModule,
Blueprint,
IdentList,
ModuleTypeSpec,
PropertySpec,
LiteralSpec,
ProtoLiteral,
StructuredProtoLiteral,
ReqValueCount,
Requirement,
ConstRequirement,
SimpleConstRequirement,
ProcedureRequirement,
EntityToBindTo,
LibGenDirective,
ImportDirective,
IdentifiersToImport,
Block,
StatementSequence,
Definition,
ConstDefinition,
VariableDeclaration,
Declaration,
Type,
DerivedSubType,
Range,
EnumType,
SetType,
ArrayType,
RecordType,
PointerType,
CoroutineType,
ProcedureType,
FormalType,
SimpleFormalType,
AttributedFormalType,
VariadicFormalType,
SimpleVariadicFormalType,
NonVariadicFormalType,
ProcedureHeader,
ProcedureSignature,
FormalParameters,
AttributedFormalParams,
VariadicFormalParams,
NonVariadicFormalParams,
Qualident,
Statement,
MemMgtOperation,
UpdateOrProcCall,
IfStatement,
CaseStatement,
Case,
LoopStatement,
WhileStatement,
RepeatStatement,
ForStatement,
Designator,
DesignatorTail,
ExprListOrSlice,
Expression,
SimpleExpression,
Term,
FactorOrNegation,
FactorOrTypeConv,
Factor,
ActualParameters,
ExpressionList,
StructuredValue,
ValueComponent );
(* Operations *)
PROCEDURE FIRST ( p : NonTerminals ) : M2TokenSet;
(* Returns a reference to the FIRST set of production p. *)
PROCEDURE inFIRST ( p : NonTerminals; token : M2Token ) : BOOLEAN;
(* Returns TRUE if token is an element of FIRST(p), otherwise FALSE. *)
PROCEDURE FOLLOW ( p : NonTerminals ) : M2TokenSet;
(* Returns a reference to the FOLLOW set of production p. *)
PROCEDURE inFOLLOW ( p : NonTerminals; token : M2Token ) : BOOLEAN;
(* Returns TRUE if token is an element of FOLLOW(p), otherwise FALSE. *)
END NonTerminals.