2021-04-29 19:40:29 +03:00
|
|
|
(*
|
|
|
|
This file is part of the Catala compiler, a specification language for tax and social benefits
|
|
|
|
computation rules.
|
2021-05-27 19:56:47 +03:00
|
|
|
Copyright (C) 2020 Inria, contributors: Denis Merigoux <denis.merigoux@inria.fr>,
|
|
|
|
Emile Rolley <emile.rolley@tuta.io>
|
2021-04-29 19:40:29 +03:00
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*)
|
|
|
|
|
|
|
|
%{
|
|
|
|
open Ast
|
|
|
|
%}
|
|
|
|
|
|
|
|
%token EOF
|
2021-05-15 02:16:08 +03:00
|
|
|
%token<string * string option * string option * int> LAW_HEADING
|
2021-08-17 16:49:48 +03:00
|
|
|
|
|
|
|
%token BEGIN_DIRECTIVE END_DIRECTIVE LAW_INCLUDE
|
|
|
|
%token<int> AT_PAGE
|
|
|
|
%token<string> DIRECTIVE_ARG
|
|
|
|
|
2021-04-29 19:40:29 +03:00
|
|
|
%token<string> LAW_TEXT
|
|
|
|
%token<string> CONSTRUCTOR IDENT
|
|
|
|
%token<string> END_CODE
|
2022-04-22 15:26:28 +03:00
|
|
|
%token<string> INT_LITERAL
|
2021-04-29 19:40:29 +03:00
|
|
|
%token TRUE FALSE
|
2022-04-22 15:26:28 +03:00
|
|
|
%token<string * string> DECIMAL_LITERAL
|
|
|
|
%token<string * string> MONEY_AMOUNT
|
2021-05-15 02:16:08 +03:00
|
|
|
%token BEGIN_CODE TEXT
|
2021-04-29 19:40:29 +03:00
|
|
|
%token COLON ALT DATA VERTICAL
|
|
|
|
%token OF INTEGER COLLECTION
|
|
|
|
%token RULE CONDITION DEFINED_AS
|
|
|
|
%token LESSER GREATER LESSER_EQUAL GREATER_EQUAL
|
|
|
|
%token LESSER_DEC GREATER_DEC LESSER_EQUAL_DEC GREATER_EQUAL_DEC
|
|
|
|
%token LESSER_MONEY GREATER_MONEY LESSER_EQUAL_MONEY GREATER_EQUAL_MONEY
|
|
|
|
%token LESSER_DATE GREATER_DATE LESSER_EQUAL_DATE GREATER_EQUAL_DATE
|
|
|
|
%token LESSER_DURATION GREATER_DURATION LESSER_EQUAL_DURATION GREATER_EQUAL_DURATION
|
|
|
|
%token EXISTS IN SUCH THAT
|
|
|
|
%token DOT AND OR XOR LPAREN RPAREN EQUAL
|
|
|
|
%token CARDINAL ASSERTION FIXED BY YEAR MONTH DAY
|
|
|
|
%token PLUS MINUS MULT DIV
|
|
|
|
%token PLUSDEC MINUSDEC MULTDEC DIVDEC
|
|
|
|
%token PLUSMONEY MINUSMONEY MULTMONEY DIVMONEY
|
2022-05-31 21:00:52 +03:00
|
|
|
%token MINUSDATE PLUSDATE PLUSDURATION MINUSDURATION DIVDURATION MULDURATION
|
2021-08-19 19:26:06 +03:00
|
|
|
%token PLUSPLUS
|
2021-06-01 19:56:03 +03:00
|
|
|
%token MATCH WITH VARIES WITH_V WILDCARD
|
2021-04-29 19:40:29 +03:00
|
|
|
%token FOR ALL WE_HAVE INCREASING DECREASING
|
|
|
|
%token NOT BOOLEAN PERCENT DURATION
|
2022-02-28 16:33:07 +03:00
|
|
|
%token SCOPE FILLED NOT_EQUAL DEFINITION STATE
|
2021-04-29 19:40:29 +03:00
|
|
|
%token STRUCT CONTENT IF THEN DEPENDS DECLARATION
|
2022-01-27 20:03:47 +03:00
|
|
|
%token CONTEXT INPUT OUTPUT INTERNAL ENUM ELSE DATE SUM
|
2021-10-01 11:01:25 +03:00
|
|
|
%token BEGIN_METADATA MONEY DECIMAL
|
2021-04-29 19:40:29 +03:00
|
|
|
%token UNDER_CONDITION CONSEQUENCE LBRACKET RBRACKET
|
|
|
|
%token LABEL EXCEPTION LSQUARE RSQUARE SEMICOLON
|
|
|
|
%token MAXIMUM MINIMUM INIT
|
|
|
|
%token FILTER MAP
|
|
|
|
|
|
|
|
%%
|