Fix content/type lexer issue in nv

This commit is contained in:
Denis Merigoux 2020-12-06 18:09:48 +01:00
parent 15247aa28a
commit 5abb73157f
26 changed files with 201 additions and 294 deletions

View File

@ -78,7 +78,7 @@ let token_list : (string * token) list =
("if", IF);
("then", THEN);
("else", ELSE);
("type", CONTENT);
("content", CONTENT);
("struct", STRUCT);
("option", OPTIONAL);
("assert", ASSERTION);
@ -205,7 +205,7 @@ let rec lex_code (lexbuf : lexbuf) : token =
| "condition" ->
update_acc lexbuf;
CONDITION
| "type" ->
| "content" ->
update_acc lexbuf;
CONTENT
| "struct" ->

View File

@ -418,11 +418,11 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 49, spurious reduction of production primitive_expression -> CARDINAL
## In state 58, spurious reduction of production base_expression -> primitive_expression
## In state 91, spurious reduction of production mult_expression -> base_expression
## In state 86, spurious reduction of production sum_expression -> mult_expression
## In state 78, spurious reduction of production compare_expression -> sum_expression
## In state 110, spurious reduction of production logical_expression -> compare_expression
## In state 117, spurious reduction of production expression -> logical_expression
## In state 90, spurious reduction of production mult_expression -> base_expression
## In state 85, spurious reduction of production sum_expression -> mult_expression
## In state 77, spurious reduction of production compare_expression -> sum_expression
## In state 109, spurious reduction of production logical_expression -> compare_expression
## In state 124, spurious reduction of production expression -> logical_expression
## In state 209, spurious reduction of production assertion_base -> expression
## In state 210, spurious reduction of production assertion -> option(condition_consequence) assertion_base
## In state 211, spurious reduction of production scope_item -> ASSERTION assertion
@ -500,11 +500,11 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR COLON ASSERTION
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 49, spurious reduction of production primitive_expression -> CARDINAL
## In state 58, spurious reduction of production base_expression -> primitive_expression
## In state 91, spurious reduction of production mult_expression -> base_expression
## In state 86, spurious reduction of production sum_expression -> mult_expression
## In state 78, spurious reduction of production compare_expression -> sum_expression
## In state 110, spurious reduction of production logical_expression -> compare_expression
## In state 117, spurious reduction of production expression -> logical_expression
## In state 90, spurious reduction of production mult_expression -> base_expression
## In state 85, spurious reduction of production sum_expression -> mult_expression
## In state 77, spurious reduction of production compare_expression -> sum_expression
## In state 109, spurious reduction of production logical_expression -> compare_expression
## In state 124, spurious reduction of production expression -> logical_expression
## In state 170, spurious reduction of production condition -> UNDER_CONDITION expression
##
@ -784,7 +784,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
## Ends in an error in state: 49.
##
## aggregate_func -> CARDINAL . [ FOR ]
## primitive_expression -> CARDINAL . [ WITH THEN SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## primitive_expression -> CARDINAL . [ WITH THEN SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## CARDINAL
@ -792,99 +792,13 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
expected the keyword following cardinal to compute the number of elements in a set
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR CONTENT LPAREN ALT IDENT COLON CARDINAL ALT YEAR
##
## Ends in an error in state: 74.
##
## separated_nonempty_list(ALT,struct_content_field) -> struct_content_field ALT . separated_nonempty_list(ALT,struct_content_field) [ RPAREN ]
##
## The known suffix of the stack is as follows:
## struct_content_field ALT
##
expected another field of the struct
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR CONTENT LPAREN ALT IDENT COLON CARDINAL THEN
##
## Ends in an error in state: 73.
##
## separated_nonempty_list(ALT,struct_content_field) -> struct_content_field . [ RPAREN ]
## separated_nonempty_list(ALT,struct_content_field) -> struct_content_field . ALT separated_nonempty_list(ALT,struct_content_field) [ RPAREN ]
##
## The known suffix of the stack is as follows:
## struct_content_field
##
## 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 49, spurious reduction of production primitive_expression -> CARDINAL
## In state 58, spurious reduction of production base_expression -> primitive_expression
## In state 91, spurious reduction of production mult_expression -> base_expression
## In state 86, spurious reduction of production sum_expression -> mult_expression
## In state 78, spurious reduction of production compare_expression -> sum_expression
## In state 110, spurious reduction of production logical_expression -> compare_expression
## In state 109, spurious reduction of production struct_content_field -> ident COLON logical_expression
##
expected another field of the struct or the end of the struct literal
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR CONTENT LPAREN ALT IDENT COLON YEAR
##
## Ends in an error in state: 77.
##
## struct_content_field -> ident COLON . logical_expression [ RPAREN ALT ]
##
## The known suffix of the stack is as follows:
## ident COLON
##
expected an expression for the field of the struct
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR CONTENT LPAREN ALT IDENT YEAR
##
## Ends in an error in state: 76.
##
## struct_content_field -> ident . COLON logical_expression [ RPAREN ALT ]
##
## The known suffix of the stack is as follows:
## ident
##
expected a colon and then the expression for the field of the struct
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR CONTENT LPAREN ALT YEAR
##
## Ends in an error in state: 72.
##
## struct_or_enum_inject_content -> CONTENT LPAREN ALT . separated_nonempty_list(ALT,struct_content_field) RPAREN [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## CONTENT LPAREN ALT
##
expected the name of field of the struct that you are building
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR CONTENT LPAREN YEAR
##
## Ends in an error in state: 71.
##
## atomic_expression -> LPAREN . expression RPAREN [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
## struct_or_enum_inject_content -> CONTENT LPAREN . ALT separated_nonempty_list(ALT,struct_content_field) RPAREN [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## CONTENT LPAREN
##
expected a struct field creation introduced by a dash
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR CONTENT TRUE YEAR
##
## Ends in an error in state: 135.
## Ends in an error in state: 117.
##
## enum_inject_content -> CONTENT small_expression . [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## small_expression -> small_expression . ARROW constructor [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
## small_expression -> small_expression . DOT ident [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
## enum_inject_content -> CONTENT small_expression . [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## small_expression -> small_expression . ARROW constructor [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
## small_expression -> small_expression . DOT ident [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
##
## The known suffix of the stack is as follows:
## CONTENT small_expression
@ -894,10 +808,9 @@ the expression for the content of the enum case is already well-formed, expected
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION CONSTRUCTOR CONTENT YEAR
##
## Ends in an error in state: 70.
## Ends in an error in state: 116.
##
## enum_inject_content -> CONTENT . small_expression [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## struct_or_enum_inject_content -> CONTENT . LPAREN ALT separated_nonempty_list(ALT,struct_content_field) RPAREN [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## enum_inject_content -> CONTENT . small_expression [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## CONTENT
@ -909,7 +822,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
##
## Ends in an error in state: 69.
##
## struct_or_enum_inject -> constructor . struct_or_enum_inject_content [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## struct_or_enum_inject -> constructor . struct_or_enum_inject_content [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## constructor
@ -919,7 +832,7 @@ expected a payload for the enum case constructor, or the rest of the expression
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN CARDINAL SUCH THAT YEAR
##
## Ends in an error in state: 125.
## Ends in an error in state: 132.
##
## expression -> exists_prefix . expression [ THEN SCOPE RULE RPAREN END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ]
##
@ -931,7 +844,7 @@ expected an expression for the existential test
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN TRUE SUCH YEAR
##
## Ends in an error in state: 131.
## Ends in an error in state: 138.
##
## exists_prefix -> exists_marked ident IN primitive_expression SUCH . THAT [ VERTICAL TRUE SUM NOW NOT MONEY_AMOUNT MINUS MATCH LPAREN INT_LITERAL IF IDENT FOR FALSE EXISTS DECIMAL_LITERAL CONSTRUCTOR CARDINAL ]
##
@ -943,7 +856,7 @@ expected a keyword to complete the "such that" construction
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN TRUE WITH
##
## Ends in an error in state: 130.
## Ends in an error in state: 137.
##
## exists_prefix -> exists_marked ident IN primitive_expression . SUCH THAT [ VERTICAL TRUE SUM NOW NOT MONEY_AMOUNT MINUS MATCH LPAREN INT_LITERAL IF IDENT FOR FALSE EXISTS DECIMAL_LITERAL CONSTRUCTOR CARDINAL ]
##
@ -961,7 +874,7 @@ expected a keyword to form the "such that" expression for the existential test
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT IN YEAR
##
## Ends in an error in state: 129.
## Ends in an error in state: 136.
##
## exists_prefix -> exists_marked ident IN . primitive_expression SUCH THAT [ VERTICAL TRUE SUM NOW NOT MONEY_AMOUNT MINUS MATCH LPAREN INT_LITERAL IF IDENT FOR FALSE EXISTS DECIMAL_LITERAL CONSTRUCTOR CARDINAL ]
##
@ -973,7 +886,7 @@ expected an expression that designates the set subject to the existential test
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS IDENT YEAR
##
## Ends in an error in state: 128.
## Ends in an error in state: 135.
##
## exists_prefix -> exists_marked ident . IN primitive_expression SUCH THAT [ VERTICAL TRUE SUM NOW NOT MONEY_AMOUNT MINUS MATCH LPAREN INT_LITERAL IF IDENT FOR FALSE EXISTS DECIMAL_LITERAL CONSTRUCTOR CARDINAL ]
##
@ -985,7 +898,7 @@ expected the "in" keyword to continue this existential test
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION EXISTS YEAR
##
## Ends in an error in state: 127.
## Ends in an error in state: 134.
##
## exists_prefix -> exists_marked . ident IN primitive_expression SUCH THAT [ VERTICAL TRUE SUM NOW NOT MONEY_AMOUNT MINUS MATCH LPAREN INT_LITERAL IF IDENT FOR FALSE EXISTS DECIMAL_LITERAL CONSTRUCTOR CARDINAL ]
##
@ -997,7 +910,7 @@ expected an identifier that will designate the existential witness for the test
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT IN CARDINAL WE_HAVE YEAR
##
## Ends in an error in state: 118.
## Ends in an error in state: 125.
##
## expression -> forall_prefix . expression [ THEN SCOPE RULE RPAREN END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ]
##
@ -1009,7 +922,7 @@ expected an expression for the universal test
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT IN TRUE WITH
##
## Ends in an error in state: 122.
## Ends in an error in state: 129.
##
## forall_prefix -> for_all_marked ident IN primitive_expression . WE_HAVE [ VERTICAL TRUE SUM NOW NOT MONEY_AMOUNT MINUS MATCH LPAREN INT_LITERAL IF IDENT FOR FALSE EXISTS DECIMAL_LITERAL CONSTRUCTOR CARDINAL ]
##
@ -1027,7 +940,7 @@ expected the "we have" keyword for this universal test
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT IN YEAR
##
## Ends in an error in state: 121.
## Ends in an error in state: 128.
##
## forall_prefix -> for_all_marked ident IN . primitive_expression WE_HAVE [ VERTICAL TRUE SUM NOW NOT MONEY_AMOUNT MINUS MATCH LPAREN INT_LITERAL IF IDENT FOR FALSE EXISTS DECIMAL_LITERAL CONSTRUCTOR CARDINAL ]
##
@ -1039,7 +952,7 @@ expected the expression designating the set on which to perform the universal te
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL IDENT YEAR
##
## Ends in an error in state: 120.
## Ends in an error in state: 127.
##
## forall_prefix -> for_all_marked ident . IN primitive_expression WE_HAVE [ VERTICAL TRUE SUM NOW NOT MONEY_AMOUNT MINUS MATCH LPAREN INT_LITERAL IF IDENT FOR FALSE EXISTS DECIMAL_LITERAL CONSTRUCTOR CARDINAL ]
##
@ -1051,7 +964,7 @@ expected the "in" keyword for the rest of the universal test
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION FOR ALL YEAR
##
## Ends in an error in state: 119.
## Ends in an error in state: 126.
##
## forall_prefix -> for_all_marked . ident IN primitive_expression WE_HAVE [ VERTICAL TRUE SUM NOW NOT MONEY_AMOUNT MINUS MATCH LPAREN INT_LITERAL IF IDENT FOR FALSE EXISTS DECIMAL_LITERAL CONSTRUCTOR CARDINAL ]
##
@ -1075,7 +988,7 @@ expected the "all" keyword to mean the "for all" construction of the universal t
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE SCOPE
##
## Ends in an error in state: 142.
## Ends in an error in state: 140.
##
## expression -> IF expression . THEN expression ELSE base_expression [ THEN SCOPE RULE RPAREN END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ]
##
@ -1088,18 +1001,18 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 53, spurious reduction of production primitive_expression -> small_expression
## In state 58, spurious reduction of production base_expression -> primitive_expression
## In state 91, spurious reduction of production mult_expression -> base_expression
## In state 86, spurious reduction of production sum_expression -> mult_expression
## In state 78, spurious reduction of production compare_expression -> sum_expression
## In state 110, spurious reduction of production logical_expression -> compare_expression
## In state 117, spurious reduction of production expression -> logical_expression
## In state 90, spurious reduction of production mult_expression -> base_expression
## In state 85, spurious reduction of production sum_expression -> mult_expression
## In state 77, spurious reduction of production compare_expression -> sum_expression
## In state 109, spurious reduction of production logical_expression -> compare_expression
## In state 124, spurious reduction of production expression -> logical_expression
##
expected the "then" keyword as the conditional expression is complete
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE THEN TRUE ELSE YEAR
##
## Ends in an error in state: 145.
## Ends in an error in state: 143.
##
## expression -> IF expression THEN expression ELSE . base_expression [ THEN SCOPE RULE RPAREN END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ]
##
@ -1111,7 +1024,7 @@ expected an expression for the "else" branch of this conditional construction
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE THEN TRUE THEN
##
## Ends in an error in state: 144.
## Ends in an error in state: 142.
##
## expression -> IF expression THEN expression . ELSE base_expression [ THEN SCOPE RULE RPAREN END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ]
##
@ -1124,18 +1037,18 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 53, spurious reduction of production primitive_expression -> small_expression
## In state 58, spurious reduction of production base_expression -> primitive_expression
## In state 91, spurious reduction of production mult_expression -> base_expression
## In state 86, spurious reduction of production sum_expression -> mult_expression
## In state 78, spurious reduction of production compare_expression -> sum_expression
## In state 110, spurious reduction of production logical_expression -> compare_expression
## In state 117, spurious reduction of production expression -> logical_expression
## In state 90, spurious reduction of production mult_expression -> base_expression
## In state 85, spurious reduction of production sum_expression -> mult_expression
## In state 77, spurious reduction of production compare_expression -> sum_expression
## In state 109, spurious reduction of production logical_expression -> compare_expression
## In state 124, spurious reduction of production expression -> logical_expression
##
expected the "else" branch of this conditional expression as the "then" branch is complete
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION IF TRUE THEN YEAR
##
## Ends in an error in state: 143.
## Ends in an error in state: 141.
##
## expression -> IF expression THEN . expression ELSE base_expression [ THEN SCOPE RULE RPAREN END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ]
##
@ -1161,7 +1074,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
##
## Ends in an error in state: 62.
##
## literal -> num_literal . option(unit_literal) [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
## literal -> num_literal . option(unit_literal) [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
##
## The known suffix of the stack is as follows:
## num_literal
@ -1171,9 +1084,9 @@ expected a unit for this literal, or a valid operator to complete the expression
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION LPAREN TRUE THEN
##
## Ends in an error in state: 133.
## Ends in an error in state: 145.
##
## atomic_expression -> LPAREN expression . RPAREN [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
## atomic_expression -> LPAREN expression . RPAREN [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
##
## The known suffix of the stack is as follows:
## LPAREN expression
@ -1184,11 +1097,11 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 53, spurious reduction of production primitive_expression -> small_expression
## In state 58, spurious reduction of production base_expression -> primitive_expression
## In state 91, spurious reduction of production mult_expression -> base_expression
## In state 86, spurious reduction of production sum_expression -> mult_expression
## In state 78, spurious reduction of production compare_expression -> sum_expression
## In state 110, spurious reduction of production logical_expression -> compare_expression
## In state 117, spurious reduction of production expression -> logical_expression
## In state 90, spurious reduction of production mult_expression -> base_expression
## In state 85, spurious reduction of production sum_expression -> mult_expression
## In state 77, spurious reduction of production compare_expression -> sum_expression
## In state 109, spurious reduction of production logical_expression -> compare_expression
## In state 124, spurious reduction of production expression -> logical_expression
##
unmatched parenthesis that should have been closed by here
@ -1197,7 +1110,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
##
## Ends in an error in state: 40.
##
## atomic_expression -> LPAREN . expression RPAREN [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
## atomic_expression -> LPAREN . expression RPAREN [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
##
## The known suffix of the stack is as follows:
## LPAREN
@ -1238,10 +1151,10 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 53, spurious reduction of production primitive_expression -> small_expression
## In state 58, spurious reduction of production base_expression -> primitive_expression
## In state 91, spurious reduction of production mult_expression -> base_expression
## In state 86, spurious reduction of production sum_expression -> mult_expression
## In state 78, spurious reduction of production compare_expression -> sum_expression
## In state 108, spurious reduction of production logical_expression -> logical_unop compare_expression
## In state 90, spurious reduction of production mult_expression -> base_expression
## In state 85, spurious reduction of production sum_expression -> mult_expression
## In state 77, spurious reduction of production compare_expression -> sum_expression
## In state 107, spurious reduction of production logical_expression -> logical_unop compare_expression
## In state 154, spurious reduction of production match_arm -> constructor_binding COLON logical_expression
##
@ -1348,7 +1261,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
##
## Ends in an error in state: 50.
##
## sum_expression -> sum_unop . sum_expression [ THEN SCOPE RULE RPAREN OR NOT_EQUAL LESSER_EQUAL LESSER GREATER_EQUAL GREATER EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## sum_expression -> sum_unop . sum_expression [ THEN SCOPE RULE RPAREN RBRACKET OR NOT_EQUAL LESSER_EQUAL LESSER GREATER_EQUAL GREATER EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## sum_unop
@ -1358,9 +1271,9 @@ expected an expression to take the opposite of
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION NOT YEAR
##
## Ends in an error in state: 107.
## Ends in an error in state: 106.
##
## logical_expression -> logical_unop . compare_expression [ THEN SCOPE RULE RPAREN END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ALT ]
## logical_expression -> logical_unop . compare_expression [ THEN SCOPE RULE RPAREN RBRACKET END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ALT ]
##
## The known suffix of the stack is as follows:
## logical_unop
@ -1370,9 +1283,9 @@ expected an expression to take the negation of
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION SUM FOR IDENT IN TRUE OF YEAR
##
## Ends in an error in state: 103.
## Ends in an error in state: 102.
##
## aggregate -> aggregate_func FOR ident IN primitive_expression OF . base_expression [ THEN SCOPE RULE RPAREN PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## aggregate -> aggregate_func FOR ident IN primitive_expression OF . base_expression [ THEN SCOPE RULE RPAREN RBRACKET PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## aggregate_func FOR ident IN primitive_expression OF
@ -1382,9 +1295,9 @@ expected an expression to compute its aggregation over the set
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION SUM FOR IDENT IN TRUE WITH
##
## Ends in an error in state: 102.
## Ends in an error in state: 101.
##
## aggregate -> aggregate_func FOR ident IN primitive_expression . OF base_expression [ THEN SCOPE RULE RPAREN PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## aggregate -> aggregate_func FOR ident IN primitive_expression . OF base_expression [ THEN SCOPE RULE RPAREN RBRACKET PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## aggregate_func FOR ident IN primitive_expression
@ -1400,9 +1313,9 @@ expected the "for" keyword and the expression to compute the aggregate
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION SUM FOR IDENT IN YEAR
##
## Ends in an error in state: 100.
## Ends in an error in state: 99.
##
## aggregate -> aggregate_func FOR ident IN . primitive_expression OF base_expression [ THEN SCOPE RULE RPAREN PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## aggregate -> aggregate_func FOR ident IN . primitive_expression OF base_expression [ THEN SCOPE RULE RPAREN RBRACKET PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## aggregate_func FOR ident IN
@ -1412,9 +1325,9 @@ expected an expression standing for the set over which to compute the aggregatio
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION SUM FOR IDENT YEAR
##
## Ends in an error in state: 99.
## Ends in an error in state: 98.
##
## aggregate -> aggregate_func FOR ident . IN primitive_expression OF base_expression [ THEN SCOPE RULE RPAREN PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## aggregate -> aggregate_func FOR ident . IN primitive_expression OF base_expression [ THEN SCOPE RULE RPAREN RBRACKET PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## aggregate_func FOR ident
@ -1424,9 +1337,9 @@ expected the "in" keyword
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION SUM FOR YEAR
##
## Ends in an error in state: 98.
## Ends in an error in state: 97.
##
## aggregate -> aggregate_func FOR . ident IN primitive_expression OF base_expression [ THEN SCOPE RULE RPAREN PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## aggregate -> aggregate_func FOR . ident IN primitive_expression OF base_expression [ THEN SCOPE RULE RPAREN RBRACKET PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## aggregate_func FOR
@ -1436,9 +1349,9 @@ expected an identifier for the aggregation bound variable
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION SUM YEAR
##
## Ends in an error in state: 97.
## Ends in an error in state: 96.
##
## aggregate -> aggregate_func . FOR ident IN primitive_expression OF base_expression [ THEN SCOPE RULE RPAREN PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## aggregate -> aggregate_func . FOR ident IN primitive_expression OF base_expression [ THEN SCOPE RULE RPAREN RBRACKET PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## aggregate_func
@ -1450,7 +1363,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
##
## Ends in an error in state: 56.
##
## small_expression -> small_expression ARROW . constructor [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
## small_expression -> small_expression ARROW . constructor [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
##
## The known suffix of the stack is as follows:
## small_expression ARROW
@ -1473,11 +1386,11 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
## may provide an INCOMPLETE view of the future (what was expected next).
## In state 53, spurious reduction of production primitive_expression -> small_expression
## In state 58, spurious reduction of production base_expression -> primitive_expression
## In state 91, spurious reduction of production mult_expression -> base_expression
## In state 86, spurious reduction of production sum_expression -> mult_expression
## In state 78, spurious reduction of production compare_expression -> sum_expression
## In state 110, spurious reduction of production logical_expression -> compare_expression
## In state 117, spurious reduction of production expression -> logical_expression
## In state 90, spurious reduction of production mult_expression -> base_expression
## In state 85, spurious reduction of production sum_expression -> mult_expression
## In state 77, spurious reduction of production compare_expression -> sum_expression
## In state 109, spurious reduction of production logical_expression -> compare_expression
## In state 124, spurious reduction of production expression -> logical_expression
## In state 162, spurious reduction of production scope_use_condition -> UNDER_CONDITION expression
## In state 163, spurious reduction of production option(scope_use_condition) -> scope_use_condition
##
@ -1488,7 +1401,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
##
## Ends in an error in state: 54.
##
## small_expression -> small_expression DOT . ident [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
## small_expression -> small_expression DOT . ident [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
##
## The known suffix of the stack is as follows:
## small_expression DOT
@ -1498,9 +1411,9 @@ expected an identifier standing for a struct field or a subscope name
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE IN YEAR
##
## Ends in an error in state: 140.
## Ends in an error in state: 122.
##
## base_expression -> primitive_expression IN . base_expression [ THEN SCOPE RULE RPAREN PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## base_expression -> primitive_expression IN . base_expression [ THEN SCOPE RULE RPAREN RBRACKET PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## primitive_expression IN
@ -1510,10 +1423,10 @@ expected an expression standing for the set you want to test for membership
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE INCREASING
##
## Ends in an error in state: 91.
## Ends in an error in state: 90.
##
## mult_expression -> base_expression . [ THEN SCOPE RULE RPAREN PLUS OR NOT_EQUAL MINUS LESSER_EQUAL LESSER GREATER_EQUAL GREATER EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## mult_expression -> base_expression . mult_op mult_expression [ THEN SCOPE RULE RPAREN PLUS OR NOT_EQUAL MINUS LESSER_EQUAL LESSER GREATER_EQUAL GREATER EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## mult_expression -> base_expression . [ THEN SCOPE RULE RPAREN RBRACKET PLUS OR NOT_EQUAL MINUS LESSER_EQUAL LESSER GREATER_EQUAL GREATER EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## mult_expression -> base_expression . mult_op mult_expression [ THEN SCOPE RULE RPAREN RBRACKET PLUS OR NOT_EQUAL MINUS LESSER_EQUAL LESSER GREATER_EQUAL GREATER EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## base_expression
@ -1530,9 +1443,9 @@ expected an operator to compose the expression on the left
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE MULT YEAR
##
## Ends in an error in state: 94.
## Ends in an error in state: 93.
##
## mult_expression -> base_expression mult_op . mult_expression [ THEN SCOPE RULE RPAREN PLUS OR NOT_EQUAL MINUS LESSER_EQUAL LESSER GREATER_EQUAL GREATER EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## mult_expression -> base_expression mult_op . mult_expression [ THEN SCOPE RULE RPAREN RBRACKET PLUS OR NOT_EQUAL MINUS LESSER_EQUAL LESSER GREATER_EQUAL GREATER EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## base_expression mult_op
@ -1542,9 +1455,9 @@ expected an expression on the right side of the multiplication or division opera
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE NOT_EQUAL YEAR
##
## Ends in an error in state: 85.
## Ends in an error in state: 84.
##
## compare_expression -> sum_expression compare_op . compare_expression [ THEN SCOPE RULE RPAREN OR END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## compare_expression -> sum_expression compare_op . compare_expression [ THEN SCOPE RULE RPAREN RBRACKET OR END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## sum_expression compare_op
@ -1556,7 +1469,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
##
## Ends in an error in state: 61.
##
## base_expression -> primitive_expression OF . base_expression [ THEN SCOPE RULE RPAREN PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## base_expression -> primitive_expression OF . base_expression [ THEN SCOPE RULE RPAREN RBRACKET PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## primitive_expression OF
@ -1566,9 +1479,9 @@ expected an expression for the argument of this function call
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE OR YEAR
##
## Ends in an error in state: 113.
## Ends in an error in state: 112.
##
## logical_expression -> compare_expression logical_op . logical_expression [ THEN SCOPE RULE RPAREN END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ALT ]
## logical_expression -> compare_expression logical_op . logical_expression [ THEN SCOPE RULE RPAREN RBRACKET END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION ALT ]
##
## The known suffix of the stack is as follows:
## compare_expression logical_op
@ -1578,9 +1491,9 @@ expected an expression on the right side of the logical operator
source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION TRUE PLUS YEAR
##
## Ends in an error in state: 89.
## Ends in an error in state: 88.
##
## sum_expression -> mult_expression sum_op . sum_expression [ THEN SCOPE RULE RPAREN OR NOT_EQUAL LESSER_EQUAL LESSER GREATER_EQUAL GREATER EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## sum_expression -> mult_expression sum_op . sum_expression [ THEN SCOPE RULE RPAREN RBRACKET OR NOT_EQUAL LESSER_EQUAL LESSER GREATER_EQUAL GREATER EQUAL END_CODE ELSE DEFINITION DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## mult_expression sum_op
@ -1592,10 +1505,10 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
##
## Ends in an error in state: 58.
##
## base_expression -> primitive_expression . [ THEN SCOPE RULE RPAREN PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## base_expression -> primitive_expression . OF base_expression [ THEN SCOPE RULE RPAREN PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## base_expression -> primitive_expression . WITH constructor [ THEN SCOPE RULE RPAREN PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## base_expression -> primitive_expression . IN base_expression [ THEN SCOPE RULE RPAREN PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## base_expression -> primitive_expression . [ THEN SCOPE RULE RPAREN RBRACKET PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## base_expression -> primitive_expression . OF base_expression [ THEN SCOPE RULE RPAREN RBRACKET PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## base_expression -> primitive_expression . WITH constructor [ THEN SCOPE RULE RPAREN RBRACKET PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## base_expression -> primitive_expression . IN base_expression [ THEN SCOPE RULE RPAREN RBRACKET PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## primitive_expression
@ -1613,7 +1526,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
##
## Ends in an error in state: 59.
##
## base_expression -> primitive_expression WITH . constructor [ THEN SCOPE RULE RPAREN PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## base_expression -> primitive_expression WITH . constructor [ THEN SCOPE RULE RPAREN RBRACKET PLUS OR NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
##
## The known suffix of the stack is as follows:
## primitive_expression WITH
@ -1625,9 +1538,9 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
##
## Ends in an error in state: 53.
##
## primitive_expression -> small_expression . [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## small_expression -> small_expression . ARROW constructor [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
## small_expression -> small_expression . DOT ident [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
## primitive_expression -> small_expression . [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION AND ALT ]
## small_expression -> small_expression . ARROW constructor [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
## small_expression -> small_expression . DOT ident [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
##
## The known suffix of the stack is as follows:
## small_expression
@ -1639,7 +1552,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
##
## Ends in an error in state: 31.
##
## literal -> VERTICAL date_int DIV date_int DIV date_int . VERTICAL [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
## literal -> VERTICAL date_int DIV date_int DIV date_int . VERTICAL [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
##
## The known suffix of the stack is as follows:
## VERTICAL date_int DIV date_int DIV date_int
@ -1651,7 +1564,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
##
## Ends in an error in state: 30.
##
## literal -> VERTICAL date_int DIV date_int DIV . date_int VERTICAL [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
## literal -> VERTICAL date_int DIV date_int DIV . date_int VERTICAL [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
##
## The known suffix of the stack is as follows:
## VERTICAL date_int DIV date_int DIV
@ -1663,7 +1576,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
##
## Ends in an error in state: 29.
##
## literal -> VERTICAL date_int DIV date_int . DIV date_int VERTICAL [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
## literal -> VERTICAL date_int DIV date_int . DIV date_int VERTICAL [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
##
## The known suffix of the stack is as follows:
## VERTICAL date_int DIV date_int
@ -1675,7 +1588,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
##
## Ends in an error in state: 28.
##
## literal -> VERTICAL date_int DIV . date_int DIV date_int VERTICAL [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
## literal -> VERTICAL date_int DIV . date_int DIV date_int VERTICAL [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
##
## The known suffix of the stack is as follows:
## VERTICAL date_int DIV
@ -1687,7 +1600,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
##
## Ends in an error in state: 27.
##
## literal -> VERTICAL date_int . DIV date_int DIV date_int VERTICAL [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
## literal -> VERTICAL date_int . DIV date_int DIV date_int VERTICAL [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
##
## The known suffix of the stack is as follows:
## VERTICAL date_int
@ -1699,7 +1612,7 @@ source_file_or_master: LAW_ARTICLE BEGIN_CODE SCOPE CONSTRUCTOR UNDER_CONDITION
##
## Ends in an error in state: 25.
##
## literal -> VERTICAL . date_int DIV date_int DIV date_int VERTICAL [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
## literal -> VERTICAL . date_int DIV date_int DIV date_int VERTICAL [ WITH WE_HAVE THEN SUCH SCOPE RULE RPAREN RBRACKET PLUS OR OF NOT_EQUAL MULT MINUS LESSER_EQUAL LESSER INCREASING IN GREATER_EQUAL GREATER EQUAL END_CODE ELSE DOT DIV DEFINITION DECREASING DECLARATION CONSEQUENCE COLON ASSERTION ARROW AND ALT ]
##
## The known suffix of the stack is as follows:
## VERTICAL

