Some small fixes, error message improvements, CI artifacts cleanup (#424)

This commit is contained in:
Louis Gesbert 2023-03-08 18:04:11 +01:00 committed by GitHub
commit 88406072bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 341 additions and 292 deletions

View File

@ -49,7 +49,7 @@ jobs:
- name: Generate HTML index
run: |
cd artifacts
tree -H . --noreport --dirsfirst -T 'Catala latest development artifacts' --charset utf-8 -o index.html
tree -H . -L 1 --noreport --dirsfirst -T 'Catala latest development artifacts' --charset utf-8 -o index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:

View File

@ -31,16 +31,23 @@ jobs:
if: ${{ github.ref == 'refs/heads/master' }}
run: |
RELEASE_TAG=$(git describe --tags)
mkdir -p artifacts
docker run --rm catalalang/catala-build:${IMAGE_TAG} sh -uexc '
opam --cli=2.1 remove z3 >&2
opam --cli=2.1 exec -- dune build --profile=release french_law compiler/catala.bc.js >&2
opam --cli=2.1 exec -- dune build --profile=release @doc >&2
opam --cli=2.1 exec -- make -C doc/syntax >&2
mv _build/default/compiler/catala.bc.js catala_'"${RELEASE_TAG}"'_node.js >&2
mv _build/default/_doc/_html doc/api >&2
tar c -h catala_'"${RELEASE_TAG}"'_node.js french_law doc/syntax/syntax.pdf doc/api --exclude french_law/js/node_modules --exclude french_law/python/env --exclude '"'"'.*'"'"' --exclude '"'"'__*'"'"'
' | tar vx -C artifacts
mkdir -p artifacts >&2
mv _build/default/compiler/catala.bc.js artifacts/catala_'"${RELEASE_TAG}"'_node.js >&2
mv _build/default/_doc/_html artifacts/api-doc >&2
mv doc/syntax/syntax.pdf artifacts/ >&2
tar czf artifacts/french_law_'"${RELEASE_TAG}"'_ocaml.tar.gz french_law/ocaml >&2
tar czf artifacts/french_law_'"${RELEASE_TAG}"'_js.tar.gz french_law/js --exclude french_law/js/node_modules >&2
tar czf artifacts/french_law_'"${RELEASE_TAG}"'_python.tar.gz french_law/python >&2
ln -s french_law_'"${RELEASE_TAG}"'_ocaml.tar.gz artifacts/french_law_ocaml.tar.gz >&2
ln -s french_law_'"${RELEASE_TAG}"'_js.tar.gz artifacts/french_law_js.tar.gz >&2
ln -s french_law_'"${RELEASE_TAG}"'_python.tar.gz artifacts/french_law_python.tar.gz >&2
tar c artifacts/*
' | tar vx
- name: Build static binaries
if: ${{ github.ref == 'refs/heads/master' }}
run: ./build_release.sh -C artifacts

View File

@ -260,6 +260,8 @@ and evaluate_operator :
LRat (protect o_div_mon_mon x y)
| Div_mon_rat, [LMoney x; LRat y] ->
LMoney (protect o_div_mon_rat x y)
| Div_dur_dur, [LDuration x; LDuration y] ->
LRat (protect o_div_dur_dur x y)
| Lt_int_int, [LInt x; LInt y] -> LBool (o_lt_int_int x y)
| Lt_rat_rat, [LRat x; LRat y] -> LBool (o_lt_rat_rat x y)
| Lt_mon_mon, [LMoney x; LMoney y] -> LBool (o_lt_mon_mon x y)
@ -296,13 +298,13 @@ and evaluate_operator :
| Sub_int_int | Sub_rat_rat | Sub_mon_mon | Sub_dat_dat
| Sub_dat_dur | Sub_dur_dur | Mult_int_int | Mult_rat_rat
| Mult_mon_rat | Mult_dur_int | Div_int_int | Div_rat_rat
| Div_mon_mon | Div_mon_rat | Lt_int_int | Lt_rat_rat | Lt_mon_mon
| Lt_dat_dat | Lt_dur_dur | Lte_int_int | Lte_rat_rat
| Lte_mon_mon | Lte_dat_dat | Lte_dur_dur | Gt_int_int
| Gt_rat_rat | Gt_mon_mon | Gt_dat_dat | Gt_dur_dur | Gte_int_int
| Gte_rat_rat | Gte_mon_mon | Gte_dat_dat | Gte_dur_dur
| Eq_int_int | Eq_rat_rat | Eq_mon_mon | Eq_dat_dat | Eq_dur_dur
),
| Div_mon_mon | Div_mon_rat | Div_dur_dur | Lt_int_int
| Lt_rat_rat | Lt_mon_mon | Lt_dat_dat | Lt_dur_dur | Lte_int_int
| Lte_rat_rat | Lte_mon_mon | Lte_dat_dat | Lte_dur_dur
| Gt_int_int | Gt_rat_rat | Gt_mon_mon | Gt_dat_dat | Gt_dur_dur
| Gte_int_int | Gte_rat_rat | Gte_mon_mon | Gte_dat_dat
| Gte_dur_dur | Eq_int_int | Eq_rat_rat | Eq_mon_mon | Eq_dat_dat
| Eq_dur_dur ),
_ ) ->
err ()
in

View File

@ -64,7 +64,7 @@ module Vertex = struct
match x with
| Var (v, None) -> ScopeVar.format_t fmt v
| Var (v, Some sv) ->
Format.fprintf fmt "%a.%a" ScopeVar.format_t v StateName.format_t sv
Format.fprintf fmt "%a@%a" ScopeVar.format_t v StateName.format_t sv
| SubScope v -> SubScopeName.format_t fmt v
let info = function
@ -102,36 +102,53 @@ let correct_computation_ordering (g : ScopeDependencies.t) : Vertex.t list =
(** Outputs an error in case of cycles. *)
let check_for_cycle (scope : Ast.scope) (g : ScopeDependencies.t) : unit =
(* if there is a cycle, there will be an strongly connected component of
(* if there is a cycle, there will be a strongly connected component of
cardinality > 1 *)
let sccs = SCC.scc_list g in
if List.length sccs < ScopeDependencies.nb_vertex g then
let scc = List.find (fun scc -> List.length scc > 1) sccs in
match List.find_opt (function [] | [_] -> false | _ -> true) sccs with
| None -> ()
| Some [] -> assert false
| Some (v0 :: _ as scc) ->
let module VSet = Set.Make (Vertex) in
let scc = VSet.of_list scc in
let rec get_cycle cycle cycle_set v =
let cycle = v :: cycle in
let cycle_set = VSet.add v cycle_set in
let succ = ScopeDependencies.succ g v in
if List.exists (fun v -> VSet.mem v cycle_set) succ then
(* a cycle may be smaller than the scc, in that case we just return the
first one found *)
let rec cut_after acc = function
| [] -> acc
| v :: vs ->
if List.mem v succ then v :: acc else cut_after (v :: acc) vs
in
cut_after [] cycle
else
get_cycle cycle cycle_set
(List.find (fun succ -> VSet.mem succ scc) succ)
in
let cycle = get_cycle [] VSet.empty v0 in
let spans =
List.flatten
(List.map
(fun v ->
let var_str = Format.asprintf "%a" Vertex.format_t v in
let var_info = Vertex.info v in
let succs = ScopeDependencies.succ_e g v in
let _, edge_pos, succ =
List.find (fun (_, _, succ) -> List.mem succ scc) succs
in
let succ_str = Format.asprintf "%a" Vertex.format_t succ in
[
( Some ("Cycle variable " ^ var_str ^ ", declared:"),
Marked.get_mark var_info );
( Some
("Used here in the definition of another cycle variable "
^ succ_str
^ ":"),
edge_pos );
])
scc)
List.map2
(fun v1 v2 ->
let msg =
Format.asprintf "%a is used here in the definition of %a:"
Vertex.format_t v1 Vertex.format_t v2
in
let _, edge_pos, _ = ScopeDependencies.find_edge g v1 v2 in
Some msg, edge_pos)
cycle
(List.tl cycle @ [List.hd cycle])
in
Errors.raise_multispanned_error spans
"Cyclic dependency detected between variables of scope %a!"
"@[<hov 2>Cyclic dependency detected between the following variables of \
scope %a:@ @[<hv>%a@]@]"
ScopeName.format_t scope.scope_uid
(Format.pp_print_list
~pp_sep:(fun ppf () -> Format.fprintf ppf " →@ ")
Vertex.format_t)
(cycle @ [List.hd cycle])
(** Builds the dependency graph of a particular scope *)
let build_scope_dependencies (scope : Ast.scope) : ScopeDependencies.t =

View File

@ -39,6 +39,7 @@ module Vertex : sig
| SubScope of Shared_ast.SubScopeName.t
val format_t : Format.formatter -> t -> unit
val info : t -> Uid.MarkedString.info
include Graph.Sig.COMPARABLE with type t := t
end

View File

@ -78,7 +78,7 @@ let format_op
Format.pp_print_string fmt "-"
| Mult_int_int | Mult_rat_rat | Mult_mon_rat | Mult_dur_int ->
Format.pp_print_string fmt "*"
| Div_int_int | Div_rat_rat | Div_mon_mon | Div_mon_rat ->
| Div_int_int | Div_rat_rat | Div_mon_mon | Div_mon_rat | Div_dur_dur ->
Format.pp_print_string fmt "/"
| And -> Format.pp_print_string fmt "and"
| Or -> Format.pp_print_string fmt "or"

View File

@ -46,16 +46,14 @@ module SVertex = struct
| Scope s -> ScopeName.hash s
| Topdef g -> TopdefName.hash g
let to_string v =
Format.asprintf "%a"
(fun ppf -> function
| Scope s -> ScopeName.format_t ppf s
| Topdef g -> TopdefName.format_t ppf g)
v
let format_t ppf = function
| Scope s -> ScopeName.format_t ppf s
| Topdef g -> TopdefName.format_t ppf g
let info = function
| Scope s -> ScopeName.get_info s
| Topdef g -> TopdefName.get_info g
(* let to_string v = Format.asprintf "%a" format_t v
let info = function | Scope s -> ScopeName.get_info s | Topdef g ->
TopdefName.get_info g *)
end
module VMap = Map.Make (SVertex)
@ -155,31 +153,49 @@ let check_for_cycle_in_defs (g : SDependencies.t) : unit =
(* if there is a cycle, there will be an strongly connected component of
cardinality > 1 *)
let sccs = SSCC.scc_list g in
if List.length sccs < SDependencies.nb_vertex g then
let scc = List.find (fun scc -> List.length scc > 1) sccs in
match List.find_opt (function [] | [_] -> false | _ -> true) sccs with
| None -> ()
| Some [] -> assert false
| Some (v0 :: _ as scc) ->
let module VSet = Set.Make (SVertex) in
let scc = VSet.of_list scc in
let rec get_cycle cycle cycle_set v =
let cycle = v :: cycle in
let cycle_set = VSet.add v cycle_set in
let succ = SDependencies.succ g v in
if List.exists (fun v -> VSet.mem v cycle_set) succ then
(* a cycle may be smaller than the scc, in that case we just return the
first one found *)
let rec cut_after acc = function
| [] -> acc
| v :: vs ->
if List.mem v succ then v :: acc else cut_after (v :: acc) vs
in
cut_after [] cycle
else
get_cycle cycle cycle_set
(List.find (fun succ -> VSet.mem succ scc) succ)
in
let cycle = get_cycle [] VSet.empty v0 in
let spans =
List.flatten
(List.map
(fun v ->
let var_str, var_info = SVertex.to_string v, SVertex.info v in
let succs = SDependencies.succ_e g v in
let _, edge_pos, succ =
List.find (fun (_, _, succ) -> List.mem succ scc) succs
in
let succ_str = SVertex.to_string succ in
[
( Some ("Cycle variable " ^ var_str ^ ", declared:"),
Marked.get_mark var_info );
( Some
("Used here in the definition of another cycle variable "
^ succ_str
^ ":"),
edge_pos );
])
scc)
List.map2
(fun v1 v2 ->
let msg =
Format.asprintf "%a is used here in the definition of %a:"
SVertex.format_t v1 SVertex.format_t v2
in
let _, edge_pos, _ = SDependencies.find_edge g v1 v2 in
Some msg, edge_pos)
cycle
(List.tl cycle @ [List.hd cycle])
in
Errors.raise_multispanned_error spans
"Cyclic dependency detected between scopes!"
"@[<hov 2>Cyclic dependency detected between the following scopes:@ \
@[<hv>%a@]@]"
(Format.pp_print_list
~pp_sep:(fun ppf () -> Format.fprintf ppf " →@ ")
SVertex.format_t)
(cycle @ [List.hd cycle])
let get_defs_ordering (g : SDependencies.t) : SVertex.t list =
List.rev (STopologicalTraversal.fold (fun sd acc -> sd :: acc) g [])

View File

@ -181,6 +181,7 @@ module Op = struct
| Div_rat_rat : ([< scopelang | dcalc | lcalc ], resolved) t
| Div_mon_rat : ([< scopelang | dcalc | lcalc ], resolved) t
| Div_mon_mon : ([< scopelang | dcalc | lcalc ], resolved) t
| Div_dur_dur : ([< scopelang | dcalc | lcalc ], resolved) t
| Lt : (desugared, overloaded) t
| Lt_int_int : ([< scopelang | dcalc | lcalc ], resolved) t
| Lt_rat_rat : ([< scopelang | dcalc | lcalc ], resolved) t

View File

@ -71,6 +71,7 @@ let name : type a k. (a, k) t -> string = function
| Div_rat_rat -> "o_div_rat_rat"
| Div_mon_mon -> "o_div_mon_mon"
| Div_mon_rat -> "o_div_mon_mon"
| Div_dur_dur -> "o_div_dur_dur"
| Lt -> "o_lt"
| Lt_int_int -> "o_lt_int_int"
| Lt_rat_rat -> "o_lt_rat_rat"
@ -175,6 +176,7 @@ let compare (type a k a2 k2) (t1 : (a, k) t) (t2 : (a2, k2) t) =
| Div_rat_rat, Div_rat_rat
| Div_mon_mon, Div_mon_mon
| Div_mon_rat, Div_mon_rat
| Div_dur_dur, Div_dur_dur
| Lt, Lt
| Lt_int_int, Lt_int_int
| Lt_rat_rat, Lt_rat_rat
@ -257,6 +259,7 @@ let compare (type a k a2 k2) (t1 : (a, k) t) (t2 : (a2, k2) t) =
| Div_rat_rat, _ -> -1 | _, Div_rat_rat -> 1
| Div_mon_mon, _ -> -1 | _, Div_mon_mon -> 1
| Div_mon_rat, _ -> -1 | _, Div_mon_rat -> 1
| Div_dur_dur, _ -> -1 | _, Div_dur_dur -> 1
| Lt, _ -> -1 | _, Lt -> 1
| Lt_int_int, _ -> -1 | _, Lt_int_int -> 1
| Lt_rat_rat, _ -> -1 | _, Lt_rat_rat -> 1
@ -316,12 +319,12 @@ let kind_dispatch :
| Add_mon_mon | Add_dat_dur | Add_dur_dur | Sub_int_int | Sub_rat_rat
| Sub_mon_mon | Sub_dat_dat | Sub_dat_dur | Sub_dur_dur | Mult_int_int
| Mult_rat_rat | Mult_mon_rat | Mult_dur_int | Div_int_int | Div_rat_rat
| Div_mon_mon | Div_mon_rat | Lt_int_int | Lt_rat_rat | Lt_mon_mon
| Lt_dat_dat | Lt_dur_dur | Lte_int_int | Lte_rat_rat | Lte_mon_mon
| Lte_dat_dat | Lte_dur_dur | Gt_int_int | Gt_rat_rat | Gt_mon_mon
| Gt_dat_dat | Gt_dur_dur | Gte_int_int | Gte_rat_rat | Gte_mon_mon
| Gte_dat_dat | Gte_dur_dur | Eq_int_int | Eq_rat_rat | Eq_mon_mon
| Eq_dat_dat | Eq_dur_dur ) as op ->
| Div_mon_mon | Div_mon_rat | Div_dur_dur | Lt_int_int | Lt_rat_rat
| Lt_mon_mon | Lt_dat_dat | Lt_dur_dur | Lte_int_int | Lte_rat_rat
| Lte_mon_mon | Lte_dat_dat | Lte_dur_dur | Gt_int_int | Gt_rat_rat
| Gt_mon_mon | Gt_dat_dat | Gt_dur_dur | Gte_int_int | Gte_rat_rat
| Gte_mon_mon | Gte_dat_dat | Gte_dur_dur | Eq_int_int | Eq_rat_rat
| Eq_mon_mon | Eq_dat_dat | Eq_dur_dur ) as op ->
resolved op
(* Glorified identity... allowed operators are the same in scopelang, dcalc,
@ -377,6 +380,7 @@ let translate :
| Div_rat_rat -> Div_rat_rat
| Div_mon_mon -> Div_mon_mon
| Div_mon_rat -> Div_mon_rat
| Div_dur_dur -> Div_dur_dur
| Lt_int_int -> Lt_int_int
| Lt_rat_rat -> Lt_rat_rat
| Lt_mon_mon -> Lt_mon_mon
@ -462,6 +466,7 @@ let resolved_type (op, pos) =
| Div_rat_rat -> [TRat; TRat], TRat
| Div_mon_mon -> [TMoney; TMoney], TRat
| Div_mon_rat -> [TMoney; TRat], TMoney
| Div_dur_dur -> [TDuration; TDuration], TRat
| Lt_int_int -> [TInt; TInt], TBool
| Lt_rat_rat -> [TRat; TRat], TBool
| Lt_mon_mon -> [TMoney; TMoney], TBool
@ -524,6 +529,7 @@ let resolve_overload_aux (op : ('a, overloaded) t) (operands : typ_lit list) :
| Div, [TRat; TRat] -> Div_rat_rat, `Straight
| Div, [TMoney; TMoney] -> Div_mon_mon, `Straight
| Div, [TMoney; TRat] -> Div_mon_rat, `Straight
| Div, [TDuration; TDuration] -> Div_dur_dur, `Straight
| Lt, [TInt; TInt] -> Lt_int_int, `Straight
| Lt, [TRat; TRat] -> Lt_rat_rat, `Straight
| Lt, [TMoney; TMoney] -> Lt_mon_mon, `Straight

View File

@ -207,6 +207,7 @@ let operator_to_string : type a k. (a, k) Op.t -> string = function
| Div_rat_rat -> "/."
| Div_mon_mon -> "/$"
| Div_mon_rat -> "/$."
| Div_dur_dur -> "/^"
| Lt -> "<"
| Lt_int_int -> "<!"
| Lt_rat_rat -> "<."

View File

@ -1,6 +1,6 @@
source_file: BEGIN_CODE DECLARATION ENUM UIDENT COLON ALT UIDENT CONTENT TEXT YEAR
##
## Ends in an error in state: 358.
## Ends in an error in state: 359.
##
## list(addpos(enum_decl_line)) -> enum_decl_line . list(addpos(enum_decl_line)) [ SCOPE END_CODE DECLARATION ]
##
@ -12,7 +12,7 @@ expected another enum case, or a new declaration or scope use
source_file: BEGIN_CODE DECLARATION ENUM UIDENT COLON ALT UIDENT CONTENT YEAR
##
## Ends in an error in state: 354.
## Ends in an error in state: 355.
##
## option(preceded(CONTENT,addpos(typ))) -> CONTENT . typ_data [ SCOPE END_CODE DECLARATION ALT ]
##
@ -24,7 +24,7 @@ expected a content type
source_file: BEGIN_CODE DECLARATION ENUM UIDENT COLON ALT UIDENT YEAR
##
## Ends in an error in state: 353.
## Ends in an error in state: 354.
##
## enum_decl_line -> ALT UIDENT . option(preceded(CONTENT,addpos(typ))) [ SCOPE END_CODE DECLARATION ALT ]
##
@ -36,7 +36,7 @@ expected a payload for your enum case, or another case or declaration
source_file: BEGIN_CODE DECLARATION ENUM UIDENT COLON ALT YEAR
##
## Ends in an error in state: 352.
## Ends in an error in state: 353.
##
## enum_decl_line -> ALT . UIDENT option(preceded(CONTENT,addpos(typ))) [ SCOPE END_CODE DECLARATION ALT ]
##
@ -48,7 +48,7 @@ expected the name of an enum case
source_file: BEGIN_CODE DECLARATION ENUM UIDENT COLON YEAR
##
## Ends in an error in state: 351.
## Ends in an error in state: 352.
##
## code_item -> DECLARATION ENUM UIDENT COLON . list(addpos(enum_decl_line)) [ SCOPE END_CODE DECLARATION ]
##
@ -60,7 +60,7 @@ expected an enum case
source_file: BEGIN_CODE DECLARATION ENUM UIDENT YEAR
##
## Ends in an error in state: 350.
## Ends in an error in state: 351.
##
## code_item -> DECLARATION ENUM UIDENT . COLON list(addpos(enum_decl_line)) [ SCOPE END_CODE DECLARATION ]
##
@ -72,7 +72,7 @@ expected a colon
source_file: BEGIN_CODE DECLARATION ENUM YEAR
##
## Ends in an error in state: 349.
## Ends in an error in state: 350.
##
## code_item -> DECLARATION ENUM . UIDENT COLON list(addpos(enum_decl_line)) [ SCOPE END_CODE DECLARATION ]
##
@ -84,7 +84,7 @@ expected the name of your enum
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON YEAR
##
## Ends in an error in state: 312.
## Ends in an error in state: 313.
##
## code_item -> DECLARATION SCOPE UIDENT COLON . nonempty_list(addpos(scope_decl_item)) [ SCOPE END_CODE DECLARATION ]
##
@ -96,7 +96,7 @@ expected a context item introduced by "context"
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT YEAR
##
## Ends in an error in state: 311.
## Ends in an error in state: 312.
##
## code_item -> DECLARATION SCOPE UIDENT . COLON nonempty_list(addpos(scope_decl_item)) [ SCOPE END_CODE DECLARATION ]
##
@ -108,7 +108,7 @@ expected a colon followed by the list of context items of this scope
source_file: BEGIN_CODE DECLARATION SCOPE YEAR
##
## Ends in an error in state: 310.
## Ends in an error in state: 311.
##
## code_item -> DECLARATION SCOPE . UIDENT COLON nonempty_list(addpos(scope_decl_item)) [ SCOPE END_CODE DECLARATION ]
##
@ -122,7 +122,7 @@ expected the name of the scope you are declaring
source_file: BEGIN_CODE DECLARATION STRUCT UIDENT COLON CONDITION LIDENT DEPENDS YEAR
##
## Ends in an error in state: 297.
## Ends in an error in state: 298.
##
## struct_scope -> struct_scope_base DEPENDS . separated_nonempty_list(COMMA,var_content) [ SCOPE END_CODE DECLARATION DATA CONDITION ]
## struct_scope -> struct_scope_base DEPENDS . LPAREN separated_nonempty_list(COMMA,var_content) RPAREN [ SCOPE END_CODE DECLARATION DATA CONDITION ]
@ -135,7 +135,7 @@ expected the type of the parameter of this struct data function
source_file: BEGIN_CODE DECLARATION STRUCT UIDENT COLON CONDITION LIDENT YEAR
##
## Ends in an error in state: 296.
## Ends in an error in state: 297.
##
## struct_scope -> struct_scope_base . DEPENDS separated_nonempty_list(COMMA,var_content) [ SCOPE END_CODE DECLARATION DATA CONDITION ]
## struct_scope -> struct_scope_base . DEPENDS LPAREN separated_nonempty_list(COMMA,var_content) RPAREN [ SCOPE END_CODE DECLARATION DATA CONDITION ]
@ -149,7 +149,7 @@ expected a new struct data, or another declaration or scope use
source_file: BEGIN_CODE DECLARATION STRUCT UIDENT COLON CONDITION YEAR
##
## Ends in an error in state: 294.
## Ends in an error in state: 295.
##
## struct_scope_base -> CONDITION . lident [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ]
##
@ -161,7 +161,7 @@ expected the name of this struct condition
source_file: BEGIN_CODE DECLARATION STRUCT UIDENT COLON DATA LIDENT CONTENT YEAR
##
## Ends in an error in state: 289.
## Ends in an error in state: 290.
##
## struct_scope_base -> DATA lident CONTENT . typ_data [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ]
##
@ -173,7 +173,7 @@ expected the type of this struct data
source_file: BEGIN_CODE DECLARATION STRUCT UIDENT COLON DATA LIDENT YEAR
##
## Ends in an error in state: 288.
## Ends in an error in state: 289.
##
## struct_scope_base -> DATA lident . CONTENT typ_data [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ]
##
@ -185,7 +185,7 @@ expected the type of this struct data, introduced by the content keyword
source_file: BEGIN_CODE DECLARATION STRUCT UIDENT COLON DATA YEAR
##
## Ends in an error in state: 287.
## Ends in an error in state: 288.
##
## struct_scope_base -> DATA . lident CONTENT typ_data [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ]
##
@ -197,7 +197,7 @@ expected the name of this struct data
source_file: BEGIN_CODE DECLARATION STRUCT UIDENT COLON YEAR
##
## Ends in an error in state: 286.
## Ends in an error in state: 287.
##
## code_item -> DECLARATION STRUCT UIDENT COLON . list(addpos(struct_scope)) [ SCOPE END_CODE DECLARATION ]
##
@ -209,7 +209,7 @@ expected struct data or condition
source_file: BEGIN_CODE DECLARATION STRUCT UIDENT YEAR
##
## Ends in an error in state: 285.
## Ends in an error in state: 286.
##
## code_item -> DECLARATION STRUCT UIDENT . COLON list(addpos(struct_scope)) [ SCOPE END_CODE DECLARATION ]
##
@ -221,7 +221,7 @@ expected a colon
source_file: BEGIN_CODE DECLARATION STRUCT YEAR
##
## Ends in an error in state: 284.
## Ends in an error in state: 285.
##
## code_item -> DECLARATION STRUCT . UIDENT COLON list(addpos(struct_scope)) [ SCOPE END_CODE DECLARATION ]
##
@ -233,7 +233,7 @@ expected the struct name
source_file: BEGIN_CODE DECLARATION YEAR
##
## Ends in an error in state: 283.
## Ends in an error in state: 284.
##
## code_item -> DECLARATION . STRUCT UIDENT COLON list(addpos(struct_scope)) [ SCOPE END_CODE DECLARATION ]
## code_item -> DECLARATION . SCOPE UIDENT COLON nonempty_list(addpos(scope_decl_item)) [ SCOPE END_CODE DECLARATION ]
@ -326,7 +326,7 @@ source_file: BEGIN_CODE SCOPE UIDENT COLON ASSERTION UNDER_CONDITION TRUE THEN
##
## Ends in an error in state: 235.
##
## condition_consequence -> UNDER_CONDITION expression . CONSEQUENCE [ UIDENT TRUE SUM STATE OUTPUT NOT MONEY_AMOUNT MONEY MINUS MINIMUM MAXIMUM MATCH LPAREN LIDENT LET LBRACKET INT_LITERAL IF FOR FILLED FALSE EXISTS DEFINED_AS DECIMAL_LITERAL DECIMAL DATE_LITERAL CARDINAL ]
## condition_consequence -> UNDER_CONDITION expression . CONSEQUENCE [ UIDENT TRUE SUM OUTPUT NOT MONEY_AMOUNT MONEY MINUS MINIMUM MAXIMUM MATCH LPAREN LIDENT LET LBRACKET INT_LITERAL IF FOR FILLED FALSE EXISTS DEFINED_AS DECIMAL_LITERAL DECIMAL DATE_LITERAL CARDINAL ]
## expression -> expression . DOT qlident [ XOR WITH PLUSPLUS PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER GREATER_EQUAL GREATER FOR EQUAL DOT DIV CONTAINS CONSEQUENCE AND ]
## expression -> expression . OF funcall_args [ XOR WITH PLUSPLUS PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER GREATER_EQUAL GREATER FOR EQUAL DOT DIV CONTAINS CONSEQUENCE AND ]
## expression -> expression . WITH constructor_binding [ XOR WITH PLUSPLUS PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER GREATER_EQUAL GREATER FOR EQUAL DOT DIV CONTAINS CONSEQUENCE AND ]
@ -358,7 +358,7 @@ source_file: BEGIN_CODE SCOPE UIDENT COLON ASSERTION UNDER_CONDITION YEAR
##
## Ends in an error in state: 234.
##
## condition_consequence -> UNDER_CONDITION . expression CONSEQUENCE [ UIDENT TRUE SUM STATE OUTPUT NOT MONEY_AMOUNT MONEY MINUS MINIMUM MAXIMUM MATCH LPAREN LIDENT LET LBRACKET INT_LITERAL IF FOR FILLED FALSE EXISTS DEFINED_AS DECIMAL_LITERAL DECIMAL DATE_LITERAL CARDINAL ]
## condition_consequence -> UNDER_CONDITION . expression CONSEQUENCE [ UIDENT TRUE SUM OUTPUT NOT MONEY_AMOUNT MONEY MINUS MINIMUM MAXIMUM MATCH LPAREN LIDENT LET LBRACKET INT_LITERAL IF FOR FILLED FALSE EXISTS DEFINED_AS DECIMAL_LITERAL DECIMAL DATE_LITERAL CARDINAL ]
##
## The known suffix of the stack is as follows:
## UNDER_CONDITION
@ -422,7 +422,7 @@ expected an expression that shoud be asserted during execution
source_file: BEGIN_CODE SCOPE UIDENT COLON DEFINITION LIDENT DEFINED_AS YEAR
##
## Ends in an error in state: 276.
## Ends in an error in state: 265.
##
## definition -> option(label) option(exception_to) DEFINITION separated_nonempty_list(DOT,addpos(LIDENT)) option(addpos(definition_parameters)) option(state) option(condition_consequence) DEFINED_AS . expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
##
@ -447,7 +447,7 @@ expected an expression for defining this function, introduced by the defined as
source_file: BEGIN_CODE SCOPE UIDENT COLON DEFINITION LIDENT WITH_V
##
## Ends in an error in state: 272.
## Ends in an error in state: 253.
##
## definition -> option(label) option(exception_to) DEFINITION separated_nonempty_list(DOT,addpos(LIDENT)) . option(addpos(definition_parameters)) option(state) option(condition_consequence) DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
##
@ -465,7 +465,7 @@ expected the defined as keyword to introduce the definition of this variable
source_file: BEGIN_CODE SCOPE UIDENT COLON DEFINITION YEAR
##
## Ends in an error in state: 271.
## Ends in an error in state: 252.
##
## definition -> option(label) option(exception_to) DEFINITION . separated_nonempty_list(DOT,addpos(LIDENT)) option(addpos(definition_parameters)) option(state) option(condition_consequence) DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
##
@ -477,13 +477,13 @@ expected the name of the variable you want to define
source_file: BEGIN_CODE SCOPE UIDENT COLON EXCEPTION LIDENT YEAR
##
## Ends in an error in state: 251.
## Ends in an error in state: 279.
##
## definition -> option(label) option(exception_to) . DEFINITION separated_nonempty_list(DOT,addpos(LIDENT)) option(addpos(definition_parameters)) option(state) 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) option(state) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
## option(addpos(exception_to)) -> exception_to . [ RULE ]
## option(exception_to) -> exception_to . [ DEFINITION ]
##
## The known suffix of the stack is as follows:
## option(label) option(exception_to)
## exception_to
##
expected a rule or a definition after the exception declaration
@ -505,7 +505,7 @@ source_file: BEGIN_CODE SCOPE UIDENT COLON LABEL LIDENT DEFINED_AS
## Ends in an error in state: 247.
##
## definition -> option(label) . option(exception_to) DEFINITION separated_nonempty_list(DOT,addpos(LIDENT)) option(addpos(definition_parameters)) option(state) 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) option(state) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
## rule -> option(label) . option(addpos(exception_to)) RULE rule_expr option(state) option(condition_consequence) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
##
## The known suffix of the stack is as follows:
## option(label)
@ -539,7 +539,7 @@ expected a struct field or a sub-scope context item after the dot
source_file: BEGIN_CODE SCOPE UIDENT COLON RULE LIDENT NOT FALSE
##
## Ends in an error in state: 269.
## Ends in an error in state: 277.
##
## rule_consequence -> option(NOT) . FILLED [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
##
@ -563,7 +563,7 @@ expected the name of the parameter for this dependent variable
source_file: BEGIN_CODE SCOPE UIDENT COLON RULE LIDENT WITH_V
##
## Ends in an error in state: 253.
## Ends in an error in state: 270.
##
## rule_expr -> separated_nonempty_list(DOT,addpos(LIDENT)) . option(addpos(definition_parameters)) [ UNDER_CONDITION STATE NOT FILLED ]
##
@ -594,12 +594,12 @@ expected a condition or a consequence for this rule, or the rest of the variable
source_file: BEGIN_CODE SCOPE UIDENT COLON RULE YEAR
##
## Ends in an error in state: 252.
## Ends in an error in state: 269.
##
## rule -> option(label) option(exception_to) RULE . rule_expr option(condition_consequence) option(state) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
## rule -> option(label) option(addpos(exception_to)) RULE . rule_expr option(state) option(condition_consequence) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
##
## The known suffix of the stack is as follows:
## option(label) option(exception_to) RULE
## option(label) option(addpos(exception_to)) RULE
##
expected the name of the variable subject to the rule
@ -608,7 +608,7 @@ source_file: BEGIN_CODE SCOPE UIDENT COLON YEAR
##
## Ends in an error in state: 219.
##
## code_item -> SCOPE UIDENT option(preceded(UNDER_CONDITION,expression)) COLON . nonempty_list(addpos(scope_item)) [ SCOPE END_CODE DECLARATION ]
## code_item -> SCOPE UIDENT option(preceded(UNDER_CONDITION,expression)) COLON . nonempty_list(scope_item) [ SCOPE END_CODE DECLARATION ]
##
## The known suffix of the stack is as follows:
## SCOPE UIDENT option(preceded(UNDER_CONDITION,expression)) COLON
@ -922,7 +922,7 @@ source_file: BEGIN_CODE SCOPE UIDENT YEAR
##
## Ends in an error in state: 8.
##
## code_item -> SCOPE UIDENT . option(preceded(UNDER_CONDITION,expression)) COLON nonempty_list(addpos(scope_item)) [ SCOPE END_CODE DECLARATION ]
## code_item -> SCOPE UIDENT . option(preceded(UNDER_CONDITION,expression)) COLON nonempty_list(scope_item) [ SCOPE END_CODE DECLARATION ]
##
## The known suffix of the stack is as follows:
## SCOPE UIDENT
@ -934,7 +934,7 @@ source_file: BEGIN_CODE SCOPE YEAR
##
## Ends in an error in state: 7.
##
## code_item -> SCOPE . UIDENT option(preceded(UNDER_CONDITION,expression)) COLON nonempty_list(addpos(scope_item)) [ SCOPE END_CODE DECLARATION ]
## code_item -> SCOPE . UIDENT option(preceded(UNDER_CONDITION,expression)) COLON nonempty_list(scope_item) [ SCOPE END_CODE DECLARATION ]
##
## The known suffix of the stack is as follows:
## SCOPE
@ -944,7 +944,7 @@ expected the name of the scope being used
source_file: BEGIN_CODE YEAR
##
## Ends in an error in state: 390.
## Ends in an error in state: 391.
##
## source_file_item -> BEGIN_CODE . code END_CODE [ LAW_TEXT LAW_HEADING EOF BEGIN_METADATA BEGIN_DIRECTIVE BEGIN_CODE ]
##
@ -1005,8 +1005,8 @@ source_file: BEGIN_METADATA LAW_TEXT LAW_HEADING
## 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 1, spurious reduction of production nonempty_list(LAW_TEXT) -> LAW_TEXT
## In state 379, spurious reduction of production law_text -> nonempty_list(LAW_TEXT)
## In state 380, spurious reduction of production option(law_text) -> law_text
## In state 380, spurious reduction of production law_text -> nonempty_list(LAW_TEXT)
## In state 381, spurious reduction of production option(law_text) -> law_text
##
expected some law text or code block
@ -3617,8 +3617,8 @@ source_file: BEGIN_CODE SCOPE UIDENT COLON RULE LIDENT FILLED YEAR
##
## Ends in an error in state: 245.
##
## nonempty_list(addpos(scope_item)) -> scope_item . [ SCOPE END_CODE DECLARATION ]
## nonempty_list(addpos(scope_item)) -> scope_item . nonempty_list(addpos(scope_item)) [ SCOPE END_CODE DECLARATION ]
## nonempty_list(scope_item) -> scope_item . [ SCOPE END_CODE DECLARATION ]
## nonempty_list(scope_item) -> scope_item . nonempty_list(scope_item) [ SCOPE END_CODE DECLARATION ]
##
## The known suffix of the stack is as follows:
## scope_item
@ -3628,19 +3628,19 @@ expected the next item in the scope, or the start of a new top-level decleration
source_file: BEGIN_CODE SCOPE UIDENT COLON RULE LIDENT UNDER_CONDITION UIDENT CONSEQUENCE YEAR
##
## Ends in an error in state: 262.
## Ends in an error in state: 274.
##
## rule -> option(label) option(exception_to) RULE rule_expr option(condition_consequence) . option(state) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
## rule -> option(label) option(addpos(exception_to)) RULE rule_expr option(state) option(condition_consequence) . rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
##
## The known suffix of the stack is as follows:
## option(label) option(exception_to) RULE rule_expr option(condition_consequence)
## option(label) option(addpos(exception_to)) RULE rule_expr option(state) option(condition_consequence)
##
expected either 'fulfilled' or 'not fulfilled'
source_file: BEGIN_CODE SCOPE UIDENT COLON DEFINITION LIDENT STATE YEAR
##
## Ends in an error in state: 263.
## Ends in an error in state: 260.
##
## state -> STATE . lident [ UNDER_CONDITION STATE SCOPE OUTPUT NOT LIDENT INTERNAL INPUT FILLED END_CODE DEFINED_AS DECLARATION CONTEXT ]
##
@ -3652,19 +3652,19 @@ expected an identifier defining the name of the state
source_file: BEGIN_CODE SCOPE UIDENT COLON RULE LIDENT STATE LIDENT YEAR
##
## Ends in an error in state: 266.
## Ends in an error in state: 273.
##
## rule -> option(label) option(exception_to) RULE rule_expr option(condition_consequence) option(state) . rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
## rule -> option(label) option(addpos(exception_to)) RULE rule_expr option(state) . option(condition_consequence) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
##
## The known suffix of the stack is as follows:
## option(label) option(exception_to) RULE rule_expr option(condition_consequence) option(state)
## option(label) option(addpos(exception_to)) RULE rule_expr option(state)
##
expected 'equals' then an expression defining the rule
source_file: BEGIN_CODE SCOPE UIDENT COLON DEFINITION LIDENT STATE LIDENT YEAR
##
## Ends in an error in state: 274.
## Ends in an error in state: 263.
##
## definition -> option(label) option(exception_to) DEFINITION separated_nonempty_list(DOT,addpos(LIDENT)) option(addpos(definition_parameters)) option(state) . option(condition_consequence) DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
##
@ -3676,7 +3676,7 @@ expected 'equals' then an expression defining the rule
source_file: BEGIN_CODE SCOPE UIDENT COLON DEFINITION LIDENT UNDER_CONDITION UIDENT CONSEQUENCE YEAR
##
## Ends in an error in state: 275.
## Ends in an error in state: 264.
##
## definition -> option(label) option(exception_to) DEFINITION separated_nonempty_list(DOT,addpos(LIDENT)) option(addpos(definition_parameters)) option(state) option(condition_consequence) . DEFINED_AS expression [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
##
@ -3688,7 +3688,7 @@ expected 'fulfilled' or 'not fulfilled'
source_file: BEGIN_CODE SCOPE UIDENT COLON DEFINITION LIDENT DEFINED_AS FALSE YEAR
##
## Ends in an error in state: 277.
## Ends in an error in state: 266.
##
## definition -> option(label) option(exception_to) DEFINITION separated_nonempty_list(DOT,addpos(LIDENT)) option(addpos(definition_parameters)) option(state) option(condition_consequence) DEFINED_AS expression . [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
## expression -> expression . DOT qlident [ XOR WITH SCOPE RULE PLUSPLUS PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER LABEL GREATER_EQUAL GREATER FOR EXCEPTION EQUAL END_CODE DOT DIV DEFINITION DECLARATION CONTAINS ASSERTION AND ]
@ -3720,7 +3720,7 @@ expected a binary operator continuing the expression, or a keyword ending the ex
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT YEAR
##
## Ends in an error in state: 317.
## Ends in an error in state: 318.
##
## scope_decl_item_attribute -> scope_decl_item_attribute_input . scope_decl_item_attribute_output [ LIDENT ]
##
@ -3732,7 +3732,7 @@ expected a variable name, optionally preceded by 'output'
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON INTERNAL YEAR
##
## Ends in an error in state: 320.
## Ends in an error in state: 321.
##
## scope_decl_item -> scope_decl_item_attribute . lident CONTENT typ_data DEPENDS separated_nonempty_list(COMMA,var_content) list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
## scope_decl_item -> scope_decl_item_attribute . lident CONTENT typ_data DEPENDS LPAREN separated_nonempty_list(COMMA,var_content) RPAREN list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
@ -3749,7 +3749,7 @@ expected a variable name
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT LIDENT YEAR
##
## Ends in an error in state: 321.
## Ends in an error in state: 322.
##
## scope_decl_item -> scope_decl_item_attribute lident . CONTENT typ_data DEPENDS separated_nonempty_list(COMMA,var_content) list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
## scope_decl_item -> scope_decl_item_attribute lident . CONTENT typ_data DEPENDS LPAREN separated_nonempty_list(COMMA,var_content) RPAREN list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
@ -3766,7 +3766,7 @@ expected either 'condition', or 'content' followed by the expected variable type
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT LIDENT CONTENT YEAR
##
## Ends in an error in state: 322.
## Ends in an error in state: 323.
##
## scope_decl_item -> scope_decl_item_attribute lident CONTENT . typ_data DEPENDS separated_nonempty_list(COMMA,var_content) list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
## scope_decl_item -> scope_decl_item_attribute lident CONTENT . typ_data DEPENDS LPAREN separated_nonempty_list(COMMA,var_content) RPAREN list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
@ -3780,7 +3780,7 @@ expected a type
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT LIDENT CONTENT BOOLEAN YEAR
##
## Ends in an error in state: 323.
## Ends in an error in state: 324.
##
## scope_decl_item -> scope_decl_item_attribute lident CONTENT typ_data . DEPENDS separated_nonempty_list(COMMA,var_content) list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
## scope_decl_item -> scope_decl_item_attribute lident CONTENT typ_data . DEPENDS LPAREN separated_nonempty_list(COMMA,var_content) RPAREN list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
@ -3795,7 +3795,7 @@ for the scope
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT LIDENT CONTENT UIDENT DEPENDS YEAR
##
## Ends in an error in state: 324.
## Ends in an error in state: 325.
##
## scope_decl_item -> scope_decl_item_attribute lident CONTENT typ_data DEPENDS . separated_nonempty_list(COMMA,var_content) list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
## scope_decl_item -> scope_decl_item_attribute lident CONTENT typ_data DEPENDS . LPAREN separated_nonempty_list(COMMA,var_content) RPAREN list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
@ -3808,7 +3808,7 @@ expected a name and type for the dependency of this definition ('<ident> content
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT LIDENT CONTENT UIDENT DEPENDS LPAREN YEAR
##
## Ends in an error in state: 325.
## Ends in an error in state: 326.
##
## scope_decl_item -> scope_decl_item_attribute lident CONTENT typ_data DEPENDS LPAREN . separated_nonempty_list(COMMA,var_content) RPAREN list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
##
@ -3820,7 +3820,7 @@ expected a name and type for the dependency of this definition ('<ident> content
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT LIDENT CONTENT UIDENT DEPENDS LPAREN LIDENT CONTENT UIDENT STATE
##
## Ends in an error in state: 326.
## Ends in an error in state: 327.
##
## scope_decl_item -> scope_decl_item_attribute lident CONTENT typ_data DEPENDS LPAREN separated_nonempty_list(COMMA,var_content) . RPAREN list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
##
@ -3833,15 +3833,15 @@ source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT LIDENT CONTENT UI
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 21, spurious reduction of production quident -> UIDENT
## In state 30, spurious reduction of production primitive_typ -> quident
## In state 292, spurious reduction of production typ_data -> primitive_typ
## In state 303, spurious reduction of production separated_nonempty_list(COMMA,var_content) -> lident CONTENT typ_data
## In state 293, spurious reduction of production typ_data -> primitive_typ
## In state 304, spurious reduction of production separated_nonempty_list(COMMA,var_content) -> lident CONTENT typ_data
##
expected a closing paren, or a comma followed by another argument specification
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT LIDENT CONTENT UIDENT DEPENDS LPAREN LIDENT CONTENT UIDENT RPAREN YEAR
##
## Ends in an error in state: 327.
## Ends in an error in state: 328.
##
## scope_decl_item -> scope_decl_item_attribute lident CONTENT typ_data DEPENDS LPAREN separated_nonempty_list(COMMA,var_content) RPAREN . list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
##
@ -3853,7 +3853,7 @@ expected a 'state' declaration for the preceding declaration, or the next declar
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT LIDENT CONDITION STATE LIDENT YEAR
##
## Ends in an error in state: 328.
## Ends in an error in state: 329.
##
## list(state) -> state . list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
##
@ -3866,7 +3866,7 @@ declaration for the scope
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT LIDENT CONTENT UIDENT DEPENDS LIDENT CONTENT UIDENT DEFINED_AS
##
## Ends in an error in state: 331.
## Ends in an error in state: 332.
##
## scope_decl_item -> scope_decl_item_attribute lident CONTENT typ_data DEPENDS separated_nonempty_list(COMMA,var_content) . list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
##
@ -3879,15 +3879,15 @@ source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT LIDENT CONTENT UI
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 21, spurious reduction of production quident -> UIDENT
## In state 30, spurious reduction of production primitive_typ -> quident
## In state 292, spurious reduction of production typ_data -> primitive_typ
## In state 303, spurious reduction of production separated_nonempty_list(COMMA,var_content) -> lident CONTENT typ_data
## In state 293, spurious reduction of production typ_data -> primitive_typ
## In state 304, spurious reduction of production separated_nonempty_list(COMMA,var_content) -> lident CONTENT typ_data
##
expected the next declaration for the scope
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT LIDENT CONDITION YEAR
##
## Ends in an error in state: 334.
## Ends in an error in state: 335.
##
## scope_decl_item -> scope_decl_item_attribute lident CONDITION . DEPENDS separated_nonempty_list(COMMA,var_content) list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
## scope_decl_item -> scope_decl_item_attribute lident CONDITION . DEPENDS LPAREN separated_nonempty_list(COMMA,var_content) RPAREN list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
@ -3901,7 +3901,7 @@ expected the next declaration for the scope
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT LIDENT CONDITION DEPENDS YEAR
##
## Ends in an error in state: 335.
## Ends in an error in state: 336.
##
## scope_decl_item -> scope_decl_item_attribute lident CONDITION DEPENDS . separated_nonempty_list(COMMA,var_content) list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
## scope_decl_item -> scope_decl_item_attribute lident CONDITION DEPENDS . LPAREN separated_nonempty_list(COMMA,var_content) RPAREN list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
@ -3914,7 +3914,7 @@ expected the form 'depends on <ident> content <type>'
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT LIDENT CONDITION DEPENDS LPAREN YEAR
##
## Ends in an error in state: 336.
## Ends in an error in state: 337.
##
## scope_decl_item -> scope_decl_item_attribute lident CONDITION DEPENDS LPAREN . separated_nonempty_list(COMMA,var_content) RPAREN list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
##
@ -3926,7 +3926,7 @@ expected the form 'depends on (<ident> content <type> [, <ident> content <type>
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT LIDENT CONDITION DEPENDS LPAREN LIDENT CONTENT UIDENT STATE
##
## Ends in an error in state: 337.
## Ends in an error in state: 338.
##
## scope_decl_item -> scope_decl_item_attribute lident CONDITION DEPENDS LPAREN separated_nonempty_list(COMMA,var_content) . RPAREN list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
##
@ -3939,15 +3939,15 @@ source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT LIDENT CONDITION
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 21, spurious reduction of production quident -> UIDENT
## In state 30, spurious reduction of production primitive_typ -> quident
## In state 292, spurious reduction of production typ_data -> primitive_typ
## In state 303, spurious reduction of production separated_nonempty_list(COMMA,var_content) -> lident CONTENT typ_data
## In state 293, spurious reduction of production typ_data -> primitive_typ
## In state 304, spurious reduction of production separated_nonempty_list(COMMA,var_content) -> lident CONTENT typ_data
##
expected a closing paren, or a comma followed by another argument declaration (', <ident> content <type>')
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT LIDENT CONDITION DEPENDS LPAREN LIDENT CONTENT UIDENT RPAREN YEAR
##
## Ends in an error in state: 338.
## Ends in an error in state: 339.
##
## scope_decl_item -> scope_decl_item_attribute lident CONDITION DEPENDS LPAREN separated_nonempty_list(COMMA,var_content) RPAREN . list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
##
@ -3959,7 +3959,7 @@ expected the next definition in scope
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT LIDENT CONDITION DEPENDS LIDENT CONTENT UIDENT DEFINED_AS
##
## Ends in an error in state: 340.
## Ends in an error in state: 341.
##
## scope_decl_item -> scope_decl_item_attribute lident CONDITION DEPENDS separated_nonempty_list(COMMA,var_content) . list(state) [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
##
@ -3972,15 +3972,15 @@ source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON CONTEXT LIDENT CONDITION
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 21, spurious reduction of production quident -> UIDENT
## In state 30, spurious reduction of production primitive_typ -> quident
## In state 292, spurious reduction of production typ_data -> primitive_typ
## In state 303, spurious reduction of production separated_nonempty_list(COMMA,var_content) -> lident CONTENT typ_data
## In state 293, spurious reduction of production typ_data -> primitive_typ
## In state 304, spurious reduction of production separated_nonempty_list(COMMA,var_content) -> lident CONTENT typ_data
##
expected the next definition in scope, or a comma followed by another argument declaration (', <ident> content <type>')
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON LIDENT SCOPE UIDENT YEAR
##
## Ends in an error in state: 343.
## Ends in an error in state: 344.
##
## nonempty_list(addpos(scope_decl_item)) -> scope_decl_item . [ SCOPE END_CODE DECLARATION ]
## nonempty_list(addpos(scope_decl_item)) -> scope_decl_item . nonempty_list(addpos(scope_decl_item)) [ SCOPE END_CODE DECLARATION ]
@ -3993,7 +3993,7 @@ expected the next declaration for the scope
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON LIDENT YEAR
##
## Ends in an error in state: 345.
## Ends in an error in state: 346.
##
## scope_decl_item -> lident . SCOPE UIDENT [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
##
@ -4005,7 +4005,7 @@ expected the form '<ident> scope <Scope_name>', or a scope variable declaration
source_file: BEGIN_CODE DECLARATION SCOPE UIDENT COLON LIDENT SCOPE YEAR
##
## Ends in an error in state: 346.
## Ends in an error in state: 347.
##
## scope_decl_item -> lident SCOPE . UIDENT [ SCOPE OUTPUT LIDENT INTERNAL INPUT END_CODE DECLARATION CONTEXT ]
##
@ -4017,7 +4017,7 @@ expected a scope name
source_file: BEGIN_CODE DECLARATION LIDENT YEAR
##
## Ends in an error in state: 360.
## Ends in an error in state: 361.
##
## code_item -> DECLARATION lident . CONTENT typ_data DEPENDS separated_nonempty_list(COMMA,var_content) DEFINED_AS expression [ SCOPE END_CODE DECLARATION ]
## code_item -> DECLARATION lident . CONTENT typ_data DEPENDS LPAREN separated_nonempty_list(COMMA,var_content) RPAREN DEFINED_AS expression [ SCOPE END_CODE DECLARATION ]
@ -4031,7 +4031,7 @@ expected 'content <type>'
source_file: BEGIN_CODE DECLARATION LIDENT CONTENT YEAR
##
## Ends in an error in state: 361.
## Ends in an error in state: 362.
##
## code_item -> DECLARATION lident CONTENT . typ_data DEPENDS separated_nonempty_list(COMMA,var_content) DEFINED_AS expression [ SCOPE END_CODE DECLARATION ]
## code_item -> DECLARATION lident CONTENT . typ_data DEPENDS LPAREN separated_nonempty_list(COMMA,var_content) RPAREN DEFINED_AS expression [ SCOPE END_CODE DECLARATION ]
@ -4045,7 +4045,7 @@ expected a type
source_file: BEGIN_CODE DECLARATION LIDENT CONTENT BOOLEAN YEAR
##
## Ends in an error in state: 362.
## Ends in an error in state: 363.
##
## code_item -> DECLARATION lident CONTENT typ_data . DEPENDS separated_nonempty_list(COMMA,var_content) DEFINED_AS expression [ SCOPE END_CODE DECLARATION ]
## code_item -> DECLARATION lident CONTENT typ_data . DEPENDS LPAREN separated_nonempty_list(COMMA,var_content) RPAREN DEFINED_AS expression [ SCOPE END_CODE DECLARATION ]
@ -4060,7 +4060,7 @@ expected 'equals <expression>', optionally preceded by 'depends on <var> content
source_file: BEGIN_CODE DECLARATION LIDENT CONTENT UIDENT DEPENDS YEAR
##
## Ends in an error in state: 363.
## Ends in an error in state: 364.
##
## code_item -> DECLARATION lident CONTENT typ_data DEPENDS . separated_nonempty_list(COMMA,var_content) DEFINED_AS expression [ SCOPE END_CODE DECLARATION ]
## code_item -> DECLARATION lident CONTENT typ_data DEPENDS . LPAREN separated_nonempty_list(COMMA,var_content) RPAREN DEFINED_AS expression [ SCOPE END_CODE DECLARATION ]
@ -4073,7 +4073,7 @@ expected a variable name, following the form 'depends on <var> content <type>'
source_file: BEGIN_CODE DECLARATION LIDENT CONTENT UIDENT DEPENDS LPAREN YEAR
##
## Ends in an error in state: 364.
## Ends in an error in state: 365.
##
## code_item -> DECLARATION lident CONTENT typ_data DEPENDS LPAREN . separated_nonempty_list(COMMA,var_content) RPAREN DEFINED_AS expression [ SCOPE END_CODE DECLARATION ]
##
@ -4085,7 +4085,7 @@ expected a variable name, following the form 'depends on (<var> content <type>,
source_file: BEGIN_CODE DECLARATION LIDENT CONTENT UIDENT DEPENDS LPAREN LIDENT CONTENT UIDENT DEFINED_AS
##
## Ends in an error in state: 365.
## Ends in an error in state: 366.
##
## code_item -> DECLARATION lident CONTENT typ_data DEPENDS LPAREN separated_nonempty_list(COMMA,var_content) . RPAREN DEFINED_AS expression [ SCOPE END_CODE DECLARATION ]
##
@ -4098,8 +4098,8 @@ source_file: BEGIN_CODE DECLARATION LIDENT CONTENT UIDENT DEPENDS LPAREN LIDENT
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 21, spurious reduction of production quident -> UIDENT
## In state 30, spurious reduction of production primitive_typ -> quident
## In state 292, spurious reduction of production typ_data -> primitive_typ
## In state 303, spurious reduction of production separated_nonempty_list(COMMA,var_content) -> lident CONTENT typ_data
## In state 293, spurious reduction of production typ_data -> primitive_typ
## In state 304, spurious reduction of production separated_nonempty_list(COMMA,var_content) -> lident CONTENT typ_data
##
expected ')', or ',' followed by another argument declaration in the form '<var>
@ -4107,7 +4107,7 @@ content <type>'
source_file: BEGIN_CODE DECLARATION LIDENT CONTENT UIDENT DEPENDS LPAREN LIDENT CONTENT UIDENT RPAREN YEAR
##
## Ends in an error in state: 366.
## Ends in an error in state: 367.
##
## code_item -> DECLARATION lident CONTENT typ_data DEPENDS LPAREN separated_nonempty_list(COMMA,var_content) RPAREN . DEFINED_AS expression [ SCOPE END_CODE DECLARATION ]
##
@ -4119,7 +4119,7 @@ expected 'equals <expression>'
source_file: BEGIN_CODE DECLARATION LIDENT CONTENT UIDENT DEPENDS LPAREN LIDENT CONTENT UIDENT RPAREN DEFINED_AS YEAR
##
## Ends in an error in state: 367.
## Ends in an error in state: 368.
##
## code_item -> DECLARATION lident CONTENT typ_data DEPENDS LPAREN separated_nonempty_list(COMMA,var_content) RPAREN DEFINED_AS . expression [ SCOPE END_CODE DECLARATION ]
##
@ -4131,7 +4131,7 @@ expected an expression
source_file: BEGIN_CODE DECLARATION LIDENT CONTENT UIDENT DEPENDS LPAREN LIDENT CONTENT UIDENT RPAREN DEFINED_AS FALSE YEAR
##
## Ends in an error in state: 368.
## Ends in an error in state: 369.
##
## code_item -> DECLARATION lident CONTENT typ_data DEPENDS LPAREN separated_nonempty_list(COMMA,var_content) RPAREN DEFINED_AS expression . [ SCOPE END_CODE DECLARATION ]
## expression -> expression . DOT qlident [ XOR WITH SCOPE PLUSPLUS PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER GREATER_EQUAL GREATER FOR EQUAL END_CODE DOT DIV DECLARATION CONTAINS AND ]
@ -4163,7 +4163,7 @@ expected a binary operator continuing the expression, or a keyword ending the ex
source_file: BEGIN_CODE DECLARATION LIDENT CONTENT UIDENT DEPENDS LIDENT YEAR
##
## Ends in an error in state: 301.
## Ends in an error in state: 302.
##
## separated_nonempty_list(COMMA,var_content) -> lident . CONTENT typ_data [ STATE SCOPE RPAREN OUTPUT LIDENT INTERNAL INPUT END_CODE DEFINED_AS DECLARATION DATA CONTEXT CONDITION ]
## separated_nonempty_list(COMMA,var_content) -> lident . CONTENT typ_data COMMA separated_nonempty_list(COMMA,var_content) [ STATE SCOPE RPAREN OUTPUT LIDENT INTERNAL INPUT END_CODE DEFINED_AS DECLARATION DATA CONTEXT CONDITION ]
@ -4176,7 +4176,7 @@ expected 'content <type>'
source_file: BEGIN_CODE DECLARATION LIDENT CONTENT UIDENT DEPENDS LIDENT CONTENT YEAR
##
## Ends in an error in state: 302.
## Ends in an error in state: 303.
##
## separated_nonempty_list(COMMA,var_content) -> lident CONTENT . typ_data [ STATE SCOPE RPAREN OUTPUT LIDENT INTERNAL INPUT END_CODE DEFINED_AS DECLARATION DATA CONTEXT CONDITION ]
## separated_nonempty_list(COMMA,var_content) -> lident CONTENT . typ_data COMMA separated_nonempty_list(COMMA,var_content) [ STATE SCOPE RPAREN OUTPUT LIDENT INTERNAL INPUT END_CODE DEFINED_AS DECLARATION DATA CONTEXT CONDITION ]
@ -4189,7 +4189,7 @@ expected a type
source_file: BEGIN_CODE DECLARATION LIDENT CONTENT UIDENT DEPENDS LIDENT CONTENT BOOLEAN YEAR
##
## Ends in an error in state: 303.
## Ends in an error in state: 304.
##
## separated_nonempty_list(COMMA,var_content) -> lident CONTENT typ_data . [ STATE SCOPE RPAREN OUTPUT LIDENT INTERNAL INPUT END_CODE DEFINED_AS DECLARATION DATA CONTEXT CONDITION ]
## separated_nonempty_list(COMMA,var_content) -> lident CONTENT typ_data . COMMA separated_nonempty_list(COMMA,var_content) [ STATE SCOPE RPAREN OUTPUT LIDENT INTERNAL INPUT END_CODE DEFINED_AS DECLARATION DATA CONTEXT CONDITION ]
@ -4202,7 +4202,7 @@ expected 'equals <expression>'
source_file: BEGIN_CODE DECLARATION LIDENT CONTENT UIDENT DEPENDS LIDENT CONTENT UIDENT COMMA YEAR
##
## Ends in an error in state: 304.
## Ends in an error in state: 305.
##
## separated_nonempty_list(COMMA,var_content) -> lident CONTENT typ_data COMMA . separated_nonempty_list(COMMA,var_content) [ STATE SCOPE RPAREN OUTPUT LIDENT INTERNAL INPUT END_CODE DEFINED_AS DECLARATION DATA CONTEXT CONDITION ]
##
@ -4214,7 +4214,7 @@ expected the definition of another argument in the form '<var> content <type>'
source_file: BEGIN_CODE DECLARATION LIDENT CONTENT UIDENT DEPENDS LIDENT CONTENT UIDENT RPAREN
##
## Ends in an error in state: 369.
## Ends in an error in state: 370.
##
## code_item -> DECLARATION lident CONTENT typ_data DEPENDS separated_nonempty_list(COMMA,var_content) . DEFINED_AS expression [ SCOPE END_CODE DECLARATION ]
##
@ -4227,15 +4227,15 @@ source_file: BEGIN_CODE DECLARATION LIDENT CONTENT UIDENT DEPENDS LIDENT CONTENT
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 21, spurious reduction of production quident -> UIDENT
## In state 30, spurious reduction of production primitive_typ -> quident
## In state 292, spurious reduction of production typ_data -> primitive_typ
## In state 303, spurious reduction of production separated_nonempty_list(COMMA,var_content) -> lident CONTENT typ_data
## In state 293, spurious reduction of production typ_data -> primitive_typ
## In state 304, spurious reduction of production separated_nonempty_list(COMMA,var_content) -> lident CONTENT typ_data
##
expected 'equals <expression>'
source_file: BEGIN_CODE DECLARATION LIDENT CONTENT UIDENT DEPENDS LIDENT CONTENT UIDENT DEFINED_AS YEAR
##
## Ends in an error in state: 370.
## Ends in an error in state: 371.
##
## code_item -> DECLARATION lident CONTENT typ_data DEPENDS separated_nonempty_list(COMMA,var_content) DEFINED_AS . expression [ SCOPE END_CODE DECLARATION ]
##
@ -4247,7 +4247,7 @@ expected an expression
source_file: BEGIN_CODE DECLARATION LIDENT CONTENT UIDENT DEPENDS LIDENT CONTENT UIDENT DEFINED_AS FALSE YEAR
##
## Ends in an error in state: 371.
## Ends in an error in state: 372.
##
## code_item -> DECLARATION lident CONTENT typ_data DEPENDS separated_nonempty_list(COMMA,var_content) DEFINED_AS expression . [ SCOPE END_CODE DECLARATION ]
## expression -> expression . DOT qlident [ XOR WITH SCOPE PLUSPLUS PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER GREATER_EQUAL GREATER FOR EQUAL END_CODE DOT DIV DECLARATION CONTAINS AND ]
@ -4279,7 +4279,7 @@ expected a binary operator continuing the expression, or a keyword ending the ex
source_file: BEGIN_DIRECTIVE YEAR
##
## Ends in an error in state: 381.
## Ends in an error in state: 382.
##
## source_file_item -> BEGIN_DIRECTIVE . LAW_INCLUDE COLON nonempty_list(DIRECTIVE_ARG) option(AT_PAGE) END_DIRECTIVE [ LAW_TEXT LAW_HEADING EOF BEGIN_METADATA BEGIN_DIRECTIVE BEGIN_CODE ]
##
@ -4291,7 +4291,7 @@ expected a directive, e.g. 'Include: <filename>'
source_file: BEGIN_DIRECTIVE LAW_INCLUDE YEAR
##
## Ends in an error in state: 382.
## Ends in an error in state: 383.
##
## source_file_item -> BEGIN_DIRECTIVE LAW_INCLUDE . COLON nonempty_list(DIRECTIVE_ARG) option(AT_PAGE) END_DIRECTIVE [ LAW_TEXT LAW_HEADING EOF BEGIN_METADATA BEGIN_DIRECTIVE BEGIN_CODE ]
##
@ -4303,7 +4303,7 @@ expected ':', then a file name or 'JORFTEXTNNNNNNNNNNNN'
source_file: BEGIN_DIRECTIVE LAW_INCLUDE COLON YEAR
##
## Ends in an error in state: 383.
## Ends in an error in state: 384.
##
## source_file_item -> BEGIN_DIRECTIVE LAW_INCLUDE COLON . nonempty_list(DIRECTIVE_ARG) option(AT_PAGE) END_DIRECTIVE [ LAW_TEXT LAW_HEADING EOF BEGIN_METADATA BEGIN_DIRECTIVE BEGIN_CODE ]
##
@ -4315,7 +4315,7 @@ expected a file name or 'JORFTEXTNNNNNNNNNNNN'
source_file: BEGIN_DIRECTIVE LAW_INCLUDE COLON DIRECTIVE_ARG YEAR
##
## Ends in an error in state: 384.
## Ends in an error in state: 385.
##
## nonempty_list(DIRECTIVE_ARG) -> DIRECTIVE_ARG . [ END_DIRECTIVE AT_PAGE ]
## nonempty_list(DIRECTIVE_ARG) -> DIRECTIVE_ARG . nonempty_list(DIRECTIVE_ARG) [ END_DIRECTIVE AT_PAGE ]
@ -4328,7 +4328,7 @@ expected a page specification in the form '@p.<number>', or a newline
source_file: BEGIN_DIRECTIVE LAW_INCLUDE COLON DIRECTIVE_ARG AT_PAGE YEAR
##
## Ends in an error in state: 388.
## Ends in an error in state: 389.
##
## source_file_item -> BEGIN_DIRECTIVE LAW_INCLUDE COLON nonempty_list(DIRECTIVE_ARG) option(AT_PAGE) . END_DIRECTIVE [ LAW_TEXT LAW_HEADING EOF BEGIN_METADATA BEGIN_DIRECTIVE BEGIN_CODE ]
##
@ -4340,7 +4340,7 @@ expected a newline
source_file: LAW_HEADING YEAR
##
## Ends in an error in state: 393.
## Ends in an error in state: 394.
##
## source_file -> source_file_item . source_file [ # ]
##

View File

@ -81,7 +81,7 @@ end>
%type<Ast.definition> definition
%type<Ast.variation_typ> variation_type
%type<Ast.scope_use_item> assertion
%type<Ast.scope_use_item> scope_item
%type<Ast.scope_use_item Marked.pos> scope_item
%type<Ast.lident Marked.pos * Ast.base_typ Marked.pos> struct_scope_base
%type<Ast.struct_decl_field> struct_scope
%type<Ast.io_input> scope_decl_item_attribute_input
@ -385,21 +385,21 @@ let rule_consequence :=
let rule :=
| label = option(label) ;
except = option(exception_to) ;
except = option(addpos(exception_to)) ;
pos_rule = pos(RULE) ;
name_and_param = rule_expr ;
cond = option(condition_consequence) ;
state = option(state) ;
cond = option(condition_consequence) ;
consequence = addpos(rule_consequence) ; {
let (name, params_applied) = name_and_param in
let cons : bool Marked.pos = consequence in
let rule_exception = match except with
| None -> NotAnException
| Some x -> x
| Some x -> Marked.unmark x
in
let pos_start =
match label with Some _ -> Pos.from_lpos $loc(label)
| None -> match except with Some _ -> Pos.from_lpos $loc(except)
match label with Some l -> Marked.get_mark l
| None -> match except with Some e -> Marked.get_mark e
| None -> pos_rule
in
{
@ -489,9 +489,13 @@ let assertion :=
}
let scope_item :=
| r = rule ; <Rule>
| d = definition ; <Definition>
| ASSERTION ; contents = assertion ; <>
| r = rule ; {
Rule r, Marked.get_mark (Shared_ast.RuleName.get_info r.rule_id)
}
| d = definition ; {
Definition d, Marked.get_mark (Shared_ast.RuleName.get_info d.definition_id)
}
| ASSERTION ; contents = addpos(assertion) ; <>
let struct_scope_base :=
| DATA ; i = lident ;
@ -612,7 +616,7 @@ let depends_stance ==
let code_item :=
| SCOPE ; c = uident ;
e = option(preceded(UNDER_CONDITION,expression)) ;
COLON ; items = nonempty_list(addpos(scope_item)) ; {
COLON ; items = nonempty_list(scope_item) ; {
ScopeUse {
scope_use_name = c;
scope_use_condition = e;

View File

@ -36,7 +36,7 @@ exception EmptyError
exception AssertionFailed of source_position
exception ConflictError of source_position
exception UncomparableDurations
exception IndivisableDurations
exception IndivisibleDurations
exception ImpossibleDate
exception NoValueProvided of source_position
@ -677,6 +677,15 @@ module Oper = struct
let o_div_mon_rat m1 r1 =
if Q.zero = r1 then raise Division_by_zero else o_mult_mon_rat m1 (Q.inv r1)
let o_div_dur_dur d1 d2 =
let i1, i2 =
try
( integer_of_int (Dates_calc.Dates.period_to_days d1),
integer_of_int (Dates_calc.Dates.period_to_days d2) )
with Dates_calc.Dates.AmbiguousComputation -> raise IndivisibleDurations
in
o_div_int_int i1 i2
let o_lt_int_int i1 i2 = Z.compare i1 i2 < 0
let o_lt_rat_rat i1 i2 = Q.compare i1 i2 < 0
let o_lt_mon_mon m1 m2 = Z.compare m1 m2 < 0

View File

@ -43,7 +43,7 @@ exception EmptyError
exception AssertionFailed of source_position
exception ConflictError of source_position
exception UncomparableDurations
exception IndivisableDurations
exception IndivisibleDurations
exception ImpossibleDate
exception NoValueProvided of source_position
@ -330,6 +330,7 @@ module Oper : sig
val o_div_rat_rat : decimal -> decimal -> decimal
val o_div_mon_mon : money -> money -> decimal
val o_div_mon_rat : money -> decimal -> money
val o_div_dur_dur : duration -> duration -> decimal
val o_lt_int_int : integer -> integer -> bool
val o_lt_rat_rat : decimal -> decimal -> bool
val o_lt_mon_mon : money -> money -> bool

View File

@ -18,16 +18,12 @@ $ catala Interpret -s A
[ERROR] This exception can refer to several definitions. Try using labels to disambiguate
Ambiguous exception
┌─⯈ tests/test_exception/bad/ambiguous_unlabeled_exception.catala_en:10.23-13.23:
┌─⯈ tests/test_exception/bad/ambiguous_unlabeled_exception.catala_en:12.2-13.14:
└──┐
10 │ definition x equals 1
11 │
12 │ exception
│ ‾‾‾‾‾‾‾‾‾
13 │ definition x equals 2
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
│ ‾‾‾‾‾‾‾‾‾‾‾‾
└─ Test
Candidate definition

View File

@ -13,14 +13,12 @@ scope A:
$ catala Interpret -s A
[ERROR] This exception does not have a corresponding definition
┌─⯈ tests/test_exception/bad/missing_unlabeled_definition.catala_en:7.8-9.23:
┌─⯈ tests/test_exception/bad/missing_unlabeled_definition.catala_en:8.2-9.14:
└─┐
7 │ scope A:
8 │ exception
│ ‾‾‾‾‾‾‾‾‾
9 │ definition x equals 1
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
│ ‾‾‾‾‾‾‾‾‾‾‾‾
└─ Test
#return code 255#
```

View File

@ -24,16 +24,12 @@ $ catala Interpret -s A
[ERROR] This exception can refer to several definitions. Try using labels to disambiguate
Ambiguous exception
┌─⯈ tests/test_exception/bad/one_ambiguous_exception.catala_en:16.23-19.23:
┌─⯈ tests/test_exception/bad/one_ambiguous_exception.catala_en:18.2-19.14:
└──┐
16 │ definition y equals 4
17 │
18 │ exception
│ ‾‾‾‾‾‾‾‾‾
19 │ definition y equals 3
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
│ ‾‾‾‾‾‾‾‾‾‾‾‾
└─ Test
Candidate definition

View File

@ -16,48 +16,28 @@ scope A:
```catala-test-inline
$ catala Interpret -s A
[ERROR] Cyclic dependency detected between variables of scope A!
[ERROR] Cyclic dependency detected between the following variables of scope A:
z → x → y → z
Cycle variable z, declared:
┌─⯈ tests/test_scope/bad/cycle_in_scope.catala_en:7.10-11:
└─┐
7 │ context z content integer
│ ‾
└─ Article
Used here in the definition of another cycle variable x:
z is used here in the definition of x:
┌─⯈ tests/test_scope/bad/cycle_in_scope.catala_en:14.22-23:
└──┐
14 │ definition x equals z
│ ‾
└─ Article
Cycle variable y, declared:
┌─⯈ tests/test_scope/bad/cycle_in_scope.catala_en:6.10-11:
└─┐
6 │ context y content integer
│ ‾
└─ Article
Used here in the definition of another cycle variable z:
┌─⯈ tests/test_scope/bad/cycle_in_scope.catala_en:13.31-32:
└──┐
13 │ definition z under condition y < 1 consequence equals y
│ ‾
└─ Article
Cycle variable x, declared:
┌─⯈ tests/test_scope/bad/cycle_in_scope.catala_en:5.10-11:
└─┐
5 │ context x content integer
│ ‾
└─ Article
Used here in the definition of another cycle variable y:
x is used here in the definition of y:
┌─⯈ tests/test_scope/bad/cycle_in_scope.catala_en:11.31-32:
└──┐
11 │ definition y under condition x >= 0 consequence equals x
│ ‾
└─ Article
y is used here in the definition of z:
┌─⯈ tests/test_scope/bad/cycle_in_scope.catala_en:13.31-32:
└──┐
13 │ definition z under condition y < 1 consequence equals y
│ ‾
└─ Article
#return code 255#
```

View File

@ -0,0 +1,55 @@
```catala
declaration scope S1:
output o content integer
declaration scope S2:
output o content integer
declaration scope S3:
output o content integer
declaration scope S4:
output o content integer
scope S1:
definition o equals (output of S2).o
scope S2:
definition o equals (output of S1).o + (output of S3).o
scope S3:
definition o equals (output of S4).o
scope S4:
definition o equals (output of S2).o
# Note: there are two cycles in the same SCC here, either may be reported
```
```catala-test-inline
$ catala typecheck
[ERROR] Cyclic dependency detected between the following scopes:
S4 → S3 → S2 → S4
S4 is used here in the definition of S3:
┌─⯈ tests/test_scope/bad/cyclic_scope_calls.catala_en:21.23-35:
└──┐
21 │ definition o equals (output of S4).o
│ ‾‾‾‾‾‾‾‾‾‾‾‾
S3 is used here in the definition of S2:
┌─⯈ tests/test_scope/bad/cyclic_scope_calls.catala_en:18.42-54:
└──┐
18 │ definition o equals (output of S1).o + (output of S3).o
│ ‾‾‾‾‾‾‾‾‾‾‾‾
S2 is used here in the definition of S4:
┌─⯈ tests/test_scope/bad/cyclic_scope_calls.catala_en:24.23-35:
└──┐
24 │ definition o equals (output of S2).o
│ ‾‾‾‾‾‾‾‾‾‾‾‾
#return code 255#
```

View File

@ -18,30 +18,16 @@ scope B:
```catala-test-inline
$ catala Interpret -s A
[ERROR] Cyclic dependency detected between scopes!
[ERROR] Cyclic dependency detected between the following scopes: B → A → B
Cycle variable B, declared:
┌─⯈ tests/test_scope/bad/cyclic_scopes.catala_en:8.18-19:
└─┐
8 │ declaration scope B:
│ ‾
└─ Article
Used here in the definition of another cycle variable A:
B is used here in the definition of A:
┌─⯈ tests/test_scope/bad/cyclic_scopes.catala_en:5.2-3:
└─┐
5 │ b scope B
│ ‾
└─ Article
Cycle variable A, declared:
┌─⯈ tests/test_scope/bad/cyclic_scopes.catala_en:4.18-19:
└─┐
4 │ declaration scope A:
│ ‾
└─ Article
Used here in the definition of another cycle variable B:
A is used here in the definition of B:
┌─⯈ tests/test_scope/bad/cyclic_scopes.catala_en:9.2-3:
└─┐
9 │ a scope A

View File

@ -21,58 +21,31 @@ scope A:
```catala-test-inline
$ catala Typecheck
[ERROR] Cyclic dependency detected between variables of scope A!
[ERROR] Cyclic dependency detected between the following variables of scope A:
foofoo@bar → foofoo@baz → foo@bar → foo@baz → foofoo@bar
Cycle variable foofoo.bar, declared:
┌─⯈ tests/test_variable_state/bad/state_cycle.catala_en:9.10-13:
└─┐
9 │ state bar
│ ‾‾‾
└─ Test
Used here in the definition of another cycle variable foofoo.baz:
foofoo@bar is used here in the definition of foofoo@baz:
┌─⯈ tests/test_variable_state/bad/state_cycle.catala_en:19.37-43:
└──┐
19 │ definition foofoo state baz equals foofoo + 1
│ ‾‾‾‾‾‾
└─ Test
Cycle variable foofoo.baz, declared:
┌─⯈ tests/test_variable_state/bad/state_cycle.catala_en:10.10-13:
└──┐
10 │ state baz
│ ‾‾‾
└─ Test
Used here in the definition of another cycle variable foo.bar:
foofoo@baz is used here in the definition of foo@bar:
┌─⯈ tests/test_variable_state/bad/state_cycle.catala_en:13.34-40:
└──┐
13 │ definition foo state bar equals foofoo
│ ‾‾‾‾‾‾
└─ Test
Cycle variable foo.bar, declared:
┌─⯈ tests/test_variable_state/bad/state_cycle.catala_en:6.10-13:
└─┐
6 │ state bar
│ ‾‾‾
└─ Test
Used here in the definition of another cycle variable foo.baz:
foo@bar is used here in the definition of foo@baz:
┌─⯈ tests/test_variable_state/bad/state_cycle.catala_en:15.34-37:
└──┐
15 │ definition foo state baz equals foo + 1
│ ‾‾‾
└─ Test
Cycle variable foo.baz, declared:
┌─⯈ tests/test_variable_state/bad/state_cycle.catala_en:7.10-13:
└─┐
7 │ state baz
│ ‾‾‾
└─ Test
Used here in the definition of another cycle variable foofoo.bar:
foo@baz is used here in the definition of foofoo@bar:
┌─⯈ tests/test_variable_state/bad/state_cycle.catala_en:17.37-40:
└──┐
17 │ definition foofoo state bar equals foo