Merge branch 'master' into alain_default-option

This commit is contained in:
Denis Merigoux 2021-11-30 16:52:19 +01:00
commit c3bde49194
No known key found for this signature in database
GPG Key ID: EE99DCFA365C3EE3
26 changed files with 3510 additions and 2991 deletions

View File

@ -12,7 +12,7 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel # A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs: jobs:
build-nix: build-nix-21-05:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2.3.4 - uses: actions/checkout@v2.3.4
@ -22,6 +22,16 @@ jobs:
- run: nix-build release.nix - run: nix-build release.nix
- run: nix-shell --run "echo OK" - run: nix-shell --run "echo OK"
build-nix-unstable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: cachix/install-nix-action@v14.1
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix-build release.nix
- run: nix-shell --run "echo OK"
build: build:
# The type of runner that the job will run on # The type of runner that the job will run on
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -1,7 +1,7 @@
diff --git a/compiler/catala_web.ml b/compiler/catala_web.ml diff --git a/compiler/catala_web_interpreter.ml b/compiler/catala_web_interpreter.ml
deleted file mode 100644 deleted file mode 100644
index 31d5289..0000000 index 31d5289..0000000
--- a/compiler/catala_web.ml --- a/compiler/catala_web_interpreter.ml
+++ /dev/null +++ /dev/null
@@ -1,16 +0,0 @@ @@ -1,16 +0,0 @@
-open Driver -open Driver
@ -29,11 +29,11 @@ index d192291..994c528 100644
(modules runtime)) (modules runtime))
-(executable -(executable
- (name catala_web) - (name catala_web_interpreter)
- (modes byte js) - (modes byte js)
- (package catala) - (package catala)
- (public_name catala_web) - (public_name catala_web_interpreter)
- (modules catala_web) - (modules catala_web_interpreter)
- (preprocess - (preprocess
- (pps js_of_ocaml-ppx)) - (pps js_of_ocaml-ppx))
- (libraries catala.driver js_of_ocaml)) - (libraries catala.driver js_of_ocaml))

View File

@ -48,9 +48,10 @@ build:
@$(MAKE) --no-print-directory format @$(MAKE) --no-print-directory format
dune build $(COMPILER_DIR)/catala.exe dune build $(COMPILER_DIR)/catala.exe
#> js_build : Builds the Web-compatible JS version of the Catala compiler #> js_build : Builds the Web-compatible JS versions of the Catala compiler
js_build: js_build:
dune build $(COMPILER_DIR)/catala_web.bc.js --profile release dune build $(COMPILER_DIR)/catala.bc.js --profile release
dune build $(COMPILER_DIR)/catala_web_interpreter.bc.js --profile release
#> doc : Generates the HTML OCaml documentation #> doc : Generates the HTML OCaml documentation
doc: doc:

View File