View File

@ -116,7 +116,7 @@ struct_content_field:
}
enum_inject_content:
| OF e = small_expression { e }
| CONTENT e = small_expression { e }
struct_or_enum_inject_content:
| e = option(enum_inject_content) { EnumContent e }

View File

@ -27,24 +27,24 @@ let message s =
| 53 -> "expected an operator to compose the expression on the left with\n"
| 59 -> "expected an enum constructor to test if the expression on the left\n"
| 58 -> "expected an operator to compose the expression on the left with\n"
| 89 -> "expected an expression on the right side of the sum or minus operator\n"
| 113 -> "expected an expression on the right side of the logical operator\n"
| 88 -> "expected an expression on the right side of the sum or minus operator\n"
| 112 -> "expected an expression on the right side of the logical operator\n"
| 61 -> "expected an expression for the argument of this function call\n"
| 85 -> "expected an expression on the right side of the comparison operator\n"
| 94 -> "expected an expression on the right side of the multiplication or division operator\n"
| 91 -> "expected an operator to compose the expression on the left\n"
| 140 -> "expected an expression standing for the set you want to test for membership\n"
| 84 -> "expected an expression on the right side of the comparison operator\n"
| 93 -> "expected an expression on the right side of the multiplication or division operator\n"
| 90 -> "expected an operator to compose the expression on the left\n"
| 122 -> "expected an expression standing for the set you want to test for membership\n"
| 54 -> "expected an identifier standing for a struct field or a subscope name\n"
| 164 -> "expected a colon after the scope use precondition\n"
| 56 -> "expected a constructor, to get the payload of this enum case\n"
| 97 -> "expected the \"for\" keyword to spell the aggregation\n"
| 98 -> "expected an identifier for the aggregation bound variable\n"
| 99 -> "expected the \"in\" keyword\n"
| 100 ->
| 96 -> "expected the \"for\" keyword to spell the aggregation\n"
| 97 -> "expected an identifier for the aggregation bound variable\n"
| 98 -> "expected the \"in\" keyword\n"
| 99 ->
"expected an expression standing for the set over which to compute the aggregation operation\n"
| 102 -> "expected the \"for\" keyword and the expression to compute the aggregate\n"
| 103 -> "expected an expression to compute its aggregation over the set\n"
| 107 -> "expected an expression to take the negation of\n"
| 101 -> "expected the \"for\" keyword and the expression to compute the aggregate\n"
| 102 -> "expected an expression to compute its aggregation over the set\n"
| 106 -> "expected an expression to take the negation of\n"
| 50 -> "expected an expression to take the opposite of\n"
| 39 -> "expected an expression to match with\n"
| 148 -> "expected a pattern matching case\n"
@ -60,41 +60,35 @@ let message s =
complete\n"
| 147 -> "expected the \"with patter\" keyword to complete the pattern matching expression\n"
| 40 -> "expected an expression inside the parenthesis\n"
| 133 -> "unmatched parenthesis that should have been closed by here\n"
| 145 -> "unmatched parenthesis that should have been closed by here\n"
| 62 -> "expected a unit for this literal, or a valid operator to complete the expression \n"
| 42 -> "expected an expression for the test of the conditional\n"
| 143 -> "expected an expression the for the \"then\" branch of the conditiona\n"
| 144 ->
| 141 -> "expected an expression the for the \"then\" branch of the conditiona\n"
| 142 ->
"expected the \"else\" branch of this conditional expression as the \"then\" branch is \
complete\n"
| 145 -> "expected an expression for the \"else\" branch of this conditional construction\n"
| 142 -> "expected the \"then\" keyword as the conditional expression is complete\n"
| 143 -> "expected an expression for the \"else\" branch of this conditional construction\n"
| 140 -> "expected the \"then\" keyword as the conditional expression is complete\n"
| 44 ->
"expected the \"all\" keyword to mean the \"for all\" construction of the universal test\n"
| 119 -> "expected an identifier for the bound variable of the universal test\n"
| 120 -> "expected the \"in\" keyword for the rest of the universal test\n"
| 121 -> "expected the expression designating the set on which to perform the universal test\n"
| 122 -> "expected the \"we have\" keyword for this universal test\n"
| 118 -> "expected an expression for the universal test\n"
| 127 -> "expected an identifier that will designate the existential witness for the test\n"
| 128 -> "expected the \"in\" keyword to continue this existential test\n"
| 129 -> "expected an expression that designates the set subject to the existential test\n"
| 130 -> "expected a keyword to form the \"such that\" expression for the existential test\n"
| 131 -> "expected a keyword to complete the \"such that\" construction\n"
| 125 -> "expected an expression for the existential test\n"
| 126 -> "expected an identifier for the bound variable of the universal test\n"
| 127 -> "expected the \"in\" keyword for the rest of the universal test\n"
| 128 -> "expected the expression designating the set on which to perform the universal test\n"
| 129 -> "expected the \"we have\" keyword for this universal test\n"
| 125 -> "expected an expression for the universal test\n"
| 134 -> "expected an identifier that will designate the existential witness for the test\n"
| 135 -> "expected the \"in\" keyword to continue this existential test\n"
| 136 -> "expected an expression that designates the set subject to the existential test\n"
| 137 -> "expected a keyword to form the \"such that\" expression for the existential test\n"
| 138 -> "expected a keyword to complete the \"such that\" construction\n"
| 132 -> "expected an expression for the existential test\n"
| 69 ->
"expected a payload for the enum case constructor, or the rest of the expression (with an \
operator ?)\n"
| 70 -> "expected an expression for the content of this enum case\n"
| 135 ->
| 116 -> "expected an expression for the content of this enum case\n"
| 117 ->
"the expression for the content of the enum case is already well-formed, expected an \
operator to form a bigger expression\n"
| 71 -> "expected a struct field creation introduced by a dash\n"
| 72 -> "expected the name of field of the struct that you are building\n"
| 76 -> "expected a colon and then the expression for the field of the struct\n"
| 77 -> "expected an expression for the field of the struct\n"
| 73 -> "expected another field of the struct or the end of the struct literal\n"
| 74 -> "expected another field of the struct\n"
| 49 -> "expected the keyword following cardinal to compute the number of elements in a set\n"
| 165 -> "expected a scope use item: a rule, definition or assertion\n"
| 166 -> "expected the name of the variable subject to the rule\n"

