From ec1695e41ee9eec68865601bb44f193b594ea793 Mon Sep 17 00:00:00 2001 From: Aymeric Fromherz Date: Mon, 25 Jan 2021 22:31:48 -0500 Subject: [PATCH 1/7] Add failing test for ambiguous struct fields --- tests/test_struct/bad/ambiguous_fields.catala | 18 ++++++++++++++++++ .../bad/output/ambiguous_fields.catala.A.out | 7 +++++++ 2 files changed, 25 insertions(+) create mode 100644 tests/test_struct/bad/ambiguous_fields.catala create mode 100644 tests/test_struct/bad/output/ambiguous_fields.catala.A.out diff --git a/tests/test_struct/bad/ambiguous_fields.catala b/tests/test_struct/bad/ambiguous_fields.catala new file mode 100644 index 00000000..61463275 --- /dev/null +++ b/tests/test_struct/bad/ambiguous_fields.catala @@ -0,0 +1,18 @@ +@Article@ + +/* +new struct Foo: + data f content int + +new struct Bar: + data f content int + +new scope A: + param x content Foo + param y content int + +scope A: + def x := Foo { -- f: 1 } + def y := x.f + +*/ diff --git a/tests/test_struct/bad/output/ambiguous_fields.catala.A.out b/tests/test_struct/bad/output/ambiguous_fields.catala.A.out new file mode 100644 index 00000000..3f946fa0 --- /dev/null +++ b/tests/test_struct/bad/output/ambiguous_fields.catala.A.out @@ -0,0 +1,7 @@ +[ERROR] This struct field name is ambiguous, it can belong to Foo or Bar. Desambiguate it by prefixing it with the struct name. +[ERROR] +[ERROR] --> test_struct/bad/ambiguous_fields.catala +[ERROR] | +[ERROR] 16 | def y := x.f +[ERROR] | ^ +[ERROR] + Article From b10e93fc5f37c6626d08c294c28b98e0eef1abc3 Mon Sep 17 00:00:00 2001 From: Aymeric Fromherz Date: Mon, 25 Jan 2021 22:32:31 -0500 Subject: [PATCH 2/7] Add syntax for enum/struct constructors to AST and parser (doing nothing with them yet) --- src/catala/catala_surface/ast.ml | 2 +- src/catala/catala_surface/desugaring.ml | 2 +- src/catala/catala_surface/parser.mly | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/catala/catala_surface/ast.ml b/src/catala/catala_surface/ast.ml index 4f00207e..3e9c8590 100644 --- a/src/catala/catala_surface/ast.ml +++ b/src/catala/catala_surface/ast.ml @@ -263,7 +263,7 @@ and expression = | StructLit of constructor Pos.marked * (ident Pos.marked * expression Pos.marked) list | ArrayLit of expression Pos.marked list | Ident of ident - | Dotted of expression Pos.marked * ident Pos.marked + | Dotted of expression Pos.marked * constructor Pos.marked option * ident Pos.marked (** Dotted is for both struct field projection and sub-scope variables *) [@@deriving visitors diff --git a/src/catala/catala_surface/desugaring.ml b/src/catala/catala_surface/desugaring.ml index ce202a72..fb934aa3 100644 --- a/src/catala/catala_surface/desugaring.ml +++ b/src/catala/catala_surface/desugaring.ml @@ -205,7 +205,7 @@ let rec translate_expr (scope : Scopelang.Ast.ScopeName.t) (ctxt : Name_resoluti | Some uid -> Scopelang.Ast.make_var (uid, pos) (* the whole box thing is to accomodate for this case *) ) - | Dotted (e, x) -> ( + | Dotted (e, _c, x) -> ( match Pos.unmark e with | Ident y when Name_resolution.is_subscope_uid scope ctxt y -> (* In this case, y.x is a subscope variable *) diff --git a/src/catala/catala_surface/parser.mly b/src/catala/catala_surface/parser.mly index b90cd00b..c576a2b9 100644 --- a/src/catala/catala_surface/parser.mly +++ b/src/catala/catala_surface/parser.mly @@ -112,8 +112,8 @@ small_expression: | e = small_expression ARROW c = constructor { (EnumProject (e, c), Pos.from_lpos $sloc) } -| e = small_expression DOT i = ident { - (Dotted (e, i), Pos.from_lpos $sloc) +| e = small_expression DOT c = option(terminated(constructor,DOT)) i = ident { + (Dotted (e, c, i), Pos.from_lpos $sloc) } struct_content_field: From f90db72c2550d25482b018e397237c45d9470db6 Mon Sep 17 00:00:00 2001 From: Aymeric Fromherz Date: Mon, 25 Jan 2021 23:07:12 -0500 Subject: [PATCH 3/7] Handle fully qualified struct accesses during desugaring --- src/catala/catala_surface/desugaring.ml | 59 ++++++++++++++++++------- 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/src/catala/catala_surface/desugaring.ml b/src/catala/catala_surface/desugaring.ml index fb934aa3..00274641 100644 --- a/src/catala/catala_surface/desugaring.ml +++ b/src/catala/catala_surface/desugaring.ml @@ -205,7 +205,7 @@ let rec translate_expr (scope : Scopelang.Ast.ScopeName.t) (ctxt : Name_resoluti | Some uid -> Scopelang.Ast.make_var (uid, pos) (* the whole box thing is to accomodate for this case *) ) - | Dotted (e, _c, x) -> ( + | Dotted (e, c, x) -> ( match Pos.unmark e with | Ident y when Name_resolution.is_subscope_uid scope ctxt y -> (* In this case, y.x is a subscope variable *) @@ -228,21 +228,48 @@ let rec translate_expr (scope : Scopelang.Ast.ScopeName.t) (ctxt : Name_resoluti with Not_found -> Errors.raise_spanned_error "This identifier should refer to a struct field" (Pos.get_position x) - in - if Scopelang.Ast.StructMap.cardinal x_possible_structs > 1 then - Errors.raise_spanned_error - (Format.asprintf - "This struct field name is ambiguous, it can belong to %a. Desambiguate it by \ - prefixing it with the struct name." - (Format.pp_print_list - ~pp_sep:(fun fmt () -> Format.fprintf fmt " or ") - (fun fmt (s_name, _) -> - Format.fprintf fmt "%a" Scopelang.Ast.StructName.format_t s_name)) - (Scopelang.Ast.StructMap.bindings x_possible_structs)) - (Pos.get_position x) - else - let s_uid, f_uid = Scopelang.Ast.StructMap.choose x_possible_structs in - Bindlib.box_apply (fun e -> (Scopelang.Ast.EStructAccess (e, f_uid, s_uid), pos)) e ) + in ( + match c with + | None -> + (* No constructor name was specified *) + if Scopelang.Ast.StructMap.cardinal x_possible_structs > 1 then + Errors.raise_spanned_error + (Format.asprintf + "This struct field name is ambiguous, it can belong to %a. Disambiguate it by \ + prefixing it with the struct name." + (Format.pp_print_list + ~pp_sep:(fun fmt () -> Format.fprintf fmt " or ") + (fun fmt (s_name, _) -> + Format.fprintf fmt "%a" Scopelang.Ast.StructName.format_t s_name)) + (Scopelang.Ast.StructMap.bindings x_possible_structs)) + (Pos.get_position x) + else + let s_uid, f_uid = Scopelang.Ast.StructMap.choose x_possible_structs in + Bindlib.box_apply (fun e -> (Scopelang.Ast.EStructAccess (e, f_uid, s_uid), pos)) e + | Some c_name -> + try + let c_uid = Desugared.Ast.IdentMap.find (Pos.unmark c_name) ctxt.struct_idmap in + try + let f_uid = Scopelang.Ast.StructMap.find c_uid x_possible_structs in + Bindlib.box_apply (fun e -> (Scopelang.Ast.EStructAccess (e, f_uid, c_uid), pos)) e + with + | Not_found -> Errors.raise_spanned_error + (Format.asprintf + "Struct %s does not contain field %s" + (Pos.unmark c_name) + (Pos.unmark x) + ) + pos + with + | Not_found -> Errors.raise_spanned_error + (Format.asprintf + "Constructor %s has not been defined before" + (Pos.unmark c_name) + ) + (Pos.get_position c_name) + ) + ) + | FunCall (f, arg) -> Bindlib.box_apply2 (fun f arg -> (Scopelang.Ast.EApp (f, [ arg ]), pos)) From e1ac9564c2d7e262471ec5fd9ce5dc46877c5f27 Mon Sep 17 00:00:00 2001 From: Aymeric Fromherz Date: Mon, 25 Jan 2021 23:07:39 -0500 Subject: [PATCH 4/7] Add a few tests for fully qualified struct accesses --- .../test_struct/bad/nonexisting_struct.catala | 15 +++++++++++++++ .../bad/output/ambiguous_fields.catala.A.out | 2 +- .../output/nonexisting_struct.catala.A.out | 7 +++++++ .../output/wrong_qualified_field.catala.A.out | 7 +++++++ .../bad/wrong_qualified_field.catala | 19 +++++++++++++++++++ .../good/output/same_name_fields.catala.A.out | 3 +++ .../test_struct/good/same_name_fields.catala | 18 ++++++++++++++++++ 7 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 tests/test_struct/bad/nonexisting_struct.catala create mode 100644 tests/test_struct/bad/output/nonexisting_struct.catala.A.out create mode 100644 tests/test_struct/bad/output/wrong_qualified_field.catala.A.out create mode 100644 tests/test_struct/bad/wrong_qualified_field.catala create mode 100644 tests/test_struct/good/output/same_name_fields.catala.A.out create mode 100644 tests/test_struct/good/same_name_fields.catala diff --git a/tests/test_struct/bad/nonexisting_struct.catala b/tests/test_struct/bad/nonexisting_struct.catala new file mode 100644 index 00000000..1815ea0c --- /dev/null +++ b/tests/test_struct/bad/nonexisting_struct.catala @@ -0,0 +1,15 @@ +@Article@ + +/* +new struct Foo: + data f content int + +new scope A: + param x content Foo + param y content int + +scope A: + def x := Foo { -- f: 1 } + def y := x.Fo.f + +*/ diff --git a/tests/test_struct/bad/output/ambiguous_fields.catala.A.out b/tests/test_struct/bad/output/ambiguous_fields.catala.A.out index 3f946fa0..337a6a11 100644 --- a/tests/test_struct/bad/output/ambiguous_fields.catala.A.out +++ b/tests/test_struct/bad/output/ambiguous_fields.catala.A.out @@ -1,4 +1,4 @@ -[ERROR] This struct field name is ambiguous, it can belong to Foo or Bar. Desambiguate it by prefixing it with the struct name. +[ERROR] This struct field name is ambiguous, it can belong to Foo or Bar. Disambiguate it by prefixing it with the struct name. [ERROR] [ERROR] --> test_struct/bad/ambiguous_fields.catala [ERROR] | diff --git a/tests/test_struct/bad/output/nonexisting_struct.catala.A.out b/tests/test_struct/bad/output/nonexisting_struct.catala.A.out new file mode 100644 index 00000000..e61abd96 --- /dev/null +++ b/tests/test_struct/bad/output/nonexisting_struct.catala.A.out @@ -0,0 +1,7 @@ +[ERROR] Constructor Fo has not been defined before +[ERROR] +[ERROR] --> test_struct/bad/nonexisting_struct.catala +[ERROR] | +[ERROR] 13 | def y := x.Fo.f +[ERROR] | ^^ +[ERROR] + Article diff --git a/tests/test_struct/bad/output/wrong_qualified_field.catala.A.out b/tests/test_struct/bad/output/wrong_qualified_field.catala.A.out new file mode 100644 index 00000000..cc6949b3 --- /dev/null +++ b/tests/test_struct/bad/output/wrong_qualified_field.catala.A.out @@ -0,0 +1,7 @@ +[ERROR] Struct Foo does not contain field g +[ERROR] +[ERROR] --> test_struct/bad/wrong_qualified_field.catala +[ERROR] | +[ERROR] 17 | def y := x.Foo.g +[ERROR] | ^^^^^^^ +[ERROR] + Article diff --git a/tests/test_struct/bad/wrong_qualified_field.catala b/tests/test_struct/bad/wrong_qualified_field.catala new file mode 100644 index 00000000..90ef0080 --- /dev/null +++ b/tests/test_struct/bad/wrong_qualified_field.catala @@ -0,0 +1,19 @@ +@Article@ + +/* +new struct Foo: + data f content int + +new struct Bar: + data f content int + data g content int + +new scope A: + param x content Foo + param y content int + +scope A: + def x := Foo { -- f: 1 } + def y := x.Foo.g + +*/ diff --git a/tests/test_struct/good/output/same_name_fields.catala.A.out b/tests/test_struct/good/output/same_name_fields.catala.A.out new file mode 100644 index 00000000..74a83723 --- /dev/null +++ b/tests/test_struct/good/output/same_name_fields.catala.A.out @@ -0,0 +1,3 @@ +[RESULT] Computation successful! Results: +[RESULT] x = Foo {"f": 1} +[RESULT] y = 1 diff --git a/tests/test_struct/good/same_name_fields.catala b/tests/test_struct/good/same_name_fields.catala new file mode 100644 index 00000000..95cd0825 --- /dev/null +++ b/tests/test_struct/good/same_name_fields.catala @@ -0,0 +1,18 @@ +@Article@ + +/* +new struct Foo: + data f content int + +new struct Bar: + data f content int + +new scope A: + param x content Foo + param y content int + +scope A: + def x := Foo { -- f: 1 } + def y := x.Foo.f + +*/ From f154ec15ad75462ce75aa7a406b409320ce868b2 Mon Sep 17 00:00:00 2001 From: Aymeric Fromherz Date: Tue, 26 Jan 2021 10:38:10 -0500 Subject: [PATCH 5/7] Add support for fully qualified enum elements --- src/catala/catala_surface/ast.ml | 3 +- src/catala/catala_surface/desugaring.ml | 124 +++-- src/catala/catala_surface/parser.messages | 423 +++++++++--------- src/catala/catala_surface/parser.mly | 23 +- src/catala/catala_surface/parser_errors.ml | 264 +++++------ tests/test_enum/bad/ambiguous_cases.catala | 15 + .../bad/output/ambiguous_cases.catala.A.out | 7 + .../output/nonexisting_struct.catala.A.out | 2 +- 8 files changed, 453 insertions(+), 408 deletions(-) create mode 100644 tests/test_enum/bad/ambiguous_cases.catala create mode 100644 tests/test_enum/bad/output/ambiguous_cases.catala.A.out diff --git a/src/catala/catala_surface/ast.ml b/src/catala/catala_surface/ast.ml index 3e9c8590..7e6a4b50 100644 --- a/src/catala/catala_surface/ast.ml +++ b/src/catala/catala_surface/ast.ml @@ -258,7 +258,8 @@ and expression = | FunCall of expression Pos.marked * expression Pos.marked | Builtin of builtin_expression | Literal of literal - | EnumInject of constructor Pos.marked * expression Pos.marked option + | EnumInject of + constructor Pos.marked option * constructor Pos.marked * expression Pos.marked option | EnumProject of expression Pos.marked * constructor Pos.marked | StructLit of constructor Pos.marked * (ident Pos.marked * expression Pos.marked) list | ArrayLit of expression Pos.marked list diff --git a/src/catala/catala_surface/desugaring.ml b/src/catala/catala_surface/desugaring.ml index 00274641..7904792e 100644 --- a/src/catala/catala_surface/desugaring.ml +++ b/src/catala/catala_surface/desugaring.ml @@ -74,7 +74,7 @@ let disambiguate_constructor (ctxt : Name_resolution.context) (constructor : str if Scopelang.Ast.EnumMap.cardinal possible_c_uids > 1 then Errors.raise_spanned_error (Format.asprintf - "This constuctor name is ambiguous, it can belong to %a. Desambiguate it by prefixing it \ + "This constructor name is ambiguous, it can belong to %a. Desambiguate it by prefixing it \ with the enum name." (Format.pp_print_list ~pp_sep:(fun fmt () -> Format.fprintf fmt " or ") @@ -220,7 +220,7 @@ let rec translate_expr (scope : Scopelang.Ast.ScopeName.t) (ctxt : Name_resoluti ( Scopelang.Ast.ELocation (SubScopeVar (subscope_real_uid, (subscope_uid, pos), (subscope_var_uid, pos))), pos ) - | _ -> + | _ -> ( (* In this case e.x is the struct field x access of expression e *) let e = translate_expr scope ctxt e in let x_possible_structs = @@ -228,9 +228,9 @@ let rec translate_expr (scope : Scopelang.Ast.ScopeName.t) (ctxt : Name_resoluti with Not_found -> Errors.raise_spanned_error "This identifier should refer to a struct field" (Pos.get_position x) - in ( - match c with - | None -> + in + match c with + | None -> (* No constructor name was specified *) if Scopelang.Ast.StructMap.cardinal x_possible_structs > 1 then Errors.raise_spanned_error @@ -246,30 +246,23 @@ let rec translate_expr (scope : Scopelang.Ast.ScopeName.t) (ctxt : Name_resoluti else let s_uid, f_uid = Scopelang.Ast.StructMap.choose x_possible_structs in Bindlib.box_apply (fun e -> (Scopelang.Ast.EStructAccess (e, f_uid, s_uid), pos)) e - | Some c_name -> + | Some c_name -> ( try let c_uid = Desugared.Ast.IdentMap.find (Pos.unmark c_name) ctxt.struct_idmap in try let f_uid = Scopelang.Ast.StructMap.find c_uid x_possible_structs in - Bindlib.box_apply (fun e -> (Scopelang.Ast.EStructAccess (e, f_uid, c_uid), pos)) e - with - | Not_found -> Errors.raise_spanned_error - (Format.asprintf - "Struct %s does not contain field %s" - (Pos.unmark c_name) - (Pos.unmark x) - ) + Bindlib.box_apply + (fun e -> (Scopelang.Ast.EStructAccess (e, f_uid, c_uid), pos)) + e + with Not_found -> + Errors.raise_spanned_error + (Format.asprintf "Struct %s does not contain field %s" (Pos.unmark c_name) + (Pos.unmark x)) pos - with - | Not_found -> Errors.raise_spanned_error - (Format.asprintf - "Constructor %s has not been defined before" - (Pos.unmark c_name) - ) - (Pos.get_position c_name) - ) - ) - + with Not_found -> + Errors.raise_spanned_error + (Format.asprintf "Struct %s has not been defined before" (Pos.unmark c_name)) + (Pos.get_position c_name) ) ) ) | FunCall (f, arg) -> Bindlib.box_apply2 (fun f arg -> (Scopelang.Ast.EApp (f, [ arg ]), pos)) @@ -309,7 +302,7 @@ let rec translate_expr (scope : Scopelang.Ast.ScopeName.t) (ctxt : Name_resoluti Bindlib.box_apply (fun s_fields -> (Scopelang.Ast.EStruct (s_uid, s_fields), pos)) (LiftStructFieldMap.lift_box s_fields) - | EnumInject (constructor, payload) -> + | EnumInject (enum, constructor, payload) -> ( let possible_c_uids = try Desugared.Ast.IdentMap.find (Pos.unmark constructor) ctxt.constructor_idmap with Not_found -> @@ -317,30 +310,63 @@ let rec translate_expr (scope : Scopelang.Ast.ScopeName.t) (ctxt : Name_resoluti "The name of this constructor has not been defined before, maybe it is a typo?" (Pos.get_position constructor) in - if Scopelang.Ast.EnumMap.cardinal possible_c_uids > 1 then - Errors.raise_spanned_error - (Format.asprintf - "This constuctor name is ambiguous, it can belong to %a. Desambiguate it by prefixing \ - it with the enum name." - (Format.pp_print_list - ~pp_sep:(fun fmt () -> Format.fprintf fmt " or ") - (fun fmt (s_name, _) -> - Format.fprintf fmt "%a" Scopelang.Ast.EnumName.format_t s_name)) - (Scopelang.Ast.EnumMap.bindings possible_c_uids)) - (Pos.get_position constructor) - else - let e_uid, c_uid = Scopelang.Ast.EnumMap.choose possible_c_uids in - let payload = Option.map (translate_expr scope ctxt) payload in - Bindlib.box_apply - (fun payload -> - ( Scopelang.Ast.EEnumInj - ( ( match payload with - | Some e' -> e' - | None -> (Scopelang.Ast.ELit Dcalc.Ast.LUnit, Pos.get_position constructor) ), - c_uid, - e_uid ), - pos )) - (Bindlib.box_opt payload) + match enum with + | None -> + if + (* No constructor name was specified *) + Scopelang.Ast.EnumMap.cardinal possible_c_uids > 1 + then + Errors.raise_spanned_error + (Format.asprintf + "This constructor name is ambiguous, it can belong to %a. Desambiguate it by \ + prefixing it with the enum name." + (Format.pp_print_list + ~pp_sep:(fun fmt () -> Format.fprintf fmt " or ") + (fun fmt (s_name, _) -> + Format.fprintf fmt "%a" Scopelang.Ast.EnumName.format_t s_name)) + (Scopelang.Ast.EnumMap.bindings possible_c_uids)) + (Pos.get_position constructor) + else + let e_uid, c_uid = Scopelang.Ast.EnumMap.choose possible_c_uids in + let payload = Option.map (translate_expr scope ctxt) payload in + Bindlib.box_apply + (fun payload -> + ( Scopelang.Ast.EEnumInj + ( ( match payload with + | Some e' -> e' + | None -> (Scopelang.Ast.ELit Dcalc.Ast.LUnit, Pos.get_position constructor) + ), + c_uid, + e_uid ), + pos )) + (Bindlib.box_opt payload) + | Some enum -> ( + try + (* The path has been fully qualified *) + let e_uid = Desugared.Ast.IdentMap.find (Pos.unmark enum) ctxt.enum_idmap in + try + let c_uid = Scopelang.Ast.EnumMap.find e_uid possible_c_uids in + let payload = Option.map (translate_expr scope ctxt) payload in + Bindlib.box_apply + (fun payload -> + ( Scopelang.Ast.EEnumInj + ( ( match payload with + | Some e' -> e' + | None -> (Scopelang.Ast.ELit Dcalc.Ast.LUnit, Pos.get_position constructor) + ), + c_uid, + e_uid ), + pos )) + (Bindlib.box_opt payload) + with Not_found -> + Errors.raise_spanned_error + (Format.asprintf "Enum %s does not contain case %s" (Pos.unmark enum) + (Pos.unmark constructor)) + pos + with Not_found -> + Errors.raise_spanned_error + (Format.asprintf "Enum %s has not been defined before" (Pos.unmark enum)) + (Pos.get_position enum) ) ) | MatchWith (e1, (cases, _cases_pos)) -> let e1 = translate_expr scope ctxt e1 in let cases_d, e_uid = disambiguate_match_and_build_expression scope ctxt cases in diff --git a/src/catala/catala_surface/parser.messages b/src/catala/catala_surface/parser.messages index 6b7e3261..161e189b 100644 --- a/src/catala/catala_surface/parser.messages +++ b/src/catala/catala_surface/parser.messages @@ -1,6 +1,6 @@ source_file_or_master: BEGIN_METADATA BEGIN_CODE END_CODE LAW_TEXT END_CODE ## -## Ends in an error in state: 351. +## Ends in an error in state: 355. ## ## metadata_block -> BEGIN_CODE option(law_text) code END_CODE option(law_text) . END_METADATA [ LAW_TEXT LAW_INCLUDE LAW_HEADING LAW_ARTICLE EOF BEGIN_METADATA ] ## @@ -12,7 +12,7 @@ expected a metadata-closing tag source_file_or_master: BEGIN_METADATA BEGIN_CODE END_CODE YEAR ## -## Ends in an error in state: 350. +## Ends in an error in state: 354. ## ## metadata_block -> BEGIN_CODE option(law_text) code END_CODE . option(law_text) END_METADATA [ LAW_TEXT LAW_INCLUDE LAW_HEADING LAW_ARTICLE EOF BEGIN_METADATA ] ## @@ -72,7 +72,7 @@ expected a declaration or a scope use source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT CONSTRUCTOR CONTENT TEXT YEAR ## -## Ends in an error in state: 344. +## Ends in an error in state: 348. ## ## nonempty_list(enum_decl_line) -> enum_decl_line . [ SCOPE END_CODE DECLARATION ] ## nonempty_list(enum_decl_line) -> enum_decl_line . nonempty_list(enum_decl_line) [ SCOPE END_CODE DECLARATION ] @@ -85,7 +85,7 @@ expected another enum case, or a new declaration or scope use source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT CONSTRUCTOR CONTENT YEAR ## -## Ends in an error in state: 339. +## Ends in an error in state: 343. ## ## enum_decl_line_payload -> CONTENT . typ [ SCOPE END_CODE DECLARATION ALT ] ## @@ -97,7 +97,7 @@ expected a content type source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT CONSTRUCTOR YEAR ## -## Ends in an error in state: 338. +## Ends in an error in state: 342. ## ## enum_decl_line -> ALT constructor . option(enum_decl_line_payload) [ SCOPE END_CODE DECLARATION ALT ] ## @@ -109,7 +109,7 @@ expected a payload for your enum case, or another case or declaration source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT YEAR ## -## Ends in an error in state: 337. +## Ends in an error in state: 341. ## ## enum_decl_line -> ALT . constructor option(enum_decl_line_payload) [ SCOPE END_CODE DECLARATION ALT ] ## @@ -121,7 +121,7 @@ expected the name of an enum case source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON YEAR ## -## Ends in an error in state: 336. +## Ends in an error in state: 340. ## ## code_item -> DECLARATION ENUM constructor COLON . nonempty_list(enum_decl_line) [ SCOPE END_CODE DECLARATION ] ## @@ -133,7 +133,7 @@ expected an enum case source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM CONSTRUCTOR YEAR ## -## Ends in an error in state: 335. +## Ends in an error in state: 339. ## ## code_item -> DECLARATION ENUM constructor . COLON nonempty_list(enum_decl_line) [ SCOPE END_CODE DECLARATION ] ## @@ -145,7 +145,7 @@ expected a colon source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM YEAR ## -## Ends in an error in state: 334. +## Ends in an error in state: 338. ## ## code_item -> DECLARATION ENUM . constructor COLON nonempty_list(enum_decl_line) [ SCOPE END_CODE DECLARATION ] ## @@ -157,7 +157,7 @@ expected the name of your enum source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT CONDITION YEAR ## -## Ends in an error in state: 329. +## Ends in an error in state: 333. ## ## scope_decl_item -> CONTEXT ident CONDITION . option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## @@ -169,7 +169,7 @@ expected the next context item or a dependency declaration for this item source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT CONTENT TEXT YEAR ## -## Ends in an error in state: 327. +## Ends in an error in state: 331. ## ## scope_decl_item -> CONTEXT ident CONTENT typ . option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## @@ -181,7 +181,7 @@ expected the next context item or a dependency declaration for this item source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT CONTENT YEAR ## -## Ends in an error in state: 326. +## Ends in an error in state: 330. ## ## scope_decl_item -> CONTEXT ident CONTENT . typ option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## @@ -193,7 +193,7 @@ expected the type of this context item source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT SCOPE CONSTRUCTOR YEAR ## -## Ends in an error in state: 331. +## Ends in an error in state: 335. ## ## nonempty_list(scope_decl_item) -> scope_decl_item . [ SCOPE END_CODE DECLARATION ] ## nonempty_list(scope_decl_item) -> scope_decl_item . nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ] @@ -206,7 +206,7 @@ expected another scope context item or the end of the scope declaration source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT SCOPE YEAR ## -## Ends in an error in state: 324. +## Ends in an error in state: 328. ## ## scope_decl_item -> CONTEXT ident SCOPE . constructor [ SCOPE END_CODE DECLARATION CONTEXT ] ## @@ -218,7 +218,7 @@ expected the name of the subscope for this context item source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT YEAR ## -## Ends in an error in state: 323. +## Ends in an error in state: 327. ## ## scope_decl_item -> CONTEXT ident . CONTENT typ option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## scope_decl_item -> CONTEXT ident . SCOPE constructor [ SCOPE END_CODE DECLARATION CONTEXT ] @@ -232,7 +232,7 @@ expected the kind of this context item: is it a condition, a sub-scope or a data source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT YEAR ## -## Ends in an error in state: 322. +## Ends in an error in state: 326. ## ## scope_decl_item -> CONTEXT . ident CONTENT typ option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## scope_decl_item -> CONTEXT . ident SCOPE constructor [ SCOPE END_CODE DECLARATION CONTEXT ] @@ -246,7 +246,7 @@ expected the name of this new context item source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON YEAR ## -## Ends in an error in state: 321. +## Ends in an error in state: 325. ## ## code_item -> DECLARATION SCOPE constructor COLON . nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ] ## @@ -258,7 +258,7 @@ expected a context item introduced by "context" source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR YEAR ## -## Ends in an error in state: 320. +## Ends in an error in state: 324. ## ## code_item -> DECLARATION SCOPE constructor . COLON nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ] ## @@ -270,7 +270,7 @@ expected a colon followed by the list of context items of this scope source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE YEAR ## -## Ends in an error in state: 319. +## Ends in an error in state: 323. ## ## code_item -> DECLARATION SCOPE . constructor COLON nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ] ## @@ -282,7 +282,7 @@ expected the name of the scope you are declaring source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT DEPENDS COLLECTION YEAR ## -## Ends in an error in state: 306. +## Ends in an error in state: 310. ## ## typ -> collection_marked . typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONTEXT CONDITION ALT ] ## @@ -295,7 +295,7 @@ expected a new struct data, or another declaration or scope use source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT DEPENDS TEXT YEAR ## -## Ends in an error in state: 314. +## Ends in an error in state: 318. ## ## list(struct_scope) -> struct_scope . list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## @@ -307,7 +307,7 @@ expected a new struct data, or another declaration or scope use source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT DEPENDS YEAR ## -## Ends in an error in state: 310. +## Ends in an error in state: 314. ## ## struct_scope_func -> DEPENDS . typ [ SCOPE END_CODE DECLARATION DATA CONTEXT CONDITION ] ## @@ -319,7 +319,7 @@ expected the type of the parameter of this struct data function source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT YEAR ## -## Ends in an error in state: 309. +## Ends in an error in state: 313. ## ## struct_scope -> struct_scope_base . option(struct_scope_func) [ SCOPE END_CODE DECLARATION DATA CONDITION ] ## @@ -331,7 +331,7 @@ expected a new struct data, or another declaration or scope use source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION YEAR ## -## Ends in an error in state: 316. +## Ends in an error in state: 320. ## ## struct_scope_base -> condition_pos . ident [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ] ## @@ -343,7 +343,7 @@ expected the name of this struct condition source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON DATA IDENT CONTENT YEAR ## -## Ends in an error in state: 302. +## Ends in an error in state: 306. ## ## struct_scope_base -> DATA ident CONTENT . typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ] ## @@ -355,7 +355,7 @@ expected the type of this struct data source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON DATA IDENT YEAR ## -## Ends in an error in state: 301. +## Ends in an error in state: 305. ## ## struct_scope_base -> DATA ident . CONTENT typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ] ## @@ -367,7 +367,7 @@ expected the type of this struct data, introduced by the content keyword source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON DATA YEAR ## -## Ends in an error in state: 300. +## Ends in an error in state: 304. ## ## struct_scope_base -> DATA . ident CONTENT typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ] ## @@ -379,7 +379,7 @@ expected the name of this struct data source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON YEAR ## -## Ends in an error in state: 299. +## Ends in an error in state: 303. ## ## code_item -> DECLARATION STRUCT constructor COLON . list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## @@ -391,7 +391,7 @@ expected struct data or condition source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR YEAR ## -## Ends in an error in state: 298. +## Ends in an error in state: 302. ## ## code_item -> DECLARATION STRUCT constructor . COLON list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## @@ -403,7 +403,7 @@ expected a colon source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT YEAR ## -## Ends in an error in state: 297. +## Ends in an error in state: 301. ## ## code_item -> DECLARATION STRUCT . constructor COLON list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## @@ -415,7 +415,7 @@ expected the struct name source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION YEAR ## -## Ends in an error in state: 296. +## Ends in an error in state: 300. ## ## code_item -> DECLARATION . STRUCT constructor COLON list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## code_item -> DECLARATION . SCOPE constructor COLON nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ] @@ -429,7 +429,7 @@ expected the kind of the declaration (struct, scope or enum) source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION CARDINAL THEN ## -## Ends in an error in state: 266. +## Ends in an error in state: 270. ## ## nonempty_list(scope_item) -> scope_item . [ SCOPE END_CODE DECLARATION ] ## nonempty_list(scope_item) -> scope_item . nonempty_list(scope_item) [ SCOPE END_CODE DECLARATION ] @@ -441,23 +441,23 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 106, spurious reduction of production primitive_expression -> CARDINAL -## In state 109, spurious reduction of production base_expression -> primitive_expression -## In state 144, spurious reduction of production mult_expression -> base_expression -## In state 131, spurious reduction of production sum_expression -> mult_expression -## In state 153, spurious reduction of production compare_expression -> sum_expression -## In state 181, spurious reduction of production logical_expression -> compare_expression -## In state 203, spurious reduction of production expression -> logical_expression -## In state 260, spurious reduction of production assertion_base -> expression -## In state 261, spurious reduction of production assertion -> option(condition_consequence) assertion_base -## In state 265, spurious reduction of production scope_item -> ASSERTION assertion +## In state 109, spurious reduction of production primitive_expression -> CARDINAL +## In state 112, spurious reduction of production base_expression -> primitive_expression +## In state 147, spurious reduction of production mult_expression -> base_expression +## In state 134, spurious reduction of production sum_expression -> mult_expression +## In state 156, spurious reduction of production compare_expression -> sum_expression +## In state 184, spurious reduction of production logical_expression -> compare_expression +## In state 207, spurious reduction of production expression -> logical_expression +## In state 264, spurious reduction of production assertion_base -> expression +## In state 265, spurious reduction of production assertion -> option(condition_consequence) assertion_base +## In state 269, spurious reduction of production scope_item -> ASSERTION assertion ## expected a new scope use item source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION FIXED IDENT BY YEAR ## -## Ends in an error in state: 257. +## Ends in an error in state: 261. ## ## assertion -> FIXED qident BY . ident [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -469,7 +469,7 @@ expected the legislative text by which the value of the variable is fixed source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION FIXED IDENT WITH_V ## -## Ends in an error in state: 256. +## Ends in an error in state: 260. ## ## assertion -> FIXED qident . BY ident [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -480,15 +480,15 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 250, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident -## In state 242, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) +## In state 254, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident +## In state 246, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) ## expected the legislative text by which the value of the variable is fixed source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION FIXED YEAR ## -## Ends in an error in state: 255. +## Ends in an error in state: 259. ## ## assertion -> FIXED . qident BY ident [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -500,7 +500,7 @@ expected the name of the variable that should be fixed source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION UNDER_CONDITION TRUE CONSEQUENCE BY ## -## Ends in an error in state: 259. +## Ends in an error in state: 263. ## ## assertion -> option(condition_consequence) . assertion_base [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -512,7 +512,7 @@ expected an expression for this definition under condition source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION UNDER_CONDITION TRUE THEN ## -## Ends in an error in state: 263. +## Ends in an error in state: 267. ## ## condition_consequence -> condition . CONSEQUENCE [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FILLED FALSE EXISTS DEFINED_AS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -524,20 +524,20 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 70, spurious reduction of production primitive_expression -> small_expression -## In state 109, spurious reduction of production base_expression -> primitive_expression -## In state 144, spurious reduction of production mult_expression -> base_expression -## In state 131, spurious reduction of production sum_expression -> mult_expression -## In state 153, spurious reduction of production compare_expression -> sum_expression -## In state 181, spurious reduction of production logical_expression -> compare_expression -## In state 203, spurious reduction of production expression -> logical_expression -## In state 254, spurious reduction of production condition -> UNDER_CONDITION expression +## In state 112, spurious reduction of production base_expression -> primitive_expression +## In state 147, spurious reduction of production mult_expression -> base_expression +## In state 134, spurious reduction of production sum_expression -> mult_expression +## In state 156, spurious reduction of production compare_expression -> sum_expression +## In state 184, spurious reduction of production logical_expression -> compare_expression +## In state 207, spurious reduction of production expression -> logical_expression +## In state 258, spurious reduction of production condition -> UNDER_CONDITION expression ## expected a consequence for this definition under condition source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION UNDER_CONDITION YEAR ## -## Ends in an error in state: 253. +## Ends in an error in state: 257. ## ## condition -> UNDER_CONDITION . expression [ CONSEQUENCE ] ## @@ -549,7 +549,7 @@ expected an expression for this condition source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES IDENT UNDER_CONDITION ## -## Ends in an error in state: 243. +## Ends in an error in state: 247. ## ## assertion -> VARIES qident . WITH_V base_expression option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -560,15 +560,15 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 250, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident -## In state 242, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) +## In state 254, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident +## In state 246, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) ## expected an indication about what this variable varies with source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES IDENT WITH_V TRUE THEN ## -## Ends in an error in state: 245. +## Ends in an error in state: 249. ## ## assertion -> VARIES qident WITH_V base_expression . option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -580,14 +580,14 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 70, spurious reduction of production primitive_expression -> small_expression -## In state 109, spurious reduction of production base_expression -> primitive_expression +## In state 112, spurious reduction of production base_expression -> primitive_expression ## expected an indication about the variation sense of the variable, or a new scope item source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES IDENT WITH_V YEAR ## -## Ends in an error in state: 244. +## Ends in an error in state: 248. ## ## assertion -> VARIES qident WITH_V . base_expression option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -599,7 +599,7 @@ the variable varies with an expression that was expected here source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES YEAR ## -## Ends in an error in state: 241. +## Ends in an error in state: 245. ## ## assertion -> VARIES . qident WITH_V base_expression option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -611,7 +611,7 @@ expecting the name of the varying variable source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION YEAR ## -## Ends in an error in state: 240. +## Ends in an error in state: 244. ## ## scope_item -> ASSERTION . assertion [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -623,7 +623,7 @@ expected an expression that shoud be asserted during execution source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT DEFINED_AS YEAR ## -## Ends in an error in state: 289. +## Ends in an error in state: 293. ## ## definition -> option(label) option(exception_to) DEFINITION qident option(definition_parameters) option(condition_consequence) DEFINED_AS . expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -635,7 +635,7 @@ expected an expression for the definition source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT OF IDENT DECREASING ## -## Ends in an error in state: 287. +## Ends in an error in state: 291. ## ## definition -> option(label) option(exception_to) DEFINITION qident option(definition_parameters) . option(condition_consequence) DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -647,7 +647,7 @@ expected a expression for defining this function, introduced by the defined as k source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT UNDER_CONDITION CARDINAL CONSEQUENCE DECREASING ## -## Ends in an error in state: 288. +## Ends in an error in state: 292. ## ## definition -> option(label) option(exception_to) DEFINITION qident option(definition_parameters) option(condition_consequence) . DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -659,7 +659,7 @@ expected an expression for the consequence of this definition under condition source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT WITH_V ## -## Ends in an error in state: 286. +## Ends in an error in state: 290. ## ## definition -> option(label) option(exception_to) DEFINITION qident . option(definition_parameters) option(condition_consequence) DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -670,15 +670,15 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 250, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident -## In state 242, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) +## In state 254, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident +## In state 246, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) ## expected the defined as keyword to introduce the definition of this variable source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION YEAR ## -## Ends in an error in state: 285. +## Ends in an error in state: 289. ## ## definition -> option(label) option(exception_to) DEFINITION . qident option(definition_parameters) option(condition_consequence) DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -690,7 +690,7 @@ expected the name of the variable you want to define source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON EXCEPTION IDENT DEFINED_AS ## -## Ends in an error in state: 272. +## Ends in an error in state: 276. ## ## definition -> option(label) option(exception_to) . DEFINITION qident option(definition_parameters) option(condition_consequence) DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## rule -> option(label) option(exception_to) . RULE rule_expr option(condition_consequence) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] @@ -703,7 +703,7 @@ expected a rule or a definition after the exception declaration source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON EXCEPTION YEAR ## -## Ends in an error in state: 269. +## Ends in an error in state: 273. ## ## exception_to -> EXCEPTION . option(ident) [ RULE DEFINITION ] ## @@ -715,7 +715,7 @@ expected the label to which the exception is referring back source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON LABEL IDENT DEFINED_AS ## -## Ends in an error in state: 268. +## Ends in an error in state: 272. ## ## definition -> option(label) . option(exception_to) DEFINITION qident option(definition_parameters) option(condition_consequence) DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## rule -> option(label) . option(exception_to) RULE rule_expr option(condition_consequence) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] @@ -728,7 +728,7 @@ expected a rule or a definition after the label declaration source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON LABEL YEAR ## -## Ends in an error in state: 238. +## Ends in an error in state: 242. ## ## label -> LABEL . ident [ RULE EXCEPTION DEFINITION ] ## @@ -740,7 +740,7 @@ expected the name of the label source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT DOT YEAR ## -## Ends in an error in state: 251. +## Ends in an error in state: 255. ## ## separated_nonempty_list(DOT,ident) -> ident DOT . separated_nonempty_list(DOT,ident) [ WITH_V UNDER_CONDITION OF NOT FILLED DEFINED_AS BY ] ## @@ -752,7 +752,7 @@ expected a struct field or a sub-scope context item after the dot source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT NOT FALSE ## -## Ends in an error in state: 278. +## Ends in an error in state: 282. ## ## rule_consequence -> option(NOT) . FILLED [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -764,7 +764,7 @@ expected the filled keyword the this rule source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT OF IDENT YEAR ## -## Ends in an error in state: 274. +## Ends in an error in state: 278. ## ## rule -> option(label) option(exception_to) RULE rule_expr . option(condition_consequence) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -776,7 +776,7 @@ expected the expression of the rule source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT OF YEAR ## -## Ends in an error in state: 281. +## Ends in an error in state: 285. ## ## definition_parameters -> OF . ident [ UNDER_CONDITION NOT FILLED DEFINED_AS ] ## @@ -788,7 +788,7 @@ expected the name of the parameter for this dependent variable source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT UNDER_CONDITION CARDINAL CONSEQUENCE FALSE ## -## Ends in an error in state: 275. +## Ends in an error in state: 279. ## ## rule -> option(label) option(exception_to) RULE rule_expr option(condition_consequence) . rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -800,7 +800,7 @@ expected filled or not filled for a rule consequence source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT WITH_V ## -## Ends in an error in state: 280. +## Ends in an error in state: 284. ## ## rule_expr -> qident . option(definition_parameters) [ UNDER_CONDITION NOT FILLED ] ## @@ -811,15 +811,15 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 250, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident -## In state 242, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) +## In state 254, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident +## In state 246, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) ## expected a condition or a consequence for this rule source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT YEAR ## -## Ends in an error in state: 250. +## Ends in an error in state: 254. ## ## separated_nonempty_list(DOT,ident) -> ident . [ WITH_V UNDER_CONDITION OF NOT FILLED DEFINED_AS BY ] ## separated_nonempty_list(DOT,ident) -> ident . DOT separated_nonempty_list(DOT,ident) [ WITH_V UNDER_CONDITION OF NOT FILLED DEFINED_AS BY ] @@ -832,7 +832,7 @@ expected a condition or a consequence for this rule, or the rest of the variable source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE YEAR ## -## Ends in an error in state: 273. +## Ends in an error in state: 277. ## ## rule -> option(label) option(exception_to) RULE . rule_expr option(condition_consequence) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -844,7 +844,7 @@ expected the name of the variable subject to the rule source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON YEAR ## -## Ends in an error in state: 237. +## Ends in an error in state: 241. ## ## code_item -> SCOPE constructor option(scope_use_condition) COLON . nonempty_list(scope_item) [ SCOPE END_CODE DECLARATION ] ## @@ -856,7 +856,7 @@ expected a scope use item: a rule, definition or assertion source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CARDINAL YEAR ## -## Ends in an error in state: 106. +## Ends in an error in state: 109. ## ## aggregate_func -> CARDINAL . [ FOR ] ## primitive_expression -> CARDINAL . [ WITH THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] @@ -869,11 +869,11 @@ expected the keyword following cardinal to compute the number of elements in a s source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR CONTENT TRUE YEAR ## -## Ends in an error in state: 189. +## Ends in an error in state: 194. ## ## enum_inject_content -> CONTENT small_expression . [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## small_expression -> small_expression . ARROW constructor [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DOT DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ] -## small_expression -> small_expression . DOT ident [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DOT DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ] +## small_expression -> small_expression . DOT option(terminated(constructor,DOT)) ident [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DOT DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ] ## ## The known suffix of the stack is as follows: ## CONTENT small_expression @@ -883,7 +883,7 @@ the expression for the content of the enum case is already well-formed, expected source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR CONTENT YEAR ## -## Ends in an error in state: 188. +## Ends in an error in state: 193. ## ## enum_inject_content -> CONTENT . small_expression [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -896,7 +896,7 @@ expected an expression for the content of this enum case source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR LBRACKET ALT IDENT COLON CARDINAL ALT YEAR ## -## Ends in an error in state: 102. +## Ends in an error in state: 105. ## ## separated_nonempty_list(ALT,struct_content_field) -> struct_content_field ALT . separated_nonempty_list(ALT,struct_content_field) [ RBRACKET ] ## @@ -908,7 +908,7 @@ expected the name of the structure field source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR LBRACKET ALT IDENT COLON CARDINAL THEN ## -## Ends in an error in state: 101. +## Ends in an error in state: 104. ## ## separated_nonempty_list(ALT,struct_content_field) -> struct_content_field . [ RBRACKET ] ## separated_nonempty_list(ALT,struct_content_field) -> struct_content_field . ALT separated_nonempty_list(ALT,struct_content_field) [ RBRACKET ] @@ -920,20 +920,20 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 106, spurious reduction of production primitive_expression -> CARDINAL -## In state 109, spurious reduction of production base_expression -> primitive_expression -## In state 144, spurious reduction of production mult_expression -> base_expression -## In state 131, spurious reduction of production sum_expression -> mult_expression -## In state 153, spurious reduction of production compare_expression -> sum_expression -## In state 181, spurious reduction of production logical_expression -> compare_expression -## In state 180, spurious reduction of production struct_content_field -> ident COLON logical_expression +## In state 109, spurious reduction of production primitive_expression -> CARDINAL +## In state 112, spurious reduction of production base_expression -> primitive_expression +## In state 147, spurious reduction of production mult_expression -> base_expression +## In state 134, spurious reduction of production sum_expression -> mult_expression +## In state 156, spurious reduction of production compare_expression -> sum_expression +## In state 184, spurious reduction of production logical_expression -> compare_expression +## In state 183, spurious reduction of production struct_content_field -> ident COLON logical_expression ## expected another structure field or the closing bracket source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR LBRACKET ALT IDENT COLON YEAR ## -## Ends in an error in state: 105. +## Ends in an error in state: 108. ## ## struct_content_field -> ident COLON . logical_expression [ RBRACKET ALT ] ## @@ -945,7 +945,7 @@ expected the expression for this struct field source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR LBRACKET ALT IDENT YEAR ## -## Ends in an error in state: 104. +## Ends in an error in state: 107. ## ## struct_content_field -> ident . COLON logical_expression [ RBRACKET ALT ] ## @@ -957,9 +957,9 @@ expected a colon source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR LBRACKET ALT YEAR ## -## Ends in an error in state: 100. +## Ends in an error in state: 103. ## -## struct_or_enum_inject_content -> LBRACKET ALT . separated_nonempty_list(ALT,struct_content_field) RBRACKET [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] +## struct_inject_content -> LBRACKET ALT . separated_nonempty_list(ALT,struct_content_field) RBRACKET [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## ## The known suffix of the stack is as follows: ## LBRACKET ALT @@ -969,9 +969,9 @@ expected the name of the structure field source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR LBRACKET YEAR ## -## Ends in an error in state: 99. +## Ends in an error in state: 102. ## -## struct_or_enum_inject_content -> LBRACKET . ALT separated_nonempty_list(ALT,struct_content_field) RBRACKET [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] +## struct_inject_content -> LBRACKET . ALT separated_nonempty_list(ALT,struct_content_field) RBRACKET [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## ## The known suffix of the stack is as follows: ## LBRACKET @@ -981,9 +981,10 @@ expected structure fields introduced by -- source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR YEAR ## -## Ends in an error in state: 98. +## Ends in an error in state: 101. ## -## struct_or_enum_inject -> constructor . struct_or_enum_inject_content [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] +## struct_or_enum_inject -> constructor . option(terminated(constructor,DOT)) option(enum_inject_content) [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] +## struct_or_enum_inject -> constructor . struct_inject_content [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## ## The known suffix of the stack is as follows: ## constructor @@ -993,7 +994,7 @@ expected a payload for the enum case constructor, or the rest of the expression source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MAXIMUM TEXT INIT YEAR ## -## Ends in an error in state: 195. +## Ends in an error in state: 199. ## ## aggregate_func -> CONTENT MAXIMUM typ_base INIT . primitive_expression [ FOR ] ## @@ -1005,7 +1006,7 @@ expected the initial expression for the maximum source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MAXIMUM TEXT YEAR ## -## Ends in an error in state: 194. +## Ends in an error in state: 198. ## ## aggregate_func -> CONTENT MAXIMUM typ_base . INIT primitive_expression [ FOR ] ## @@ -1017,7 +1018,7 @@ expected the "initial" keyword introducing the initial expression for the maximu source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MAXIMUM YEAR ## -## Ends in an error in state: 193. +## Ends in an error in state: 197. ## ## aggregate_func -> CONTENT MAXIMUM . typ_base INIT primitive_expression [ FOR ] ## @@ -1029,7 +1030,7 @@ expected the type of the elements compared to get the maximum source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MINIMUM TEXT INIT YEAR ## -## Ends in an error in state: 87. +## Ends in an error in state: 90. ## ## aggregate_func -> CONTENT MINIMUM typ_base INIT . primitive_expression [ FOR ] ## @@ -1041,7 +1042,7 @@ expected the initial expression for the minimum source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MINIMUM TEXT YEAR ## -## Ends in an error in state: 86. +## Ends in an error in state: 89. ## ## aggregate_func -> CONTENT MINIMUM typ_base . INIT primitive_expression [ FOR ] ## @@ -1053,7 +1054,7 @@ expected the "initial" keyword introducing the initial expression for the minimu source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MINIMUM YEAR ## -## Ends in an error in state: 85. +## Ends in an error in state: 88. ## ## aggregate_func -> CONTENT MINIMUM . typ_base INIT primitive_expression [ FOR ] ## @@ -1065,7 +1066,7 @@ expected the type of the elements compared to get the minimum source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT YEAR ## -## Ends in an error in state: 84. +## Ends in an error in state: 87. ## ## aggregate_func -> CONTENT . MAXIMUM typ_base INIT primitive_expression [ FOR ] ## aggregate_func -> CONTENT . MINIMUM typ_base INIT primitive_expression [ FOR ] @@ -1078,7 +1079,7 @@ this is the start of an arg-maximum or arg-minimum expression source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN CARDINAL SUCH THAT YEAR ## -## Ends in an error in state: 211. +## Ends in an error in state: 215. ## ## expression -> exists_prefix . expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1090,7 +1091,7 @@ expected an expression for the existential test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN TRUE SUCH YEAR ## -## Ends in an error in state: 217. +## Ends in an error in state: 221. ## ## exists_prefix -> exists_marked ident IN primitive_expression SUCH . THAT [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1102,7 +1103,7 @@ expected a keyword to complete the "such that" construction source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN TRUE WITH ## -## Ends in an error in state: 216. +## Ends in an error in state: 220. ## ## exists_prefix -> exists_marked ident IN primitive_expression . SUCH THAT [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1120,7 +1121,7 @@ expected a keyword to form the "such that" expression for the existential test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN YEAR ## -## Ends in an error in state: 215. +## Ends in an error in state: 219. ## ## exists_prefix -> exists_marked ident IN . primitive_expression SUCH THAT [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1132,7 +1133,7 @@ expected an expression that designates the set subject to the existential test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT YEAR ## -## Ends in an error in state: 214. +## Ends in an error in state: 218. ## ## exists_prefix -> exists_marked ident . IN primitive_expression SUCH THAT [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1144,7 +1145,7 @@ expected the "in" keyword to continue this existential test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS YEAR ## -## Ends in an error in state: 213. +## Ends in an error in state: 217. ## ## exists_prefix -> exists_marked . ident IN primitive_expression SUCH THAT [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1156,7 +1157,7 @@ expected an identifier that will designate the existential witness for the test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT IN CARDINAL WE_HAVE YEAR ## -## Ends in an error in state: 204. +## Ends in an error in state: 208. ## ## expression -> forall_prefix . expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1168,7 +1169,7 @@ expected an expression for the universal test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT IN TRUE WITH ## -## Ends in an error in state: 208. +## Ends in an error in state: 212. ## ## forall_prefix -> for_all_marked ident IN primitive_expression . WE_HAVE [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1186,7 +1187,7 @@ expected the "we have" keyword for this universal test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT IN YEAR ## -## Ends in an error in state: 207. +## Ends in an error in state: 211. ## ## forall_prefix -> for_all_marked ident IN . primitive_expression WE_HAVE [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1198,7 +1199,7 @@ expected the expression designating the set on which to perform the universal te source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT YEAR ## -## Ends in an error in state: 206. +## Ends in an error in state: 210. ## ## forall_prefix -> for_all_marked ident . IN primitive_expression WE_HAVE [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1210,7 +1211,7 @@ expected the "in" keyword for the rest of the universal test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL YEAR ## -## Ends in an error in state: 205. +## Ends in an error in state: 209. ## ## forall_prefix -> for_all_marked . ident IN primitive_expression WE_HAVE [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1222,7 +1223,7 @@ expected an identifier for the bound variable of the universal test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR YEAR ## -## Ends in an error in state: 200. +## Ends in an error in state: 204. ## ## for_all_marked -> FOR . ALL [ IDENT ] ## @@ -1234,7 +1235,7 @@ expected the "all" keyword to mean the "for all" construction of the universal t source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE SEMICOLON ## -## Ends in an error in state: 219. +## Ends in an error in state: 223. ## ## expression -> IF expression . THEN expression ELSE base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1246,19 +1247,19 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 70, spurious reduction of production primitive_expression -> small_expression -## In state 109, spurious reduction of production base_expression -> primitive_expression -## In state 144, spurious reduction of production mult_expression -> base_expression -## In state 131, spurious reduction of production sum_expression -> mult_expression -## In state 153, spurious reduction of production compare_expression -> sum_expression -## In state 181, spurious reduction of production logical_expression -> compare_expression -## In state 203, spurious reduction of production expression -> logical_expression +## In state 112, spurious reduction of production base_expression -> primitive_expression +## In state 147, spurious reduction of production mult_expression -> base_expression +## In state 134, spurious reduction of production sum_expression -> mult_expression +## In state 156, spurious reduction of production compare_expression -> sum_expression +## In state 184, spurious reduction of production logical_expression -> compare_expression +## In state 207, spurious reduction of production expression -> logical_expression ## expected the "then" keyword as the conditional expression is complete source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE THEN TRUE ELSE YEAR ## -## Ends in an error in state: 222. +## Ends in an error in state: 226. ## ## expression -> IF expression THEN expression ELSE . base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1270,7 +1271,7 @@ expected an expression for the "else" branch of this conditional construction source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE THEN TRUE THEN ## -## Ends in an error in state: 221. +## Ends in an error in state: 225. ## ## expression -> IF expression THEN expression . ELSE base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1282,19 +1283,19 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 70, spurious reduction of production primitive_expression -> small_expression -## In state 109, spurious reduction of production base_expression -> primitive_expression -## In state 144, spurious reduction of production mult_expression -> base_expression -## In state 131, spurious reduction of production sum_expression -> mult_expression -## In state 153, spurious reduction of production compare_expression -> sum_expression -## In state 181, spurious reduction of production logical_expression -> compare_expression -## In state 203, spurious reduction of production expression -> logical_expression +## In state 112, spurious reduction of production base_expression -> primitive_expression +## In state 147, spurious reduction of production mult_expression -> base_expression +## In state 134, spurious reduction of production sum_expression -> mult_expression +## In state 156, spurious reduction of production compare_expression -> sum_expression +## In state 184, spurious reduction of production logical_expression -> compare_expression +## In state 207, spurious reduction of production expression -> logical_expression ## expected the "else" branch of this conditional expression as the "then" branch is complete source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE THEN YEAR ## -## Ends in an error in state: 220. +## Ends in an error in state: 224. ## ## expression -> IF expression THEN . expression ELSE base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1306,7 +1307,7 @@ expected an expression the for the "then" branch of the conditiona source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF YEAR ## -## Ends in an error in state: 199. +## Ends in an error in state: 203. ## ## expression -> IF . expression THEN expression ELSE base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1318,7 +1319,7 @@ expected an expression for the test of the conditional source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION INT_LITERAL WITH_V ## -## Ends in an error in state: 89. +## Ends in an error in state: 92. ## ## literal -> num_literal . option(unit_literal) [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DOT DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ] ## @@ -1330,7 +1331,7 @@ expected a unit for this literal, or a valid operator to complete the expression source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION LPAREN TRUE THEN ## -## Ends in an error in state: 224. +## Ends in an error in state: 228. ## ## atomic_expression -> LPAREN expression . RPAREN [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DOT DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ] ## @@ -1342,12 +1343,12 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 70, spurious reduction of production primitive_expression -> small_expression -## In state 109, spurious reduction of production base_expression -> primitive_expression -## In state 144, spurious reduction of production mult_expression -> base_expression -## In state 131, spurious reduction of production sum_expression -> mult_expression -## In state 153, spurious reduction of production compare_expression -> sum_expression -## In state 181, spurious reduction of production logical_expression -> compare_expression -## In state 203, spurious reduction of production expression -> logical_expression +## In state 112, spurious reduction of production base_expression -> primitive_expression +## In state 147, spurious reduction of production mult_expression -> base_expression +## In state 134, spurious reduction of production sum_expression -> mult_expression +## In state 156, spurious reduction of production compare_expression -> sum_expression +## In state 184, spurious reduction of production logical_expression -> compare_expression +## In state 207, spurious reduction of production expression -> logical_expression ## unmatched parenthesis that should have been closed by here @@ -1366,7 +1367,7 @@ expected an expression inside the parenthesis source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION LSQUARE TRUE SEMICOLON YEAR ## -## Ends in an error in state: 231. +## Ends in an error in state: 235. ## ## separated_nonempty_list(SEMICOLON,expression) -> expression SEMICOLON . separated_nonempty_list(SEMICOLON,expression) [ RSQUARE ] ## @@ -1378,7 +1379,7 @@ expected another element of the collection source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION LSQUARE TRUE THEN ## -## Ends in an error in state: 230. +## Ends in an error in state: 234. ## ## separated_nonempty_list(SEMICOLON,expression) -> expression . [ RSQUARE ] ## separated_nonempty_list(SEMICOLON,expression) -> expression . SEMICOLON separated_nonempty_list(SEMICOLON,expression) [ RSQUARE ] @@ -1391,12 +1392,12 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 70, spurious reduction of production primitive_expression -> small_expression -## In state 109, spurious reduction of production base_expression -> primitive_expression -## In state 144, spurious reduction of production mult_expression -> base_expression -## In state 131, spurious reduction of production sum_expression -> mult_expression -## In state 153, spurious reduction of production compare_expression -> sum_expression -## In state 181, spurious reduction of production logical_expression -> compare_expression -## In state 203, spurious reduction of production expression -> logical_expression +## In state 112, spurious reduction of production base_expression -> primitive_expression +## In state 147, spurious reduction of production mult_expression -> base_expression +## In state 134, spurious reduction of production sum_expression -> mult_expression +## In state 156, spurious reduction of production compare_expression -> sum_expression +## In state 184, spurious reduction of production logical_expression -> compare_expression +## In state 207, spurious reduction of production expression -> logical_expression ## expected a semicolon or a right square bracket after the collection element @@ -1415,7 +1416,7 @@ expected a collection element source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MAP FOR IDENT IN TRUE OF YEAR ## -## Ends in an error in state: 126. +## Ends in an error in state: 129. ## ## aggregate -> aggregate_func FOR ident IN primitive_expression OF . base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1427,7 +1428,7 @@ expected an expression for the map predicate source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MAP FOR IDENT IN TRUE WITH ## -## Ends in an error in state: 125. +## Ends in an error in state: 128. ## ## aggregate -> aggregate_func FOR ident IN primitive_expression . OF base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1445,7 +1446,7 @@ expected the "of" keyword to introduce the map predicate source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MAP FOR IDENT IN YEAR ## -## Ends in an error in state: 124. +## Ends in an error in state: 127. ## ## aggregate -> aggregate_func FOR ident IN . primitive_expression OF base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1457,7 +1458,7 @@ expected the collection argument to map source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MAP FOR IDENT YEAR ## -## Ends in an error in state: 123. +## Ends in an error in state: 126. ## ## aggregate -> aggregate_func FOR ident . IN primitive_expression OF base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1469,7 +1470,7 @@ expected the "in" keyword to introduce the collection argument to map source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MAP FOR YEAR ## -## Ends in an error in state: 122. +## Ends in an error in state: 125. ## ## aggregate -> aggregate_func FOR . ident IN primitive_expression OF base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1481,7 +1482,7 @@ expected the identifier for the map predicate source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MAP YEAR ## -## Ends in an error in state: 121. +## Ends in an error in state: 124. ## ## aggregate -> aggregate_func . FOR ident IN primitive_expression OF base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1493,7 +1494,7 @@ expected the "for" keyword to introduce the identifier for the map predicate source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WE_HAVE ## -## Ends in an error in state: 75. +## Ends in an error in state: 78. ## ## expression -> MATCH primitive_expression . WITH match_arms [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1511,7 +1512,7 @@ expected the "with patter" keyword to complete the pattern matching expression source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT CONSTRUCTOR COLON CARDINAL RBRACKET ## -## Ends in an error in state: 78. +## Ends in an error in state: 81. ## ## match_arms -> ALT match_arm . match_arms [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1522,20 +1523,20 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 106, spurious reduction of production primitive_expression -> CARDINAL -## In state 109, spurious reduction of production base_expression -> primitive_expression -## In state 144, spurious reduction of production mult_expression -> base_expression -## In state 131, spurious reduction of production sum_expression -> mult_expression -## In state 153, spurious reduction of production compare_expression -> sum_expression -## In state 181, spurious reduction of production logical_expression -> compare_expression -## In state 197, spurious reduction of production match_arm -> constructor_binding COLON logical_expression +## In state 109, spurious reduction of production primitive_expression -> CARDINAL +## In state 112, spurious reduction of production base_expression -> primitive_expression +## In state 147, spurious reduction of production mult_expression -> base_expression +## In state 134, spurious reduction of production sum_expression -> mult_expression +## In state 156, spurious reduction of production compare_expression -> sum_expression +## In state 184, spurious reduction of production logical_expression -> compare_expression +## In state 201, spurious reduction of production match_arm -> constructor_binding COLON logical_expression ## expected another match case or the rest of the expression since the previous match case is complete source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT CONSTRUCTOR COLON YEAR ## -## Ends in an error in state: 81. +## Ends in an error in state: 84. ## ## match_arm -> constructor_binding COLON . logical_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ALT ] ## @@ -1547,7 +1548,7 @@ expected an expression for this pattern matching case source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT CONSTRUCTOR OF CONSTRUCTOR YEAR ## -## Ends in an error in state: 115. +## Ends in an error in state: 118. ## ## optional_binding -> OF constructor . constructor_binding [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1559,7 +1560,7 @@ expected a colon or a binding for the enum constructor payload source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT CONSTRUCTOR OF IDENT YEAR ## -## Ends in an error in state: 80. +## Ends in an error in state: 83. ## ## match_arm -> constructor_binding . COLON logical_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ALT ] ## @@ -1571,7 +1572,7 @@ expected a colon and then the expression for this matching case source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT CONSTRUCTOR OF YEAR ## -## Ends in an error in state: 113. +## Ends in an error in state: 116. ## ## optional_binding -> OF . ident [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## optional_binding -> OF . constructor constructor_binding [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] @@ -1584,7 +1585,7 @@ expected an identifier for this enum case binding source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT CONSTRUCTOR YEAR ## -## Ends in an error in state: 112. +## Ends in an error in state: 115. ## ## constructor_binding -> constructor . optional_binding [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1596,7 +1597,7 @@ expected a binding for the constructor payload, or a colon and the matching case source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT YEAR ## -## Ends in an error in state: 77. +## Ends in an error in state: 80. ## ## match_arms -> ALT . match_arm match_arms [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1608,7 +1609,7 @@ expected the name of the constructor for the enum case in the pattern matching source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH YEAR ## -## Ends in an error in state: 76. +## Ends in an error in state: 79. ## ## expression -> MATCH primitive_expression WITH . match_arms [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1704,7 +1705,7 @@ expected the type of the elements compared for the minimum source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MINUSMONEY YEAR ## -## Ends in an error in state: 107. +## Ends in an error in state: 110. ## ## sum_expression -> sum_unop . sum_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET OR NOT_EQUAL LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1716,7 +1717,7 @@ expected an expression to take the opposite of source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION NOT YEAR ## -## Ends in an error in state: 178. +## Ends in an error in state: 181. ## ## logical_expression -> logical_unop . compare_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ALT ] ## @@ -1745,7 +1746,7 @@ expected the "for" keyword to spell the aggregation source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE ARROW YEAR ## -## Ends in an error in state: 73. +## Ends in an error in state: 76. ## ## small_expression -> small_expression ARROW . constructor [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DOT DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ] ## @@ -1757,7 +1758,7 @@ expected a constructor, to get the payload of this enum case source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE ASSERTION ## -## Ends in an error in state: 236. +## Ends in an error in state: 240. ## ## code_item -> SCOPE constructor option(scope_use_condition) . COLON nonempty_list(scope_item) [ SCOPE END_CODE DECLARATION ] ## @@ -1769,14 +1770,14 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 70, spurious reduction of production primitive_expression -> small_expression -## In state 109, spurious reduction of production base_expression -> primitive_expression -## In state 144, spurious reduction of production mult_expression -> base_expression -## In state 131, spurious reduction of production sum_expression -> mult_expression -## In state 153, spurious reduction of production compare_expression -> sum_expression -## In state 181, spurious reduction of production logical_expression -> compare_expression -## In state 203, spurious reduction of production expression -> logical_expression -## In state 234, spurious reduction of production scope_use_condition -> UNDER_CONDITION expression -## In state 235, spurious reduction of production option(scope_use_condition) -> scope_use_condition +## In state 112, spurious reduction of production base_expression -> primitive_expression +## In state 147, spurious reduction of production mult_expression -> base_expression +## In state 134, spurious reduction of production sum_expression -> mult_expression +## In state 156, spurious reduction of production compare_expression -> sum_expression +## In state 184, spurious reduction of production logical_expression -> compare_expression +## In state 207, spurious reduction of production expression -> logical_expression +## In state 238, spurious reduction of production scope_use_condition -> UNDER_CONDITION expression +## In state 239, spurious reduction of production option(scope_use_condition) -> scope_use_condition ## expected a colon after the scope use precondition @@ -1785,7 +1786,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## ## Ends in an error in state: 71. ## -## small_expression -> small_expression DOT . ident [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DOT DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ] +## small_expression -> small_expression DOT . option(terminated(constructor,DOT)) ident [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DOT DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ] ## ## The known suffix of the stack is as follows: ## small_expression DOT @@ -1795,7 +1796,7 @@ expected an identifier standing for a struct field or a subscope name source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE IN YEAR ## -## Ends in an error in state: 129. +## Ends in an error in state: 132. ## ## base_expression -> primitive_expression IN . base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1807,7 +1808,7 @@ expected an expression standing for the set you want to test for membership source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE INCREASING ## -## Ends in an error in state: 144. +## Ends in an error in state: 147. ## ## mult_expression -> base_expression . [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## mult_expression -> base_expression . mult_op mult_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] @@ -1820,14 +1821,14 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 70, spurious reduction of production primitive_expression -> small_expression -## In state 109, spurious reduction of production base_expression -> primitive_expression +## In state 112, spurious reduction of production base_expression -> primitive_expression ## expected an operator to compose the expression on the left source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE MULT YEAR ## -## Ends in an error in state: 151. +## Ends in an error in state: 154. ## ## mult_expression -> base_expression mult_op . mult_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1839,7 +1840,7 @@ expected an expression on the right side of the multiplication or division opera source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE NOT_EQUAL YEAR ## -## Ends in an error in state: 176. +## Ends in an error in state: 179. ## ## compare_expression -> sum_expression compare_op . compare_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET OR LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1851,7 +1852,7 @@ expected an expression on the right side of the comparison operator source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE OF YEAR ## -## Ends in an error in state: 118. +## Ends in an error in state: 121. ## ## base_expression -> primitive_expression OF . base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1863,7 +1864,7 @@ expected an expression for the argument of this function call source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE OR YEAR ## -## Ends in an error in state: 184. +## Ends in an error in state: 187. ## ## logical_expression -> compare_expression logical_op . logical_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ALT ] ## @@ -1875,7 +1876,7 @@ expected an expression on the right side of the logical operator source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE PLUSMONEY YEAR ## -## Ends in an error in state: 142. +## Ends in an error in state: 145. ## ## sum_expression -> mult_expression sum_op . sum_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET OR NOT_EQUAL LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1887,7 +1888,7 @@ expected an expression on the right side of the sum or minus operator source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE WE_HAVE ## -## Ends in an error in state: 109. +## Ends in an error in state: 112. ## ## base_expression -> primitive_expression . [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## base_expression -> primitive_expression . OF base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] @@ -1908,7 +1909,7 @@ expected an operator to compose the expression on the left with source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE WITH YEAR ## -## Ends in an error in state: 110. +## Ends in an error in state: 113. ## ## base_expression -> primitive_expression WITH . constructor_binding [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1924,7 +1925,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## ## primitive_expression -> small_expression . [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## small_expression -> small_expression . ARROW constructor [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DOT DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ] -## small_expression -> small_expression . DOT ident [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DOT DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ] +## small_expression -> small_expression . DOT option(terminated(constructor,DOT)) ident [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DOT DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ] ## ## The known suffix of the stack is as follows: ## small_expression @@ -2042,7 +2043,7 @@ expected the name of the scope you want to use source_file_or_master: LAW_ARTICLE BEGIN_CODE YEAR ## -## Ends in an error in state: 360. +## Ends in an error in state: 364. ## ## law_article_item -> BEGIN_CODE . code END_CODE [ LAW_TEXT LAW_INCLUDE LAW_HEADING LAW_ARTICLE EOF BEGIN_METADATA BEGIN_CODE ] ## @@ -2054,7 +2055,7 @@ expected a declaration or a scope use source_file_or_master: LAW_ARTICLE LAW_TEXT YEAR ## -## Ends in an error in state: 365. +## Ends in an error in state: 369. ## ## law_articles_items -> law_article_item . law_articles_items [ LAW_INCLUDE LAW_HEADING LAW_ARTICLE EOF BEGIN_METADATA ] ## @@ -2066,7 +2067,7 @@ expected a code block, a metadata block, more law text or a heading source_file_or_master: LAW_ARTICLE YEAR ## -## Ends in an error in state: 359. +## Ends in an error in state: 363. ## ## source_file_article -> law_article . law_articles_items [ LAW_INCLUDE LAW_HEADING LAW_ARTICLE EOF BEGIN_METADATA ] ## @@ -2078,7 +2079,7 @@ expected a code block, a metadata block, more law text or a heading source_file_or_master: LAW_INCLUDE YEAR ## -## Ends in an error in state: 354. +## Ends in an error in state: 358. ## ## source_file_after_text -> source_file_item . list(law_intermediate_text) source_file_after_text [ # ] ## @@ -2090,7 +2091,7 @@ expected an article title, another heading or some text source_file_or_master: LAW_TEXT YEAR ## -## Ends in an error in state: 369. +## Ends in an error in state: 373. ## ## list(law_intermediate_text) -> law_intermediate_text . list(law_intermediate_text) [ LAW_INCLUDE LAW_HEADING LAW_ARTICLE EOF BEGIN_METADATA ] ## diff --git a/src/catala/catala_surface/parser.mly b/src/catala/catala_surface/parser.mly index c576a2b9..85463d84 100644 --- a/src/catala/catala_surface/parser.mly +++ b/src/catala/catala_surface/parser.mly @@ -19,11 +19,6 @@ %{ open Ast open Utils - - type struct_or_enum_inject_content = - | StructContent of (ident Pos.marked * expression Pos.marked) list - | EnumContent of expression Pos.marked option - %} %token EOF @@ -124,18 +119,18 @@ struct_content_field: enum_inject_content: | CONTENT e = small_expression { e } -struct_or_enum_inject_content: -| e = option(enum_inject_content) { EnumContent e } -| LBRACKET ALT fields = separated_nonempty_list(ALT, struct_content_field) RBRACKET { - StructContent fields -} +struct_inject_content: +| LBRACKET ALT fields = separated_nonempty_list(ALT, struct_content_field) RBRACKET { fields } struct_or_enum_inject: -| c = constructor data = struct_or_enum_inject_content { - match data with - | EnumContent data -> (EnumInject (c, data), Pos.from_lpos $sloc) - | StructContent fields -> (StructLit (c, fields), Pos.from_lpos $sloc) +| enum = constructor c = option(terminated(constructor, DOT)) data = option(enum_inject_content) { + (* The fully qualified enum is actually the optional part, but it leads to shift/reduce conflicts. + We flip it here *) + match c with + | None -> (EnumInject(None, enum, data), Pos.from_lpos $sloc) + | Some c -> (EnumInject(Some enum, c, data), Pos.from_lpos $sloc) } +| c = constructor fields = struct_inject_content { (StructLit(c, fields), Pos.from_lpos $sloc) } primitive_expression: | e = small_expression { e } diff --git a/src/catala/catala_surface/parser_errors.ml b/src/catala/catala_surface/parser_errors.ml index 15c1aa8e..0aca5ef4 100644 --- a/src/catala/catala_surface/parser_errors.ml +++ b/src/catala/catala_surface/parser_errors.ml @@ -13,11 +13,11 @@ let message s = "expected another inclusion of a Catala file, since this file is a master file which can \ only contain inclusions of other Catala files\n" | 8 -> "expected some text, another heading or a law article\n" - | 369 -> "expected a heading, an article title or some text\n" - | 354 -> "expected an article title, another heading or some text\n" - | 359 -> "expected a code block, a metadata block, more law text or a heading\n" - | 365 -> "expected a code block, a metadata block, more law text or a heading\n" - | 360 -> "expected a declaration or a scope use\n" + | 373 -> "expected a heading, an article title or some text\n" + | 358 -> "expected an article title, another heading or some text\n" + | 363 -> "expected a code block, a metadata block, more law text or a heading\n" + | 369 -> "expected a code block, a metadata block, more law text or a heading\n" + | 364 -> "expected a declaration or a scope use\n" | 22 -> "expected the name of the scope you want to use\n" | 24 -> "expected a scope use precondition or a colon\n" | 25 -> "expected an expression which will act as the condition\n" @@ -28,21 +28,21 @@ let message s = | 31 -> "expected the third component of the date literal\n" | 32 -> "expected a delimiter to finish the date literal\n" | 70 -> "expected an operator to compose the expression on the left with\n" - | 110 -> "expected an enum constructor to test if the expression on the left\n" - | 109 -> "expected an operator to compose the expression on the left with\n" - | 142 -> "expected an expression on the right side of the sum or minus operator\n" - | 184 -> "expected an expression on the right side of the logical operator\n" - | 118 -> "expected an expression for the argument of this function call\n" - | 176 -> "expected an expression on the right side of the comparison operator\n" - | 151 -> "expected an expression on the right side of the multiplication or division operator\n" - | 144 -> "expected an operator to compose the expression on the left\n" - | 129 -> "expected an expression standing for the set you want to test for membership\n" + | 113 -> "expected an enum constructor to test if the expression on the left\n" + | 112 -> "expected an operator to compose the expression on the left with\n" + | 145 -> "expected an expression on the right side of the sum or minus operator\n" + | 187 -> "expected an expression on the right side of the logical operator\n" + | 121 -> "expected an expression for the argument of this function call\n" + | 179 -> "expected an expression on the right side of the comparison operator\n" + | 154 -> "expected an expression on the right side of the multiplication or division operator\n" + | 147 -> "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" | 71 -> "expected an identifier standing for a struct field or a subscope name\n" - | 236 -> "expected a colon after the scope use precondition\n" - | 73 -> "expected a constructor, to get the payload of this enum case\n" + | 240 -> "expected a colon after the scope use precondition\n" + | 76 -> "expected a constructor, to get the payload of this enum case\n" | 35 -> "expected the \"for\" keyword to spell the aggregation\n" - | 178 -> "expected an expression to take the negation of\n" - | 107 -> "expected an expression to take the opposite of\n" + | 181 -> "expected an expression to take the negation of\n" + | 110 -> "expected an expression to take the opposite of\n" | 51 -> "expected the type of the elements compared for the minimum\n" | 52 -> "expected the \"initial\" keyword to introduce the minimum initial expression\n" | 53 -> "expected the minimum initial expression\n" @@ -50,137 +50,137 @@ let message s = | 56 -> "expected the \"initial\" keyword to introduce the maximum initial expression\n" | 57 -> "expected the maximum initial expression\n" | 59 -> "expected an expression to match with\n" - | 76 -> "expected a pattern matching case\n" - | 77 -> "expected the name of the constructor for the enum case in the pattern matching\n" - | 112 -> + | 79 -> "expected a pattern matching case\n" + | 80 -> "expected the name of the constructor for the enum case in the pattern matching\n" + | 115 -> "expected a binding for the constructor payload, or a colon and the matching case expression\n" - | 113 -> "expected an identifier for this enum case binding\n" - | 80 -> "expected a colon and then the expression for this matching case\n" - | 115 -> "expected a colon or a binding for the enum constructor payload\n" - | 81 -> "expected an expression for this pattern matching case\n" - | 78 -> + | 116 -> "expected an identifier for this enum case binding\n" + | 83 -> "expected a colon and then the expression for this matching case\n" + | 118 -> "expected a colon or a binding for the enum constructor payload\n" + | 84 -> "expected an expression for this pattern matching case\n" + | 81 -> "expected another match case or the rest of the expression since the previous match case is \ complete\n" - | 75 -> "expected the \"with patter\" keyword to complete the pattern matching expression\n" - | 121 -> "expected the \"for\" keyword to introduce the identifier for the map predicate\n" - | 122 -> "expected the identifier for the map predicate\n" - | 123 -> "expected the \"in\" keyword to introduce the collection argument to map\n" - | 124 -> "expected the collection argument to map\n" - | 125 -> "expected the \"of\" keyword to introduce the map predicate\n" - | 126 -> "expected an expression for the map predicate\n" + | 78 -> "expected the \"with patter\" keyword to complete the pattern matching expression\n" + | 124 -> "expected the \"for\" keyword to introduce the identifier for the map predicate\n" + | 125 -> "expected the identifier for the map predicate\n" + | 126 -> "expected the \"in\" keyword to introduce the collection argument to map\n" + | 127 -> "expected the collection argument to map\n" + | 128 -> "expected the \"of\" keyword to introduce the map predicate\n" + | 129 -> "expected an expression for the map predicate\n" | 54 -> "expected a collection element\n" - | 230 -> "expected a semicolon or a right square bracket after the collection element \n" - | 231 -> "expected another element of the collection\n" + | 234 -> "expected a semicolon or a right square bracket after the collection element \n" + | 235 -> "expected another element of the collection\n" | 58 -> "expected an expression inside the parenthesis\n" - | 224 -> "unmatched parenthesis that should have been closed by here\n" - | 89 -> "expected a unit for this literal, or a valid operator to complete the expression \n" - | 199 -> "expected an expression for the test of the conditional\n" - | 220 -> "expected an expression the for the \"then\" branch of the conditiona\n" - | 221 -> + | 228 -> "unmatched parenthesis that should have been closed by here\n" + | 92 -> "expected a unit for this literal, or a valid operator to complete the expression \n" + | 203 -> "expected an expression for the test of the conditional\n" + | 224 -> "expected an expression the for the \"then\" branch of the conditiona\n" + | 225 -> "expected the \"else\" branch of this conditional expression as the \"then\" branch is \ complete\n" - | 222 -> "expected an expression for the \"else\" branch of this conditional construction\n" - | 219 -> "expected the \"then\" keyword as the conditional expression is complete\n" - | 200 -> + | 226 -> "expected an expression for the \"else\" branch of this conditional construction\n" + | 223 -> "expected the \"then\" keyword as the conditional expression is complete\n" + | 204 -> "expected the \"all\" keyword to mean the \"for all\" construction of the universal test\n" - | 205 -> "expected an identifier for the bound variable of the universal test\n" - | 206 -> "expected the \"in\" keyword for the rest of the universal test\n" - | 207 -> "expected the expression designating the set on which to perform the universal test\n" - | 208 -> "expected the \"we have\" keyword for this universal test\n" - | 204 -> "expected an expression for the universal test\n" - | 213 -> "expected an identifier that will designate the existential witness for the test\n" - | 214 -> "expected the \"in\" keyword to continue this existential test\n" - | 215 -> "expected an expression that designates the set subject to the existential test\n" - | 216 -> "expected a keyword to form the \"such that\" expression for the existential test\n" - | 217 -> "expected a keyword to complete the \"such that\" construction\n" - | 211 -> "expected an expression for the existential test\n" - | 84 -> "this is the start of an arg-maximum or arg-minimum expression\n" - | 85 -> "expected the type of the elements compared to get the minimum\n" - | 86 -> "expected the \"initial\" keyword introducing the initial expression for the minimum\n" - | 87 -> "expected the initial expression for the minimum\n" - | 193 -> "expected the type of the elements compared to get the maximum\n" - | 194 -> "expected the \"initial\" keyword introducing the initial expression for the maximum\n" - | 195 -> "expected the initial expression for the maximum\n" - | 98 -> + | 209 -> "expected an identifier for the bound variable of the universal test\n" + | 210 -> "expected the \"in\" keyword for the rest of the universal test\n" + | 211 -> "expected the expression designating the set on which to perform the universal test\n" + | 212 -> "expected the \"we have\" keyword for this universal test\n" + | 208 -> "expected an expression for the universal test\n" + | 217 -> "expected an identifier that will designate the existential witness for the test\n" + | 218 -> "expected the \"in\" keyword to continue this existential test\n" + | 219 -> "expected an expression that designates the set subject to the existential test\n" + | 220 -> "expected a keyword to form the \"such that\" expression for the existential test\n" + | 221 -> "expected a keyword to complete the \"such that\" construction\n" + | 215 -> "expected an expression for the existential test\n" + | 87 -> "this is the start of an arg-maximum or arg-minimum expression\n" + | 88 -> "expected the type of the elements compared to get the minimum\n" + | 89 -> "expected the \"initial\" keyword introducing the initial expression for the minimum\n" + | 90 -> "expected the initial expression for the minimum\n" + | 197 -> "expected the type of the elements compared to get the maximum\n" + | 198 -> "expected the \"initial\" keyword introducing the initial expression for the maximum\n" + | 199 -> "expected the initial expression for the maximum\n" + | 101 -> "expected a payload for the enum case constructor, or the rest of the expression (with an \ operator ?)\n" - | 99 -> "expected structure fields introduced by --\n" - | 100 -> "expected the name of the structure field\n" - | 104 -> "expected a colon\n" - | 105 -> "expected the expression for this struct field\n" - | 101 -> "expected another structure field or the closing bracket\n" - | 102 -> "expected the name of the structure field\n" - | 188 -> "expected an expression for the content of this enum case\n" - | 189 -> + | 102 -> "expected structure fields introduced by --\n" + | 103 -> "expected the name of the structure field\n" + | 107 -> "expected a colon\n" + | 108 -> "expected the expression for this struct field\n" + | 104 -> "expected another structure field or the closing bracket\n" + | 105 -> "expected the name of the structure field\n" + | 193 -> "expected an expression for the content of this enum case\n" + | 194 -> "the expression for the content of the enum case is already well-formed, expected an \ operator to form a bigger expression\n" - | 106 -> "expected the keyword following cardinal to compute the number of elements in a set\n" - | 237 -> "expected a scope use item: a rule, definition or assertion\n" - | 273 -> "expected the name of the variable subject to the rule\n" - | 250 -> + | 109 -> "expected the keyword following cardinal to compute the number of elements in a set\n" + | 241 -> "expected a scope use item: a rule, definition or assertion\n" + | 277 -> "expected the name of the variable subject to the rule\n" + | 254 -> "expected a condition or a consequence for this rule, or the rest of the variable qualified \ name\n" - | 280 -> "expected a condition or a consequence for this rule\n" - | 275 -> "expected filled or not filled for a rule consequence\n" - | 281 -> "expected the name of the parameter for this dependent variable \n" - | 274 -> "expected the expression of the rule\n" - | 278 -> "expected the filled keyword the this rule \n" - | 251 -> "expected a struct field or a sub-scope context item after the dot\n" - | 238 -> "expected the name of the label\n" - | 268 -> "expected a rule or a definition after the label declaration\n" - | 269 -> "expected the label to which the exception is referring back\n" - | 272 -> "expected a rule or a definition after the exception declaration\n" - | 285 -> "expected the name of the variable you want to define\n" - | 286 -> "expected the defined as keyword to introduce the definition of this variable\n" - | 288 -> "expected an expression for the consequence of this definition under condition\n" - | 287 -> + | 284 -> "expected a condition or a consequence for this rule\n" + | 279 -> "expected filled or not filled for a rule consequence\n" + | 285 -> "expected the name of the parameter for this dependent variable \n" + | 278 -> "expected the expression of the rule\n" + | 282 -> "expected the filled keyword the this rule \n" + | 255 -> "expected a struct field or a sub-scope context item after the dot\n" + | 242 -> "expected the name of the label\n" + | 272 -> "expected a rule or a definition after the label declaration\n" + | 273 -> "expected the label to which the exception is referring back\n" + | 276 -> "expected a rule or a definition after the exception declaration\n" + | 289 -> "expected the name of the variable you want to define\n" + | 290 -> "expected the defined as keyword to introduce the definition of this variable\n" + | 292 -> "expected an expression for the consequence of this definition under condition\n" + | 291 -> "expected a expression for defining this function, introduced by the defined as keyword\n" - | 289 -> "expected an expression for the definition\n" - | 240 -> "expected an expression that shoud be asserted during execution\n" - | 241 -> "expecting the name of the varying variable\n" - | 244 -> "the variable varies with an expression that was expected here\n" - | 245 -> "expected an indication about the variation sense of the variable, or a new scope item\n" - | 243 -> "expected an indication about what this variable varies with\n" - | 253 -> "expected an expression for this condition\n" - | 263 -> "expected a consequence for this definition under condition\n" - | 259 -> "expected an expression for this definition under condition\n" - | 255 -> "expected the name of the variable that should be fixed\n" - | 256 -> "expected the legislative text by which the value of the variable is fixed\n" - | 257 -> "expected the legislative text by which the value of the variable is fixed\n" - | 266 -> "expected a new scope use item \n" - | 296 -> "expected the kind of the declaration (struct, scope or enum)\n" - | 297 -> "expected the struct name\n" - | 298 -> "expected a colon\n" - | 299 -> "expected struct data or condition\n" - | 300 -> "expected the name of this struct data \n" - | 301 -> "expected the type of this struct data, introduced by the content keyword\n" - | 302 -> "expected the type of this struct data\n" - | 316 -> "expected the name of this struct condition\n" - | 309 -> "expected a new struct data, or another declaration or scope use\n" - | 310 -> "expected the type of the parameter of this struct data function\n" - | 314 -> "expected a new struct data, or another declaration or scope use\n" - | 306 -> "expected a new struct data, or another declaration or scope use\n" - | 319 -> "expected the name of the scope you are declaring\n" - | 320 -> "expected a colon followed by the list of context items of this scope\n" - | 321 -> "expected a context item introduced by \"context\"\n" - | 322 -> "expected the name of this new context item\n" - | 323 -> "expected the kind of this context item: is it a condition, a sub-scope or a data?\n" - | 324 -> "expected the name of the subscope for this context item\n" - | 331 -> "expected another scope context item or the end of the scope declaration\n" - | 326 -> "expected the type of this context item\n" - | 327 -> "expected the next context item or a dependency declaration for this item\n" - | 329 -> "expected the next context item or a dependency declaration for this item\n" - | 334 -> "expected the name of your enum\n" - | 335 -> "expected a colon\n" - | 336 -> "expected an enum case\n" - | 337 -> "expected the name of an enum case \n" - | 338 -> "expected a payload for your enum case, or another case or declaration \n" - | 339 -> "expected a content type\n" - | 344 -> "expected another enum case, or a new declaration or scope use\n" + | 293 -> "expected an expression for the definition\n" + | 244 -> "expected an expression that shoud be asserted during execution\n" + | 245 -> "expecting the name of the varying variable\n" + | 248 -> "the variable varies with an expression that was expected here\n" + | 249 -> "expected an indication about the variation sense of the variable, or a new scope item\n" + | 247 -> "expected an indication about what this variable varies with\n" + | 257 -> "expected an expression for this condition\n" + | 267 -> "expected a consequence for this definition under condition\n" + | 263 -> "expected an expression for this definition under condition\n" + | 259 -> "expected the name of the variable that should be fixed\n" + | 260 -> "expected the legislative text by which the value of the variable is fixed\n" + | 261 -> "expected the legislative text by which the value of the variable is fixed\n" + | 270 -> "expected a new scope use item \n" + | 300 -> "expected the kind of the declaration (struct, scope or enum)\n" + | 301 -> "expected the struct name\n" + | 302 -> "expected a colon\n" + | 303 -> "expected struct data or condition\n" + | 304 -> "expected the name of this struct data \n" + | 305 -> "expected the type of this struct data, introduced by the content keyword\n" + | 306 -> "expected the type of this struct data\n" + | 320 -> "expected the name of this struct condition\n" + | 313 -> "expected a new struct data, or another declaration or scope use\n" + | 314 -> "expected the type of the parameter of this struct data function\n" + | 318 -> "expected a new struct data, or another declaration or scope use\n" + | 310 -> "expected a new struct data, or another declaration or scope use\n" + | 323 -> "expected the name of the scope you are declaring\n" + | 324 -> "expected a colon followed by the list of context items of this scope\n" + | 325 -> "expected a context item introduced by \"context\"\n" + | 326 -> "expected the name of this new context item\n" + | 327 -> "expected the kind of this context item: is it a condition, a sub-scope or a data?\n" + | 328 -> "expected the name of the subscope for this context item\n" + | 335 -> "expected another scope context item or the end of the scope declaration\n" + | 330 -> "expected the type of this context item\n" + | 331 -> "expected the next context item or a dependency declaration for this item\n" + | 333 -> "expected the next context item or a dependency declaration for this item\n" + | 338 -> "expected the name of your enum\n" + | 339 -> "expected a colon\n" + | 340 -> "expected an enum case\n" + | 341 -> "expected the name of an enum case \n" + | 342 -> "expected a payload for your enum case, or another case or declaration \n" + | 343 -> "expected a content type\n" + | 348 -> "expected another enum case, or a new declaration or scope use\n" | 18 -> "expected a declaration or a scope use\n" | 19 -> "expected some text or the beginning of a code section\n" | 20 -> "expected a declaration or a scope use\n" | 21 -> "should not happen\n" - | 350 -> "expected a metadata-closing tag\n" - | 351 -> "expected a metadata-closing tag\n" + | 354 -> "expected a metadata-closing tag\n" + | 355 -> "expected a metadata-closing tag\n" | _ -> raise Not_found diff --git a/tests/test_enum/bad/ambiguous_cases.catala b/tests/test_enum/bad/ambiguous_cases.catala new file mode 100644 index 00000000..d903e253 --- /dev/null +++ b/tests/test_enum/bad/ambiguous_cases.catala @@ -0,0 +1,15 @@ +@Article@ + +/* +new enum E: + -- Case1 content int + +new enum F: + -- Case1 content int + +new scope A: + param e content E + +scope A: + def e := Case1 +*/ diff --git a/tests/test_enum/bad/output/ambiguous_cases.catala.A.out b/tests/test_enum/bad/output/ambiguous_cases.catala.A.out new file mode 100644 index 00000000..810eb726 --- /dev/null +++ b/tests/test_enum/bad/output/ambiguous_cases.catala.A.out @@ -0,0 +1,7 @@ +[ERROR] This constructor name is ambiguous, it can belong to E or F. Desambiguate it by prefixing it with the enum name. +[ERROR] +[ERROR] --> test_enum/bad/ambiguous_cases.catala +[ERROR] | +[ERROR] 14 | def e := Case1 +[ERROR] | ^^^^^ +[ERROR] + Article diff --git a/tests/test_struct/bad/output/nonexisting_struct.catala.A.out b/tests/test_struct/bad/output/nonexisting_struct.catala.A.out index e61abd96..94882be8 100644 --- a/tests/test_struct/bad/output/nonexisting_struct.catala.A.out +++ b/tests/test_struct/bad/output/nonexisting_struct.catala.A.out @@ -1,4 +1,4 @@ -[ERROR] Constructor Fo has not been defined before +[ERROR] Struct Fo has not been defined before [ERROR] [ERROR] --> test_struct/bad/nonexisting_struct.catala [ERROR] | From 2e71cc503c924afeab9eba3a463558cd89d13d96 Mon Sep 17 00:00:00 2001 From: Aymeric Fromherz Date: Tue, 26 Jan 2021 10:47:48 -0500 Subject: [PATCH 6/7] Fix typo in grammar --- src/catala/catala_surface/parser.messages | 230 +++++++++--------- src/catala/catala_surface/parser.mly | 2 +- src/catala/catala_surface/parser_errors.ml | 182 +++++++------- tests/test_enum/bad/ambiguous_cases.catala | 4 +- .../test_enum/good/disambiguated_cases.catala | 15 ++ 5 files changed, 224 insertions(+), 209 deletions(-) create mode 100644 tests/test_enum/good/disambiguated_cases.catala diff --git a/src/catala/catala_surface/parser.messages b/src/catala/catala_surface/parser.messages index 161e189b..308489b2 100644 --- a/src/catala/catala_surface/parser.messages +++ b/src/catala/catala_surface/parser.messages @@ -1,6 +1,6 @@ source_file_or_master: BEGIN_METADATA BEGIN_CODE END_CODE LAW_TEXT END_CODE ## -## Ends in an error in state: 355. +## Ends in an error in state: 357. ## ## metadata_block -> BEGIN_CODE option(law_text) code END_CODE option(law_text) . END_METADATA [ LAW_TEXT LAW_INCLUDE LAW_HEADING LAW_ARTICLE EOF BEGIN_METADATA ] ## @@ -12,7 +12,7 @@ expected a metadata-closing tag source_file_or_master: BEGIN_METADATA BEGIN_CODE END_CODE YEAR ## -## Ends in an error in state: 354. +## Ends in an error in state: 356. ## ## metadata_block -> BEGIN_CODE option(law_text) code END_CODE . option(law_text) END_METADATA [ LAW_TEXT LAW_INCLUDE LAW_HEADING LAW_ARTICLE EOF BEGIN_METADATA ] ## @@ -72,7 +72,7 @@ expected a declaration or a scope use source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT CONSTRUCTOR CONTENT TEXT YEAR ## -## Ends in an error in state: 348. +## Ends in an error in state: 350. ## ## nonempty_list(enum_decl_line) -> enum_decl_line . [ SCOPE END_CODE DECLARATION ] ## nonempty_list(enum_decl_line) -> enum_decl_line . nonempty_list(enum_decl_line) [ SCOPE END_CODE DECLARATION ] @@ -85,7 +85,7 @@ expected another enum case, or a new declaration or scope use source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT CONSTRUCTOR CONTENT YEAR ## -## Ends in an error in state: 343. +## Ends in an error in state: 345. ## ## enum_decl_line_payload -> CONTENT . typ [ SCOPE END_CODE DECLARATION ALT ] ## @@ -97,7 +97,7 @@ expected a content type source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT CONSTRUCTOR YEAR ## -## Ends in an error in state: 342. +## Ends in an error in state: 344. ## ## enum_decl_line -> ALT constructor . option(enum_decl_line_payload) [ SCOPE END_CODE DECLARATION ALT ] ## @@ -109,7 +109,7 @@ expected a payload for your enum case, or another case or declaration source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT YEAR ## -## Ends in an error in state: 341. +## Ends in an error in state: 343. ## ## enum_decl_line -> ALT . constructor option(enum_decl_line_payload) [ SCOPE END_CODE DECLARATION ALT ] ## @@ -121,7 +121,7 @@ expected the name of an enum case source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON YEAR ## -## Ends in an error in state: 340. +## Ends in an error in state: 342. ## ## code_item -> DECLARATION ENUM constructor COLON . nonempty_list(enum_decl_line) [ SCOPE END_CODE DECLARATION ] ## @@ -133,7 +133,7 @@ expected an enum case source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM CONSTRUCTOR YEAR ## -## Ends in an error in state: 339. +## Ends in an error in state: 341. ## ## code_item -> DECLARATION ENUM constructor . COLON nonempty_list(enum_decl_line) [ SCOPE END_CODE DECLARATION ] ## @@ -145,7 +145,7 @@ expected a colon source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM YEAR ## -## Ends in an error in state: 338. +## Ends in an error in state: 340. ## ## code_item -> DECLARATION ENUM . constructor COLON nonempty_list(enum_decl_line) [ SCOPE END_CODE DECLARATION ] ## @@ -157,7 +157,7 @@ expected the name of your enum source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT CONDITION YEAR ## -## Ends in an error in state: 333. +## Ends in an error in state: 335. ## ## scope_decl_item -> CONTEXT ident CONDITION . option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## @@ -169,7 +169,7 @@ expected the next context item or a dependency declaration for this item source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT CONTENT TEXT YEAR ## -## Ends in an error in state: 331. +## Ends in an error in state: 333. ## ## scope_decl_item -> CONTEXT ident CONTENT typ . option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## @@ -181,7 +181,7 @@ expected the next context item or a dependency declaration for this item source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT CONTENT YEAR ## -## Ends in an error in state: 330. +## Ends in an error in state: 332. ## ## scope_decl_item -> CONTEXT ident CONTENT . typ option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## @@ -193,7 +193,7 @@ expected the type of this context item source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT SCOPE CONSTRUCTOR YEAR ## -## Ends in an error in state: 335. +## Ends in an error in state: 337. ## ## nonempty_list(scope_decl_item) -> scope_decl_item . [ SCOPE END_CODE DECLARATION ] ## nonempty_list(scope_decl_item) -> scope_decl_item . nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ] @@ -206,7 +206,7 @@ expected another scope context item or the end of the scope declaration source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT SCOPE YEAR ## -## Ends in an error in state: 328. +## Ends in an error in state: 330. ## ## scope_decl_item -> CONTEXT ident SCOPE . constructor [ SCOPE END_CODE DECLARATION CONTEXT ] ## @@ -218,7 +218,7 @@ expected the name of the subscope for this context item source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT YEAR ## -## Ends in an error in state: 327. +## Ends in an error in state: 329. ## ## scope_decl_item -> CONTEXT ident . CONTENT typ option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## scope_decl_item -> CONTEXT ident . SCOPE constructor [ SCOPE END_CODE DECLARATION CONTEXT ] @@ -232,7 +232,7 @@ expected the kind of this context item: is it a condition, a sub-scope or a data source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT YEAR ## -## Ends in an error in state: 326. +## Ends in an error in state: 328. ## ## scope_decl_item -> CONTEXT . ident CONTENT typ option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## scope_decl_item -> CONTEXT . ident SCOPE constructor [ SCOPE END_CODE DECLARATION CONTEXT ] @@ -246,7 +246,7 @@ expected the name of this new context item source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON YEAR ## -## Ends in an error in state: 325. +## Ends in an error in state: 327. ## ## code_item -> DECLARATION SCOPE constructor COLON . nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ] ## @@ -258,7 +258,7 @@ expected a context item introduced by "context" source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR YEAR ## -## Ends in an error in state: 324. +## Ends in an error in state: 326. ## ## code_item -> DECLARATION SCOPE constructor . COLON nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ] ## @@ -270,7 +270,7 @@ expected a colon followed by the list of context items of this scope source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE YEAR ## -## Ends in an error in state: 323. +## Ends in an error in state: 325. ## ## code_item -> DECLARATION SCOPE . constructor COLON nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ] ## @@ -282,7 +282,7 @@ expected the name of the scope you are declaring source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT DEPENDS COLLECTION YEAR ## -## Ends in an error in state: 310. +## Ends in an error in state: 312. ## ## typ -> collection_marked . typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONTEXT CONDITION ALT ] ## @@ -295,7 +295,7 @@ expected a new struct data, or another declaration or scope use source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT DEPENDS TEXT YEAR ## -## Ends in an error in state: 318. +## Ends in an error in state: 320. ## ## list(struct_scope) -> struct_scope . list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## @@ -307,7 +307,7 @@ expected a new struct data, or another declaration or scope use source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT DEPENDS YEAR ## -## Ends in an error in state: 314. +## Ends in an error in state: 316. ## ## struct_scope_func -> DEPENDS . typ [ SCOPE END_CODE DECLARATION DATA CONTEXT CONDITION ] ## @@ -319,7 +319,7 @@ expected the type of the parameter of this struct data function source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT YEAR ## -## Ends in an error in state: 313. +## Ends in an error in state: 315. ## ## struct_scope -> struct_scope_base . option(struct_scope_func) [ SCOPE END_CODE DECLARATION DATA CONDITION ] ## @@ -331,7 +331,7 @@ expected a new struct data, or another declaration or scope use source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION YEAR ## -## Ends in an error in state: 320. +## Ends in an error in state: 322. ## ## struct_scope_base -> condition_pos . ident [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ] ## @@ -343,7 +343,7 @@ expected the name of this struct condition source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON DATA IDENT CONTENT YEAR ## -## Ends in an error in state: 306. +## Ends in an error in state: 308. ## ## struct_scope_base -> DATA ident CONTENT . typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ] ## @@ -355,7 +355,7 @@ expected the type of this struct data source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON DATA IDENT YEAR ## -## Ends in an error in state: 305. +## Ends in an error in state: 307. ## ## struct_scope_base -> DATA ident . CONTENT typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ] ## @@ -367,7 +367,7 @@ expected the type of this struct data, introduced by the content keyword source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON DATA YEAR ## -## Ends in an error in state: 304. +## Ends in an error in state: 306. ## ## struct_scope_base -> DATA . ident CONTENT typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ] ## @@ -379,7 +379,7 @@ expected the name of this struct data source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON YEAR ## -## Ends in an error in state: 303. +## Ends in an error in state: 305. ## ## code_item -> DECLARATION STRUCT constructor COLON . list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## @@ -391,7 +391,7 @@ expected struct data or condition source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR YEAR ## -## Ends in an error in state: 302. +## Ends in an error in state: 304. ## ## code_item -> DECLARATION STRUCT constructor . COLON list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## @@ -403,7 +403,7 @@ expected a colon source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT YEAR ## -## Ends in an error in state: 301. +## Ends in an error in state: 303. ## ## code_item -> DECLARATION STRUCT . constructor COLON list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## @@ -415,7 +415,7 @@ expected the struct name source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION YEAR ## -## Ends in an error in state: 300. +## Ends in an error in state: 302. ## ## code_item -> DECLARATION . STRUCT constructor COLON list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## code_item -> DECLARATION . SCOPE constructor COLON nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ] @@ -429,7 +429,7 @@ expected the kind of the declaration (struct, scope or enum) source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION CARDINAL THEN ## -## Ends in an error in state: 270. +## Ends in an error in state: 272. ## ## nonempty_list(scope_item) -> scope_item . [ SCOPE END_CODE DECLARATION ] ## nonempty_list(scope_item) -> scope_item . nonempty_list(scope_item) [ SCOPE END_CODE DECLARATION ] @@ -447,17 +447,17 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION ## In state 134, spurious reduction of production sum_expression -> mult_expression ## In state 156, spurious reduction of production compare_expression -> sum_expression ## In state 184, spurious reduction of production logical_expression -> compare_expression -## In state 207, spurious reduction of production expression -> logical_expression -## In state 264, spurious reduction of production assertion_base -> expression -## In state 265, spurious reduction of production assertion -> option(condition_consequence) assertion_base -## In state 269, spurious reduction of production scope_item -> ASSERTION assertion +## In state 209, spurious reduction of production expression -> logical_expression +## In state 266, spurious reduction of production assertion_base -> expression +## In state 267, spurious reduction of production assertion -> option(condition_consequence) assertion_base +## In state 271, spurious reduction of production scope_item -> ASSERTION assertion ## expected a new scope use item source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION FIXED IDENT BY YEAR ## -## Ends in an error in state: 261. +## Ends in an error in state: 263. ## ## assertion -> FIXED qident BY . ident [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -469,7 +469,7 @@ expected the legislative text by which the value of the variable is fixed source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION FIXED IDENT WITH_V ## -## Ends in an error in state: 260. +## Ends in an error in state: 262. ## ## assertion -> FIXED qident . BY ident [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -480,15 +480,15 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 254, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident -## In state 246, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) +## In state 256, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident +## In state 248, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) ## expected the legislative text by which the value of the variable is fixed source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION FIXED YEAR ## -## Ends in an error in state: 259. +## Ends in an error in state: 261. ## ## assertion -> FIXED . qident BY ident [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -500,7 +500,7 @@ expected the name of the variable that should be fixed source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION UNDER_CONDITION TRUE CONSEQUENCE BY ## -## Ends in an error in state: 263. +## Ends in an error in state: 265. ## ## assertion -> option(condition_consequence) . assertion_base [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -512,7 +512,7 @@ expected an expression for this definition under condition source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION UNDER_CONDITION TRUE THEN ## -## Ends in an error in state: 267. +## Ends in an error in state: 269. ## ## condition_consequence -> condition . CONSEQUENCE [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FILLED FALSE EXISTS DEFINED_AS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -529,15 +529,15 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION ## In state 134, spurious reduction of production sum_expression -> mult_expression ## In state 156, spurious reduction of production compare_expression -> sum_expression ## In state 184, spurious reduction of production logical_expression -> compare_expression -## In state 207, spurious reduction of production expression -> logical_expression -## In state 258, spurious reduction of production condition -> UNDER_CONDITION expression +## In state 209, spurious reduction of production expression -> logical_expression +## In state 260, spurious reduction of production condition -> UNDER_CONDITION expression ## expected a consequence for this definition under condition source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION UNDER_CONDITION YEAR ## -## Ends in an error in state: 257. +## Ends in an error in state: 259. ## ## condition -> UNDER_CONDITION . expression [ CONSEQUENCE ] ## @@ -549,7 +549,7 @@ expected an expression for this condition source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES IDENT UNDER_CONDITION ## -## Ends in an error in state: 247. +## Ends in an error in state: 249. ## ## assertion -> VARIES qident . WITH_V base_expression option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -560,15 +560,15 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 254, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident -## In state 246, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) +## In state 256, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident +## In state 248, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) ## expected an indication about what this variable varies with source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES IDENT WITH_V TRUE THEN ## -## Ends in an error in state: 249. +## Ends in an error in state: 251. ## ## assertion -> VARIES qident WITH_V base_expression . option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -587,7 +587,7 @@ expected an indication about the variation sense of the variable, or a new scope source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES IDENT WITH_V YEAR ## -## Ends in an error in state: 248. +## Ends in an error in state: 250. ## ## assertion -> VARIES qident WITH_V . base_expression option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -599,7 +599,7 @@ the variable varies with an expression that was expected here source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES YEAR ## -## Ends in an error in state: 245. +## Ends in an error in state: 247. ## ## assertion -> VARIES . qident WITH_V base_expression option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -611,7 +611,7 @@ expecting the name of the varying variable source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION YEAR ## -## Ends in an error in state: 244. +## Ends in an error in state: 246. ## ## scope_item -> ASSERTION . assertion [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -623,7 +623,7 @@ expected an expression that shoud be asserted during execution source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT DEFINED_AS YEAR ## -## Ends in an error in state: 293. +## Ends in an error in state: 295. ## ## definition -> option(label) option(exception_to) DEFINITION qident option(definition_parameters) option(condition_consequence) DEFINED_AS . expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -635,7 +635,7 @@ expected an expression for the definition source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT OF IDENT DECREASING ## -## Ends in an error in state: 291. +## Ends in an error in state: 293. ## ## definition -> option(label) option(exception_to) DEFINITION qident option(definition_parameters) . option(condition_consequence) DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -647,7 +647,7 @@ expected a expression for defining this function, introduced by the defined as k source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT UNDER_CONDITION CARDINAL CONSEQUENCE DECREASING ## -## Ends in an error in state: 292. +## Ends in an error in state: 294. ## ## definition -> option(label) option(exception_to) DEFINITION qident option(definition_parameters) option(condition_consequence) . DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -659,7 +659,7 @@ expected an expression for the consequence of this definition under condition source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT WITH_V ## -## Ends in an error in state: 290. +## Ends in an error in state: 292. ## ## definition -> option(label) option(exception_to) DEFINITION qident . option(definition_parameters) option(condition_consequence) DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -670,15 +670,15 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 254, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident -## In state 246, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) +## In state 256, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident +## In state 248, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) ## expected the defined as keyword to introduce the definition of this variable source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION YEAR ## -## Ends in an error in state: 289. +## Ends in an error in state: 291. ## ## definition -> option(label) option(exception_to) DEFINITION . qident option(definition_parameters) option(condition_consequence) DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -690,7 +690,7 @@ expected the name of the variable you want to define source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON EXCEPTION IDENT DEFINED_AS ## -## Ends in an error in state: 276. +## Ends in an error in state: 278. ## ## definition -> option(label) option(exception_to) . DEFINITION qident option(definition_parameters) option(condition_consequence) DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## rule -> option(label) option(exception_to) . RULE rule_expr option(condition_consequence) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] @@ -703,7 +703,7 @@ expected a rule or a definition after the exception declaration source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON EXCEPTION YEAR ## -## Ends in an error in state: 273. +## Ends in an error in state: 275. ## ## exception_to -> EXCEPTION . option(ident) [ RULE DEFINITION ] ## @@ -715,7 +715,7 @@ expected the label to which the exception is referring back source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON LABEL IDENT DEFINED_AS ## -## Ends in an error in state: 272. +## Ends in an error in state: 274. ## ## definition -> option(label) . option(exception_to) DEFINITION qident option(definition_parameters) option(condition_consequence) DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## rule -> option(label) . option(exception_to) RULE rule_expr option(condition_consequence) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] @@ -728,7 +728,7 @@ expected a rule or a definition after the label declaration source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON LABEL YEAR ## -## Ends in an error in state: 242. +## Ends in an error in state: 244. ## ## label -> LABEL . ident [ RULE EXCEPTION DEFINITION ] ## @@ -740,7 +740,7 @@ expected the name of the label source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT DOT YEAR ## -## Ends in an error in state: 255. +## Ends in an error in state: 257. ## ## separated_nonempty_list(DOT,ident) -> ident DOT . separated_nonempty_list(DOT,ident) [ WITH_V UNDER_CONDITION OF NOT FILLED DEFINED_AS BY ] ## @@ -752,7 +752,7 @@ expected a struct field or a sub-scope context item after the dot source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT NOT FALSE ## -## Ends in an error in state: 282. +## Ends in an error in state: 284. ## ## rule_consequence -> option(NOT) . FILLED [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -764,7 +764,7 @@ expected the filled keyword the this rule source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT OF IDENT YEAR ## -## Ends in an error in state: 278. +## Ends in an error in state: 280. ## ## rule -> option(label) option(exception_to) RULE rule_expr . option(condition_consequence) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -776,7 +776,7 @@ expected the expression of the rule source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT OF YEAR ## -## Ends in an error in state: 285. +## Ends in an error in state: 287. ## ## definition_parameters -> OF . ident [ UNDER_CONDITION NOT FILLED DEFINED_AS ] ## @@ -788,7 +788,7 @@ expected the name of the parameter for this dependent variable source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT UNDER_CONDITION CARDINAL CONSEQUENCE FALSE ## -## Ends in an error in state: 279. +## Ends in an error in state: 281. ## ## rule -> option(label) option(exception_to) RULE rule_expr option(condition_consequence) . rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -800,7 +800,7 @@ expected filled or not filled for a rule consequence source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT WITH_V ## -## Ends in an error in state: 284. +## Ends in an error in state: 286. ## ## rule_expr -> qident . option(definition_parameters) [ UNDER_CONDITION NOT FILLED ] ## @@ -811,15 +811,15 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 254, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident -## In state 246, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) +## In state 256, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident +## In state 248, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) ## expected a condition or a consequence for this rule source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT YEAR ## -## Ends in an error in state: 254. +## Ends in an error in state: 256. ## ## separated_nonempty_list(DOT,ident) -> ident . [ WITH_V UNDER_CONDITION OF NOT FILLED DEFINED_AS BY ] ## separated_nonempty_list(DOT,ident) -> ident . DOT separated_nonempty_list(DOT,ident) [ WITH_V UNDER_CONDITION OF NOT FILLED DEFINED_AS BY ] @@ -832,7 +832,7 @@ expected a condition or a consequence for this rule, or the rest of the variable source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE YEAR ## -## Ends in an error in state: 277. +## Ends in an error in state: 279. ## ## rule -> option(label) option(exception_to) RULE . rule_expr option(condition_consequence) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -844,7 +844,7 @@ expected the name of the variable subject to the rule source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON YEAR ## -## Ends in an error in state: 241. +## Ends in an error in state: 243. ## ## code_item -> SCOPE constructor option(scope_use_condition) COLON . nonempty_list(scope_item) [ SCOPE END_CODE DECLARATION ] ## @@ -869,7 +869,7 @@ expected the keyword following cardinal to compute the number of elements in a s source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR CONTENT TRUE YEAR ## -## Ends in an error in state: 194. +## Ends in an error in state: 196. ## ## enum_inject_content -> CONTENT small_expression . [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## small_expression -> small_expression . ARROW constructor [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DOT DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ] @@ -883,7 +883,7 @@ the expression for the content of the enum case is already well-formed, expected source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR CONTENT YEAR ## -## Ends in an error in state: 193. +## Ends in an error in state: 195. ## ## enum_inject_content -> CONTENT . small_expression [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -983,7 +983,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## ## Ends in an error in state: 101. ## -## struct_or_enum_inject -> constructor . option(terminated(constructor,DOT)) option(enum_inject_content) [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] +## struct_or_enum_inject -> constructor . option(preceded(DOT,constructor)) option(enum_inject_content) [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## struct_or_enum_inject -> constructor . struct_inject_content [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## ## The known suffix of the stack is as follows: @@ -994,7 +994,7 @@ expected a payload for the enum case constructor, or the rest of the expression source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MAXIMUM TEXT INIT YEAR ## -## Ends in an error in state: 199. +## Ends in an error in state: 201. ## ## aggregate_func -> CONTENT MAXIMUM typ_base INIT . primitive_expression [ FOR ] ## @@ -1006,7 +1006,7 @@ expected the initial expression for the maximum source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MAXIMUM TEXT YEAR ## -## Ends in an error in state: 198. +## Ends in an error in state: 200. ## ## aggregate_func -> CONTENT MAXIMUM typ_base . INIT primitive_expression [ FOR ] ## @@ -1018,7 +1018,7 @@ expected the "initial" keyword introducing the initial expression for the maximu source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MAXIMUM YEAR ## -## Ends in an error in state: 197. +## Ends in an error in state: 199. ## ## aggregate_func -> CONTENT MAXIMUM . typ_base INIT primitive_expression [ FOR ] ## @@ -1079,7 +1079,7 @@ this is the start of an arg-maximum or arg-minimum expression source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN CARDINAL SUCH THAT YEAR ## -## Ends in an error in state: 215. +## Ends in an error in state: 217. ## ## expression -> exists_prefix . expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1091,7 +1091,7 @@ expected an expression for the existential test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN TRUE SUCH YEAR ## -## Ends in an error in state: 221. +## Ends in an error in state: 223. ## ## exists_prefix -> exists_marked ident IN primitive_expression SUCH . THAT [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1103,7 +1103,7 @@ expected a keyword to complete the "such that" construction source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN TRUE WITH ## -## Ends in an error in state: 220. +## Ends in an error in state: 222. ## ## exists_prefix -> exists_marked ident IN primitive_expression . SUCH THAT [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1121,7 +1121,7 @@ expected a keyword to form the "such that" expression for the existential test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN YEAR ## -## Ends in an error in state: 219. +## Ends in an error in state: 221. ## ## exists_prefix -> exists_marked ident IN . primitive_expression SUCH THAT [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1133,7 +1133,7 @@ expected an expression that designates the set subject to the existential test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT YEAR ## -## Ends in an error in state: 218. +## Ends in an error in state: 220. ## ## exists_prefix -> exists_marked ident . IN primitive_expression SUCH THAT [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1145,7 +1145,7 @@ expected the "in" keyword to continue this existential test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS YEAR ## -## Ends in an error in state: 217. +## Ends in an error in state: 219. ## ## exists_prefix -> exists_marked . ident IN primitive_expression SUCH THAT [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1157,7 +1157,7 @@ expected an identifier that will designate the existential witness for the test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT IN CARDINAL WE_HAVE YEAR ## -## Ends in an error in state: 208. +## Ends in an error in state: 210. ## ## expression -> forall_prefix . expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1169,7 +1169,7 @@ expected an expression for the universal test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT IN TRUE WITH ## -## Ends in an error in state: 212. +## Ends in an error in state: 214. ## ## forall_prefix -> for_all_marked ident IN primitive_expression . WE_HAVE [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1187,7 +1187,7 @@ expected the "we have" keyword for this universal test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT IN YEAR ## -## Ends in an error in state: 211. +## Ends in an error in state: 213. ## ## forall_prefix -> for_all_marked ident IN . primitive_expression WE_HAVE [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1199,7 +1199,7 @@ expected the expression designating the set on which to perform the universal te source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT YEAR ## -## Ends in an error in state: 210. +## Ends in an error in state: 212. ## ## forall_prefix -> for_all_marked ident . IN primitive_expression WE_HAVE [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1211,7 +1211,7 @@ expected the "in" keyword for the rest of the universal test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL YEAR ## -## Ends in an error in state: 209. +## Ends in an error in state: 211. ## ## forall_prefix -> for_all_marked . ident IN primitive_expression WE_HAVE [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1223,7 +1223,7 @@ expected an identifier for the bound variable of the universal test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR YEAR ## -## Ends in an error in state: 204. +## Ends in an error in state: 206. ## ## for_all_marked -> FOR . ALL [ IDENT ] ## @@ -1235,7 +1235,7 @@ expected the "all" keyword to mean the "for all" construction of the universal t source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE SEMICOLON ## -## Ends in an error in state: 223. +## Ends in an error in state: 225. ## ## expression -> IF expression . THEN expression ELSE base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1252,14 +1252,14 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## In state 134, spurious reduction of production sum_expression -> mult_expression ## In state 156, spurious reduction of production compare_expression -> sum_expression ## In state 184, spurious reduction of production logical_expression -> compare_expression -## In state 207, spurious reduction of production expression -> logical_expression +## In state 209, spurious reduction of production expression -> logical_expression ## expected the "then" keyword as the conditional expression is complete source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE THEN TRUE ELSE YEAR ## -## Ends in an error in state: 226. +## Ends in an error in state: 228. ## ## expression -> IF expression THEN expression ELSE . base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1271,7 +1271,7 @@ expected an expression for the "else" branch of this conditional construction source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE THEN TRUE THEN ## -## Ends in an error in state: 225. +## Ends in an error in state: 227. ## ## expression -> IF expression THEN expression . ELSE base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1288,14 +1288,14 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## In state 134, spurious reduction of production sum_expression -> mult_expression ## In state 156, spurious reduction of production compare_expression -> sum_expression ## In state 184, spurious reduction of production logical_expression -> compare_expression -## In state 207, spurious reduction of production expression -> logical_expression +## In state 209, spurious reduction of production expression -> logical_expression ## expected the "else" branch of this conditional expression as the "then" branch is complete source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE THEN YEAR ## -## Ends in an error in state: 224. +## Ends in an error in state: 226. ## ## expression -> IF expression THEN . expression ELSE base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1307,7 +1307,7 @@ expected an expression the for the "then" branch of the conditiona source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF YEAR ## -## Ends in an error in state: 203. +## Ends in an error in state: 205. ## ## expression -> IF . expression THEN expression ELSE base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1331,7 +1331,7 @@ expected a unit for this literal, or a valid operator to complete the expression source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION LPAREN TRUE THEN ## -## Ends in an error in state: 228. +## Ends in an error in state: 230. ## ## atomic_expression -> LPAREN expression . RPAREN [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DOT DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ] ## @@ -1348,7 +1348,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## In state 134, spurious reduction of production sum_expression -> mult_expression ## In state 156, spurious reduction of production compare_expression -> sum_expression ## In state 184, spurious reduction of production logical_expression -> compare_expression -## In state 207, spurious reduction of production expression -> logical_expression +## In state 209, spurious reduction of production expression -> logical_expression ## unmatched parenthesis that should have been closed by here @@ -1367,7 +1367,7 @@ expected an expression inside the parenthesis source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION LSQUARE TRUE SEMICOLON YEAR ## -## Ends in an error in state: 235. +## Ends in an error in state: 237. ## ## separated_nonempty_list(SEMICOLON,expression) -> expression SEMICOLON . separated_nonempty_list(SEMICOLON,expression) [ RSQUARE ] ## @@ -1379,7 +1379,7 @@ expected another element of the collection source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION LSQUARE TRUE THEN ## -## Ends in an error in state: 234. +## Ends in an error in state: 236. ## ## separated_nonempty_list(SEMICOLON,expression) -> expression . [ RSQUARE ] ## separated_nonempty_list(SEMICOLON,expression) -> expression . SEMICOLON separated_nonempty_list(SEMICOLON,expression) [ RSQUARE ] @@ -1397,7 +1397,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## In state 134, spurious reduction of production sum_expression -> mult_expression ## In state 156, spurious reduction of production compare_expression -> sum_expression ## In state 184, spurious reduction of production logical_expression -> compare_expression -## In state 207, spurious reduction of production expression -> logical_expression +## In state 209, spurious reduction of production expression -> logical_expression ## expected a semicolon or a right square bracket after the collection element @@ -1529,7 +1529,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## In state 134, spurious reduction of production sum_expression -> mult_expression ## In state 156, spurious reduction of production compare_expression -> sum_expression ## In state 184, spurious reduction of production logical_expression -> compare_expression -## In state 201, spurious reduction of production match_arm -> constructor_binding COLON logical_expression +## In state 203, spurious reduction of production match_arm -> constructor_binding COLON logical_expression ## expected another match case or the rest of the expression since the previous match case is complete @@ -1758,7 +1758,7 @@ expected a constructor, to get the payload of this enum case source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE ASSERTION ## -## Ends in an error in state: 240. +## Ends in an error in state: 242. ## ## code_item -> SCOPE constructor option(scope_use_condition) . COLON nonempty_list(scope_item) [ SCOPE END_CODE DECLARATION ] ## @@ -1775,9 +1775,9 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## In state 134, spurious reduction of production sum_expression -> mult_expression ## In state 156, spurious reduction of production compare_expression -> sum_expression ## In state 184, spurious reduction of production logical_expression -> compare_expression -## In state 207, spurious reduction of production expression -> logical_expression -## In state 238, spurious reduction of production scope_use_condition -> UNDER_CONDITION expression -## In state 239, spurious reduction of production option(scope_use_condition) -> scope_use_condition +## In state 209, spurious reduction of production expression -> logical_expression +## In state 240, spurious reduction of production scope_use_condition -> UNDER_CONDITION expression +## In state 241, spurious reduction of production option(scope_use_condition) -> scope_use_condition ## expected a colon after the scope use precondition @@ -2043,7 +2043,7 @@ expected the name of the scope you want to use source_file_or_master: LAW_ARTICLE BEGIN_CODE YEAR ## -## Ends in an error in state: 364. +## Ends in an error in state: 366. ## ## law_article_item -> BEGIN_CODE . code END_CODE [ LAW_TEXT LAW_INCLUDE LAW_HEADING LAW_ARTICLE EOF BEGIN_METADATA BEGIN_CODE ] ## @@ -2055,7 +2055,7 @@ expected a declaration or a scope use source_file_or_master: LAW_ARTICLE LAW_TEXT YEAR ## -## Ends in an error in state: 369. +## Ends in an error in state: 371. ## ## law_articles_items -> law_article_item . law_articles_items [ LAW_INCLUDE LAW_HEADING LAW_ARTICLE EOF BEGIN_METADATA ] ## @@ -2067,7 +2067,7 @@ expected a code block, a metadata block, more law text or a heading source_file_or_master: LAW_ARTICLE YEAR ## -## Ends in an error in state: 363. +## Ends in an error in state: 365. ## ## source_file_article -> law_article . law_articles_items [ LAW_INCLUDE LAW_HEADING LAW_ARTICLE EOF BEGIN_METADATA ] ## @@ -2079,7 +2079,7 @@ expected a code block, a metadata block, more law text or a heading source_file_or_master: LAW_INCLUDE YEAR ## -## Ends in an error in state: 358. +## Ends in an error in state: 360. ## ## source_file_after_text -> source_file_item . list(law_intermediate_text) source_file_after_text [ # ] ## @@ -2091,7 +2091,7 @@ expected an article title, another heading or some text source_file_or_master: LAW_TEXT YEAR ## -## Ends in an error in state: 373. +## Ends in an error in state: 375. ## ## list(law_intermediate_text) -> law_intermediate_text . list(law_intermediate_text) [ LAW_INCLUDE LAW_HEADING LAW_ARTICLE EOF BEGIN_METADATA ] ## diff --git a/src/catala/catala_surface/parser.mly b/src/catala/catala_surface/parser.mly index 85463d84..bfd784c3 100644 --- a/src/catala/catala_surface/parser.mly +++ b/src/catala/catala_surface/parser.mly @@ -123,7 +123,7 @@ struct_inject_content: | LBRACKET ALT fields = separated_nonempty_list(ALT, struct_content_field) RBRACKET { fields } struct_or_enum_inject: -| enum = constructor c = option(terminated(constructor, DOT)) data = option(enum_inject_content) { +| enum = constructor c = option(preceded(DOT, constructor)) data = option(enum_inject_content) { (* The fully qualified enum is actually the optional part, but it leads to shift/reduce conflicts. We flip it here *) match c with diff --git a/src/catala/catala_surface/parser_errors.ml b/src/catala/catala_surface/parser_errors.ml index 0aca5ef4..69121244 100644 --- a/src/catala/catala_surface/parser_errors.ml +++ b/src/catala/catala_surface/parser_errors.ml @@ -13,11 +13,11 @@ let message s = "expected another inclusion of a Catala file, since this file is a master file which can \ only contain inclusions of other Catala files\n" | 8 -> "expected some text, another heading or a law article\n" - | 373 -> "expected a heading, an article title or some text\n" - | 358 -> "expected an article title, another heading or some text\n" - | 363 -> "expected a code block, a metadata block, more law text or a heading\n" - | 369 -> "expected a code block, a metadata block, more law text or a heading\n" - | 364 -> "expected a declaration or a scope use\n" + | 375 -> "expected a heading, an article title or some text\n" + | 360 -> "expected an article title, another heading or some text\n" + | 365 -> "expected a code block, a metadata block, more law text or a heading\n" + | 371 -> "expected a code block, a metadata block, more law text or a heading\n" + | 366 -> "expected a declaration or a scope use\n" | 22 -> "expected the name of the scope you want to use\n" | 24 -> "expected a scope use precondition or a colon\n" | 25 -> "expected an expression which will act as the condition\n" @@ -38,7 +38,7 @@ let message s = | 147 -> "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" | 71 -> "expected an identifier standing for a struct field or a subscope name\n" - | 240 -> "expected a colon after the scope use precondition\n" + | 242 -> "expected a colon after the scope use precondition\n" | 76 -> "expected a constructor, to get the payload of this enum case\n" | 35 -> "expected the \"for\" keyword to spell the aggregation\n" | 181 -> "expected an expression to take the negation of\n" @@ -69,38 +69,38 @@ let message s = | 128 -> "expected the \"of\" keyword to introduce the map predicate\n" | 129 -> "expected an expression for the map predicate\n" | 54 -> "expected a collection element\n" - | 234 -> "expected a semicolon or a right square bracket after the collection element \n" - | 235 -> "expected another element of the collection\n" + | 236 -> "expected a semicolon or a right square bracket after the collection element \n" + | 237 -> "expected another element of the collection\n" | 58 -> "expected an expression inside the parenthesis\n" - | 228 -> "unmatched parenthesis that should have been closed by here\n" + | 230 -> "unmatched parenthesis that should have been closed by here\n" | 92 -> "expected a unit for this literal, or a valid operator to complete the expression \n" - | 203 -> "expected an expression for the test of the conditional\n" - | 224 -> "expected an expression the for the \"then\" branch of the conditiona\n" - | 225 -> + | 205 -> "expected an expression for the test of the conditional\n" + | 226 -> "expected an expression the for the \"then\" branch of the conditiona\n" + | 227 -> "expected the \"else\" branch of this conditional expression as the \"then\" branch is \ complete\n" - | 226 -> "expected an expression for the \"else\" branch of this conditional construction\n" - | 223 -> "expected the \"then\" keyword as the conditional expression is complete\n" - | 204 -> + | 228 -> "expected an expression for the \"else\" branch of this conditional construction\n" + | 225 -> "expected the \"then\" keyword as the conditional expression is complete\n" + | 206 -> "expected the \"all\" keyword to mean the \"for all\" construction of the universal test\n" - | 209 -> "expected an identifier for the bound variable of the universal test\n" - | 210 -> "expected the \"in\" keyword for the rest of the universal test\n" - | 211 -> "expected the expression designating the set on which to perform the universal test\n" - | 212 -> "expected the \"we have\" keyword for this universal test\n" - | 208 -> "expected an expression for the universal test\n" - | 217 -> "expected an identifier that will designate the existential witness for the test\n" - | 218 -> "expected the \"in\" keyword to continue this existential test\n" - | 219 -> "expected an expression that designates the set subject to the existential test\n" - | 220 -> "expected a keyword to form the \"such that\" expression for the existential test\n" - | 221 -> "expected a keyword to complete the \"such that\" construction\n" - | 215 -> "expected an expression for the existential test\n" + | 211 -> "expected an identifier for the bound variable of the universal test\n" + | 212 -> "expected the \"in\" keyword for the rest of the universal test\n" + | 213 -> "expected the expression designating the set on which to perform the universal test\n" + | 214 -> "expected the \"we have\" keyword for this universal test\n" + | 210 -> "expected an expression for the universal test\n" + | 219 -> "expected an identifier that will designate the existential witness for the test\n" + | 220 -> "expected the \"in\" keyword to continue this existential test\n" + | 221 -> "expected an expression that designates the set subject to the existential test\n" + | 222 -> "expected a keyword to form the \"such that\" expression for the existential test\n" + | 223 -> "expected a keyword to complete the \"such that\" construction\n" + | 217 -> "expected an expression for the existential test\n" | 87 -> "this is the start of an arg-maximum or arg-minimum expression\n" | 88 -> "expected the type of the elements compared to get the minimum\n" | 89 -> "expected the \"initial\" keyword introducing the initial expression for the minimum\n" | 90 -> "expected the initial expression for the minimum\n" - | 197 -> "expected the type of the elements compared to get the maximum\n" - | 198 -> "expected the \"initial\" keyword introducing the initial expression for the maximum\n" - | 199 -> "expected the initial expression for the maximum\n" + | 199 -> "expected the type of the elements compared to get the maximum\n" + | 200 -> "expected the \"initial\" keyword introducing the initial expression for the maximum\n" + | 201 -> "expected the initial expression for the maximum\n" | 101 -> "expected a payload for the enum case constructor, or the rest of the expression (with an \ operator ?)\n" @@ -110,77 +110,77 @@ let message s = | 108 -> "expected the expression for this struct field\n" | 104 -> "expected another structure field or the closing bracket\n" | 105 -> "expected the name of the structure field\n" - | 193 -> "expected an expression for the content of this enum case\n" - | 194 -> + | 195 -> "expected an expression for the content of this enum case\n" + | 196 -> "the expression for the content of the enum case is already well-formed, expected an \ operator to form a bigger expression\n" | 109 -> "expected the keyword following cardinal to compute the number of elements in a set\n" - | 241 -> "expected a scope use item: a rule, definition or assertion\n" - | 277 -> "expected the name of the variable subject to the rule\n" - | 254 -> + | 243 -> "expected a scope use item: a rule, definition or assertion\n" + | 279 -> "expected the name of the variable subject to the rule\n" + | 256 -> "expected a condition or a consequence for this rule, or the rest of the variable qualified \ name\n" - | 284 -> "expected a condition or a consequence for this rule\n" - | 279 -> "expected filled or not filled for a rule consequence\n" - | 285 -> "expected the name of the parameter for this dependent variable \n" - | 278 -> "expected the expression of the rule\n" - | 282 -> "expected the filled keyword the this rule \n" - | 255 -> "expected a struct field or a sub-scope context item after the dot\n" - | 242 -> "expected the name of the label\n" - | 272 -> "expected a rule or a definition after the label declaration\n" - | 273 -> "expected the label to which the exception is referring back\n" - | 276 -> "expected a rule or a definition after the exception declaration\n" - | 289 -> "expected the name of the variable you want to define\n" - | 290 -> "expected the defined as keyword to introduce the definition of this variable\n" - | 292 -> "expected an expression for the consequence of this definition under condition\n" - | 291 -> + | 286 -> "expected a condition or a consequence for this rule\n" + | 281 -> "expected filled or not filled for a rule consequence\n" + | 287 -> "expected the name of the parameter for this dependent variable \n" + | 280 -> "expected the expression of the rule\n" + | 284 -> "expected the filled keyword the this rule \n" + | 257 -> "expected a struct field or a sub-scope context item after the dot\n" + | 244 -> "expected the name of the label\n" + | 274 -> "expected a rule or a definition after the label declaration\n" + | 275 -> "expected the label to which the exception is referring back\n" + | 278 -> "expected a rule or a definition after the exception declaration\n" + | 291 -> "expected the name of the variable you want to define\n" + | 292 -> "expected the defined as keyword to introduce the definition of this variable\n" + | 294 -> "expected an expression for the consequence of this definition under condition\n" + | 293 -> "expected a expression for defining this function, introduced by the defined as keyword\n" - | 293 -> "expected an expression for the definition\n" - | 244 -> "expected an expression that shoud be asserted during execution\n" - | 245 -> "expecting the name of the varying variable\n" - | 248 -> "the variable varies with an expression that was expected here\n" - | 249 -> "expected an indication about the variation sense of the variable, or a new scope item\n" - | 247 -> "expected an indication about what this variable varies with\n" - | 257 -> "expected an expression for this condition\n" - | 267 -> "expected a consequence for this definition under condition\n" - | 263 -> "expected an expression for this definition under condition\n" - | 259 -> "expected the name of the variable that should be fixed\n" - | 260 -> "expected the legislative text by which the value of the variable is fixed\n" - | 261 -> "expected the legislative text by which the value of the variable is fixed\n" - | 270 -> "expected a new scope use item \n" - | 300 -> "expected the kind of the declaration (struct, scope or enum)\n" - | 301 -> "expected the struct name\n" - | 302 -> "expected a colon\n" - | 303 -> "expected struct data or condition\n" - | 304 -> "expected the name of this struct data \n" - | 305 -> "expected the type of this struct data, introduced by the content keyword\n" - | 306 -> "expected the type of this struct data\n" - | 320 -> "expected the name of this struct condition\n" - | 313 -> "expected a new struct data, or another declaration or scope use\n" - | 314 -> "expected the type of the parameter of this struct data function\n" - | 318 -> "expected a new struct data, or another declaration or scope use\n" - | 310 -> "expected a new struct data, or another declaration or scope use\n" - | 323 -> "expected the name of the scope you are declaring\n" - | 324 -> "expected a colon followed by the list of context items of this scope\n" - | 325 -> "expected a context item introduced by \"context\"\n" - | 326 -> "expected the name of this new context item\n" - | 327 -> "expected the kind of this context item: is it a condition, a sub-scope or a data?\n" - | 328 -> "expected the name of the subscope for this context item\n" - | 335 -> "expected another scope context item or the end of the scope declaration\n" - | 330 -> "expected the type of this context item\n" - | 331 -> "expected the next context item or a dependency declaration for this item\n" + | 295 -> "expected an expression for the definition\n" + | 246 -> "expected an expression that shoud be asserted during execution\n" + | 247 -> "expecting the name of the varying variable\n" + | 250 -> "the variable varies with an expression that was expected here\n" + | 251 -> "expected an indication about the variation sense of the variable, or a new scope item\n" + | 249 -> "expected an indication about what this variable varies with\n" + | 259 -> "expected an expression for this condition\n" + | 269 -> "expected a consequence for this definition under condition\n" + | 265 -> "expected an expression for this definition under condition\n" + | 261 -> "expected the name of the variable that should be fixed\n" + | 262 -> "expected the legislative text by which the value of the variable is fixed\n" + | 263 -> "expected the legislative text by which the value of the variable is fixed\n" + | 272 -> "expected a new scope use item \n" + | 302 -> "expected the kind of the declaration (struct, scope or enum)\n" + | 303 -> "expected the struct name\n" + | 304 -> "expected a colon\n" + | 305 -> "expected struct data or condition\n" + | 306 -> "expected the name of this struct data \n" + | 307 -> "expected the type of this struct data, introduced by the content keyword\n" + | 308 -> "expected the type of this struct data\n" + | 322 -> "expected the name of this struct condition\n" + | 315 -> "expected a new struct data, or another declaration or scope use\n" + | 316 -> "expected the type of the parameter of this struct data function\n" + | 320 -> "expected a new struct data, or another declaration or scope use\n" + | 312 -> "expected a new struct data, or another declaration or scope use\n" + | 325 -> "expected the name of the scope you are declaring\n" + | 326 -> "expected a colon followed by the list of context items of this scope\n" + | 327 -> "expected a context item introduced by \"context\"\n" + | 328 -> "expected the name of this new context item\n" + | 329 -> "expected the kind of this context item: is it a condition, a sub-scope or a data?\n" + | 330 -> "expected the name of the subscope for this context item\n" + | 337 -> "expected another scope context item or the end of the scope declaration\n" + | 332 -> "expected the type of this context item\n" | 333 -> "expected the next context item or a dependency declaration for this item\n" - | 338 -> "expected the name of your enum\n" - | 339 -> "expected a colon\n" - | 340 -> "expected an enum case\n" - | 341 -> "expected the name of an enum case \n" - | 342 -> "expected a payload for your enum case, or another case or declaration \n" - | 343 -> "expected a content type\n" - | 348 -> "expected another enum case, or a new declaration or scope use\n" + | 335 -> "expected the next context item or a dependency declaration for this item\n" + | 340 -> "expected the name of your enum\n" + | 341 -> "expected a colon\n" + | 342 -> "expected an enum case\n" + | 343 -> "expected the name of an enum case \n" + | 344 -> "expected a payload for your enum case, or another case or declaration \n" + | 345 -> "expected a content type\n" + | 350 -> "expected another enum case, or a new declaration or scope use\n" | 18 -> "expected a declaration or a scope use\n" | 19 -> "expected some text or the beginning of a code section\n" | 20 -> "expected a declaration or a scope use\n" | 21 -> "should not happen\n" - | 354 -> "expected a metadata-closing tag\n" - | 355 -> "expected a metadata-closing tag\n" + | 356 -> "expected a metadata-closing tag\n" + | 357 -> "expected a metadata-closing tag\n" | _ -> raise Not_found diff --git a/tests/test_enum/bad/ambiguous_cases.catala b/tests/test_enum/bad/ambiguous_cases.catala index d903e253..8237bb0f 100644 --- a/tests/test_enum/bad/ambiguous_cases.catala +++ b/tests/test_enum/bad/ambiguous_cases.catala @@ -2,10 +2,10 @@ /* new enum E: - -- Case1 content int + -- Case1 new enum F: - -- Case1 content int + -- Case1 new scope A: param e content E diff --git a/tests/test_enum/good/disambiguated_cases.catala b/tests/test_enum/good/disambiguated_cases.catala new file mode 100644 index 00000000..8bce4cd8 --- /dev/null +++ b/tests/test_enum/good/disambiguated_cases.catala @@ -0,0 +1,15 @@ +@Article@ + +/* +new enum E: + -- Case1 + +new enum F: + -- Case1 + +new scope A: + param e content E + +scope A: + def e := E.Case1 +*/ From fec4334b49505719f90ad2bf269c192d64407638 Mon Sep 17 00:00:00 2001 From: Aymeric Fromherz Date: Tue, 26 Jan 2021 11:41:20 -0500 Subject: [PATCH 7/7] Allow fully qualified enum names in matches --- src/catala/catala_surface/ast.ml | 3 +- src/catala/catala_surface/desugaring.ml | 48 +- src/catala/catala_surface/parser.messages | 448 ++++++++---------- src/catala/catala_surface/parser.mly | 11 +- src/catala/catala_surface/parser_errors.ml | 251 +++++----- .../test_enum/good/disambiguated_cases.catala | 9 +- .../output/disambiguated_cases.catala.A.out | 4 + 7 files changed, 369 insertions(+), 405 deletions(-) create mode 100644 tests/test_enum/good/output/disambiguated_cases.catala.A.out diff --git a/src/catala/catala_surface/ast.ml b/src/catala/catala_surface/ast.ml index 7e6a4b50..f97f9381 100644 --- a/src/catala/catala_surface/ast.ml +++ b/src/catala/catala_surface/ast.ml @@ -134,7 +134,8 @@ type enum_decl = { nude = true; }] -type match_case_pattern = constructor Pos.marked list * ident Pos.marked option +type match_case_pattern = + (constructor Pos.marked option * constructor Pos.marked) list * ident Pos.marked option [@@deriving visitors { diff --git a/src/catala/catala_surface/desugaring.ml b/src/catala/catala_surface/desugaring.ml index 7904792e..3dcb4049 100644 --- a/src/catala/catala_surface/desugaring.ml +++ b/src/catala/catala_surface/desugaring.ml @@ -55,9 +55,10 @@ let translate_unop (op : Ast.unop) : Dcalc.Ast.unop = module LiftStructFieldMap = Bindlib.Lift (Scopelang.Ast.StructFieldMap) module LiftEnumConstructorMap = Bindlib.Lift (Scopelang.Ast.EnumConstructorMap) -let disambiguate_constructor (ctxt : Name_resolution.context) (constructor : string Pos.marked list) - (pos : Pos.t) : Scopelang.Ast.EnumName.t * Scopelang.Ast.EnumConstructor.t = - let constructor = +let disambiguate_constructor (ctxt : Name_resolution.context) + (constructor : (string Pos.marked option * string Pos.marked) list) (pos : Pos.t) : + Scopelang.Ast.EnumName.t * Scopelang.Ast.EnumConstructor.t = + let enum, constructor = match constructor with | [ c ] -> c | _ -> @@ -71,17 +72,36 @@ let disambiguate_constructor (ctxt : Name_resolution.context) (constructor : str "The name of this constructor has not been defined before, maybe it is a typo?" (Pos.get_position constructor) in - if Scopelang.Ast.EnumMap.cardinal possible_c_uids > 1 then - Errors.raise_spanned_error - (Format.asprintf - "This constructor name is ambiguous, it can belong to %a. Desambiguate it by prefixing it \ - with the enum name." - (Format.pp_print_list - ~pp_sep:(fun fmt () -> Format.fprintf fmt " or ") - (fun fmt (s_name, _) -> Format.fprintf fmt "%a" Scopelang.Ast.EnumName.format_t s_name)) - (Scopelang.Ast.EnumMap.bindings possible_c_uids)) - (Pos.get_position constructor); - Scopelang.Ast.EnumMap.choose possible_c_uids + match enum with + | None -> + if Scopelang.Ast.EnumMap.cardinal possible_c_uids > 1 then + Errors.raise_spanned_error + (Format.asprintf + "This constructor name is ambiguous, it can belong to %a. Disambiguate it by \ + prefixing it with the enum name." + (Format.pp_print_list + ~pp_sep:(fun fmt () -> Format.fprintf fmt " or ") + (fun fmt (s_name, _) -> + Format.fprintf fmt "%a" Scopelang.Ast.EnumName.format_t s_name)) + (Scopelang.Ast.EnumMap.bindings possible_c_uids)) + (Pos.get_position constructor); + Scopelang.Ast.EnumMap.choose possible_c_uids + | Some enum -> ( + try + (* The path is fully qualified *) + let e_uid = Desugared.Ast.IdentMap.find (Pos.unmark enum) ctxt.enum_idmap in + try + let c_uid = Scopelang.Ast.EnumMap.find e_uid possible_c_uids in + (e_uid, c_uid) + with Not_found -> + Errors.raise_spanned_error + (Format.asprintf "Enum %s does not contain case %s" (Pos.unmark enum) + (Pos.unmark constructor)) + pos + with Not_found -> + Errors.raise_spanned_error + (Format.asprintf "Enum %s has not been defined before" (Pos.unmark enum)) + (Pos.get_position enum) ) (** Usage: [translate_expr scope ctxt expr] diff --git a/src/catala/catala_surface/parser.messages b/src/catala/catala_surface/parser.messages index 308489b2..291355ad 100644 --- a/src/catala/catala_surface/parser.messages +++ b/src/catala/catala_surface/parser.messages @@ -1,6 +1,6 @@ source_file_or_master: BEGIN_METADATA BEGIN_CODE END_CODE LAW_TEXT END_CODE ## -## Ends in an error in state: 357. +## Ends in an error in state: 359. ## ## metadata_block -> BEGIN_CODE option(law_text) code END_CODE option(law_text) . END_METADATA [ LAW_TEXT LAW_INCLUDE LAW_HEADING LAW_ARTICLE EOF BEGIN_METADATA ] ## @@ -12,7 +12,7 @@ expected a metadata-closing tag source_file_or_master: BEGIN_METADATA BEGIN_CODE END_CODE YEAR ## -## Ends in an error in state: 356. +## Ends in an error in state: 358. ## ## metadata_block -> BEGIN_CODE option(law_text) code END_CODE . option(law_text) END_METADATA [ LAW_TEXT LAW_INCLUDE LAW_HEADING LAW_ARTICLE EOF BEGIN_METADATA ] ## @@ -72,7 +72,7 @@ expected a declaration or a scope use source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT CONSTRUCTOR CONTENT TEXT YEAR ## -## Ends in an error in state: 350. +## Ends in an error in state: 352. ## ## nonempty_list(enum_decl_line) -> enum_decl_line . [ SCOPE END_CODE DECLARATION ] ## nonempty_list(enum_decl_line) -> enum_decl_line . nonempty_list(enum_decl_line) [ SCOPE END_CODE DECLARATION ] @@ -85,7 +85,7 @@ expected another enum case, or a new declaration or scope use source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT CONSTRUCTOR CONTENT YEAR ## -## Ends in an error in state: 345. +## Ends in an error in state: 347. ## ## enum_decl_line_payload -> CONTENT . typ [ SCOPE END_CODE DECLARATION ALT ] ## @@ -97,7 +97,7 @@ expected a content type source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT CONSTRUCTOR YEAR ## -## Ends in an error in state: 344. +## Ends in an error in state: 346. ## ## enum_decl_line -> ALT constructor . option(enum_decl_line_payload) [ SCOPE END_CODE DECLARATION ALT ] ## @@ -109,7 +109,7 @@ expected a payload for your enum case, or another case or declaration source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT YEAR ## -## Ends in an error in state: 343. +## Ends in an error in state: 345. ## ## enum_decl_line -> ALT . constructor option(enum_decl_line_payload) [ SCOPE END_CODE DECLARATION ALT ] ## @@ -121,7 +121,7 @@ expected the name of an enum case source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON YEAR ## -## Ends in an error in state: 342. +## Ends in an error in state: 344. ## ## code_item -> DECLARATION ENUM constructor COLON . nonempty_list(enum_decl_line) [ SCOPE END_CODE DECLARATION ] ## @@ -133,7 +133,7 @@ expected an enum case source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM CONSTRUCTOR YEAR ## -## Ends in an error in state: 341. +## Ends in an error in state: 343. ## ## code_item -> DECLARATION ENUM constructor . COLON nonempty_list(enum_decl_line) [ SCOPE END_CODE DECLARATION ] ## @@ -145,7 +145,7 @@ expected a colon source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION ENUM YEAR ## -## Ends in an error in state: 340. +## Ends in an error in state: 342. ## ## code_item -> DECLARATION ENUM . constructor COLON nonempty_list(enum_decl_line) [ SCOPE END_CODE DECLARATION ] ## @@ -157,7 +157,7 @@ expected the name of your enum source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT CONDITION YEAR ## -## Ends in an error in state: 335. +## Ends in an error in state: 337. ## ## scope_decl_item -> CONTEXT ident CONDITION . option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## @@ -169,7 +169,7 @@ expected the next context item or a dependency declaration for this item source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT CONTENT TEXT YEAR ## -## Ends in an error in state: 333. +## Ends in an error in state: 335. ## ## scope_decl_item -> CONTEXT ident CONTENT typ . option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## @@ -181,7 +181,7 @@ expected the next context item or a dependency declaration for this item source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT CONTENT YEAR ## -## Ends in an error in state: 332. +## Ends in an error in state: 334. ## ## scope_decl_item -> CONTEXT ident CONTENT . typ option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## @@ -193,7 +193,7 @@ expected the type of this context item source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT SCOPE CONSTRUCTOR YEAR ## -## Ends in an error in state: 337. +## Ends in an error in state: 339. ## ## nonempty_list(scope_decl_item) -> scope_decl_item . [ SCOPE END_CODE DECLARATION ] ## nonempty_list(scope_decl_item) -> scope_decl_item . nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ] @@ -206,7 +206,7 @@ expected another scope context item or the end of the scope declaration source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT SCOPE YEAR ## -## Ends in an error in state: 330. +## Ends in an error in state: 332. ## ## scope_decl_item -> CONTEXT ident SCOPE . constructor [ SCOPE END_CODE DECLARATION CONTEXT ] ## @@ -218,7 +218,7 @@ expected the name of the subscope for this context item source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT YEAR ## -## Ends in an error in state: 329. +## Ends in an error in state: 331. ## ## scope_decl_item -> CONTEXT ident . CONTENT typ option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## scope_decl_item -> CONTEXT ident . SCOPE constructor [ SCOPE END_CODE DECLARATION CONTEXT ] @@ -232,7 +232,7 @@ expected the kind of this context item: is it a condition, a sub-scope or a data source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT YEAR ## -## Ends in an error in state: 328. +## Ends in an error in state: 330. ## ## scope_decl_item -> CONTEXT . ident CONTENT typ option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## scope_decl_item -> CONTEXT . ident SCOPE constructor [ SCOPE END_CODE DECLARATION CONTEXT ] @@ -246,7 +246,7 @@ expected the name of this new context item source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON YEAR ## -## Ends in an error in state: 327. +## Ends in an error in state: 329. ## ## code_item -> DECLARATION SCOPE constructor COLON . nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ] ## @@ -258,7 +258,7 @@ expected a context item introduced by "context" source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR YEAR ## -## Ends in an error in state: 326. +## Ends in an error in state: 328. ## ## code_item -> DECLARATION SCOPE constructor . COLON nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ] ## @@ -270,7 +270,7 @@ expected a colon followed by the list of context items of this scope source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION SCOPE YEAR ## -## Ends in an error in state: 325. +## Ends in an error in state: 327. ## ## code_item -> DECLARATION SCOPE . constructor COLON nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ] ## @@ -282,7 +282,7 @@ expected the name of the scope you are declaring source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT DEPENDS COLLECTION YEAR ## -## Ends in an error in state: 312. +## Ends in an error in state: 314. ## ## typ -> collection_marked . typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONTEXT CONDITION ALT ] ## @@ -295,7 +295,7 @@ expected a new struct data, or another declaration or scope use source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT DEPENDS TEXT YEAR ## -## Ends in an error in state: 320. +## Ends in an error in state: 322. ## ## list(struct_scope) -> struct_scope . list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## @@ -307,7 +307,7 @@ expected a new struct data, or another declaration or scope use source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT DEPENDS YEAR ## -## Ends in an error in state: 316. +## Ends in an error in state: 318. ## ## struct_scope_func -> DEPENDS . typ [ SCOPE END_CODE DECLARATION DATA CONTEXT CONDITION ] ## @@ -319,7 +319,7 @@ expected the type of the parameter of this struct data function source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT YEAR ## -## Ends in an error in state: 315. +## Ends in an error in state: 317. ## ## struct_scope -> struct_scope_base . option(struct_scope_func) [ SCOPE END_CODE DECLARATION DATA CONDITION ] ## @@ -331,7 +331,7 @@ expected a new struct data, or another declaration or scope use source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION YEAR ## -## Ends in an error in state: 322. +## Ends in an error in state: 324. ## ## struct_scope_base -> condition_pos . ident [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ] ## @@ -343,7 +343,7 @@ expected the name of this struct condition source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON DATA IDENT CONTENT YEAR ## -## Ends in an error in state: 308. +## Ends in an error in state: 310. ## ## struct_scope_base -> DATA ident CONTENT . typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ] ## @@ -355,7 +355,7 @@ expected the type of this struct data source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON DATA IDENT YEAR ## -## Ends in an error in state: 307. +## Ends in an error in state: 309. ## ## struct_scope_base -> DATA ident . CONTENT typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ] ## @@ -367,7 +367,7 @@ expected the type of this struct data, introduced by the content keyword source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON DATA YEAR ## -## Ends in an error in state: 306. +## Ends in an error in state: 308. ## ## struct_scope_base -> DATA . ident CONTENT typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ] ## @@ -379,7 +379,7 @@ expected the name of this struct data source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON YEAR ## -## Ends in an error in state: 305. +## Ends in an error in state: 307. ## ## code_item -> DECLARATION STRUCT constructor COLON . list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## @@ -391,7 +391,7 @@ expected struct data or condition source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR YEAR ## -## Ends in an error in state: 304. +## Ends in an error in state: 306. ## ## code_item -> DECLARATION STRUCT constructor . COLON list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## @@ -403,7 +403,7 @@ expected a colon source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION STRUCT YEAR ## -## Ends in an error in state: 303. +## Ends in an error in state: 305. ## ## code_item -> DECLARATION STRUCT . constructor COLON list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## @@ -415,7 +415,7 @@ expected the struct name source_file_or_master: LAW_ARTICLE BEGIN_CODE DECLARATION YEAR ## -## Ends in an error in state: 302. +## Ends in an error in state: 304. ## ## code_item -> DECLARATION . STRUCT constructor COLON list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## code_item -> DECLARATION . SCOPE constructor COLON nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ] @@ -429,7 +429,7 @@ expected the kind of the declaration (struct, scope or enum) source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION CARDINAL THEN ## -## Ends in an error in state: 272. +## Ends in an error in state: 274. ## ## nonempty_list(scope_item) -> scope_item . [ SCOPE END_CODE DECLARATION ] ## nonempty_list(scope_item) -> scope_item . nonempty_list(scope_item) [ SCOPE END_CODE DECLARATION ] @@ -441,23 +441,23 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 109, spurious reduction of production primitive_expression -> CARDINAL -## In state 112, spurious reduction of production base_expression -> primitive_expression -## In state 147, spurious reduction of production mult_expression -> base_expression -## In state 134, spurious reduction of production sum_expression -> mult_expression -## In state 156, spurious reduction of production compare_expression -> sum_expression -## In state 184, spurious reduction of production logical_expression -> compare_expression -## In state 209, spurious reduction of production expression -> logical_expression -## In state 266, spurious reduction of production assertion_base -> expression -## In state 267, spurious reduction of production assertion -> option(condition_consequence) assertion_base -## In state 271, spurious reduction of production scope_item -> ASSERTION assertion +## In state 119, spurious reduction of production primitive_expression -> CARDINAL +## In state 122, spurious reduction of production base_expression -> primitive_expression +## In state 151, spurious reduction of production mult_expression -> base_expression +## In state 138, spurious reduction of production sum_expression -> mult_expression +## In state 160, spurious reduction of production compare_expression -> sum_expression +## In state 188, spurious reduction of production logical_expression -> compare_expression +## In state 211, spurious reduction of production expression -> logical_expression +## In state 268, spurious reduction of production assertion_base -> expression +## In state 269, spurious reduction of production assertion -> option(condition_consequence) assertion_base +## In state 273, spurious reduction of production scope_item -> ASSERTION assertion ## expected a new scope use item source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION FIXED IDENT BY YEAR ## -## Ends in an error in state: 263. +## Ends in an error in state: 265. ## ## assertion -> FIXED qident BY . ident [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -469,7 +469,7 @@ expected the legislative text by which the value of the variable is fixed source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION FIXED IDENT WITH_V ## -## Ends in an error in state: 262. +## Ends in an error in state: 264. ## ## assertion -> FIXED qident . BY ident [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -480,15 +480,15 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 256, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident -## In state 248, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) +## In state 258, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident +## In state 250, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) ## expected the legislative text by which the value of the variable is fixed source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION FIXED YEAR ## -## Ends in an error in state: 261. +## Ends in an error in state: 263. ## ## assertion -> FIXED . qident BY ident [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -500,7 +500,7 @@ expected the name of the variable that should be fixed source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION UNDER_CONDITION TRUE CONSEQUENCE BY ## -## Ends in an error in state: 265. +## Ends in an error in state: 267. ## ## assertion -> option(condition_consequence) . assertion_base [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -512,7 +512,7 @@ expected an expression for this definition under condition source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION UNDER_CONDITION TRUE THEN ## -## Ends in an error in state: 269. +## Ends in an error in state: 271. ## ## condition_consequence -> condition . CONSEQUENCE [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FILLED FALSE EXISTS DEFINED_AS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -524,20 +524,20 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 70, spurious reduction of production primitive_expression -> small_expression -## In state 112, spurious reduction of production base_expression -> primitive_expression -## In state 147, spurious reduction of production mult_expression -> base_expression -## In state 134, spurious reduction of production sum_expression -> mult_expression -## In state 156, spurious reduction of production compare_expression -> sum_expression -## In state 184, spurious reduction of production logical_expression -> compare_expression -## In state 209, spurious reduction of production expression -> logical_expression -## In state 260, spurious reduction of production condition -> UNDER_CONDITION expression +## In state 122, spurious reduction of production base_expression -> primitive_expression +## In state 151, spurious reduction of production mult_expression -> base_expression +## In state 138, spurious reduction of production sum_expression -> mult_expression +## In state 160, spurious reduction of production compare_expression -> sum_expression +## In state 188, spurious reduction of production logical_expression -> compare_expression +## In state 211, spurious reduction of production expression -> logical_expression +## In state 262, spurious reduction of production condition -> UNDER_CONDITION expression ## expected a consequence for this definition under condition source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION UNDER_CONDITION YEAR ## -## Ends in an error in state: 259. +## Ends in an error in state: 261. ## ## condition -> UNDER_CONDITION . expression [ CONSEQUENCE ] ## @@ -549,7 +549,7 @@ expected an expression for this condition source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES IDENT UNDER_CONDITION ## -## Ends in an error in state: 249. +## Ends in an error in state: 251. ## ## assertion -> VARIES qident . WITH_V base_expression option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -560,15 +560,15 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 256, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident -## In state 248, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) +## In state 258, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident +## In state 250, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) ## expected an indication about what this variable varies with source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES IDENT WITH_V TRUE THEN ## -## Ends in an error in state: 251. +## Ends in an error in state: 253. ## ## assertion -> VARIES qident WITH_V base_expression . option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -580,14 +580,14 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 70, spurious reduction of production primitive_expression -> small_expression -## In state 112, spurious reduction of production base_expression -> primitive_expression +## In state 122, spurious reduction of production base_expression -> primitive_expression ## expected an indication about the variation sense of the variable, or a new scope item source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES IDENT WITH_V YEAR ## -## Ends in an error in state: 250. +## Ends in an error in state: 252. ## ## assertion -> VARIES qident WITH_V . base_expression option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -599,7 +599,7 @@ the variable varies with an expression that was expected here source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES YEAR ## -## Ends in an error in state: 247. +## Ends in an error in state: 249. ## ## assertion -> VARIES . qident WITH_V base_expression option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -611,7 +611,7 @@ expecting the name of the varying variable source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION YEAR ## -## Ends in an error in state: 246. +## Ends in an error in state: 248. ## ## scope_item -> ASSERTION . assertion [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -623,7 +623,7 @@ expected an expression that shoud be asserted during execution source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT DEFINED_AS YEAR ## -## Ends in an error in state: 295. +## Ends in an error in state: 297. ## ## definition -> option(label) option(exception_to) DEFINITION qident option(definition_parameters) option(condition_consequence) DEFINED_AS . expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -635,7 +635,7 @@ expected an expression for the definition source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT OF IDENT DECREASING ## -## Ends in an error in state: 293. +## Ends in an error in state: 295. ## ## definition -> option(label) option(exception_to) DEFINITION qident option(definition_parameters) . option(condition_consequence) DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -647,7 +647,7 @@ expected a expression for defining this function, introduced by the defined as k source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT UNDER_CONDITION CARDINAL CONSEQUENCE DECREASING ## -## Ends in an error in state: 294. +## Ends in an error in state: 296. ## ## definition -> option(label) option(exception_to) DEFINITION qident option(definition_parameters) option(condition_consequence) . DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -659,7 +659,7 @@ expected an expression for the consequence of this definition under condition source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT WITH_V ## -## Ends in an error in state: 292. +## Ends in an error in state: 294. ## ## definition -> option(label) option(exception_to) DEFINITION qident . option(definition_parameters) option(condition_consequence) DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -670,15 +670,15 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 256, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident -## In state 248, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) +## In state 258, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident +## In state 250, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) ## expected the defined as keyword to introduce the definition of this variable source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION YEAR ## -## Ends in an error in state: 291. +## Ends in an error in state: 293. ## ## definition -> option(label) option(exception_to) DEFINITION . qident option(definition_parameters) option(condition_consequence) DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -690,7 +690,7 @@ expected the name of the variable you want to define source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON EXCEPTION IDENT DEFINED_AS ## -## Ends in an error in state: 278. +## Ends in an error in state: 280. ## ## definition -> option(label) option(exception_to) . DEFINITION qident option(definition_parameters) option(condition_consequence) DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## rule -> option(label) option(exception_to) . RULE rule_expr option(condition_consequence) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] @@ -703,7 +703,7 @@ expected a rule or a definition after the exception declaration source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON EXCEPTION YEAR ## -## Ends in an error in state: 275. +## Ends in an error in state: 277. ## ## exception_to -> EXCEPTION . option(ident) [ RULE DEFINITION ] ## @@ -715,7 +715,7 @@ expected the label to which the exception is referring back source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON LABEL IDENT DEFINED_AS ## -## Ends in an error in state: 274. +## Ends in an error in state: 276. ## ## definition -> option(label) . option(exception_to) DEFINITION qident option(definition_parameters) option(condition_consequence) DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## rule -> option(label) . option(exception_to) RULE rule_expr option(condition_consequence) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] @@ -728,7 +728,7 @@ expected a rule or a definition after the label declaration source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON LABEL YEAR ## -## Ends in an error in state: 244. +## Ends in an error in state: 246. ## ## label -> LABEL . ident [ RULE EXCEPTION DEFINITION ] ## @@ -740,7 +740,7 @@ expected the name of the label source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT DOT YEAR ## -## Ends in an error in state: 257. +## Ends in an error in state: 259. ## ## separated_nonempty_list(DOT,ident) -> ident DOT . separated_nonempty_list(DOT,ident) [ WITH_V UNDER_CONDITION OF NOT FILLED DEFINED_AS BY ] ## @@ -752,7 +752,7 @@ expected a struct field or a sub-scope context item after the dot source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT NOT FALSE ## -## Ends in an error in state: 284. +## Ends in an error in state: 286. ## ## rule_consequence -> option(NOT) . FILLED [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -764,7 +764,7 @@ expected the filled keyword the this rule source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT OF IDENT YEAR ## -## Ends in an error in state: 280. +## Ends in an error in state: 282. ## ## rule -> option(label) option(exception_to) RULE rule_expr . option(condition_consequence) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -776,7 +776,7 @@ expected the expression of the rule source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT OF YEAR ## -## Ends in an error in state: 287. +## Ends in an error in state: 289. ## ## definition_parameters -> OF . ident [ UNDER_CONDITION NOT FILLED DEFINED_AS ] ## @@ -788,7 +788,7 @@ expected the name of the parameter for this dependent variable source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT UNDER_CONDITION CARDINAL CONSEQUENCE FALSE ## -## Ends in an error in state: 281. +## Ends in an error in state: 283. ## ## rule -> option(label) option(exception_to) RULE rule_expr option(condition_consequence) . rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -800,7 +800,7 @@ expected filled or not filled for a rule consequence source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT WITH_V ## -## Ends in an error in state: 286. +## Ends in an error in state: 288. ## ## rule_expr -> qident . option(definition_parameters) [ UNDER_CONDITION NOT FILLED ] ## @@ -811,15 +811,15 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 256, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident -## In state 248, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) +## In state 258, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident +## In state 250, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) ## expected a condition or a consequence for this rule source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT YEAR ## -## Ends in an error in state: 256. +## Ends in an error in state: 258. ## ## separated_nonempty_list(DOT,ident) -> ident . [ WITH_V UNDER_CONDITION OF NOT FILLED DEFINED_AS BY ] ## separated_nonempty_list(DOT,ident) -> ident . DOT separated_nonempty_list(DOT,ident) [ WITH_V UNDER_CONDITION OF NOT FILLED DEFINED_AS BY ] @@ -832,7 +832,7 @@ expected a condition or a consequence for this rule, or the rest of the variable source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE YEAR ## -## Ends in an error in state: 279. +## Ends in an error in state: 281. ## ## rule -> option(label) option(exception_to) RULE . rule_expr option(condition_consequence) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## @@ -844,7 +844,7 @@ expected the name of the variable subject to the rule source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON YEAR ## -## Ends in an error in state: 243. +## Ends in an error in state: 245. ## ## code_item -> SCOPE constructor option(scope_use_condition) COLON . nonempty_list(scope_item) [ SCOPE END_CODE DECLARATION ] ## @@ -856,7 +856,7 @@ expected a scope use item: a rule, definition or assertion source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CARDINAL YEAR ## -## Ends in an error in state: 109. +## Ends in an error in state: 119. ## ## aggregate_func -> CARDINAL . [ FOR ] ## primitive_expression -> CARDINAL . [ WITH THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] @@ -869,7 +869,7 @@ expected the keyword following cardinal to compute the number of elements in a s source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR CONTENT TRUE YEAR ## -## Ends in an error in state: 196. +## Ends in an error in state: 198. ## ## enum_inject_content -> CONTENT small_expression . [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## small_expression -> small_expression . ARROW constructor [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DOT DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ] @@ -883,7 +883,7 @@ the expression for the content of the enum case is already well-formed, expected source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR CONTENT YEAR ## -## Ends in an error in state: 195. +## Ends in an error in state: 197. ## ## enum_inject_content -> CONTENT . small_expression [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -896,7 +896,7 @@ expected an expression for the content of this enum case source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR LBRACKET ALT IDENT COLON CARDINAL ALT YEAR ## -## Ends in an error in state: 105. +## Ends in an error in state: 115. ## ## separated_nonempty_list(ALT,struct_content_field) -> struct_content_field ALT . separated_nonempty_list(ALT,struct_content_field) [ RBRACKET ] ## @@ -908,7 +908,7 @@ expected the name of the structure field source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR LBRACKET ALT IDENT COLON CARDINAL THEN ## -## Ends in an error in state: 104. +## Ends in an error in state: 114. ## ## separated_nonempty_list(ALT,struct_content_field) -> struct_content_field . [ RBRACKET ] ## separated_nonempty_list(ALT,struct_content_field) -> struct_content_field . ALT separated_nonempty_list(ALT,struct_content_field) [ RBRACKET ] @@ -920,20 +920,20 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## This implies that, although the LR(1) items shown above provide an ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). -## In state 109, spurious reduction of production primitive_expression -> CARDINAL -## In state 112, spurious reduction of production base_expression -> primitive_expression -## In state 147, spurious reduction of production mult_expression -> base_expression -## In state 134, spurious reduction of production sum_expression -> mult_expression -## In state 156, spurious reduction of production compare_expression -> sum_expression -## In state 184, spurious reduction of production logical_expression -> compare_expression -## In state 183, spurious reduction of production struct_content_field -> ident COLON logical_expression +## In state 119, spurious reduction of production primitive_expression -> CARDINAL +## In state 122, spurious reduction of production base_expression -> primitive_expression +## In state 151, spurious reduction of production mult_expression -> base_expression +## In state 138, spurious reduction of production sum_expression -> mult_expression +## In state 160, spurious reduction of production compare_expression -> sum_expression +## In state 188, spurious reduction of production logical_expression -> compare_expression +## In state 187, spurious reduction of production struct_content_field -> ident COLON logical_expression ## expected another structure field or the closing bracket source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR LBRACKET ALT IDENT COLON YEAR ## -## Ends in an error in state: 108. +## Ends in an error in state: 118. ## ## struct_content_field -> ident COLON . logical_expression [ RBRACKET ALT ] ## @@ -945,7 +945,7 @@ expected the expression for this struct field source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR LBRACKET ALT IDENT YEAR ## -## Ends in an error in state: 107. +## Ends in an error in state: 117. ## ## struct_content_field -> ident . COLON logical_expression [ RBRACKET ALT ] ## @@ -957,7 +957,7 @@ expected a colon source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR LBRACKET ALT YEAR ## -## Ends in an error in state: 103. +## Ends in an error in state: 113. ## ## struct_inject_content -> LBRACKET ALT . separated_nonempty_list(ALT,struct_content_field) RBRACKET [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -969,7 +969,7 @@ expected the name of the structure field source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR LBRACKET YEAR ## -## Ends in an error in state: 102. +## Ends in an error in state: 112. ## ## struct_inject_content -> LBRACKET . ALT separated_nonempty_list(ALT,struct_content_field) RBRACKET [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -981,7 +981,7 @@ expected structure fields introduced by -- source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR YEAR ## -## Ends in an error in state: 101. +## Ends in an error in state: 111. ## ## struct_or_enum_inject -> constructor . option(preceded(DOT,constructor)) option(enum_inject_content) [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## struct_or_enum_inject -> constructor . struct_inject_content [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] @@ -994,7 +994,7 @@ expected a payload for the enum case constructor, or the rest of the expression source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MAXIMUM TEXT INIT YEAR ## -## Ends in an error in state: 201. +## Ends in an error in state: 203. ## ## aggregate_func -> CONTENT MAXIMUM typ_base INIT . primitive_expression [ FOR ] ## @@ -1006,7 +1006,7 @@ expected the initial expression for the maximum source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MAXIMUM TEXT YEAR ## -## Ends in an error in state: 200. +## Ends in an error in state: 202. ## ## aggregate_func -> CONTENT MAXIMUM typ_base . INIT primitive_expression [ FOR ] ## @@ -1018,7 +1018,7 @@ expected the "initial" keyword introducing the initial expression for the maximu source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MAXIMUM YEAR ## -## Ends in an error in state: 199. +## Ends in an error in state: 201. ## ## aggregate_func -> CONTENT MAXIMUM . typ_base INIT primitive_expression [ FOR ] ## @@ -1030,7 +1030,7 @@ expected the type of the elements compared to get the maximum source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MINIMUM TEXT INIT YEAR ## -## Ends in an error in state: 90. +## Ends in an error in state: 100. ## ## aggregate_func -> CONTENT MINIMUM typ_base INIT . primitive_expression [ FOR ] ## @@ -1042,7 +1042,7 @@ expected the initial expression for the minimum source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MINIMUM TEXT YEAR ## -## Ends in an error in state: 89. +## Ends in an error in state: 99. ## ## aggregate_func -> CONTENT MINIMUM typ_base . INIT primitive_expression [ FOR ] ## @@ -1054,7 +1054,7 @@ expected the "initial" keyword introducing the initial expression for the minimu source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MINIMUM YEAR ## -## Ends in an error in state: 88. +## Ends in an error in state: 98. ## ## aggregate_func -> CONTENT MINIMUM . typ_base INIT primitive_expression [ FOR ] ## @@ -1066,7 +1066,7 @@ expected the type of the elements compared to get the minimum source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT YEAR ## -## Ends in an error in state: 87. +## Ends in an error in state: 97. ## ## aggregate_func -> CONTENT . MAXIMUM typ_base INIT primitive_expression [ FOR ] ## aggregate_func -> CONTENT . MINIMUM typ_base INIT primitive_expression [ FOR ] @@ -1079,7 +1079,7 @@ this is the start of an arg-maximum or arg-minimum expression source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN CARDINAL SUCH THAT YEAR ## -## Ends in an error in state: 217. +## Ends in an error in state: 219. ## ## expression -> exists_prefix . expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1091,7 +1091,7 @@ expected an expression for the existential test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN TRUE SUCH YEAR ## -## Ends in an error in state: 223. +## Ends in an error in state: 225. ## ## exists_prefix -> exists_marked ident IN primitive_expression SUCH . THAT [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1103,7 +1103,7 @@ expected a keyword to complete the "such that" construction source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN TRUE WITH ## -## Ends in an error in state: 222. +## Ends in an error in state: 224. ## ## exists_prefix -> exists_marked ident IN primitive_expression . SUCH THAT [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1121,7 +1121,7 @@ expected a keyword to form the "such that" expression for the existential test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN YEAR ## -## Ends in an error in state: 221. +## Ends in an error in state: 223. ## ## exists_prefix -> exists_marked ident IN . primitive_expression SUCH THAT [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1133,7 +1133,7 @@ expected an expression that designates the set subject to the existential test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT YEAR ## -## Ends in an error in state: 220. +## Ends in an error in state: 222. ## ## exists_prefix -> exists_marked ident . IN primitive_expression SUCH THAT [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1145,7 +1145,7 @@ expected the "in" keyword to continue this existential test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS YEAR ## -## Ends in an error in state: 219. +## Ends in an error in state: 221. ## ## exists_prefix -> exists_marked . ident IN primitive_expression SUCH THAT [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1157,7 +1157,7 @@ expected an identifier that will designate the existential witness for the test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT IN CARDINAL WE_HAVE YEAR ## -## Ends in an error in state: 210. +## Ends in an error in state: 212. ## ## expression -> forall_prefix . expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1169,7 +1169,7 @@ expected an expression for the universal test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT IN TRUE WITH ## -## Ends in an error in state: 214. +## Ends in an error in state: 216. ## ## forall_prefix -> for_all_marked ident IN primitive_expression . WE_HAVE [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1187,7 +1187,7 @@ expected the "we have" keyword for this universal test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT IN YEAR ## -## Ends in an error in state: 213. +## Ends in an error in state: 215. ## ## forall_prefix -> for_all_marked ident IN . primitive_expression WE_HAVE [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1199,7 +1199,7 @@ expected the expression designating the set on which to perform the universal te source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT YEAR ## -## Ends in an error in state: 212. +## Ends in an error in state: 214. ## ## forall_prefix -> for_all_marked ident . IN primitive_expression WE_HAVE [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1211,7 +1211,7 @@ expected the "in" keyword for the rest of the universal test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL YEAR ## -## Ends in an error in state: 211. +## Ends in an error in state: 213. ## ## forall_prefix -> for_all_marked . ident IN primitive_expression WE_HAVE [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_TO_DEC INT_LITERAL IF IDENT GET_YEAR GET_MONTH GET_DAY FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## @@ -1223,7 +1223,7 @@ expected an identifier for the bound variable of the universal test source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR YEAR ## -## Ends in an error in state: 206. +## Ends in an error in state: 208. ## ## for_all_marked -> FOR . ALL [ IDENT ] ## @@ -1235,7 +1235,7 @@ expected the "all" keyword to mean the "for all" construction of the universal t source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE SEMICOLON ## -## Ends in an error in state: 225. +## Ends in an error in state: 227. ## ## expression -> IF expression . THEN expression ELSE base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1247,19 +1247,19 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 70, spurious reduction of production primitive_expression -> small_expression -## In state 112, spurious reduction of production base_expression -> primitive_expression -## In state 147, spurious reduction of production mult_expression -> base_expression -## In state 134, spurious reduction of production sum_expression -> mult_expression -## In state 156, spurious reduction of production compare_expression -> sum_expression -## In state 184, spurious reduction of production logical_expression -> compare_expression -## In state 209, spurious reduction of production expression -> logical_expression +## In state 122, spurious reduction of production base_expression -> primitive_expression +## In state 151, spurious reduction of production mult_expression -> base_expression +## In state 138, spurious reduction of production sum_expression -> mult_expression +## In state 160, spurious reduction of production compare_expression -> sum_expression +## In state 188, spurious reduction of production logical_expression -> compare_expression +## In state 211, spurious reduction of production expression -> logical_expression ## expected the "then" keyword as the conditional expression is complete source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE THEN TRUE ELSE YEAR ## -## Ends in an error in state: 228. +## Ends in an error in state: 230. ## ## expression -> IF expression THEN expression ELSE . base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1271,7 +1271,7 @@ expected an expression for the "else" branch of this conditional construction source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE THEN TRUE THEN ## -## Ends in an error in state: 227. +## Ends in an error in state: 229. ## ## expression -> IF expression THEN expression . ELSE base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1283,19 +1283,19 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 70, spurious reduction of production primitive_expression -> small_expression -## In state 112, spurious reduction of production base_expression -> primitive_expression -## In state 147, spurious reduction of production mult_expression -> base_expression -## In state 134, spurious reduction of production sum_expression -> mult_expression -## In state 156, spurious reduction of production compare_expression -> sum_expression -## In state 184, spurious reduction of production logical_expression -> compare_expression -## In state 209, spurious reduction of production expression -> logical_expression +## In state 122, spurious reduction of production base_expression -> primitive_expression +## In state 151, spurious reduction of production mult_expression -> base_expression +## In state 138, spurious reduction of production sum_expression -> mult_expression +## In state 160, spurious reduction of production compare_expression -> sum_expression +## In state 188, spurious reduction of production logical_expression -> compare_expression +## In state 211, spurious reduction of production expression -> logical_expression ## expected the "else" branch of this conditional expression as the "then" branch is complete source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE THEN YEAR ## -## Ends in an error in state: 226. +## Ends in an error in state: 228. ## ## expression -> IF expression THEN . expression ELSE base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1307,7 +1307,7 @@ expected an expression the for the "then" branch of the conditiona source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF YEAR ## -## Ends in an error in state: 205. +## Ends in an error in state: 207. ## ## expression -> IF . expression THEN expression ELSE base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## @@ -1319,7 +1319,7 @@ expected an expression for the test of the conditional source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION INT_LITERAL WITH_V ## -## Ends in an error in state: 92. +## Ends in an error in state: 102. ## ## literal -> num_literal . option(unit_literal) [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DOT DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ] ## @@ -1331,7 +1331,7 @@ expected a unit for this literal, or a valid operator to complete the expression source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION LPAREN TRUE THEN ## -## Ends in an error in state: 230. +## Ends in an error in state: 232. ## ## atomic_expression -> LPAREN expression . RPAREN [ WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING IN GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER FOR EXCEPTION EQUAL END_CODE ELSE DOT DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ] ## @@ -1343,12 +1343,12 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 70, spurious reduction of production primitive_expression -> small_expression -## In state 112, spurious reduction of production base_expression -> primitive_expression -## In state 147, spurious reduction of production mult_expression -> base_expression -## In state 134, spurious reduction of production sum_expression -> mult_expression -## In state 156, spurious reduction of production compare_expression -> sum_expression -## In state 184, spurious reduction of production logical_expression -> compare_expression -## In state 209, spurious reduction of production expression -> logical_expression +## In state 122, spurious reduction of production base_expression -> primitive_expression +## In state 151, spurious reduction of production mult_expression -> base_expression +## In state 138, spurious reduction of production sum_expression -> mult_expression +## In state 160, spurious reduction of production compare_expression -> sum_expression +## In state 188, spurious reduction of production logical_expression -> compare_expression +## In state 211, spurious reduction of production expression -> logical_expression ## unmatched parenthesis that should have been closed by here @@ -1367,7 +1367,7 @@ expected an expression inside the parenthesis source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION LSQUARE TRUE SEMICOLON YEAR ## -## Ends in an error in state: 237. +## Ends in an error in state: 239. ## ## separated_nonempty_list(SEMICOLON,expression) -> expression SEMICOLON . separated_nonempty_list(SEMICOLON,expression) [ RSQUARE ] ## @@ -1379,7 +1379,7 @@ expected another element of the collection source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION LSQUARE TRUE THEN ## -## Ends in an error in state: 236. +## Ends in an error in state: 238. ## ## separated_nonempty_list(SEMICOLON,expression) -> expression . [ RSQUARE ] ## separated_nonempty_list(SEMICOLON,expression) -> expression . SEMICOLON separated_nonempty_list(SEMICOLON,expression) [ RSQUARE ] @@ -1392,12 +1392,12 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 70, spurious reduction of production primitive_expression -> small_expression -## In state 112, spurious reduction of production base_expression -> primitive_expression -## In state 147, spurious reduction of production mult_expression -> base_expression -## In state 134, spurious reduction of production sum_expression -> mult_expression -## In state 156, spurious reduction of production compare_expression -> sum_expression -## In state 184, spurious reduction of production logical_expression -> compare_expression -## In state 209, spurious reduction of production expression -> logical_expression +## In state 122, spurious reduction of production base_expression -> primitive_expression +## In state 151, spurious reduction of production mult_expression -> base_expression +## In state 138, spurious reduction of production sum_expression -> mult_expression +## In state 160, spurious reduction of production compare_expression -> sum_expression +## In state 188, spurious reduction of production logical_expression -> compare_expression +## In state 211, spurious reduction of production expression -> logical_expression ## expected a semicolon or a right square bracket after the collection element @@ -1416,7 +1416,7 @@ expected a collection element source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MAP FOR IDENT IN TRUE OF YEAR ## -## Ends in an error in state: 129. +## Ends in an error in state: 133. ## ## aggregate -> aggregate_func FOR ident IN primitive_expression OF . base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1428,7 +1428,7 @@ expected an expression for the map predicate source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MAP FOR IDENT IN TRUE WITH ## -## Ends in an error in state: 128. +## Ends in an error in state: 132. ## ## aggregate -> aggregate_func FOR ident IN primitive_expression . OF base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1446,7 +1446,7 @@ expected the "of" keyword to introduce the map predicate source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MAP FOR IDENT IN YEAR ## -## Ends in an error in state: 127. +## Ends in an error in state: 131. ## ## aggregate -> aggregate_func FOR ident IN . primitive_expression OF base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1458,7 +1458,7 @@ expected the collection argument to map source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MAP FOR IDENT YEAR ## -## Ends in an error in state: 126. +## Ends in an error in state: 130. ## ## aggregate -> aggregate_func FOR ident . IN primitive_expression OF base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1470,7 +1470,7 @@ expected the "in" keyword to introduce the collection argument to map source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MAP FOR YEAR ## -## Ends in an error in state: 125. +## Ends in an error in state: 129. ## ## aggregate -> aggregate_func FOR . ident IN primitive_expression OF base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1482,7 +1482,7 @@ expected the identifier for the map predicate source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MAP YEAR ## -## Ends in an error in state: 124. +## Ends in an error in state: 128. ## ## aggregate -> aggregate_func . FOR ident IN primitive_expression OF base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1510,84 +1510,16 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION expected the "with patter" keyword to complete the pattern matching expression -source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT CONSTRUCTOR COLON CARDINAL RBRACKET -## -## Ends in an error in state: 81. -## -## match_arms -> ALT match_arm . match_arms [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] -## -## The known suffix of the stack is as follows: -## ALT match_arm -## -## WARNING: This example involves spurious reductions. -## This implies that, although the LR(1) items shown above provide an -## accurate view of the past (what has been recognized so far), they -## may provide an INCOMPLETE view of the future (what was expected next). -## In state 109, spurious reduction of production primitive_expression -> CARDINAL -## In state 112, spurious reduction of production base_expression -> primitive_expression -## In state 147, spurious reduction of production mult_expression -> base_expression -## In state 134, spurious reduction of production sum_expression -> mult_expression -## In state 156, spurious reduction of production compare_expression -> sum_expression -## In state 184, spurious reduction of production logical_expression -> compare_expression -## In state 203, spurious reduction of production match_arm -> constructor_binding COLON logical_expression -## -expected another match case or the rest of the expression since the previous match case is complete -source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT CONSTRUCTOR COLON YEAR -## -## Ends in an error in state: 84. -## -## match_arm -> constructor_binding COLON . logical_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ALT ] -## -## The known suffix of the stack is as follows: -## constructor_binding COLON -## -expected an expression for this pattern matching case -source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT CONSTRUCTOR OF CONSTRUCTOR YEAR -## -## Ends in an error in state: 118. -## -## optional_binding -> OF constructor . constructor_binding [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] -## -## The known suffix of the stack is as follows: -## OF constructor -## - -expected a colon or a binding for the enum constructor payload - -source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT CONSTRUCTOR OF IDENT YEAR -## -## Ends in an error in state: 83. -## -## match_arm -> constructor_binding . COLON logical_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ALT ] -## -## The known suffix of the stack is as follows: -## constructor_binding -## - -expected a colon and then the expression for this matching case - -source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT CONSTRUCTOR OF YEAR -## -## Ends in an error in state: 116. -## -## optional_binding -> OF . ident [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] -## optional_binding -> OF . constructor constructor_binding [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] -## -## The known suffix of the stack is as follows: -## OF -## - -expected an identifier for this enum case binding source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT CONSTRUCTOR YEAR ## -## Ends in an error in state: 115. +## Ends in an error in state: 85. ## -## constructor_binding -> constructor . optional_binding [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] +## maybe_qualified_constructor -> constructor . option(preceded(DOT,constructor)) [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR OF NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSTRUCTOR CONSEQUENCE COLON ASSERTION AND ALT ] ## ## The known suffix of the stack is as follows: ## constructor @@ -1705,7 +1637,7 @@ expected the type of the elements compared for the minimum source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MINUSMONEY YEAR ## -## Ends in an error in state: 110. +## Ends in an error in state: 120. ## ## sum_expression -> sum_unop . sum_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET OR NOT_EQUAL LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1717,7 +1649,7 @@ expected an expression to take the opposite of source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION NOT YEAR ## -## Ends in an error in state: 181. +## Ends in an error in state: 185. ## ## logical_expression -> logical_unop . compare_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ALT ] ## @@ -1758,7 +1690,7 @@ expected a constructor, to get the payload of this enum case source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE ASSERTION ## -## Ends in an error in state: 242. +## Ends in an error in state: 244. ## ## code_item -> SCOPE constructor option(scope_use_condition) . COLON nonempty_list(scope_item) [ SCOPE END_CODE DECLARATION ] ## @@ -1770,14 +1702,14 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 70, spurious reduction of production primitive_expression -> small_expression -## In state 112, spurious reduction of production base_expression -> primitive_expression -## In state 147, spurious reduction of production mult_expression -> base_expression -## In state 134, spurious reduction of production sum_expression -> mult_expression -## In state 156, spurious reduction of production compare_expression -> sum_expression -## In state 184, spurious reduction of production logical_expression -> compare_expression -## In state 209, spurious reduction of production expression -> logical_expression -## In state 240, spurious reduction of production scope_use_condition -> UNDER_CONDITION expression -## In state 241, spurious reduction of production option(scope_use_condition) -> scope_use_condition +## In state 122, spurious reduction of production base_expression -> primitive_expression +## In state 151, spurious reduction of production mult_expression -> base_expression +## In state 138, spurious reduction of production sum_expression -> mult_expression +## In state 160, spurious reduction of production compare_expression -> sum_expression +## In state 188, spurious reduction of production logical_expression -> compare_expression +## In state 211, spurious reduction of production expression -> logical_expression +## In state 242, spurious reduction of production scope_use_condition -> UNDER_CONDITION expression +## In state 243, spurious reduction of production option(scope_use_condition) -> scope_use_condition ## expected a colon after the scope use precondition @@ -1796,7 +1728,7 @@ expected an identifier standing for a struct field or a subscope name source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE IN YEAR ## -## Ends in an error in state: 132. +## Ends in an error in state: 136. ## ## base_expression -> primitive_expression IN . base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1808,7 +1740,7 @@ expected an expression standing for the set you want to test for membership source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE INCREASING ## -## Ends in an error in state: 147. +## Ends in an error in state: 151. ## ## mult_expression -> base_expression . [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## mult_expression -> base_expression . mult_op mult_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] @@ -1821,14 +1753,14 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION ## accurate view of the past (what has been recognized so far), they ## may provide an INCOMPLETE view of the future (what was expected next). ## In state 70, spurious reduction of production primitive_expression -> small_expression -## In state 112, spurious reduction of production base_expression -> primitive_expression +## In state 122, spurious reduction of production base_expression -> primitive_expression ## expected an operator to compose the expression on the left source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE MULT YEAR ## -## Ends in an error in state: 154. +## Ends in an error in state: 158. ## ## mult_expression -> base_expression mult_op . mult_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1840,7 +1772,7 @@ expected an expression on the right side of the multiplication or division opera source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE NOT_EQUAL YEAR ## -## Ends in an error in state: 179. +## Ends in an error in state: 183. ## ## compare_expression -> sum_expression compare_op . compare_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET OR LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1852,7 +1784,7 @@ expected an expression on the right side of the comparison operator source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE OF YEAR ## -## Ends in an error in state: 121. +## Ends in an error in state: 125. ## ## base_expression -> primitive_expression OF . base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1864,7 +1796,7 @@ expected an expression for the argument of this function call source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE OR YEAR ## -## Ends in an error in state: 187. +## Ends in an error in state: 191. ## ## logical_expression -> compare_expression logical_op . logical_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ALT ] ## @@ -1876,7 +1808,7 @@ expected an expression on the right side of the logical operator source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE PLUSMONEY YEAR ## -## Ends in an error in state: 145. +## Ends in an error in state: 149. ## ## sum_expression -> mult_expression sum_op . sum_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET OR NOT_EQUAL LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -1888,7 +1820,7 @@ expected an expression on the right side of the sum or minus operator source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE WE_HAVE ## -## Ends in an error in state: 112. +## Ends in an error in state: 122. ## ## base_expression -> primitive_expression . [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## base_expression -> primitive_expression . OF base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] @@ -1909,7 +1841,7 @@ expected an operator to compose the expression on the left with source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE WITH YEAR ## -## Ends in an error in state: 113. +## Ends in an error in state: 123. ## ## base_expression -> primitive_expression WITH . constructor_binding [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSMONEY PLUSDURATION PLUSDEC PLUSDATE PLUS OR NOT_EQUAL MULTMONEY MULTDEC MULT MINUSMONEY MINUSDURATION MINUSDEC MINUSDATE MINUS LESSER_MONEY LESSER_EQUAL_MONEY LESSER_EQUAL_DURATION LESSER_EQUAL_DEC LESSER_EQUAL_DATE LESSER_EQUAL LESSER_DURATION LESSER_DEC LESSER_DATE LESSER LABEL INCREASING GREATER_MONEY GREATER_EQUAL_MONEY GREATER_EQUAL_DURATION GREATER_EQUAL_DEC GREATER_EQUAL_DATE GREATER_EQUAL GREATER_DURATION GREATER_DEC GREATER_DATE GREATER EXCEPTION EQUAL END_CODE ELSE DIVMONEY DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## @@ -2043,7 +1975,7 @@ expected the name of the scope you want to use source_file_or_master: LAW_ARTICLE BEGIN_CODE YEAR ## -## Ends in an error in state: 366. +## Ends in an error in state: 368. ## ## law_article_item -> BEGIN_CODE . code END_CODE [ LAW_TEXT LAW_INCLUDE LAW_HEADING LAW_ARTICLE EOF BEGIN_METADATA BEGIN_CODE ] ## @@ -2055,7 +1987,7 @@ expected a declaration or a scope use source_file_or_master: LAW_ARTICLE LAW_TEXT YEAR ## -## Ends in an error in state: 371. +## Ends in an error in state: 373. ## ## law_articles_items -> law_article_item . law_articles_items [ LAW_INCLUDE LAW_HEADING LAW_ARTICLE EOF BEGIN_METADATA ] ## @@ -2067,7 +1999,7 @@ expected a code block, a metadata block, more law text or a heading source_file_or_master: LAW_ARTICLE YEAR ## -## Ends in an error in state: 365. +## Ends in an error in state: 367. ## ## source_file_article -> law_article . law_articles_items [ LAW_INCLUDE LAW_HEADING LAW_ARTICLE EOF BEGIN_METADATA ] ## @@ -2079,7 +2011,7 @@ expected a code block, a metadata block, more law text or a heading source_file_or_master: LAW_INCLUDE YEAR ## -## Ends in an error in state: 360. +## Ends in an error in state: 362. ## ## source_file_after_text -> source_file_item . list(law_intermediate_text) source_file_after_text [ # ] ## @@ -2091,7 +2023,7 @@ expected an article title, another heading or some text source_file_or_master: LAW_TEXT YEAR ## -## Ends in an error in state: 375. +## Ends in an error in state: 377. ## ## list(law_intermediate_text) -> law_intermediate_text . list(law_intermediate_text) [ LAW_INCLUDE LAW_HEADING LAW_ARTICLE EOF BEGIN_METADATA ] ## diff --git a/src/catala/catala_surface/parser.mly b/src/catala/catala_surface/parser.mly index bfd784c3..e5f5369d 100644 --- a/src/catala/catala_surface/parser.mly +++ b/src/catala/catala_surface/parser.mly @@ -314,16 +314,23 @@ logical_expression: (Binop (binop, e1, e2), Pos.from_lpos $sloc) } +maybe_qualified_constructor: +| c_or_path = constructor c = option(preceded(DOT, constructor)) { + match c with + | None -> (None, c_or_path) + | Some c -> (Some c_or_path, c) +} + optional_binding: | { ([], None)} | OF i = ident {([], Some i)} -| OF c = constructor cs_and_i = constructor_binding { +| OF c = maybe_qualified_constructor cs_and_i = constructor_binding { let (cs, i) = cs_and_i in (c::cs, i) } constructor_binding: -| c = constructor cs_and_i = optional_binding { +| c = maybe_qualified_constructor cs_and_i = optional_binding { let (cs, i) = cs_and_i in (c::cs, i) } diff --git a/src/catala/catala_surface/parser_errors.ml b/src/catala/catala_surface/parser_errors.ml index 69121244..664cae30 100644 --- a/src/catala/catala_surface/parser_errors.ml +++ b/src/catala/catala_surface/parser_errors.ml @@ -13,11 +13,11 @@ let message s = "expected another inclusion of a Catala file, since this file is a master file which can \ only contain inclusions of other Catala files\n" | 8 -> "expected some text, another heading or a law article\n" - | 375 -> "expected a heading, an article title or some text\n" - | 360 -> "expected an article title, another heading or some text\n" - | 365 -> "expected a code block, a metadata block, more law text or a heading\n" - | 371 -> "expected a code block, a metadata block, more law text or a heading\n" - | 366 -> "expected a declaration or a scope use\n" + | 377 -> "expected a heading, an article title or some text\n" + | 362 -> "expected an article title, another heading or some text\n" + | 367 -> "expected a code block, a metadata block, more law text or a heading\n" + | 373 -> "expected a code block, a metadata block, more law text or a heading\n" + | 368 -> "expected a declaration or a scope use\n" | 22 -> "expected the name of the scope you want to use\n" | 24 -> "expected a scope use precondition or a colon\n" | 25 -> "expected an expression which will act as the condition\n" @@ -28,21 +28,21 @@ let message s = | 31 -> "expected the third component of the date literal\n" | 32 -> "expected a delimiter to finish the date literal\n" | 70 -> "expected an operator to compose the expression on the left with\n" - | 113 -> "expected an enum constructor to test if the expression on the left\n" - | 112 -> "expected an operator to compose the expression on the left with\n" - | 145 -> "expected an expression on the right side of the sum or minus operator\n" - | 187 -> "expected an expression on the right side of the logical operator\n" - | 121 -> "expected an expression for the argument of this function call\n" - | 179 -> "expected an expression on the right side of the comparison operator\n" - | 154 -> "expected an expression on the right side of the multiplication or division operator\n" - | 147 -> "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" + | 123 -> "expected an enum constructor to test if the expression on the left\n" + | 122 -> "expected an operator to compose the expression on the left with\n" + | 149 -> "expected an expression on the right side of the sum or minus operator\n" + | 191 -> "expected an expression on the right side of the logical operator\n" + | 125 -> "expected an expression for the argument of this function call\n" + | 183 -> "expected an expression on the right side of the comparison operator\n" + | 158 -> "expected an expression on the right side of the multiplication or division operator\n" + | 151 -> "expected an operator to compose the expression on the left\n" + | 136 -> "expected an expression standing for the set you want to test for membership\n" | 71 -> "expected an identifier standing for a struct field or a subscope name\n" - | 242 -> "expected a colon after the scope use precondition\n" + | 244 -> "expected a colon after the scope use precondition\n" | 76 -> "expected a constructor, to get the payload of this enum case\n" | 35 -> "expected the \"for\" keyword to spell the aggregation\n" - | 181 -> "expected an expression to take the negation of\n" - | 110 -> "expected an expression to take the opposite of\n" + | 185 -> "expected an expression to take the negation of\n" + | 120 -> "expected an expression to take the opposite of\n" | 51 -> "expected the type of the elements compared for the minimum\n" | 52 -> "expected the \"initial\" keyword to introduce the minimum initial expression\n" | 53 -> "expected the minimum initial expression\n" @@ -52,135 +52,128 @@ let message s = | 59 -> "expected an expression to match with\n" | 79 -> "expected a pattern matching case\n" | 80 -> "expected the name of the constructor for the enum case in the pattern matching\n" - | 115 -> + | 85 -> "expected a binding for the constructor payload, or a colon and the matching case expression\n" - | 116 -> "expected an identifier for this enum case binding\n" - | 83 -> "expected a colon and then the expression for this matching case\n" - | 118 -> "expected a colon or a binding for the enum constructor payload\n" - | 84 -> "expected an expression for this pattern matching case\n" - | 81 -> - "expected another match case or the rest of the expression since the previous match case is \ - complete\n" | 78 -> "expected the \"with patter\" keyword to complete the pattern matching expression\n" - | 124 -> "expected the \"for\" keyword to introduce the identifier for the map predicate\n" - | 125 -> "expected the identifier for the map predicate\n" - | 126 -> "expected the \"in\" keyword to introduce the collection argument to map\n" - | 127 -> "expected the collection argument to map\n" - | 128 -> "expected the \"of\" keyword to introduce the map predicate\n" - | 129 -> "expected an expression for the map predicate\n" + | 128 -> "expected the \"for\" keyword to introduce the identifier for the map predicate\n" + | 129 -> "expected the identifier for the map predicate\n" + | 130 -> "expected the \"in\" keyword to introduce the collection argument to map\n" + | 131 -> "expected the collection argument to map\n" + | 132 -> "expected the \"of\" keyword to introduce the map predicate\n" + | 133 -> "expected an expression for the map predicate\n" | 54 -> "expected a collection element\n" - | 236 -> "expected a semicolon or a right square bracket after the collection element \n" - | 237 -> "expected another element of the collection\n" + | 238 -> "expected a semicolon or a right square bracket after the collection element \n" + | 239 -> "expected another element of the collection\n" | 58 -> "expected an expression inside the parenthesis\n" - | 230 -> "unmatched parenthesis that should have been closed by here\n" - | 92 -> "expected a unit for this literal, or a valid operator to complete the expression \n" - | 205 -> "expected an expression for the test of the conditional\n" - | 226 -> "expected an expression the for the \"then\" branch of the conditiona\n" - | 227 -> + | 232 -> "unmatched parenthesis that should have been closed by here\n" + | 102 -> "expected a unit for this literal, or a valid operator to complete the expression \n" + | 207 -> "expected an expression for the test of the conditional\n" + | 228 -> "expected an expression the for the \"then\" branch of the conditiona\n" + | 229 -> "expected the \"else\" branch of this conditional expression as the \"then\" branch is \ complete\n" - | 228 -> "expected an expression for the \"else\" branch of this conditional construction\n" - | 225 -> "expected the \"then\" keyword as the conditional expression is complete\n" - | 206 -> + | 230 -> "expected an expression for the \"else\" branch of this conditional construction\n" + | 227 -> "expected the \"then\" keyword as the conditional expression is complete\n" + | 208 -> "expected the \"all\" keyword to mean the \"for all\" construction of the universal test\n" - | 211 -> "expected an identifier for the bound variable of the universal test\n" - | 212 -> "expected the \"in\" keyword for the rest of the universal test\n" - | 213 -> "expected the expression designating the set on which to perform the universal test\n" - | 214 -> "expected the \"we have\" keyword for this universal test\n" - | 210 -> "expected an expression for the universal test\n" - | 219 -> "expected an identifier that will designate the existential witness for the test\n" - | 220 -> "expected the \"in\" keyword to continue this existential test\n" - | 221 -> "expected an expression that designates the set subject to the existential test\n" - | 222 -> "expected a keyword to form the \"such that\" expression for the existential test\n" - | 223 -> "expected a keyword to complete the \"such that\" construction\n" - | 217 -> "expected an expression for the existential test\n" - | 87 -> "this is the start of an arg-maximum or arg-minimum expression\n" - | 88 -> "expected the type of the elements compared to get the minimum\n" - | 89 -> "expected the \"initial\" keyword introducing the initial expression for the minimum\n" - | 90 -> "expected the initial expression for the minimum\n" - | 199 -> "expected the type of the elements compared to get the maximum\n" - | 200 -> "expected the \"initial\" keyword introducing the initial expression for the maximum\n" - | 201 -> "expected the initial expression for the maximum\n" - | 101 -> + | 213 -> "expected an identifier for the bound variable of the universal test\n" + | 214 -> "expected the \"in\" keyword for the rest of the universal test\n" + | 215 -> "expected the expression designating the set on which to perform the universal test\n" + | 216 -> "expected the \"we have\" keyword for this universal test\n" + | 212 -> "expected an expression for the universal test\n" + | 221 -> "expected an identifier that will designate the existential witness for the test\n" + | 222 -> "expected the \"in\" keyword to continue this existential test\n" + | 223 -> "expected an expression that designates the set subject to the existential test\n" + | 224 -> "expected a keyword to form the \"such that\" expression for the existential test\n" + | 225 -> "expected a keyword to complete the \"such that\" construction\n" + | 219 -> "expected an expression for the existential test\n" + | 97 -> "this is the start of an arg-maximum or arg-minimum expression\n" + | 98 -> "expected the type of the elements compared to get the minimum\n" + | 99 -> "expected the \"initial\" keyword introducing the initial expression for the minimum\n" + | 100 -> "expected the initial expression for the minimum\n" + | 201 -> "expected the type of the elements compared to get the maximum\n" + | 202 -> "expected the \"initial\" keyword introducing the initial expression for the maximum\n" + | 203 -> "expected the initial expression for the maximum\n" + | 111 -> "expected a payload for the enum case constructor, or the rest of the expression (with an \ operator ?)\n" - | 102 -> "expected structure fields introduced by --\n" - | 103 -> "expected the name of the structure field\n" - | 107 -> "expected a colon\n" - | 108 -> "expected the expression for this struct field\n" - | 104 -> "expected another structure field or the closing bracket\n" - | 105 -> "expected the name of the structure field\n" - | 195 -> "expected an expression for the content of this enum case\n" - | 196 -> + | 112 -> "expected structure fields introduced by --\n" + | 113 -> "expected the name of the structure field\n" + | 117 -> "expected a colon\n" + | 118 -> "expected the expression for this struct field\n" + | 114 -> "expected another structure field or the closing bracket\n" + | 115 -> "expected the name of the structure field\n" + | 197 -> "expected an expression for the content of this enum case\n" + | 198 -> "the expression for the content of the enum case is already well-formed, expected an \ operator to form a bigger expression\n" - | 109 -> "expected the keyword following cardinal to compute the number of elements in a set\n" - | 243 -> "expected a scope use item: a rule, definition or assertion\n" - | 279 -> "expected the name of the variable subject to the rule\n" - | 256 -> + | 119 -> "expected the keyword following cardinal to compute the number of elements in a set\n" + | 245 -> "expected a scope use item: a rule, definition or assertion\n" + | 281 -> "expected the name of the variable subject to the rule\n" + | 258 -> "expected a condition or a consequence for this rule, or the rest of the variable qualified \ name\n" - | 286 -> "expected a condition or a consequence for this rule\n" - | 281 -> "expected filled or not filled for a rule consequence\n" - | 287 -> "expected the name of the parameter for this dependent variable \n" - | 280 -> "expected the expression of the rule\n" - | 284 -> "expected the filled keyword the this rule \n" - | 257 -> "expected a struct field or a sub-scope context item after the dot\n" - | 244 -> "expected the name of the label\n" - | 274 -> "expected a rule or a definition after the label declaration\n" - | 275 -> "expected the label to which the exception is referring back\n" - | 278 -> "expected a rule or a definition after the exception declaration\n" - | 291 -> "expected the name of the variable you want to define\n" - | 292 -> "expected the defined as keyword to introduce the definition of this variable\n" - | 294 -> "expected an expression for the consequence of this definition under condition\n" - | 293 -> + | 288 -> "expected a condition or a consequence for this rule\n" + | 283 -> "expected filled or not filled for a rule consequence\n" + | 289 -> "expected the name of the parameter for this dependent variable \n" + | 282 -> "expected the expression of the rule\n" + | 286 -> "expected the filled keyword the this rule \n" + | 259 -> "expected a struct field or a sub-scope context item after the dot\n" + | 246 -> "expected the name of the label\n" + | 276 -> "expected a rule or a definition after the label declaration\n" + | 277 -> "expected the label to which the exception is referring back\n" + | 280 -> "expected a rule or a definition after the exception declaration\n" + | 293 -> "expected the name of the variable you want to define\n" + | 294 -> "expected the defined as keyword to introduce the definition of this variable\n" + | 296 -> "expected an expression for the consequence of this definition under condition\n" + | 295 -> "expected a expression for defining this function, introduced by the defined as keyword\n" - | 295 -> "expected an expression for the definition\n" - | 246 -> "expected an expression that shoud be asserted during execution\n" - | 247 -> "expecting the name of the varying variable\n" - | 250 -> "the variable varies with an expression that was expected here\n" - | 251 -> "expected an indication about the variation sense of the variable, or a new scope item\n" - | 249 -> "expected an indication about what this variable varies with\n" - | 259 -> "expected an expression for this condition\n" - | 269 -> "expected a consequence for this definition under condition\n" - | 265 -> "expected an expression for this definition under condition\n" - | 261 -> "expected the name of the variable that should be fixed\n" - | 262 -> "expected the legislative text by which the value of the variable is fixed\n" - | 263 -> "expected the legislative text by which the value of the variable is fixed\n" - | 272 -> "expected a new scope use item \n" - | 302 -> "expected the kind of the declaration (struct, scope or enum)\n" - | 303 -> "expected the struct name\n" - | 304 -> "expected a colon\n" - | 305 -> "expected struct data or condition\n" - | 306 -> "expected the name of this struct data \n" - | 307 -> "expected the type of this struct data, introduced by the content keyword\n" - | 308 -> "expected the type of this struct data\n" - | 322 -> "expected the name of this struct condition\n" - | 315 -> "expected a new struct data, or another declaration or scope use\n" - | 316 -> "expected the type of the parameter of this struct data function\n" - | 320 -> "expected a new struct data, or another declaration or scope use\n" - | 312 -> "expected a new struct data, or another declaration or scope use\n" - | 325 -> "expected the name of the scope you are declaring\n" - | 326 -> "expected a colon followed by the list of context items of this scope\n" - | 327 -> "expected a context item introduced by \"context\"\n" - | 328 -> "expected the name of this new context item\n" - | 329 -> "expected the kind of this context item: is it a condition, a sub-scope or a data?\n" - | 330 -> "expected the name of the subscope for this context item\n" - | 337 -> "expected another scope context item or the end of the scope declaration\n" - | 332 -> "expected the type of this context item\n" - | 333 -> "expected the next context item or a dependency declaration for this item\n" + | 297 -> "expected an expression for the definition\n" + | 248 -> "expected an expression that shoud be asserted during execution\n" + | 249 -> "expecting the name of the varying variable\n" + | 252 -> "the variable varies with an expression that was expected here\n" + | 253 -> "expected an indication about the variation sense of the variable, or a new scope item\n" + | 251 -> "expected an indication about what this variable varies with\n" + | 261 -> "expected an expression for this condition\n" + | 271 -> "expected a consequence for this definition under condition\n" + | 267 -> "expected an expression for this definition under condition\n" + | 263 -> "expected the name of the variable that should be fixed\n" + | 264 -> "expected the legislative text by which the value of the variable is fixed\n" + | 265 -> "expected the legislative text by which the value of the variable is fixed\n" + | 274 -> "expected a new scope use item \n" + | 304 -> "expected the kind of the declaration (struct, scope or enum)\n" + | 305 -> "expected the struct name\n" + | 306 -> "expected a colon\n" + | 307 -> "expected struct data or condition\n" + | 308 -> "expected the name of this struct data \n" + | 309 -> "expected the type of this struct data, introduced by the content keyword\n" + | 310 -> "expected the type of this struct data\n" + | 324 -> "expected the name of this struct condition\n" + | 317 -> "expected a new struct data, or another declaration or scope use\n" + | 318 -> "expected the type of the parameter of this struct data function\n" + | 322 -> "expected a new struct data, or another declaration or scope use\n" + | 314 -> "expected a new struct data, or another declaration or scope use\n" + | 327 -> "expected the name of the scope you are declaring\n" + | 328 -> "expected a colon followed by the list of context items of this scope\n" + | 329 -> "expected a context item introduced by \"context\"\n" + | 330 -> "expected the name of this new context item\n" + | 331 -> "expected the kind of this context item: is it a condition, a sub-scope or a data?\n" + | 332 -> "expected the name of the subscope for this context item\n" + | 339 -> "expected another scope context item or the end of the scope declaration\n" + | 334 -> "expected the type of this context item\n" | 335 -> "expected the next context item or a dependency declaration for this item\n" - | 340 -> "expected the name of your enum\n" - | 341 -> "expected a colon\n" - | 342 -> "expected an enum case\n" - | 343 -> "expected the name of an enum case \n" - | 344 -> "expected a payload for your enum case, or another case or declaration \n" - | 345 -> "expected a content type\n" - | 350 -> "expected another enum case, or a new declaration or scope use\n" + | 337 -> "expected the next context item or a dependency declaration for this item\n" + | 342 -> "expected the name of your enum\n" + | 343 -> "expected a colon\n" + | 344 -> "expected an enum case\n" + | 345 -> "expected the name of an enum case \n" + | 346 -> "expected a payload for your enum case, or another case or declaration \n" + | 347 -> "expected a content type\n" + | 352 -> "expected another enum case, or a new declaration or scope use\n" | 18 -> "expected a declaration or a scope use\n" | 19 -> "expected some text or the beginning of a code section\n" | 20 -> "expected a declaration or a scope use\n" | 21 -> "should not happen\n" - | 356 -> "expected a metadata-closing tag\n" - | 357 -> "expected a metadata-closing tag\n" + | 358 -> "expected a metadata-closing tag\n" + | 359 -> "expected a metadata-closing tag\n" | _ -> raise Not_found diff --git a/tests/test_enum/good/disambiguated_cases.catala b/tests/test_enum/good/disambiguated_cases.catala index 8bce4cd8..67d84be7 100644 --- a/tests/test_enum/good/disambiguated_cases.catala +++ b/tests/test_enum/good/disambiguated_cases.catala @@ -5,11 +5,18 @@ new enum E: -- Case1 new enum F: - -- Case1 + -- Case1 content int + -- Case2 new scope A: param e content E + param f content F + param x content int scope A: def e := E.Case1 + def f := F.Case1 content 2 + def x := match f with + -- F.Case1 of i : i + -- Case2 : 3 */ diff --git a/tests/test_enum/good/output/disambiguated_cases.catala.A.out b/tests/test_enum/good/output/disambiguated_cases.catala.A.out new file mode 100644 index 00000000..2335c02b --- /dev/null +++ b/tests/test_enum/good/output/disambiguated_cases.catala.A.out @@ -0,0 +1,4 @@ +[RESULT] Computation successful! Results: +[RESULT] e = Case1 () +[RESULT] f = Case1 2 +[RESULT] x = 2