@ -1,14 +1,53 @@
<center> <div align="center">
<img src="https://github.com/CatalaLang/catala/raw/master/doc/images/logo.png" alt="Catala logo" width="100"/> <img src="https://github.com/CatalaLang/catala/raw/master/doc/images/logo.png" alt="Catala logo" width="120"/>
</center> <h3 align="center">
Catala
</h3>
<p align="center">
<a href="https://catala-lang.org/ocaml_docs/"><strong>Explore the docs »</strong></a>
<br/>
<a href="https://catala-lang.org/en/examples/tutorial">View Tutorial</a>
<a href="https://github.com/CatalaLang/catala/issues">Report Bug</a>
<a href="https://github.com/CatalaLang/catala/blob/master/CONTRIBUTING.md">Contribute</a>
<a href="https://zulip.catala-lang.org/">Join Zulip Chat</a>
</p>
# Catala [![Catala chat][chat-image]][chat-link] ![CI][ci-link] ![Opam][opam-link] ![Licence][licence-link] ![Tag][tag-link] ![LoC][loc-link] ![Language][language-link] ![Issues][issues-link] ![Contributors][contributors-link] ![Activity][activity-link] ![CI][ci-link] ![Opam][opam-link] ![Licence][licence-link] ![Tag][tag-link] ![LoC][loc-link] ![Language][language-link] ![Issues][issues-link] ![Contributors][contributors-link] ![Activity][activity-link]
Catala is a domain-specific language for deriving Catala is a domain-specific language for deriving
faithful-by-construction algorithms from legislative texts. To learn quickly faithful-by-construction algorithms from legislative texts. To learn quickly
about the language and its features, you can jump right to the official about the language and its features, you can jump right to the official
[Catala tutorial](https://catala-lang.org/en/examples/tutorial). [Catala tutorial](https://catala-lang.org/en/examples/tutorial).
You can join the Catala community on [Zulip][chat-link]! You can join the Catala community on [Zulip][chat-link]!
</div>
<br>
<details>
<summary>Table of Contents</summary>
<!-- vim-markdown-toc GitLab -->
* [Concepts](#concepts)
* [Building and installation](#building-and-installation)
* [Usage](#usage)
* [Examples](#examples)
* [API](#api)
* [Contributing](#contributing)
* [Test suite](#test-suite)
* [Documentation](#documentation)
* [Formal semantics](#formal-semantics)
* [Compiler documentation](#compiler-documentation)
* [License](#license)
* [Limitations and disclaimer](#limitations-and-disclaimer)
* [Pierre Catala](#pierre-catala)
<!-- vim-markdown-toc -->
</details>
## Concepts ## Concepts
@ -23,9 +62,9 @@ cases, etc. that contain information about the socio-fiscal mechanism that
you want to implement. Then, you can proceed to annotate the text article by you want to implement. Then, you can proceed to annotate the text article by
article, in your favorite text editor : article, in your favorite text editor :
<center> <div align="center">
<img src="https://github.com/CatalaLang/catala/raw/master/doc/images/ScreenShotVSCode.png" alt="Screenshot" height="450"/> <img src="https://github.com/CatalaLang/catala/raw/master/doc/images/ScreenShotVSCode.png" alt="Screenshot" height="350"/>
</center> </div>
Once your code is complete and tested, you can use the Catala Once your code is complete and tested, you can use the Catala
compiler to produce a lawyer-readable PDF version of your compiler to produce a lawyer-readable PDF version of your
@ -34,9 +73,9 @@ in collaboration with law professionals to ensure that the code
can be reviewed and certified correct by the domain experts, which can be reviewed and certified correct by the domain experts, which
are in this case lawyers and not programmers. are in this case lawyers and not programmers.
<center> <div align="center">
<img src="https://github.com/CatalaLang/catala/raw/master/doc/images/CatalaScreenShot.png" alt="Screenshot" height="400"/> <img src="https://github.com/CatalaLang/catala/raw/master/doc/images/CatalaScreenShot.png" alt="Screenshot" height="350"/>
</center> </div>
The Catala language is special because its logical structure mimics The Catala language is special because its logical structure mimics
the logical structure of the law. Indeed, the core concept of the logical structure of the law. Indeed, the core concept of

View File

@ -224,9 +224,9 @@ let build_exceptions_graph (def : Ast.rule Ast.RuleMap.t) (def_info : Ast.ScopeD
else else
Errors.raise_spanned_error Errors.raise_spanned_error
(Format.asprintf (Format.asprintf
"This rule has been declared as an exception to an incorrect label: \"%a\" is \ "This rule has been declared as an exception to an incorrect label: this label \
not a label attached to a definition of \"%a\"" is not attached to a definition of \"%a\""
Ast.RuleName.format_t exc_r Ast.ScopeDef.format_t def_info) Ast.ScopeDef.format_t def_info)
pos) pos)
def g def g
in in
@ -247,11 +247,15 @@ let check_for_exception_cycle (g : ExceptionsDependencies.t) : unit =
(Format.asprintf "%a" Ast.RuleName.format_t v, Ast.RuleName.get_info v) (Format.asprintf "%a" Ast.RuleName.format_t v, Ast.RuleName.get_info v)
in in
let succs = ExceptionsDependencies.succ_e g v in let succs = ExceptionsDependencies.succ_e g v in
let _, edge_pos, succ = List.find (fun (_, _, succ) -> List.mem succ scc) succs in let _, edge_pos, _ = List.find (fun (_, _, succ) -> List.mem succ scc) succs in
let succ_str = Format.asprintf "%a" Ast.RuleName.format_t succ in
[ [
(Some ("Cycle exception " ^ var_str ^ ", declared:"), Pos.get_position var_info); ( Some
( Some ("Used here in the definition of another cycle exception " ^ succ_str ^ ":"), ("Cyclic exception for definition of variable \"" ^ var_str
^ "\", declared here:"),
Pos.get_position var_info );
( Some
("Used here in the definition of another cyclic exception for defining \""
^ var_str ^ "\":"),
edge_pos ); edge_pos );
]) ])
scc)) scc))

View File

@ -11,18 +11,18 @@
(modules runtime)) (modules runtime))
(executable (executable
(name catala_web) (name catala_web_interpreter)
(modes byte js) (modes byte js)
(package catala) (package catala)
(public_name catala_web) (public_name catala_web_interpreter)
(modules catala_web) (modules catala_web_interpreter)
(preprocess (preprocess
(pps js_of_ocaml-ppx)) (pps js_of_ocaml-ppx))
(libraries catala.driver js_of_ocaml)) (libraries catala.driver js_of_ocaml))
(executable (executable
(name catala) (name catala)
(modes native) (modes native js)
(package catala) (package catala)
(modules catala) (modules catala)
(public_name catala) (public_name catala)

View File

@ -47,18 +47,6 @@ let remove_cb_first_lines : string -> string =
let remove_cb_last_lines : string -> string = let remove_cb_last_lines : string -> string =
R.substitute ~rex:(R.regexp "<.*\n*</pre>") ~subst:(function _ -> "</pre>") R.substitute ~rex:(R.regexp "<.*\n*</pre>") ~subst:(function _ -> "</pre>")
(** Partial application allowing to substitute operators by their unicode representation. *)
let substitute_arithmetics_op : string -> string =
R.substitute ~rex:(R.regexp "!=|<=|>=|--|->|\\*|\\/") ~subst:(function
| "!=" -> ""
| "<=" -> ""
| ">=" -> ""
| "--" -> ""
| "->" -> ""
| "*" -> "×"
| "/" -> "÷"
| s -> s)
(** Usage: [wrap_html source_files custom_pygments language fmt wrapped] (** Usage: [wrap_html source_files custom_pygments language fmt wrapped]
Prints an HTML complete page structure around the [wrapped] content. *) Prints an HTML complete page structure around the [wrapped] content. *)
@ -154,11 +142,10 @@ let rec law_structure_to_html (language : C.backend_lang) (fmt : Format.formatte
let t = pre_html t in let t = pre_html t in
if t = "" then () else Format.fprintf fmt "<p class='law-text'>%s</p>" t if t = "" then () else Format.fprintf fmt "<p class='law-text'>%s</p>" t
| A.CodeBlock (_, c, metadata) -> | A.CodeBlock (_, c, metadata) ->
let pprinted_c = substitute_arithmetics_op (Pos.unmark c) in
Format.fprintf fmt "<div class='code-wrapper%s'>\n<div class='filename'>%s</div>\n%s\n</div>" Format.fprintf fmt "<div class='code-wrapper%s'>\n<div class='filename'>%s</div>\n%s\n</div>"
(if metadata then " code-metadata" else "") (if metadata then " code-metadata" else "")
(Pos.get_file (Pos.get_position c)) (Pos.get_file (Pos.get_position c))
(pygmentize_code (Pos.same_pos_as ("```catala\n" ^ pprinted_c ^ "```") c) language) (pygmentize_code (Pos.same_pos_as ("```catala\n" ^ Pos.unmark c ^ "```") c) language)
| A.LawHeading (heading, children) -> | A.LawHeading (heading, children) ->
let h_number = heading.law_heading_precedence + 1 in let h_number = heading.law_heading_precedence + 1 in
Format.fprintf fmt "<h%d class='law-heading'><a href='%s'>%s</a></h%d>\n" h_number Format.fprintf fmt "<h%d class='law-heading'><a href='%s'>%s</a></h%d>\n" h_number

View File

@ -125,11 +125,10 @@ let rec law_structure_to_latex (language : C.backend_lang) (fmt : Format.formatt
| A.LawHeading (heading, children) -> | A.LawHeading (heading, children) ->
Format.fprintf fmt "\\%s*{%s}\n\n" Format.fprintf fmt "\\%s*{%s}\n\n"
(match heading.law_heading_precedence with (match heading.law_heading_precedence with
| 0 -> "chapter" | 0 -> "section"
| 1 -> "section" | 1 -> "subsection"
| 2 -> "subsection" | 2 -> "subsubsection"
| 4 -> "subsubsection" | 3 -> "paragraph"
| 5 -> "paragraph"
| _ -> "subparagraph") | _ -> "subparagraph")
(pre_latexify (Pos.unmark heading.law_heading_name)); (pre_latexify (Pos.unmark heading.law_heading_name));
Format.pp_print_list Format.pp_print_list
@ -148,7 +147,8 @@ let rec law_structure_to_latex (language : C.backend_lang) (fmt : Format.formatt
| A.CodeBlock (_, c, false) -> | A.CodeBlock (_, c, false) ->
Format.fprintf fmt Format.fprintf fmt
"\\begin{minted}[label={\\hspace*{\\fill}\\texttt{%s}},firstnumber=%d]{%s}\n\ "\\begin{minted}[label={\\hspace*{\\fill}\\texttt{%s}},firstnumber=%d]{%s}\n\
```catala%s```\n\ ```catala\n\
%s```\n\
\\end{minted}" \\end{minted}"
(pre_latexify (Filename.basename (Pos.get_file (Pos.get_position c)))) (pre_latexify (Filename.basename (Pos.get_file (Pos.get_position c))))
(Pos.get_start_line (Pos.get_position c) - 1) (Pos.get_start_line (Pos.get_position c) - 1)
@ -163,7 +163,8 @@ let rec law_structure_to_latex (language : C.backend_lang) (fmt : Format.formatt
title=\\textcolor{black}{\\texttt{%s}},title after \ title=\\textcolor{black}{\\texttt{%s}},title after \
break=\\textcolor{black}{\\texttt{%s}},before skip=1em, after skip=1em]\n\ break=\\textcolor{black}{\\texttt{%s}},before skip=1em, after skip=1em]\n\
\\begin{minted}[numbersep=9mm, firstnumber=%d, label={\\hspace*{\\fill}\\texttt{%s}}]{%s}\n\ \\begin{minted}[numbersep=9mm, firstnumber=%d, label={\\hspace*{\\fill}\\texttt{%s}}]{%s}\n\
```catala%s```\n\ ```catala\n\
%s```\n\
\\end{minted}\n\ \\end{minted}\n\
\\end{tcolorbox}" \\end{tcolorbox}"
metadata_title metadata_title metadata_title metadata_title

View File

@ -325,6 +325,7 @@ type rule = {
rule_parameter : ident Pos.marked option; rule_parameter : ident Pos.marked option;
rule_condition : expression Pos.marked option; rule_condition : expression Pos.marked option;
rule_name : qident Pos.marked; rule_name : qident Pos.marked;
rule_id : Desugared.Ast.RuleName.t; [@opaque]
rule_consequence : (bool[@opaque]) Pos.marked; rule_consequence : (bool[@opaque]) Pos.marked;
} }
[@@deriving [@@deriving
@ -347,6 +348,7 @@ type definition = {
definition_name : qident Pos.marked; definition_name : qident Pos.marked;
definition_parameter : ident Pos.marked option; definition_parameter : ident Pos.marked option;
definition_condition : expression Pos.marked option; definition_condition : expression Pos.marked option;
definition_id : Desugared.Ast.RuleName.t; [@opaque]
definition_expr : expression Pos.marked; definition_expr : expression Pos.marked;
} }
[@@deriving [@@deriving
@ -567,3 +569,18 @@ type program = { program_items : law_structure list; program_source_files : (str
visitors { variety = "iter"; ancestors = [ "law_structure_iter" ]; name = "program_iter" }] visitors { variety = "iter"; ancestors = [ "law_structure_iter" ]; name = "program_iter" }]
type source_file = law_structure list type source_file = law_structure list
(** {1 Helpers}*)
(** Translates a {!type: rule} into the corresponding {!type: definition} *)
let rule_to_def (rule : rule) : definition =
let consequence_expr = Literal (LBool (Pos.unmark rule.rule_consequence)) in
{
definition_label = rule.rule_label;
definition_exception_to = rule.rule_exception_to;
definition_name = rule.rule_name;
definition_parameter = rule.rule_parameter;
definition_condition = rule.rule_condition;
definition_id = rule.rule_id;
definition_expr = (consequence_expr, Pos.get_position rule.rule_consequence);
}

View File

@ -999,23 +999,11 @@ let process_def (precond : Scopelang.Ast.expr Pos.marked Bindlib.box option)
program_scopes = Scopelang.Ast.ScopeMap.add scope_uid scope_updated prgm.program_scopes; program_scopes = Scopelang.Ast.ScopeMap.add scope_uid scope_updated prgm.program_scopes;
} }
(** Translates a {!type: Surface.Ast.rule} into the corresponding {!type: Surface.Ast.definition} *)
let rule_to_def (rule : Ast.rule) : Ast.definition =
let consequence_expr = Ast.Literal (Ast.LBool (Pos.unmark rule.rule_consequence)) in
{
Ast.definition_label = rule.rule_label;
Ast.definition_exception_to = rule.rule_exception_to;
Ast.definition_name = rule.rule_name;
Ast.definition_parameter = rule.rule_parameter;
Ast.definition_condition = rule.rule_condition;
Ast.definition_expr = (consequence_expr, Pos.get_position rule.rule_consequence);
}
(** Translates a {!type: Surface.Ast.rule} from the surface language *) (** Translates a {!type: Surface.Ast.rule} from the surface language *)
let process_rule (precond : Scopelang.Ast.expr Pos.marked Bindlib.box option) let process_rule (precond : Scopelang.Ast.expr Pos.marked Bindlib.box option)
(scope : Scopelang.Ast.ScopeName.t) (ctxt : Name_resolution.context) (scope : Scopelang.Ast.ScopeName.t) (ctxt : Name_resolution.context)
(prgm : Desugared.Ast.program) (rule : Ast.rule) : Desugared.Ast.program = (prgm : Desugared.Ast.program) (rule : Ast.rule) : Desugared.Ast.program =
let def = rule_to_def rule in let def = Ast.rule_to_def rule in
process_def precond scope ctxt prgm def process_def precond scope ctxt prgm def
(** Translates assertions *) (** Translates assertions *)

View File

@ -461,7 +461,6 @@ let rec lex_code (lexbuf : lexbuf) : token =
L.update_acc lexbuf; L.update_acc lexbuf;
BY BY
| MR_RULE -> | MR_RULE ->
L.update_acc lexbuf;
L.update_acc lexbuf; L.update_acc lexbuf;
RULE RULE
| MR_EXISTS -> | MR_EXISTS ->

View File

@ -28,6 +28,7 @@ type unique_rulename = Ambiguous of Pos.t list | Unique of Desugared.Ast.RuleNam
type scope_context = { type scope_context = {
var_idmap : Scopelang.Ast.ScopeVar.t Desugared.Ast.IdentMap.t; (** Scope variables *) var_idmap : Scopelang.Ast.ScopeVar.t Desugared.Ast.IdentMap.t; (** Scope variables *)
label_idmap : Desugared.Ast.RuleName.t Desugared.Ast.IdentMap.t; label_idmap : Desugared.Ast.RuleName.t Desugared.Ast.IdentMap.t;
(** Set of rules attached to a label *)
default_rulemap : unique_rulename Desugared.Ast.ScopeDefMap.t; default_rulemap : unique_rulename Desugared.Ast.ScopeDefMap.t;
(** What is the default rule to refer to for unnamed exceptions, if any *) (** What is the default rule to refer to for unnamed exceptions, if any *)
sub_scopes_idmap : Scopelang.Ast.SubScopeName.t Desugared.Ast.IdentMap.t; sub_scopes_idmap : Scopelang.Ast.SubScopeName.t Desugared.Ast.IdentMap.t;
@ -442,78 +443,6 @@ let get_def_key (name : Ast.qident) (scope_uid : Scopelang.Ast.ScopeName.t) (ctx
Desugared.Ast.ScopeDef.SubScopeVar (subscope_uid, x_uid) Desugared.Ast.ScopeDef.SubScopeVar (subscope_uid, x_uid)
| _ -> Errors.raise_spanned_error "Structs are not handled yet" default_pos | _ -> Errors.raise_spanned_error "Structs are not handled yet" default_pos
let process_rule (ctxt : context) (s_name : Scopelang.Ast.ScopeName.t) (r : Ast.rule) : context =
(* Process the label map first *)
let ctxt =
match r.Ast.rule_label with
| None -> ctxt
| Some label ->
let rule_name =
Desugared.Ast.RuleName.fresh
(match r.rule_label with
| None ->
Pos.map_under_mark
(fun qident -> String.concat "." (List.map (fun i -> Pos.unmark i) qident))
r.rule_name
| Some label -> label)
in
{
ctxt with
scopes =
Scopelang.Ast.ScopeMap.update s_name
(fun s_ctxt ->
match s_ctxt with
| None -> assert false (* should not happen *)
| Some s_ctxt ->
Some
{
s_ctxt with
label_idmap =
Desugared.Ast.IdentMap.add (Pos.unmark label) rule_name s_ctxt.label_idmap;
})
ctxt.scopes;
}
in
(* And update the map of default rulenames for unlabeled exceptions *)
match r.Ast.rule_exception_to with
(* If this definition is an exception, it cannot be a default definition *)
| UnlabeledException | ExceptionToLabel _ -> ctxt
(* If it is not an exception, we need to distinguish between several cases *)
| NotAnException ->
let def_key =
get_def_key (Pos.unmark r.rule_name) s_name ctxt (Pos.get_position r.rule_consequence)
in
let scope_ctxt = Scopelang.Ast.ScopeMap.find s_name ctxt.scopes in
let rulemap =
match Desugared.Ast.ScopeDefMap.find_opt def_key scope_ctxt.default_rulemap with
(* There was already a default definition for this key. If we need it, it is ambiguous *)
| Some old ->
Desugared.Ast.ScopeDefMap.add def_key
(Ambiguous
([ Pos.get_position r.rule_name ]
@
match old with
| Ambiguous old -> old
| Unique n -> [ Pos.get_position (Desugared.Ast.RuleName.get_info n) ]))
scope_ctxt.default_rulemap
(* No definition has been set yet for this key *)
| None -> (
match r.Ast.rule_label with
(* This default definition has a label. This is not allowed for unlabeled exceptions *)
| Some _ ->
Desugared.Ast.ScopeDefMap.add def_key
(Ambiguous [ Pos.get_position r.rule_name ])
scope_ctxt.default_rulemap
(* This is a possible default definition for this key. We create and store a fresh
rulename *)
| None ->
Desugared.Ast.ScopeDefMap.add def_key
(Unique (Desugared.Ast.RuleName.fresh (Pos.same_pos_as "default" r.rule_name)))
scope_ctxt.default_rulemap)
in
let new_scope_ctxt = { scope_ctxt with default_rulemap = rulemap } in
{ ctxt with scopes = Scopelang.Ast.ScopeMap.add s_name new_scope_ctxt ctxt.scopes }
let process_definition (ctxt : context) (s_name : Scopelang.Ast.ScopeName.t) (d : Ast.definition) : let process_definition (ctxt : context) (s_name : Scopelang.Ast.ScopeName.t) (d : Ast.definition) :
context = context =
(* Process the label map first *) (* Process the label map first *)
@ -521,15 +450,6 @@ let process_definition (ctxt : context) (s_name : Scopelang.Ast.ScopeName.t) (d
match d.Ast.definition_label with match d.Ast.definition_label with
| None -> ctxt | None -> ctxt
| Some label -> | Some label ->
let definition_name =
Desugared.Ast.RuleName.fresh
(match d.definition_label with
| None ->
Pos.map_under_mark
(fun qident -> String.concat "." (List.map (fun i -> Pos.unmark i) qident))
d.definition_name
| Some label -> label)
in
{ {
ctxt with ctxt with
scopes = scopes =
@ -537,14 +457,25 @@ let process_definition (ctxt : context) (s_name : Scopelang.Ast.ScopeName.t) (d
(fun s_ctxt -> (fun s_ctxt ->
match s_ctxt with match s_ctxt with
| None -> assert false (* should not happen *) | None -> assert false (* should not happen *)
| Some s_ctxt -> | Some s_ctxt -> (
match Desugared.Ast.IdentMap.find_opt (Pos.unmark label) s_ctxt.label_idmap with
| Some existing_label ->
Errors.raise_multispanned_error
"This label has already been given to another rule, please pick a new \
one since labels should be unique."
[
(Some "Duplicate label:", Pos.get_position label);
( Some "Existing rule with same label:",
Pos.get_position (Desugared.Ast.RuleName.get_info existing_label) );
]
| None ->
Some Some
{ {
s_ctxt with s_ctxt with
label_idmap = label_idmap =
Desugared.Ast.IdentMap.add (Pos.unmark label) definition_name Desugared.Ast.IdentMap.add (Pos.unmark label) d.Ast.definition_id
s_ctxt.label_idmap; s_ctxt.label_idmap;
}) }))
ctxt.scopes; ctxt.scopes;
} }
in in
@ -592,7 +523,7 @@ let process_definition (ctxt : context) (s_name : Scopelang.Ast.ScopeName.t) (d
let process_scope_use_item (s_name : Scopelang.Ast.ScopeName.t) (ctxt : context) let process_scope_use_item (s_name : Scopelang.Ast.ScopeName.t) (ctxt : context)
(sitem : Ast.scope_use_item Pos.marked) : context = (sitem : Ast.scope_use_item Pos.marked) : context =
match Pos.unmark sitem with match Pos.unmark sitem with
| Rule r -> process_rule ctxt s_name r | Rule r -> process_definition ctxt s_name (Ast.rule_to_def r)
| Definition d -> process_definition ctxt s_name d | Definition d -> process_definition ctxt s_name d
| _ -> ctxt | _ -> ctxt

View File

@ -1,6 +1,6 @@
source_file: BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT CONSTRUCTOR CONTENT TEXT YEAR source_file: BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT CONSTRUCTOR CONTENT TEXT YEAR
## ##
## Ends in an error in state: 337. ## Ends in an error in state: 341.
## ##
## nonempty_list(enum_decl_line) -> enum_decl_line . [ SCOPE END_CODE DECLARATION ] ## 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 ] ## nonempty_list(enum_decl_line) -> enum_decl_line . nonempty_list(enum_decl_line) [ SCOPE END_CODE DECLARATION ]
@ -13,7 +13,7 @@ expected another enum case, or a new declaration or scope use
source_file: BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT CONSTRUCTOR CONTENT YEAR source_file: BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT CONSTRUCTOR CONTENT YEAR
## ##
## Ends in an error in state: 332. ## Ends in an error in state: 336.
## ##
## enum_decl_line_payload -> CONTENT . typ [ SCOPE END_CODE DECLARATION ALT ] ## enum_decl_line_payload -> CONTENT . typ [ SCOPE END_CODE DECLARATION ALT ]
## ##
@ -25,7 +25,7 @@ expected a content type
source_file: BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT CONSTRUCTOR YEAR source_file: BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT CONSTRUCTOR YEAR
## ##
## Ends in an error in state: 331. ## Ends in an error in state: 335.
## ##
## enum_decl_line -> ALT constructor . option(enum_decl_line_payload) [ SCOPE END_CODE DECLARATION ALT ] ## enum_decl_line -> ALT constructor . option(enum_decl_line_payload) [ SCOPE END_CODE DECLARATION ALT ]
## ##
@ -37,7 +37,7 @@ expected a payload for your enum case, or another case or declaration
source_file: BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT YEAR source_file: BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON ALT YEAR
## ##
## Ends in an error in state: 330. ## Ends in an error in state: 334.
## ##
## enum_decl_line -> ALT . constructor option(enum_decl_line_payload) [ SCOPE END_CODE DECLARATION ALT ] ## enum_decl_line -> ALT . constructor option(enum_decl_line_payload) [ SCOPE END_CODE DECLARATION ALT ]
## ##
@ -49,7 +49,7 @@ expected the name of an enum case
source_file: BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON YEAR source_file: BEGIN_CODE DECLARATION ENUM CONSTRUCTOR COLON YEAR
## ##
## Ends in an error in state: 329. ## Ends in an error in state: 333.
## ##
## code_item -> DECLARATION ENUM constructor COLON . nonempty_list(enum_decl_line) [ SCOPE END_CODE DECLARATION ] ## code_item -> DECLARATION ENUM constructor COLON . nonempty_list(enum_decl_line) [ SCOPE END_CODE DECLARATION ]
## ##
@ -61,7 +61,7 @@ expected an enum case
source_file: BEGIN_CODE DECLARATION ENUM CONSTRUCTOR YEAR source_file: BEGIN_CODE DECLARATION ENUM CONSTRUCTOR YEAR
## ##
## Ends in an error in state: 328. ## Ends in an error in state: 332.
## ##
## code_item -> DECLARATION ENUM constructor . COLON nonempty_list(enum_decl_line) [ SCOPE END_CODE DECLARATION ] ## code_item -> DECLARATION ENUM constructor . COLON nonempty_list(enum_decl_line) [ SCOPE END_CODE DECLARATION ]
## ##
@ -73,7 +73,7 @@ expected a colon
source_file: BEGIN_CODE DECLARATION ENUM YEAR source_file: BEGIN_CODE DECLARATION ENUM YEAR
## ##
## Ends in an error in state: 327. ## Ends in an error in state: 331.
## ##
## code_item -> DECLARATION ENUM . constructor COLON nonempty_list(enum_decl_line) [ SCOPE END_CODE DECLARATION ] ## code_item -> DECLARATION ENUM . constructor COLON nonempty_list(enum_decl_line) [ SCOPE END_CODE DECLARATION ]
## ##
@ -85,7 +85,7 @@ expected the name of your enum
source_file: BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT CONDITION YEAR source_file: BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT CONDITION YEAR
## ##
## Ends in an error in state: 322. ## Ends in an error in state: 326.
## ##
## scope_decl_item -> CONTEXT ident CONDITION . option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## scope_decl_item -> CONTEXT ident CONDITION . option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ]
## ##
@ -97,7 +97,7 @@ expected the next context item or a dependency declaration for this item
source_file: BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT CONTENT TEXT YEAR source_file: BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT CONTENT TEXT YEAR
## ##
## Ends in an error in state: 320. ## Ends in an error in state: 324.
## ##
## scope_decl_item -> CONTEXT ident CONTENT typ . option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## scope_decl_item -> CONTEXT ident CONTENT typ . option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ]
## ##
@ -109,7 +109,7 @@ expected the next context item or a dependency declaration for this item
source_file: BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT CONTENT YEAR source_file: BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT CONTENT YEAR
## ##
## Ends in an error in state: 319. ## Ends in an error in state: 323.
## ##
## scope_decl_item -> CONTEXT ident CONTENT . typ option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## scope_decl_item -> CONTEXT ident CONTENT . typ option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ]
## ##
@ -121,7 +121,7 @@ expected the type of this context item
source_file: BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT SCOPE CONSTRUCTOR YEAR source_file: BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT SCOPE CONSTRUCTOR YEAR
## ##
## Ends in an error in state: 324. ## Ends in an error in state: 328.
## ##
## nonempty_list(scope_decl_item) -> scope_decl_item . [ SCOPE END_CODE DECLARATION ] ## 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 ] ## nonempty_list(scope_decl_item) -> scope_decl_item . nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ]
@ -134,7 +134,7 @@ expected another scope context item or the end of the scope declaration
source_file: BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT SCOPE YEAR source_file: BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT SCOPE YEAR
## ##
## Ends in an error in state: 317. ## Ends in an error in state: 321.
## ##
## scope_decl_item -> CONTEXT ident SCOPE . constructor [ SCOPE END_CODE DECLARATION CONTEXT ] ## scope_decl_item -> CONTEXT ident SCOPE . constructor [ SCOPE END_CODE DECLARATION CONTEXT ]
## ##
@ -146,7 +146,7 @@ expected the name of the subscope for this context item
source_file: BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT YEAR source_file: BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT IDENT YEAR
## ##
## Ends in an error in state: 316. ## Ends in an error in state: 320.
## ##
## scope_decl_item -> CONTEXT ident . CONTENT typ option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## 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 ] ## scope_decl_item -> CONTEXT ident . SCOPE constructor [ SCOPE END_CODE DECLARATION CONTEXT ]
@ -160,7 +160,7 @@ expected the kind of this context item: is it a condition, a sub-scope or a data
source_file: BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT YEAR source_file: BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON CONTEXT YEAR
## ##
## Ends in an error in state: 315. ## Ends in an error in state: 319.
## ##
## scope_decl_item -> CONTEXT . ident CONTENT typ option(struct_scope_func) [ SCOPE END_CODE DECLARATION CONTEXT ] ## 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 ] ## scope_decl_item -> CONTEXT . ident SCOPE constructor [ SCOPE END_CODE DECLARATION CONTEXT ]
@ -174,7 +174,7 @@ expected the name of this new context item
source_file: BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON YEAR source_file: BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR COLON YEAR
## ##
## Ends in an error in state: 314. ## Ends in an error in state: 318.
## ##
## code_item -> DECLARATION SCOPE constructor COLON . nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ] ## code_item -> DECLARATION SCOPE constructor COLON . nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ]
## ##
@ -186,7 +186,7 @@ expected a context item introduced by "context"
source_file: BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR YEAR source_file: BEGIN_CODE DECLARATION SCOPE CONSTRUCTOR YEAR
## ##
## Ends in an error in state: 313. ## Ends in an error in state: 317.
## ##
## code_item -> DECLARATION SCOPE constructor . COLON nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ] ## code_item -> DECLARATION SCOPE constructor . COLON nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ]
## ##
@ -198,7 +198,7 @@ expected a colon followed by the list of context items of this scope
source_file: BEGIN_CODE DECLARATION SCOPE YEAR source_file: BEGIN_CODE DECLARATION SCOPE YEAR
## ##
## Ends in an error in state: 312. ## Ends in an error in state: 316.
## ##
## code_item -> DECLARATION SCOPE . constructor COLON nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ] ## code_item -> DECLARATION SCOPE . constructor COLON nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ]
## ##
@ -210,7 +210,7 @@ expected the name of the scope you are declaring
source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT DEPENDS COLLECTION YEAR source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT DEPENDS COLLECTION YEAR
## ##
## Ends in an error in state: 299. ## Ends in an error in state: 303.
## ##
## typ -> collection_marked . typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONTEXT CONDITION ALT ] ## typ -> collection_marked . typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONTEXT CONDITION ALT ]
## ##
@ -222,7 +222,7 @@ expected a new struct data, or another declaration or scope use
source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT DEPENDS TEXT YEAR source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT DEPENDS TEXT YEAR
## ##
## Ends in an error in state: 307. ## Ends in an error in state: 311.
## ##
## list(struct_scope) -> struct_scope . list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## list(struct_scope) -> struct_scope . list(struct_scope) [ SCOPE END_CODE DECLARATION ]
## ##
@ -234,7 +234,7 @@ expected a new struct data, or another declaration or scope use
source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT DEPENDS YEAR source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT DEPENDS YEAR
## ##
## Ends in an error in state: 303. ## Ends in an error in state: 307.
## ##
## struct_scope_func -> DEPENDS . typ [ SCOPE END_CODE DECLARATION DATA CONTEXT CONDITION ] ## struct_scope_func -> DEPENDS . typ [ SCOPE END_CODE DECLARATION DATA CONTEXT CONDITION ]
## ##
@ -246,7 +246,7 @@ expected the type of the parameter of this struct data function
source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT YEAR source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION IDENT YEAR
## ##
## Ends in an error in state: 302. ## Ends in an error in state: 306.
## ##
## struct_scope -> struct_scope_base . option(struct_scope_func) [ SCOPE END_CODE DECLARATION DATA CONDITION ] ## struct_scope -> struct_scope_base . option(struct_scope_func) [ SCOPE END_CODE DECLARATION DATA CONDITION ]
## ##
@ -258,7 +258,7 @@ expected a new struct data, or another declaration or scope use
source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION YEAR source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON CONDITION YEAR
## ##
## Ends in an error in state: 309. ## Ends in an error in state: 313.
## ##
## struct_scope_base -> condition_pos . ident [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ] ## struct_scope_base -> condition_pos . ident [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ]
## ##
@ -270,7 +270,7 @@ expected the name of this struct condition
source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON DATA IDENT CONTENT YEAR source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON DATA IDENT CONTENT YEAR
## ##
## Ends in an error in state: 295. ## Ends in an error in state: 299.
## ##
## struct_scope_base -> DATA ident CONTENT . typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ] ## struct_scope_base -> DATA ident CONTENT . typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ]
## ##
@ -282,7 +282,7 @@ expected the type of this struct data
source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON DATA IDENT YEAR source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON DATA IDENT YEAR
## ##
## Ends in an error in state: 294. ## Ends in an error in state: 298.
## ##
## struct_scope_base -> DATA ident . CONTENT typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ] ## struct_scope_base -> DATA ident . CONTENT typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ]
## ##
@ -294,7 +294,7 @@ expected the type of this struct data, introduced by the content keyword
source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON DATA YEAR source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON DATA YEAR
## ##
## Ends in an error in state: 293. ## Ends in an error in state: 297.
## ##
## struct_scope_base -> DATA . ident CONTENT typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ] ## struct_scope_base -> DATA . ident CONTENT typ [ SCOPE END_CODE DEPENDS DECLARATION DATA CONDITION ]
## ##
@ -306,7 +306,7 @@ expected the name of this struct data
source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON YEAR source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR COLON YEAR
## ##
## Ends in an error in state: 292. ## Ends in an error in state: 296.
## ##
## code_item -> DECLARATION STRUCT constructor COLON . list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## code_item -> DECLARATION STRUCT constructor COLON . list(struct_scope) [ SCOPE END_CODE DECLARATION ]
## ##
@ -318,7 +318,7 @@ expected struct data or condition
source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR YEAR source_file: BEGIN_CODE DECLARATION STRUCT CONSTRUCTOR YEAR
## ##
## Ends in an error in state: 291. ## Ends in an error in state: 295.
## ##
## code_item -> DECLARATION STRUCT constructor . COLON list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## code_item -> DECLARATION STRUCT constructor . COLON list(struct_scope) [ SCOPE END_CODE DECLARATION ]
## ##
@ -330,7 +330,7 @@ expected a colon
source_file: BEGIN_CODE DECLARATION STRUCT YEAR source_file: BEGIN_CODE DECLARATION STRUCT YEAR
## ##
## Ends in an error in state: 290. ## Ends in an error in state: 294.
## ##
## code_item -> DECLARATION STRUCT . constructor COLON list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## code_item -> DECLARATION STRUCT . constructor COLON list(struct_scope) [ SCOPE END_CODE DECLARATION ]
## ##
@ -342,7 +342,7 @@ expected the struct name
source_file: BEGIN_CODE DECLARATION YEAR source_file: BEGIN_CODE DECLARATION YEAR
## ##
## Ends in an error in state: 289. ## Ends in an error in state: 293.
## ##
## code_item -> DECLARATION . STRUCT constructor COLON list(struct_scope) [ SCOPE END_CODE DECLARATION ] ## 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 ] ## code_item -> DECLARATION . SCOPE constructor COLON nonempty_list(scope_decl_item) [ SCOPE END_CODE DECLARATION ]
@ -356,7 +356,7 @@ expected the kind of the declaration (struct, scope or enum)
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION CARDINAL THEN source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION CARDINAL THEN
## ##
## Ends in an error in state: 259. ## Ends in an error in state: 263.
## ##
## nonempty_list(scope_item) -> 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 ] ## nonempty_list(scope_item) -> scope_item . nonempty_list(scope_item) [ SCOPE END_CODE DECLARATION ]
@ -373,18 +373,20 @@ source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION CARDINAL THEN
## In state 129, spurious reduction of production mult_expression -> base_expression ## In state 129, spurious reduction of production mult_expression -> base_expression
## In state 115, spurious reduction of production sum_expression -> mult_expression ## In state 115, spurious reduction of production sum_expression -> mult_expression
## In state 139, spurious reduction of production compare_expression -> sum_expression ## In state 139, spurious reduction of production compare_expression -> sum_expression
## In state 167, spurious reduction of production logical_expression -> compare_expression ## In state 166, spurious reduction of production logical_atom -> compare_expression
## In state 196, spurious reduction of production expression -> logical_expression ## In state 171, spurious reduction of production logical_or_expression -> logical_atom
## In state 253, spurious reduction of production assertion_base -> expression ## In state 167, spurious reduction of production logical_expression -> logical_or_expression
## In state 254, spurious reduction of production assertion -> option(condition_consequence) assertion_base ## In state 200, spurious reduction of production expression -> logical_expression
## In state 258, spurious reduction of production scope_item -> ASSERTION assertion ## In state 257, spurious reduction of production assertion_base -> expression
## In state 258, spurious reduction of production assertion -> option(condition_consequence) assertion_base
## In state 262, spurious reduction of production scope_item -> ASSERTION assertion
## ##
expected a new scope use item expected a new scope use item
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION FIXED IDENT BY YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION FIXED IDENT BY YEAR
## ##
## Ends in an error in state: 250. ## Ends in an error in state: 254.
## ##
## assertion -> FIXED qident BY . ident [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## assertion -> FIXED qident BY . ident [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
## ##
@ -396,7 +398,7 @@ expected the legislative text by which the value of the variable is fixed
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION FIXED IDENT WITH_V source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION FIXED IDENT WITH_V
## ##
## Ends in an error in state: 249. ## Ends in an error in state: 253.
## ##
## assertion -> FIXED qident . BY ident [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## assertion -> FIXED qident . BY ident [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
## ##
@ -407,15 +409,15 @@ source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION FIXED IDENT WITH_V
## This implies that, although the LR(1) items shown above provide an ## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they ## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next). ## may provide an INCOMPLETE view of the future (what was expected next).
## In state 243, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident ## In state 247, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident
## In state 235, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) ## In state 239, spurious reduction of production qident -> separated_nonempty_list(DOT,ident)
## ##
expected the legislative text by which the value of the variable is fixed expected the legislative text by which the value of the variable is fixed
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION FIXED YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION FIXED YEAR
## ##
## Ends in an error in state: 248. ## Ends in an error in state: 252.
## ##
## assertion -> FIXED . qident BY ident [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## assertion -> FIXED . qident BY ident [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
## ##
@ -425,21 +427,10 @@ source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION FIXED YEAR
expected the name of the variable that should be fixed expected the name of the variable that should be fixed
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION UNDER_CONDITION TRUE CONSEQUENCE BY
##
## Ends in an error in state: 252.
##
## assertion -> option(condition_consequence) . assertion_base [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
##
## The known suffix of the stack is as follows:
## option(condition_consequence)
##
expected an expression for this definition under condition
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION UNDER_CONDITION TRUE THEN source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION UNDER_CONDITION TRUE THEN
## ##
## Ends in an error in state: 256. ## Ends in an error in state: 260.
## ##
## condition_consequence -> condition . CONSEQUENCE [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_LITERAL IF IDENT FOR FILTER FILLED FALSE EXISTS DEFINED_AS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## condition_consequence -> condition . CONSEQUENCE [ VERTICAL TRUE SUM NOT MONEY_AMOUNT MINUSMONEY MINUSDURATION MINUSDEC MINUS MINIMUM MAXIMUM MATCH MAP LSQUARE LPAREN INT_LITERAL IF IDENT FOR FILTER FILLED FALSE EXISTS DEFINED_AS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ]
## ##
@ -455,16 +446,18 @@ source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION UNDER_CONDITION TRUE T
## In state 129, spurious reduction of production mult_expression -> base_expression ## In state 129, spurious reduction of production mult_expression -> base_expression
## In state 115, spurious reduction of production sum_expression -> mult_expression ## In state 115, spurious reduction of production sum_expression -> mult_expression
## In state 139, spurious reduction of production compare_expression -> sum_expression ## In state 139, spurious reduction of production compare_expression -> sum_expression
## In state 167, spurious reduction of production logical_expression -> compare_expression ## In state 166, spurious reduction of production logical_atom -> compare_expression
## In state 196, spurious reduction of production expression -> logical_expression ## In state 171, spurious reduction of production logical_or_expression -> logical_atom
## In state 247, spurious reduction of production condition -> UNDER_CONDITION expression ## In state 167, spurious reduction of production logical_expression -> logical_or_expression
## In state 200, spurious reduction of production expression -> logical_expression
## In state 251, spurious reduction of production condition -> UNDER_CONDITION expression
## ##
expected a consequence for this definition under condition expected a consequence for this definition under condition
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION UNDER_CONDITION YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION UNDER_CONDITION YEAR
## ##
## Ends in an error in state: 246. ## Ends in an error in state: 250.
## ##
## condition -> UNDER_CONDITION . expression [ CONSEQUENCE ] ## condition -> UNDER_CONDITION . expression [ CONSEQUENCE ]
## ##
@ -476,7 +469,7 @@ expected an expression for this condition
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES IDENT UNDER_CONDITION source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES IDENT UNDER_CONDITION
## ##
## Ends in an error in state: 236. ## Ends in an error in state: 240.
## ##
## assertion -> VARIES qident . WITH_V base_expression option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## assertion -> VARIES qident . WITH_V base_expression option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
## ##
@ -487,15 +480,15 @@ source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES IDENT UNDER_CON
## This implies that, although the LR(1) items shown above provide an ## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they ## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next). ## may provide an INCOMPLETE view of the future (what was expected next).
## In state 243, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident ## In state 247, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident
## In state 235, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) ## In state 239, spurious reduction of production qident -> separated_nonempty_list(DOT,ident)
## ##
expected an indication about what this variable varies with expected an indication about what this variable varies with
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES IDENT WITH_V TRUE XOR source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES IDENT WITH_V TRUE XOR
## ##
## Ends in an error in state: 238. ## Ends in an error in state: 242.
## ##
## assertion -> VARIES qident WITH_V base_expression . option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## assertion -> VARIES qident WITH_V base_expression . option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
## ##
@ -514,7 +507,7 @@ expected an indication about the variation sense of the variable, or a new scope
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES IDENT WITH_V YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES IDENT WITH_V YEAR
## ##
## Ends in an error in state: 237. ## Ends in an error in state: 241.
## ##
## assertion -> VARIES qident WITH_V . base_expression option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## assertion -> VARIES qident WITH_V . base_expression option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
## ##
@ -526,7 +519,7 @@ the variable varies with an expression that was expected here
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION VARIES YEAR
## ##
## Ends in an error in state: 234. ## Ends in an error in state: 238.
## ##
## assertion -> VARIES . qident WITH_V base_expression option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## assertion -> VARIES . qident WITH_V base_expression option(variation_type) [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
## ##
@ -538,7 +531,7 @@ expecting the name of the varying variable
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION YEAR
## ##
## Ends in an error in state: 233. ## Ends in an error in state: 237.
## ##
## scope_item -> ASSERTION . assertion [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## scope_item -> ASSERTION . assertion [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
## ##
@ -550,7 +543,7 @@ expected an expression that shoud be asserted during execution
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT DEFINED_AS YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT DEFINED_AS YEAR
## ##
## Ends in an error in state: 282. ## Ends in an error in state: 286.
## ##
## 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 ] ## 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 ]
## ##
@ -562,7 +555,7 @@ expected an expression for the definition
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT OF IDENT DECREASING source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT OF IDENT DECREASING
## ##
## Ends in an error in state: 280. ## Ends in an error in state: 284.
## ##
## 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 ] ## 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 ]
## ##
@ -572,21 +565,10 @@ source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT OF IDENT DECREA
expected a expression for defining this function, introduced by the defined as keyword expected a expression for defining this function, introduced by the defined as keyword
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT UNDER_CONDITION CARDINAL CONSEQUENCE DECREASING
##
## Ends in an error in state: 281.
##
## 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 ]
##
## The known suffix of the stack is as follows:
## option(label) option(exception_to) DEFINITION qident option(definition_parameters) option(condition_consequence)
##
expected an expression for the consequence of this definition under condition
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT WITH_V source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT WITH_V
## ##
## Ends in an error in state: 279. ## Ends in an error in state: 283.
## ##
## 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 ] ## 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 ]
## ##
@ -597,15 +579,15 @@ source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION IDENT WITH_V
## This implies that, although the LR(1) items shown above provide an ## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they ## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next). ## may provide an INCOMPLETE view of the future (what was expected next).
## In state 243, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident ## In state 247, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident
## In state 235, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) ## In state 239, spurious reduction of production qident -> separated_nonempty_list(DOT,ident)
## ##
expected the defined as keyword to introduce the definition of this variable expected the defined as keyword to introduce the definition of this variable
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON DEFINITION YEAR
## ##
## Ends in an error in state: 278. ## Ends in an error in state: 282.
## ##
## 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 ] ## 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 ]
## ##
@ -617,7 +599,7 @@ expected the name of the variable you want to define
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON EXCEPTION IDENT YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON EXCEPTION IDENT YEAR
## ##
## Ends in an error in state: 265. ## Ends in an error in state: 269.
## ##
## 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 ] ## 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 ] ## rule -> option(label) option(exception_to) . RULE rule_expr option(condition_consequence) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
@ -630,7 +612,7 @@ expected a rule or a definition after the exception declaration
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON EXCEPTION YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON EXCEPTION YEAR
## ##
## Ends in an error in state: 262. ## Ends in an error in state: 266.
## ##
## exception_to -> EXCEPTION . option(ident) [ RULE DEFINITION ] ## exception_to -> EXCEPTION . option(ident) [ RULE DEFINITION ]
## ##
@ -642,7 +624,7 @@ expected the label to which the exception is referring back
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON LABEL IDENT DEFINED_AS source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON LABEL IDENT DEFINED_AS
## ##
## Ends in an error in state: 261. ## Ends in an error in state: 265.
## ##
## 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 ] ## 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 ] ## rule -> option(label) . option(exception_to) RULE rule_expr option(condition_consequence) rule_consequence [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
@ -655,7 +637,7 @@ expected a rule or a definition after the label declaration
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON LABEL YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON LABEL YEAR
## ##
## Ends in an error in state: 231. ## Ends in an error in state: 235.
## ##
## label -> LABEL . ident [ RULE EXCEPTION DEFINITION ] ## label -> LABEL . ident [ RULE EXCEPTION DEFINITION ]
## ##
@ -667,7 +649,7 @@ expected the name of the label
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT DOT YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT DOT YEAR
## ##
## Ends in an error in state: 244. ## Ends in an error in state: 248.
## ##
## separated_nonempty_list(DOT,ident) -> ident DOT . separated_nonempty_list(DOT,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 ]
## ##
@ -679,7 +661,7 @@ expected a struct field or a sub-scope context item after the dot
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT NOT FALSE source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT NOT FALSE
## ##
## Ends in an error in state: 271. ## Ends in an error in state: 275.
## ##
## rule_consequence -> option(NOT) . FILLED [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ] ## rule_consequence -> option(NOT) . FILLED [ SCOPE RULE LABEL EXCEPTION END_CODE DEFINITION DECLARATION ASSERTION ]
## ##
@ -691,7 +673,7 @@ expected the filled keyword the this rule
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT OF IDENT YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT OF IDENT YEAR
## ##
## Ends in an error in state: 267. ## Ends in an error in state: 271.
## ##
## rule -> option(label) option(exception_to) RULE rule_expr . option(condition_consequence) rule_consequence [ 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 +685,7 @@ expected the expression of the rule
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT OF YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT OF YEAR
## ##
## Ends in an error in state: 274. ## Ends in an error in state: 278.
## ##
## definition_parameters -> OF . ident [ UNDER_CONDITION NOT FILLED DEFINED_AS ] ## definition_parameters -> OF . ident [ UNDER_CONDITION NOT FILLED DEFINED_AS ]
## ##
@ -713,21 +695,10 @@ source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT OF YEAR
expected the name of the parameter for this dependent variable expected the name of the parameter for this dependent variable
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT UNDER_CONDITION CARDINAL CONSEQUENCE FALSE
##
## Ends in an error in state: 268.
##
## rule -> option(label) option(exception_to) RULE rule_expr 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)
##
expected filled or not filled for a rule consequence
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT WITH_V source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT WITH_V
## ##
## Ends in an error in state: 273. ## Ends in an error in state: 277.
## ##
## rule_expr -> qident . option(definition_parameters) [ UNDER_CONDITION NOT FILLED ] ## rule_expr -> qident . option(definition_parameters) [ UNDER_CONDITION NOT FILLED ]
## ##
@ -738,15 +709,15 @@ source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT WITH_V
## This implies that, although the LR(1) items shown above provide an ## This implies that, although the LR(1) items shown above provide an
## accurate view of the past (what has been recognized so far), they ## accurate view of the past (what has been recognized so far), they
## may provide an INCOMPLETE view of the future (what was expected next). ## may provide an INCOMPLETE view of the future (what was expected next).
## In state 243, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident ## In state 247, spurious reduction of production separated_nonempty_list(DOT,ident) -> ident
## In state 235, spurious reduction of production qident -> separated_nonempty_list(DOT,ident) ## In state 239, spurious reduction of production qident -> separated_nonempty_list(DOT,ident)
## ##
expected a condition or a consequence for this rule expected a condition or a consequence for this rule
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE IDENT YEAR
## ##
## Ends in an error in state: 243. ## Ends in an error in state: 247.
## ##
## separated_nonempty_list(DOT,ident) -> ident . [ WITH_V UNDER_CONDITION OF NOT FILLED DEFINED_AS BY ] ## 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 ] ## separated_nonempty_list(DOT,ident) -> ident . DOT separated_nonempty_list(DOT,ident) [ WITH_V UNDER_CONDITION OF NOT FILLED DEFINED_AS BY ]
@ -759,7 +730,7 @@ expected a condition or a consequence for this rule, or the rest of the variable
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON RULE YEAR
## ##
## Ends in an error in state: 266. ## Ends in an error in state: 270.
## ##
## rule -> option(label) option(exception_to) RULE . rule_expr option(condition_consequence) rule_consequence [ 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 ]
## ##
@ -771,7 +742,7 @@ expected the name of the variable subject to the rule
source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR COLON YEAR
## ##
## Ends in an error in state: 230. ## Ends in an error in state: 234.
## ##
## code_item -> SCOPE constructor option(scope_use_condition) COLON . nonempty_list(scope_item) [ SCOPE END_CODE DECLARATION ] ## code_item -> SCOPE constructor option(scope_use_condition) COLON . nonempty_list(scope_item) [ SCOPE END_CODE DECLARATION ]
## ##
@ -796,7 +767,7 @@ expected the keyword following cardinal to compute the number of elements in a s
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR CONTENT TRUE YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR CONTENT TRUE YEAR
## ##
## Ends in an error in state: 178. ## Ends in an error in state: 182.
## ##
## enum_inject_content -> CONTENT small_expression . [ XOR WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSPLUS 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 DIVDURATION DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## enum_inject_content -> CONTENT small_expression . [ XOR WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSPLUS 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 DIVDURATION DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## small_expression -> small_expression . DOT option(terminated(constructor,DOT)) ident [ XOR WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSPLUS 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 DIVDURATION DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## small_expression -> small_expression . DOT option(terminated(constructor,DOT)) ident [ XOR WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSPLUS 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 DIVDURATION DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
@ -809,7 +780,7 @@ the expression for the content of the enum case is already well-formed, expected
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR CONTENT YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR CONTENT YEAR
## ##
## Ends in an error in state: 177. ## Ends in an error in state: 181.
## ##
## enum_inject_content -> CONTENT . small_expression [ XOR WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSPLUS 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 DIVDURATION DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## enum_inject_content -> CONTENT . small_expression [ XOR WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSPLUS 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 DIVDURATION DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## ##
@ -821,7 +792,7 @@ expected an expression for the content of this enum case
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR DOT CONSTRUCTOR ALL source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR DOT CONSTRUCTOR ALL
## ##
## Ends in an error in state: 176. ## Ends in an error in state: 180.
## ##
## struct_or_enum_inject -> constructor option(preceded(DOT,constructor)) . option(enum_inject_content) [ XOR WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSPLUS 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 DIVDURATION DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## struct_or_enum_inject -> constructor option(preceded(DOT,constructor)) . option(enum_inject_content) [ XOR WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSPLUS 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 DIVDURATION DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## ##
@ -843,17 +814,6 @@ source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR DOT YEAR
expected the rest of the path after the dot expected the rest of the path after the dot
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR LBRACKET ALT IDENT COLON CARDINAL ALT YEAR
##
## Ends in an error in state: 82.
##
## separated_nonempty_list(ALT,struct_content_field) -> struct_content_field ALT . separated_nonempty_list(ALT,struct_content_field) [ RBRACKET ]
##
## The known suffix of the stack is as follows:
## struct_content_field ALT
##
expected the name of the structure field
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR LBRACKET ALT IDENT COLON CARDINAL THEN source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR LBRACKET ALT IDENT COLON CARDINAL THEN
## ##
@ -874,8 +834,10 @@ source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR LBRACKET A
## In state 129, spurious reduction of production mult_expression -> base_expression ## In state 129, spurious reduction of production mult_expression -> base_expression
## In state 115, spurious reduction of production sum_expression -> mult_expression ## In state 115, spurious reduction of production sum_expression -> mult_expression
## In state 139, spurious reduction of production compare_expression -> sum_expression ## In state 139, spurious reduction of production compare_expression -> sum_expression
## In state 167, spurious reduction of production logical_expression -> compare_expression ## In state 166, spurious reduction of production logical_atom -> compare_expression
## In state 166, spurious reduction of production struct_content_field -> ident COLON logical_expression ## In state 171, spurious reduction of production logical_or_expression -> logical_atom
## In state 167, spurious reduction of production logical_expression -> logical_or_expression
## In state 176, spurious reduction of production struct_content_field -> ident COLON logical_expression
## ##
expected another structure field or the closing bracket expected another structure field or the closing bracket
@ -943,7 +905,7 @@ expected a payload for the enum case constructor, or the rest of the expression
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MAXIMUM TEXT INIT YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MAXIMUM TEXT INIT YEAR
## ##
## Ends in an error in state: 183. ## Ends in an error in state: 187.
## ##
## aggregate_func -> CONTENT MAXIMUM typ_base INIT . primitive_expression [ FOR ] ## aggregate_func -> CONTENT MAXIMUM typ_base INIT . primitive_expression [ FOR ]
## ##
@ -955,7 +917,7 @@ expected the initial expression for the maximum
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MAXIMUM TEXT YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MAXIMUM TEXT YEAR
## ##
## Ends in an error in state: 182. ## Ends in an error in state: 186.
## ##
## aggregate_func -> CONTENT MAXIMUM typ_base . INIT primitive_expression [ FOR ] ## aggregate_func -> CONTENT MAXIMUM typ_base . INIT primitive_expression [ FOR ]
## ##
@ -967,7 +929,7 @@ expected the "initial" keyword introducing the initial expression for the maximu
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MAXIMUM YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONTENT MAXIMUM YEAR
## ##
## Ends in an error in state: 181. ## Ends in an error in state: 185.
## ##
## aggregate_func -> CONTENT MAXIMUM . typ_base INIT primitive_expression [ FOR ] ## aggregate_func -> CONTENT MAXIMUM . typ_base INIT primitive_expression [ FOR ]
## ##
@ -1028,7 +990,7 @@ this is the start of an arg-maximum or arg-minimum expression
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN CARDINAL SUCH THAT YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN CARDINAL SUCH THAT YEAR
## ##
## Ends in an error in state: 204. ## Ends in an error in state: 208.
## ##
## expression -> exists_prefix . expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## expression -> exists_prefix . expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ]
## ##
@ -1040,7 +1002,7 @@ expected an expression for the existential test
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN TRUE SUCH YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN TRUE SUCH YEAR
## ##
## Ends in an error in state: 210. ## Ends in an error in state: 214.
## ##
## 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_LITERAL IF IDENT FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## 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_LITERAL IF IDENT FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ]
## ##
@ -1052,7 +1014,7 @@ expected a keyword to complete the "such that" construction
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN TRUE XOR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN TRUE XOR
## ##
## Ends in an error in state: 209. ## Ends in an error in state: 213.
## ##
## 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_LITERAL IF IDENT FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## 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_LITERAL IF IDENT FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ]
## ##
@ -1070,7 +1032,7 @@ expected a keyword to form the "such that" expression for the existential test
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN YEAR
## ##
## Ends in an error in state: 208. ## Ends in an error in state: 212.
## ##
## 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_LITERAL IF IDENT FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## 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_LITERAL IF IDENT FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ]
## ##
@ -1082,7 +1044,7 @@ expected an expression that designates the set subject to the existential test
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT YEAR
## ##
## Ends in an error in state: 207. ## Ends in an error in state: 211.
## ##
## 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_LITERAL IF IDENT FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## 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_LITERAL IF IDENT FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ]
## ##
@ -1094,7 +1056,7 @@ expected the "in" keyword to continue this existential test
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS YEAR
## ##
## Ends in an error in state: 206. ## Ends in an error in state: 210.
## ##
## 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_LITERAL IF IDENT FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## 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_LITERAL IF IDENT FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ]
## ##
@ -1106,7 +1068,7 @@ expected an identifier that will designate the existential witness for the test
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT IN CARDINAL WE_HAVE YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT IN CARDINAL WE_HAVE YEAR
## ##
## Ends in an error in state: 197. ## Ends in an error in state: 201.
## ##
## expression -> forall_prefix . expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## expression -> forall_prefix . expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ]
## ##
@ -1118,7 +1080,7 @@ expected an expression for the universal test
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT IN TRUE XOR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT IN TRUE XOR
## ##
## Ends in an error in state: 201. ## Ends in an error in state: 205.
## ##
## 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_LITERAL IF IDENT FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## 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_LITERAL IF IDENT FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ]
## ##
@ -1136,7 +1098,7 @@ expected the "we have" keyword for this universal test
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT IN YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT IN YEAR
## ##
## Ends in an error in state: 200. ## Ends in an error in state: 204.
## ##
## 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_LITERAL IF IDENT FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## 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_LITERAL IF IDENT FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ]
## ##
@ -1148,7 +1110,7 @@ expected the expression designating the set on which to perform the universal te
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT YEAR
## ##
## Ends in an error in state: 199. ## Ends in an error in state: 203.
## ##
## 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_LITERAL IF IDENT FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## 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_LITERAL IF IDENT FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ]
## ##
@ -1160,7 +1122,7 @@ expected the "in" keyword for the rest of the universal test
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL YEAR
## ##
## Ends in an error in state: 198. ## Ends in an error in state: 202.
## ##
## 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_LITERAL IF IDENT FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ] ## 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_LITERAL IF IDENT FOR FILTER FALSE EXISTS DECIMAL_LITERAL CONTENT CONSTRUCTOR CARDINAL ]
## ##
@ -1172,7 +1134,7 @@ expected an identifier for the bound variable of the universal test
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR YEAR
## ##
## Ends in an error in state: 193. ## Ends in an error in state: 197.
## ##
## for_all_marked -> FOR . ALL [ IDENT ] ## for_all_marked -> FOR . ALL [ IDENT ]
## ##
@ -1184,7 +1146,7 @@ expected the "all" keyword to mean the "for all" construction of the universal t
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE SEMICOLON source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE SEMICOLON
## ##
## Ends in an error in state: 212. ## Ends in an error in state: 216.
## ##
## expression -> IF expression . THEN expression ELSE base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## expression -> IF expression . THEN expression ELSE base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ]
## ##
@ -1200,63 +1162,20 @@ source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE SEMICOLON
## In state 129, spurious reduction of production mult_expression -> base_expression ## In state 129, spurious reduction of production mult_expression -> base_expression
## In state 115, spurious reduction of production sum_expression -> mult_expression ## In state 115, spurious reduction of production sum_expression -> mult_expression
## In state 139, spurious reduction of production compare_expression -> sum_expression ## In state 139, spurious reduction of production compare_expression -> sum_expression
## In state 167, spurious reduction of production logical_expression -> compare_expression ## In state 166, spurious reduction of production logical_atom -> compare_expression
## In state 196, spurious reduction of production expression -> logical_expression ## In state 171, spurious reduction of production logical_or_expression -> logical_atom
## In state 167, spurious reduction of production logical_expression -> logical_or_expression
## In state 200, spurious reduction of production expression -> logical_expression
## ##
expected the "then" keyword as the conditional expression is complete expected the "then" keyword as the conditional expression is complete
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE THEN TRUE ELSE YEAR
##
## Ends in an error in state: 215.
##
## expression -> IF expression THEN expression ELSE . base_expression [ 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:
## IF expression THEN expression ELSE
##
expected an expression for the "else" branch of this conditional construction
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE THEN TRUE THEN
##
## Ends in an error in state: 214.
##
## expression -> IF expression THEN expression . ELSE base_expression [ 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:
## IF expression THEN expression
##
## 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 51, spurious reduction of production primitive_expression -> small_expression
## In state 89, spurious reduction of production base_expression -> primitive_expression
## In state 129, spurious reduction of production mult_expression -> base_expression
## In state 115, spurious reduction of production sum_expression -> mult_expression
## In state 139, spurious reduction of production compare_expression -> sum_expression
## In state 167, spurious reduction of production logical_expression -> compare_expression
## In state 196, spurious reduction of production expression -> logical_expression
##
expected the "else" branch of this conditional expression as the "then" branch is complete
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE THEN YEAR
##
## Ends in an error in state: 213.
##
## expression -> IF expression THEN . expression ELSE base_expression [ 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:
## IF expression THEN
##
expected an expression the for the "then" branch of the conditiona
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF YEAR
## ##
## Ends in an error in state: 192. ## Ends in an error in state: 196.
## ##
## expression -> IF . expression THEN expression ELSE base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## expression -> IF . expression THEN expression ELSE base_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ]
## ##
@ -1280,7 +1199,7 @@ expected a unit for this literal, or a valid operator to complete the expression
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION LPAREN TRUE THEN source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION LPAREN TRUE THEN
## ##
## Ends in an error in state: 217. ## Ends in an error in state: 221.
## ##
## atomic_expression -> LPAREN expression . RPAREN [ XOR WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSPLUS 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 DIVDURATION DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ] ## atomic_expression -> LPAREN expression . RPAREN [ XOR WITH WE_HAVE THEN SUCH SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET PLUSPLUS 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 DIVDURATION DIVDEC DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## ##
@ -1296,8 +1215,10 @@ source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION LPAREN TRUE THEN
## In state 129, spurious reduction of production mult_expression -> base_expression ## In state 129, spurious reduction of production mult_expression -> base_expression
## In state 115, spurious reduction of production sum_expression -> mult_expression ## In state 115, spurious reduction of production sum_expression -> mult_expression
## In state 139, spurious reduction of production compare_expression -> sum_expression ## In state 139, spurious reduction of production compare_expression -> sum_expression
## In state 167, spurious reduction of production logical_expression -> compare_expression ## In state 166, spurious reduction of production logical_atom -> compare_expression
## In state 196, spurious reduction of production expression -> logical_expression ## In state 171, spurious reduction of production logical_or_expression -> logical_atom
## In state 167, spurious reduction of production logical_expression -> logical_or_expression
## In state 200, spurious reduction of production expression -> logical_expression
## ##
unmatched parenthesis that should have been closed by here unmatched parenthesis that should have been closed by here
@ -1314,21 +1235,10 @@ source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION LPAREN YEAR
expected an expression inside the parenthesis expected an expression inside the parenthesis
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION LSQUARE TRUE SEMICOLON YEAR
##
## Ends in an error in state: 224.
##
## separated_nonempty_list(SEMICOLON,expression) -> expression SEMICOLON . separated_nonempty_list(SEMICOLON,expression) [ RSQUARE ]
##
## The known suffix of the stack is as follows:
## expression SEMICOLON
##
expected another element of the collection
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION LSQUARE TRUE THEN source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION LSQUARE TRUE THEN
## ##
## Ends in an error in state: 223. ## Ends in an error in state: 227.
## ##
## separated_nonempty_list(SEMICOLON,expression) -> expression . [ RSQUARE ] ## separated_nonempty_list(SEMICOLON,expression) -> expression . [ RSQUARE ]
## separated_nonempty_list(SEMICOLON,expression) -> expression . SEMICOLON separated_nonempty_list(SEMICOLON,expression) [ RSQUARE ] ## separated_nonempty_list(SEMICOLON,expression) -> expression . SEMICOLON separated_nonempty_list(SEMICOLON,expression) [ RSQUARE ]
@ -1345,8 +1255,10 @@ source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION LSQUARE TRUE THEN
## In state 129, spurious reduction of production mult_expression -> base_expression ## In state 129, spurious reduction of production mult_expression -> base_expression
## In state 115, spurious reduction of production sum_expression -> mult_expression ## In state 115, spurious reduction of production sum_expression -> mult_expression
## In state 139, spurious reduction of production compare_expression -> sum_expression ## In state 139, spurious reduction of production compare_expression -> sum_expression
## In state 167, spurious reduction of production logical_expression -> compare_expression ## In state 166, spurious reduction of production logical_atom -> compare_expression
## In state 196, spurious reduction of production expression -> logical_expression ## In state 171, spurious reduction of production logical_or_expression -> logical_atom
## In state 167, spurious reduction of production logical_expression -> logical_or_expression
## In state 200, spurious reduction of production expression -> logical_expression
## ##
expected a semicolon or a right square bracket after the collection element expected a semicolon or a right square bracket after the collection element
@ -1443,7 +1355,7 @@ expected the "for" keyword to introduce the identifier for the map predicate
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT CONSTRUCTOR COLON CARDINAL RBRACKET source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT CONSTRUCTOR COLON CARDINAL RBRACKET
## ##
## Ends in an error in state: 186. ## Ends in an error in state: 190.
## ##
## match_arms -> ALT match_arm . match_arms [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ] ## match_arms -> ALT match_arm . match_arms [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ]
## ##
@ -1459,15 +1371,17 @@ source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT CO
## In state 129, spurious reduction of production mult_expression -> base_expression ## In state 129, spurious reduction of production mult_expression -> base_expression
## In state 115, spurious reduction of production sum_expression -> mult_expression ## In state 115, spurious reduction of production sum_expression -> mult_expression
## In state 139, spurious reduction of production compare_expression -> sum_expression ## In state 139, spurious reduction of production compare_expression -> sum_expression
## In state 167, spurious reduction of production logical_expression -> compare_expression ## In state 166, spurious reduction of production logical_atom -> compare_expression
## In state 190, spurious reduction of production match_arm -> constructor_binding COLON logical_expression ## In state 171, spurious reduction of production logical_or_expression -> logical_atom
## In state 167, spurious reduction of production logical_expression -> logical_or_expression
## In state 194, spurious reduction of production match_arm -> constructor_binding COLON logical_expression
## ##
expected the "with pattern" keyword to complete the pattern matching expression expected the "with pattern" keyword to complete the pattern matching expression
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT CONSTRUCTOR COLON YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT CONSTRUCTOR COLON YEAR
## ##
## Ends in an error in state: 189. ## Ends in an error in state: 193.
## ##
## match_arm -> constructor_binding COLON . logical_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ALT ] ## match_arm -> constructor_binding COLON . logical_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ALT ]
## ##
@ -1479,7 +1393,7 @@ expected a correct expression for this match arm
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT CONSTRUCTOR XOR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION MATCH TRUE WITH ALT CONSTRUCTOR XOR
## ##
## Ends in an error in state: 188. ## Ends in an error in state: 192.
## ##
## match_arm -> constructor_binding . COLON logical_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ALT ] ## match_arm -> constructor_binding . COLON logical_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ALT ]
## ##
@ -1640,7 +1554,7 @@ source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION NOT YEAR
## ##
## Ends in an error in state: 164. ## Ends in an error in state: 164.
## ##
## logical_expression -> logical_unop . compare_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ALT ] ## logical_atom -> logical_unop . logical_atom [ XOR THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET OR LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## ##
## The known suffix of the stack is as follows: ## The known suffix of the stack is as follows:
## logical_unop ## logical_unop
@ -1662,7 +1576,7 @@ expected the "for" keyword to spell the aggregation
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE ASSERTION source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE ASSERTION
## ##
## Ends in an error in state: 229. ## Ends in an error in state: 233.
## ##
## code_item -> SCOPE constructor option(scope_use_condition) . COLON nonempty_list(scope_item) [ SCOPE END_CODE DECLARATION ] ## code_item -> SCOPE constructor option(scope_use_condition) . COLON nonempty_list(scope_item) [ SCOPE END_CODE DECLARATION ]
## ##
@ -1678,10 +1592,12 @@ source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE ASSERTION
## In state 129, spurious reduction of production mult_expression -> base_expression ## In state 129, spurious reduction of production mult_expression -> base_expression
## In state 115, spurious reduction of production sum_expression -> mult_expression ## In state 115, spurious reduction of production sum_expression -> mult_expression
## In state 139, spurious reduction of production compare_expression -> sum_expression ## In state 139, spurious reduction of production compare_expression -> sum_expression
## In state 167, spurious reduction of production logical_expression -> compare_expression ## In state 166, spurious reduction of production logical_atom -> compare_expression
## In state 196, spurious reduction of production expression -> logical_expression ## In state 171, spurious reduction of production logical_or_expression -> logical_atom
## In state 227, spurious reduction of production scope_use_condition -> UNDER_CONDITION expression ## In state 167, spurious reduction of production logical_expression -> logical_or_expression
## In state 228, spurious reduction of production option(scope_use_condition) -> scope_use_condition ## In state 200, spurious reduction of production expression -> logical_expression
## In state 231, spurious reduction of production scope_use_condition -> UNDER_CONDITION expression
## In state 232, spurious reduction of production option(scope_use_condition) -> scope_use_condition
## ##
expected a colon after the scope use precondition expected a colon after the scope use precondition
@ -1900,12 +1816,12 @@ source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE WITH YEAR
source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE XOR YEAR source_file: BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE XOR YEAR
## ##
## Ends in an error in state: 171. ## Ends in an error in state: 174.
## ##
## 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 ] ## logical_or_expression -> logical_atom logical_or_op . logical_or_expression [ THEN SEMICOLON SCOPE RULE RSQUARE RPAREN RBRACKET LABEL EXCEPTION END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## ##
## The known suffix of the stack is as follows: ## The known suffix of the stack is as follows:
## compare_expression logical_op ## logical_atom logical_or_op
## ##
<YOUR SYNTAX ERROR MESSAGE HERE> <YOUR SYNTAX ERROR MESSAGE HERE>
@ -2033,7 +1949,7 @@ expected the name of the scope being used
source_file: BEGIN_CODE YEAR source_file: BEGIN_CODE YEAR
## ##
## Ends in an error in state: 355. ## Ends in an error in state: 359.
## ##
## source_file_item -> BEGIN_CODE . code END_CODE [ LAW_TEXT LAW_HEADING EOF BEGIN_METADATA BEGIN_DIRECTIVE BEGIN_CODE ] ## source_file_item -> BEGIN_CODE . code END_CODE [ LAW_TEXT LAW_HEADING EOF BEGIN_METADATA BEGIN_DIRECTIVE BEGIN_CODE ]
## ##

View File

@ -252,8 +252,10 @@ sum_expression:
} }
| unop = sum_unop e = sum_expression { (Unop (unop, e), Pos.from_lpos $sloc) } | unop = sum_unop e = sum_expression { (Unop (unop, e), Pos.from_lpos $sloc) }
logical_op: logical_and_op:
| AND { (And, Pos.from_lpos $sloc) } | AND { (And, Pos.from_lpos $sloc) }
logical_or_op:
| OR { (Or, Pos.from_lpos $sloc) } | OR { (Or, Pos.from_lpos $sloc) }
| XOR { (Xor, Pos.from_lpos $sloc) } | XOR { (Xor, Pos.from_lpos $sloc) }
@ -266,10 +268,19 @@ compare_expression:
(Binop (binop, e1, e2), Pos.from_lpos $sloc) (Binop (binop, e1, e2), Pos.from_lpos $sloc)
} }
logical_expression: logical_atom:
| e = compare_expression { e } | e = compare_expression { e }
| unop = logical_unop e = compare_expression { (Unop (unop, e), Pos.from_lpos $sloc) } | unop = logical_unop e = logical_atom { (Unop (unop, e), Pos.from_lpos $sloc) }
| e1 = compare_expression binop = logical_op e2 = logical_expression {
logical_or_expression:
| e = logical_atom { e }
| e1 = logical_atom binop = logical_or_op e2 = logical_or_expression {
(Binop (binop, e1, e2), Pos.from_lpos $sloc)
}
logical_expression:
| e = logical_or_expression { e }
| e1 = logical_or_expression binop = logical_and_op e2 = logical_expression {
(Binop (binop, e1, e2), Pos.from_lpos $sloc) (Binop (binop, e1, e2), Pos.from_lpos $sloc)
} }
@ -374,6 +385,9 @@ rule:
rule_parameter = param_applied; rule_parameter = param_applied;
rule_condition = cond; rule_condition = cond;
rule_name = name; rule_name = name;
rule_id = Desugared.Ast.RuleName.fresh
(String.concat "." (List.map (fun i -> Pos.unmark i) (Pos.unmark name)),
Pos.from_lpos $sloc);
rule_consequence = cons; rule_consequence = cons;
}, $sloc) }, $sloc)
} }
@ -402,6 +416,10 @@ definition:
definition_name = name; definition_name = name;
definition_parameter = param; definition_parameter = param;
definition_condition = cond; definition_condition = cond;
definition_id =
Desugared.Ast.RuleName.fresh
(String.concat "." (List.map (fun i -> Pos.unmark i) (Pos.unmark name)),
Pos.from_lpos $sloc);
definition_expr = e; definition_expr = e;
}, $sloc) }, $sloc)
} }