View File

@ -100,7 +100,7 @@
'name' : 'keyword.control.catala_nv'
}
{
'match' : '\\b(scope|fun\\s+of|new|includes|set|type|option|struct|enum|param|rule|condition|data|ok|assert|def)\\b'
'match' : '\\b(scope|fun\\s+of|new|includes|set|content|option|struct|enum|param|rule|condition|data|ok|assert|def)\\b'
'name' : 'keyword.other.catala_nv'
}
{

View File

@ -213,7 +213,7 @@ code : context {
}
: pattern {
regex \= \b(scope|fun\s+of|new|includes|set|type|option|struct|enum|param|rule|condition|data|ok|assert|def)\b
regex \= \b(scope|fun\s+of|new|includes|set|content|option|struct|enum|param|rule|condition|data|ok|assert|def)\b
styles [] = .keyword_rule ;
}

View File

@ -26,7 +26,7 @@ class CatalaNvLexer(RegexLexer):
(u'(param)(\\s+)([a-z\xe9\xe8\xe0\xe2\xf9\xee\xea\u0153\xe7][a-z\xe9\xe8\xe0\xe2\xf9\xee\xea\u0153\xe7A-Z\xc9\xc8\xc0\xc2\xd9\xce\xca\u0152\xc70-9_\\\']*)',
bygroups(Keyword.Declaration, Text, Name.Variable)),
(u'\\b(match|with|fixed|by|decreasing|increasing|varies|with\\s+param|we\\s+have|in|such\\s+that|exists|for|all|of|if|then|else)\\b', bygroups(Keyword.Reserved)),
(u'\\b(scope|fun\\s+of|new|includes|set|type|option|struct|enum|param|rule|condition|data|ok|assert|def)\\b',
(u'\\b(scope|fun\\s+of|new|includes|set|content|option|struct|enum|param|rule|condition|data|ok|assert|def)\\b',
bygroups(Keyword.Declaration)),
(u'(\\|[0-9]+/[0-9]+/[0-9]+\\|)', bygroups(Number.Integer)),
(u'\\b(true|false)\\b', bygroups(Keyword.Constant)),

View File

@ -161,7 +161,7 @@
</dict>
<dict>
<key>match</key>
<string>\b(scope|fun\s+of|new|includes|set|type|option|struct|enum|param|rule|condition|data|ok|assert|def)\b</string>
<string>\b(scope|fun\s+of|new|includes|set|content|option|struct|enum|param|rule|condition|data|ok|assert|def)\b</string>
<key>name</key>
<string>keyword.other.catala_nv</string>
</dict>

View File

@ -2,8 +2,8 @@
/*
new scope TestBool :
param foo type bool
param bar type int
param foo content bool
param bar content int
scope TestBool :
def bar := 1

View File

@ -2,15 +2,15 @@
/*
new enum E:
-- Case1 type int
-- Case1 content int
-- Case2
new scope A:
param x type E
param y type int
param x content E
param y content int
scope A:
def x := Case1 of 2
def x := Case1 content 2
def y := match x with
-- Case1 of i : 42
-- Case2 : 43

View File

@ -2,13 +2,13 @@
/*
new scope S:
param f type int fun of int
param b type bool
param out type int
param f content int fun of int
param b content bool
param out content int
new scope R:
param s scope S
param r type int
param r content int
scope S:
def f of x [ (x >= x) ] := x + x

View File

@ -2,7 +2,7 @@
/*
new scope RecursiveFunc:
param f type int fun of int
param f content int fun of int
scope RecursiveFunc:
def f of x := f of x + 1

View File

@ -2,9 +2,9 @@
/*
new scope A :
param x type int
param y type int
param z type int
param x content int
param y content int
param z content int
scope A:
def y [x < 0] := - x

View File

@ -3,7 +3,7 @@
[ERROR] Cycle variable z, declared:
[ERROR] --> test_scope/cycle_in_scope.catala
[ERROR] |
[ERROR] 7 | param z type int
[ERROR] 7 | param z content int
[ERROR] | ^
[ERROR]
[ERROR] Used here in the definition of another cycle variable x:
@ -15,7 +15,7 @@
[ERROR] Cycle variable y, declared:
[ERROR] --> test_scope/cycle_in_scope.catala
[ERROR] |
[ERROR] 6 | param y type int
[ERROR] 6 | param y content int
[ERROR] | ^
[ERROR]
[ERROR] Used here in the definition of another cycle variable z:
@ -27,7 +27,7 @@
[ERROR] Cycle variable x, declared:
[ERROR] --> test_scope/cycle_in_scope.catala
[ERROR] |
[ERROR] 5 | param x type int
[ERROR] 5 | param x content int
[ERROR] | ^
[ERROR]
[ERROR] Used here in the definition of another cycle variable y:

View File

@ -3,11 +3,11 @@
/*
new scope A:
param b scope B
param x type int
param x content int
new scope B:
param a scope A
param y type int
param y content int
scope A:
def x := b.y

View File

@ -2,17 +2,17 @@
/*
new scope A:
param x type int
param x content int
new scope B:
param a scope A
param y1 type int
param y2 type int
param y1 content int
param y2 content int
new scope C:
param b scope B
param z1 type int
param z2 type int
param z1 content int
param z2 content int
scope A:

View File

@ -2,9 +2,9 @@
/*
new scope A:
param a type int
param b type int
param c type bool
param a content int
param b content int
param c content bool
scope A:
def c := false

View File

@ -2,13 +2,13 @@
/*
new scope A:
param a type int
param b type bool
param a_base type int
param a content int
param b content bool
param a_base content int
new scope B:
param a type int
param b type bool
param a content int
param b content bool
param scopeA scope A
param scopeAbis scope A

View File

@ -2,18 +2,18 @@
/*
new scope A:
param x type int
param u type bool
param x content int
param u content bool
new scope B:
param a1 scope A
param a2 scope A
param y type int
param y content int
new scope C:
param a scope A
param b scope B
param z type int
param z content int
scope A:
def x := 0

View File

@ -2,8 +2,8 @@
/*
new scope A:
param x type bool
param y type int
param x content bool
param y content int
new scope B:
param a scope A

View File

@ -2,10 +2,10 @@
/*
new struct S:
data x type S
data x content S
new scope A:
param y type S
param y content S
scope A:
def y := S { -- x: 1 }

View File

@ -2,5 +2,5 @@
[ERROR]
[ERROR] --> test_struct/nested.catala
[ERROR] |
[ERROR] 5 | data x type S
[ERROR] 5 | data x content S
[ERROR] | ^

View File

@ -2,10 +2,10 @@
/*
new struct S:
data x type E
data y type int
data x content E
data y content int
new enum E:
-- Case1 type bool
-- Case2 type S
-- Case1 content bool
-- Case2 content S
*/

View File

@ -2,5 +2,5 @@
[ERROR]
[ERROR] --> test_struct/nested2.catala
[ERROR] |
[ERROR] 5 | data x type E
[ERROR] 5 | data x content E
[ERROR] | ^

View File

@ -2,20 +2,20 @@
/*
new struct S:
data x type int
data y type bool
data x content int
data y content bool
new struct T:
data a type S
data b type S
data a content S
data b content S
new scope A:
param t type T
param t content T
new scope B:
param t type T
param t content T
param a scope A
param out type int
param out content int
scope A:
def t := T {

View File

@ -2,12 +2,12 @@
/*
new struct S:
data x type int
data y type int
data x content int
data y content int
new scope A:
param s type S
param z type int
param s content S
param z content int
scope A:
def s := S {