package catala

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

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

(* This file was auto-generated based on "parser.messages". *)

(* Please note that the function [message] can raise [Not_found]. *)

let message =
  fun s ->
    match s with
    | 0 ->
        "expected some law text or code block\n"
    | 1 ->
        "expected some law text or code block\n"
    | 371 ->
        "expected some declaration or scope use inside this code block\n"
    | 7 ->
        "expected the name of the scope being used\n"
    | 9 ->
        "expected a scope use condition or the content of this scope use\n"
    | 10 ->
        "expected an expression\n"
    | 11 ->
        "expected the year for this date literal\n"
    | 46 ->
        "expected an enum constructor to test if the expression on the left\n"
    | 168 ->
        "<YOUR SYNTAX ERROR MESSAGE HERE>\n"
    | 86 ->
        "<YOUR SYNTAX ERROR MESSAGE HERE>\n"
    | 91 ->
        "the expression before ended, what follows next should be an operator or the rest of the code structure\n"
    | 88 ->
        "expecting an expression to stand in as the function argument\n"
    | 89 ->
        "unexpected expression following a function application with an enum constructor name\n"
    | 87 ->
        "a enum constructor pattern should be followed by a payload\n"
    | 85 ->
        "the expression before ended, what follows next should be an operator or the rest of the code structure\n"
    | 146 ->
        "expected an expression after the plus or minus operator\n"
    | 98 ->
        "expected an expression for the argument of this function call\n"
    | 158 ->
        "expected an expression on the right side of the comparison operator\n"
    | 156 ->
        "expected an expression on the right side of the multiplication or division operator\n"
    | 159 ->
        "expected an operator to compose the expression on the left\n"
    | 47 ->
        "expected the name of the struct field of the expression before\n"
    | 51 ->
        "expected the rest of the path after a dot\n"
    | 48 ->
        "expected the rest of the path after the dot\n"
    | 228 ->
        "expected a colon after the scope use precondition\n"
    | 15 ->
        "expected the \"for\" keyword to spell the aggregation\n"
    | 83 ->
        "expected an expression to take the opposite of\n"
    | 31 ->
        "expected the type of the elements compared for the minimum\n"
    | 32 ->
        "expected the \"initial\" keyword to introduce the minimum initial expression\n"
    | 33 ->
        "expected the minimum initial expression\n"
    | 35 ->
        "expected the type of the elements compared for the maximum\n"
    | 36 ->
        "expected the \"initial\" keyword to introduce the maximum initial expression\n"
    | 37 ->
        "expected the maximum initial expression\n"
    | 39 ->
        "expected an expression to match with\n"
    | 53 ->
        "expected the \"with pattern\" keyword\n"
    | 54 ->
        "expected a pattern matching case\n"
    | 55 ->
        "expected the name of the constructor for the enum case in the pattern matching\n"
    | 187 ->
        "expected a constructor payload binding or a colon\n"
    | 188 ->
        "expected a correct expression for this match arm\n"
    | 185 ->
        "expected the \"with pattern\" keyword to complete the pattern matching expression\n"
    | 101 ->
        "expected the \"for\" keyword to introduce the identifier for the map predicate\n"
    | 102 ->
        "expected the identifier for the map predicate\n"
    | 103 ->
        "expected the \"in\" keyword to introduce the collection argument to map\n"
    | 104 ->
        "expected the collection argument to map\n"
    | 105 ->
        "expected the \"of\" keyword to introduce the map predicate\n"
    | 106 ->
        "expected an expression for the map predicate\n"
    | 34 ->
        "expected a collection element\n"
    | 222 ->
        "expected a semicolon or a right square bracket after the collection element\n"
    | 38 ->
        "expected an expression inside the parenthesis\n"
    | 216 ->
        "unmatched parenthesis that should have been closed by here\n"
    | 65 ->
        "expected a unit for this literal, or a valid operator to complete the expression\n"
    | 191 ->
        "expected an expression for the test of the conditional\n"
    | 211 ->
        "expected the \"then\" keyword as the conditional expression is complete\n"
    | 192 ->
        "expected the \"all\" keyword to mean the \"for all\" construction of the universal test\n"
    | 197 ->
        "expected an identifier for the bound variable of the universal test\n"
    | 198 ->
        "expected the \"in\" keyword for the rest of the universal test\n"
    | 199 ->
        "expected the expression designating the set on which to perform the universal test\n"
    | 200 ->
        "expected the \"we have\" keyword for this universal test\n"
    | 196 ->
        "expected an expression for the universal test\n"
    | 205 ->
        "expected an identifier that will designate the existential witness for the test\n"
    | 206 ->
        "expected the \"in\" keyword to continue this existential test\n"
    | 207 ->
        "expected an expression that designates the set subject to the existential test\n"
    | 208 ->
        "expected a keyword to form the \"such that\" expression for the existential test\n"
    | 209 ->
        "expected a keyword to complete the \"such that\" construction\n"
    | 203 ->
        "expected an expression for the existential test\n"
    | 60 ->
        "this is the start of an arg-maximum or arg-minimum expression\n"
    | 61 ->
        "expected the type of the elements compared to get the minimum\n"
    | 62 ->
        "expected the \"initial\" keyword introducing the initial expression for the minimum\n"
    | 63 ->
        "expected the initial expression for the minimum\n"
    | 180 ->
        "expected the type of the elements compared to get the maximum\n"
    | 181 ->
        "expected the \"initial\" keyword introducing the initial expression for the maximum\n"
    | 182 ->
        "expected the initial expression for the maximum\n"
    | 73 ->
        "expected a payload for the enum case constructor, or the rest of the expression (with an operator ?)\n"
    | 74 ->
        "expected structure fields introduced by --\n"
    | 75 ->
        "expected the name of the structure field\n"
    | 79 ->
        "expected a colon\n"
    | 80 ->
        "expected the expression for this struct field\n"
    | 76 ->
        "expected another structure field or the closing bracket\n"
    | 92 ->
        "expected the rest of the path after the dot\n"
    | 175 ->
        "expected the rest of the path, or the content of the enum constructor\n"
    | 176 ->
        "expected an expression for the content of this enum case\n"
    | 177 ->
        "the expression for the content of the enum case is already well-formed, expected an operator to form a bigger expression\n"
    | 81 ->
        "expected the keyword following cardinal to compute the number of elements in a set\n"
    | 229 ->
        "expected a scope use item: a rule, definition or assertion\n"
    | 265 ->
        "expected the name of the variable subject to the rule\n"
    | 242 ->
        "expected a condition or a consequence for this rule, or the rest of the variable qualified name\n"
    | 276 ->
        "expected a condition or a consequence for this rule\n"
    | 277 ->
        "expected the name of the parameter for this dependent variable\n"
    | 266 ->
        "expected the expression of the rule\n"
    | 274 ->
        "expected the filled keyword the this rule\n"
    | 243 ->
        "expected a struct field or a sub-scope context item after the dot\n"
    | 230 ->
        "expected the name of the label\n"
    | 260 ->
        "expected a rule or a definition after the label declaration\n"
    | 261 ->
        "expected the label to which the exception is referring back\n"
    | 264 ->
        "expected a rule or a definition after the exception declaration\n"
    | 281 ->
        "expected the name of the variable you want to define\n"
    | 282 ->
        "expected the defined as keyword to introduce the definition of this variable\n"
    | 283 ->
        "expected a expression for defining this function, introduced by the defined as keyword\n"
    | 286 ->
        "expected an expression for the definition\n"
    | 232 ->
        "expected an expression that shoud be asserted during execution\n"
    | 233 ->
        "expecting the name of the varying variable\n"
    | 236 ->
        "the variable varies with an expression that was expected here\n"
    | 237 ->
        "expected an indication about the variation sense of the variable, or a new scope item\n"
    | 235 ->
        "expected an indication about what this variable varies with\n"
    | 245 ->
        "expected an expression for this condition\n"
    | 255 ->
        "expected a consequence for this definition under condition\n"
    | 247 ->
        "expected the name of the variable that should be fixed\n"
    | 248 ->
        "expected the legislative text by which the value of the variable is fixed\n"
    | 249 ->
        "expected the legislative text by which the value of the variable is fixed\n"
    | 258 ->
        "expected a new scope use item\n"
    | 293 ->
        "expected the kind of the declaration (struct, scope or enum)\n"
    | 294 ->
        "expected the struct name\n"
    | 295 ->
        "expected a colon\n"
    | 296 ->
        "expected struct data or condition\n"
    | 297 ->
        "expected the name of this struct data\n"
    | 298 ->
        "expected the type of this struct data, introduced by the content keyword\n"
    | 299 ->
        "expected the type of this struct data\n"
    | 313 ->
        "expected the name of this struct condition\n"
    | 306 ->
        "expected a new struct data, or another declaration or scope use\n"
    | 307 ->
        "expected the type of the parameter of this struct data function\n"
    | 311 ->
        "expected a new struct data, or another declaration or scope use\n"
    | 303 ->
        "expected a new struct data, or another declaration or scope use\n"
    | 316 ->
        "expected the name of the scope you are declaring\n"
    | 317 ->
        "expected a colon followed by the list of context items of this scope\n"
    | 318 ->
        "expected a context item introduced by \"context\"\n"
    | 343 ->
        "expected the name of your enum\n"
    | 344 ->
        "expected a colon\n"
    | 345 ->
        "expected an enum case\n"
    | 346 ->
        "expected the name of an enum case\n"
    | 347 ->
        "expected a payload for your enum case, or another case or declaration\n"
    | 348 ->
        "expected a content type\n"
    | 353 ->
        "expected another enum case, or a new declaration or scope use\n"
    | _ ->
        raise Not_found
OCaml

Innovation. Community. Security.