83
83
primitif:
84
84
ENTREESPRIM NL
85
85
entrees = list (variable_and_value)
86
- CONTROLESPRIM NL
86
+ controlesprim NL
87
87
controles_attendus = list (calc_error)
88
- RESULTATSPRIM NL
88
+ resultatsprim NL
89
89
resultats_attendus = list (variable_and_value)
90
90
{ { entrees; controles_attendus; resultats_attendus } }
91
91
92
+ controlesprim:
93
+ | CONTROLESPRIM { ( ) }
94
+ | error { error $ loc " Missing part #CONTROLES-PRIMITIF" }
95
+
96
+ resultatsprim:
97
+ | RESULTATSPRIM { ( ) }
98
+ | error { error $ loc " Missing part #RESULTATS-PRIMITIF" }
99
+
92
100
rappels:
93
101
/* The two constructions match respectively corrective test files and primary test files */
94
- | ENTREESRAPP NL
102
+ | entreesrapp NL
95
103
entrees_rappels = list (rappel)
96
104
CONTROLESRAPP NL
97
105
controles_attendus = list (calc_error)
98
- RESULTATSRAPP NL
106
+ resultatsrapp NL
99
107
resultats_attendus = list (variable_and_value)
100
108
{ Some { entrees_rappels; controles_attendus; resultats_attendus} }
101
109
| ENTREESCORR NL
@@ -107,15 +115,24 @@ rappels:
107
115
DATES ? AVISIR ? AVISCSG ?
108
116
{ ignore (entrees_rappels, controles_attendus, resultats_attendus) ; None }
109
117
118
+ entreesrapp:
119
+ | ENTREESRAPP { ( ) }
120
+ | error { error $ loc " Missing part #ENTREES-RAPPELS" }
121
+
122
+ resultatsrapp:
123
+ | RESULTATSRAPP { ( ) }
124
+ | error { error $ loc " Missing part #RESULTATS-RAPPELS" }
125
+
110
126
variable_and_value:
111
127
| var = SYMBOL SLASH value = value NL { (var, value, mk_position $ sloc) }
112
128
| SYMBOL error { error $ loc " Missing slash in pair variable/value" }
113
129
114
130
calc_error:
115
- error = SYMBOL NL { (error, mk_position $ sloc) }
131
+ | error = SYMBOL NL { (error, mk_position $ sloc) }
132
+ | variable_and_value { error $ loc " Missing a #RESULTATS- header" }
116
133
117
134
rappel:
118
- event_nb = integer SLASH
135
+ | event_nb = integer SLASH
119
136
rappel_nb = integer SLASH
120
137
variable_code = SYMBOL SLASH
121
138
change_value = integer SLASH (* No decimal value was found in existing files *)
@@ -141,6 +158,8 @@ rappel:
141
158
decl_2042_rect;
142
159
pos = mk_position $ sloc }
143
160
}
161
+ | calc_error { error $ loc " Missing #CONTROLES-RAPPELS header" }
162
+ | resultatsrapp { error $ loc " Missing #CONTROLES-RAPPELS header" }
144
163
145
164
integer:
146
165
| i = INTEGER { i }
0 commit comments