View File

@ -1,6 +1,25 @@
{ lib, fetchFromGitHub, buildDunePackage, ansiterminal, sedlex_2, menhir { lib
, unionfind, bindlib, cmdliner, re, zarith, zarith_stubs_js, ocamlgraph , fetchFromGitHub
, calendar, visitors, benchmark, js_of_ocaml, js_of_ocaml-ppx, camomile, cppo }: , buildDunePackage
, ansiterminal
, sedlex_2
, menhir
, unionfind
, bindlib
, cmdliner
, re
, zarith
, zarith_stubs_js
, ocamlgraph
, calendar
, visitors
, benchmark
, js_of_ocaml
, js_of_ocaml-ppx
, camomile
, cppo
, menhirLib ? null #for nixos-unstable compatibility.
}:
buildDunePackage rec { buildDunePackage rec {
pname = "catala"; pname = "catala";
@ -16,6 +35,7 @@ buildDunePackage rec {
ansiterminal ansiterminal
sedlex_2 sedlex_2
menhir menhir
menhirLib
cmdliner cmdliner
re re
zarith zarith
@ -31,7 +51,7 @@ buildDunePackage rec {
unionfind unionfind
bindlib bindlib
]; ] ++ (if isNull menhirLib then [ ] else [ menhirLib ]);
doCheck = true; doCheck = true;
# patches = [ ./.nix/no-web.patch ]; # patches = [ ./.nix/no-web.patch ];

View File

@ -77,18 +77,19 @@ get the compiler up and working up to `make build`. You can also set up the
syntax highlighting for your editor. syntax highlighting for your editor.
Then, create the directory `examples/foo`. In there, create a master source Then, create the directory `examples/foo`. In there, create a master source
file `foo.catala` that will be the root of your Catala program. file `foo.catala_en` (or `foo.catala_fr`, etc. depending on your language)
You can then start programming in `foo.catala`, or split up your example that will be the root of your Catala program. You can then start programming
into multiple files. In the later case, `foo.catala` must only contain in `foo.catala_en`, or split up your example into multiple files. In the later case,
`foo.catala_en` must only contain
something like this: something like this:
```markdown ```markdown
# Master file # Master file
> Include: bar.catala > Include: bar.catala_en
``` ```
where `examples/bar.catala` is another source file containing code for your where `examples/bar.catala_en` is another source file containing code for your
example. Make sure you start by including some content in the source files, example. Make sure you start by including some content in the source files,
like like
@ -101,7 +102,7 @@ with the following contents:
```Makefile ```Makefile
CATALA_LANG=en # or fr/pl if your source code is in French/Polish CATALA_LANG=en # or fr/pl if your source code is in French/Polish
SRC=foo.catala SRC=foo.catala_en
include ../Makefile.common.mk include ../Makefile.common.mk
``` ```

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@ scp examples/tutorial_en/tutorial_en.html $1/
scp examples/tutoriel_fr/tutoriel_fr.html $1/ scp examples/tutoriel_fr/tutoriel_fr.html $1/
scp grammar.html $1/ scp grammar.html $1/
scp catala.html $1/ scp catala.html $1/
scp _build/default/compiler/catala_web.bc.js $1/playground/ scp _build/default/compiler/catala_web_interpreter.bc.js $1/playground/
scp examples/tutorial_en/tutorial_en.catala_en $1/playground/ scp examples/tutorial_en/tutorial_en.catala_en $1/playground/
scp examples/tutoriel_fr/tutoriel_fr.catala_fr $1/playground/ scp examples/tutoriel_fr/tutoriel_fr.catala_fr $1/playground/
cat examples/allocations_familiales/prologue.catala_fr > allocations_familiales.catala_fr cat examples/allocations_familiales/prologue.catala_fr > allocations_familiales.catala_fr

View File

@ -0,0 +1,9 @@
## Article
```catala
declaration scope TestBool:
context foo content boolean
scope TestBool:
definition foo equals true and not false and false = false
```

View File

@ -0,0 +1,19 @@
## Test
```catala
declaration scope A:
context x content integer
context y content integer
scope A:
label base_x
definition x under condition y >= 0 consequence equals -1
label base_x
definition x under condition y <= 0 consequence equals 1
exception base_x
definition x under condition y = 0 consequence equals 0
definition y equals 0
```

View File

@ -1,4 +1,4 @@
[ERROR] This rule has been declared as an exception to an incorrect label: "base_y" is not a label attached to a definition of "x" [ERROR] This rule has been declared as an exception to an incorrect label: this label is not attached to a definition of "x"
--> test_exception/bad/dangling_exception.catala_en --> test_exception/bad/dangling_exception.catala_en
| |

View File

@ -0,0 +1,17 @@
[ERROR] This label has already been given to another rule, please pick a new one since labels should be unique.
Duplicate label:
--> test_exception/bad/duplicate_labels.catala_en
|
12 | label base_x
| ^^^^^^
+ Test
Existing rule with same label:
--> test_exception/bad/duplicate_labels.catala_en
|
9 | label base_x
| ^^^^^^^^^^^
10 | definition x under condition y >= 0 consequence equals -1
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+

View File

@ -1,41 +1,53 @@
[ERROR] Cyclic dependency detected between exceptions! [ERROR] Cyclic dependency detected between exceptions!
Cycle exception exception_exception_x, declared: Cyclic exception for definition of variable "x", declared here:
--> test_exception/bad/exceptions_cycle.catala_en --> test_exception/bad/exceptions_cycle.catala_en
| |
16 | label exception_exception_x 16 | label exception_exception_x
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
17 | exception exception_x
| ^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^
+ Test 18 | definition x equals 2
| ^^^^^^^^^^^^^^^^^^^^^^
+
Used here in the definition of another cycle exception exception_x: Used here in the definition of another cyclic exception for defining "x":
--> test_exception/bad/exceptions_cycle.catala_en --> test_exception/bad/exceptions_cycle.catala_en
| |
17 | exception exception_x 17 | exception exception_x
| ^^^^^^^^^^^ | ^^^^^^^^^^^
+ Test + Test
Cycle exception exception_x, declared: Cyclic exception for definition of variable "x", declared here:
--> test_exception/bad/exceptions_cycle.catala_en --> test_exception/bad/exceptions_cycle.catala_en
| |
12 | label exception_x 12 | label exception_x
| ^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^
+ Test 13 | exception base_x
| ^^^^^^^^^^^^^^^^
14 | definition x equals 1
| ^^^^^^^^^^^^^^^^^^^^^^
+
Used here in the definition of another cycle exception base_x: Used here in the definition of another cyclic exception for defining "x":
--> test_exception/bad/exceptions_cycle.catala_en --> test_exception/bad/exceptions_cycle.catala_en
| |
13 | exception base_x 13 | exception base_x
| ^^^^^^ | ^^^^^^
+ Test + Test
Cycle exception base_x, declared: Cyclic exception for definition of variable "x", declared here:
--> test_exception/bad/exceptions_cycle.catala_en --> test_exception/bad/exceptions_cycle.catala_en
| |
8 | label base_x 8 | label base_x
| ^^^^^^ | ^^^^^^^^^^^
+ Test 9 | exception exception_exception_x
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10 | definition x equals 0
| ^^^^^^^^^^^^^^^^^^^^^^
+
Used here in the definition of another cycle exception exception_exception_x: Used here in the definition of another cyclic exception for defining "x":
--> test_exception/bad/exceptions_cycle.catala_en --> test_exception/bad/exceptions_cycle.catala_en
| |
9 | exception exception_exception_x 9 | exception exception_exception_x

View File

@ -0,0 +1,17 @@
[ERROR] This label has already been given to another rule, please pick a new one since labels should be unique.
Duplicate label:
--> test_exception/bad/same_label_two_variables.catala_en
|
13 | label base
| ^^^^
+ Test
Existing rule with same label:
--> test_exception/bad/same_label_two_variables.catala_en
|
10 | label base
| ^^^^^^^^^
11 | definition x equals -1
| ^^^^^^^^^^^^^^^^^^^^^^^
+

View File

@ -0,0 +1,20 @@
## Test
```catala
declaration scope A:
context x content integer
context y content integer
context z content integer
scope A:
label base
definition x equals -1
label base
definition y equals 1
exception base
definition x under condition z = 0 consequence equals 0
definition z equals 0
```