Removed Menhir warnings!

This commit is contained in:
Denis Merigoux 2020-10-05 23:45:17 +02:00
parent 899679b86c
commit 40a4f901d1
3 changed files with 361 additions and 351 deletions

File diff suppressed because it is too large Load Diff

View File

@ -527,10 +527,15 @@ law_articles_items:
| hd = law_article_item tl = law_articles_items{ hd::tl }
| { [] }
source_file_item:
law_text:
| text = LAW_TEXT { LawStructure (IntermediateText text) }
source_file_article:
| article = law_article items = law_articles_items {
LawStructure (LawArticle (article, items))
}
source_file_item:
| heading = law_heading {
LawStructure (LawHeading (heading, []))
}
@ -538,14 +543,19 @@ source_file_item:
let (code, source_repr) = code in
LawStructure (MetadataBlock (code, source_repr))
}
| text = LAW_TEXT { LawStructure (IntermediateText text) }
source_file:
| i = source_file_item f = source_file {
source_file_after_text:
| i = source_file_article f = source_file_after_text {
i::f
}
| i = source_file_item l = list(law_text) f = source_file_after_text {
i::l@f
}
| EOF { [] }
source_file:
| l = list(law_text) f = source_file_after_text { l@f }
master_file_include:
| includ = LAW_INCLUDE {
match includ with

View File

@ -11,152 +11,152 @@ let message s =
| 5 ->
"expected another inclusion of a Catala file, since this file is a master file which can \
only contain inclusions of other Catala files\n"
| 275 -> "expected some text, another heading or a law article\n"
| 278 -> "expected a code block, a metadata block, more law text or a heading\n"
| 285 -> "expected a code block, a metadata block, more law text or a heading\n"
| 281 -> "expected a declaration or a scope use\n"
| 13 -> "expected the name of the scope you want to use\n"
| 15 -> "expected a scope use precondition or a colon\n"
| 16 -> "expected an expression which will act as the condition\n"
| 17 -> "expected the first component of the date literal\n"
| 19 -> "expected a \"/\"\n"
| 20 -> "expected the second component of the date literal\n"
| 21 -> "expected a \"/\"\n"
| 22 -> "expected the third component of the date literal\n"
| 23 -> "expected a delimiter to finish the date literal\n"
| 45 -> "expected an operator to compose the expression on the left with\n"
| 51 -> "expected an enum constructor to test if the expression on the left\n"
| 50 -> "expected an operator to compose the expression on the left with\n"
| 81 -> "expected an expression on the right side of the sum or minus operator\n"
| 105 -> "expected an expression on the right side of the logical operator\n"
| 53 -> "expected an expression for the argument of this function call\n"
| 77 -> "expected an expression on the right side of the comparison operator\n"
| 86 -> "expected an expression on the right side of the multiplication or division operator\n"
| 83 -> "expected an operator to compose the expression on the left\n"
| 132 -> "expected an expression standing for the set you want to test for membership\n"
| 46 -> "expected an identifier standing for a struct field or a subscope name\n"
| 156 -> "expected a colon after the scope use precondition\n"
| 48 -> "expected a constructor, to get the payload of this enum case\n"
| 89 -> "expected the \"for\" keyword to spell the aggregation\n"
| 90 -> "expected an identifier for the aggregation bound variable\n"
| 91 -> "expected the \"in\" keyword\n"
| 92 ->
| 277 -> "expected some text, another heading or a law article\n"
| 282 -> "expected a code block, a metadata block, more law text or a heading\n"
| 289 -> "expected a code block, a metadata block, more law text or a heading\n"
| 285 -> "expected a declaration or a scope use\n"
| 16 -> "expected the name of the scope you want to use\n"
| 18 -> "expected a scope use precondition or a colon\n"
| 19 -> "expected an expression which will act as the condition\n"
| 20 -> "expected the first component of the date literal\n"
| 22 -> "expected a \"/\"\n"
| 23 -> "expected the second component of the date literal\n"
| 24 -> "expected a \"/\"\n"
| 25 -> "expected the third component of the date literal\n"
| 26 -> "expected a delimiter to finish the date literal\n"
| 48 -> "expected an operator to compose the expression on the left with\n"
| 54 -> "expected an enum constructor to test if the expression on the left\n"
| 53 -> "expected an operator to compose the expression on the left with\n"
| 84 -> "expected an expression on the right side of the sum or minus operator\n"
| 108 -> "expected an expression on the right side of the logical operator\n"
| 56 -> "expected an expression for the argument of this function call\n"
| 80 -> "expected an expression on the right side of the comparison operator\n"
| 89 -> "expected an expression on the right side of the multiplication or division operator\n"
| 86 -> "expected an operator to compose the expression on the left\n"
| 135 -> "expected an expression standing for the set you want to test for membership\n"
| 49 -> "expected an identifier standing for a struct field or a subscope name\n"
| 159 -> "expected a colon after the scope use precondition\n"
| 51 -> "expected a constructor, to get the payload of this enum case\n"
| 92 -> "expected the \"for\" keyword to spell the aggregation\n"
| 93 -> "expected an identifier for the aggregation bound variable\n"
| 94 -> "expected the \"in\" keyword\n"
| 95 ->
"expected an expression standing for the set over which to compute the aggregation operation\n"
| 94 -> "expected the \"for\" keyword and the expression to compute the aggregate\n"
| 95 -> "expected an expression to compute its aggregation over the set\n"
| 99 -> "expected an expression to take the negation of\n"
| 42 -> "expected an expression to take the opposite of\n"
| 31 -> "expected an expression to match with\n"
| 140 -> "expected a pattern matching case\n"
| 141 -> "expected the name of the constructor for the enum case in the pattern matching\n"
| 147 ->
| 97 -> "expected the \"for\" keyword and the expression to compute the aggregate\n"
| 98 -> "expected an expression to compute its aggregation over the set\n"
| 102 -> "expected an expression to take the negation of\n"
| 45 -> "expected an expression to take the opposite of\n"
| 34 -> "expected an expression to match with\n"
| 143 -> "expected a pattern matching case\n"
| 144 -> "expected the name of the constructor for the enum case in the pattern matching\n"
| 150 ->
"expected a binding for the constructor payload, or a colon and the matching case expression\n"
| 148 -> "expected an identifier for this enum case binding\n"
| 144 -> "expected a colon and then the expression for this matching case\n"
| 150 -> "expected a colon or a binding for the enum constructor payload\n"
| 145 -> "expected an expression for this pattern matching case\n"
| 142 ->
| 151 -> "expected an identifier for this enum case binding\n"
| 147 -> "expected a colon and then the expression for this matching case\n"
| 153 -> "expected a colon or a binding for the enum constructor payload\n"
| 148 -> "expected an expression for this pattern matching case\n"
| 145 ->
"expected another match case or the rest of the expression since the previous match case is \
complete\n"
| 139 -> "expected the \"with patter\" keyword to complete the pattern matching expression\n"
| 32 -> "expected an expression inside the parenthesis\n"
| 125 -> "unmatched parenthesis that should have been closed by here\n"
| 54 -> "expected a unit for this literal, or a valid operator to complete the expression \n"
| 34 -> "expected an expression for the test of the conditional\n"
| 135 -> "expected an expression the for the \"then\" branch of the conditiona\n"
| 136 ->
| 142 -> "expected the \"with patter\" keyword to complete the pattern matching expression\n"
| 35 -> "expected an expression inside the parenthesis\n"
| 128 -> "unmatched parenthesis that should have been closed by here\n"
| 57 -> "expected a unit for this literal, or a valid operator to complete the expression \n"
| 37 -> "expected an expression for the test of the conditional\n"
| 138 -> "expected an expression the for the \"then\" branch of the conditiona\n"
| 139 ->
"expected the \"else\" branch of this conditional expression as the \"then\" branch is \
complete\n"
| 137 -> "expected an expression for the \"else\" branch of this conditional construction\n"
| 134 -> "expected the \"then\" keyword as the conditional expression is complete\n"
| 36 ->
| 140 -> "expected an expression for the \"else\" branch of this conditional construction\n"
| 137 -> "expected the \"then\" keyword as the conditional expression is complete\n"
| 39 ->
"expected the \"all\" keyword to mean the \"for all\" construction of the universal test\n"
| 111 -> "expected an identifier for the bound variable of the universal test\n"
| 112 -> "expected the \"in\" keyword for the rest of the universal test\n"
| 113 -> "expected the expression designating the set on which to perform the universal test\n"
| 114 -> "expected the \"we have\" keyword for this universal test\n"
| 110 -> "expected an expression for the universal test\n"
| 119 -> "expected an identifier that will designate the existential witness for the test\n"
| 120 -> "expected the \"in\" keyword to continue this existential test\n"
| 121 -> "expected an expression that designates the set subject to the existential test\n"
| 122 -> "expected a keyword to form the \"such that\" expression for the existential test\n"
| 123 -> "expected a keyword to complete the \"such that\" construction\n"
| 117 -> "expected an expression for the existential test\n"
| 61 ->
| 114 -> "expected an identifier for the bound variable of the universal test\n"
| 115 -> "expected the \"in\" keyword for the rest of the universal test\n"
| 116 -> "expected the expression designating the set on which to perform the universal test\n"
| 117 -> "expected the \"we have\" keyword for this universal test\n"
| 113 -> "expected an expression for the universal test\n"
| 122 -> "expected an identifier that will designate the existential witness for the test\n"
| 123 -> "expected the \"in\" keyword to continue this existential test\n"
| 124 -> "expected an expression that designates the set subject to the existential test\n"
| 125 -> "expected a keyword to form the \"such that\" expression for the existential test\n"
| 126 -> "expected a keyword to complete the \"such that\" construction\n"
| 120 -> "expected an expression for the existential test\n"
| 64 ->
"expected a payload for the enum case constructor, or the rest of the expression (with an \
operator ?)\n"
| 62 -> "expected an expression for the content of this enum case\n"
| 127 ->
| 65 -> "expected an expression for the content of this enum case\n"
| 130 ->
"the expression for the content of the enum case is already well-formed, expected an \
operator to form a bigger expression\n"
| 63 -> "expected a struct field creation introduced by a dash\n"
| 64 -> "expected the name of field of the struct that you are building\n"
| 68 -> "expected a colon and then the expression for the field of the struct\n"
| 69 -> "expected an expression for the field of the struct\n"
| 65 -> "expected another field of the struct or the end of the struct literal\n"
| 66 -> "expected another field of the struct\n"
| 41 -> "expected the keyword following cardinal to compute the number of elements in a set\n"
| 157 -> "expected a scope use item: a rule, definition or assertion\n"
| 158 -> "expected the name of the variable subject to the rule\n"
| 177 ->
| 66 -> "expected a struct field creation introduced by a dash\n"
| 67 -> "expected the name of field of the struct that you are building\n"
| 71 -> "expected a colon and then the expression for the field of the struct\n"
| 72 -> "expected an expression for the field of the struct\n"
| 68 -> "expected another field of the struct or the end of the struct literal\n"
| 69 -> "expected another field of the struct\n"
| 44 -> "expected the keyword following cardinal to compute the number of elements in a set\n"
| 160 -> "expected a scope use item: a rule, definition or assertion\n"
| 161 -> "expected the name of the variable subject to the rule\n"
| 180 ->
"expected a condition or a consequence for this rule, or the rest of the variable qualified \
name\n"
| 172 -> "expected a condition or a consequence for this rule\n"
| 163 -> "expected filled or not filled for a rule consequence\n"
| 173 -> "expected the name of the parameter for this dependent variable \n"
| 160 -> "expected the expression of the rule\n"
| 166 -> "expected the filled keyword the this rule \n"
| 178 -> "expected a struct field or a sub-scope context item after the dot\n"
| 180 -> "expected the name of the variable you want to define\n"
| 181 -> "expected the defined as keyword to introduce the definition of this variable\n"
| 183 -> "expected an expression for the consequence of this definition under condition\n"
| 182 ->
| 175 -> "expected a condition or a consequence for this rule\n"
| 166 -> "expected filled or not filled for a rule consequence\n"
| 176 -> "expected the name of the parameter for this dependent variable \n"
| 163 -> "expected the expression of the rule\n"
| 169 -> "expected the filled keyword the this rule \n"
| 181 -> "expected a struct field or a sub-scope context item after the dot\n"
| 183 -> "expected the name of the variable you want to define\n"
| 184 -> "expected the defined as keyword to introduce the definition of this variable\n"
| 186 -> "expected an expression for the consequence of this definition under condition\n"
| 185 ->
"expected a expression for defining this function, introduced by the defined as keyword\n"
| 184 -> "expected an expression for the definition\n"
| 187 -> "expected an expression that shoud be asserted during execution\n"
| 188 -> "expecting the name of the varying variable\n"
| 190 -> "the variable varies with an expression that was expected here\n"
| 191 -> "expected an indication about the variation sense of the variable, or a new scope item\n"
| 189 -> "expected an indication about what this variable varies with\n"
| 161 -> "expected an expression for this condition\n"
| 169 -> "expected a consequence for this definition under condition\n"
| 200 -> "expected an expression for this definition under condition\n"
| 196 -> "expected the name of the variable that should be fixed\n"
| 197 -> "expected the legislative text by which the value of the variable is fixed\n"
| 198 -> "expected the legislative text by which the value of the variable is fixed\n"
| 204 -> "expected a new scope use item \n"
| 207 -> "expected the kind of the declaration (struct, scope or enum)\n"
| 208 -> "expected the struct name\n"
| 209 -> "expected a colon\n"
| 210 -> "expected struct data or condition\n"
| 211 -> "expected the name of this struct data \n"
| 212 -> "expected the type of this struct data, introduced by the content keyword\n"
| 213 -> "expected the type of this struct data\n"
| 237 -> "expected the name of this struct condition\n"
| 230 -> "expected a new struct data, or another declaration or scope use\n"
| 231 -> "expected the type of the parameter of this struct data function\n"
| 235 -> "expected a new struct data, or another declaration or scope use\n"
| 224 -> "expected a new struct data, or another declaration or scope use\n"
| 187 -> "expected an expression for the definition\n"
| 190 -> "expected an expression that shoud be asserted during execution\n"
| 191 -> "expecting the name of the varying variable\n"
| 193 -> "the variable varies with an expression that was expected here\n"
| 194 -> "expected an indication about the variation sense of the variable, or a new scope item\n"
| 192 -> "expected an indication about what this variable varies with\n"
| 164 -> "expected an expression for this condition\n"
| 172 -> "expected a consequence for this definition under condition\n"
| 203 -> "expected an expression for this definition under condition\n"
| 199 -> "expected the name of the variable that should be fixed\n"
| 200 -> "expected the legislative text by which the value of the variable is fixed\n"
| 201 -> "expected the legislative text by which the value of the variable is fixed\n"
| 207 -> "expected a new scope use item \n"
| 210 -> "expected the kind of the declaration (struct, scope or enum)\n"
| 211 -> "expected the struct name\n"
| 212 -> "expected a colon\n"
| 213 -> "expected struct data or condition\n"
| 214 -> "expected the name of this struct data \n"
| 215 -> "expected the type of this struct data, introduced by the content keyword\n"
| 216 -> "expected the type of this struct data\n"
| 240 -> "expected the name of this struct condition\n"
| 233 -> "expected a new struct data, or another declaration or scope use\n"
| 234 -> "expected the type of the parameter of this struct data function\n"
| 238 -> "expected a new struct data, or another declaration or scope use\n"
| 227 -> "expected a new struct data, or another declaration or scope use\n"
| 240 -> "expected the name of the scope you are declaring\n"
| 241 -> "expected a colon followed by the list of context items of this scope\n"
| 242 -> "expected a context item introduced by \"context\"\n"
| 243 -> "expected the name of this new context item\n"
| 244 -> "expected the kind of this context item: is it a condition, a sub-scope or a data?\n"
| 245 -> "expected the name of the subscope for this context item\n"
| 252 -> "expected the next context item, or another declaration or scope use\n"
| 247 -> "expected the type of this context item\n"
| 248 -> "expected the next context item or a dependency declaration for this item\n"
| 250 -> "expected the next context item or a dependency declaration for this item\n"
| 255 -> "expected the name of your enum\n"
| 256 -> "expected a colon\n"
| 257 -> "expected an enum case\n"
| 258 -> "expected the name of an enum case \n"
| 259 -> "expected a payload for your enum case, or another case or declaration \n"
| 260 -> "expected a content type\n"
| 265 -> "expected another enum case, or a new declaration or scope use\n"
| 11 -> "expected a declaration or a scope use\n"
| 12 -> "expected a declaration or a scope use\n"
| 271 ->
| 230 -> "expected a new struct data, or another declaration or scope use\n"
| 243 -> "expected the name of the scope you are declaring\n"
| 244 -> "expected a colon followed by the list of context items of this scope\n"
| 245 -> "expected a context item introduced by \"context\"\n"
| 246 -> "expected the name of this new context item\n"
| 247 -> "expected the kind of this context item: is it a condition, a sub-scope or a data?\n"
| 248 -> "expected the name of the subscope for this context item\n"
| 255 -> "expected the next context item, or another declaration or scope use\n"
| 250 -> "expected the type of this context item\n"
| 251 -> "expected the next context item or a dependency declaration for this item\n"
| 253 -> "expected the next context item or a dependency declaration for this item\n"
| 258 -> "expected the name of your enum\n"
| 259 -> "expected a colon\n"
| 260 -> "expected an enum case\n"
| 261 -> "expected the name of an enum case \n"
| 262 -> "expected a payload for your enum case, or another case or declaration \n"
| 263 -> "expected a content type\n"
| 268 -> "expected another enum case, or a new declaration or scope use\n"
| 14 -> "expected a declaration or a scope use\n"
| 15 -> "expected a declaration or a scope use\n"
| 274 ->
"should not happen, please file an issue at https://github.com/CatalaLang/catala/issues\n"
| _ -> raise Not_found