Source file parser_errors.ml
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
let message =
fun s ->
match s with
| 394 ->
"expected one of\n- plain text law in markdown format\n- a catala metadata block started with '```catala-metadata'\n- a catala code block started with '```catala'\n- a catala test block started with '```catala-test-inline' or '```catala-test'\n- a directive, e.g. '> Include: <filename>'\n"
| 389 ->
"expected a newline\n"
| 385 ->
"expected a page specification in the form '@p.<number>', or a newline\n"
| 384 ->
"expected a file name or 'JORFTEXTNNNNNNNNNNNN'\n"
| 383 ->
"expected ':', then a file name or 'JORFTEXTNNNNNNNNNNNN'\n"
| 382 ->
"expected a directive, e.g. 'Include: <filename>'\n"
| 372 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 371 ->
"expected an expression\n"
| 370 ->
"expected 'equals <expression>'\n"
| 305 ->
"expected the definition of another argument in the form '<var> content <type>'\n"
| 304 ->
"expected 'equals <expression>'\n"
| 303 ->
"expected a type\n"
| 302 ->
"expected 'content <type>'\n"
| 369 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 368 ->
"expected an expression\n"
| 367 ->
"expected 'equals <expression>'\n"
| 366 ->
"expected ')', or ',' followed by another argument declaration in the form '<var>\ncontent <type>'\n"
| 365 ->
"expected a variable name, following the form 'depends on (<var> content <type>, ...)'\n"
| 364 ->
"expected a variable name, following the form 'depends on <var> content <type>'\n"
| 363 ->
"expected 'equals <expression>', optionally preceded by 'depends on <var> content\n<type>'\n"
| 362 ->
"expected a type\n"
| 361 ->
"expected 'content <type>'\n"
| 347 ->
"expected a scope name\n"
| 346 ->
"expected the form '<ident> scope <Scope_name>', or a scope variable declaration\n"
| 344 ->
"expected the next declaration for the scope\n"
| 341 ->
"expected the next definition in scope, or a comma followed by another argument declaration (', <ident> content <type>')\n"
| 339 ->
"expected the next definition in scope\n"
| 338 ->
"expected a closing paren, or a comma followed by another argument declaration (', <ident> content <type>')\n"
| 337 ->
"expected the form 'depends on (<ident> content <type> [, <ident> content <type> ...])'\n"
| 336 ->
"expected the form 'depends on <ident> content <type>'\n"
| 335 ->
"expected the next declaration for the scope\n"
| 332 ->
"expected the next declaration for the scope\n"
| 329 ->
"expected either another 'state' definitions for the variable, or the next\ndeclaration for the scope\n"
| 328 ->
"expected a 'state' declaration for the preceding declaration, or the next declaration for the scope\n"
| 327 ->
"expected a closing paren, or a comma followed by another argument specification\n"
| 326 ->
"expected a name and type for the dependency of this definition ('<ident> content <type>')\n"
| 325 ->
"expected a name and type for the dependency of this definition ('<ident> content <type>')\n"
| 324 ->
"expected either 'state' definitions for the variable, or the next declaration\nfor the scope\n"
| 323 ->
"expected a type\n"
| 322 ->
"expected either 'condition', or 'content' followed by the expected variable type\n"
| 321 ->
"expected a variable name\n"
| 318 ->
"expected a variable name, optionally preceded by 'output'\n"
| 266 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 264 ->
"expected 'fulfilled' or 'not fulfilled'\n"
| 263 ->
"expected 'equals' then an expression defining the rule\n"
| 273 ->
"expected 'equals' then an expression defining the rule\n"
| 260 ->
"expected an identifier defining the name of the state\n"
| 274 ->
"expected either 'fulfilled' or 'not fulfilled'\n"
| 245 ->
"expected the next item in the scope, or the start of a new top-level decleration\n"
| 241 ->
"expected either 'fulfilled' or 'not fulfilled'\n"
| 229 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 216 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 212 ->
"expected another field in the form '-- <var>: <expression>', or a closing '}' brace\n"
| 211 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 210 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 209 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 208 ->
"expected an expression, following the form 'or if collection empty then\n<expression>'\n"
| 207 ->
"expected the form 'or if collection empty then <expression>'\n"
| 206 ->
"expected the form 'or if collection empty then <expression>'\n"
| 205 ->
"expected the form 'or if collection empty then <expression>'\n"
| 204 ->
"expected the form 'or if collection empty then <expression>'\n"
| 203 ->
"expected 'or if collection empty then <expression>'\n"
| 202 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 201 ->
"expected an expression, following the form 'or if collection empty then <expression>'\n"
| 200 ->
"expected the form 'or if collection empty then <expression>'\n"
| 199 ->
"expected the form 'or if collection empty then <expression>'\n"
| 198 ->
"expected the form 'or if collection empty then <expression>'\n"
| 197 ->
"expected the form 'or if collection empty then <expression>'\n"
| 196 ->
"expected 'or if collection empty then <expression>'\n"
| 194 ->
"expected a binary operator, or the next case in the form '-- NextCase : <expression>', or a keyword ending the match expression and starting the next item\n"
| 193 ->
"expected an expression\n"
| 192 ->
"expected a colon followed by an expression, as in '-- Case : <expression>'\n"
| 189 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 188 ->
"expected an expression\n"
| 187 ->
"expected ':' followed by an expression\n"
| 184 ->
"expected 'with pattern -- <pattern> : <expression> ...'\n"
| 181 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 180 ->
"expected an expression\n"
| 179 ->
"expected the keyword 'in'\n"
| 177 ->
"expected an expression\n"
| 172 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 171 ->
"expected an expression\n"
| 170 ->
"expected 'else <expression>'\n"
| 169 ->
"expected an expression, followed by 'else <expression>'\n"
| 167 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 166 ->
"expected the form 'we have <expression>'\n"
| 165 ->
"expected 'we have <expression>'\n"
| 164 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 163 ->
"expected an expression, following the form 'such that <expression>'\n"
| 162 ->
"expected the form 'such that <expression>'\n"
| 161 ->
"expected 'such that <expression>'\n"
| 159 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 158 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 157 ->
"expected an expression, following the form 'or if collection empty then <expression>'\n"
| 156 ->
"expected the form 'or if collection empty then <expression>'\n"
| 155 ->
"expected the form 'or if collection empty then <expression>'\n"
| 154 ->
"expected the form 'or if collection empty then <expression>'\n"
| 153 ->
"expected the form 'or if collection empty then <expression>'\n"
| 152 ->
"expected 'or if collection empty then <expression>'\n"
| 151 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 150 ->
"expected an expression, following the form 'or if collection empty then\n<expression>'\n"
| 149 ->
"expected the form 'or if collection empty then <expression>'\n"
| 148 ->
"expected the form 'or if collection empty then <expression>'\n"
| 147 ->
"expected the form 'or if collection empty then <expression>'\n"
| 146 ->
"expected the form 'or if collection empty then <expression>'\n"
| 145 ->
"expected 'or if collection empty then <expression>'\n"
| 144 ->
"expected 'maximum' or 'minimum'\n"
| 143 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 142 ->
"expected the form '<var> among <expression> such that <expression>'\n"
| 141 ->
"expected the form '<var> among <expression> such that <expression>'\n"
| 138 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 137 ->
"expected an expression\n"
| 136 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 135 ->
"expected an expression\n"
| 134 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 133 ->
"expected an expression\n"
| 132 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 131 ->
"expected an expression\n"
| 130 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 129 ->
"expected an expression\n"
| 128 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 127 ->
"expected an expression\n"
| 126 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 125 ->
"expected an expression\n"
| 124 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 123 ->
"expected an expression\n"
| 122 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 121 ->
"expected an expression\n"
| 120 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 119 ->
"expected an expression\n"
| 118 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 117 ->
"expected an expression\n"
| 115 ->
"expected a module path, as in 'Module.Submodule.variable'\n"
| 114 ->
"expected a dot forming a module path, as in 'Module.variable', or a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 113 ->
"expected a structure field or sub-scope variable name\n"
| 112 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 111 ->
"expected an expression\n"
| 110 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 109 ->
"expected an expression\n"
| 108 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 107 ->
"expected an expression defining the condition to apply to the elements of the\ncollection\n"
| 106 ->
"expected the form 'such that <expression>'\n"
| 105 ->
"Expected 'such that <expression>', or a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 104 ->
"expected an expression defining a collection\n"
| 103 ->
"Expected 'in', as in the form '<expression> for <ident> among <expression>'\n"
| 102 ->
"Expected an identifier as in the form '<expression> for <ident> among <expression>'\n"
| 101 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 99 ->
"expected an expression specifying the function argument\n"
| 98 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 97 ->
"expected a collection expression\n"
| 94 ->
"expected an ident, as in the form 'with pattern <Case> of <ident> and <expr>'\n"
| 93 ->
"expected the form 'with pattern <Case> of <ident> and <expr>', or a binary\noperator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 92 ->
"expected a pattern to match against\n"
| 91 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 90 ->
"expected a boolean expression\n"
| 89 ->
"expected 'such that <expression>'\n"
| 88 ->
"expected an expression defining a collection\n"
| 85 ->
"expected an expression defining the enumeration case content\n"
| 80 ->
"expected a 'fldname : expression' binding\n"
| 79 ->
"expected a list of field bindings of the form '-- fld : expression'\n"
| 73 ->
"expected binary operator\n"
| 72 ->
"expected an expression describing the collection to operate on\n"
| 68 ->
"expected an expression describing the collection to operate on\n"
| 56 ->
"expected an expression\n"
| 55 ->
"expected 'equals expression' after 'let'\n"
| 54 ->
"expected 'var equals expression' after 'let'\n"
| 53 ->
"expected a binary operator continuing the expression, or a keyword ending the expression and starting the next item\n"
| 50 ->
"expected an expression defining the collection to operate on\n"
| 49 ->
"expected 'of' then the collection to operate on\n"
| 48 ->
"expected an expression defining the collection to operate on\n"
| 47 ->
"expected 'of' then the collection to operate on\n"
| 46 ->
"expected a numeric expression to apply '-' on\n"
| 43 ->
"expected a boolean expression to apply 'not' on\n"
| 42 ->
"expected an expression, following the form '-- var_name : <expression>'\n"
| 41 ->
"expected a colon, following the form '-- var_name : <expression>'\n"
| 38 ->
"expected a variable name, following the form '-- var_name : <expression>'\n"
| 37 ->
"expected a list of variable-value bindings in the form `-- var_name : <expression>`\n"
| 36 ->
"expected the arguments to the scope call ('{ --var: ... }')\n"
| 35 ->
"expected 'with' then the arguments to the scope call ('{ -- var : ... }'), or a\nbinary operator to be applied on the results of the call\n"
| 34 ->
"expected a scope to be applied\n"
| 33 ->
"expected 'of' then a scope to be applied\n"
| 32 ->
"expected the collection on which to operate the sum\n"
| 31 ->
"expected 'of' then the collection on which to operate\n"
| 22 ->
"expected the structure or enumeration type of the definition under the given module.\n"
| 21 ->
"expected one of\n- a dot specifying the path to the given structure or enumeration ('Path.To.variable')\n- a dependency specification ('depends on ...')\n- the body of the declaration ('equals ...')\n"
| 20 ->
"the 'sum' operator must be followed by the type to be summed.\n"
| 13 ->
"expected an identifier (variable name, structure field or enumeration\nconstructor, possibly with a submodule qualification)\n"
| 12 ->
"expected one of:\n- a dot followed by an identifier ('Path.And.var')\n- or a structure content ('Structname { -- field1: ... }')\n- or enumeration content ('EnumConstr content ...')\n"
| 11 ->
"expected an identifier (variable name, structure field or enumeration\nconstructor, possibly with a submodule qualification)\n"
| 6 ->
"expected some law text or code block\n"
| 5 ->
"expected some law text or code block\n"
| 0 ->
"expected some law text or code block\n"
| 1 ->
"expected some law text or code block\n"
| 391 ->
"expected some declaration or scope use inside this code block\n"
| 7 ->
"expected the name of the scope being used\n"
| 8 ->
"expected a scope use condition or the content of this scope use\n"
| 9 ->
"expected an expression\n"
| 217 ->
"expected the function application operator\n"
| 51 ->
"expected an expression to match with\n"
| 185 ->
"expected a pattern matching case\n"
| 186 ->
"expected the name of the constructor for the enum case in the pattern matching\n"
| 57 ->
"expected a collection element\n"
| 176 ->
"expected a semicolon or a right square bracket after the collection element\n"
| 52 ->
"expected an expression inside the parenthesis\n"
| 182 ->
"unmatched parenthesis that should have been closed by here\n"
| 58 ->
"expected a unit for this literal, or a valid operator to complete the expression\n"
| 64 ->
"expected an expression for the test of the conditional\n"
| 168 ->
"expected the \"then\" keyword as the conditional expression is complete\n"
| 65 ->
"expected the \"all\" keyword to mean the \"for all\" construction of the universal test\n"
| 66 ->
"expected an identifier for the bound variable of the universal test\n"
| 67 ->
"expected the \"in\" keyword for the rest of the universal test\n"
| 70 ->
"expected an identifier that will designate the existential witness for the test\n"
| 71 ->
"expected the \"in\" keyword to continue this existential test\n"
| 10 ->
"expected a payload for the enum case constructor, or the rest of the expression (with an operator ?)\n"
| 219 ->
"expected a scope use item: a rule, definition or assertion\n"
| 269 ->
"expected the name of the variable subject to the rule\n"
| 224 ->
"expected a condition or a consequence for this rule, or the rest of the variable qualified name\n"
| 270 ->
"expected a condition or a consequence for this rule\n"
| 254 ->
"expected the name of the parameter for this dependent variable\n"
| 277 ->
"expected the filled keyword the this rule\n"
| 225 ->
"expected a struct field or a sub-scope context item after the dot\n"
| 220 ->
"expected the name of the label\n"
| 247 ->
"expected a rule or a definition after the label declaration\n"
| 248 ->
"expected the label to which the exception is referring back\n"
| 279 ->
"expected a rule or a definition after the exception declaration\n"
| 252 ->
"expected the name of the variable you want to define\n"
| 253 ->
"expected the defined as keyword to introduce the definition of this variable\n"
| 256 ->
"expected an expression for defining this function, introduced by the defined as keyword ; or a comma followed by another argument\n"
| 265 ->
"expected an expression for the definition\n"
| 222 ->
"expected an expression that shoud be asserted during execution\n"
| 223 ->
"expecting the name of the varying variable\n"
| 228 ->
"the variable varies with an expression that was expected here\n"
| 227 ->
"expected an indication about what this variable varies with\n"
| 234 ->
"expected an expression for this condition\n"
| 235 ->
"expected a consequence for this definition under condition\n"
| 237 ->
"expected the name of the variable that should be fixed\n"
| 238 ->
"expected the legislative text by which the value of the variable is fixed\n"
| 239 ->
"expected the legislative text by which the value of the variable is fixed\n"
| 242 ->
"expected a new scope use item\n"
| 284 ->
"expected the kind of the declaration (struct, scope or enum)\n"
| 285 ->
"expected the struct name\n"
| 286 ->
"expected a colon\n"
| 287 ->
"expected struct data or condition\n"
| 288 ->
"expected the name of this struct data\n"
| 289 ->
"expected the type of this struct data, introduced by the content keyword\n"
| 290 ->
"expected the type of this struct data\n"
| 295 ->
"expected the name of this struct condition\n"
| 297 ->
"expected a new struct data, or another declaration or scope use\n"
| 298 ->
"expected the type of the parameter of this struct data function\n"
| 311 ->
"expected the name of the scope you are declaring\n"
| 312 ->
"expected a colon followed by the list of context items of this scope\n"
| 313 ->
"expected a context item introduced by \"context\"\n"
| 350 ->
"expected the name of your enum\n"
| 351 ->
"expected a colon\n"
| 352 ->
"expected an enum case\n"
| 353 ->
"expected the name of an enum case\n"
| 354 ->
"expected a payload for your enum case, or another case or declaration\n"
| 355 ->
"expected a content type\n"
| 359 ->
"expected another enum case, or a new declaration or scope use\n"
| _ ->
raise Not_found