commit 2e29af68b3c4d942a753e15caff60ebad4cfc766 Author: Wankupi <2893353848@qq.com> Date: Mon Oct 30 19:34:40 2023 +0800 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3eb2ef8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +# IDE files +.idea/ +cmake-build-debug/ +build/ +gen/ +antlr-playground/.antlr +resources/.antlr +# Testcases +testcases/hidden-testcases diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..f77cfed --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,23 @@ +### YOU CAN'T MODIFY THE CODE BELOW +cmake_minimum_required(VERSION 3.15.2) +project(python_interpreter) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Ofast") + +include_directories(/usr/include/antlr4-runtime/) +include_directories( + ${PROJECT_SOURCE_DIR}/generated/ + ${PROJECT_SOURCE_DIR}/src/ +) + +add_subdirectory(${PROJECT_SOURCE_DIR}/generated) +### YOU CAN"T MODIFY THE CODE ABOVE + +file(GLOB_RECURSE main_src src/*.cpp) + +add_executable(code ${main_src}) # Add all *.cpp file after src/main.cpp, like src/Evalvisitor.cpp did + +### YOU CAN'T MODIFY THE CODE BELOW +target_link_libraries(code PyAntlr) +target_link_libraries(code antlr4-runtime) +### YOU CAN"T MODIFY THE CODE ABOVE diff --git a/Prework/README.md b/Prework/README.md new file mode 100644 index 0000000..fed372f --- /dev/null +++ b/Prework/README.md @@ -0,0 +1,116 @@ +# 四则运算计算器 + +## 题目描述 + +现在,你需要实现全部的四则运算的功能,即加减乘除。简单起见,我们已经将复杂的输入的表达式解析成了树形结构,其定义如下: + +- 每个节点 $node$ 可以是一个数字,或者是一个运算符。其表示一个值,记作 $val(node)$ 。 +- 如果一个节点是数字节点,数字的值为 $n$ ,那么 $val(node) = n$ 。 +- 如果一个节点是运算符节点,运算符为 $op$ ,那么其有两个子节点 $l$ 和 $r$ ,且 $val(node) = val(l) ~\ op ~\ val(r)$ 。 + +## std::any + +需要注意的是,在我们的代码中出现了 `std::any` 。其表现类似 python 中的变量,即可以保存任何类型的值。通过 `std::any_cast` 函数 ,我们可以判断 `any` 是否判断了某一类型的值,并且获取其值。具体如何使用,请参考 [cpprefence](https://en.cppreference.com/w/cpp/utility/any) 。 + +最基本的用法大致如下: + +```C++ +std::any x = (int)1; +x = 2; + +// 如果存储的是 int 类型,返回指向该值的指针 +// 否则返回空指针 nullptr +int *ptr = std::any_cast (&x); + +// 如果存储的是 int 类型,返回该值 +// 否则抛出异常 +int val = std::any_cast (x); + +// 如果存储的是 int 类型,返回该值的引用 +// 否则抛出异常 +int &ref = std::any_cast (x); + +``` + +在本题中,我们保证同一颗表达式树中,数字节点的值都是 `long long` 类型或者 `double` 类型。当然,你需要保证输出 `std::any` 的类型与之相同。 + +## 题目模板 + +节点的具体定义在 [visitor.h](visitor.h) 。你不可以修改这些代码。 + +```C++ +// 你不可以修改这份代码 +#pragma once +#include + +struct visitor; + +struct node { + virtual std::any accept(visitor *) = 0; + virtual ~node() = default; +}; + +struct num_node; +struct add_node; +struct sub_node; +struct mul_node; +struct div_node; + +struct visitor { + virtual std::any visit(node *ctx) { return ctx->accept(this); } + virtual std::any visit_num(num_node *) = 0; + virtual std::any visit_add(add_node *) = 0; + virtual std::any visit_sub(sub_node *) = 0; + virtual std::any visit_mul(mul_node *) = 0; + virtual std::any visit_div(div_node *) = 0; + virtual ~visitor() = default; +}; + +struct num_node final : node { + std::any number; + std::any accept(visitor *ctx) override { return ctx->visit_num(this); } + ~num_node() override = default; +}; + +struct add_node final : node { + node *lnode; + node *rnode; + std::any accept(visitor *ctx) override { return ctx->visit_add(this); } + ~add_node() override = default; +}; + +struct sub_node final : node { + node *lnode; + node *rnode; + std::any accept(visitor *ctx) override { return ctx->visit_sub(this); } + ~sub_node() override = default; +}; + +struct mul_node final : node { + node *lnode; + node *rnode; + std::any accept(visitor *ctx) override { return ctx->visit_mul(this); } + ~mul_node() override = default; +}; + +struct div_node final : node { + node *lnode; + node *rnode; + std::any accept(visitor *ctx) override { return ctx->visit_div(this); } + ~div_node() override = default; +}; + +``` + +现在,你需要按照要求实现一个 `calculator` 类。对于一个 `calculator` 对象,通过虚函数重写基类 `visitor` 的接口。我们希望每次调用其 `visit` 方法,可以返回表达式的结果,且不修改原本的表达式。 + +```C++ +#include "visitor.h" + +struct calculator : visitor { + /// TODO: 完成所有需求,这应该不难 + ~calculator() override = default; +}; +``` + +你需要提交这份[代码](calc.h) diff --git a/Prework/calc.h b/Prework/calc.h new file mode 100644 index 0000000..c98573e --- /dev/null +++ b/Prework/calc.h @@ -0,0 +1,9 @@ +// 你需要提交这份代码 +#pragma once + +#include "visitor.h" + +struct calculator : visitor { + /// TODO: 完成所有需求 + ~calculator() override = default; +}; diff --git a/Prework/test.cpp b/Prework/test.cpp new file mode 100644 index 0000000..ddb0a6b --- /dev/null +++ b/Prework/test.cpp @@ -0,0 +1,34 @@ +// 这是一份测试代码,仅供参考 +// #include "calc_std.h" +#include "calc.h" +#include + + +node *generate(int); + +// Expected: 17711 +signed main() { + node *root = generate(20); + visitor *calc = new calculator; + auto result = calc->visit(root); + if (auto value = std::any_cast (&result)) { + std::cout << "Result: " << *value << '\n'; + } else { + std::cout << "Wrong Type" << '\n'; + } + return 0; +} + + +// 生成器,小孩子不懂写着玩的 +node *generate(int depth) { + if (depth <= 0) { + num_node *ret = new num_node; + ret->number = (double)1.0; + return ret; + } + add_node *root = new add_node; + root->lnode = generate(depth - 1); + root->rnode = generate(depth - 2); + return root; +} \ No newline at end of file diff --git a/Prework/visitor.h b/Prework/visitor.h new file mode 100644 index 0000000..9f4bae0 --- /dev/null +++ b/Prework/visitor.h @@ -0,0 +1,60 @@ +// 你不可以修改这份代码 +#pragma once +#include + +struct visitor; + +struct node { + virtual std::any accept(visitor *) = 0; + virtual ~node() = default; +}; + +struct num_node; +struct add_node; +struct sub_node; +struct mul_node; +struct div_node; + +struct visitor { + virtual std::any visit(node *ctx) { return ctx->accept(this); } + virtual std::any visit_num(num_node *) = 0; + virtual std::any visit_add(add_node *) = 0; + virtual std::any visit_sub(sub_node *) = 0; + virtual std::any visit_mul(mul_node *) = 0; + virtual std::any visit_div(div_node *) = 0; + virtual ~visitor() = default; +}; + +struct num_node final : node { + std::any number; + std::any accept(visitor *ctx) override { return ctx->visit_num(this); } + ~num_node() override = default; +}; + +struct add_node final : node { + node *lnode; + node *rnode; + std::any accept(visitor *ctx) override { return ctx->visit_add(this); } + ~add_node() override = default; +}; + +struct sub_node final : node { + node *lnode; + node *rnode; + std::any accept(visitor *ctx) override { return ctx->visit_sub(this); } + ~sub_node() override = default; +}; + +struct mul_node final : node { + node *lnode; + node *rnode; + std::any accept(visitor *ctx) override { return ctx->visit_mul(this); } + ~mul_node() override = default; +}; + +struct div_node final : node { + node *lnode; + node *rnode; + std::any accept(visitor *ctx) override { return ctx->visit_div(this); } + ~div_node() override = default; +}; diff --git a/docs/antlr_guide.md b/docs/antlr_guide.md new file mode 100644 index 0000000..da970ec --- /dev/null +++ b/docs/antlr_guide.md @@ -0,0 +1,86 @@ +# ANTLR in Python Interpreter + +## 配置教程 + +### 配置 Antlr C++ 运行环境 + +Python 解释器采用 Antlr 作为前端语法分析器,其中核心代码编译时间较长,因此我们提前编译好了 Antlr 的运行环境,这样你的程序在编译时就不需要再编译 Antlr 的运行环境了。 + +为了在你自己的电脑上也使用 Antlr 运行环境,你需要将 Antlr 编译好的运行环境安装到你的电脑上。 + +将 `antlr-runtime_4.13.1_amd64.deb` 文件下载到 WSL 中,打开文件所在目录,执行以下命令安装: + +```shell +sudo apt install ./antlr-runtime_4.13.1_amd64.deb +``` + +在这个包中,含有 Antlr 4.13.1 的动态链接库、静态链接库以及头文件,如果不装这个包, +将导致你的程序在编译时找不到 Antlr 的头文件和动态链接库,从而编译失败。 + +使用 Archlinux 的同学可以直接使用以下命令安装运行环境: +```shell +pacman -S antlr4-runtime +``` + +如有在其他环境下编程的同学(比如 Windows、Mac 和除 Debian,Arch 之外的 Linux 系统),请联系助教。 + +### 生成语法树 + +#### 使用 VScode 插件(推荐) + +首先在 Windows 环境下安装插件(注意,不要在 WSL 环境下安装): + +![vscode-plugin](https://github.com/ACMClassCourse-2023/Python-Interpreter-2023/blob/main/docs/vscode-plugin.png) + +安装后,点击卸载旁的箭头,安装 2.3.1 版本。 + +![vscode-install](https://github.com/ACMClassCourse-2023/Python-Interpreter-2023/blob/main/docs/vscode-install.png) + +安装完后重新加载。打开 `Python3.g4` 文件,右边会出现对应插件的图标,点击,等待其中的 PARSER RULES 等部分加载完毕。 + +![vscode-antlr](https://github.com/ACMClassCourse-2023/Python-Interpreter-2023/blob/main/docs/vscode-antlr.png) + +接下来配置运行文件。点击左侧的运行和调试,创建 `launch.json` 文件,并写入 + +```javascript +{ + "version": "2.3.1", + "configurations": [ + + { + "name": "Debug ANTLR4 grammar", + "type": "antlr-debug", + "request": "launch", + "input": "./a.txt", // 输入文件(即你要运行的 Python 代码文件) + "grammar": "./resources/Python3Parser.g4", // 语法文件 + "startRule": "file_input", // 语法入口规则,我们的公式语法入口规则是 file_input + "printParseTree": true, // 是否 打印/可视化 parse tree + "visualParseTree": true + } + ] +} +``` + +最后打开要运行的文件,在左侧的运行和调试中,点击运行即可生成,如下图所示。 + +![vscode-antlr-result](https://github.com/ACMClassCourse-2023/Python-Interpreter-2023/blob/main/docs/vscode-antlr-result.png) + +#### 使用 Clion 插件 + +由于本次 `.g4` 文件的特性,目前 ANTLR 插件只能支持不带 `INDENT` 和 `DEDENT` 规则的解释。 + +首先在插件市场中找到插件: + +![plugin-market](https://github.com/ACMClassCourse-2023/Python-Interpreter-2023/blob/main/docs/plugin-market.png) + +安装后,右键 `.g4` 中的 `return_stmt` 或任何不包含 `INDENT` 和 `DEDENT` 的规则,点击 `test rule`: + +![right-click](https://github.com/ACMClassCourse-2023/Python-Interpreter-2023/blob/main/docs/right-click.png) + +之后在屏幕下方的 `antlr-preview` 中,左侧是待测试的代码,右侧是依据代码生成的语法树结构图。 + +## ANTLR 是什么 + +ANTLR(全名:ANother Tool for Language Recognition)是基于 LL(\*)算法实现的语法解析器生成器(parser generator),用 Java 语言编写,使用自上而下(top-down)的递归下降 LL 剖析器方法。 + +ANTLR 可以将输入的代码转化成与之对应的**树形结构**,即语法树,以便后续程序操作。按照上面的配置操作,即可得到一份 `Python` 代码对应的语法树。 diff --git a/docs/grammar.md b/docs/grammar.md new file mode 100644 index 0000000..226ab12 --- /dev/null +++ b/docs/grammar.md @@ -0,0 +1,239 @@ +## Specific Python + +### I. 程序结构 + +按照控制流逐行执行。 + +### II. 语法规则 + +#### 1. 字符集合 + +ASCII 编码,区分大小写,中文字符是**未定义**的,合法字符集如下: + +- **标识符**(包括变量标识符、函数标识符):26 个小写英语字母,26 个大写英语字母,数码 `0` 到 `9`,下划线 `_` +- **标准运算符**:加号 `+`,减号 `-`,乘号 `*`,浮点除 `/`,整除`//`,取模 `%` +- **关系运算符**:大于 `>`,小于 `<`,大于等于 `>=`,小于等于 `<=`,不等于 `!=`,等于 `==` +- **增量运算符**:加法 `+=`,减法 `-=`,乘法 `*=`,浮点除 `/=`,整除 `//=`,取模`%=` +- **赋值运算符**:赋值 `=` +- **下标运算符**:取下标对象 `[]` +- **优先级运算符**:括号 `()` +- **分隔符**:逗号 `,` +- **特殊符号**:空格 ` `,换行符 `\n`,制表符 `\t`,注释标识符 `#`,字符串标识符 `"` 或 `'`。 + +#### 2. 关键字 + +```python +None +True +False +def +return +break +continue +if +elif +else +while +or +and +not +``` + +关键字不可作为变量名或函数名。 + +#### 3. 空白字符 + +**空格**、**制表符**在源文件中可以区分词素 (Token),同时在一行的开头可以表示缩进。 + +**换行符**表示新的语句的开始。 + +缩进在 Python 用于识别代码块,相关问题将在 Parser 中使用 Antlr4 解决,无需考虑相关的实现。 + +#### 4. 注释 + +从 `#` 开始到本行结束的内容都会被作为注释。 + +#### 5. 标识符 + +标识符的第一个字符必须是英文字母,第二个字符开始可以是英文字母、数字或者下划线。 + +标识符区分大小写。长度超过 $64$ 个字符的标识符是**未定义**的。 + +#### 6. 常量 + +- 逻辑常量:`True` 为真,`False` 为假 + +- 整数常量: + + - 整数常量以十进制表示,非十进制的表示为**未定义**行为 + - 整数常量不设负数,负数可以由正数取负号得到 + + - Python 中,整数的范围是没有限制的,此处同理,这意味着你必须实现高精度整数 + + - 首位为 $0$ 的整数常量是**未定义**的 + +- 浮点数常量: + + - 浮点数常量以十进制表示 + - 浮点数常量不设负数,负数可以由正数取负号得到 + - 拥有前导 $0$ 的浮点数为**未定义**的,如`0001.1` + - 含有 e 的浮点数为**未定义**的,如 `1e5` + - 以 . 开头的浮点数为**未定义**的,如 `.123` + +- 字符串常量 + - 字符串常量是由双引号 `"` 或单引号 `'` 括起来的字符串 + - 可以由两个字符串拼接而形成新的字符串常量。如 `"123""456"` 相当于 `"123456"` + - 字符串中的所有字符必须是可示字符 (printable character) 或空格中的一种 +- 空值常量:`None` 用来表示变量没有指向任何值 + +### 7. 数据类型 + +- `bool`:只有 `True` 和 `False` + +- `int`:高精度整数 + +- `float`: 与 C++ 中的 `double` 一致 + +- `str`:字符串,**不可修改!** + +- 元组: 具体表现请参考 python (待完善) + +### 8. 表达式 + +#### 8.1. 基础表达式 + +基础表达式包括单独出现的常量、变量、函数调用和数组访问。 + +#### 8.2. 算术表达式 + +合法的算术运算符包括:`+`, `-`, `*`, `/`, `//`, `%`,具体行为可以参照 C++,特殊行为有: + +- 字符串运算符 + - `str + str` 表示字符串的拼接 + - `str * int` 表示字符串的重复 + - `str <= str` 表示字符串的比较,比较规则同 C++ `std::striing`,`>=`, `==`等同理 +- 除法 + - `/` 表示浮点除,即计算结果为浮点数 + - `//` 表示整除,即计算结果为整数。注意无论正负皆**向下取整**,例如 `-5 // 3 = -2` + - `%` 表示模运算,无论模数的正负,皆定义为:`a % b = a - (a // b) * b` +- 连续比较 + - 存在 `1<2>3` 这样连续的关系运算符,处理方法是将其拆为相邻的比较并用 `and` 连接但**每个值最多只计算一次** + - 如 `a() <= >= == != ++ - +* / // % +() +``` + +### 9. 语句 + +#### 9.1. 变量定义/赋值语句 + +- 单变量赋值:`var = value` +- 连续赋值:`var_1 = var_2 = ... = value` + +参考[赋值表达式](####8.3. 赋值表达式)。 + +#### 9.2. 表达式语句 + +参考[表达式](###8. 表达式) + +#### 9.3. 条件语句 + +```python +if expression_1: + # code block +elif expression_2: + # code block +else expression_3: + # code block +``` + +`elif` 相当于 `else if`,`else` 可以没有。 + +#### 9.4. 循环语句 + +```python +while expression: + # code block +``` + +#### 9.5. 跳转语句 + +- 包括 `return`,`break`,和 `continue` +- 具体行为参考 C++ + +### 10. 函数 + +#### 10.1. 函数定义 + +```python +def func(parameters): + # code block +``` + +- 参数列表如 `a, b, c`,变量名之间用逗号分隔,可以为空 + +- 有些变量可以有默认值,但是都必须出现在无默认值的变量后面 +- 函数可以有返回值,也可以没有返回值,无需显示声明。返回值可以为多变量,如 `return a, b` + +#### 10.2. 函数调用 + +```python +func(parameters) +``` + +- 函数调用必须出现在该函数定义后。 + +- 参数有两种形式:keyword 和 positional + + - Keyword argument 比如 `foo(a=1,b=2)` 表示传入参数 `a` 的值为 `1`,`b` 的值 `2` + + - Positional argument 是指 `foo(1,2)` 这样按照出现顺序指代参数 + + - 若一个参数列表中同时有两种参数形式,那么 positional argument 必须出现在 keyword argument 之前。如 `foo(1,b=2)` + +- 数据保证递归层数不超过 $2000$ 层 + +### 11. 内建函数 + +- `print`:输出,可以有任意个参数,逐个输出,中间用空格分隔。输出后换行。输出 `float` 保留 $6$ 位小数。输出字符串不要输出前后面的引号。如 `print("123",1.0)` 请输出 `123 1.000000`。 + +- `int`:将 `float` 或 `bool` 或 `str` 转成 `int`。 + +- `float`: 将 `int` 或 `bool` 或 `str` 转成 `float`。 + +- `str`: 将 `int` 或 `float` 或 `bool` 转成 `str`。 + +- `bool`: 将 `int` 或 `float` 或 `str` 转成 `bool`。对于 `str`,如果是 `""` 则为 `False`,否则为 `True`。 + +- 转型类函数都只有一个参数。 diff --git a/docs/implementation_details.md b/docs/implementation_details.md new file mode 100644 index 0000000..cfb67bd --- /dev/null +++ b/docs/implementation_details.md @@ -0,0 +1,2 @@ +# 实现细节 + diff --git a/docs/plugin-market.png b/docs/plugin-market.png new file mode 100644 index 0000000..9e54138 Binary files /dev/null and b/docs/plugin-market.png differ diff --git a/docs/right-click.png b/docs/right-click.png new file mode 100644 index 0000000..55446e8 Binary files /dev/null and b/docs/right-click.png differ diff --git a/docs/suggestions.md b/docs/suggestions.md new file mode 100644 index 0000000..39fab5e --- /dev/null +++ b/docs/suggestions.md @@ -0,0 +1,14 @@ +### 一些小建议 + +0. 有搞不明白的问题找助教啦~ + +1. git仓库中放置测试点可能使你的仓库克隆时间增长,导致评测变慢。 +推荐将本仓库下载到本地后,只在你的仓库中放置必要的文件。 + +2. 建议使用多文件编程。将整个解释器分成多个模块,分别写在不同的文件中。 + +3. 清楚调用的函数的复杂度。 + +4. 你可以先 `using int2048 = long long;` 来方便前期编写。 + +TO_BE_CONTINUED diff --git a/docs/vscode-antlr-result.png b/docs/vscode-antlr-result.png new file mode 100644 index 0000000..b25c126 Binary files /dev/null and b/docs/vscode-antlr-result.png differ diff --git a/docs/vscode-antlr.png b/docs/vscode-antlr.png new file mode 100644 index 0000000..68626bf Binary files /dev/null and b/docs/vscode-antlr.png differ diff --git a/docs/vscode-install.png b/docs/vscode-install.png new file mode 100644 index 0000000..50a835f Binary files /dev/null and b/docs/vscode-install.png differ diff --git a/docs/vscode-plugin.png b/docs/vscode-plugin.png new file mode 100644 index 0000000..9629256 Binary files /dev/null and b/docs/vscode-plugin.png differ diff --git a/docs/workflow_details.md b/docs/workflow_details.md new file mode 100644 index 0000000..8f1a067 --- /dev/null +++ b/docs/workflow_details.md @@ -0,0 +1,182 @@ +# 解释器作业的完成流程 + +## Step 1. 配置环境 + +见文档 [antlr_guide.md](antlr_guide.md)。 + +## Step 2. 阅读 "./resources/Python3Parser.g4" + +**阅读 `.g4` 文件需要一定的正则表达式基础。** +如果你不会正则表达式,可以参考 [正则表达式 - 维基百科](https://zh.wikipedia.org/wiki/%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F)。 + +我们假设有这样的语法规则(并不是我们这次作业的一部分): + +``` + plus: NUMBER '+' NUMBER; + NUMBER:[0-9]+; + ADD:'+'; +``` + +## Step 3. 阅读 "./generated/Python3Parser.h" + +你可以看到以下代码(对应着上面的语法规则): + +```c++ +//............... + class PlusContext : public antlr4::ParserRuleContext { + public: + PlusContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + std::vector NUMBER(); + antlr4::tree::TerminalNode* NUMBER(size_t i); + antlr4::tree::TerminalNode* ADD(); + + virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; + virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + } +//............... +``` + +因为在上述的 `plus` 语法中,`NUMBER` 一定要出现至少一次,所以 `PlusContext` 有以下两个函数: + +```c++ + std::vector NUMBER(); + antlr4::tree::TerminalNode* NUMBER(size_t i); +``` + +第一个函数返回一个 `vector`,包含了指向所有 `NUMBER` 的指针,第二个函数返回指向第 i 个 `NUMBER` 的指针,从 0 开始。 + +因为 `ADD` 只在 `plus` 中出现了一次,所以它只有以下函数,返回指向唯一的 `ADD` 的指针: + +```c++ + antlr4::tree::TerminalNode* ADD() +``` + +对于一个 `temrinal node`,有以下方法: + +```c++ +//............... +std::string toString() +Token* TerminalNodeImpl::getSymbol() +/* + * for example, consider: + * antlr4::tree::TerminalNode *it; + * it->toString() returns the string, for example, "123456" or "a" + * (so you need to converse (std::string)"123456" to (int)123456) + * it->getSymbol()->getTokenIndex() returns where this word is in the whole input. + */ +//............... +``` + +## Step 4. 完成 "./src/Evalvisitor.h" + +在这一步中,所要做的就是补全相关代码: + +```c++ +//............... + std::any visitPlus(Python3Parser::PlusContext *ctx) + { + /* + * TODO + * the pseudo-code is: + * return visit(ctx->NUMBER(0))+visit(ctx->NUMBER(1)); + */ + } +//............... +``` + +当写: + +```c++ + visit(ctx->NUMBER(0)) +``` + +等价于写: + +```c++ + visitAtom(ctx->NUMBER(0)) +``` + +所以我们只需要用 `visit` 函数来访问各种结点,而不是用 `visitBalabala`,想想为什么? + +## Step 5. 编译程序 + +输入以下代码即可: + +```sh +cmake -B build +cmake --build build +``` + +如果你不会使用 `cmake`,你可以借助于 `Clion` 来实现,如果你不知道这步如何操作,请询问助教。 + +## 神奇的 std::any + +关于这个类,你只需要会一个方法:`std::any_cast`。 + +譬如说,如果有以下的语法规则: + +``` +plus: atom '+' atom; +atom: NUMBER | STRING+; +NUMBER:[0-9]+; +STRING:[A-Z]+; +ADD:'+'; +``` + +在 Parser.h 中的 `Context` 长这样: + +```c++ +//............... + class PlusContext : public antlr4::ParserRuleContext { + public: + PlusContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + std::vector atom(); + AtomContext* atom(size_t i); + antlr4::tree::TerminalNode* ADD() + + virtual void enterRule(antlr4::tree::ParseTreeListener *listener) override; + virtual void exitRule(antlr4::tree::ParseTreeListener *listener) override; + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + } + //notice that the atom is AtomContext* type rather than a TerminalNode* type. + //an easy way to tell the difference is: capital letter-TerminalNode; xxxContext otherwise +//............... +``` + +那么相应的代码就长这样: + +```c++ +//............... + std::any visitPlus(Python3Parser::PlusContext *ctx) + { + auto ret1 = visit(ctx->NUMBER()); + auto ret2 = visit(ctx->NUMBER()); + if (auto v1int = std::any_cast(ret1), v2int = std::any_cast(ret2); + v1int && v2int) + return *v1int + *v2int; + else if (auto v1str = std::any_cast(ret1), v2str = std::any_cast(ret2); + v1str && v2str) + return *v1str + *v2str; + else + throw(std::string("unsupported operand type(s) for +: ") + ret1.type().name() + " + " + ret2.type().name());//no need + } +//............... +``` + +我们保证测试文件的语法都是正确的,所以后两行实则是不需要的。 + +`any_cast` 模板函数可以直接将 `any` 类型转换为你想要的类型,但是如果转换失败,它会直接抛出异常。 +而在上文的代码中,我们向模板填入的类型是目标类型的引用,所以如果类型不匹配、转换失败,它会返回 `nullptr`。 + +在 OOP 课程中,你们将会学习构造函数和析构函数。所以你们最好是在理解 `std::any` 是如何构造与析构的基础上,进行编程。通过阅读[cppreference](https://zh.cppreference.com/w/cpp/utility/any)来理解。如果这对于你们来说太过困难,请求助助教。 + +https://www.cnblogs.com/mangoyuan/p/6446046.html + +https://www.cnblogs.com/xiaoshiwang/p/9590029.html + +搜索 "C++11 traits" 来获得更多信息。 diff --git a/generated/CMakeLists.txt b/generated/CMakeLists.txt new file mode 100644 index 0000000..48a4dc3 --- /dev/null +++ b/generated/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) + +include_directories(/usr/include/antlr4-runtime/) + +file(GLOB PyAntlrSrc *.cpp) + +add_library(PyAntlr STATIC ${PyAntlrSrc}) diff --git a/generated/Python3Lexer.cpp b/generated/Python3Lexer.cpp new file mode 100644 index 0000000..6f11176 --- /dev/null +++ b/generated/Python3Lexer.cpp @@ -0,0 +1,632 @@ + +#include +#include + + +// Generated from Python3Lexer.g4 by ANTLR 4.13.1 + + +#include "Python3Lexer.h" + + +using namespace antlr4; + + + +using namespace antlr4; + +namespace { + +struct Python3LexerStaticData final { + Python3LexerStaticData(std::vector ruleNames, + std::vector channelNames, + std::vector modeNames, + std::vector literalNames, + std::vector symbolicNames) + : ruleNames(std::move(ruleNames)), channelNames(std::move(channelNames)), + modeNames(std::move(modeNames)), literalNames(std::move(literalNames)), + symbolicNames(std::move(symbolicNames)), + vocabulary(this->literalNames, this->symbolicNames) {} + + Python3LexerStaticData(const Python3LexerStaticData&) = delete; + Python3LexerStaticData(Python3LexerStaticData&&) = delete; + Python3LexerStaticData& operator=(const Python3LexerStaticData&) = delete; + Python3LexerStaticData& operator=(Python3LexerStaticData&&) = delete; + + std::vector decisionToDFA; + antlr4::atn::PredictionContextCache sharedContextCache; + const std::vector ruleNames; + const std::vector channelNames; + const std::vector modeNames; + const std::vector literalNames; + const std::vector symbolicNames; + const antlr4::dfa::Vocabulary vocabulary; + antlr4::atn::SerializedATNView serializedATN; + std::unique_ptr atn; +}; + +::antlr4::internal::OnceFlag python3lexerLexerOnceFlag; +#if ANTLR4_USE_THREAD_LOCAL_CACHE +static thread_local +#endif +Python3LexerStaticData *python3lexerLexerStaticData = nullptr; + +void python3lexerLexerInitialize() { +#if ANTLR4_USE_THREAD_LOCAL_CACHE + if (python3lexerLexerStaticData != nullptr) { + return; + } +#else + assert(python3lexerLexerStaticData == nullptr); +#endif + auto staticData = std::make_unique( + std::vector{ + "STRING", "NUMBER", "INTEGER", "DEF", "RETURN", "IF", "ELIF", "ELSE", + "WHILE", "FOR", "IN", "OR", "AND", "NOT", "NONE", "TRUE", "FALSE", + "CONTINUE", "BREAK", "NEWLINE", "NAME", "STRING_LITERAL", "BYTES_LITERAL", + "DECIMAL_INTEGER", "OCT_INTEGER", "HEX_INTEGER", "BIN_INTEGER", "FLOAT_NUMBER", + "IMAG_NUMBER", "DOT", "ELLIPSIS", "STAR", "OPEN_PAREN", "CLOSE_PAREN", + "COMMA", "COLON", "SEMI_COLON", "POWER", "ASSIGN", "OPEN_BRACK", "CLOSE_BRACK", + "OR_OP", "XOR", "AND_OP", "LEFT_SHIFT", "RIGHT_SHIFT", "ADD", "MINUS", + "DIV", "MOD", "IDIV", "NOT_OP", "OPEN_BRACE", "CLOSE_BRACE", "LESS_THAN", + "GREATER_THAN", "EQUALS", "GT_EQ", "LT_EQ", "NOT_EQ_1", "NOT_EQ_2", + "AT", "ARROW", "ADD_ASSIGN", "SUB_ASSIGN", "MULT_ASSIGN", "AT_ASSIGN", + "DIV_ASSIGN", "MOD_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", + "LEFT_SHIFT_ASSIGN", "RIGHT_SHIFT_ASSIGN", "POWER_ASSIGN", "IDIV_ASSIGN", + "SKIP_", "UNKNOWN_CHAR", "SHORT_STRING", "LONG_STRING", "LONG_STRING_ITEM", + "LONG_STRING_CHAR", "STRING_ESCAPE_SEQ", "NON_ZERO_DIGIT", "DIGIT", + "OCT_DIGIT", "HEX_DIGIT", "BIN_DIGIT", "POINT_FLOAT", "EXPONENT_FLOAT", + "INT_PART", "FRACTION", "EXPONENT", "SHORT_BYTES", "LONG_BYTES", "LONG_BYTES_ITEM", + "SHORT_BYTES_CHAR_NO_SINGLE_QUOTE", "SHORT_BYTES_CHAR_NO_DOUBLE_QUOTE", + "LONG_BYTES_CHAR", "BYTES_ESCAPE_SEQ", "SPACES", "COMMENT", "LINE_JOINING", + "ID_START", "ID_CONTINUE" + }, + std::vector{ + "DEFAULT_TOKEN_CHANNEL", "HIDDEN" + }, + std::vector{ + "DEFAULT_MODE" + }, + std::vector{ + "", "", "", "", "", "", "'def'", "'return'", "'if'", "'elif'", "'else'", + "'while'", "'for'", "'in'", "'or'", "'and'", "'not'", "'None'", "'True'", + "'False'", "'continue'", "'break'", "", "", "", "", "", "", "", "", + "", "", "'.'", "'...'", "'*'", "'('", "')'", "','", "':'", "';'", + "'**'", "'='", "'['", "']'", "'|'", "'^'", "'&'", "'<<'", "'>>'", + "'+'", "'-'", "'/'", "'%'", "'//'", "'~'", "'{'", "'}'", "'<'", "'>'", + "'=='", "'>='", "'<='", "'<>'", "'!='", "'@'", "'->'", "'+='", "'-='", + "'*='", "'@='", "'/='", "'%='", "'&='", "'|='", "'^='", "'<<='", "'>>='", + "'**='", "'//='" + }, + std::vector{ + "", "INDENT", "DEDENT", "STRING", "NUMBER", "INTEGER", "DEF", "RETURN", + "IF", "ELIF", "ELSE", "WHILE", "FOR", "IN", "OR", "AND", "NOT", "NONE", + "TRUE", "FALSE", "CONTINUE", "BREAK", "NEWLINE", "NAME", "STRING_LITERAL", + "BYTES_LITERAL", "DECIMAL_INTEGER", "OCT_INTEGER", "HEX_INTEGER", + "BIN_INTEGER", "FLOAT_NUMBER", "IMAG_NUMBER", "DOT", "ELLIPSIS", "STAR", + "OPEN_PAREN", "CLOSE_PAREN", "COMMA", "COLON", "SEMI_COLON", "POWER", + "ASSIGN", "OPEN_BRACK", "CLOSE_BRACK", "OR_OP", "XOR", "AND_OP", "LEFT_SHIFT", + "RIGHT_SHIFT", "ADD", "MINUS", "DIV", "MOD", "IDIV", "NOT_OP", "OPEN_BRACE", + "CLOSE_BRACE", "LESS_THAN", "GREATER_THAN", "EQUALS", "GT_EQ", "LT_EQ", + "NOT_EQ_1", "NOT_EQ_2", "AT", "ARROW", "ADD_ASSIGN", "SUB_ASSIGN", + "MULT_ASSIGN", "AT_ASSIGN", "DIV_ASSIGN", "MOD_ASSIGN", "AND_ASSIGN", + "OR_ASSIGN", "XOR_ASSIGN", "LEFT_SHIFT_ASSIGN", "RIGHT_SHIFT_ASSIGN", + "POWER_ASSIGN", "IDIV_ASSIGN", "SKIP_", "UNKNOWN_CHAR" + } + ); + static const int32_t serializedATNSegment[] = { + 4,0,80,732,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, + 6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14, + 7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21, + 7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28, + 7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35, + 7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42, + 7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49, + 7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56, + 7,56,2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63, + 7,63,2,64,7,64,2,65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70, + 7,70,2,71,7,71,2,72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77, + 7,77,2,78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84, + 7,84,2,85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,2,91, + 7,91,2,92,7,92,2,93,7,93,2,94,7,94,2,95,7,95,2,96,7,96,2,97,7,97,2,98, + 7,98,2,99,7,99,2,100,7,100,2,101,7,101,2,102,7,102,2,103,7,103,2,104, + 7,104,1,0,1,0,3,0,214,8,0,1,1,1,1,1,1,3,1,219,8,1,1,2,1,2,1,2,1,2,3,2, + 225,8,2,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,6,1, + 6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9, + 1,9,1,10,1,10,1,10,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,13,1,13,1,13, + 1,13,1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16, + 1,16,1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,18,1,18, + 1,18,1,18,1,18,1,18,1,19,1,19,1,19,3,19,309,8,19,1,19,1,19,3,19,313,8, + 19,1,19,3,19,316,8,19,3,19,318,8,19,1,19,1,19,1,20,1,20,5,20,324,8,20, + 10,20,12,20,327,9,20,1,21,1,21,1,21,1,21,1,21,3,21,334,8,21,1,21,1,21, + 3,21,338,8,21,1,22,1,22,1,22,1,22,1,22,3,22,345,8,22,1,22,1,22,3,22,349, + 8,22,1,23,1,23,5,23,353,8,23,10,23,12,23,356,9,23,1,23,4,23,359,8,23, + 11,23,12,23,360,3,23,363,8,23,1,24,1,24,1,24,4,24,368,8,24,11,24,12,24, + 369,1,25,1,25,1,25,4,25,375,8,25,11,25,12,25,376,1,26,1,26,1,26,4,26, + 382,8,26,11,26,12,26,383,1,27,1,27,3,27,388,8,27,1,28,1,28,3,28,392,8, + 28,1,28,1,28,1,29,1,29,1,30,1,30,1,30,1,30,1,31,1,31,1,32,1,32,1,32,1, + 33,1,33,1,33,1,34,1,34,1,35,1,35,1,36,1,36,1,37,1,37,1,37,1,38,1,38,1, + 39,1,39,1,39,1,40,1,40,1,40,1,41,1,41,1,42,1,42,1,43,1,43,1,44,1,44,1, + 44,1,45,1,45,1,45,1,46,1,46,1,47,1,47,1,48,1,48,1,49,1,49,1,50,1,50,1, + 50,1,51,1,51,1,52,1,52,1,52,1,53,1,53,1,53,1,54,1,54,1,55,1,55,1,56,1, + 56,1,56,1,57,1,57,1,57,1,58,1,58,1,58,1,59,1,59,1,59,1,60,1,60,1,60,1, + 61,1,61,1,62,1,62,1,62,1,63,1,63,1,63,1,64,1,64,1,64,1,65,1,65,1,65,1, + 66,1,66,1,66,1,67,1,67,1,67,1,68,1,68,1,68,1,69,1,69,1,69,1,70,1,70,1, + 70,1,71,1,71,1,71,1,72,1,72,1,72,1,72,1,73,1,73,1,73,1,73,1,74,1,74,1, + 74,1,74,1,75,1,75,1,75,1,75,1,76,1,76,1,76,3,76,528,8,76,1,76,1,76,1, + 77,1,77,1,78,1,78,1,78,5,78,537,8,78,10,78,12,78,540,9,78,1,78,1,78,1, + 78,1,78,5,78,546,8,78,10,78,12,78,549,9,78,1,78,3,78,552,8,78,1,79,1, + 79,1,79,1,79,1,79,5,79,559,8,79,10,79,12,79,562,9,79,1,79,1,79,1,79,1, + 79,1,79,1,79,1,79,1,79,5,79,572,8,79,10,79,12,79,575,9,79,1,79,1,79,1, + 79,3,79,580,8,79,1,80,1,80,3,80,584,8,80,1,81,1,81,1,82,1,82,1,82,1,82, + 3,82,592,8,82,1,83,1,83,1,84,1,84,1,85,1,85,1,86,1,86,1,87,1,87,1,88, + 3,88,605,8,88,1,88,1,88,1,88,1,88,3,88,611,8,88,1,89,1,89,3,89,615,8, + 89,1,89,1,89,1,90,4,90,620,8,90,11,90,12,90,621,1,91,1,91,4,91,626,8, + 91,11,91,12,91,627,1,92,1,92,3,92,632,8,92,1,92,4,92,635,8,92,11,92,12, + 92,636,1,93,1,93,1,93,5,93,642,8,93,10,93,12,93,645,9,93,1,93,1,93,1, + 93,1,93,5,93,651,8,93,10,93,12,93,654,9,93,1,93,3,93,657,8,93,1,94,1, + 94,1,94,1,94,1,94,5,94,664,8,94,10,94,12,94,667,9,94,1,94,1,94,1,94,1, + 94,1,94,1,94,1,94,1,94,5,94,677,8,94,10,94,12,94,680,9,94,1,94,1,94,1, + 94,3,94,685,8,94,1,95,1,95,3,95,689,8,95,1,96,3,96,692,8,96,1,97,3,97, + 695,8,97,1,98,3,98,698,8,98,1,99,1,99,1,99,1,100,4,100,704,8,100,11,100, + 12,100,705,1,101,1,101,5,101,710,8,101,10,101,12,101,713,9,101,1,102, + 1,102,3,102,717,8,102,1,102,3,102,720,8,102,1,102,1,102,3,102,724,8,102, + 1,103,3,103,727,8,103,1,104,1,104,3,104,731,8,104,4,560,573,665,678,0, + 105,1,3,3,4,5,5,7,6,9,7,11,8,13,9,15,10,17,11,19,12,21,13,23,14,25,15, + 27,16,29,17,31,18,33,19,35,20,37,21,39,22,41,23,43,24,45,25,47,26,49, + 27,51,28,53,29,55,30,57,31,59,32,61,33,63,34,65,35,67,36,69,37,71,38, + 73,39,75,40,77,41,79,42,81,43,83,44,85,45,87,46,89,47,91,48,93,49,95, + 50,97,51,99,52,101,53,103,54,105,55,107,56,109,57,111,58,113,59,115,60, + 117,61,119,62,121,63,123,64,125,65,127,66,129,67,131,68,133,69,135,70, + 137,71,139,72,141,73,143,74,145,75,147,76,149,77,151,78,153,79,155,80, + 157,0,159,0,161,0,163,0,165,0,167,0,169,0,171,0,173,0,175,0,177,0,179, + 0,181,0,183,0,185,0,187,0,189,0,191,0,193,0,195,0,197,0,199,0,201,0,203, + 0,205,0,207,0,209,0,1,0,25,6,0,70,70,82,82,85,85,102,102,114,114,117, + 117,2,0,70,70,102,102,2,0,82,82,114,114,2,0,66,66,98,98,2,0,79,79,111, + 111,2,0,88,88,120,120,2,0,74,74,106,106,4,0,10,10,12,13,39,39,92,92,4, + 0,10,10,12,13,34,34,92,92,1,0,92,92,1,0,49,57,1,0,48,57,1,0,48,55,3,0, + 48,57,65,70,97,102,1,0,48,49,2,0,69,69,101,101,2,0,43,43,45,45,5,0,0, + 9,11,12,14,38,40,91,93,127,5,0,0,9,11,12,14,33,35,91,93,127,2,0,0,91, + 93,127,1,0,0,127,2,0,9,9,32,32,2,0,10,10,12,13,295,0,65,90,95,95,97,122, + 170,170,181,181,186,186,192,214,216,246,248,577,592,705,710,721,736,740, + 750,750,890,890,902,902,904,906,908,908,910,929,931,974,976,1013,1015, + 1153,1162,1230,1232,1273,1280,1295,1329,1366,1369,1369,1377,1415,1488, + 1514,1520,1522,1569,1594,1600,1610,1646,1647,1649,1747,1749,1749,1765, + 1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1901,1920, + 1957,1969,1969,2308,2361,2365,2365,2384,2384,2392,2401,2429,2429,2437, + 2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510, + 2510,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602, + 2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693, + 2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768, + 2768,2784,2785,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869, + 2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958, + 2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990, + 3001,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3168,3169,3205, + 3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3294,3294,3296, + 3297,3333,3340,3342,3344,3346,3368,3370,3385,3424,3425,3461,3478,3482, + 3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713, + 3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745, + 3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776, + 3780,3782,3782,3804,3805,3840,3840,3904,3911,3913,3946,3976,3979,4096, + 4129,4131,4135,4137,4138,4176,4181,4256,4293,4304,4346,4348,4348,4352, + 4441,4447,4514,4520,4601,4608,4680,4682,4685,4688,4694,4696,4696,4698, + 4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802, + 4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5108,5121, + 5740,5743,5750,5761,5786,5792,5866,5870,5872,5888,5900,5902,5905,5920, + 5937,5952,5969,5984,5996,5998,6000,6016,6067,6103,6103,6108,6108,6176, + 6263,6272,6312,6400,6428,6480,6509,6512,6516,6528,6569,6593,6599,6656, + 6678,7424,7615,7680,7835,7840,7929,7936,7957,7960,7965,7968,8005,8008, + 8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118, + 8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178, + 8180,8182,8188,8305,8305,8319,8319,8336,8340,8450,8450,8455,8455,8458, + 8467,8469,8469,8472,8477,8484,8484,8486,8486,8488,8488,8490,8497,8499, + 8505,8508,8511,8517,8521,8544,8579,11264,11310,11312,11358,11392,11492, + 11520,11557,11568,11621,11631,11631,11648,11670,11680,11686,11688,11694, + 11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742, + 12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12443,12447, + 12449,12538,12540,12543,12549,12588,12593,12686,12704,12727,12784,12799, + 13312,19893,19968,40891,40960,42124,43008,43009,43011,43013,43015,43018, + 43020,43042,44032,55203,63744,64045,64048,64106,64112,64217,64256,64262, + 64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318, + 64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967, + 65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470, + 65474,65479,65482,65487,65490,65495,65498,65500,148,0,48,57,768,879,1155, + 1158,1425,1465,1467,1469,1471,1471,1473,1474,1476,1477,1479,1479,1552, + 1557,1611,1630,1632,1641,1648,1648,1750,1756,1759,1764,1767,1768,1770, + 1773,1776,1785,1809,1809,1840,1866,1958,1968,2305,2307,2364,2364,2366, + 2381,2385,2388,2402,2403,2406,2415,2433,2435,2492,2492,2494,2500,2503, + 2504,2507,2509,2519,2519,2530,2531,2534,2543,2561,2563,2620,2620,2622, + 2626,2631,2632,2635,2637,2662,2673,2689,2691,2748,2748,2750,2757,2759, + 2761,2763,2765,2786,2787,2790,2799,2817,2819,2876,2876,2878,2883,2887, + 2888,2891,2893,2902,2903,2918,2927,2946,2946,3006,3010,3014,3016,3018, + 3021,3031,3031,3046,3055,3073,3075,3134,3140,3142,3144,3146,3149,3157, + 3158,3174,3183,3202,3203,3260,3260,3262,3268,3270,3272,3274,3277,3285, + 3286,3302,3311,3330,3331,3390,3395,3398,3400,3402,3405,3415,3415,3430, + 3439,3458,3459,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3633, + 3633,3636,3642,3655,3662,3664,3673,3761,3761,3764,3769,3771,3772,3784, + 3789,3792,3801,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902, + 3903,3953,3972,3974,3975,3984,3991,3993,4028,4038,4038,4140,4146,4150, + 4153,4160,4169,4182,4185,4959,4959,4969,4977,5906,5908,5938,5940,5970, + 5971,6002,6003,6070,6099,6109,6109,6112,6121,6155,6157,6160,6169,6313, + 6313,6432,6443,6448,6459,6470,6479,6576,6592,6600,6601,6608,6617,6679, + 6683,7616,7619,8255,8256,8276,8276,8400,8412,8417,8417,8421,8427,12330, + 12335,12441,12442,43010,43010,43014,43014,43019,43019,43043,43047,64286, + 64286,65024,65039,65056,65059,65075,65076,65101,65103,65296,65305,65343, + 65343,764,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0, + 0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21, + 1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0, + 0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0, + 0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53, + 1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0, + 0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0, + 0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85, + 1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0, + 0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0, + 0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,1,0,0, + 0,0,117,1,0,0,0,0,119,1,0,0,0,0,121,1,0,0,0,0,123,1,0,0,0,0,125,1,0,0, + 0,0,127,1,0,0,0,0,129,1,0,0,0,0,131,1,0,0,0,0,133,1,0,0,0,0,135,1,0,0, + 0,0,137,1,0,0,0,0,139,1,0,0,0,0,141,1,0,0,0,0,143,1,0,0,0,0,145,1,0,0, + 0,0,147,1,0,0,0,0,149,1,0,0,0,0,151,1,0,0,0,0,153,1,0,0,0,0,155,1,0,0, + 0,1,213,1,0,0,0,3,218,1,0,0,0,5,224,1,0,0,0,7,226,1,0,0,0,9,230,1,0,0, + 0,11,237,1,0,0,0,13,240,1,0,0,0,15,245,1,0,0,0,17,250,1,0,0,0,19,256, + 1,0,0,0,21,260,1,0,0,0,23,263,1,0,0,0,25,266,1,0,0,0,27,270,1,0,0,0,29, + 274,1,0,0,0,31,279,1,0,0,0,33,284,1,0,0,0,35,290,1,0,0,0,37,299,1,0,0, + 0,39,317,1,0,0,0,41,321,1,0,0,0,43,333,1,0,0,0,45,344,1,0,0,0,47,362, + 1,0,0,0,49,364,1,0,0,0,51,371,1,0,0,0,53,378,1,0,0,0,55,387,1,0,0,0,57, + 391,1,0,0,0,59,395,1,0,0,0,61,397,1,0,0,0,63,401,1,0,0,0,65,403,1,0,0, + 0,67,406,1,0,0,0,69,409,1,0,0,0,71,411,1,0,0,0,73,413,1,0,0,0,75,415, + 1,0,0,0,77,418,1,0,0,0,79,420,1,0,0,0,81,423,1,0,0,0,83,426,1,0,0,0,85, + 428,1,0,0,0,87,430,1,0,0,0,89,432,1,0,0,0,91,435,1,0,0,0,93,438,1,0,0, + 0,95,440,1,0,0,0,97,442,1,0,0,0,99,444,1,0,0,0,101,446,1,0,0,0,103,449, + 1,0,0,0,105,451,1,0,0,0,107,454,1,0,0,0,109,457,1,0,0,0,111,459,1,0,0, + 0,113,461,1,0,0,0,115,464,1,0,0,0,117,467,1,0,0,0,119,470,1,0,0,0,121, + 473,1,0,0,0,123,476,1,0,0,0,125,478,1,0,0,0,127,481,1,0,0,0,129,484,1, + 0,0,0,131,487,1,0,0,0,133,490,1,0,0,0,135,493,1,0,0,0,137,496,1,0,0,0, + 139,499,1,0,0,0,141,502,1,0,0,0,143,505,1,0,0,0,145,508,1,0,0,0,147,512, + 1,0,0,0,149,516,1,0,0,0,151,520,1,0,0,0,153,527,1,0,0,0,155,531,1,0,0, + 0,157,551,1,0,0,0,159,579,1,0,0,0,161,583,1,0,0,0,163,585,1,0,0,0,165, + 591,1,0,0,0,167,593,1,0,0,0,169,595,1,0,0,0,171,597,1,0,0,0,173,599,1, + 0,0,0,175,601,1,0,0,0,177,610,1,0,0,0,179,614,1,0,0,0,181,619,1,0,0,0, + 183,623,1,0,0,0,185,629,1,0,0,0,187,656,1,0,0,0,189,684,1,0,0,0,191,688, + 1,0,0,0,193,691,1,0,0,0,195,694,1,0,0,0,197,697,1,0,0,0,199,699,1,0,0, + 0,201,703,1,0,0,0,203,707,1,0,0,0,205,714,1,0,0,0,207,726,1,0,0,0,209, + 730,1,0,0,0,211,214,3,43,21,0,212,214,3,45,22,0,213,211,1,0,0,0,213,212, + 1,0,0,0,214,2,1,0,0,0,215,219,3,5,2,0,216,219,3,55,27,0,217,219,3,57, + 28,0,218,215,1,0,0,0,218,216,1,0,0,0,218,217,1,0,0,0,219,4,1,0,0,0,220, + 225,3,47,23,0,221,225,3,49,24,0,222,225,3,51,25,0,223,225,3,53,26,0,224, + 220,1,0,0,0,224,221,1,0,0,0,224,222,1,0,0,0,224,223,1,0,0,0,225,6,1,0, + 0,0,226,227,5,100,0,0,227,228,5,101,0,0,228,229,5,102,0,0,229,8,1,0,0, + 0,230,231,5,114,0,0,231,232,5,101,0,0,232,233,5,116,0,0,233,234,5,117, + 0,0,234,235,5,114,0,0,235,236,5,110,0,0,236,10,1,0,0,0,237,238,5,105, + 0,0,238,239,5,102,0,0,239,12,1,0,0,0,240,241,5,101,0,0,241,242,5,108, + 0,0,242,243,5,105,0,0,243,244,5,102,0,0,244,14,1,0,0,0,245,246,5,101, + 0,0,246,247,5,108,0,0,247,248,5,115,0,0,248,249,5,101,0,0,249,16,1,0, + 0,0,250,251,5,119,0,0,251,252,5,104,0,0,252,253,5,105,0,0,253,254,5,108, + 0,0,254,255,5,101,0,0,255,18,1,0,0,0,256,257,5,102,0,0,257,258,5,111, + 0,0,258,259,5,114,0,0,259,20,1,0,0,0,260,261,5,105,0,0,261,262,5,110, + 0,0,262,22,1,0,0,0,263,264,5,111,0,0,264,265,5,114,0,0,265,24,1,0,0,0, + 266,267,5,97,0,0,267,268,5,110,0,0,268,269,5,100,0,0,269,26,1,0,0,0,270, + 271,5,110,0,0,271,272,5,111,0,0,272,273,5,116,0,0,273,28,1,0,0,0,274, + 275,5,78,0,0,275,276,5,111,0,0,276,277,5,110,0,0,277,278,5,101,0,0,278, + 30,1,0,0,0,279,280,5,84,0,0,280,281,5,114,0,0,281,282,5,117,0,0,282,283, + 5,101,0,0,283,32,1,0,0,0,284,285,5,70,0,0,285,286,5,97,0,0,286,287,5, + 108,0,0,287,288,5,115,0,0,288,289,5,101,0,0,289,34,1,0,0,0,290,291,5, + 99,0,0,291,292,5,111,0,0,292,293,5,110,0,0,293,294,5,116,0,0,294,295, + 5,105,0,0,295,296,5,110,0,0,296,297,5,117,0,0,297,298,5,101,0,0,298,36, + 1,0,0,0,299,300,5,98,0,0,300,301,5,114,0,0,301,302,5,101,0,0,302,303, + 5,97,0,0,303,304,5,107,0,0,304,38,1,0,0,0,305,306,4,19,0,0,306,318,3, + 201,100,0,307,309,5,13,0,0,308,307,1,0,0,0,308,309,1,0,0,0,309,310,1, + 0,0,0,310,313,5,10,0,0,311,313,2,12,13,0,312,308,1,0,0,0,312,311,1,0, + 0,0,313,315,1,0,0,0,314,316,3,201,100,0,315,314,1,0,0,0,315,316,1,0,0, + 0,316,318,1,0,0,0,317,305,1,0,0,0,317,312,1,0,0,0,318,319,1,0,0,0,319, + 320,6,19,0,0,320,40,1,0,0,0,321,325,3,207,103,0,322,324,3,209,104,0,323, + 322,1,0,0,0,324,327,1,0,0,0,325,323,1,0,0,0,325,326,1,0,0,0,326,42,1, + 0,0,0,327,325,1,0,0,0,328,334,7,0,0,0,329,330,7,1,0,0,330,334,7,2,0,0, + 331,332,7,2,0,0,332,334,7,1,0,0,333,328,1,0,0,0,333,329,1,0,0,0,333,331, + 1,0,0,0,333,334,1,0,0,0,334,337,1,0,0,0,335,338,3,157,78,0,336,338,3, + 159,79,0,337,335,1,0,0,0,337,336,1,0,0,0,338,44,1,0,0,0,339,345,7,3,0, + 0,340,341,7,3,0,0,341,345,7,2,0,0,342,343,7,2,0,0,343,345,7,3,0,0,344, + 339,1,0,0,0,344,340,1,0,0,0,344,342,1,0,0,0,345,348,1,0,0,0,346,349,3, + 187,93,0,347,349,3,189,94,0,348,346,1,0,0,0,348,347,1,0,0,0,349,46,1, + 0,0,0,350,354,3,167,83,0,351,353,3,169,84,0,352,351,1,0,0,0,353,356,1, + 0,0,0,354,352,1,0,0,0,354,355,1,0,0,0,355,363,1,0,0,0,356,354,1,0,0,0, + 357,359,5,48,0,0,358,357,1,0,0,0,359,360,1,0,0,0,360,358,1,0,0,0,360, + 361,1,0,0,0,361,363,1,0,0,0,362,350,1,0,0,0,362,358,1,0,0,0,363,48,1, + 0,0,0,364,365,5,48,0,0,365,367,7,4,0,0,366,368,3,171,85,0,367,366,1,0, + 0,0,368,369,1,0,0,0,369,367,1,0,0,0,369,370,1,0,0,0,370,50,1,0,0,0,371, + 372,5,48,0,0,372,374,7,5,0,0,373,375,3,173,86,0,374,373,1,0,0,0,375,376, + 1,0,0,0,376,374,1,0,0,0,376,377,1,0,0,0,377,52,1,0,0,0,378,379,5,48,0, + 0,379,381,7,3,0,0,380,382,3,175,87,0,381,380,1,0,0,0,382,383,1,0,0,0, + 383,381,1,0,0,0,383,384,1,0,0,0,384,54,1,0,0,0,385,388,3,177,88,0,386, + 388,3,179,89,0,387,385,1,0,0,0,387,386,1,0,0,0,388,56,1,0,0,0,389,392, + 3,55,27,0,390,392,3,181,90,0,391,389,1,0,0,0,391,390,1,0,0,0,392,393, + 1,0,0,0,393,394,7,6,0,0,394,58,1,0,0,0,395,396,5,46,0,0,396,60,1,0,0, + 0,397,398,5,46,0,0,398,399,5,46,0,0,399,400,5,46,0,0,400,62,1,0,0,0,401, + 402,5,42,0,0,402,64,1,0,0,0,403,404,5,40,0,0,404,405,6,32,1,0,405,66, + 1,0,0,0,406,407,5,41,0,0,407,408,6,33,2,0,408,68,1,0,0,0,409,410,5,44, + 0,0,410,70,1,0,0,0,411,412,5,58,0,0,412,72,1,0,0,0,413,414,5,59,0,0,414, + 74,1,0,0,0,415,416,5,42,0,0,416,417,5,42,0,0,417,76,1,0,0,0,418,419,5, + 61,0,0,419,78,1,0,0,0,420,421,5,91,0,0,421,422,6,39,3,0,422,80,1,0,0, + 0,423,424,5,93,0,0,424,425,6,40,4,0,425,82,1,0,0,0,426,427,5,124,0,0, + 427,84,1,0,0,0,428,429,5,94,0,0,429,86,1,0,0,0,430,431,5,38,0,0,431,88, + 1,0,0,0,432,433,5,60,0,0,433,434,5,60,0,0,434,90,1,0,0,0,435,436,5,62, + 0,0,436,437,5,62,0,0,437,92,1,0,0,0,438,439,5,43,0,0,439,94,1,0,0,0,440, + 441,5,45,0,0,441,96,1,0,0,0,442,443,5,47,0,0,443,98,1,0,0,0,444,445,5, + 37,0,0,445,100,1,0,0,0,446,447,5,47,0,0,447,448,5,47,0,0,448,102,1,0, + 0,0,449,450,5,126,0,0,450,104,1,0,0,0,451,452,5,123,0,0,452,453,6,52, + 5,0,453,106,1,0,0,0,454,455,5,125,0,0,455,456,6,53,6,0,456,108,1,0,0, + 0,457,458,5,60,0,0,458,110,1,0,0,0,459,460,5,62,0,0,460,112,1,0,0,0,461, + 462,5,61,0,0,462,463,5,61,0,0,463,114,1,0,0,0,464,465,5,62,0,0,465,466, + 5,61,0,0,466,116,1,0,0,0,467,468,5,60,0,0,468,469,5,61,0,0,469,118,1, + 0,0,0,470,471,5,60,0,0,471,472,5,62,0,0,472,120,1,0,0,0,473,474,5,33, + 0,0,474,475,5,61,0,0,475,122,1,0,0,0,476,477,5,64,0,0,477,124,1,0,0,0, + 478,479,5,45,0,0,479,480,5,62,0,0,480,126,1,0,0,0,481,482,5,43,0,0,482, + 483,5,61,0,0,483,128,1,0,0,0,484,485,5,45,0,0,485,486,5,61,0,0,486,130, + 1,0,0,0,487,488,5,42,0,0,488,489,5,61,0,0,489,132,1,0,0,0,490,491,5,64, + 0,0,491,492,5,61,0,0,492,134,1,0,0,0,493,494,5,47,0,0,494,495,5,61,0, + 0,495,136,1,0,0,0,496,497,5,37,0,0,497,498,5,61,0,0,498,138,1,0,0,0,499, + 500,5,38,0,0,500,501,5,61,0,0,501,140,1,0,0,0,502,503,5,124,0,0,503,504, + 5,61,0,0,504,142,1,0,0,0,505,506,5,94,0,0,506,507,5,61,0,0,507,144,1, + 0,0,0,508,509,5,60,0,0,509,510,5,60,0,0,510,511,5,61,0,0,511,146,1,0, + 0,0,512,513,5,62,0,0,513,514,5,62,0,0,514,515,5,61,0,0,515,148,1,0,0, + 0,516,517,5,42,0,0,517,518,5,42,0,0,518,519,5,61,0,0,519,150,1,0,0,0, + 520,521,5,47,0,0,521,522,5,47,0,0,522,523,5,61,0,0,523,152,1,0,0,0,524, + 528,3,201,100,0,525,528,3,203,101,0,526,528,3,205,102,0,527,524,1,0,0, + 0,527,525,1,0,0,0,527,526,1,0,0,0,528,529,1,0,0,0,529,530,6,76,7,0,530, + 154,1,0,0,0,531,532,9,0,0,0,532,156,1,0,0,0,533,538,5,39,0,0,534,537, + 3,165,82,0,535,537,8,7,0,0,536,534,1,0,0,0,536,535,1,0,0,0,537,540,1, + 0,0,0,538,536,1,0,0,0,538,539,1,0,0,0,539,541,1,0,0,0,540,538,1,0,0,0, + 541,552,5,39,0,0,542,547,5,34,0,0,543,546,3,165,82,0,544,546,8,8,0,0, + 545,543,1,0,0,0,545,544,1,0,0,0,546,549,1,0,0,0,547,545,1,0,0,0,547,548, + 1,0,0,0,548,550,1,0,0,0,549,547,1,0,0,0,550,552,5,34,0,0,551,533,1,0, + 0,0,551,542,1,0,0,0,552,158,1,0,0,0,553,554,5,39,0,0,554,555,5,39,0,0, + 555,556,5,39,0,0,556,560,1,0,0,0,557,559,3,161,80,0,558,557,1,0,0,0,559, + 562,1,0,0,0,560,561,1,0,0,0,560,558,1,0,0,0,561,563,1,0,0,0,562,560,1, + 0,0,0,563,564,5,39,0,0,564,565,5,39,0,0,565,580,5,39,0,0,566,567,5,34, + 0,0,567,568,5,34,0,0,568,569,5,34,0,0,569,573,1,0,0,0,570,572,3,161,80, + 0,571,570,1,0,0,0,572,575,1,0,0,0,573,574,1,0,0,0,573,571,1,0,0,0,574, + 576,1,0,0,0,575,573,1,0,0,0,576,577,5,34,0,0,577,578,5,34,0,0,578,580, + 5,34,0,0,579,553,1,0,0,0,579,566,1,0,0,0,580,160,1,0,0,0,581,584,3,163, + 81,0,582,584,3,165,82,0,583,581,1,0,0,0,583,582,1,0,0,0,584,162,1,0,0, + 0,585,586,8,9,0,0,586,164,1,0,0,0,587,588,5,92,0,0,588,592,9,0,0,0,589, + 590,5,92,0,0,590,592,3,39,19,0,591,587,1,0,0,0,591,589,1,0,0,0,592,166, + 1,0,0,0,593,594,7,10,0,0,594,168,1,0,0,0,595,596,7,11,0,0,596,170,1,0, + 0,0,597,598,7,12,0,0,598,172,1,0,0,0,599,600,7,13,0,0,600,174,1,0,0,0, + 601,602,7,14,0,0,602,176,1,0,0,0,603,605,3,181,90,0,604,603,1,0,0,0,604, + 605,1,0,0,0,605,606,1,0,0,0,606,611,3,183,91,0,607,608,3,181,90,0,608, + 609,5,46,0,0,609,611,1,0,0,0,610,604,1,0,0,0,610,607,1,0,0,0,611,178, + 1,0,0,0,612,615,3,181,90,0,613,615,3,177,88,0,614,612,1,0,0,0,614,613, + 1,0,0,0,615,616,1,0,0,0,616,617,3,185,92,0,617,180,1,0,0,0,618,620,3, + 169,84,0,619,618,1,0,0,0,620,621,1,0,0,0,621,619,1,0,0,0,621,622,1,0, + 0,0,622,182,1,0,0,0,623,625,5,46,0,0,624,626,3,169,84,0,625,624,1,0,0, + 0,626,627,1,0,0,0,627,625,1,0,0,0,627,628,1,0,0,0,628,184,1,0,0,0,629, + 631,7,15,0,0,630,632,7,16,0,0,631,630,1,0,0,0,631,632,1,0,0,0,632,634, + 1,0,0,0,633,635,3,169,84,0,634,633,1,0,0,0,635,636,1,0,0,0,636,634,1, + 0,0,0,636,637,1,0,0,0,637,186,1,0,0,0,638,643,5,39,0,0,639,642,3,193, + 96,0,640,642,3,199,99,0,641,639,1,0,0,0,641,640,1,0,0,0,642,645,1,0,0, + 0,643,641,1,0,0,0,643,644,1,0,0,0,644,646,1,0,0,0,645,643,1,0,0,0,646, + 657,5,39,0,0,647,652,5,34,0,0,648,651,3,195,97,0,649,651,3,199,99,0,650, + 648,1,0,0,0,650,649,1,0,0,0,651,654,1,0,0,0,652,650,1,0,0,0,652,653,1, + 0,0,0,653,655,1,0,0,0,654,652,1,0,0,0,655,657,5,34,0,0,656,638,1,0,0, + 0,656,647,1,0,0,0,657,188,1,0,0,0,658,659,5,39,0,0,659,660,5,39,0,0,660, + 661,5,39,0,0,661,665,1,0,0,0,662,664,3,191,95,0,663,662,1,0,0,0,664,667, + 1,0,0,0,665,666,1,0,0,0,665,663,1,0,0,0,666,668,1,0,0,0,667,665,1,0,0, + 0,668,669,5,39,0,0,669,670,5,39,0,0,670,685,5,39,0,0,671,672,5,34,0,0, + 672,673,5,34,0,0,673,674,5,34,0,0,674,678,1,0,0,0,675,677,3,191,95,0, + 676,675,1,0,0,0,677,680,1,0,0,0,678,679,1,0,0,0,678,676,1,0,0,0,679,681, + 1,0,0,0,680,678,1,0,0,0,681,682,5,34,0,0,682,683,5,34,0,0,683,685,5,34, + 0,0,684,658,1,0,0,0,684,671,1,0,0,0,685,190,1,0,0,0,686,689,3,197,98, + 0,687,689,3,199,99,0,688,686,1,0,0,0,688,687,1,0,0,0,689,192,1,0,0,0, + 690,692,7,17,0,0,691,690,1,0,0,0,692,194,1,0,0,0,693,695,7,18,0,0,694, + 693,1,0,0,0,695,196,1,0,0,0,696,698,7,19,0,0,697,696,1,0,0,0,698,198, + 1,0,0,0,699,700,5,92,0,0,700,701,7,20,0,0,701,200,1,0,0,0,702,704,7,21, + 0,0,703,702,1,0,0,0,704,705,1,0,0,0,705,703,1,0,0,0,705,706,1,0,0,0,706, + 202,1,0,0,0,707,711,5,35,0,0,708,710,8,22,0,0,709,708,1,0,0,0,710,713, + 1,0,0,0,711,709,1,0,0,0,711,712,1,0,0,0,712,204,1,0,0,0,713,711,1,0,0, + 0,714,716,5,92,0,0,715,717,3,201,100,0,716,715,1,0,0,0,716,717,1,0,0, + 0,717,723,1,0,0,0,718,720,5,13,0,0,719,718,1,0,0,0,719,720,1,0,0,0,720, + 721,1,0,0,0,721,724,5,10,0,0,722,724,2,12,13,0,723,719,1,0,0,0,723,722, + 1,0,0,0,724,206,1,0,0,0,725,727,7,23,0,0,726,725,1,0,0,0,727,208,1,0, + 0,0,728,731,3,207,103,0,729,731,7,24,0,0,730,728,1,0,0,0,730,729,1,0, + 0,0,731,210,1,0,0,0,58,0,213,218,224,308,312,315,317,325,333,337,344, + 348,354,360,362,369,376,383,387,391,527,536,538,545,547,551,560,573,579, + 583,591,604,610,614,621,627,631,636,641,643,650,652,656,665,678,684,688, + 691,694,697,705,711,716,719,723,726,730,8,1,19,0,1,32,1,1,33,2,1,39,3, + 1,40,4,1,52,5,1,53,6,6,0,0 + }; + staticData->serializedATN = antlr4::atn::SerializedATNView(serializedATNSegment, sizeof(serializedATNSegment) / sizeof(serializedATNSegment[0])); + + antlr4::atn::ATNDeserializer deserializer; + staticData->atn = deserializer.deserialize(staticData->serializedATN); + + const size_t count = staticData->atn->getNumberOfDecisions(); + staticData->decisionToDFA.reserve(count); + for (size_t i = 0; i < count; i++) { + staticData->decisionToDFA.emplace_back(staticData->atn->getDecisionState(i), i); + } + python3lexerLexerStaticData = staticData.release(); +} + +} + +Python3Lexer::Python3Lexer(CharStream *input) : Lexer(input) { + Python3Lexer::initialize(); + _interpreter = new atn::LexerATNSimulator(this, *python3lexerLexerStaticData->atn, python3lexerLexerStaticData->decisionToDFA, python3lexerLexerStaticData->sharedContextCache); +} + +Python3Lexer::~Python3Lexer() { + delete _interpreter; +} + +std::string Python3Lexer::getGrammarFileName() const { + return "Python3Lexer.g4"; +} + +const std::vector& Python3Lexer::getRuleNames() const { + return python3lexerLexerStaticData->ruleNames; +} + +const std::vector& Python3Lexer::getChannelNames() const { + return python3lexerLexerStaticData->channelNames; +} + +const std::vector& Python3Lexer::getModeNames() const { + return python3lexerLexerStaticData->modeNames; +} + +const dfa::Vocabulary& Python3Lexer::getVocabulary() const { + return python3lexerLexerStaticData->vocabulary; +} + +antlr4::atn::SerializedATNView Python3Lexer::getSerializedATN() const { + return python3lexerLexerStaticData->serializedATN; +} + +const atn::ATN& Python3Lexer::getATN() const { + return *python3lexerLexerStaticData->atn; +} + + +void Python3Lexer::action(RuleContext *context, size_t ruleIndex, size_t actionIndex) { + switch (ruleIndex) { + case 19: NEWLINEAction(antlrcpp::downCast(context), actionIndex); break; + case 32: OPEN_PARENAction(antlrcpp::downCast(context), actionIndex); break; + case 33: CLOSE_PARENAction(antlrcpp::downCast(context), actionIndex); break; + case 39: OPEN_BRACKAction(antlrcpp::downCast(context), actionIndex); break; + case 40: CLOSE_BRACKAction(antlrcpp::downCast(context), actionIndex); break; + case 52: OPEN_BRACEAction(antlrcpp::downCast(context), actionIndex); break; + case 53: CLOSE_BRACEAction(antlrcpp::downCast(context), actionIndex); break; + + default: + break; + } +} + +bool Python3Lexer::sempred(RuleContext *context, size_t ruleIndex, size_t predicateIndex) { + switch (ruleIndex) { + case 19: return NEWLINESempred(antlrcpp::downCast(context), predicateIndex); + + default: + break; + } + return true; +} + +void Python3Lexer::NEWLINEAction(antlr4::RuleContext *context, size_t actionIndex) { + switch (actionIndex) { + case 0: + { + std::string pattern1="[^\r\n\f]+"; + std::string pattern2="[\r\n\f]+"; + std::regex re1(pattern1); + std::regex re2(pattern2); + std::string fmt=""; + std::string newLine=regex_replace(getText(),re1,fmt); + std::string spaces = regex_replace(getText(),re2,fmt); + int next = _input->LA(1); + if (opened > 0 || next == '\r' || next == '\n' || next == '\f' || next == '#') { + // If we're inside a list or on a blank line, ignore all indents, + // dedents and line breaks. + skip(); + } + else { + emit(commonToken(NEWLINE, newLine)); + int indent = getIndentationCount(spaces); + int previous = indents.empty() ? 0 : indents.top(); + if (indent == previous) { + // skip indents of the same size as the present indent-size + skip(); + } + else if (indent > previous) { + indents.push(indent); + emit(commonToken(Python3Lexer::INDENT, spaces)); + } + else { + // Possibly emit more than 1 DEDENT token. + while(!indents.empty() && indents.top() > indent) { + this->emit(createDedent()); + indents.pop(); + } + } + } + } + break; + + default: + break; + } +} + +void Python3Lexer::OPEN_PARENAction(antlr4::RuleContext *context, size_t actionIndex) { + switch (actionIndex) { + case 1: opened++; break; + + default: + break; + } +} + +void Python3Lexer::CLOSE_PARENAction(antlr4::RuleContext *context, size_t actionIndex) { + switch (actionIndex) { + case 2: opened--; break; + + default: + break; + } +} + +void Python3Lexer::OPEN_BRACKAction(antlr4::RuleContext *context, size_t actionIndex) { + switch (actionIndex) { + case 3: opened++; break; + + default: + break; + } +} + +void Python3Lexer::CLOSE_BRACKAction(antlr4::RuleContext *context, size_t actionIndex) { + switch (actionIndex) { + case 4: opened--; break; + + default: + break; + } +} + +void Python3Lexer::OPEN_BRACEAction(antlr4::RuleContext *context, size_t actionIndex) { + switch (actionIndex) { + case 5: opened++; break; + + default: + break; + } +} + +void Python3Lexer::CLOSE_BRACEAction(antlr4::RuleContext *context, size_t actionIndex) { + switch (actionIndex) { + case 6: opened--; break; + + default: + break; + } +} + + +bool Python3Lexer::NEWLINESempred(antlr4::RuleContext *_localctx, size_t predicateIndex) { + switch (predicateIndex) { + case 0: return atStartOfInput(); + + default: + break; + } + return true; +} + + +void Python3Lexer::initialize() { +#if ANTLR4_USE_THREAD_LOCAL_CACHE + python3lexerLexerInitialize(); +#else + ::antlr4::internal::call_once(python3lexerLexerOnceFlag, python3lexerLexerInitialize); +#endif +} diff --git a/generated/Python3Lexer.h b/generated/Python3Lexer.h new file mode 100644 index 0000000..de9d2cc --- /dev/null +++ b/generated/Python3Lexer.h @@ -0,0 +1,186 @@ + +#include +#include + + +// Generated from Python3Lexer.g4 by ANTLR 4.13.1 + +#pragma once + + +#include "antlr4-runtime.h" + + + + +class Python3Lexer : public antlr4::Lexer { +public: + enum { + INDENT = 1, DEDENT = 2, STRING = 3, NUMBER = 4, INTEGER = 5, DEF = 6, + RETURN = 7, IF = 8, ELIF = 9, ELSE = 10, WHILE = 11, FOR = 12, IN = 13, + OR = 14, AND = 15, NOT = 16, NONE = 17, TRUE = 18, FALSE = 19, CONTINUE = 20, + BREAK = 21, NEWLINE = 22, NAME = 23, STRING_LITERAL = 24, BYTES_LITERAL = 25, + DECIMAL_INTEGER = 26, OCT_INTEGER = 27, HEX_INTEGER = 28, BIN_INTEGER = 29, + FLOAT_NUMBER = 30, IMAG_NUMBER = 31, DOT = 32, ELLIPSIS = 33, STAR = 34, + OPEN_PAREN = 35, CLOSE_PAREN = 36, COMMA = 37, COLON = 38, SEMI_COLON = 39, + POWER = 40, ASSIGN = 41, OPEN_BRACK = 42, CLOSE_BRACK = 43, OR_OP = 44, + XOR = 45, AND_OP = 46, LEFT_SHIFT = 47, RIGHT_SHIFT = 48, ADD = 49, + MINUS = 50, DIV = 51, MOD = 52, IDIV = 53, NOT_OP = 54, OPEN_BRACE = 55, + CLOSE_BRACE = 56, LESS_THAN = 57, GREATER_THAN = 58, EQUALS = 59, GT_EQ = 60, + LT_EQ = 61, NOT_EQ_1 = 62, NOT_EQ_2 = 63, AT = 64, ARROW = 65, ADD_ASSIGN = 66, + SUB_ASSIGN = 67, MULT_ASSIGN = 68, AT_ASSIGN = 69, DIV_ASSIGN = 70, + MOD_ASSIGN = 71, AND_ASSIGN = 72, OR_ASSIGN = 73, XOR_ASSIGN = 74, LEFT_SHIFT_ASSIGN = 75, + RIGHT_SHIFT_ASSIGN = 76, POWER_ASSIGN = 77, IDIV_ASSIGN = 78, SKIP_ = 79, + UNKNOWN_CHAR = 80 + }; + + explicit Python3Lexer(antlr4::CharStream *input); + + ~Python3Lexer() override; + + + // A queue where extra tokens are pushed on (see the NEWLINE lexer rule). + private: std::list tokens ; + // The stack that keeps track of the indentation level. + private: std::stack indents ; + // The amount of opened braces, brackets and parenthesis. + private: int opened = 0; + // The most recently produced token. + private: antlr4::Token* lastToken = nullptr; + + public: void emit(std::unique_ptr t) override { + token.release(); + token=std::move(t); + + tokens.push_back(token.get()); + // std::cout<toString()< nextToken() override { + // Check if the end-of-file is ahead and there are still some DEDENTS expected. + if (_input->LA(1) == EOF && !this->indents.empty()) { + // Remove any trailing EOF tokens from our buffer. + for(auto i=tokens.rbegin();i!=tokens.rend();){ + auto tmp=i; + i++; + if((*tmp)->getType()==EOF){ + tokens.erase(tmp.base()); + } + } + + + // First emit an extra line break that serves as the end of the statement. + std::unique_ptr tmp=commonToken(Python3Lexer::NEWLINE, "\n"); + this->emit(std::move(tmp)); + + // Now emit as much DEDENT tokens as needed. + while (!indents.empty()) { + auto tmp=createDedent(); + this->emit(std::move(tmp)); + indents.pop(); + } + + // Put the EOF back on the token stream. + this->emit(commonToken(static_cast(Python3Lexer::EOF), "")); + } + + std::unique_ptr next = Lexer::nextToken(); + + if (next->getChannel() == antlr4::Token::DEFAULT_CHANNEL) { + // Keep track of the last token on the default channel. + this->lastToken = next.get(); + } + if (tokens.empty()) { + return std::move(next); + } else{ + next.release(); + auto tmp=tokens.front(); + tokens.pop_front(); + return std::unique_ptr(tmp); + } + + } + + private: std::unique_ptr createDedent() { + auto dedent = commonToken(Python3Lexer::DEDENT, ""); + dedent->setLine(this->lastToken->getLine()); + return std::move(dedent); + } + + private: std::unique_ptr commonToken(int type,std::string text) { + int stop = this->getCharIndex() - 1; + int start = text.empty() ? stop : stop - text.length() + 1; + return std::move(std::unique_ptr(new antlr4::CommonToken({ this, _input }, + type, + DEFAULT_TOKEN_CHANNEL, start, stop))); + } + + // Calculates the indentation of the provided spaces, taking the + // following rules into account: + // + // "Tabs are replaced (from left to right) by one to eight spaces + // such that the total number of characters up to and including + // the replacement is a multiple of eight [...]" + // + // -- https://docs.python.org/3.1/reference/lexical_analysis.html#indentation + static int getIndentationCount(std::string spaces) { + int count = 0; + for (char ch : spaces) { + switch (ch) { + case '\t': + count += 8 - (count % 8); + break; + default: + // A normal space char. + count++; + } + } + + return count; + } + + bool atStartOfInput() { + return Lexer::getCharPositionInLine() == 0 && Lexer::getLine() == 1; + } + + + std::string getGrammarFileName() const override; + + const std::vector& getRuleNames() const override; + + const std::vector& getChannelNames() const override; + + const std::vector& getModeNames() const override; + + const antlr4::dfa::Vocabulary& getVocabulary() const override; + + antlr4::atn::SerializedATNView getSerializedATN() const override; + + const antlr4::atn::ATN& getATN() const override; + + void action(antlr4::RuleContext *context, size_t ruleIndex, size_t actionIndex) override; + + bool sempred(antlr4::RuleContext *_localctx, size_t ruleIndex, size_t predicateIndex) override; + + // By default the static state used to implement the lexer is lazily initialized during the first + // call to the constructor. You can call this function if you wish to initialize the static state + // ahead of time. + static void initialize(); + +private: + + // Individual action functions triggered by action() above. + void NEWLINEAction(antlr4::RuleContext *context, size_t actionIndex); + void OPEN_PARENAction(antlr4::RuleContext *context, size_t actionIndex); + void CLOSE_PARENAction(antlr4::RuleContext *context, size_t actionIndex); + void OPEN_BRACKAction(antlr4::RuleContext *context, size_t actionIndex); + void CLOSE_BRACKAction(antlr4::RuleContext *context, size_t actionIndex); + void OPEN_BRACEAction(antlr4::RuleContext *context, size_t actionIndex); + void CLOSE_BRACEAction(antlr4::RuleContext *context, size_t actionIndex); + + // Individual semantic predicate functions triggered by sempred() above. + bool NEWLINESempred(antlr4::RuleContext *_localctx, size_t predicateIndex); + +}; + diff --git a/generated/Python3Lexer.interp b/generated/Python3Lexer.interp new file mode 100644 index 0000000..44f172e --- /dev/null +++ b/generated/Python3Lexer.interp @@ -0,0 +1,282 @@ +token literal names: +null +null +null +null +null +null +'def' +'return' +'if' +'elif' +'else' +'while' +'for' +'in' +'or' +'and' +'not' +'None' +'True' +'False' +'continue' +'break' +null +null +null +null +null +null +null +null +null +null +'.' +'...' +'*' +'(' +')' +',' +':' +';' +'**' +'=' +'[' +']' +'|' +'^' +'&' +'<<' +'>>' +'+' +'-' +'/' +'%' +'//' +'~' +'{' +'}' +'<' +'>' +'==' +'>=' +'<=' +'<>' +'!=' +'@' +'->' +'+=' +'-=' +'*=' +'@=' +'/=' +'%=' +'&=' +'|=' +'^=' +'<<=' +'>>=' +'**=' +'//=' +null +null + +token symbolic names: +null +INDENT +DEDENT +STRING +NUMBER +INTEGER +DEF +RETURN +IF +ELIF +ELSE +WHILE +FOR +IN +OR +AND +NOT +NONE +TRUE +FALSE +CONTINUE +BREAK +NEWLINE +NAME +STRING_LITERAL +BYTES_LITERAL +DECIMAL_INTEGER +OCT_INTEGER +HEX_INTEGER +BIN_INTEGER +FLOAT_NUMBER +IMAG_NUMBER +DOT +ELLIPSIS +STAR +OPEN_PAREN +CLOSE_PAREN +COMMA +COLON +SEMI_COLON +POWER +ASSIGN +OPEN_BRACK +CLOSE_BRACK +OR_OP +XOR +AND_OP +LEFT_SHIFT +RIGHT_SHIFT +ADD +MINUS +DIV +MOD +IDIV +NOT_OP +OPEN_BRACE +CLOSE_BRACE +LESS_THAN +GREATER_THAN +EQUALS +GT_EQ +LT_EQ +NOT_EQ_1 +NOT_EQ_2 +AT +ARROW +ADD_ASSIGN +SUB_ASSIGN +MULT_ASSIGN +AT_ASSIGN +DIV_ASSIGN +MOD_ASSIGN +AND_ASSIGN +OR_ASSIGN +XOR_ASSIGN +LEFT_SHIFT_ASSIGN +RIGHT_SHIFT_ASSIGN +POWER_ASSIGN +IDIV_ASSIGN +SKIP_ +UNKNOWN_CHAR + +rule names: +STRING +NUMBER +INTEGER +DEF +RETURN +IF +ELIF +ELSE +WHILE +FOR +IN +OR +AND +NOT +NONE +TRUE +FALSE +CONTINUE +BREAK +NEWLINE +NAME +STRING_LITERAL +BYTES_LITERAL +DECIMAL_INTEGER +OCT_INTEGER +HEX_INTEGER +BIN_INTEGER +FLOAT_NUMBER +IMAG_NUMBER +DOT +ELLIPSIS +STAR +OPEN_PAREN +CLOSE_PAREN +COMMA +COLON +SEMI_COLON +POWER +ASSIGN +OPEN_BRACK +CLOSE_BRACK +OR_OP +XOR +AND_OP +LEFT_SHIFT +RIGHT_SHIFT +ADD +MINUS +DIV +MOD +IDIV +NOT_OP +OPEN_BRACE +CLOSE_BRACE +LESS_THAN +GREATER_THAN +EQUALS +GT_EQ +LT_EQ +NOT_EQ_1 +NOT_EQ_2 +AT +ARROW +ADD_ASSIGN +SUB_ASSIGN +MULT_ASSIGN +AT_ASSIGN +DIV_ASSIGN +MOD_ASSIGN +AND_ASSIGN +OR_ASSIGN +XOR_ASSIGN +LEFT_SHIFT_ASSIGN +RIGHT_SHIFT_ASSIGN +POWER_ASSIGN +IDIV_ASSIGN +SKIP_ +UNKNOWN_CHAR +SHORT_STRING +LONG_STRING +LONG_STRING_ITEM +LONG_STRING_CHAR +STRING_ESCAPE_SEQ +NON_ZERO_DIGIT +DIGIT +OCT_DIGIT +HEX_DIGIT +BIN_DIGIT +POINT_FLOAT +EXPONENT_FLOAT +INT_PART +FRACTION +EXPONENT +SHORT_BYTES +LONG_BYTES +LONG_BYTES_ITEM +SHORT_BYTES_CHAR_NO_SINGLE_QUOTE +SHORT_BYTES_CHAR_NO_DOUBLE_QUOTE +LONG_BYTES_CHAR +BYTES_ESCAPE_SEQ +SPACES +COMMENT +LINE_JOINING +ID_START +ID_CONTINUE + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[4, 0, 80, 732, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 1, 0, 1, 0, 3, 0, 214, 8, 0, 1, 1, 1, 1, 1, 1, 3, 1, 219, 8, 1, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 225, 8, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 3, 19, 309, 8, 19, 1, 19, 1, 19, 3, 19, 313, 8, 19, 1, 19, 3, 19, 316, 8, 19, 3, 19, 318, 8, 19, 1, 19, 1, 19, 1, 20, 1, 20, 5, 20, 324, 8, 20, 10, 20, 12, 20, 327, 9, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 3, 21, 334, 8, 21, 1, 21, 1, 21, 3, 21, 338, 8, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 345, 8, 22, 1, 22, 1, 22, 3, 22, 349, 8, 22, 1, 23, 1, 23, 5, 23, 353, 8, 23, 10, 23, 12, 23, 356, 9, 23, 1, 23, 4, 23, 359, 8, 23, 11, 23, 12, 23, 360, 3, 23, 363, 8, 23, 1, 24, 1, 24, 1, 24, 4, 24, 368, 8, 24, 11, 24, 12, 24, 369, 1, 25, 1, 25, 1, 25, 4, 25, 375, 8, 25, 11, 25, 12, 25, 376, 1, 26, 1, 26, 1, 26, 4, 26, 382, 8, 26, 11, 26, 12, 26, 383, 1, 27, 1, 27, 3, 27, 388, 8, 27, 1, 28, 1, 28, 3, 28, 392, 8, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 3, 76, 528, 8, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 5, 78, 537, 8, 78, 10, 78, 12, 78, 540, 9, 78, 1, 78, 1, 78, 1, 78, 1, 78, 5, 78, 546, 8, 78, 10, 78, 12, 78, 549, 9, 78, 1, 78, 3, 78, 552, 8, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 5, 79, 559, 8, 79, 10, 79, 12, 79, 562, 9, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 5, 79, 572, 8, 79, 10, 79, 12, 79, 575, 9, 79, 1, 79, 1, 79, 1, 79, 3, 79, 580, 8, 79, 1, 80, 1, 80, 3, 80, 584, 8, 80, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 3, 82, 592, 8, 82, 1, 83, 1, 83, 1, 84, 1, 84, 1, 85, 1, 85, 1, 86, 1, 86, 1, 87, 1, 87, 1, 88, 3, 88, 605, 8, 88, 1, 88, 1, 88, 1, 88, 1, 88, 3, 88, 611, 8, 88, 1, 89, 1, 89, 3, 89, 615, 8, 89, 1, 89, 1, 89, 1, 90, 4, 90, 620, 8, 90, 11, 90, 12, 90, 621, 1, 91, 1, 91, 4, 91, 626, 8, 91, 11, 91, 12, 91, 627, 1, 92, 1, 92, 3, 92, 632, 8, 92, 1, 92, 4, 92, 635, 8, 92, 11, 92, 12, 92, 636, 1, 93, 1, 93, 1, 93, 5, 93, 642, 8, 93, 10, 93, 12, 93, 645, 9, 93, 1, 93, 1, 93, 1, 93, 1, 93, 5, 93, 651, 8, 93, 10, 93, 12, 93, 654, 9, 93, 1, 93, 3, 93, 657, 8, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 5, 94, 664, 8, 94, 10, 94, 12, 94, 667, 9, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 5, 94, 677, 8, 94, 10, 94, 12, 94, 680, 9, 94, 1, 94, 1, 94, 1, 94, 3, 94, 685, 8, 94, 1, 95, 1, 95, 3, 95, 689, 8, 95, 1, 96, 3, 96, 692, 8, 96, 1, 97, 3, 97, 695, 8, 97, 1, 98, 3, 98, 698, 8, 98, 1, 99, 1, 99, 1, 99, 1, 100, 4, 100, 704, 8, 100, 11, 100, 12, 100, 705, 1, 101, 1, 101, 5, 101, 710, 8, 101, 10, 101, 12, 101, 713, 9, 101, 1, 102, 1, 102, 3, 102, 717, 8, 102, 1, 102, 3, 102, 720, 8, 102, 1, 102, 1, 102, 3, 102, 724, 8, 102, 1, 103, 3, 103, 727, 8, 103, 1, 104, 1, 104, 3, 104, 731, 8, 104, 4, 560, 573, 665, 678, 0, 105, 1, 3, 3, 4, 5, 5, 7, 6, 9, 7, 11, 8, 13, 9, 15, 10, 17, 11, 19, 12, 21, 13, 23, 14, 25, 15, 27, 16, 29, 17, 31, 18, 33, 19, 35, 20, 37, 21, 39, 22, 41, 23, 43, 24, 45, 25, 47, 26, 49, 27, 51, 28, 53, 29, 55, 30, 57, 31, 59, 32, 61, 33, 63, 34, 65, 35, 67, 36, 69, 37, 71, 38, 73, 39, 75, 40, 77, 41, 79, 42, 81, 43, 83, 44, 85, 45, 87, 46, 89, 47, 91, 48, 93, 49, 95, 50, 97, 51, 99, 52, 101, 53, 103, 54, 105, 55, 107, 56, 109, 57, 111, 58, 113, 59, 115, 60, 117, 61, 119, 62, 121, 63, 123, 64, 125, 65, 127, 66, 129, 67, 131, 68, 133, 69, 135, 70, 137, 71, 139, 72, 141, 73, 143, 74, 145, 75, 147, 76, 149, 77, 151, 78, 153, 79, 155, 80, 157, 0, 159, 0, 161, 0, 163, 0, 165, 0, 167, 0, 169, 0, 171, 0, 173, 0, 175, 0, 177, 0, 179, 0, 181, 0, 183, 0, 185, 0, 187, 0, 189, 0, 191, 0, 193, 0, 195, 0, 197, 0, 199, 0, 201, 0, 203, 0, 205, 0, 207, 0, 209, 0, 1, 0, 25, 6, 0, 70, 70, 82, 82, 85, 85, 102, 102, 114, 114, 117, 117, 2, 0, 70, 70, 102, 102, 2, 0, 82, 82, 114, 114, 2, 0, 66, 66, 98, 98, 2, 0, 79, 79, 111, 111, 2, 0, 88, 88, 120, 120, 2, 0, 74, 74, 106, 106, 4, 0, 10, 10, 12, 13, 39, 39, 92, 92, 4, 0, 10, 10, 12, 13, 34, 34, 92, 92, 1, 0, 92, 92, 1, 0, 49, 57, 1, 0, 48, 57, 1, 0, 48, 55, 3, 0, 48, 57, 65, 70, 97, 102, 1, 0, 48, 49, 2, 0, 69, 69, 101, 101, 2, 0, 43, 43, 45, 45, 5, 0, 0, 9, 11, 12, 14, 38, 40, 91, 93, 127, 5, 0, 0, 9, 11, 12, 14, 33, 35, 91, 93, 127, 2, 0, 0, 91, 93, 127, 1, 0, 0, 127, 2, 0, 9, 9, 32, 32, 2, 0, 10, 10, 12, 13, 295, 0, 65, 90, 95, 95, 97, 122, 170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 577, 592, 705, 710, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 1013, 1015, 1153, 1162, 1230, 1232, 1273, 1280, 1295, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1901, 1920, 1957, 1969, 1969, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2429, 2429, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4346, 4348, 4348, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6569, 6593, 6599, 6656, 6678, 7424, 7615, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8340, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8497, 8499, 8505, 8508, 8511, 8517, 8521, 8544, 8579, 11264, 11310, 11312, 11358, 11392, 11492, 11520, 11557, 11568, 11621, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12443, 12447, 12449, 12538, 12540, 12543, 12549, 12588, 12593, 12686, 12704, 12727, 12784, 12799, 13312, 19893, 19968, 40891, 40960, 42124, 43008, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 44032, 55203, 63744, 64045, 64048, 64106, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 148, 0, 48, 57, 768, 879, 1155, 1158, 1425, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1552, 1557, 1611, 1630, 1632, 1641, 1648, 1648, 1750, 1756, 1759, 1764, 1767, 1768, 1770, 1773, 1776, 1785, 1809, 1809, 1840, 1866, 1958, 1968, 2305, 2307, 2364, 2364, 2366, 2381, 2385, 2388, 2402, 2403, 2406, 2415, 2433, 2435, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2530, 2531, 2534, 2543, 2561, 2563, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2662, 2673, 2689, 2691, 2748, 2748, 2750, 2757, 2759, 2761, 2763, 2765, 2786, 2787, 2790, 2799, 2817, 2819, 2876, 2876, 2878, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2918, 2927, 2946, 2946, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3046, 3055, 3073, 3075, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3174, 3183, 3202, 3203, 3260, 3260, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3302, 3311, 3330, 3331, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3430, 3439, 3458, 3459, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3633, 3633, 3636, 3642, 3655, 3662, 3664, 3673, 3761, 3761, 3764, 3769, 3771, 3772, 3784, 3789, 3792, 3801, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3903, 3953, 3972, 3974, 3975, 3984, 3991, 3993, 4028, 4038, 4038, 4140, 4146, 4150, 4153, 4160, 4169, 4182, 4185, 4959, 4959, 4969, 4977, 5906, 5908, 5938, 5940, 5970, 5971, 6002, 6003, 6070, 6099, 6109, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6313, 6313, 6432, 6443, 6448, 6459, 6470, 6479, 6576, 6592, 6600, 6601, 6608, 6617, 6679, 6683, 7616, 7619, 8255, 8256, 8276, 8276, 8400, 8412, 8417, 8417, 8421, 8427, 12330, 12335, 12441, 12442, 43010, 43010, 43014, 43014, 43019, 43019, 43043, 43047, 64286, 64286, 65024, 65039, 65056, 65059, 65075, 65076, 65101, 65103, 65296, 65305, 65343, 65343, 764, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 1, 213, 1, 0, 0, 0, 3, 218, 1, 0, 0, 0, 5, 224, 1, 0, 0, 0, 7, 226, 1, 0, 0, 0, 9, 230, 1, 0, 0, 0, 11, 237, 1, 0, 0, 0, 13, 240, 1, 0, 0, 0, 15, 245, 1, 0, 0, 0, 17, 250, 1, 0, 0, 0, 19, 256, 1, 0, 0, 0, 21, 260, 1, 0, 0, 0, 23, 263, 1, 0, 0, 0, 25, 266, 1, 0, 0, 0, 27, 270, 1, 0, 0, 0, 29, 274, 1, 0, 0, 0, 31, 279, 1, 0, 0, 0, 33, 284, 1, 0, 0, 0, 35, 290, 1, 0, 0, 0, 37, 299, 1, 0, 0, 0, 39, 317, 1, 0, 0, 0, 41, 321, 1, 0, 0, 0, 43, 333, 1, 0, 0, 0, 45, 344, 1, 0, 0, 0, 47, 362, 1, 0, 0, 0, 49, 364, 1, 0, 0, 0, 51, 371, 1, 0, 0, 0, 53, 378, 1, 0, 0, 0, 55, 387, 1, 0, 0, 0, 57, 391, 1, 0, 0, 0, 59, 395, 1, 0, 0, 0, 61, 397, 1, 0, 0, 0, 63, 401, 1, 0, 0, 0, 65, 403, 1, 0, 0, 0, 67, 406, 1, 0, 0, 0, 69, 409, 1, 0, 0, 0, 71, 411, 1, 0, 0, 0, 73, 413, 1, 0, 0, 0, 75, 415, 1, 0, 0, 0, 77, 418, 1, 0, 0, 0, 79, 420, 1, 0, 0, 0, 81, 423, 1, 0, 0, 0, 83, 426, 1, 0, 0, 0, 85, 428, 1, 0, 0, 0, 87, 430, 1, 0, 0, 0, 89, 432, 1, 0, 0, 0, 91, 435, 1, 0, 0, 0, 93, 438, 1, 0, 0, 0, 95, 440, 1, 0, 0, 0, 97, 442, 1, 0, 0, 0, 99, 444, 1, 0, 0, 0, 101, 446, 1, 0, 0, 0, 103, 449, 1, 0, 0, 0, 105, 451, 1, 0, 0, 0, 107, 454, 1, 0, 0, 0, 109, 457, 1, 0, 0, 0, 111, 459, 1, 0, 0, 0, 113, 461, 1, 0, 0, 0, 115, 464, 1, 0, 0, 0, 117, 467, 1, 0, 0, 0, 119, 470, 1, 0, 0, 0, 121, 473, 1, 0, 0, 0, 123, 476, 1, 0, 0, 0, 125, 478, 1, 0, 0, 0, 127, 481, 1, 0, 0, 0, 129, 484, 1, 0, 0, 0, 131, 487, 1, 0, 0, 0, 133, 490, 1, 0, 0, 0, 135, 493, 1, 0, 0, 0, 137, 496, 1, 0, 0, 0, 139, 499, 1, 0, 0, 0, 141, 502, 1, 0, 0, 0, 143, 505, 1, 0, 0, 0, 145, 508, 1, 0, 0, 0, 147, 512, 1, 0, 0, 0, 149, 516, 1, 0, 0, 0, 151, 520, 1, 0, 0, 0, 153, 527, 1, 0, 0, 0, 155, 531, 1, 0, 0, 0, 157, 551, 1, 0, 0, 0, 159, 579, 1, 0, 0, 0, 161, 583, 1, 0, 0, 0, 163, 585, 1, 0, 0, 0, 165, 591, 1, 0, 0, 0, 167, 593, 1, 0, 0, 0, 169, 595, 1, 0, 0, 0, 171, 597, 1, 0, 0, 0, 173, 599, 1, 0, 0, 0, 175, 601, 1, 0, 0, 0, 177, 610, 1, 0, 0, 0, 179, 614, 1, 0, 0, 0, 181, 619, 1, 0, 0, 0, 183, 623, 1, 0, 0, 0, 185, 629, 1, 0, 0, 0, 187, 656, 1, 0, 0, 0, 189, 684, 1, 0, 0, 0, 191, 688, 1, 0, 0, 0, 193, 691, 1, 0, 0, 0, 195, 694, 1, 0, 0, 0, 197, 697, 1, 0, 0, 0, 199, 699, 1, 0, 0, 0, 201, 703, 1, 0, 0, 0, 203, 707, 1, 0, 0, 0, 205, 714, 1, 0, 0, 0, 207, 726, 1, 0, 0, 0, 209, 730, 1, 0, 0, 0, 211, 214, 3, 43, 21, 0, 212, 214, 3, 45, 22, 0, 213, 211, 1, 0, 0, 0, 213, 212, 1, 0, 0, 0, 214, 2, 1, 0, 0, 0, 215, 219, 3, 5, 2, 0, 216, 219, 3, 55, 27, 0, 217, 219, 3, 57, 28, 0, 218, 215, 1, 0, 0, 0, 218, 216, 1, 0, 0, 0, 218, 217, 1, 0, 0, 0, 219, 4, 1, 0, 0, 0, 220, 225, 3, 47, 23, 0, 221, 225, 3, 49, 24, 0, 222, 225, 3, 51, 25, 0, 223, 225, 3, 53, 26, 0, 224, 220, 1, 0, 0, 0, 224, 221, 1, 0, 0, 0, 224, 222, 1, 0, 0, 0, 224, 223, 1, 0, 0, 0, 225, 6, 1, 0, 0, 0, 226, 227, 5, 100, 0, 0, 227, 228, 5, 101, 0, 0, 228, 229, 5, 102, 0, 0, 229, 8, 1, 0, 0, 0, 230, 231, 5, 114, 0, 0, 231, 232, 5, 101, 0, 0, 232, 233, 5, 116, 0, 0, 233, 234, 5, 117, 0, 0, 234, 235, 5, 114, 0, 0, 235, 236, 5, 110, 0, 0, 236, 10, 1, 0, 0, 0, 237, 238, 5, 105, 0, 0, 238, 239, 5, 102, 0, 0, 239, 12, 1, 0, 0, 0, 240, 241, 5, 101, 0, 0, 241, 242, 5, 108, 0, 0, 242, 243, 5, 105, 0, 0, 243, 244, 5, 102, 0, 0, 244, 14, 1, 0, 0, 0, 245, 246, 5, 101, 0, 0, 246, 247, 5, 108, 0, 0, 247, 248, 5, 115, 0, 0, 248, 249, 5, 101, 0, 0, 249, 16, 1, 0, 0, 0, 250, 251, 5, 119, 0, 0, 251, 252, 5, 104, 0, 0, 252, 253, 5, 105, 0, 0, 253, 254, 5, 108, 0, 0, 254, 255, 5, 101, 0, 0, 255, 18, 1, 0, 0, 0, 256, 257, 5, 102, 0, 0, 257, 258, 5, 111, 0, 0, 258, 259, 5, 114, 0, 0, 259, 20, 1, 0, 0, 0, 260, 261, 5, 105, 0, 0, 261, 262, 5, 110, 0, 0, 262, 22, 1, 0, 0, 0, 263, 264, 5, 111, 0, 0, 264, 265, 5, 114, 0, 0, 265, 24, 1, 0, 0, 0, 266, 267, 5, 97, 0, 0, 267, 268, 5, 110, 0, 0, 268, 269, 5, 100, 0, 0, 269, 26, 1, 0, 0, 0, 270, 271, 5, 110, 0, 0, 271, 272, 5, 111, 0, 0, 272, 273, 5, 116, 0, 0, 273, 28, 1, 0, 0, 0, 274, 275, 5, 78, 0, 0, 275, 276, 5, 111, 0, 0, 276, 277, 5, 110, 0, 0, 277, 278, 5, 101, 0, 0, 278, 30, 1, 0, 0, 0, 279, 280, 5, 84, 0, 0, 280, 281, 5, 114, 0, 0, 281, 282, 5, 117, 0, 0, 282, 283, 5, 101, 0, 0, 283, 32, 1, 0, 0, 0, 284, 285, 5, 70, 0, 0, 285, 286, 5, 97, 0, 0, 286, 287, 5, 108, 0, 0, 287, 288, 5, 115, 0, 0, 288, 289, 5, 101, 0, 0, 289, 34, 1, 0, 0, 0, 290, 291, 5, 99, 0, 0, 291, 292, 5, 111, 0, 0, 292, 293, 5, 110, 0, 0, 293, 294, 5, 116, 0, 0, 294, 295, 5, 105, 0, 0, 295, 296, 5, 110, 0, 0, 296, 297, 5, 117, 0, 0, 297, 298, 5, 101, 0, 0, 298, 36, 1, 0, 0, 0, 299, 300, 5, 98, 0, 0, 300, 301, 5, 114, 0, 0, 301, 302, 5, 101, 0, 0, 302, 303, 5, 97, 0, 0, 303, 304, 5, 107, 0, 0, 304, 38, 1, 0, 0, 0, 305, 306, 4, 19, 0, 0, 306, 318, 3, 201, 100, 0, 307, 309, 5, 13, 0, 0, 308, 307, 1, 0, 0, 0, 308, 309, 1, 0, 0, 0, 309, 310, 1, 0, 0, 0, 310, 313, 5, 10, 0, 0, 311, 313, 2, 12, 13, 0, 312, 308, 1, 0, 0, 0, 312, 311, 1, 0, 0, 0, 313, 315, 1, 0, 0, 0, 314, 316, 3, 201, 100, 0, 315, 314, 1, 0, 0, 0, 315, 316, 1, 0, 0, 0, 316, 318, 1, 0, 0, 0, 317, 305, 1, 0, 0, 0, 317, 312, 1, 0, 0, 0, 318, 319, 1, 0, 0, 0, 319, 320, 6, 19, 0, 0, 320, 40, 1, 0, 0, 0, 321, 325, 3, 207, 103, 0, 322, 324, 3, 209, 104, 0, 323, 322, 1, 0, 0, 0, 324, 327, 1, 0, 0, 0, 325, 323, 1, 0, 0, 0, 325, 326, 1, 0, 0, 0, 326, 42, 1, 0, 0, 0, 327, 325, 1, 0, 0, 0, 328, 334, 7, 0, 0, 0, 329, 330, 7, 1, 0, 0, 330, 334, 7, 2, 0, 0, 331, 332, 7, 2, 0, 0, 332, 334, 7, 1, 0, 0, 333, 328, 1, 0, 0, 0, 333, 329, 1, 0, 0, 0, 333, 331, 1, 0, 0, 0, 333, 334, 1, 0, 0, 0, 334, 337, 1, 0, 0, 0, 335, 338, 3, 157, 78, 0, 336, 338, 3, 159, 79, 0, 337, 335, 1, 0, 0, 0, 337, 336, 1, 0, 0, 0, 338, 44, 1, 0, 0, 0, 339, 345, 7, 3, 0, 0, 340, 341, 7, 3, 0, 0, 341, 345, 7, 2, 0, 0, 342, 343, 7, 2, 0, 0, 343, 345, 7, 3, 0, 0, 344, 339, 1, 0, 0, 0, 344, 340, 1, 0, 0, 0, 344, 342, 1, 0, 0, 0, 345, 348, 1, 0, 0, 0, 346, 349, 3, 187, 93, 0, 347, 349, 3, 189, 94, 0, 348, 346, 1, 0, 0, 0, 348, 347, 1, 0, 0, 0, 349, 46, 1, 0, 0, 0, 350, 354, 3, 167, 83, 0, 351, 353, 3, 169, 84, 0, 352, 351, 1, 0, 0, 0, 353, 356, 1, 0, 0, 0, 354, 352, 1, 0, 0, 0, 354, 355, 1, 0, 0, 0, 355, 363, 1, 0, 0, 0, 356, 354, 1, 0, 0, 0, 357, 359, 5, 48, 0, 0, 358, 357, 1, 0, 0, 0, 359, 360, 1, 0, 0, 0, 360, 358, 1, 0, 0, 0, 360, 361, 1, 0, 0, 0, 361, 363, 1, 0, 0, 0, 362, 350, 1, 0, 0, 0, 362, 358, 1, 0, 0, 0, 363, 48, 1, 0, 0, 0, 364, 365, 5, 48, 0, 0, 365, 367, 7, 4, 0, 0, 366, 368, 3, 171, 85, 0, 367, 366, 1, 0, 0, 0, 368, 369, 1, 0, 0, 0, 369, 367, 1, 0, 0, 0, 369, 370, 1, 0, 0, 0, 370, 50, 1, 0, 0, 0, 371, 372, 5, 48, 0, 0, 372, 374, 7, 5, 0, 0, 373, 375, 3, 173, 86, 0, 374, 373, 1, 0, 0, 0, 375, 376, 1, 0, 0, 0, 376, 374, 1, 0, 0, 0, 376, 377, 1, 0, 0, 0, 377, 52, 1, 0, 0, 0, 378, 379, 5, 48, 0, 0, 379, 381, 7, 3, 0, 0, 380, 382, 3, 175, 87, 0, 381, 380, 1, 0, 0, 0, 382, 383, 1, 0, 0, 0, 383, 381, 1, 0, 0, 0, 383, 384, 1, 0, 0, 0, 384, 54, 1, 0, 0, 0, 385, 388, 3, 177, 88, 0, 386, 388, 3, 179, 89, 0, 387, 385, 1, 0, 0, 0, 387, 386, 1, 0, 0, 0, 388, 56, 1, 0, 0, 0, 389, 392, 3, 55, 27, 0, 390, 392, 3, 181, 90, 0, 391, 389, 1, 0, 0, 0, 391, 390, 1, 0, 0, 0, 392, 393, 1, 0, 0, 0, 393, 394, 7, 6, 0, 0, 394, 58, 1, 0, 0, 0, 395, 396, 5, 46, 0, 0, 396, 60, 1, 0, 0, 0, 397, 398, 5, 46, 0, 0, 398, 399, 5, 46, 0, 0, 399, 400, 5, 46, 0, 0, 400, 62, 1, 0, 0, 0, 401, 402, 5, 42, 0, 0, 402, 64, 1, 0, 0, 0, 403, 404, 5, 40, 0, 0, 404, 405, 6, 32, 1, 0, 405, 66, 1, 0, 0, 0, 406, 407, 5, 41, 0, 0, 407, 408, 6, 33, 2, 0, 408, 68, 1, 0, 0, 0, 409, 410, 5, 44, 0, 0, 410, 70, 1, 0, 0, 0, 411, 412, 5, 58, 0, 0, 412, 72, 1, 0, 0, 0, 413, 414, 5, 59, 0, 0, 414, 74, 1, 0, 0, 0, 415, 416, 5, 42, 0, 0, 416, 417, 5, 42, 0, 0, 417, 76, 1, 0, 0, 0, 418, 419, 5, 61, 0, 0, 419, 78, 1, 0, 0, 0, 420, 421, 5, 91, 0, 0, 421, 422, 6, 39, 3, 0, 422, 80, 1, 0, 0, 0, 423, 424, 5, 93, 0, 0, 424, 425, 6, 40, 4, 0, 425, 82, 1, 0, 0, 0, 426, 427, 5, 124, 0, 0, 427, 84, 1, 0, 0, 0, 428, 429, 5, 94, 0, 0, 429, 86, 1, 0, 0, 0, 430, 431, 5, 38, 0, 0, 431, 88, 1, 0, 0, 0, 432, 433, 5, 60, 0, 0, 433, 434, 5, 60, 0, 0, 434, 90, 1, 0, 0, 0, 435, 436, 5, 62, 0, 0, 436, 437, 5, 62, 0, 0, 437, 92, 1, 0, 0, 0, 438, 439, 5, 43, 0, 0, 439, 94, 1, 0, 0, 0, 440, 441, 5, 45, 0, 0, 441, 96, 1, 0, 0, 0, 442, 443, 5, 47, 0, 0, 443, 98, 1, 0, 0, 0, 444, 445, 5, 37, 0, 0, 445, 100, 1, 0, 0, 0, 446, 447, 5, 47, 0, 0, 447, 448, 5, 47, 0, 0, 448, 102, 1, 0, 0, 0, 449, 450, 5, 126, 0, 0, 450, 104, 1, 0, 0, 0, 451, 452, 5, 123, 0, 0, 452, 453, 6, 52, 5, 0, 453, 106, 1, 0, 0, 0, 454, 455, 5, 125, 0, 0, 455, 456, 6, 53, 6, 0, 456, 108, 1, 0, 0, 0, 457, 458, 5, 60, 0, 0, 458, 110, 1, 0, 0, 0, 459, 460, 5, 62, 0, 0, 460, 112, 1, 0, 0, 0, 461, 462, 5, 61, 0, 0, 462, 463, 5, 61, 0, 0, 463, 114, 1, 0, 0, 0, 464, 465, 5, 62, 0, 0, 465, 466, 5, 61, 0, 0, 466, 116, 1, 0, 0, 0, 467, 468, 5, 60, 0, 0, 468, 469, 5, 61, 0, 0, 469, 118, 1, 0, 0, 0, 470, 471, 5, 60, 0, 0, 471, 472, 5, 62, 0, 0, 472, 120, 1, 0, 0, 0, 473, 474, 5, 33, 0, 0, 474, 475, 5, 61, 0, 0, 475, 122, 1, 0, 0, 0, 476, 477, 5, 64, 0, 0, 477, 124, 1, 0, 0, 0, 478, 479, 5, 45, 0, 0, 479, 480, 5, 62, 0, 0, 480, 126, 1, 0, 0, 0, 481, 482, 5, 43, 0, 0, 482, 483, 5, 61, 0, 0, 483, 128, 1, 0, 0, 0, 484, 485, 5, 45, 0, 0, 485, 486, 5, 61, 0, 0, 486, 130, 1, 0, 0, 0, 487, 488, 5, 42, 0, 0, 488, 489, 5, 61, 0, 0, 489, 132, 1, 0, 0, 0, 490, 491, 5, 64, 0, 0, 491, 492, 5, 61, 0, 0, 492, 134, 1, 0, 0, 0, 493, 494, 5, 47, 0, 0, 494, 495, 5, 61, 0, 0, 495, 136, 1, 0, 0, 0, 496, 497, 5, 37, 0, 0, 497, 498, 5, 61, 0, 0, 498, 138, 1, 0, 0, 0, 499, 500, 5, 38, 0, 0, 500, 501, 5, 61, 0, 0, 501, 140, 1, 0, 0, 0, 502, 503, 5, 124, 0, 0, 503, 504, 5, 61, 0, 0, 504, 142, 1, 0, 0, 0, 505, 506, 5, 94, 0, 0, 506, 507, 5, 61, 0, 0, 507, 144, 1, 0, 0, 0, 508, 509, 5, 60, 0, 0, 509, 510, 5, 60, 0, 0, 510, 511, 5, 61, 0, 0, 511, 146, 1, 0, 0, 0, 512, 513, 5, 62, 0, 0, 513, 514, 5, 62, 0, 0, 514, 515, 5, 61, 0, 0, 515, 148, 1, 0, 0, 0, 516, 517, 5, 42, 0, 0, 517, 518, 5, 42, 0, 0, 518, 519, 5, 61, 0, 0, 519, 150, 1, 0, 0, 0, 520, 521, 5, 47, 0, 0, 521, 522, 5, 47, 0, 0, 522, 523, 5, 61, 0, 0, 523, 152, 1, 0, 0, 0, 524, 528, 3, 201, 100, 0, 525, 528, 3, 203, 101, 0, 526, 528, 3, 205, 102, 0, 527, 524, 1, 0, 0, 0, 527, 525, 1, 0, 0, 0, 527, 526, 1, 0, 0, 0, 528, 529, 1, 0, 0, 0, 529, 530, 6, 76, 7, 0, 530, 154, 1, 0, 0, 0, 531, 532, 9, 0, 0, 0, 532, 156, 1, 0, 0, 0, 533, 538, 5, 39, 0, 0, 534, 537, 3, 165, 82, 0, 535, 537, 8, 7, 0, 0, 536, 534, 1, 0, 0, 0, 536, 535, 1, 0, 0, 0, 537, 540, 1, 0, 0, 0, 538, 536, 1, 0, 0, 0, 538, 539, 1, 0, 0, 0, 539, 541, 1, 0, 0, 0, 540, 538, 1, 0, 0, 0, 541, 552, 5, 39, 0, 0, 542, 547, 5, 34, 0, 0, 543, 546, 3, 165, 82, 0, 544, 546, 8, 8, 0, 0, 545, 543, 1, 0, 0, 0, 545, 544, 1, 0, 0, 0, 546, 549, 1, 0, 0, 0, 547, 545, 1, 0, 0, 0, 547, 548, 1, 0, 0, 0, 548, 550, 1, 0, 0, 0, 549, 547, 1, 0, 0, 0, 550, 552, 5, 34, 0, 0, 551, 533, 1, 0, 0, 0, 551, 542, 1, 0, 0, 0, 552, 158, 1, 0, 0, 0, 553, 554, 5, 39, 0, 0, 554, 555, 5, 39, 0, 0, 555, 556, 5, 39, 0, 0, 556, 560, 1, 0, 0, 0, 557, 559, 3, 161, 80, 0, 558, 557, 1, 0, 0, 0, 559, 562, 1, 0, 0, 0, 560, 561, 1, 0, 0, 0, 560, 558, 1, 0, 0, 0, 561, 563, 1, 0, 0, 0, 562, 560, 1, 0, 0, 0, 563, 564, 5, 39, 0, 0, 564, 565, 5, 39, 0, 0, 565, 580, 5, 39, 0, 0, 566, 567, 5, 34, 0, 0, 567, 568, 5, 34, 0, 0, 568, 569, 5, 34, 0, 0, 569, 573, 1, 0, 0, 0, 570, 572, 3, 161, 80, 0, 571, 570, 1, 0, 0, 0, 572, 575, 1, 0, 0, 0, 573, 574, 1, 0, 0, 0, 573, 571, 1, 0, 0, 0, 574, 576, 1, 0, 0, 0, 575, 573, 1, 0, 0, 0, 576, 577, 5, 34, 0, 0, 577, 578, 5, 34, 0, 0, 578, 580, 5, 34, 0, 0, 579, 553, 1, 0, 0, 0, 579, 566, 1, 0, 0, 0, 580, 160, 1, 0, 0, 0, 581, 584, 3, 163, 81, 0, 582, 584, 3, 165, 82, 0, 583, 581, 1, 0, 0, 0, 583, 582, 1, 0, 0, 0, 584, 162, 1, 0, 0, 0, 585, 586, 8, 9, 0, 0, 586, 164, 1, 0, 0, 0, 587, 588, 5, 92, 0, 0, 588, 592, 9, 0, 0, 0, 589, 590, 5, 92, 0, 0, 590, 592, 3, 39, 19, 0, 591, 587, 1, 0, 0, 0, 591, 589, 1, 0, 0, 0, 592, 166, 1, 0, 0, 0, 593, 594, 7, 10, 0, 0, 594, 168, 1, 0, 0, 0, 595, 596, 7, 11, 0, 0, 596, 170, 1, 0, 0, 0, 597, 598, 7, 12, 0, 0, 598, 172, 1, 0, 0, 0, 599, 600, 7, 13, 0, 0, 600, 174, 1, 0, 0, 0, 601, 602, 7, 14, 0, 0, 602, 176, 1, 0, 0, 0, 603, 605, 3, 181, 90, 0, 604, 603, 1, 0, 0, 0, 604, 605, 1, 0, 0, 0, 605, 606, 1, 0, 0, 0, 606, 611, 3, 183, 91, 0, 607, 608, 3, 181, 90, 0, 608, 609, 5, 46, 0, 0, 609, 611, 1, 0, 0, 0, 610, 604, 1, 0, 0, 0, 610, 607, 1, 0, 0, 0, 611, 178, 1, 0, 0, 0, 612, 615, 3, 181, 90, 0, 613, 615, 3, 177, 88, 0, 614, 612, 1, 0, 0, 0, 614, 613, 1, 0, 0, 0, 615, 616, 1, 0, 0, 0, 616, 617, 3, 185, 92, 0, 617, 180, 1, 0, 0, 0, 618, 620, 3, 169, 84, 0, 619, 618, 1, 0, 0, 0, 620, 621, 1, 0, 0, 0, 621, 619, 1, 0, 0, 0, 621, 622, 1, 0, 0, 0, 622, 182, 1, 0, 0, 0, 623, 625, 5, 46, 0, 0, 624, 626, 3, 169, 84, 0, 625, 624, 1, 0, 0, 0, 626, 627, 1, 0, 0, 0, 627, 625, 1, 0, 0, 0, 627, 628, 1, 0, 0, 0, 628, 184, 1, 0, 0, 0, 629, 631, 7, 15, 0, 0, 630, 632, 7, 16, 0, 0, 631, 630, 1, 0, 0, 0, 631, 632, 1, 0, 0, 0, 632, 634, 1, 0, 0, 0, 633, 635, 3, 169, 84, 0, 634, 633, 1, 0, 0, 0, 635, 636, 1, 0, 0, 0, 636, 634, 1, 0, 0, 0, 636, 637, 1, 0, 0, 0, 637, 186, 1, 0, 0, 0, 638, 643, 5, 39, 0, 0, 639, 642, 3, 193, 96, 0, 640, 642, 3, 199, 99, 0, 641, 639, 1, 0, 0, 0, 641, 640, 1, 0, 0, 0, 642, 645, 1, 0, 0, 0, 643, 641, 1, 0, 0, 0, 643, 644, 1, 0, 0, 0, 644, 646, 1, 0, 0, 0, 645, 643, 1, 0, 0, 0, 646, 657, 5, 39, 0, 0, 647, 652, 5, 34, 0, 0, 648, 651, 3, 195, 97, 0, 649, 651, 3, 199, 99, 0, 650, 648, 1, 0, 0, 0, 650, 649, 1, 0, 0, 0, 651, 654, 1, 0, 0, 0, 652, 650, 1, 0, 0, 0, 652, 653, 1, 0, 0, 0, 653, 655, 1, 0, 0, 0, 654, 652, 1, 0, 0, 0, 655, 657, 5, 34, 0, 0, 656, 638, 1, 0, 0, 0, 656, 647, 1, 0, 0, 0, 657, 188, 1, 0, 0, 0, 658, 659, 5, 39, 0, 0, 659, 660, 5, 39, 0, 0, 660, 661, 5, 39, 0, 0, 661, 665, 1, 0, 0, 0, 662, 664, 3, 191, 95, 0, 663, 662, 1, 0, 0, 0, 664, 667, 1, 0, 0, 0, 665, 666, 1, 0, 0, 0, 665, 663, 1, 0, 0, 0, 666, 668, 1, 0, 0, 0, 667, 665, 1, 0, 0, 0, 668, 669, 5, 39, 0, 0, 669, 670, 5, 39, 0, 0, 670, 685, 5, 39, 0, 0, 671, 672, 5, 34, 0, 0, 672, 673, 5, 34, 0, 0, 673, 674, 5, 34, 0, 0, 674, 678, 1, 0, 0, 0, 675, 677, 3, 191, 95, 0, 676, 675, 1, 0, 0, 0, 677, 680, 1, 0, 0, 0, 678, 679, 1, 0, 0, 0, 678, 676, 1, 0, 0, 0, 679, 681, 1, 0, 0, 0, 680, 678, 1, 0, 0, 0, 681, 682, 5, 34, 0, 0, 682, 683, 5, 34, 0, 0, 683, 685, 5, 34, 0, 0, 684, 658, 1, 0, 0, 0, 684, 671, 1, 0, 0, 0, 685, 190, 1, 0, 0, 0, 686, 689, 3, 197, 98, 0, 687, 689, 3, 199, 99, 0, 688, 686, 1, 0, 0, 0, 688, 687, 1, 0, 0, 0, 689, 192, 1, 0, 0, 0, 690, 692, 7, 17, 0, 0, 691, 690, 1, 0, 0, 0, 692, 194, 1, 0, 0, 0, 693, 695, 7, 18, 0, 0, 694, 693, 1, 0, 0, 0, 695, 196, 1, 0, 0, 0, 696, 698, 7, 19, 0, 0, 697, 696, 1, 0, 0, 0, 698, 198, 1, 0, 0, 0, 699, 700, 5, 92, 0, 0, 700, 701, 7, 20, 0, 0, 701, 200, 1, 0, 0, 0, 702, 704, 7, 21, 0, 0, 703, 702, 1, 0, 0, 0, 704, 705, 1, 0, 0, 0, 705, 703, 1, 0, 0, 0, 705, 706, 1, 0, 0, 0, 706, 202, 1, 0, 0, 0, 707, 711, 5, 35, 0, 0, 708, 710, 8, 22, 0, 0, 709, 708, 1, 0, 0, 0, 710, 713, 1, 0, 0, 0, 711, 709, 1, 0, 0, 0, 711, 712, 1, 0, 0, 0, 712, 204, 1, 0, 0, 0, 713, 711, 1, 0, 0, 0, 714, 716, 5, 92, 0, 0, 715, 717, 3, 201, 100, 0, 716, 715, 1, 0, 0, 0, 716, 717, 1, 0, 0, 0, 717, 723, 1, 0, 0, 0, 718, 720, 5, 13, 0, 0, 719, 718, 1, 0, 0, 0, 719, 720, 1, 0, 0, 0, 720, 721, 1, 0, 0, 0, 721, 724, 5, 10, 0, 0, 722, 724, 2, 12, 13, 0, 723, 719, 1, 0, 0, 0, 723, 722, 1, 0, 0, 0, 724, 206, 1, 0, 0, 0, 725, 727, 7, 23, 0, 0, 726, 725, 1, 0, 0, 0, 727, 208, 1, 0, 0, 0, 728, 731, 3, 207, 103, 0, 729, 731, 7, 24, 0, 0, 730, 728, 1, 0, 0, 0, 730, 729, 1, 0, 0, 0, 731, 210, 1, 0, 0, 0, 58, 0, 213, 218, 224, 308, 312, 315, 317, 325, 333, 337, 344, 348, 354, 360, 362, 369, 376, 383, 387, 391, 527, 536, 538, 545, 547, 551, 560, 573, 579, 583, 591, 604, 610, 614, 621, 627, 631, 636, 641, 643, 650, 652, 656, 665, 678, 684, 688, 691, 694, 697, 705, 711, 716, 719, 723, 726, 730, 8, 1, 19, 0, 1, 32, 1, 1, 33, 2, 1, 39, 3, 1, 40, 4, 1, 52, 5, 1, 53, 6, 6, 0, 0] \ No newline at end of file diff --git a/generated/Python3Lexer.tokens b/generated/Python3Lexer.tokens new file mode 100644 index 0000000..ee3e333 --- /dev/null +++ b/generated/Python3Lexer.tokens @@ -0,0 +1,143 @@ +INDENT=1 +DEDENT=2 +STRING=3 +NUMBER=4 +INTEGER=5 +DEF=6 +RETURN=7 +IF=8 +ELIF=9 +ELSE=10 +WHILE=11 +FOR=12 +IN=13 +OR=14 +AND=15 +NOT=16 +NONE=17 +TRUE=18 +FALSE=19 +CONTINUE=20 +BREAK=21 +NEWLINE=22 +NAME=23 +STRING_LITERAL=24 +BYTES_LITERAL=25 +DECIMAL_INTEGER=26 +OCT_INTEGER=27 +HEX_INTEGER=28 +BIN_INTEGER=29 +FLOAT_NUMBER=30 +IMAG_NUMBER=31 +DOT=32 +ELLIPSIS=33 +STAR=34 +OPEN_PAREN=35 +CLOSE_PAREN=36 +COMMA=37 +COLON=38 +SEMI_COLON=39 +POWER=40 +ASSIGN=41 +OPEN_BRACK=42 +CLOSE_BRACK=43 +OR_OP=44 +XOR=45 +AND_OP=46 +LEFT_SHIFT=47 +RIGHT_SHIFT=48 +ADD=49 +MINUS=50 +DIV=51 +MOD=52 +IDIV=53 +NOT_OP=54 +OPEN_BRACE=55 +CLOSE_BRACE=56 +LESS_THAN=57 +GREATER_THAN=58 +EQUALS=59 +GT_EQ=60 +LT_EQ=61 +NOT_EQ_1=62 +NOT_EQ_2=63 +AT=64 +ARROW=65 +ADD_ASSIGN=66 +SUB_ASSIGN=67 +MULT_ASSIGN=68 +AT_ASSIGN=69 +DIV_ASSIGN=70 +MOD_ASSIGN=71 +AND_ASSIGN=72 +OR_ASSIGN=73 +XOR_ASSIGN=74 +LEFT_SHIFT_ASSIGN=75 +RIGHT_SHIFT_ASSIGN=76 +POWER_ASSIGN=77 +IDIV_ASSIGN=78 +SKIP_=79 +UNKNOWN_CHAR=80 +'def'=6 +'return'=7 +'if'=8 +'elif'=9 +'else'=10 +'while'=11 +'for'=12 +'in'=13 +'or'=14 +'and'=15 +'not'=16 +'None'=17 +'True'=18 +'False'=19 +'continue'=20 +'break'=21 +'.'=32 +'...'=33 +'*'=34 +'('=35 +')'=36 +','=37 +':'=38 +';'=39 +'**'=40 +'='=41 +'['=42 +']'=43 +'|'=44 +'^'=45 +'&'=46 +'<<'=47 +'>>'=48 +'+'=49 +'-'=50 +'/'=51 +'%'=52 +'//'=53 +'~'=54 +'{'=55 +'}'=56 +'<'=57 +'>'=58 +'=='=59 +'>='=60 +'<='=61 +'<>'=62 +'!='=63 +'@'=64 +'->'=65 +'+='=66 +'-='=67 +'*='=68 +'@='=69 +'/='=70 +'%='=71 +'&='=72 +'|='=73 +'^='=74 +'<<='=75 +'>>='=76 +'**='=77 +'//='=78 diff --git a/generated/Python3Parser.cpp b/generated/Python3Parser.cpp new file mode 100644 index 0000000..598b95f --- /dev/null +++ b/generated/Python3Parser.cpp @@ -0,0 +1,3012 @@ + +// Generated from Python3Parser.g4 by ANTLR 4.13.1 + + +#include "Python3ParserVisitor.h" + +#include "Python3Parser.h" + + +using namespace antlrcpp; + +using namespace antlr4; + +namespace { + +struct Python3ParserStaticData final { + Python3ParserStaticData(std::vector ruleNames, + std::vector literalNames, + std::vector symbolicNames) + : ruleNames(std::move(ruleNames)), literalNames(std::move(literalNames)), + symbolicNames(std::move(symbolicNames)), + vocabulary(this->literalNames, this->symbolicNames) {} + + Python3ParserStaticData(const Python3ParserStaticData&) = delete; + Python3ParserStaticData(Python3ParserStaticData&&) = delete; + Python3ParserStaticData& operator=(const Python3ParserStaticData&) = delete; + Python3ParserStaticData& operator=(Python3ParserStaticData&&) = delete; + + std::vector decisionToDFA; + antlr4::atn::PredictionContextCache sharedContextCache; + const std::vector ruleNames; + const std::vector literalNames; + const std::vector symbolicNames; + const antlr4::dfa::Vocabulary vocabulary; + antlr4::atn::SerializedATNView serializedATN; + std::unique_ptr atn; +}; + +::antlr4::internal::OnceFlag python3parserParserOnceFlag; +#if ANTLR4_USE_THREAD_LOCAL_CACHE +static thread_local +#endif +Python3ParserStaticData *python3parserParserStaticData = nullptr; + +void python3parserParserInitialize() { +#if ANTLR4_USE_THREAD_LOCAL_CACHE + if (python3parserParserStaticData != nullptr) { + return; + } +#else + assert(python3parserParserStaticData == nullptr); +#endif + auto staticData = std::make_unique( + std::vector{ + "file_input", "funcdef", "parameters", "typedargslist", "tfpdef", + "stmt", "simple_stmt", "small_stmt", "expr_stmt", "augassign", "flow_stmt", + "break_stmt", "continue_stmt", "return_stmt", "compound_stmt", "if_stmt", + "while_stmt", "suite", "test", "or_test", "and_test", "not_test", + "comparison", "comp_op", "arith_expr", "addorsub_op", "term", "muldivmod_op", + "factor", "atom_expr", "trailer", "atom", "testlist", "arglist", "argument" + }, + std::vector{ + "", "", "", "", "", "", "'def'", "'return'", "'if'", "'elif'", "'else'", + "'while'", "'for'", "'in'", "'or'", "'and'", "'not'", "'None'", "'True'", + "'False'", "'continue'", "'break'", "", "", "", "", "", "", "", "", + "", "", "'.'", "'...'", "'*'", "'('", "')'", "','", "':'", "';'", + "'**'", "'='", "'['", "']'", "'|'", "'^'", "'&'", "'<<'", "'>>'", + "'+'", "'-'", "'/'", "'%'", "'//'", "'~'", "'{'", "'}'", "'<'", "'>'", + "'=='", "'>='", "'<='", "'<>'", "'!='", "'@'", "'->'", "'+='", "'-='", + "'*='", "'@='", "'/='", "'%='", "'&='", "'|='", "'^='", "'<<='", "'>>='", + "'**='", "'//='" + }, + std::vector{ + "", "INDENT", "DEDENT", "STRING", "NUMBER", "INTEGER", "DEF", "RETURN", + "IF", "ELIF", "ELSE", "WHILE", "FOR", "IN", "OR", "AND", "NOT", "NONE", + "TRUE", "FALSE", "CONTINUE", "BREAK", "NEWLINE", "NAME", "STRING_LITERAL", + "BYTES_LITERAL", "DECIMAL_INTEGER", "OCT_INTEGER", "HEX_INTEGER", + "BIN_INTEGER", "FLOAT_NUMBER", "IMAG_NUMBER", "DOT", "ELLIPSIS", "STAR", + "OPEN_PAREN", "CLOSE_PAREN", "COMMA", "COLON", "SEMI_COLON", "POWER", + "ASSIGN", "OPEN_BRACK", "CLOSE_BRACK", "OR_OP", "XOR", "AND_OP", "LEFT_SHIFT", + "RIGHT_SHIFT", "ADD", "MINUS", "DIV", "MOD", "IDIV", "NOT_OP", "OPEN_BRACE", + "CLOSE_BRACE", "LESS_THAN", "GREATER_THAN", "EQUALS", "GT_EQ", "LT_EQ", + "NOT_EQ_1", "NOT_EQ_2", "AT", "ARROW", "ADD_ASSIGN", "SUB_ASSIGN", + "MULT_ASSIGN", "AT_ASSIGN", "DIV_ASSIGN", "MOD_ASSIGN", "AND_ASSIGN", + "OR_ASSIGN", "XOR_ASSIGN", "LEFT_SHIFT_ASSIGN", "RIGHT_SHIFT_ASSIGN", + "POWER_ASSIGN", "IDIV_ASSIGN", "SKIP_", "UNKNOWN_CHAR" + } + ); + static const int32_t serializedATNSegment[] = { + 4,1,80,306,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2, + 7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7, + 14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7, + 21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7, + 28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,1,0,1, + 0,5,0,73,8,0,10,0,12,0,76,9,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2, + 3,2,88,8,2,1,2,1,2,1,3,1,3,1,3,3,3,95,8,3,1,3,1,3,1,3,1,3,3,3,101,8,3, + 5,3,103,8,3,10,3,12,3,106,9,3,1,4,1,4,1,5,1,5,3,5,112,8,5,1,6,1,6,1,6, + 1,7,1,7,3,7,119,8,7,1,8,1,8,1,8,1,8,1,8,1,8,5,8,127,8,8,10,8,12,8,130, + 9,8,3,8,132,8,8,1,9,1,9,1,10,1,10,1,10,3,10,139,8,10,1,11,1,11,1,12,1, + 12,1,13,1,13,3,13,147,8,13,1,14,1,14,1,14,3,14,152,8,14,1,15,1,15,1,15, + 1,15,1,15,1,15,1,15,1,15,1,15,5,15,163,8,15,10,15,12,15,166,9,15,1,15, + 1,15,1,15,3,15,171,8,15,1,16,1,16,1,16,1,16,1,16,1,17,1,17,1,17,1,17, + 4,17,182,8,17,11,17,12,17,183,1,17,1,17,3,17,188,8,17,1,18,1,18,1,19, + 1,19,1,19,5,19,195,8,19,10,19,12,19,198,9,19,1,20,1,20,1,20,5,20,203, + 8,20,10,20,12,20,206,9,20,1,21,1,21,1,21,3,21,211,8,21,1,22,1,22,1,22, + 1,22,5,22,217,8,22,10,22,12,22,220,9,22,1,23,1,23,1,24,1,24,1,24,1,24, + 5,24,228,8,24,10,24,12,24,231,9,24,1,25,1,25,1,26,1,26,1,26,1,26,5,26, + 239,8,26,10,26,12,26,242,9,26,1,27,1,27,1,28,1,28,1,28,3,28,249,8,28, + 1,29,1,29,3,29,253,8,29,1,30,1,30,3,30,257,8,30,1,30,1,30,1,31,1,31,1, + 31,4,31,264,8,31,11,31,12,31,265,1,31,1,31,1,31,1,31,1,31,1,31,1,31,3, + 31,275,8,31,1,32,1,32,1,32,5,32,280,8,32,10,32,12,32,283,9,32,1,32,3, + 32,286,8,32,1,33,1,33,1,33,5,33,291,8,33,10,33,12,33,294,9,33,1,33,3, + 33,297,8,33,1,34,1,34,1,34,1,34,1,34,3,34,304,8,34,1,34,0,0,35,0,2,4, + 6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52, + 54,56,58,60,62,64,66,68,0,4,3,0,66,68,70,71,78,78,2,0,57,61,63,63,1,0, + 49,50,2,0,34,34,51,53,310,0,74,1,0,0,0,2,79,1,0,0,0,4,85,1,0,0,0,6,91, + 1,0,0,0,8,107,1,0,0,0,10,111,1,0,0,0,12,113,1,0,0,0,14,118,1,0,0,0,16, + 120,1,0,0,0,18,133,1,0,0,0,20,138,1,0,0,0,22,140,1,0,0,0,24,142,1,0,0, + 0,26,144,1,0,0,0,28,151,1,0,0,0,30,153,1,0,0,0,32,172,1,0,0,0,34,187, + 1,0,0,0,36,189,1,0,0,0,38,191,1,0,0,0,40,199,1,0,0,0,42,210,1,0,0,0,44, + 212,1,0,0,0,46,221,1,0,0,0,48,223,1,0,0,0,50,232,1,0,0,0,52,234,1,0,0, + 0,54,243,1,0,0,0,56,248,1,0,0,0,58,250,1,0,0,0,60,254,1,0,0,0,62,274, + 1,0,0,0,64,276,1,0,0,0,66,287,1,0,0,0,68,303,1,0,0,0,70,73,5,22,0,0,71, + 73,3,10,5,0,72,70,1,0,0,0,72,71,1,0,0,0,73,76,1,0,0,0,74,72,1,0,0,0,74, + 75,1,0,0,0,75,77,1,0,0,0,76,74,1,0,0,0,77,78,5,0,0,1,78,1,1,0,0,0,79, + 80,5,6,0,0,80,81,5,23,0,0,81,82,3,4,2,0,82,83,5,38,0,0,83,84,3,34,17, + 0,84,3,1,0,0,0,85,87,5,35,0,0,86,88,3,6,3,0,87,86,1,0,0,0,87,88,1,0,0, + 0,88,89,1,0,0,0,89,90,5,36,0,0,90,5,1,0,0,0,91,94,3,8,4,0,92,93,5,41, + 0,0,93,95,3,36,18,0,94,92,1,0,0,0,94,95,1,0,0,0,95,104,1,0,0,0,96,97, + 5,37,0,0,97,100,3,8,4,0,98,99,5,41,0,0,99,101,3,36,18,0,100,98,1,0,0, + 0,100,101,1,0,0,0,101,103,1,0,0,0,102,96,1,0,0,0,103,106,1,0,0,0,104, + 102,1,0,0,0,104,105,1,0,0,0,105,7,1,0,0,0,106,104,1,0,0,0,107,108,5,23, + 0,0,108,9,1,0,0,0,109,112,3,12,6,0,110,112,3,28,14,0,111,109,1,0,0,0, + 111,110,1,0,0,0,112,11,1,0,0,0,113,114,3,14,7,0,114,115,5,22,0,0,115, + 13,1,0,0,0,116,119,3,16,8,0,117,119,3,20,10,0,118,116,1,0,0,0,118,117, + 1,0,0,0,119,15,1,0,0,0,120,131,3,64,32,0,121,122,3,18,9,0,122,123,3,64, + 32,0,123,132,1,0,0,0,124,125,5,41,0,0,125,127,3,64,32,0,126,124,1,0,0, + 0,127,130,1,0,0,0,128,126,1,0,0,0,128,129,1,0,0,0,129,132,1,0,0,0,130, + 128,1,0,0,0,131,121,1,0,0,0,131,128,1,0,0,0,132,17,1,0,0,0,133,134,7, + 0,0,0,134,19,1,0,0,0,135,139,3,22,11,0,136,139,3,24,12,0,137,139,3,26, + 13,0,138,135,1,0,0,0,138,136,1,0,0,0,138,137,1,0,0,0,139,21,1,0,0,0,140, + 141,5,21,0,0,141,23,1,0,0,0,142,143,5,20,0,0,143,25,1,0,0,0,144,146,5, + 7,0,0,145,147,3,64,32,0,146,145,1,0,0,0,146,147,1,0,0,0,147,27,1,0,0, + 0,148,152,3,30,15,0,149,152,3,32,16,0,150,152,3,2,1,0,151,148,1,0,0,0, + 151,149,1,0,0,0,151,150,1,0,0,0,152,29,1,0,0,0,153,154,5,8,0,0,154,155, + 3,36,18,0,155,156,5,38,0,0,156,164,3,34,17,0,157,158,5,9,0,0,158,159, + 3,36,18,0,159,160,5,38,0,0,160,161,3,34,17,0,161,163,1,0,0,0,162,157, + 1,0,0,0,163,166,1,0,0,0,164,162,1,0,0,0,164,165,1,0,0,0,165,170,1,0,0, + 0,166,164,1,0,0,0,167,168,5,10,0,0,168,169,5,38,0,0,169,171,3,34,17,0, + 170,167,1,0,0,0,170,171,1,0,0,0,171,31,1,0,0,0,172,173,5,11,0,0,173,174, + 3,36,18,0,174,175,5,38,0,0,175,176,3,34,17,0,176,33,1,0,0,0,177,188,3, + 12,6,0,178,179,5,22,0,0,179,181,5,1,0,0,180,182,3,10,5,0,181,180,1,0, + 0,0,182,183,1,0,0,0,183,181,1,0,0,0,183,184,1,0,0,0,184,185,1,0,0,0,185, + 186,5,2,0,0,186,188,1,0,0,0,187,177,1,0,0,0,187,178,1,0,0,0,188,35,1, + 0,0,0,189,190,3,38,19,0,190,37,1,0,0,0,191,196,3,40,20,0,192,193,5,14, + 0,0,193,195,3,40,20,0,194,192,1,0,0,0,195,198,1,0,0,0,196,194,1,0,0,0, + 196,197,1,0,0,0,197,39,1,0,0,0,198,196,1,0,0,0,199,204,3,42,21,0,200, + 201,5,15,0,0,201,203,3,42,21,0,202,200,1,0,0,0,203,206,1,0,0,0,204,202, + 1,0,0,0,204,205,1,0,0,0,205,41,1,0,0,0,206,204,1,0,0,0,207,208,5,16,0, + 0,208,211,3,42,21,0,209,211,3,44,22,0,210,207,1,0,0,0,210,209,1,0,0,0, + 211,43,1,0,0,0,212,218,3,48,24,0,213,214,3,46,23,0,214,215,3,48,24,0, + 215,217,1,0,0,0,216,213,1,0,0,0,217,220,1,0,0,0,218,216,1,0,0,0,218,219, + 1,0,0,0,219,45,1,0,0,0,220,218,1,0,0,0,221,222,7,1,0,0,222,47,1,0,0,0, + 223,229,3,52,26,0,224,225,3,50,25,0,225,226,3,52,26,0,226,228,1,0,0,0, + 227,224,1,0,0,0,228,231,1,0,0,0,229,227,1,0,0,0,229,230,1,0,0,0,230,49, + 1,0,0,0,231,229,1,0,0,0,232,233,7,2,0,0,233,51,1,0,0,0,234,240,3,56,28, + 0,235,236,3,54,27,0,236,237,3,56,28,0,237,239,1,0,0,0,238,235,1,0,0,0, + 239,242,1,0,0,0,240,238,1,0,0,0,240,241,1,0,0,0,241,53,1,0,0,0,242,240, + 1,0,0,0,243,244,7,3,0,0,244,55,1,0,0,0,245,246,7,2,0,0,246,249,3,56,28, + 0,247,249,3,58,29,0,248,245,1,0,0,0,248,247,1,0,0,0,249,57,1,0,0,0,250, + 252,3,62,31,0,251,253,3,60,30,0,252,251,1,0,0,0,252,253,1,0,0,0,253,59, + 1,0,0,0,254,256,5,35,0,0,255,257,3,66,33,0,256,255,1,0,0,0,256,257,1, + 0,0,0,257,258,1,0,0,0,258,259,5,36,0,0,259,61,1,0,0,0,260,275,5,23,0, + 0,261,275,5,4,0,0,262,264,5,3,0,0,263,262,1,0,0,0,264,265,1,0,0,0,265, + 263,1,0,0,0,265,266,1,0,0,0,266,275,1,0,0,0,267,275,5,17,0,0,268,275, + 5,18,0,0,269,275,5,19,0,0,270,271,5,35,0,0,271,272,3,36,18,0,272,273, + 5,36,0,0,273,275,1,0,0,0,274,260,1,0,0,0,274,261,1,0,0,0,274,263,1,0, + 0,0,274,267,1,0,0,0,274,268,1,0,0,0,274,269,1,0,0,0,274,270,1,0,0,0,275, + 63,1,0,0,0,276,281,3,36,18,0,277,278,5,37,0,0,278,280,3,36,18,0,279,277, + 1,0,0,0,280,283,1,0,0,0,281,279,1,0,0,0,281,282,1,0,0,0,282,285,1,0,0, + 0,283,281,1,0,0,0,284,286,5,37,0,0,285,284,1,0,0,0,285,286,1,0,0,0,286, + 65,1,0,0,0,287,292,3,68,34,0,288,289,5,37,0,0,289,291,3,68,34,0,290,288, + 1,0,0,0,291,294,1,0,0,0,292,290,1,0,0,0,292,293,1,0,0,0,293,296,1,0,0, + 0,294,292,1,0,0,0,295,297,5,37,0,0,296,295,1,0,0,0,296,297,1,0,0,0,297, + 67,1,0,0,0,298,304,3,36,18,0,299,300,3,36,18,0,300,301,5,41,0,0,301,302, + 3,36,18,0,302,304,1,0,0,0,303,298,1,0,0,0,303,299,1,0,0,0,304,69,1,0, + 0,0,33,72,74,87,94,100,104,111,118,128,131,138,146,151,164,170,183,187, + 196,204,210,218,229,240,248,252,256,265,274,281,285,292,296,303 + }; + staticData->serializedATN = antlr4::atn::SerializedATNView(serializedATNSegment, sizeof(serializedATNSegment) / sizeof(serializedATNSegment[0])); + + antlr4::atn::ATNDeserializer deserializer; + staticData->atn = deserializer.deserialize(staticData->serializedATN); + + const size_t count = staticData->atn->getNumberOfDecisions(); + staticData->decisionToDFA.reserve(count); + for (size_t i = 0; i < count; i++) { + staticData->decisionToDFA.emplace_back(staticData->atn->getDecisionState(i), i); + } + python3parserParserStaticData = staticData.release(); +} + +} + +Python3Parser::Python3Parser(TokenStream *input) : Python3Parser(input, antlr4::atn::ParserATNSimulatorOptions()) {} + +Python3Parser::Python3Parser(TokenStream *input, const antlr4::atn::ParserATNSimulatorOptions &options) : Parser(input) { + Python3Parser::initialize(); + _interpreter = new atn::ParserATNSimulator(this, *python3parserParserStaticData->atn, python3parserParserStaticData->decisionToDFA, python3parserParserStaticData->sharedContextCache, options); +} + +Python3Parser::~Python3Parser() { + delete _interpreter; +} + +const atn::ATN& Python3Parser::getATN() const { + return *python3parserParserStaticData->atn; +} + +std::string Python3Parser::getGrammarFileName() const { + return "Python3Parser.g4"; +} + +const std::vector& Python3Parser::getRuleNames() const { + return python3parserParserStaticData->ruleNames; +} + +const dfa::Vocabulary& Python3Parser::getVocabulary() const { + return python3parserParserStaticData->vocabulary; +} + +antlr4::atn::SerializedATNView Python3Parser::getSerializedATN() const { + return python3parserParserStaticData->serializedATN; +} + + +//----------------- File_inputContext ------------------------------------------------------------------ + +Python3Parser::File_inputContext::File_inputContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* Python3Parser::File_inputContext::EOF() { + return getToken(Python3Parser::EOF, 0); +} + +std::vector Python3Parser::File_inputContext::NEWLINE() { + return getTokens(Python3Parser::NEWLINE); +} + +tree::TerminalNode* Python3Parser::File_inputContext::NEWLINE(size_t i) { + return getToken(Python3Parser::NEWLINE, i); +} + +std::vector Python3Parser::File_inputContext::stmt() { + return getRuleContexts(); +} + +Python3Parser::StmtContext* Python3Parser::File_inputContext::stmt(size_t i) { + return getRuleContext(i); +} + + +size_t Python3Parser::File_inputContext::getRuleIndex() const { + return Python3Parser::RuleFile_input; +} + + +std::any Python3Parser::File_inputContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitFile_input(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::File_inputContext* Python3Parser::file_input() { + File_inputContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 0, Python3Parser::RuleFile_input); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(74); + _errHandler->sync(this); + _la = _input->LA(1); + while ((((_la & ~ 0x3fULL) == 0) && + ((1ULL << _la) & 1688884236716504) != 0)) { + setState(72); + _errHandler->sync(this); + switch (_input->LA(1)) { + case Python3Parser::NEWLINE: { + setState(70); + match(Python3Parser::NEWLINE); + break; + } + + case Python3Parser::STRING: + case Python3Parser::NUMBER: + case Python3Parser::DEF: + case Python3Parser::RETURN: + case Python3Parser::IF: + case Python3Parser::WHILE: + case Python3Parser::NOT: + case Python3Parser::NONE: + case Python3Parser::TRUE: + case Python3Parser::FALSE: + case Python3Parser::CONTINUE: + case Python3Parser::BREAK: + case Python3Parser::NAME: + case Python3Parser::OPEN_PAREN: + case Python3Parser::ADD: + case Python3Parser::MINUS: { + setState(71); + stmt(); + break; + } + + default: + throw NoViableAltException(this); + } + setState(76); + _errHandler->sync(this); + _la = _input->LA(1); + } + setState(77); + match(Python3Parser::EOF); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- FuncdefContext ------------------------------------------------------------------ + +Python3Parser::FuncdefContext::FuncdefContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* Python3Parser::FuncdefContext::DEF() { + return getToken(Python3Parser::DEF, 0); +} + +tree::TerminalNode* Python3Parser::FuncdefContext::NAME() { + return getToken(Python3Parser::NAME, 0); +} + +Python3Parser::ParametersContext* Python3Parser::FuncdefContext::parameters() { + return getRuleContext(0); +} + +tree::TerminalNode* Python3Parser::FuncdefContext::COLON() { + return getToken(Python3Parser::COLON, 0); +} + +Python3Parser::SuiteContext* Python3Parser::FuncdefContext::suite() { + return getRuleContext(0); +} + + +size_t Python3Parser::FuncdefContext::getRuleIndex() const { + return Python3Parser::RuleFuncdef; +} + + +std::any Python3Parser::FuncdefContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitFuncdef(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::FuncdefContext* Python3Parser::funcdef() { + FuncdefContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 2, Python3Parser::RuleFuncdef); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(79); + match(Python3Parser::DEF); + setState(80); + match(Python3Parser::NAME); + setState(81); + parameters(); + setState(82); + match(Python3Parser::COLON); + setState(83); + suite(); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- ParametersContext ------------------------------------------------------------------ + +Python3Parser::ParametersContext::ParametersContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* Python3Parser::ParametersContext::OPEN_PAREN() { + return getToken(Python3Parser::OPEN_PAREN, 0); +} + +tree::TerminalNode* Python3Parser::ParametersContext::CLOSE_PAREN() { + return getToken(Python3Parser::CLOSE_PAREN, 0); +} + +Python3Parser::TypedargslistContext* Python3Parser::ParametersContext::typedargslist() { + return getRuleContext(0); +} + + +size_t Python3Parser::ParametersContext::getRuleIndex() const { + return Python3Parser::RuleParameters; +} + + +std::any Python3Parser::ParametersContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitParameters(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::ParametersContext* Python3Parser::parameters() { + ParametersContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 4, Python3Parser::RuleParameters); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(85); + match(Python3Parser::OPEN_PAREN); + setState(87); + _errHandler->sync(this); + + _la = _input->LA(1); + if (_la == Python3Parser::NAME) { + setState(86); + typedargslist(); + } + setState(89); + match(Python3Parser::CLOSE_PAREN); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- TypedargslistContext ------------------------------------------------------------------ + +Python3Parser::TypedargslistContext::TypedargslistContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +std::vector Python3Parser::TypedargslistContext::tfpdef() { + return getRuleContexts(); +} + +Python3Parser::TfpdefContext* Python3Parser::TypedargslistContext::tfpdef(size_t i) { + return getRuleContext(i); +} + +std::vector Python3Parser::TypedargslistContext::ASSIGN() { + return getTokens(Python3Parser::ASSIGN); +} + +tree::TerminalNode* Python3Parser::TypedargslistContext::ASSIGN(size_t i) { + return getToken(Python3Parser::ASSIGN, i); +} + +std::vector Python3Parser::TypedargslistContext::test() { + return getRuleContexts(); +} + +Python3Parser::TestContext* Python3Parser::TypedargslistContext::test(size_t i) { + return getRuleContext(i); +} + +std::vector Python3Parser::TypedargslistContext::COMMA() { + return getTokens(Python3Parser::COMMA); +} + +tree::TerminalNode* Python3Parser::TypedargslistContext::COMMA(size_t i) { + return getToken(Python3Parser::COMMA, i); +} + + +size_t Python3Parser::TypedargslistContext::getRuleIndex() const { + return Python3Parser::RuleTypedargslist; +} + + +std::any Python3Parser::TypedargslistContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitTypedargslist(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::TypedargslistContext* Python3Parser::typedargslist() { + TypedargslistContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 6, Python3Parser::RuleTypedargslist); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(91); + tfpdef(); + setState(94); + _errHandler->sync(this); + + _la = _input->LA(1); + if (_la == Python3Parser::ASSIGN) { + setState(92); + match(Python3Parser::ASSIGN); + setState(93); + test(); + } + setState(104); + _errHandler->sync(this); + _la = _input->LA(1); + while (_la == Python3Parser::COMMA) { + setState(96); + match(Python3Parser::COMMA); + setState(97); + tfpdef(); + setState(100); + _errHandler->sync(this); + + _la = _input->LA(1); + if (_la == Python3Parser::ASSIGN) { + setState(98); + match(Python3Parser::ASSIGN); + setState(99); + test(); + } + setState(106); + _errHandler->sync(this); + _la = _input->LA(1); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- TfpdefContext ------------------------------------------------------------------ + +Python3Parser::TfpdefContext::TfpdefContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* Python3Parser::TfpdefContext::NAME() { + return getToken(Python3Parser::NAME, 0); +} + + +size_t Python3Parser::TfpdefContext::getRuleIndex() const { + return Python3Parser::RuleTfpdef; +} + + +std::any Python3Parser::TfpdefContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitTfpdef(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::TfpdefContext* Python3Parser::tfpdef() { + TfpdefContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 8, Python3Parser::RuleTfpdef); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(107); + match(Python3Parser::NAME); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- StmtContext ------------------------------------------------------------------ + +Python3Parser::StmtContext::StmtContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +Python3Parser::Simple_stmtContext* Python3Parser::StmtContext::simple_stmt() { + return getRuleContext(0); +} + +Python3Parser::Compound_stmtContext* Python3Parser::StmtContext::compound_stmt() { + return getRuleContext(0); +} + + +size_t Python3Parser::StmtContext::getRuleIndex() const { + return Python3Parser::RuleStmt; +} + + +std::any Python3Parser::StmtContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitStmt(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::StmtContext* Python3Parser::stmt() { + StmtContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 10, Python3Parser::RuleStmt); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + setState(111); + _errHandler->sync(this); + switch (_input->LA(1)) { + case Python3Parser::STRING: + case Python3Parser::NUMBER: + case Python3Parser::RETURN: + case Python3Parser::NOT: + case Python3Parser::NONE: + case Python3Parser::TRUE: + case Python3Parser::FALSE: + case Python3Parser::CONTINUE: + case Python3Parser::BREAK: + case Python3Parser::NAME: + case Python3Parser::OPEN_PAREN: + case Python3Parser::ADD: + case Python3Parser::MINUS: { + enterOuterAlt(_localctx, 1); + setState(109); + simple_stmt(); + break; + } + + case Python3Parser::DEF: + case Python3Parser::IF: + case Python3Parser::WHILE: { + enterOuterAlt(_localctx, 2); + setState(110); + compound_stmt(); + break; + } + + default: + throw NoViableAltException(this); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- Simple_stmtContext ------------------------------------------------------------------ + +Python3Parser::Simple_stmtContext::Simple_stmtContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +Python3Parser::Small_stmtContext* Python3Parser::Simple_stmtContext::small_stmt() { + return getRuleContext(0); +} + +tree::TerminalNode* Python3Parser::Simple_stmtContext::NEWLINE() { + return getToken(Python3Parser::NEWLINE, 0); +} + + +size_t Python3Parser::Simple_stmtContext::getRuleIndex() const { + return Python3Parser::RuleSimple_stmt; +} + + +std::any Python3Parser::Simple_stmtContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitSimple_stmt(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::Simple_stmtContext* Python3Parser::simple_stmt() { + Simple_stmtContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 12, Python3Parser::RuleSimple_stmt); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(113); + small_stmt(); + setState(114); + match(Python3Parser::NEWLINE); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- Small_stmtContext ------------------------------------------------------------------ + +Python3Parser::Small_stmtContext::Small_stmtContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +Python3Parser::Expr_stmtContext* Python3Parser::Small_stmtContext::expr_stmt() { + return getRuleContext(0); +} + +Python3Parser::Flow_stmtContext* Python3Parser::Small_stmtContext::flow_stmt() { + return getRuleContext(0); +} + + +size_t Python3Parser::Small_stmtContext::getRuleIndex() const { + return Python3Parser::RuleSmall_stmt; +} + + +std::any Python3Parser::Small_stmtContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitSmall_stmt(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::Small_stmtContext* Python3Parser::small_stmt() { + Small_stmtContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 14, Python3Parser::RuleSmall_stmt); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + setState(118); + _errHandler->sync(this); + switch (_input->LA(1)) { + case Python3Parser::STRING: + case Python3Parser::NUMBER: + case Python3Parser::NOT: + case Python3Parser::NONE: + case Python3Parser::TRUE: + case Python3Parser::FALSE: + case Python3Parser::NAME: + case Python3Parser::OPEN_PAREN: + case Python3Parser::ADD: + case Python3Parser::MINUS: { + enterOuterAlt(_localctx, 1); + setState(116); + expr_stmt(); + break; + } + + case Python3Parser::RETURN: + case Python3Parser::CONTINUE: + case Python3Parser::BREAK: { + enterOuterAlt(_localctx, 2); + setState(117); + flow_stmt(); + break; + } + + default: + throw NoViableAltException(this); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- Expr_stmtContext ------------------------------------------------------------------ + +Python3Parser::Expr_stmtContext::Expr_stmtContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +std::vector Python3Parser::Expr_stmtContext::testlist() { + return getRuleContexts(); +} + +Python3Parser::TestlistContext* Python3Parser::Expr_stmtContext::testlist(size_t i) { + return getRuleContext(i); +} + +Python3Parser::AugassignContext* Python3Parser::Expr_stmtContext::augassign() { + return getRuleContext(0); +} + +std::vector Python3Parser::Expr_stmtContext::ASSIGN() { + return getTokens(Python3Parser::ASSIGN); +} + +tree::TerminalNode* Python3Parser::Expr_stmtContext::ASSIGN(size_t i) { + return getToken(Python3Parser::ASSIGN, i); +} + + +size_t Python3Parser::Expr_stmtContext::getRuleIndex() const { + return Python3Parser::RuleExpr_stmt; +} + + +std::any Python3Parser::Expr_stmtContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitExpr_stmt(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::Expr_stmtContext* Python3Parser::expr_stmt() { + Expr_stmtContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 16, Python3Parser::RuleExpr_stmt); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(120); + testlist(); + setState(131); + _errHandler->sync(this); + switch (_input->LA(1)) { + case Python3Parser::ADD_ASSIGN: + case Python3Parser::SUB_ASSIGN: + case Python3Parser::MULT_ASSIGN: + case Python3Parser::DIV_ASSIGN: + case Python3Parser::MOD_ASSIGN: + case Python3Parser::IDIV_ASSIGN: { + setState(121); + augassign(); + setState(122); + testlist(); + break; + } + + case Python3Parser::NEWLINE: + case Python3Parser::ASSIGN: { + setState(128); + _errHandler->sync(this); + _la = _input->LA(1); + while (_la == Python3Parser::ASSIGN) { + setState(124); + match(Python3Parser::ASSIGN); + setState(125); + testlist(); + setState(130); + _errHandler->sync(this); + _la = _input->LA(1); + } + break; + } + + default: + throw NoViableAltException(this); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- AugassignContext ------------------------------------------------------------------ + +Python3Parser::AugassignContext::AugassignContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* Python3Parser::AugassignContext::ADD_ASSIGN() { + return getToken(Python3Parser::ADD_ASSIGN, 0); +} + +tree::TerminalNode* Python3Parser::AugassignContext::SUB_ASSIGN() { + return getToken(Python3Parser::SUB_ASSIGN, 0); +} + +tree::TerminalNode* Python3Parser::AugassignContext::MULT_ASSIGN() { + return getToken(Python3Parser::MULT_ASSIGN, 0); +} + +tree::TerminalNode* Python3Parser::AugassignContext::DIV_ASSIGN() { + return getToken(Python3Parser::DIV_ASSIGN, 0); +} + +tree::TerminalNode* Python3Parser::AugassignContext::IDIV_ASSIGN() { + return getToken(Python3Parser::IDIV_ASSIGN, 0); +} + +tree::TerminalNode* Python3Parser::AugassignContext::MOD_ASSIGN() { + return getToken(Python3Parser::MOD_ASSIGN, 0); +} + + +size_t Python3Parser::AugassignContext::getRuleIndex() const { + return Python3Parser::RuleAugassign; +} + + +std::any Python3Parser::AugassignContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitAugassign(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::AugassignContext* Python3Parser::augassign() { + AugassignContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 18, Python3Parser::RuleAugassign); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(133); + _la = _input->LA(1); + if (!(((((_la - 66) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 66)) & 4151) != 0))) { + _errHandler->recoverInline(this); + } + else { + _errHandler->reportMatch(this); + consume(); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- Flow_stmtContext ------------------------------------------------------------------ + +Python3Parser::Flow_stmtContext::Flow_stmtContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +Python3Parser::Break_stmtContext* Python3Parser::Flow_stmtContext::break_stmt() { + return getRuleContext(0); +} + +Python3Parser::Continue_stmtContext* Python3Parser::Flow_stmtContext::continue_stmt() { + return getRuleContext(0); +} + +Python3Parser::Return_stmtContext* Python3Parser::Flow_stmtContext::return_stmt() { + return getRuleContext(0); +} + + +size_t Python3Parser::Flow_stmtContext::getRuleIndex() const { + return Python3Parser::RuleFlow_stmt; +} + + +std::any Python3Parser::Flow_stmtContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitFlow_stmt(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::Flow_stmtContext* Python3Parser::flow_stmt() { + Flow_stmtContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 20, Python3Parser::RuleFlow_stmt); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + setState(138); + _errHandler->sync(this); + switch (_input->LA(1)) { + case Python3Parser::BREAK: { + enterOuterAlt(_localctx, 1); + setState(135); + break_stmt(); + break; + } + + case Python3Parser::CONTINUE: { + enterOuterAlt(_localctx, 2); + setState(136); + continue_stmt(); + break; + } + + case Python3Parser::RETURN: { + enterOuterAlt(_localctx, 3); + setState(137); + return_stmt(); + break; + } + + default: + throw NoViableAltException(this); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- Break_stmtContext ------------------------------------------------------------------ + +Python3Parser::Break_stmtContext::Break_stmtContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* Python3Parser::Break_stmtContext::BREAK() { + return getToken(Python3Parser::BREAK, 0); +} + + +size_t Python3Parser::Break_stmtContext::getRuleIndex() const { + return Python3Parser::RuleBreak_stmt; +} + + +std::any Python3Parser::Break_stmtContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitBreak_stmt(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::Break_stmtContext* Python3Parser::break_stmt() { + Break_stmtContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 22, Python3Parser::RuleBreak_stmt); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(140); + match(Python3Parser::BREAK); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- Continue_stmtContext ------------------------------------------------------------------ + +Python3Parser::Continue_stmtContext::Continue_stmtContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* Python3Parser::Continue_stmtContext::CONTINUE() { + return getToken(Python3Parser::CONTINUE, 0); +} + + +size_t Python3Parser::Continue_stmtContext::getRuleIndex() const { + return Python3Parser::RuleContinue_stmt; +} + + +std::any Python3Parser::Continue_stmtContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitContinue_stmt(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::Continue_stmtContext* Python3Parser::continue_stmt() { + Continue_stmtContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 24, Python3Parser::RuleContinue_stmt); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(142); + match(Python3Parser::CONTINUE); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- Return_stmtContext ------------------------------------------------------------------ + +Python3Parser::Return_stmtContext::Return_stmtContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* Python3Parser::Return_stmtContext::RETURN() { + return getToken(Python3Parser::RETURN, 0); +} + +Python3Parser::TestlistContext* Python3Parser::Return_stmtContext::testlist() { + return getRuleContext(0); +} + + +size_t Python3Parser::Return_stmtContext::getRuleIndex() const { + return Python3Parser::RuleReturn_stmt; +} + + +std::any Python3Parser::Return_stmtContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitReturn_stmt(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::Return_stmtContext* Python3Parser::return_stmt() { + Return_stmtContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 26, Python3Parser::RuleReturn_stmt); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(144); + match(Python3Parser::RETURN); + setState(146); + _errHandler->sync(this); + + _la = _input->LA(1); + if ((((_la & ~ 0x3fULL) == 0) && + ((1ULL << _la) & 1688884229373976) != 0)) { + setState(145); + testlist(); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- Compound_stmtContext ------------------------------------------------------------------ + +Python3Parser::Compound_stmtContext::Compound_stmtContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +Python3Parser::If_stmtContext* Python3Parser::Compound_stmtContext::if_stmt() { + return getRuleContext(0); +} + +Python3Parser::While_stmtContext* Python3Parser::Compound_stmtContext::while_stmt() { + return getRuleContext(0); +} + +Python3Parser::FuncdefContext* Python3Parser::Compound_stmtContext::funcdef() { + return getRuleContext(0); +} + + +size_t Python3Parser::Compound_stmtContext::getRuleIndex() const { + return Python3Parser::RuleCompound_stmt; +} + + +std::any Python3Parser::Compound_stmtContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitCompound_stmt(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::Compound_stmtContext* Python3Parser::compound_stmt() { + Compound_stmtContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 28, Python3Parser::RuleCompound_stmt); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + setState(151); + _errHandler->sync(this); + switch (_input->LA(1)) { + case Python3Parser::IF: { + enterOuterAlt(_localctx, 1); + setState(148); + if_stmt(); + break; + } + + case Python3Parser::WHILE: { + enterOuterAlt(_localctx, 2); + setState(149); + while_stmt(); + break; + } + + case Python3Parser::DEF: { + enterOuterAlt(_localctx, 3); + setState(150); + funcdef(); + break; + } + + default: + throw NoViableAltException(this); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- If_stmtContext ------------------------------------------------------------------ + +Python3Parser::If_stmtContext::If_stmtContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* Python3Parser::If_stmtContext::IF() { + return getToken(Python3Parser::IF, 0); +} + +std::vector Python3Parser::If_stmtContext::test() { + return getRuleContexts(); +} + +Python3Parser::TestContext* Python3Parser::If_stmtContext::test(size_t i) { + return getRuleContext(i); +} + +std::vector Python3Parser::If_stmtContext::COLON() { + return getTokens(Python3Parser::COLON); +} + +tree::TerminalNode* Python3Parser::If_stmtContext::COLON(size_t i) { + return getToken(Python3Parser::COLON, i); +} + +std::vector Python3Parser::If_stmtContext::suite() { + return getRuleContexts(); +} + +Python3Parser::SuiteContext* Python3Parser::If_stmtContext::suite(size_t i) { + return getRuleContext(i); +} + +std::vector Python3Parser::If_stmtContext::ELIF() { + return getTokens(Python3Parser::ELIF); +} + +tree::TerminalNode* Python3Parser::If_stmtContext::ELIF(size_t i) { + return getToken(Python3Parser::ELIF, i); +} + +tree::TerminalNode* Python3Parser::If_stmtContext::ELSE() { + return getToken(Python3Parser::ELSE, 0); +} + + +size_t Python3Parser::If_stmtContext::getRuleIndex() const { + return Python3Parser::RuleIf_stmt; +} + + +std::any Python3Parser::If_stmtContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitIf_stmt(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::If_stmtContext* Python3Parser::if_stmt() { + If_stmtContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 30, Python3Parser::RuleIf_stmt); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(153); + match(Python3Parser::IF); + setState(154); + test(); + setState(155); + match(Python3Parser::COLON); + setState(156); + suite(); + setState(164); + _errHandler->sync(this); + _la = _input->LA(1); + while (_la == Python3Parser::ELIF) { + setState(157); + match(Python3Parser::ELIF); + setState(158); + test(); + setState(159); + match(Python3Parser::COLON); + setState(160); + suite(); + setState(166); + _errHandler->sync(this); + _la = _input->LA(1); + } + setState(170); + _errHandler->sync(this); + + _la = _input->LA(1); + if (_la == Python3Parser::ELSE) { + setState(167); + match(Python3Parser::ELSE); + setState(168); + match(Python3Parser::COLON); + setState(169); + suite(); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- While_stmtContext ------------------------------------------------------------------ + +Python3Parser::While_stmtContext::While_stmtContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* Python3Parser::While_stmtContext::WHILE() { + return getToken(Python3Parser::WHILE, 0); +} + +Python3Parser::TestContext* Python3Parser::While_stmtContext::test() { + return getRuleContext(0); +} + +tree::TerminalNode* Python3Parser::While_stmtContext::COLON() { + return getToken(Python3Parser::COLON, 0); +} + +Python3Parser::SuiteContext* Python3Parser::While_stmtContext::suite() { + return getRuleContext(0); +} + + +size_t Python3Parser::While_stmtContext::getRuleIndex() const { + return Python3Parser::RuleWhile_stmt; +} + + +std::any Python3Parser::While_stmtContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitWhile_stmt(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::While_stmtContext* Python3Parser::while_stmt() { + While_stmtContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 32, Python3Parser::RuleWhile_stmt); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(172); + match(Python3Parser::WHILE); + setState(173); + test(); + setState(174); + match(Python3Parser::COLON); + setState(175); + suite(); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- SuiteContext ------------------------------------------------------------------ + +Python3Parser::SuiteContext::SuiteContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +Python3Parser::Simple_stmtContext* Python3Parser::SuiteContext::simple_stmt() { + return getRuleContext(0); +} + +tree::TerminalNode* Python3Parser::SuiteContext::NEWLINE() { + return getToken(Python3Parser::NEWLINE, 0); +} + +tree::TerminalNode* Python3Parser::SuiteContext::INDENT() { + return getToken(Python3Parser::INDENT, 0); +} + +tree::TerminalNode* Python3Parser::SuiteContext::DEDENT() { + return getToken(Python3Parser::DEDENT, 0); +} + +std::vector Python3Parser::SuiteContext::stmt() { + return getRuleContexts(); +} + +Python3Parser::StmtContext* Python3Parser::SuiteContext::stmt(size_t i) { + return getRuleContext(i); +} + + +size_t Python3Parser::SuiteContext::getRuleIndex() const { + return Python3Parser::RuleSuite; +} + + +std::any Python3Parser::SuiteContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitSuite(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::SuiteContext* Python3Parser::suite() { + SuiteContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 34, Python3Parser::RuleSuite); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + setState(187); + _errHandler->sync(this); + switch (_input->LA(1)) { + case Python3Parser::STRING: + case Python3Parser::NUMBER: + case Python3Parser::RETURN: + case Python3Parser::NOT: + case Python3Parser::NONE: + case Python3Parser::TRUE: + case Python3Parser::FALSE: + case Python3Parser::CONTINUE: + case Python3Parser::BREAK: + case Python3Parser::NAME: + case Python3Parser::OPEN_PAREN: + case Python3Parser::ADD: + case Python3Parser::MINUS: { + enterOuterAlt(_localctx, 1); + setState(177); + simple_stmt(); + break; + } + + case Python3Parser::NEWLINE: { + enterOuterAlt(_localctx, 2); + setState(178); + match(Python3Parser::NEWLINE); + setState(179); + match(Python3Parser::INDENT); + setState(181); + _errHandler->sync(this); + _la = _input->LA(1); + do { + setState(180); + stmt(); + setState(183); + _errHandler->sync(this); + _la = _input->LA(1); + } while ((((_la & ~ 0x3fULL) == 0) && + ((1ULL << _la) & 1688884232522200) != 0)); + setState(185); + match(Python3Parser::DEDENT); + break; + } + + default: + throw NoViableAltException(this); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- TestContext ------------------------------------------------------------------ + +Python3Parser::TestContext::TestContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +Python3Parser::Or_testContext* Python3Parser::TestContext::or_test() { + return getRuleContext(0); +} + + +size_t Python3Parser::TestContext::getRuleIndex() const { + return Python3Parser::RuleTest; +} + + +std::any Python3Parser::TestContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitTest(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::TestContext* Python3Parser::test() { + TestContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 36, Python3Parser::RuleTest); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(189); + or_test(); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- Or_testContext ------------------------------------------------------------------ + +Python3Parser::Or_testContext::Or_testContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +std::vector Python3Parser::Or_testContext::and_test() { + return getRuleContexts(); +} + +Python3Parser::And_testContext* Python3Parser::Or_testContext::and_test(size_t i) { + return getRuleContext(i); +} + +std::vector Python3Parser::Or_testContext::OR() { + return getTokens(Python3Parser::OR); +} + +tree::TerminalNode* Python3Parser::Or_testContext::OR(size_t i) { + return getToken(Python3Parser::OR, i); +} + + +size_t Python3Parser::Or_testContext::getRuleIndex() const { + return Python3Parser::RuleOr_test; +} + + +std::any Python3Parser::Or_testContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitOr_test(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::Or_testContext* Python3Parser::or_test() { + Or_testContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 38, Python3Parser::RuleOr_test); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(191); + and_test(); + setState(196); + _errHandler->sync(this); + _la = _input->LA(1); + while (_la == Python3Parser::OR) { + setState(192); + match(Python3Parser::OR); + setState(193); + and_test(); + setState(198); + _errHandler->sync(this); + _la = _input->LA(1); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- And_testContext ------------------------------------------------------------------ + +Python3Parser::And_testContext::And_testContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +std::vector Python3Parser::And_testContext::not_test() { + return getRuleContexts(); +} + +Python3Parser::Not_testContext* Python3Parser::And_testContext::not_test(size_t i) { + return getRuleContext(i); +} + +std::vector Python3Parser::And_testContext::AND() { + return getTokens(Python3Parser::AND); +} + +tree::TerminalNode* Python3Parser::And_testContext::AND(size_t i) { + return getToken(Python3Parser::AND, i); +} + + +size_t Python3Parser::And_testContext::getRuleIndex() const { + return Python3Parser::RuleAnd_test; +} + + +std::any Python3Parser::And_testContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitAnd_test(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::And_testContext* Python3Parser::and_test() { + And_testContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 40, Python3Parser::RuleAnd_test); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(199); + not_test(); + setState(204); + _errHandler->sync(this); + _la = _input->LA(1); + while (_la == Python3Parser::AND) { + setState(200); + match(Python3Parser::AND); + setState(201); + not_test(); + setState(206); + _errHandler->sync(this); + _la = _input->LA(1); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- Not_testContext ------------------------------------------------------------------ + +Python3Parser::Not_testContext::Not_testContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* Python3Parser::Not_testContext::NOT() { + return getToken(Python3Parser::NOT, 0); +} + +Python3Parser::Not_testContext* Python3Parser::Not_testContext::not_test() { + return getRuleContext(0); +} + +Python3Parser::ComparisonContext* Python3Parser::Not_testContext::comparison() { + return getRuleContext(0); +} + + +size_t Python3Parser::Not_testContext::getRuleIndex() const { + return Python3Parser::RuleNot_test; +} + + +std::any Python3Parser::Not_testContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitNot_test(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::Not_testContext* Python3Parser::not_test() { + Not_testContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 42, Python3Parser::RuleNot_test); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + setState(210); + _errHandler->sync(this); + switch (_input->LA(1)) { + case Python3Parser::NOT: { + enterOuterAlt(_localctx, 1); + setState(207); + match(Python3Parser::NOT); + setState(208); + not_test(); + break; + } + + case Python3Parser::STRING: + case Python3Parser::NUMBER: + case Python3Parser::NONE: + case Python3Parser::TRUE: + case Python3Parser::FALSE: + case Python3Parser::NAME: + case Python3Parser::OPEN_PAREN: + case Python3Parser::ADD: + case Python3Parser::MINUS: { + enterOuterAlt(_localctx, 2); + setState(209); + comparison(); + break; + } + + default: + throw NoViableAltException(this); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- ComparisonContext ------------------------------------------------------------------ + +Python3Parser::ComparisonContext::ComparisonContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +std::vector Python3Parser::ComparisonContext::arith_expr() { + return getRuleContexts(); +} + +Python3Parser::Arith_exprContext* Python3Parser::ComparisonContext::arith_expr(size_t i) { + return getRuleContext(i); +} + +std::vector Python3Parser::ComparisonContext::comp_op() { + return getRuleContexts(); +} + +Python3Parser::Comp_opContext* Python3Parser::ComparisonContext::comp_op(size_t i) { + return getRuleContext(i); +} + + +size_t Python3Parser::ComparisonContext::getRuleIndex() const { + return Python3Parser::RuleComparison; +} + + +std::any Python3Parser::ComparisonContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitComparison(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::ComparisonContext* Python3Parser::comparison() { + ComparisonContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 44, Python3Parser::RuleComparison); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(212); + arith_expr(); + setState(218); + _errHandler->sync(this); + _la = _input->LA(1); + while ((((_la & ~ 0x3fULL) == 0) && + ((1ULL << _la) & -4755801206503243776) != 0)) { + setState(213); + comp_op(); + setState(214); + arith_expr(); + setState(220); + _errHandler->sync(this); + _la = _input->LA(1); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- Comp_opContext ------------------------------------------------------------------ + +Python3Parser::Comp_opContext::Comp_opContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* Python3Parser::Comp_opContext::LESS_THAN() { + return getToken(Python3Parser::LESS_THAN, 0); +} + +tree::TerminalNode* Python3Parser::Comp_opContext::GREATER_THAN() { + return getToken(Python3Parser::GREATER_THAN, 0); +} + +tree::TerminalNode* Python3Parser::Comp_opContext::EQUALS() { + return getToken(Python3Parser::EQUALS, 0); +} + +tree::TerminalNode* Python3Parser::Comp_opContext::GT_EQ() { + return getToken(Python3Parser::GT_EQ, 0); +} + +tree::TerminalNode* Python3Parser::Comp_opContext::LT_EQ() { + return getToken(Python3Parser::LT_EQ, 0); +} + +tree::TerminalNode* Python3Parser::Comp_opContext::NOT_EQ_2() { + return getToken(Python3Parser::NOT_EQ_2, 0); +} + + +size_t Python3Parser::Comp_opContext::getRuleIndex() const { + return Python3Parser::RuleComp_op; +} + + +std::any Python3Parser::Comp_opContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitComp_op(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::Comp_opContext* Python3Parser::comp_op() { + Comp_opContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 46, Python3Parser::RuleComp_op); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(221); + _la = _input->LA(1); + if (!((((_la & ~ 0x3fULL) == 0) && + ((1ULL << _la) & -4755801206503243776) != 0))) { + _errHandler->recoverInline(this); + } + else { + _errHandler->reportMatch(this); + consume(); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- Arith_exprContext ------------------------------------------------------------------ + +Python3Parser::Arith_exprContext::Arith_exprContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +std::vector Python3Parser::Arith_exprContext::term() { + return getRuleContexts(); +} + +Python3Parser::TermContext* Python3Parser::Arith_exprContext::term(size_t i) { + return getRuleContext(i); +} + +std::vector Python3Parser::Arith_exprContext::addorsub_op() { + return getRuleContexts(); +} + +Python3Parser::Addorsub_opContext* Python3Parser::Arith_exprContext::addorsub_op(size_t i) { + return getRuleContext(i); +} + + +size_t Python3Parser::Arith_exprContext::getRuleIndex() const { + return Python3Parser::RuleArith_expr; +} + + +std::any Python3Parser::Arith_exprContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitArith_expr(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::Arith_exprContext* Python3Parser::arith_expr() { + Arith_exprContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 48, Python3Parser::RuleArith_expr); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(223); + term(); + setState(229); + _errHandler->sync(this); + _la = _input->LA(1); + while (_la == Python3Parser::ADD + + || _la == Python3Parser::MINUS) { + setState(224); + addorsub_op(); + setState(225); + term(); + setState(231); + _errHandler->sync(this); + _la = _input->LA(1); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- Addorsub_opContext ------------------------------------------------------------------ + +Python3Parser::Addorsub_opContext::Addorsub_opContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* Python3Parser::Addorsub_opContext::ADD() { + return getToken(Python3Parser::ADD, 0); +} + +tree::TerminalNode* Python3Parser::Addorsub_opContext::MINUS() { + return getToken(Python3Parser::MINUS, 0); +} + + +size_t Python3Parser::Addorsub_opContext::getRuleIndex() const { + return Python3Parser::RuleAddorsub_op; +} + + +std::any Python3Parser::Addorsub_opContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitAddorsub_op(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::Addorsub_opContext* Python3Parser::addorsub_op() { + Addorsub_opContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 50, Python3Parser::RuleAddorsub_op); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(232); + _la = _input->LA(1); + if (!(_la == Python3Parser::ADD + + || _la == Python3Parser::MINUS)) { + _errHandler->recoverInline(this); + } + else { + _errHandler->reportMatch(this); + consume(); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- TermContext ------------------------------------------------------------------ + +Python3Parser::TermContext::TermContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +std::vector Python3Parser::TermContext::factor() { + return getRuleContexts(); +} + +Python3Parser::FactorContext* Python3Parser::TermContext::factor(size_t i) { + return getRuleContext(i); +} + +std::vector Python3Parser::TermContext::muldivmod_op() { + return getRuleContexts(); +} + +Python3Parser::Muldivmod_opContext* Python3Parser::TermContext::muldivmod_op(size_t i) { + return getRuleContext(i); +} + + +size_t Python3Parser::TermContext::getRuleIndex() const { + return Python3Parser::RuleTerm; +} + + +std::any Python3Parser::TermContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitTerm(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::TermContext* Python3Parser::term() { + TermContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 52, Python3Parser::RuleTerm); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(234); + factor(); + setState(240); + _errHandler->sync(this); + _la = _input->LA(1); + while ((((_la & ~ 0x3fULL) == 0) && + ((1ULL << _la) & 15762615875665920) != 0)) { + setState(235); + muldivmod_op(); + setState(236); + factor(); + setState(242); + _errHandler->sync(this); + _la = _input->LA(1); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- Muldivmod_opContext ------------------------------------------------------------------ + +Python3Parser::Muldivmod_opContext::Muldivmod_opContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* Python3Parser::Muldivmod_opContext::STAR() { + return getToken(Python3Parser::STAR, 0); +} + +tree::TerminalNode* Python3Parser::Muldivmod_opContext::DIV() { + return getToken(Python3Parser::DIV, 0); +} + +tree::TerminalNode* Python3Parser::Muldivmod_opContext::IDIV() { + return getToken(Python3Parser::IDIV, 0); +} + +tree::TerminalNode* Python3Parser::Muldivmod_opContext::MOD() { + return getToken(Python3Parser::MOD, 0); +} + + +size_t Python3Parser::Muldivmod_opContext::getRuleIndex() const { + return Python3Parser::RuleMuldivmod_op; +} + + +std::any Python3Parser::Muldivmod_opContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitMuldivmod_op(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::Muldivmod_opContext* Python3Parser::muldivmod_op() { + Muldivmod_opContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 54, Python3Parser::RuleMuldivmod_op); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(243); + _la = _input->LA(1); + if (!((((_la & ~ 0x3fULL) == 0) && + ((1ULL << _la) & 15762615875665920) != 0))) { + _errHandler->recoverInline(this); + } + else { + _errHandler->reportMatch(this); + consume(); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- FactorContext ------------------------------------------------------------------ + +Python3Parser::FactorContext::FactorContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +Python3Parser::FactorContext* Python3Parser::FactorContext::factor() { + return getRuleContext(0); +} + +tree::TerminalNode* Python3Parser::FactorContext::ADD() { + return getToken(Python3Parser::ADD, 0); +} + +tree::TerminalNode* Python3Parser::FactorContext::MINUS() { + return getToken(Python3Parser::MINUS, 0); +} + +Python3Parser::Atom_exprContext* Python3Parser::FactorContext::atom_expr() { + return getRuleContext(0); +} + + +size_t Python3Parser::FactorContext::getRuleIndex() const { + return Python3Parser::RuleFactor; +} + + +std::any Python3Parser::FactorContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitFactor(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::FactorContext* Python3Parser::factor() { + FactorContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 56, Python3Parser::RuleFactor); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + setState(248); + _errHandler->sync(this); + switch (_input->LA(1)) { + case Python3Parser::ADD: + case Python3Parser::MINUS: { + enterOuterAlt(_localctx, 1); + setState(245); + _la = _input->LA(1); + if (!(_la == Python3Parser::ADD + + || _la == Python3Parser::MINUS)) { + _errHandler->recoverInline(this); + } + else { + _errHandler->reportMatch(this); + consume(); + } + setState(246); + factor(); + break; + } + + case Python3Parser::STRING: + case Python3Parser::NUMBER: + case Python3Parser::NONE: + case Python3Parser::TRUE: + case Python3Parser::FALSE: + case Python3Parser::NAME: + case Python3Parser::OPEN_PAREN: { + enterOuterAlt(_localctx, 2); + setState(247); + atom_expr(); + break; + } + + default: + throw NoViableAltException(this); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- Atom_exprContext ------------------------------------------------------------------ + +Python3Parser::Atom_exprContext::Atom_exprContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +Python3Parser::AtomContext* Python3Parser::Atom_exprContext::atom() { + return getRuleContext(0); +} + +Python3Parser::TrailerContext* Python3Parser::Atom_exprContext::trailer() { + return getRuleContext(0); +} + + +size_t Python3Parser::Atom_exprContext::getRuleIndex() const { + return Python3Parser::RuleAtom_expr; +} + + +std::any Python3Parser::Atom_exprContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitAtom_expr(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::Atom_exprContext* Python3Parser::atom_expr() { + Atom_exprContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 58, Python3Parser::RuleAtom_expr); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(250); + atom(); + setState(252); + _errHandler->sync(this); + + _la = _input->LA(1); + if (_la == Python3Parser::OPEN_PAREN) { + setState(251); + trailer(); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- TrailerContext ------------------------------------------------------------------ + +Python3Parser::TrailerContext::TrailerContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* Python3Parser::TrailerContext::OPEN_PAREN() { + return getToken(Python3Parser::OPEN_PAREN, 0); +} + +tree::TerminalNode* Python3Parser::TrailerContext::CLOSE_PAREN() { + return getToken(Python3Parser::CLOSE_PAREN, 0); +} + +Python3Parser::ArglistContext* Python3Parser::TrailerContext::arglist() { + return getRuleContext(0); +} + + +size_t Python3Parser::TrailerContext::getRuleIndex() const { + return Python3Parser::RuleTrailer; +} + + +std::any Python3Parser::TrailerContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitTrailer(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::TrailerContext* Python3Parser::trailer() { + TrailerContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 60, Python3Parser::RuleTrailer); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(254); + match(Python3Parser::OPEN_PAREN); + setState(256); + _errHandler->sync(this); + + _la = _input->LA(1); + if ((((_la & ~ 0x3fULL) == 0) && + ((1ULL << _la) & 1688884229373976) != 0)) { + setState(255); + arglist(); + } + setState(258); + match(Python3Parser::CLOSE_PAREN); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- AtomContext ------------------------------------------------------------------ + +Python3Parser::AtomContext::AtomContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* Python3Parser::AtomContext::NAME() { + return getToken(Python3Parser::NAME, 0); +} + +tree::TerminalNode* Python3Parser::AtomContext::NUMBER() { + return getToken(Python3Parser::NUMBER, 0); +} + +tree::TerminalNode* Python3Parser::AtomContext::NONE() { + return getToken(Python3Parser::NONE, 0); +} + +tree::TerminalNode* Python3Parser::AtomContext::TRUE() { + return getToken(Python3Parser::TRUE, 0); +} + +tree::TerminalNode* Python3Parser::AtomContext::FALSE() { + return getToken(Python3Parser::FALSE, 0); +} + +tree::TerminalNode* Python3Parser::AtomContext::OPEN_PAREN() { + return getToken(Python3Parser::OPEN_PAREN, 0); +} + +Python3Parser::TestContext* Python3Parser::AtomContext::test() { + return getRuleContext(0); +} + +tree::TerminalNode* Python3Parser::AtomContext::CLOSE_PAREN() { + return getToken(Python3Parser::CLOSE_PAREN, 0); +} + +std::vector Python3Parser::AtomContext::STRING() { + return getTokens(Python3Parser::STRING); +} + +tree::TerminalNode* Python3Parser::AtomContext::STRING(size_t i) { + return getToken(Python3Parser::STRING, i); +} + + +size_t Python3Parser::AtomContext::getRuleIndex() const { + return Python3Parser::RuleAtom; +} + + +std::any Python3Parser::AtomContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitAtom(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::AtomContext* Python3Parser::atom() { + AtomContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 62, Python3Parser::RuleAtom); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(274); + _errHandler->sync(this); + switch (_input->LA(1)) { + case Python3Parser::NAME: { + setState(260); + match(Python3Parser::NAME); + break; + } + + case Python3Parser::NUMBER: { + setState(261); + match(Python3Parser::NUMBER); + break; + } + + case Python3Parser::STRING: { + setState(263); + _errHandler->sync(this); + _la = _input->LA(1); + do { + setState(262); + match(Python3Parser::STRING); + setState(265); + _errHandler->sync(this); + _la = _input->LA(1); + } while (_la == Python3Parser::STRING); + break; + } + + case Python3Parser::NONE: { + setState(267); + match(Python3Parser::NONE); + break; + } + + case Python3Parser::TRUE: { + setState(268); + match(Python3Parser::TRUE); + break; + } + + case Python3Parser::FALSE: { + setState(269); + match(Python3Parser::FALSE); + break; + } + + case Python3Parser::OPEN_PAREN: { + setState(270); + match(Python3Parser::OPEN_PAREN); + setState(271); + test(); + setState(272); + match(Python3Parser::CLOSE_PAREN); + break; + } + + default: + throw NoViableAltException(this); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- TestlistContext ------------------------------------------------------------------ + +Python3Parser::TestlistContext::TestlistContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +std::vector Python3Parser::TestlistContext::test() { + return getRuleContexts(); +} + +Python3Parser::TestContext* Python3Parser::TestlistContext::test(size_t i) { + return getRuleContext(i); +} + +std::vector Python3Parser::TestlistContext::COMMA() { + return getTokens(Python3Parser::COMMA); +} + +tree::TerminalNode* Python3Parser::TestlistContext::COMMA(size_t i) { + return getToken(Python3Parser::COMMA, i); +} + + +size_t Python3Parser::TestlistContext::getRuleIndex() const { + return Python3Parser::RuleTestlist; +} + + +std::any Python3Parser::TestlistContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitTestlist(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::TestlistContext* Python3Parser::testlist() { + TestlistContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 64, Python3Parser::RuleTestlist); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + size_t alt; + enterOuterAlt(_localctx, 1); + setState(276); + test(); + setState(281); + _errHandler->sync(this); + alt = getInterpreter()->adaptivePredict(_input, 28, _ctx); + while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { + if (alt == 1) { + setState(277); + match(Python3Parser::COMMA); + setState(278); + test(); + } + setState(283); + _errHandler->sync(this); + alt = getInterpreter()->adaptivePredict(_input, 28, _ctx); + } + setState(285); + _errHandler->sync(this); + + _la = _input->LA(1); + if (_la == Python3Parser::COMMA) { + setState(284); + match(Python3Parser::COMMA); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- ArglistContext ------------------------------------------------------------------ + +Python3Parser::ArglistContext::ArglistContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +std::vector Python3Parser::ArglistContext::argument() { + return getRuleContexts(); +} + +Python3Parser::ArgumentContext* Python3Parser::ArglistContext::argument(size_t i) { + return getRuleContext(i); +} + +std::vector Python3Parser::ArglistContext::COMMA() { + return getTokens(Python3Parser::COMMA); +} + +tree::TerminalNode* Python3Parser::ArglistContext::COMMA(size_t i) { + return getToken(Python3Parser::COMMA, i); +} + + +size_t Python3Parser::ArglistContext::getRuleIndex() const { + return Python3Parser::RuleArglist; +} + + +std::any Python3Parser::ArglistContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitArglist(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::ArglistContext* Python3Parser::arglist() { + ArglistContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 66, Python3Parser::RuleArglist); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + size_t alt; + enterOuterAlt(_localctx, 1); + setState(287); + argument(); + setState(292); + _errHandler->sync(this); + alt = getInterpreter()->adaptivePredict(_input, 30, _ctx); + while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { + if (alt == 1) { + setState(288); + match(Python3Parser::COMMA); + setState(289); + argument(); + } + setState(294); + _errHandler->sync(this); + alt = getInterpreter()->adaptivePredict(_input, 30, _ctx); + } + setState(296); + _errHandler->sync(this); + + _la = _input->LA(1); + if (_la == Python3Parser::COMMA) { + setState(295); + match(Python3Parser::COMMA); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- ArgumentContext ------------------------------------------------------------------ + +Python3Parser::ArgumentContext::ArgumentContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +std::vector Python3Parser::ArgumentContext::test() { + return getRuleContexts(); +} + +Python3Parser::TestContext* Python3Parser::ArgumentContext::test(size_t i) { + return getRuleContext(i); +} + +tree::TerminalNode* Python3Parser::ArgumentContext::ASSIGN() { + return getToken(Python3Parser::ASSIGN, 0); +} + + +size_t Python3Parser::ArgumentContext::getRuleIndex() const { + return Python3Parser::RuleArgument; +} + + +std::any Python3Parser::ArgumentContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitArgument(this); + else + return visitor->visitChildren(this); +} + +Python3Parser::ArgumentContext* Python3Parser::argument() { + ArgumentContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 68, Python3Parser::RuleArgument); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(303); + _errHandler->sync(this); + switch (getInterpreter()->adaptivePredict(_input, 32, _ctx)) { + case 1: { + setState(298); + test(); + break; + } + + case 2: { + setState(299); + test(); + setState(300); + match(Python3Parser::ASSIGN); + setState(301); + test(); + break; + } + + default: + break; + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +void Python3Parser::initialize() { +#if ANTLR4_USE_THREAD_LOCAL_CACHE + python3parserParserInitialize(); +#else + ::antlr4::internal::call_once(python3parserParserOnceFlag, python3parserParserInitialize); +#endif +} diff --git a/generated/Python3Parser.h b/generated/Python3Parser.h new file mode 100644 index 0000000..4041f3c --- /dev/null +++ b/generated/Python3Parser.h @@ -0,0 +1,661 @@ + +// Generated from Python3Parser.g4 by ANTLR 4.13.1 + +#pragma once + + +#include "antlr4-runtime.h" + + + + +class Python3Parser : public antlr4::Parser { +public: + enum { + INDENT = 1, DEDENT = 2, STRING = 3, NUMBER = 4, INTEGER = 5, DEF = 6, + RETURN = 7, IF = 8, ELIF = 9, ELSE = 10, WHILE = 11, FOR = 12, IN = 13, + OR = 14, AND = 15, NOT = 16, NONE = 17, TRUE = 18, FALSE = 19, CONTINUE = 20, + BREAK = 21, NEWLINE = 22, NAME = 23, STRING_LITERAL = 24, BYTES_LITERAL = 25, + DECIMAL_INTEGER = 26, OCT_INTEGER = 27, HEX_INTEGER = 28, BIN_INTEGER = 29, + FLOAT_NUMBER = 30, IMAG_NUMBER = 31, DOT = 32, ELLIPSIS = 33, STAR = 34, + OPEN_PAREN = 35, CLOSE_PAREN = 36, COMMA = 37, COLON = 38, SEMI_COLON = 39, + POWER = 40, ASSIGN = 41, OPEN_BRACK = 42, CLOSE_BRACK = 43, OR_OP = 44, + XOR = 45, AND_OP = 46, LEFT_SHIFT = 47, RIGHT_SHIFT = 48, ADD = 49, + MINUS = 50, DIV = 51, MOD = 52, IDIV = 53, NOT_OP = 54, OPEN_BRACE = 55, + CLOSE_BRACE = 56, LESS_THAN = 57, GREATER_THAN = 58, EQUALS = 59, GT_EQ = 60, + LT_EQ = 61, NOT_EQ_1 = 62, NOT_EQ_2 = 63, AT = 64, ARROW = 65, ADD_ASSIGN = 66, + SUB_ASSIGN = 67, MULT_ASSIGN = 68, AT_ASSIGN = 69, DIV_ASSIGN = 70, + MOD_ASSIGN = 71, AND_ASSIGN = 72, OR_ASSIGN = 73, XOR_ASSIGN = 74, LEFT_SHIFT_ASSIGN = 75, + RIGHT_SHIFT_ASSIGN = 76, POWER_ASSIGN = 77, IDIV_ASSIGN = 78, SKIP_ = 79, + UNKNOWN_CHAR = 80 + }; + + enum { + RuleFile_input = 0, RuleFuncdef = 1, RuleParameters = 2, RuleTypedargslist = 3, + RuleTfpdef = 4, RuleStmt = 5, RuleSimple_stmt = 6, RuleSmall_stmt = 7, + RuleExpr_stmt = 8, RuleAugassign = 9, RuleFlow_stmt = 10, RuleBreak_stmt = 11, + RuleContinue_stmt = 12, RuleReturn_stmt = 13, RuleCompound_stmt = 14, + RuleIf_stmt = 15, RuleWhile_stmt = 16, RuleSuite = 17, RuleTest = 18, + RuleOr_test = 19, RuleAnd_test = 20, RuleNot_test = 21, RuleComparison = 22, + RuleComp_op = 23, RuleArith_expr = 24, RuleAddorsub_op = 25, RuleTerm = 26, + RuleMuldivmod_op = 27, RuleFactor = 28, RuleAtom_expr = 29, RuleTrailer = 30, + RuleAtom = 31, RuleTestlist = 32, RuleArglist = 33, RuleArgument = 34 + }; + + explicit Python3Parser(antlr4::TokenStream *input); + + Python3Parser(antlr4::TokenStream *input, const antlr4::atn::ParserATNSimulatorOptions &options); + + ~Python3Parser() override; + + std::string getGrammarFileName() const override; + + const antlr4::atn::ATN& getATN() const override; + + const std::vector& getRuleNames() const override; + + const antlr4::dfa::Vocabulary& getVocabulary() const override; + + antlr4::atn::SerializedATNView getSerializedATN() const override; + + + class File_inputContext; + class FuncdefContext; + class ParametersContext; + class TypedargslistContext; + class TfpdefContext; + class StmtContext; + class Simple_stmtContext; + class Small_stmtContext; + class Expr_stmtContext; + class AugassignContext; + class Flow_stmtContext; + class Break_stmtContext; + class Continue_stmtContext; + class Return_stmtContext; + class Compound_stmtContext; + class If_stmtContext; + class While_stmtContext; + class SuiteContext; + class TestContext; + class Or_testContext; + class And_testContext; + class Not_testContext; + class ComparisonContext; + class Comp_opContext; + class Arith_exprContext; + class Addorsub_opContext; + class TermContext; + class Muldivmod_opContext; + class FactorContext; + class Atom_exprContext; + class TrailerContext; + class AtomContext; + class TestlistContext; + class ArglistContext; + class ArgumentContext; + + class File_inputContext : public antlr4::ParserRuleContext { + public: + File_inputContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *EOF(); + std::vector NEWLINE(); + antlr4::tree::TerminalNode* NEWLINE(size_t i); + std::vector stmt(); + StmtContext* stmt(size_t i); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + File_inputContext* file_input(); + + class FuncdefContext : public antlr4::ParserRuleContext { + public: + FuncdefContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *DEF(); + antlr4::tree::TerminalNode *NAME(); + ParametersContext *parameters(); + antlr4::tree::TerminalNode *COLON(); + SuiteContext *suite(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + FuncdefContext* funcdef(); + + class ParametersContext : public antlr4::ParserRuleContext { + public: + ParametersContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *OPEN_PAREN(); + antlr4::tree::TerminalNode *CLOSE_PAREN(); + TypedargslistContext *typedargslist(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + ParametersContext* parameters(); + + class TypedargslistContext : public antlr4::ParserRuleContext { + public: + TypedargslistContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + std::vector tfpdef(); + TfpdefContext* tfpdef(size_t i); + std::vector ASSIGN(); + antlr4::tree::TerminalNode* ASSIGN(size_t i); + std::vector test(); + TestContext* test(size_t i); + std::vector COMMA(); + antlr4::tree::TerminalNode* COMMA(size_t i); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + TypedargslistContext* typedargslist(); + + class TfpdefContext : public antlr4::ParserRuleContext { + public: + TfpdefContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *NAME(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + TfpdefContext* tfpdef(); + + class StmtContext : public antlr4::ParserRuleContext { + public: + StmtContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + Simple_stmtContext *simple_stmt(); + Compound_stmtContext *compound_stmt(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + StmtContext* stmt(); + + class Simple_stmtContext : public antlr4::ParserRuleContext { + public: + Simple_stmtContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + Small_stmtContext *small_stmt(); + antlr4::tree::TerminalNode *NEWLINE(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + Simple_stmtContext* simple_stmt(); + + class Small_stmtContext : public antlr4::ParserRuleContext { + public: + Small_stmtContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + Expr_stmtContext *expr_stmt(); + Flow_stmtContext *flow_stmt(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + Small_stmtContext* small_stmt(); + + class Expr_stmtContext : public antlr4::ParserRuleContext { + public: + Expr_stmtContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + std::vector testlist(); + TestlistContext* testlist(size_t i); + AugassignContext *augassign(); + std::vector ASSIGN(); + antlr4::tree::TerminalNode* ASSIGN(size_t i); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + Expr_stmtContext* expr_stmt(); + + class AugassignContext : public antlr4::ParserRuleContext { + public: + AugassignContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *ADD_ASSIGN(); + antlr4::tree::TerminalNode *SUB_ASSIGN(); + antlr4::tree::TerminalNode *MULT_ASSIGN(); + antlr4::tree::TerminalNode *DIV_ASSIGN(); + antlr4::tree::TerminalNode *IDIV_ASSIGN(); + antlr4::tree::TerminalNode *MOD_ASSIGN(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + AugassignContext* augassign(); + + class Flow_stmtContext : public antlr4::ParserRuleContext { + public: + Flow_stmtContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + Break_stmtContext *break_stmt(); + Continue_stmtContext *continue_stmt(); + Return_stmtContext *return_stmt(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + Flow_stmtContext* flow_stmt(); + + class Break_stmtContext : public antlr4::ParserRuleContext { + public: + Break_stmtContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *BREAK(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + Break_stmtContext* break_stmt(); + + class Continue_stmtContext : public antlr4::ParserRuleContext { + public: + Continue_stmtContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *CONTINUE(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + Continue_stmtContext* continue_stmt(); + + class Return_stmtContext : public antlr4::ParserRuleContext { + public: + Return_stmtContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *RETURN(); + TestlistContext *testlist(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + Return_stmtContext* return_stmt(); + + class Compound_stmtContext : public antlr4::ParserRuleContext { + public: + Compound_stmtContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + If_stmtContext *if_stmt(); + While_stmtContext *while_stmt(); + FuncdefContext *funcdef(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + Compound_stmtContext* compound_stmt(); + + class If_stmtContext : public antlr4::ParserRuleContext { + public: + If_stmtContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *IF(); + std::vector test(); + TestContext* test(size_t i); + std::vector COLON(); + antlr4::tree::TerminalNode* COLON(size_t i); + std::vector suite(); + SuiteContext* suite(size_t i); + std::vector ELIF(); + antlr4::tree::TerminalNode* ELIF(size_t i); + antlr4::tree::TerminalNode *ELSE(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + If_stmtContext* if_stmt(); + + class While_stmtContext : public antlr4::ParserRuleContext { + public: + While_stmtContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *WHILE(); + TestContext *test(); + antlr4::tree::TerminalNode *COLON(); + SuiteContext *suite(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + While_stmtContext* while_stmt(); + + class SuiteContext : public antlr4::ParserRuleContext { + public: + SuiteContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + Simple_stmtContext *simple_stmt(); + antlr4::tree::TerminalNode *NEWLINE(); + antlr4::tree::TerminalNode *INDENT(); + antlr4::tree::TerminalNode *DEDENT(); + std::vector stmt(); + StmtContext* stmt(size_t i); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + SuiteContext* suite(); + + class TestContext : public antlr4::ParserRuleContext { + public: + TestContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + Or_testContext *or_test(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + TestContext* test(); + + class Or_testContext : public antlr4::ParserRuleContext { + public: + Or_testContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + std::vector and_test(); + And_testContext* and_test(size_t i); + std::vector OR(); + antlr4::tree::TerminalNode* OR(size_t i); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + Or_testContext* or_test(); + + class And_testContext : public antlr4::ParserRuleContext { + public: + And_testContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + std::vector not_test(); + Not_testContext* not_test(size_t i); + std::vector AND(); + antlr4::tree::TerminalNode* AND(size_t i); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + And_testContext* and_test(); + + class Not_testContext : public antlr4::ParserRuleContext { + public: + Not_testContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *NOT(); + Not_testContext *not_test(); + ComparisonContext *comparison(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + Not_testContext* not_test(); + + class ComparisonContext : public antlr4::ParserRuleContext { + public: + ComparisonContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + std::vector arith_expr(); + Arith_exprContext* arith_expr(size_t i); + std::vector comp_op(); + Comp_opContext* comp_op(size_t i); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + ComparisonContext* comparison(); + + class Comp_opContext : public antlr4::ParserRuleContext { + public: + Comp_opContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *LESS_THAN(); + antlr4::tree::TerminalNode *GREATER_THAN(); + antlr4::tree::TerminalNode *EQUALS(); + antlr4::tree::TerminalNode *GT_EQ(); + antlr4::tree::TerminalNode *LT_EQ(); + antlr4::tree::TerminalNode *NOT_EQ_2(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + Comp_opContext* comp_op(); + + class Arith_exprContext : public antlr4::ParserRuleContext { + public: + Arith_exprContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + std::vector term(); + TermContext* term(size_t i); + std::vector addorsub_op(); + Addorsub_opContext* addorsub_op(size_t i); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + Arith_exprContext* arith_expr(); + + class Addorsub_opContext : public antlr4::ParserRuleContext { + public: + Addorsub_opContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *ADD(); + antlr4::tree::TerminalNode *MINUS(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + Addorsub_opContext* addorsub_op(); + + class TermContext : public antlr4::ParserRuleContext { + public: + TermContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + std::vector factor(); + FactorContext* factor(size_t i); + std::vector muldivmod_op(); + Muldivmod_opContext* muldivmod_op(size_t i); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + TermContext* term(); + + class Muldivmod_opContext : public antlr4::ParserRuleContext { + public: + Muldivmod_opContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *STAR(); + antlr4::tree::TerminalNode *DIV(); + antlr4::tree::TerminalNode *IDIV(); + antlr4::tree::TerminalNode *MOD(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + Muldivmod_opContext* muldivmod_op(); + + class FactorContext : public antlr4::ParserRuleContext { + public: + FactorContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + FactorContext *factor(); + antlr4::tree::TerminalNode *ADD(); + antlr4::tree::TerminalNode *MINUS(); + Atom_exprContext *atom_expr(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + FactorContext* factor(); + + class Atom_exprContext : public antlr4::ParserRuleContext { + public: + Atom_exprContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + AtomContext *atom(); + TrailerContext *trailer(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + Atom_exprContext* atom_expr(); + + class TrailerContext : public antlr4::ParserRuleContext { + public: + TrailerContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *OPEN_PAREN(); + antlr4::tree::TerminalNode *CLOSE_PAREN(); + ArglistContext *arglist(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + TrailerContext* trailer(); + + class AtomContext : public antlr4::ParserRuleContext { + public: + AtomContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *NAME(); + antlr4::tree::TerminalNode *NUMBER(); + antlr4::tree::TerminalNode *NONE(); + antlr4::tree::TerminalNode *TRUE(); + antlr4::tree::TerminalNode *FALSE(); + antlr4::tree::TerminalNode *OPEN_PAREN(); + TestContext *test(); + antlr4::tree::TerminalNode *CLOSE_PAREN(); + std::vector STRING(); + antlr4::tree::TerminalNode* STRING(size_t i); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + AtomContext* atom(); + + class TestlistContext : public antlr4::ParserRuleContext { + public: + TestlistContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + std::vector test(); + TestContext* test(size_t i); + std::vector COMMA(); + antlr4::tree::TerminalNode* COMMA(size_t i); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + TestlistContext* testlist(); + + class ArglistContext : public antlr4::ParserRuleContext { + public: + ArglistContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + std::vector argument(); + ArgumentContext* argument(size_t i); + std::vector COMMA(); + antlr4::tree::TerminalNode* COMMA(size_t i); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + ArglistContext* arglist(); + + class ArgumentContext : public antlr4::ParserRuleContext { + public: + ArgumentContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + std::vector test(); + TestContext* test(size_t i); + antlr4::tree::TerminalNode *ASSIGN(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + ArgumentContext* argument(); + + + // By default the static state used to implement the parser is lazily initialized during the first + // call to the constructor. You can call this function if you wish to initialize the static state + // ahead of time. + static void initialize(); + +private: +}; + diff --git a/generated/Python3Parser.interp b/generated/Python3Parser.interp new file mode 100644 index 0000000..a1bba7e --- /dev/null +++ b/generated/Python3Parser.interp @@ -0,0 +1,206 @@ +token literal names: +null +null +null +null +null +null +'def' +'return' +'if' +'elif' +'else' +'while' +'for' +'in' +'or' +'and' +'not' +'None' +'True' +'False' +'continue' +'break' +null +null +null +null +null +null +null +null +null +null +'.' +'...' +'*' +'(' +')' +',' +':' +';' +'**' +'=' +'[' +']' +'|' +'^' +'&' +'<<' +'>>' +'+' +'-' +'/' +'%' +'//' +'~' +'{' +'}' +'<' +'>' +'==' +'>=' +'<=' +'<>' +'!=' +'@' +'->' +'+=' +'-=' +'*=' +'@=' +'/=' +'%=' +'&=' +'|=' +'^=' +'<<=' +'>>=' +'**=' +'//=' +null +null + +token symbolic names: +null +INDENT +DEDENT +STRING +NUMBER +INTEGER +DEF +RETURN +IF +ELIF +ELSE +WHILE +FOR +IN +OR +AND +NOT +NONE +TRUE +FALSE +CONTINUE +BREAK +NEWLINE +NAME +STRING_LITERAL +BYTES_LITERAL +DECIMAL_INTEGER +OCT_INTEGER +HEX_INTEGER +BIN_INTEGER +FLOAT_NUMBER +IMAG_NUMBER +DOT +ELLIPSIS +STAR +OPEN_PAREN +CLOSE_PAREN +COMMA +COLON +SEMI_COLON +POWER +ASSIGN +OPEN_BRACK +CLOSE_BRACK +OR_OP +XOR +AND_OP +LEFT_SHIFT +RIGHT_SHIFT +ADD +MINUS +DIV +MOD +IDIV +NOT_OP +OPEN_BRACE +CLOSE_BRACE +LESS_THAN +GREATER_THAN +EQUALS +GT_EQ +LT_EQ +NOT_EQ_1 +NOT_EQ_2 +AT +ARROW +ADD_ASSIGN +SUB_ASSIGN +MULT_ASSIGN +AT_ASSIGN +DIV_ASSIGN +MOD_ASSIGN +AND_ASSIGN +OR_ASSIGN +XOR_ASSIGN +LEFT_SHIFT_ASSIGN +RIGHT_SHIFT_ASSIGN +POWER_ASSIGN +IDIV_ASSIGN +SKIP_ +UNKNOWN_CHAR + +rule names: +file_input +funcdef +parameters +typedargslist +tfpdef +stmt +simple_stmt +small_stmt +expr_stmt +augassign +flow_stmt +break_stmt +continue_stmt +return_stmt +compound_stmt +if_stmt +while_stmt +suite +test +or_test +and_test +not_test +comparison +comp_op +arith_expr +addorsub_op +term +muldivmod_op +factor +atom_expr +trailer +atom +testlist +arglist +argument + + +atn: +[4, 1, 80, 306, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 1, 0, 1, 0, 5, 0, 73, 8, 0, 10, 0, 12, 0, 76, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 3, 2, 88, 8, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 3, 3, 95, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 101, 8, 3, 5, 3, 103, 8, 3, 10, 3, 12, 3, 106, 9, 3, 1, 4, 1, 4, 1, 5, 1, 5, 3, 5, 112, 8, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 3, 7, 119, 8, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 5, 8, 127, 8, 8, 10, 8, 12, 8, 130, 9, 8, 3, 8, 132, 8, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 3, 10, 139, 8, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 3, 13, 147, 8, 13, 1, 14, 1, 14, 1, 14, 3, 14, 152, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 163, 8, 15, 10, 15, 12, 15, 166, 9, 15, 1, 15, 1, 15, 1, 15, 3, 15, 171, 8, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 4, 17, 182, 8, 17, 11, 17, 12, 17, 183, 1, 17, 1, 17, 3, 17, 188, 8, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 5, 19, 195, 8, 19, 10, 19, 12, 19, 198, 9, 19, 1, 20, 1, 20, 1, 20, 5, 20, 203, 8, 20, 10, 20, 12, 20, 206, 9, 20, 1, 21, 1, 21, 1, 21, 3, 21, 211, 8, 21, 1, 22, 1, 22, 1, 22, 1, 22, 5, 22, 217, 8, 22, 10, 22, 12, 22, 220, 9, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 228, 8, 24, 10, 24, 12, 24, 231, 9, 24, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 5, 26, 239, 8, 26, 10, 26, 12, 26, 242, 9, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 3, 28, 249, 8, 28, 1, 29, 1, 29, 3, 29, 253, 8, 29, 1, 30, 1, 30, 3, 30, 257, 8, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 4, 31, 264, 8, 31, 11, 31, 12, 31, 265, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 275, 8, 31, 1, 32, 1, 32, 1, 32, 5, 32, 280, 8, 32, 10, 32, 12, 32, 283, 9, 32, 1, 32, 3, 32, 286, 8, 32, 1, 33, 1, 33, 1, 33, 5, 33, 291, 8, 33, 10, 33, 12, 33, 294, 9, 33, 1, 33, 3, 33, 297, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 304, 8, 34, 1, 34, 0, 0, 35, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 0, 4, 3, 0, 66, 68, 70, 71, 78, 78, 2, 0, 57, 61, 63, 63, 1, 0, 49, 50, 2, 0, 34, 34, 51, 53, 310, 0, 74, 1, 0, 0, 0, 2, 79, 1, 0, 0, 0, 4, 85, 1, 0, 0, 0, 6, 91, 1, 0, 0, 0, 8, 107, 1, 0, 0, 0, 10, 111, 1, 0, 0, 0, 12, 113, 1, 0, 0, 0, 14, 118, 1, 0, 0, 0, 16, 120, 1, 0, 0, 0, 18, 133, 1, 0, 0, 0, 20, 138, 1, 0, 0, 0, 22, 140, 1, 0, 0, 0, 24, 142, 1, 0, 0, 0, 26, 144, 1, 0, 0, 0, 28, 151, 1, 0, 0, 0, 30, 153, 1, 0, 0, 0, 32, 172, 1, 0, 0, 0, 34, 187, 1, 0, 0, 0, 36, 189, 1, 0, 0, 0, 38, 191, 1, 0, 0, 0, 40, 199, 1, 0, 0, 0, 42, 210, 1, 0, 0, 0, 44, 212, 1, 0, 0, 0, 46, 221, 1, 0, 0, 0, 48, 223, 1, 0, 0, 0, 50, 232, 1, 0, 0, 0, 52, 234, 1, 0, 0, 0, 54, 243, 1, 0, 0, 0, 56, 248, 1, 0, 0, 0, 58, 250, 1, 0, 0, 0, 60, 254, 1, 0, 0, 0, 62, 274, 1, 0, 0, 0, 64, 276, 1, 0, 0, 0, 66, 287, 1, 0, 0, 0, 68, 303, 1, 0, 0, 0, 70, 73, 5, 22, 0, 0, 71, 73, 3, 10, 5, 0, 72, 70, 1, 0, 0, 0, 72, 71, 1, 0, 0, 0, 73, 76, 1, 0, 0, 0, 74, 72, 1, 0, 0, 0, 74, 75, 1, 0, 0, 0, 75, 77, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 77, 78, 5, 0, 0, 1, 78, 1, 1, 0, 0, 0, 79, 80, 5, 6, 0, 0, 80, 81, 5, 23, 0, 0, 81, 82, 3, 4, 2, 0, 82, 83, 5, 38, 0, 0, 83, 84, 3, 34, 17, 0, 84, 3, 1, 0, 0, 0, 85, 87, 5, 35, 0, 0, 86, 88, 3, 6, 3, 0, 87, 86, 1, 0, 0, 0, 87, 88, 1, 0, 0, 0, 88, 89, 1, 0, 0, 0, 89, 90, 5, 36, 0, 0, 90, 5, 1, 0, 0, 0, 91, 94, 3, 8, 4, 0, 92, 93, 5, 41, 0, 0, 93, 95, 3, 36, 18, 0, 94, 92, 1, 0, 0, 0, 94, 95, 1, 0, 0, 0, 95, 104, 1, 0, 0, 0, 96, 97, 5, 37, 0, 0, 97, 100, 3, 8, 4, 0, 98, 99, 5, 41, 0, 0, 99, 101, 3, 36, 18, 0, 100, 98, 1, 0, 0, 0, 100, 101, 1, 0, 0, 0, 101, 103, 1, 0, 0, 0, 102, 96, 1, 0, 0, 0, 103, 106, 1, 0, 0, 0, 104, 102, 1, 0, 0, 0, 104, 105, 1, 0, 0, 0, 105, 7, 1, 0, 0, 0, 106, 104, 1, 0, 0, 0, 107, 108, 5, 23, 0, 0, 108, 9, 1, 0, 0, 0, 109, 112, 3, 12, 6, 0, 110, 112, 3, 28, 14, 0, 111, 109, 1, 0, 0, 0, 111, 110, 1, 0, 0, 0, 112, 11, 1, 0, 0, 0, 113, 114, 3, 14, 7, 0, 114, 115, 5, 22, 0, 0, 115, 13, 1, 0, 0, 0, 116, 119, 3, 16, 8, 0, 117, 119, 3, 20, 10, 0, 118, 116, 1, 0, 0, 0, 118, 117, 1, 0, 0, 0, 119, 15, 1, 0, 0, 0, 120, 131, 3, 64, 32, 0, 121, 122, 3, 18, 9, 0, 122, 123, 3, 64, 32, 0, 123, 132, 1, 0, 0, 0, 124, 125, 5, 41, 0, 0, 125, 127, 3, 64, 32, 0, 126, 124, 1, 0, 0, 0, 127, 130, 1, 0, 0, 0, 128, 126, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 132, 1, 0, 0, 0, 130, 128, 1, 0, 0, 0, 131, 121, 1, 0, 0, 0, 131, 128, 1, 0, 0, 0, 132, 17, 1, 0, 0, 0, 133, 134, 7, 0, 0, 0, 134, 19, 1, 0, 0, 0, 135, 139, 3, 22, 11, 0, 136, 139, 3, 24, 12, 0, 137, 139, 3, 26, 13, 0, 138, 135, 1, 0, 0, 0, 138, 136, 1, 0, 0, 0, 138, 137, 1, 0, 0, 0, 139, 21, 1, 0, 0, 0, 140, 141, 5, 21, 0, 0, 141, 23, 1, 0, 0, 0, 142, 143, 5, 20, 0, 0, 143, 25, 1, 0, 0, 0, 144, 146, 5, 7, 0, 0, 145, 147, 3, 64, 32, 0, 146, 145, 1, 0, 0, 0, 146, 147, 1, 0, 0, 0, 147, 27, 1, 0, 0, 0, 148, 152, 3, 30, 15, 0, 149, 152, 3, 32, 16, 0, 150, 152, 3, 2, 1, 0, 151, 148, 1, 0, 0, 0, 151, 149, 1, 0, 0, 0, 151, 150, 1, 0, 0, 0, 152, 29, 1, 0, 0, 0, 153, 154, 5, 8, 0, 0, 154, 155, 3, 36, 18, 0, 155, 156, 5, 38, 0, 0, 156, 164, 3, 34, 17, 0, 157, 158, 5, 9, 0, 0, 158, 159, 3, 36, 18, 0, 159, 160, 5, 38, 0, 0, 160, 161, 3, 34, 17, 0, 161, 163, 1, 0, 0, 0, 162, 157, 1, 0, 0, 0, 163, 166, 1, 0, 0, 0, 164, 162, 1, 0, 0, 0, 164, 165, 1, 0, 0, 0, 165, 170, 1, 0, 0, 0, 166, 164, 1, 0, 0, 0, 167, 168, 5, 10, 0, 0, 168, 169, 5, 38, 0, 0, 169, 171, 3, 34, 17, 0, 170, 167, 1, 0, 0, 0, 170, 171, 1, 0, 0, 0, 171, 31, 1, 0, 0, 0, 172, 173, 5, 11, 0, 0, 173, 174, 3, 36, 18, 0, 174, 175, 5, 38, 0, 0, 175, 176, 3, 34, 17, 0, 176, 33, 1, 0, 0, 0, 177, 188, 3, 12, 6, 0, 178, 179, 5, 22, 0, 0, 179, 181, 5, 1, 0, 0, 180, 182, 3, 10, 5, 0, 181, 180, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, 183, 181, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 185, 1, 0, 0, 0, 185, 186, 5, 2, 0, 0, 186, 188, 1, 0, 0, 0, 187, 177, 1, 0, 0, 0, 187, 178, 1, 0, 0, 0, 188, 35, 1, 0, 0, 0, 189, 190, 3, 38, 19, 0, 190, 37, 1, 0, 0, 0, 191, 196, 3, 40, 20, 0, 192, 193, 5, 14, 0, 0, 193, 195, 3, 40, 20, 0, 194, 192, 1, 0, 0, 0, 195, 198, 1, 0, 0, 0, 196, 194, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 39, 1, 0, 0, 0, 198, 196, 1, 0, 0, 0, 199, 204, 3, 42, 21, 0, 200, 201, 5, 15, 0, 0, 201, 203, 3, 42, 21, 0, 202, 200, 1, 0, 0, 0, 203, 206, 1, 0, 0, 0, 204, 202, 1, 0, 0, 0, 204, 205, 1, 0, 0, 0, 205, 41, 1, 0, 0, 0, 206, 204, 1, 0, 0, 0, 207, 208, 5, 16, 0, 0, 208, 211, 3, 42, 21, 0, 209, 211, 3, 44, 22, 0, 210, 207, 1, 0, 0, 0, 210, 209, 1, 0, 0, 0, 211, 43, 1, 0, 0, 0, 212, 218, 3, 48, 24, 0, 213, 214, 3, 46, 23, 0, 214, 215, 3, 48, 24, 0, 215, 217, 1, 0, 0, 0, 216, 213, 1, 0, 0, 0, 217, 220, 1, 0, 0, 0, 218, 216, 1, 0, 0, 0, 218, 219, 1, 0, 0, 0, 219, 45, 1, 0, 0, 0, 220, 218, 1, 0, 0, 0, 221, 222, 7, 1, 0, 0, 222, 47, 1, 0, 0, 0, 223, 229, 3, 52, 26, 0, 224, 225, 3, 50, 25, 0, 225, 226, 3, 52, 26, 0, 226, 228, 1, 0, 0, 0, 227, 224, 1, 0, 0, 0, 228, 231, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 229, 230, 1, 0, 0, 0, 230, 49, 1, 0, 0, 0, 231, 229, 1, 0, 0, 0, 232, 233, 7, 2, 0, 0, 233, 51, 1, 0, 0, 0, 234, 240, 3, 56, 28, 0, 235, 236, 3, 54, 27, 0, 236, 237, 3, 56, 28, 0, 237, 239, 1, 0, 0, 0, 238, 235, 1, 0, 0, 0, 239, 242, 1, 0, 0, 0, 240, 238, 1, 0, 0, 0, 240, 241, 1, 0, 0, 0, 241, 53, 1, 0, 0, 0, 242, 240, 1, 0, 0, 0, 243, 244, 7, 3, 0, 0, 244, 55, 1, 0, 0, 0, 245, 246, 7, 2, 0, 0, 246, 249, 3, 56, 28, 0, 247, 249, 3, 58, 29, 0, 248, 245, 1, 0, 0, 0, 248, 247, 1, 0, 0, 0, 249, 57, 1, 0, 0, 0, 250, 252, 3, 62, 31, 0, 251, 253, 3, 60, 30, 0, 252, 251, 1, 0, 0, 0, 252, 253, 1, 0, 0, 0, 253, 59, 1, 0, 0, 0, 254, 256, 5, 35, 0, 0, 255, 257, 3, 66, 33, 0, 256, 255, 1, 0, 0, 0, 256, 257, 1, 0, 0, 0, 257, 258, 1, 0, 0, 0, 258, 259, 5, 36, 0, 0, 259, 61, 1, 0, 0, 0, 260, 275, 5, 23, 0, 0, 261, 275, 5, 4, 0, 0, 262, 264, 5, 3, 0, 0, 263, 262, 1, 0, 0, 0, 264, 265, 1, 0, 0, 0, 265, 263, 1, 0, 0, 0, 265, 266, 1, 0, 0, 0, 266, 275, 1, 0, 0, 0, 267, 275, 5, 17, 0, 0, 268, 275, 5, 18, 0, 0, 269, 275, 5, 19, 0, 0, 270, 271, 5, 35, 0, 0, 271, 272, 3, 36, 18, 0, 272, 273, 5, 36, 0, 0, 273, 275, 1, 0, 0, 0, 274, 260, 1, 0, 0, 0, 274, 261, 1, 0, 0, 0, 274, 263, 1, 0, 0, 0, 274, 267, 1, 0, 0, 0, 274, 268, 1, 0, 0, 0, 274, 269, 1, 0, 0, 0, 274, 270, 1, 0, 0, 0, 275, 63, 1, 0, 0, 0, 276, 281, 3, 36, 18, 0, 277, 278, 5, 37, 0, 0, 278, 280, 3, 36, 18, 0, 279, 277, 1, 0, 0, 0, 280, 283, 1, 0, 0, 0, 281, 279, 1, 0, 0, 0, 281, 282, 1, 0, 0, 0, 282, 285, 1, 0, 0, 0, 283, 281, 1, 0, 0, 0, 284, 286, 5, 37, 0, 0, 285, 284, 1, 0, 0, 0, 285, 286, 1, 0, 0, 0, 286, 65, 1, 0, 0, 0, 287, 292, 3, 68, 34, 0, 288, 289, 5, 37, 0, 0, 289, 291, 3, 68, 34, 0, 290, 288, 1, 0, 0, 0, 291, 294, 1, 0, 0, 0, 292, 290, 1, 0, 0, 0, 292, 293, 1, 0, 0, 0, 293, 296, 1, 0, 0, 0, 294, 292, 1, 0, 0, 0, 295, 297, 5, 37, 0, 0, 296, 295, 1, 0, 0, 0, 296, 297, 1, 0, 0, 0, 297, 67, 1, 0, 0, 0, 298, 304, 3, 36, 18, 0, 299, 300, 3, 36, 18, 0, 300, 301, 5, 41, 0, 0, 301, 302, 3, 36, 18, 0, 302, 304, 1, 0, 0, 0, 303, 298, 1, 0, 0, 0, 303, 299, 1, 0, 0, 0, 304, 69, 1, 0, 0, 0, 33, 72, 74, 87, 94, 100, 104, 111, 118, 128, 131, 138, 146, 151, 164, 170, 183, 187, 196, 204, 210, 218, 229, 240, 248, 252, 256, 265, 274, 281, 285, 292, 296, 303] \ No newline at end of file diff --git a/generated/Python3Parser.tokens b/generated/Python3Parser.tokens new file mode 100644 index 0000000..ee3e333 --- /dev/null +++ b/generated/Python3Parser.tokens @@ -0,0 +1,143 @@ +INDENT=1 +DEDENT=2 +STRING=3 +NUMBER=4 +INTEGER=5 +DEF=6 +RETURN=7 +IF=8 +ELIF=9 +ELSE=10 +WHILE=11 +FOR=12 +IN=13 +OR=14 +AND=15 +NOT=16 +NONE=17 +TRUE=18 +FALSE=19 +CONTINUE=20 +BREAK=21 +NEWLINE=22 +NAME=23 +STRING_LITERAL=24 +BYTES_LITERAL=25 +DECIMAL_INTEGER=26 +OCT_INTEGER=27 +HEX_INTEGER=28 +BIN_INTEGER=29 +FLOAT_NUMBER=30 +IMAG_NUMBER=31 +DOT=32 +ELLIPSIS=33 +STAR=34 +OPEN_PAREN=35 +CLOSE_PAREN=36 +COMMA=37 +COLON=38 +SEMI_COLON=39 +POWER=40 +ASSIGN=41 +OPEN_BRACK=42 +CLOSE_BRACK=43 +OR_OP=44 +XOR=45 +AND_OP=46 +LEFT_SHIFT=47 +RIGHT_SHIFT=48 +ADD=49 +MINUS=50 +DIV=51 +MOD=52 +IDIV=53 +NOT_OP=54 +OPEN_BRACE=55 +CLOSE_BRACE=56 +LESS_THAN=57 +GREATER_THAN=58 +EQUALS=59 +GT_EQ=60 +LT_EQ=61 +NOT_EQ_1=62 +NOT_EQ_2=63 +AT=64 +ARROW=65 +ADD_ASSIGN=66 +SUB_ASSIGN=67 +MULT_ASSIGN=68 +AT_ASSIGN=69 +DIV_ASSIGN=70 +MOD_ASSIGN=71 +AND_ASSIGN=72 +OR_ASSIGN=73 +XOR_ASSIGN=74 +LEFT_SHIFT_ASSIGN=75 +RIGHT_SHIFT_ASSIGN=76 +POWER_ASSIGN=77 +IDIV_ASSIGN=78 +SKIP_=79 +UNKNOWN_CHAR=80 +'def'=6 +'return'=7 +'if'=8 +'elif'=9 +'else'=10 +'while'=11 +'for'=12 +'in'=13 +'or'=14 +'and'=15 +'not'=16 +'None'=17 +'True'=18 +'False'=19 +'continue'=20 +'break'=21 +'.'=32 +'...'=33 +'*'=34 +'('=35 +')'=36 +','=37 +':'=38 +';'=39 +'**'=40 +'='=41 +'['=42 +']'=43 +'|'=44 +'^'=45 +'&'=46 +'<<'=47 +'>>'=48 +'+'=49 +'-'=50 +'/'=51 +'%'=52 +'//'=53 +'~'=54 +'{'=55 +'}'=56 +'<'=57 +'>'=58 +'=='=59 +'>='=60 +'<='=61 +'<>'=62 +'!='=63 +'@'=64 +'->'=65 +'+='=66 +'-='=67 +'*='=68 +'@='=69 +'/='=70 +'%='=71 +'&='=72 +'|='=73 +'^='=74 +'<<='=75 +'>>='=76 +'**='=77 +'//='=78 diff --git a/generated/Python3ParserBaseVisitor.cpp b/generated/Python3ParserBaseVisitor.cpp new file mode 100644 index 0000000..2738907 --- /dev/null +++ b/generated/Python3ParserBaseVisitor.cpp @@ -0,0 +1,7 @@ + +// Generated from Python3Parser.g4 by ANTLR 4.13.1 + + +#include "Python3ParserBaseVisitor.h" + + diff --git a/generated/Python3ParserBaseVisitor.h b/generated/Python3ParserBaseVisitor.h new file mode 100644 index 0000000..fe14f60 --- /dev/null +++ b/generated/Python3ParserBaseVisitor.h @@ -0,0 +1,160 @@ + +// Generated from Python3Parser.g4 by ANTLR 4.13.1 + +#pragma once + + +#include "antlr4-runtime.h" +#include "Python3ParserVisitor.h" + + +/** + * This class provides an empty implementation of Python3ParserVisitor, which can be + * extended to create a visitor which only needs to handle a subset of the available methods. + */ +class Python3ParserBaseVisitor : public Python3ParserVisitor { +public: + + virtual std::any visitFile_input(Python3Parser::File_inputContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitFuncdef(Python3Parser::FuncdefContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitParameters(Python3Parser::ParametersContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitTypedargslist(Python3Parser::TypedargslistContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitTfpdef(Python3Parser::TfpdefContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitStmt(Python3Parser::StmtContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitSimple_stmt(Python3Parser::Simple_stmtContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitSmall_stmt(Python3Parser::Small_stmtContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitExpr_stmt(Python3Parser::Expr_stmtContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitAugassign(Python3Parser::AugassignContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitFlow_stmt(Python3Parser::Flow_stmtContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitBreak_stmt(Python3Parser::Break_stmtContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitContinue_stmt(Python3Parser::Continue_stmtContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitReturn_stmt(Python3Parser::Return_stmtContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitCompound_stmt(Python3Parser::Compound_stmtContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitIf_stmt(Python3Parser::If_stmtContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitWhile_stmt(Python3Parser::While_stmtContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitSuite(Python3Parser::SuiteContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitTest(Python3Parser::TestContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitOr_test(Python3Parser::Or_testContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitAnd_test(Python3Parser::And_testContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitNot_test(Python3Parser::Not_testContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitComparison(Python3Parser::ComparisonContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitComp_op(Python3Parser::Comp_opContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitArith_expr(Python3Parser::Arith_exprContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitAddorsub_op(Python3Parser::Addorsub_opContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitTerm(Python3Parser::TermContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitMuldivmod_op(Python3Parser::Muldivmod_opContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitFactor(Python3Parser::FactorContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitAtom_expr(Python3Parser::Atom_exprContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitTrailer(Python3Parser::TrailerContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitAtom(Python3Parser::AtomContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitTestlist(Python3Parser::TestlistContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitArglist(Python3Parser::ArglistContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitArgument(Python3Parser::ArgumentContext *ctx) override { + return visitChildren(ctx); + } + + +}; + diff --git a/generated/Python3ParserVisitor.cpp b/generated/Python3ParserVisitor.cpp new file mode 100644 index 0000000..acae2d6 --- /dev/null +++ b/generated/Python3ParserVisitor.cpp @@ -0,0 +1,7 @@ + +// Generated from Python3Parser.g4 by ANTLR 4.13.1 + + +#include "Python3ParserVisitor.h" + + diff --git a/generated/Python3ParserVisitor.h b/generated/Python3ParserVisitor.h new file mode 100644 index 0000000..5172881 --- /dev/null +++ b/generated/Python3ParserVisitor.h @@ -0,0 +1,94 @@ + +// Generated from Python3Parser.g4 by ANTLR 4.13.1 + +#pragma once + + +#include "antlr4-runtime.h" +#include "Python3Parser.h" + + + +/** + * This class defines an abstract visitor for a parse tree + * produced by Python3Parser. + */ +class Python3ParserVisitor : public antlr4::tree::AbstractParseTreeVisitor { +public: + + /** + * Visit parse trees produced by Python3Parser. + */ + virtual std::any visitFile_input(Python3Parser::File_inputContext *context) = 0; + + virtual std::any visitFuncdef(Python3Parser::FuncdefContext *context) = 0; + + virtual std::any visitParameters(Python3Parser::ParametersContext *context) = 0; + + virtual std::any visitTypedargslist(Python3Parser::TypedargslistContext *context) = 0; + + virtual std::any visitTfpdef(Python3Parser::TfpdefContext *context) = 0; + + virtual std::any visitStmt(Python3Parser::StmtContext *context) = 0; + + virtual std::any visitSimple_stmt(Python3Parser::Simple_stmtContext *context) = 0; + + virtual std::any visitSmall_stmt(Python3Parser::Small_stmtContext *context) = 0; + + virtual std::any visitExpr_stmt(Python3Parser::Expr_stmtContext *context) = 0; + + virtual std::any visitAugassign(Python3Parser::AugassignContext *context) = 0; + + virtual std::any visitFlow_stmt(Python3Parser::Flow_stmtContext *context) = 0; + + virtual std::any visitBreak_stmt(Python3Parser::Break_stmtContext *context) = 0; + + virtual std::any visitContinue_stmt(Python3Parser::Continue_stmtContext *context) = 0; + + virtual std::any visitReturn_stmt(Python3Parser::Return_stmtContext *context) = 0; + + virtual std::any visitCompound_stmt(Python3Parser::Compound_stmtContext *context) = 0; + + virtual std::any visitIf_stmt(Python3Parser::If_stmtContext *context) = 0; + + virtual std::any visitWhile_stmt(Python3Parser::While_stmtContext *context) = 0; + + virtual std::any visitSuite(Python3Parser::SuiteContext *context) = 0; + + virtual std::any visitTest(Python3Parser::TestContext *context) = 0; + + virtual std::any visitOr_test(Python3Parser::Or_testContext *context) = 0; + + virtual std::any visitAnd_test(Python3Parser::And_testContext *context) = 0; + + virtual std::any visitNot_test(Python3Parser::Not_testContext *context) = 0; + + virtual std::any visitComparison(Python3Parser::ComparisonContext *context) = 0; + + virtual std::any visitComp_op(Python3Parser::Comp_opContext *context) = 0; + + virtual std::any visitArith_expr(Python3Parser::Arith_exprContext *context) = 0; + + virtual std::any visitAddorsub_op(Python3Parser::Addorsub_opContext *context) = 0; + + virtual std::any visitTerm(Python3Parser::TermContext *context) = 0; + + virtual std::any visitMuldivmod_op(Python3Parser::Muldivmod_opContext *context) = 0; + + virtual std::any visitFactor(Python3Parser::FactorContext *context) = 0; + + virtual std::any visitAtom_expr(Python3Parser::Atom_exprContext *context) = 0; + + virtual std::any visitTrailer(Python3Parser::TrailerContext *context) = 0; + + virtual std::any visitAtom(Python3Parser::AtomContext *context) = 0; + + virtual std::any visitTestlist(Python3Parser::TestlistContext *context) = 0; + + virtual std::any visitArglist(Python3Parser::ArglistContext *context) = 0; + + virtual std::any visitArgument(Python3Parser::ArgumentContext *context) = 0; + + +}; + diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..1f183b5 --- /dev/null +++ b/readme.md @@ -0,0 +1,92 @@ +# 🐍Python Interpreter + +## 🧾 目录 + +- [✨ 简介](#✨简介) +- [📚 作业说明](#📚作业说明) + - [⚠️ 实现要求](#⚠️实现要求) + - [🛎️ 评测方式](#🛎️评测方式) + - [提交方式](#提交方式) + - [测试点分布](#测试点分布) + - [💎Bonus](#💎Bonus) +- [📝Guide](#📝Guide) + - [📄 语法](#📄语法) + - [⚙️ANTLR](#⚙️Antlr) + - [🧪 实现](#🧪实现) + - [📇 索引](#📇索引) + +## ✨简介 + +本次大作业要求你们实现一个简单的 Python 解释器,接受简化过的 Python 代码,按照控制流执行代码。 + +> 解释器(Interpreter),是一种计算机程序,能够把解释型语言解释执行。 +> 解释器就像一位“中间人”。解释器边解释边执行,因此依赖于解释器的程序运行速度比较缓慢。 +> 解释器的好处是它不需要重新编译整个程序,从而减轻了每次程序更新后编译的负担。 +> 相对的,编译器一次性将所有源代码编译成二进制文件,执行时无需依赖编译器或其他额外的程序。 + +## 📚作业说明 + +### ⚠️实现要求 + +1. 使用 OOP 实现 Python Interpreter,锻炼 OOP 能力。若不按照要求会在 code review 时扣除一定分数。 +2. 作业不低于按数据总的通过比例线性给分。助教会下发部分数据在作业仓库中,还有另一部分数据不会提供。 + 这意味着你需要自己手写测试数据给自己测试,如果你对自己造的数据是否满足要求有疑问,请及时向助教询问。 +3. 首先完成 Prework 里面的前置任务。前置任务不计分,但要求**必做**。如果不完成前置任务则 Python 解释器将没有分数。 + +### 🛎️评测方式 + +使用 `git` 在 OJ 上进行提交。OJ 将根据根目录下的 `CMakeLists.txt` 来构建你的程序。 + +#### 提交方式 + +在代码提交页面输入你 `git` 仓库的地址 + +#### 测试点分布 + +测试点分布如下: + +```text +BigIntegerTest: 1 - 20 +Sample: 21 - 34 +AdvancedTest: 35 - 52 +ComplexTest: 53 - 56 +CornerTest: 57 - 66 +``` + +### 💎Bonus + +1. 修改 `.g4` 与 `Evalvisitor` 来支持更高级的语法规则 +2. 增加语法检查 +3. 不使用 Antlr4,自己实现 Lexer 和 Parser + +实现任何的 bonus 之前,都请与助教联系。 + +## 📝Guide + +关于本次大作业的所有问题,都可以在 [Q&A](https://notes.sjtu.edu.cn/4RNcROAgTHmWhs1ZX4OJ7w) 中或者本仓库的 issue 中提问。助教会更新在 Q&A 和文档中。 + +### 📄语法 + +本次作业使用的 Python 的语法在 [Grammar](docs/grammar.md) 查看。 + +### ⚙️ANTLR + +关于 ANTLR 的安装与使用,详见 [ANTLR](docs/antlr_guide.md)。 + +### 🧪实现 + +如果你想知道从何下手,可以参考 [完成流程](docs/workflow_details.md) 与 [实现细节](docs/implementation_details.md)。 + +### 📇索引 + +如果你想查看一段 Python 代码,通过 ANTLR 生成的语法树的结构,参考:[1](docs/antlr_guide.md#antlr-配置)。 + +如果你想知道 `std::any` 是什么,参考:[完成流程](docs/workflow_details.md) 和 [前置任务](Prework/README.md)。 + +如果你想知道 `ctx` 大致是什么,参考:[实现细节](docs/implementation_details.md)。 + +如果你想知道怎么遍历树,参考:[4](docs/workflow_details.md#step-4-完成-srcevalvisitorh)。 + +如果你想看一个 demo 来理解这个作业,参考:[5](https://github.com/ACMClassCourse-2021/Apple-Pie-Interpreter)。 + +还有一些 [小建议](docs/suggestions.md)。 diff --git a/resources/Python3Lexer.g4 b/resources/Python3Lexer.g4 new file mode 100644 index 0000000..8270ee4 --- /dev/null +++ b/resources/Python3Lexer.g4 @@ -0,0 +1,902 @@ +lexer grammar Python3Lexer; +tokens { + INDENT, + DEDENT +} + +@header { +#include +#include +} + +@lexer::members { + // A queue where extra tokens are pushed on (see the NEWLINE lexer rule). + private: std::list tokens ; + // The stack that keeps track of the indentation level. + private: std::stack indents ; + // The amount of opened braces, brackets and parenthesis. + private: int opened = 0; + // The most recently produced token. + private: antlr4::Token* lastToken = nullptr; + + public: void emit(std::unique_ptr t) override { + token.release(); + token=std::move(t); + + tokens.push_back(token.get()); + // std::cout<toString()< nextToken() override { + // Check if the end-of-file is ahead and there are still some DEDENTS expected. + if (_input->LA(1) == EOF && !this->indents.empty()) { + // Remove any trailing EOF tokens from our buffer. + for(auto i=tokens.rbegin();i!=tokens.rend();){ + auto tmp=i; + i++; + if((*tmp)->getType()==EOF){ + tokens.erase(tmp.base()); + } + } + + + // First emit an extra line break that serves as the end of the statement. + std::unique_ptr tmp=commonToken(Python3Lexer::NEWLINE, "\n"); + this->emit(std::move(tmp)); + + // Now emit as much DEDENT tokens as needed. + while (!indents.empty()) { + auto tmp=createDedent(); + this->emit(std::move(tmp)); + indents.pop(); + } + + // Put the EOF back on the token stream. + this->emit(commonToken(static_cast(Python3Lexer::EOF), "")); + } + + std::unique_ptr next = Lexer::nextToken(); + + if (next->getChannel() == antlr4::Token::DEFAULT_CHANNEL) { + // Keep track of the last token on the default channel. + this->lastToken = next.get(); + } + if (tokens.empty()) { + return std::move(next); + } else{ + next.release(); + auto tmp=tokens.front(); + tokens.pop_front(); + return std::unique_ptr(tmp); + } + + } + + private: std::unique_ptr createDedent() { + auto dedent = commonToken(Python3Lexer::DEDENT, ""); + dedent->setLine(this->lastToken->getLine()); + return std::move(dedent); + } + + private: std::unique_ptr commonToken(int type,std::string text) { + int stop = this->getCharIndex() - 1; + int start = text.empty() ? stop : stop - text.length() + 1; + return std::move(std::unique_ptr(new antlr4::CommonToken({ this, _input }, + type, + DEFAULT_TOKEN_CHANNEL, start, stop))); + } + + // Calculates the indentation of the provided spaces, taking the + // following rules into account: + // + // "Tabs are replaced (from left to right) by one to eight spaces + // such that the total number of characters up to and including + // the replacement is a multiple of eight [...]" + // + // -- https://docs.python.org/3.1/reference/lexical_analysis.html#indentation + static int getIndentationCount(std::string spaces) { + int count = 0; + for (char ch : spaces) { + switch (ch) { + case '\t': + count += 8 - (count % 8); + break; + default: + // A normal space char. + count++; + } + } + + return count; + } + + bool atStartOfInput() { + return Lexer::getCharPositionInLine() == 0 && Lexer::getLine() == 1; + } +} + +STRING: STRING_LITERAL | BYTES_LITERAL; + +NUMBER: INTEGER | FLOAT_NUMBER | IMAG_NUMBER; + +INTEGER: + DECIMAL_INTEGER + | OCT_INTEGER + | HEX_INTEGER + | BIN_INTEGER; + +DEF: 'def'; +RETURN: 'return'; +IF: 'if'; +ELIF: 'elif'; +ELSE: 'else'; +WHILE: 'while'; +FOR: 'for'; +IN: 'in'; +OR: 'or'; +AND: 'and'; +NOT: 'not'; +NONE: 'None'; +TRUE: 'True'; +FALSE: 'False'; +CONTINUE: 'continue'; +BREAK: 'break'; + +NEWLINE: ( + {atStartOfInput()}? SPACES + | ( '\r'? '\n' | '\r' | '\f') SPACES? + ) { + { + std::string pattern1="[^\r\n\f]+"; + std::string pattern2="[\r\n\f]+"; + std::regex re1(pattern1); + std::regex re2(pattern2); + std::string fmt=""; + std::string newLine=regex_replace(getText(),re1,fmt); + std::string spaces = regex_replace(getText(),re2,fmt); + int next = _input->LA(1); + if (opened > 0 || next == '\r' || next == '\n' || next == '\f' || next == '#') { + // If we're inside a list or on a blank line, ignore all indents, + // dedents and line breaks. + skip(); + } + else { + emit(commonToken(NEWLINE, newLine)); + int indent = getIndentationCount(spaces); + int previous = indents.empty() ? 0 : indents.top(); + if (indent == previous) { + // skip indents of the same size as the present indent-size + skip(); + } + else if (indent > previous) { + indents.push(indent); + emit(commonToken(Python3Lexer::INDENT, spaces)); + } + else { + // Possibly emit more than 1 DEDENT token. + while(!indents.empty() && indents.top() > indent) { + this->emit(createDedent()); + indents.pop(); + } + } + } + } + }; + +/// identifier ::= id_start id_continue* +NAME: ID_START ID_CONTINUE*; + +/// stringliteral ::= [stringprefix](shortstring | longstring) / stringprefix ::= "r" | "u" | "R" | +// "U" | "f" | "F" / | "fr" | "Fr" | "fR" | "FR" | "rf" | "rF" | "Rf" | "RF" +STRING_LITERAL: ([rR] | [uU] | [fF] | ( [fF] [rR]) | ( [rR] [fF]))? ( + SHORT_STRING + | LONG_STRING + ); + +/// bytesliteral ::= bytesprefix(shortbytes | longbytes) / bytesprefix ::= "b" | "B" | "br" | "Br" | +// "bR" | "BR" | "rb" | "rB" | "Rb" | "RB" +BYTES_LITERAL: ([bB] | ( [bB] [rR]) | ( [rR] [bB])) ( + SHORT_BYTES + | LONG_BYTES + ); + +/// decimalinteger ::= nonzerodigit digit* | "0"+ +DECIMAL_INTEGER: NON_ZERO_DIGIT DIGIT* | '0'+; + +/// octinteger ::= "0" ("o" | "O") octdigit+ +OCT_INTEGER: '0' [oO] OCT_DIGIT+; + +/// hexinteger ::= "0" ("x" | "X") hexdigit+ +HEX_INTEGER: '0' [xX] HEX_DIGIT+; + +/// bininteger ::= "0" ("b" | "B") bindigit+ +BIN_INTEGER: '0' [bB] BIN_DIGIT+; + +/// floatnumber ::= pointfloat | exponentfloat +FLOAT_NUMBER: POINT_FLOAT | EXPONENT_FLOAT; + +/// imagnumber ::= (floatnumber | intpart) ("j" | "J") +IMAG_NUMBER: ( FLOAT_NUMBER | INT_PART) [jJ]; + +DOT: '.'; +ELLIPSIS: '...'; +STAR: '*'; +OPEN_PAREN: '(' {opened++;}; +CLOSE_PAREN: ')' {opened--;}; +COMMA: ','; +COLON: ':'; +SEMI_COLON: ';'; +POWER: '**'; +ASSIGN: '='; +OPEN_BRACK: '[' {opened++;}; +CLOSE_BRACK: ']' {opened--;}; +OR_OP: '|'; +XOR: '^'; +AND_OP: '&'; +LEFT_SHIFT: '<<'; +RIGHT_SHIFT: '>>'; +ADD: '+'; +MINUS: '-'; +DIV: '/'; +MOD: '%'; +IDIV: '//'; +NOT_OP: '~'; +OPEN_BRACE: '{' {opened++;}; +CLOSE_BRACE: '}' {opened--;}; +LESS_THAN: '<'; +GREATER_THAN: '>'; +EQUALS: '=='; +GT_EQ: '>='; +LT_EQ: '<='; +NOT_EQ_1: '<>'; +NOT_EQ_2: '!='; +AT: '@'; +ARROW: '->'; +ADD_ASSIGN: '+='; +SUB_ASSIGN: '-='; +MULT_ASSIGN: '*='; +AT_ASSIGN: '@='; +DIV_ASSIGN: '/='; +MOD_ASSIGN: '%='; +AND_ASSIGN: '&='; +OR_ASSIGN: '|='; +XOR_ASSIGN: '^='; +LEFT_SHIFT_ASSIGN: '<<='; +RIGHT_SHIFT_ASSIGN: '>>='; +POWER_ASSIGN: '**='; +IDIV_ASSIGN: '//='; + +SKIP_: ( SPACES | COMMENT | LINE_JOINING) -> skip; + +UNKNOWN_CHAR: .; + +/* + * fragments + */ + +/// shortstring ::= "'" shortstringitem* "'" | '"' shortstringitem* '"' / shortstringitem ::= +// shortstringchar | stringescapeseq / shortstringchar ::= +fragment SHORT_STRING: + '\'' (STRING_ESCAPE_SEQ | ~[\\\r\n\f'])* '\'' + | '"' ( STRING_ESCAPE_SEQ | ~[\\\r\n\f"])* '"'; +/// longstring ::= "'''" longstringitem* "'''" | '"""' longstringitem* '"""' +fragment LONG_STRING: + '\'\'\'' LONG_STRING_ITEM*? '\'\'\'' + | '"""' LONG_STRING_ITEM*? '"""'; + +/// longstringitem ::= longstringchar | stringescapeseq +fragment LONG_STRING_ITEM: LONG_STRING_CHAR | STRING_ESCAPE_SEQ; + +/// longstringchar ::= +fragment LONG_STRING_CHAR: ~'\\'; + +/// stringescapeseq ::= "\" +fragment STRING_ESCAPE_SEQ: '\\' . | '\\' NEWLINE; + +/// nonzerodigit ::= "1"..."9" +fragment NON_ZERO_DIGIT: [1-9]; + +/// digit ::= "0"..."9" +fragment DIGIT: [0-9]; + +/// octdigit ::= "0"..."7" +fragment OCT_DIGIT: [0-7]; + +/// hexdigit ::= digit | "a"..."f" | "A"..."F" +fragment HEX_DIGIT: [0-9a-fA-F]; + +/// bindigit ::= "0" | "1" +fragment BIN_DIGIT: [01]; + +/// pointfloat ::= [intpart] fraction | intpart "." +fragment POINT_FLOAT: INT_PART? FRACTION | INT_PART '.'; + +/// exponentfloat ::= (intpart | pointfloat) exponent +fragment EXPONENT_FLOAT: ( INT_PART | POINT_FLOAT) EXPONENT; + +/// intpart ::= digit+ +fragment INT_PART: DIGIT+; + +/// fraction ::= "." digit+ +fragment FRACTION: '.' DIGIT+; + +/// exponent ::= ("e" | "E") ["+" | "-"] digit+ +fragment EXPONENT: [eE] [+-]? DIGIT+; + +/// shortbytes ::= "'" shortbytesitem* "'" | '"' shortbytesitem* '"' / shortbytesitem ::= +// shortbyteschar | bytesescapeseq +fragment SHORT_BYTES: + '\'' (SHORT_BYTES_CHAR_NO_SINGLE_QUOTE | BYTES_ESCAPE_SEQ)* '\'' + | '"' (SHORT_BYTES_CHAR_NO_DOUBLE_QUOTE | BYTES_ESCAPE_SEQ)* '"'; + +/// longbytes ::= "'''" longbytesitem* "'''" | '"""' longbytesitem* '"""' +fragment LONG_BYTES: + '\'\'\'' LONG_BYTES_ITEM*? '\'\'\'' + | '"""' LONG_BYTES_ITEM*? '"""'; + +/// longbytesitem ::= longbyteschar | bytesescapeseq +fragment LONG_BYTES_ITEM: LONG_BYTES_CHAR | BYTES_ESCAPE_SEQ; + +/// shortbyteschar ::= +fragment SHORT_BYTES_CHAR_NO_SINGLE_QUOTE: + [\u0000-\u0009] + | [\u000B-\u000C] + | [\u000E-\u0026] + | [\u0028-\u005B] + | [\u005D-\u007F]; + +fragment SHORT_BYTES_CHAR_NO_DOUBLE_QUOTE: + [\u0000-\u0009] + | [\u000B-\u000C] + | [\u000E-\u0021] + | [\u0023-\u005B] + | [\u005D-\u007F]; + +/// longbyteschar ::= +fragment LONG_BYTES_CHAR: [\u0000-\u005B] | [\u005D-\u007F]; + +/// bytesescapeseq ::= "\" +fragment BYTES_ESCAPE_SEQ: '\\' [\u0000-\u007F]; + +fragment SPACES: [ \t]+; + +fragment COMMENT: '#' ~[\r\n\f]*; + +fragment LINE_JOINING: '\\' SPACES? ( '\r'? '\n' | '\r' | '\f'); + +/// id_start ::= +fragment ID_START: + '_' + | [A-Z] + | [a-z] + | '\u00AA' + | '\u00B5' + | '\u00BA' + | [\u00C0-\u00D6] + | [\u00D8-\u00F6] + | [\u00F8-\u01BA] + | '\u01BB' + | [\u01BC-\u01BF] + | [\u01C0-\u01C3] + | [\u01C4-\u0241] + | [\u0250-\u02AF] + | [\u02B0-\u02C1] + | [\u02C6-\u02D1] + | [\u02E0-\u02E4] + | '\u02EE' + | '\u037A' + | '\u0386' + | [\u0388-\u038A] + | '\u038C' + | [\u038E-\u03A1] + | [\u03A3-\u03CE] + | [\u03D0-\u03F5] + | [\u03F7-\u0481] + | [\u048A-\u04CE] + | [\u04D0-\u04F9] + | [\u0500-\u050F] + | [\u0531-\u0556] + | '\u0559' + | [\u0561-\u0587] + | [\u05D0-\u05EA] + | [\u05F0-\u05F2] + | [\u0621-\u063A] + | '\u0640' + | [\u0641-\u064A] + | [\u066E-\u066F] + | [\u0671-\u06D3] + | '\u06D5' + | [\u06E5-\u06E6] + | [\u06EE-\u06EF] + | [\u06FA-\u06FC] + | '\u06FF' + | '\u0710' + | [\u0712-\u072F] + | [\u074D-\u076D] + | [\u0780-\u07A5] + | '\u07B1' + | [\u0904-\u0939] + | '\u093D' + | '\u0950' + | [\u0958-\u0961] + | '\u097D' + | [\u0985-\u098C] + | [\u098F-\u0990] + | [\u0993-\u09A8] + | [\u09AA-\u09B0] + | '\u09B2' + | [\u09B6-\u09B9] + | '\u09BD' + | '\u09CE' + | [\u09DC-\u09DD] + | [\u09DF-\u09E1] + | [\u09F0-\u09F1] + | [\u0A05-\u0A0A] + | [\u0A0F-\u0A10] + | [\u0A13-\u0A28] + | [\u0A2A-\u0A30] + | [\u0A32-\u0A33] + | [\u0A35-\u0A36] + | [\u0A38-\u0A39] + | [\u0A59-\u0A5C] + | '\u0A5E' + | [\u0A72-\u0A74] + | [\u0A85-\u0A8D] + | [\u0A8F-\u0A91] + | [\u0A93-\u0AA8] + | [\u0AAA-\u0AB0] + | [\u0AB2-\u0AB3] + | [\u0AB5-\u0AB9] + | '\u0ABD' + | '\u0AD0' + | [\u0AE0-\u0AE1] + | [\u0B05-\u0B0C] + | [\u0B0F-\u0B10] + | [\u0B13-\u0B28] + | [\u0B2A-\u0B30] + | [\u0B32-\u0B33] + | [\u0B35-\u0B39] + | '\u0B3D' + | [\u0B5C-\u0B5D] + | [\u0B5F-\u0B61] + | '\u0B71' + | '\u0B83' + | [\u0B85-\u0B8A] + | [\u0B8E-\u0B90] + | [\u0B92-\u0B95] + | [\u0B99-\u0B9A] + | '\u0B9C' + | [\u0B9E-\u0B9F] + | [\u0BA3-\u0BA4] + | [\u0BA8-\u0BAA] + | [\u0BAE-\u0BB9] + | [\u0C05-\u0C0C] + | [\u0C0E-\u0C10] + | [\u0C12-\u0C28] + | [\u0C2A-\u0C33] + | [\u0C35-\u0C39] + | [\u0C60-\u0C61] + | [\u0C85-\u0C8C] + | [\u0C8E-\u0C90] + | [\u0C92-\u0CA8] + | [\u0CAA-\u0CB3] + | [\u0CB5-\u0CB9] + | '\u0CBD' + | '\u0CDE' + | [\u0CE0-\u0CE1] + | [\u0D05-\u0D0C] + | [\u0D0E-\u0D10] + | [\u0D12-\u0D28] + | [\u0D2A-\u0D39] + | [\u0D60-\u0D61] + | [\u0D85-\u0D96] + | [\u0D9A-\u0DB1] + | [\u0DB3-\u0DBB] + | '\u0DBD' + | [\u0DC0-\u0DC6] + | [\u0E01-\u0E30] + | [\u0E32-\u0E33] + | [\u0E40-\u0E45] + | '\u0E46' + | [\u0E81-\u0E82] + | '\u0E84' + | [\u0E87-\u0E88] + | '\u0E8A' + | '\u0E8D' + | [\u0E94-\u0E97] + | [\u0E99-\u0E9F] + | [\u0EA1-\u0EA3] + | '\u0EA5' + | '\u0EA7' + | [\u0EAA-\u0EAB] + | [\u0EAD-\u0EB0] + | [\u0EB2-\u0EB3] + | '\u0EBD' + | [\u0EC0-\u0EC4] + | '\u0EC6' + | [\u0EDC-\u0EDD] + | '\u0F00' + | [\u0F40-\u0F47] + | [\u0F49-\u0F6A] + | [\u0F88-\u0F8B] + | [\u1000-\u1021] + | [\u1023-\u1027] + | [\u1029-\u102A] + | [\u1050-\u1055] + | [\u10A0-\u10C5] + | [\u10D0-\u10FA] + | '\u10FC' + | [\u1100-\u1159] + | [\u115F-\u11A2] + | [\u11A8-\u11F9] + | [\u1200-\u1248] + | [\u124A-\u124D] + | [\u1250-\u1256] + | '\u1258' + | [\u125A-\u125D] + | [\u1260-\u1288] + | [\u128A-\u128D] + | [\u1290-\u12B0] + | [\u12B2-\u12B5] + | [\u12B8-\u12BE] + | '\u12C0' + | [\u12C2-\u12C5] + | [\u12C8-\u12D6] + | [\u12D8-\u1310] + | [\u1312-\u1315] + | [\u1318-\u135A] + | [\u1380-\u138F] + | [\u13A0-\u13F4] + | [\u1401-\u166C] + | [\u166F-\u1676] + | [\u1681-\u169A] + | [\u16A0-\u16EA] + | [\u16EE-\u16F0] + | [\u1700-\u170C] + | [\u170E-\u1711] + | [\u1720-\u1731] + | [\u1740-\u1751] + | [\u1760-\u176C] + | [\u176E-\u1770] + | [\u1780-\u17B3] + | '\u17D7' + | '\u17DC' + | [\u1820-\u1842] + | '\u1843' + | [\u1844-\u1877] + | [\u1880-\u18A8] + | [\u1900-\u191C] + | [\u1950-\u196D] + | [\u1970-\u1974] + | [\u1980-\u19A9] + | [\u19C1-\u19C7] + | [\u1A00-\u1A16] + | [\u1D00-\u1D2B] + | [\u1D2C-\u1D61] + | [\u1D62-\u1D77] + | '\u1D78' + | [\u1D79-\u1D9A] + | [\u1D9B-\u1DBF] + | [\u1E00-\u1E9B] + | [\u1EA0-\u1EF9] + | [\u1F00-\u1F15] + | [\u1F18-\u1F1D] + | [\u1F20-\u1F45] + | [\u1F48-\u1F4D] + | [\u1F50-\u1F57] + | '\u1F59' + | '\u1F5B' + | '\u1F5D' + | [\u1F5F-\u1F7D] + | [\u1F80-\u1FB4] + | [\u1FB6-\u1FBC] + | '\u1FBE' + | [\u1FC2-\u1FC4] + | [\u1FC6-\u1FCC] + | [\u1FD0-\u1FD3] + | [\u1FD6-\u1FDB] + | [\u1FE0-\u1FEC] + | [\u1FF2-\u1FF4] + | [\u1FF6-\u1FFC] + | '\u2071' + | '\u207F' + | [\u2090-\u2094] + | '\u2102' + | '\u2107' + | [\u210A-\u2113] + | '\u2115' + | '\u2118' + | [\u2119-\u211D] + | '\u2124' + | '\u2126' + | '\u2128' + | [\u212A-\u212D] + | '\u212E' + | [\u212F-\u2131] + | [\u2133-\u2134] + | [\u2135-\u2138] + | '\u2139' + | [\u213C-\u213F] + | [\u2145-\u2149] + | [\u2160-\u2183] + | [\u2C00-\u2C2E] + | [\u2C30-\u2C5E] + | [\u2C80-\u2CE4] + | [\u2D00-\u2D25] + | [\u2D30-\u2D65] + | '\u2D6F' + | [\u2D80-\u2D96] + | [\u2DA0-\u2DA6] + | [\u2DA8-\u2DAE] + | [\u2DB0-\u2DB6] + | [\u2DB8-\u2DBE] + | [\u2DC0-\u2DC6] + | [\u2DC8-\u2DCE] + | [\u2DD0-\u2DD6] + | [\u2DD8-\u2DDE] + | '\u3005' + | '\u3006' + | '\u3007' + | [\u3021-\u3029] + | [\u3031-\u3035] + | [\u3038-\u303A] + | '\u303B' + | '\u303C' + | [\u3041-\u3096] + | [\u309B-\u309C] + | [\u309D-\u309E] + | '\u309F' + | [\u30A1-\u30FA] + | [\u30FC-\u30FE] + | '\u30FF' + | [\u3105-\u312C] + | [\u3131-\u318E] + | [\u31A0-\u31B7] + | [\u31F0-\u31FF] + | [\u3400-\u4DB5] + | [\u4E00-\u9FBB] + | [\uA000-\uA014] + | '\uA015' + | [\uA016-\uA48C] + | [\uA800-\uA801] + | [\uA803-\uA805] + | [\uA807-\uA80A] + | [\uA80C-\uA822] + | [\uAC00-\uD7A3] + | [\uF900-\uFA2D] + | [\uFA30-\uFA6A] + | [\uFA70-\uFAD9] + | [\uFB00-\uFB06] + | [\uFB13-\uFB17] + | '\uFB1D' + | [\uFB1F-\uFB28] + | [\uFB2A-\uFB36] + | [\uFB38-\uFB3C] + | '\uFB3E' + | [\uFB40-\uFB41] + | [\uFB43-\uFB44] + | [\uFB46-\uFBB1] + | [\uFBD3-\uFD3D] + | [\uFD50-\uFD8F] + | [\uFD92-\uFDC7] + | [\uFDF0-\uFDFB] + | [\uFE70-\uFE74] + | [\uFE76-\uFEFC] + | [\uFF21-\uFF3A] + | [\uFF41-\uFF5A] + | [\uFF66-\uFF6F] + | '\uFF70' + | [\uFF71-\uFF9D] + | [\uFF9E-\uFF9F] + | [\uFFA0-\uFFBE] + | [\uFFC2-\uFFC7] + | [\uFFCA-\uFFCF] + | [\uFFD2-\uFFD7] + | [\uFFDA-\uFFDC]; + +/// id_continue ::= +fragment ID_CONTINUE: + ID_START + | [0-9] + | [\u0300-\u036F] + | [\u0483-\u0486] + | [\u0591-\u05B9] + | [\u05BB-\u05BD] + | '\u05BF' + | [\u05C1-\u05C2] + | [\u05C4-\u05C5] + | '\u05C7' + | [\u0610-\u0615] + | [\u064B-\u065E] + | [\u0660-\u0669] + | '\u0670' + | [\u06D6-\u06DC] + | [\u06DF-\u06E4] + | [\u06E7-\u06E8] + | [\u06EA-\u06ED] + | [\u06F0-\u06F9] + | '\u0711' + | [\u0730-\u074A] + | [\u07A6-\u07B0] + | [\u0901-\u0902] + | '\u0903' + | '\u093C' + | [\u093E-\u0940] + | [\u0941-\u0948] + | [\u0949-\u094C] + | '\u094D' + | [\u0951-\u0954] + | [\u0962-\u0963] + | [\u0966-\u096F] + | '\u0981' + | [\u0982-\u0983] + | '\u09BC' + | [\u09BE-\u09C0] + | [\u09C1-\u09C4] + | [\u09C7-\u09C8] + | [\u09CB-\u09CC] + | '\u09CD' + | '\u09D7' + | [\u09E2-\u09E3] + | [\u09E6-\u09EF] + | [\u0A01-\u0A02] + | '\u0A03' + | '\u0A3C' + | [\u0A3E-\u0A40] + | [\u0A41-\u0A42] + | [\u0A47-\u0A48] + | [\u0A4B-\u0A4D] + | [\u0A66-\u0A6F] + | [\u0A70-\u0A71] + | [\u0A81-\u0A82] + | '\u0A83' + | '\u0ABC' + | [\u0ABE-\u0AC0] + | [\u0AC1-\u0AC5] + | [\u0AC7-\u0AC8] + | '\u0AC9' + | [\u0ACB-\u0ACC] + | '\u0ACD' + | [\u0AE2-\u0AE3] + | [\u0AE6-\u0AEF] + | '\u0B01' + | [\u0B02-\u0B03] + | '\u0B3C' + | '\u0B3E' + | '\u0B3F' + | '\u0B40' + | [\u0B41-\u0B43] + | [\u0B47-\u0B48] + | [\u0B4B-\u0B4C] + | '\u0B4D' + | '\u0B56' + | '\u0B57' + | [\u0B66-\u0B6F] + | '\u0B82' + | [\u0BBE-\u0BBF] + | '\u0BC0' + | [\u0BC1-\u0BC2] + | [\u0BC6-\u0BC8] + | [\u0BCA-\u0BCC] + | '\u0BCD' + | '\u0BD7' + | [\u0BE6-\u0BEF] + | [\u0C01-\u0C03] + | [\u0C3E-\u0C40] + | [\u0C41-\u0C44] + | [\u0C46-\u0C48] + | [\u0C4A-\u0C4D] + | [\u0C55-\u0C56] + | [\u0C66-\u0C6F] + | [\u0C82-\u0C83] + | '\u0CBC' + | '\u0CBE' + | '\u0CBF' + | [\u0CC0-\u0CC4] + | '\u0CC6' + | [\u0CC7-\u0CC8] + | [\u0CCA-\u0CCB] + | [\u0CCC-\u0CCD] + | [\u0CD5-\u0CD6] + | [\u0CE6-\u0CEF] + | [\u0D02-\u0D03] + | [\u0D3E-\u0D40] + | [\u0D41-\u0D43] + | [\u0D46-\u0D48] + | [\u0D4A-\u0D4C] + | '\u0D4D' + | '\u0D57' + | [\u0D66-\u0D6F] + | [\u0D82-\u0D83] + | '\u0DCA' + | [\u0DCF-\u0DD1] + | [\u0DD2-\u0DD4] + | '\u0DD6' + | [\u0DD8-\u0DDF] + | [\u0DF2-\u0DF3] + | '\u0E31' + | [\u0E34-\u0E3A] + | [\u0E47-\u0E4E] + | [\u0E50-\u0E59] + | '\u0EB1' + | [\u0EB4-\u0EB9] + | [\u0EBB-\u0EBC] + | [\u0EC8-\u0ECD] + | [\u0ED0-\u0ED9] + | [\u0F18-\u0F19] + | [\u0F20-\u0F29] + | '\u0F35' + | '\u0F37' + | '\u0F39' + | [\u0F3E-\u0F3F] + | [\u0F71-\u0F7E] + | '\u0F7F' + | [\u0F80-\u0F84] + | [\u0F86-\u0F87] + | [\u0F90-\u0F97] + | [\u0F99-\u0FBC] + | '\u0FC6' + | '\u102C' + | [\u102D-\u1030] + | '\u1031' + | '\u1032' + | [\u1036-\u1037] + | '\u1038' + | '\u1039' + | [\u1040-\u1049] + | [\u1056-\u1057] + | [\u1058-\u1059] + | '\u135F' + | [\u1369-\u1371] + | [\u1712-\u1714] + | [\u1732-\u1734] + | [\u1752-\u1753] + | [\u1772-\u1773] + | '\u17B6' + | [\u17B7-\u17BD] + | [\u17BE-\u17C5] + | '\u17C6' + | [\u17C7-\u17C8] + | [\u17C9-\u17D3] + | '\u17DD' + | [\u17E0-\u17E9] + | [\u180B-\u180D] + | [\u1810-\u1819] + | '\u18A9' + | [\u1920-\u1922] + | [\u1923-\u1926] + | [\u1927-\u1928] + | [\u1929-\u192B] + | [\u1930-\u1931] + | '\u1932' + | [\u1933-\u1938] + | [\u1939-\u193B] + | [\u1946-\u194F] + | [\u19B0-\u19C0] + | [\u19C8-\u19C9] + | [\u19D0-\u19D9] + | [\u1A17-\u1A18] + | [\u1A19-\u1A1B] + | [\u1DC0-\u1DC3] + | [\u203F-\u2040] + | '\u2054' + | [\u20D0-\u20DC] + | '\u20E1' + | [\u20E5-\u20EB] + | [\u302A-\u302F] + | [\u3099-\u309A] + | '\uA802' + | '\uA806' + | '\uA80B' + | [\uA823-\uA824] + | [\uA825-\uA826] + | '\uA827' + | '\uFB1E' + | [\uFE00-\uFE0F] + | [\uFE20-\uFE23] + | [\uFE33-\uFE34] + | [\uFE4D-\uFE4F] + | [\uFF10-\uFF19] + | '\uFF3F'; \ No newline at end of file diff --git a/resources/Python3Parser.g4 b/resources/Python3Parser.g4 new file mode 100644 index 0000000..a9bef5b --- /dev/null +++ b/resources/Python3Parser.g4 @@ -0,0 +1,44 @@ +parser grammar Python3Parser; + +options { + tokenVocab = Python3Lexer; +} + +file_input: (NEWLINE | stmt)* EOF; +funcdef: 'def' NAME parameters ':' suite; +parameters: '(' typedargslist? ')'; +typedargslist: (tfpdef ('=' test)? (',' tfpdef ('=' test)?)*); +tfpdef: NAME ; + +stmt: simple_stmt | compound_stmt; +simple_stmt: small_stmt NEWLINE; +small_stmt: expr_stmt | flow_stmt; +expr_stmt: testlist ( (augassign testlist) | + ('=' testlist)*);//连等 加等/减等/... +augassign: ('+=' | '-=' | '*=' | '/=' | '//=' | '%=' ); +flow_stmt: break_stmt | continue_stmt | return_stmt; +break_stmt: 'break'; +continue_stmt: 'continue'; +return_stmt: 'return' (testlist)?; +compound_stmt: if_stmt | while_stmt | funcdef ; +if_stmt: 'if' test ':' suite ('elif' test ':' suite)* ('else' ':' suite)?; +while_stmt: 'while' test ':' suite; +suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT; +test: or_test ; +or_test: and_test ('or' and_test)*; +and_test: not_test ('and' not_test)*; +not_test: 'not' not_test | comparison; +comparison: arith_expr (comp_op arith_expr)*; +comp_op: '<'|'>'|'=='|'>='|'<=' | '!='; +arith_expr: term (addorsub_op term)*; +addorsub_op: '+'|'-'; +term: factor (muldivmod_op factor)*; +muldivmod_op: '*'|'/'|'//'|'%'; +factor: ('+'|'-') factor | atom_expr; +atom_expr: atom trailer?; +trailer: '(' (arglist)? ')' ; +atom: (NAME | NUMBER | STRING+| 'None' | 'True' | 'False' | ('(' test ')')); +testlist: test (',' test)* (',')?;//算式 eg: a,b a a+b +arglist: argument (',' argument)* (',')?; +argument: ( test | + test '=' test ); diff --git a/resources/antlr4-runtime_4.13.1_amd64.deb b/resources/antlr4-runtime_4.13.1_amd64.deb new file mode 100644 index 0000000..cc90eaa Binary files /dev/null and b/resources/antlr4-runtime_4.13.1_amd64.deb differ diff --git a/resources/gen.sh b/resources/gen.sh new file mode 100755 index 0000000..8fb3c5b --- /dev/null +++ b/resources/gen.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +cd $(dirname $0) + +antlr4 -no-listener -visitor -Dlanguage=Cpp Python3Lexer.g4 Python3Parser.g4 -o "../generated" + +### +# +# If you do no want to do the bonus of +# "Supporting More Grammar of Python", +# You do no need to understand this file currently. +# +### diff --git a/src/Evalvisitor.cpp b/src/Evalvisitor.cpp new file mode 100644 index 0000000..01468de --- /dev/null +++ b/src/Evalvisitor.cpp @@ -0,0 +1 @@ +#include "Evalvisitor.h" diff --git a/src/Evalvisitor.h b/src/Evalvisitor.h new file mode 100644 index 0000000..64ddeeb --- /dev/null +++ b/src/Evalvisitor.h @@ -0,0 +1,14 @@ +#pragma once +#ifndef PYTHON_INTERPRETER_EVALVISITOR_H +#define PYTHON_INTERPRETER_EVALVISITOR_H + + +#include "Python3ParserBaseVisitor.h" + + +class EvalVisitor : public Python3ParserBaseVisitor { + // TODO: override all methods of Python3ParserBaseVisitor +}; + + +#endif//PYTHON_INTERPRETER_EVALVISITOR_H diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..f79c432 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,20 @@ +#include "Evalvisitor.h" +#include "Python3Lexer.h" +#include "Python3Parser.h" +#include "antlr4-runtime.h" +#include +using namespace antlr4; +// TODO: regenerating files in directory named "generated" is dangerous. +// if you really need to regenerate,please ask TA for help. +int main(int argc, const char *argv[]) { + // TODO: please don't modify the code below the construction of ifs if you want to use visitor mode + ANTLRInputStream input(std::cin); + Python3Lexer lexer(&input); + CommonTokenStream tokens(&lexer); + tokens.fill(); + Python3Parser parser(&tokens); + tree::ParseTree *tree = parser.file_input(); + EvalVisitor visitor; + visitor.visit(tree); + return 0; +} diff --git a/testcases/basic-testcases/test0.in b/testcases/basic-testcases/test0.in new file mode 100644 index 0000000..f2fe5e5 --- /dev/null +++ b/testcases/basic-testcases/test0.in @@ -0,0 +1,2 @@ +#WELCOME! +#HAVE A GOOD DAY! diff --git a/testcases/basic-testcases/test0.out b/testcases/basic-testcases/test0.out new file mode 100644 index 0000000..e69de29 diff --git a/testcases/basic-testcases/test1.in b/testcases/basic-testcases/test1.in new file mode 100644 index 0000000..c138c4b --- /dev/null +++ b/testcases/basic-testcases/test1.in @@ -0,0 +1,2 @@ +#Hello, World! +print("Hello, World!") diff --git a/testcases/basic-testcases/test1.out b/testcases/basic-testcases/test1.out new file mode 100644 index 0000000..8ab686e --- /dev/null +++ b/testcases/basic-testcases/test1.out @@ -0,0 +1 @@ +Hello, World! diff --git a/testcases/basic-testcases/test10.in b/testcases/basic-testcases/test10.in new file mode 100644 index 0000000..f5f6359 --- /dev/null +++ b/testcases/basic-testcases/test10.in @@ -0,0 +1,4 @@ +#Function Test +def foo(): + return +foo() diff --git a/testcases/basic-testcases/test10.out b/testcases/basic-testcases/test10.out new file mode 100644 index 0000000..e69de29 diff --git a/testcases/basic-testcases/test11.in b/testcases/basic-testcases/test11.in new file mode 100644 index 0000000..87ed76e --- /dev/null +++ b/testcases/basic-testcases/test11.in @@ -0,0 +1,7 @@ +#Function Test +def foo(a): + print(a) +i = 0 +while i < 10: + foo(i) + i += 1 diff --git a/testcases/basic-testcases/test11.out b/testcases/basic-testcases/test11.out new file mode 100644 index 0000000..8b1acc1 --- /dev/null +++ b/testcases/basic-testcases/test11.out @@ -0,0 +1,10 @@ +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 diff --git a/testcases/basic-testcases/test12.in b/testcases/basic-testcases/test12.in new file mode 100644 index 0000000..b4ef3b5 --- /dev/null +++ b/testcases/basic-testcases/test12.in @@ -0,0 +1,2 @@ +#Congratulations! +print("Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! ") diff --git a/testcases/basic-testcases/test12.out b/testcases/basic-testcases/test12.out new file mode 100644 index 0000000..4acbeb1 --- /dev/null +++ b/testcases/basic-testcases/test12.out @@ -0,0 +1 @@ +Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! Congratulations! diff --git a/testcases/basic-testcases/test13.in b/testcases/basic-testcases/test13.in new file mode 100644 index 0000000..e5c62a2 --- /dev/null +++ b/testcases/basic-testcases/test13.in @@ -0,0 +1,80 @@ +#Pollard Rho +def quick_power(x , y , p) : + ret = 1 + while y != 0 : + if y % 2 == 1 : + ret *= x + ret %= p + x *= x + x %= p + y //= 2 + return ret + +def miller_rabin(x , n) : + cnt = 0 + m = n - 1 + while m % 2 == 0 : + cnt += 1 + m //= 2 + x = quick_power(x , m , n) + if x == 1 : return True + while cnt : + cnt -= 1 + if x == 1 : return False + if x == n - 1 : return True + x *= x + x %= n + return x == 1 + +def is_prime(x) : + if x == 2 or x == 3 or x == 5 or x == 7 or x == 11 or x == 13 or x == 17 or x == 19 or x == 23 or x == 29 or x == 31 or x == 37 : return True + if x == 1 or x % 2 == 0 : return False + i = 2 + while i <= 37 : + if not miller_rabin(i , x) : return False + i += 1 + return True + +def gcd(x , y) : + if y == 0 : return x + return gcd(y , x % y) + +def F(n , p , c) : return (n * n + c) % p + +seed = 19260817 + +def rand() : + seed += seed * 131072 + seed += seed // 32 + seed += seed * 4096 + seed %= 4294967296 + return seed + +def random(n) : return rand() % n + +def iabs(x) : + if x >= 0 : return x + else : return -x + +def pollard_rho(n) : + #print ("try" , n) + if n == 1 : return + if is_prime(n) : + print(n) + return + while True : + c , p = random(n - 1) + 1 , random(n - 1) + 1 + q = F(p , n , c) + while p != q : + g = gcd(iabs(p - q) , n) + if g != 1 and g != n : + pollard_rho(g) + pollard_rho(n // g) + return + p , q = F(p , n , c) , F(F(q , n , c) , n , c) + +pollard_rho(998244352) +print() +pollard_rho(809172) +print() +pollard_rho(151299083768042202434037960) diff --git a/testcases/basic-testcases/test13.out b/testcases/basic-testcases/test13.out new file mode 100644 index 0000000..ac6e4aa --- /dev/null +++ b/testcases/basic-testcases/test13.out @@ -0,0 +1,48 @@ +7 +2 +2 +2 +2 +2 +2 +2 +2 +2 +17 +2 +2 +2 +2 +2 +2 +2 +2 +2 +2 +2 +2 +2 +2 + +2 +19 +2 +3 +3 +13 +13 +7 + +19 +2 +2 +2 +23 +7 +3 +5 +13 +17 +97 +19260817 +998244353 diff --git a/testcases/basic-testcases/test2.in b/testcases/basic-testcases/test2.in new file mode 100644 index 0000000..ef1ff07 --- /dev/null +++ b/testcases/basic-testcases/test2.in @@ -0,0 +1,4 @@ +#Print Test +print(65536) +print(True) +print(None) diff --git a/testcases/basic-testcases/test2.out b/testcases/basic-testcases/test2.out new file mode 100644 index 0000000..fe60b7f --- /dev/null +++ b/testcases/basic-testcases/test2.out @@ -0,0 +1,3 @@ +65536 +True +None diff --git a/testcases/basic-testcases/test3.in b/testcases/basic-testcases/test3.in new file mode 100644 index 0000000..37a505b --- /dev/null +++ b/testcases/basic-testcases/test3.in @@ -0,0 +1,6 @@ +#Variable Test +a = 1 +a = "WELCOME!" +#a = 1 + +print(a) diff --git a/testcases/basic-testcases/test3.out b/testcases/basic-testcases/test3.out new file mode 100644 index 0000000..a1bc63f --- /dev/null +++ b/testcases/basic-testcases/test3.out @@ -0,0 +1 @@ +WELCOME! diff --git a/testcases/basic-testcases/test4.in b/testcases/basic-testcases/test4.in new file mode 100644 index 0000000..47bb6d8 --- /dev/null +++ b/testcases/basic-testcases/test4.in @@ -0,0 +1,5 @@ +#Upper Case and Lower Case +a = 1 +A = True +b = A +print(b) diff --git a/testcases/basic-testcases/test4.out b/testcases/basic-testcases/test4.out new file mode 100644 index 0000000..0ca9514 --- /dev/null +++ b/testcases/basic-testcases/test4.out @@ -0,0 +1 @@ +True diff --git a/testcases/basic-testcases/test5.in b/testcases/basic-testcases/test5.in new file mode 100644 index 0000000..6854ff5 --- /dev/null +++ b/testcases/basic-testcases/test5.in @@ -0,0 +1,3 @@ +#Simple Evaluation +print(1 + 1) #Love +print(1+1) #Hate diff --git a/testcases/basic-testcases/test5.out b/testcases/basic-testcases/test5.out new file mode 100644 index 0000000..51993f0 --- /dev/null +++ b/testcases/basic-testcases/test5.out @@ -0,0 +1,2 @@ +2 +2 diff --git a/testcases/basic-testcases/test6.in b/testcases/basic-testcases/test6.in new file mode 100644 index 0000000..60774e8 --- /dev/null +++ b/testcases/basic-testcases/test6.in @@ -0,0 +1,10 @@ +#Comparision Test +two = 0 + 1 * 2 +three = two + 1 + +print(two < three) +print(two > three) +print(two <= three) +print(two >= three) +print(two == three) +print(two != three) diff --git a/testcases/basic-testcases/test6.out b/testcases/basic-testcases/test6.out new file mode 100644 index 0000000..72232fd --- /dev/null +++ b/testcases/basic-testcases/test6.out @@ -0,0 +1,6 @@ +True +False +True +False +False +True diff --git a/testcases/basic-testcases/test7.in b/testcases/basic-testcases/test7.in new file mode 100644 index 0000000..ec76a4b --- /dev/null +++ b/testcases/basic-testcases/test7.in @@ -0,0 +1,10 @@ +#String Operation Test +Hello = "Hello, " +World = "World!" +print(Hello + World) +Hello *= 3 +print(Hello + "is there anybody in there?") + +cmp = Hello <= World +print(cmp) +print(not cmp) diff --git a/testcases/basic-testcases/test7.out b/testcases/basic-testcases/test7.out new file mode 100644 index 0000000..c238440 --- /dev/null +++ b/testcases/basic-testcases/test7.out @@ -0,0 +1,4 @@ +Hello, World! +Hello, Hello, Hello, is there anybody in there? +True +False diff --git a/testcases/basic-testcases/test8.in b/testcases/basic-testcases/test8.in new file mode 100644 index 0000000..73d7006 --- /dev/null +++ b/testcases/basic-testcases/test8.in @@ -0,0 +1,9 @@ +#If Statement +a = 1 +b = 2 +if a < b: + print(b) +# elif a > b: +# print(a) +# else: +# print("equal") diff --git a/testcases/basic-testcases/test8.out b/testcases/basic-testcases/test8.out new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/testcases/basic-testcases/test8.out @@ -0,0 +1 @@ +2 diff --git a/testcases/basic-testcases/test9.in b/testcases/basic-testcases/test9.in new file mode 100644 index 0000000..01ee552 --- /dev/null +++ b/testcases/basic-testcases/test9.in @@ -0,0 +1,5 @@ +#While Statement Test +i = 0 +while i < 10: + print("**********") + i += 1 diff --git a/testcases/basic-testcases/test9.out b/testcases/basic-testcases/test9.out new file mode 100644 index 0000000..ce97a68 --- /dev/null +++ b/testcases/basic-testcases/test9.out @@ -0,0 +1,10 @@ +********** +********** +********** +********** +********** +********** +********** +********** +********** +********** diff --git a/testcases/bigint-testcases/BigIntegerTest0.in b/testcases/bigint-testcases/BigIntegerTest0.in new file mode 100644 index 0000000..e1a6ecf --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest0.in @@ -0,0 +1,6 @@ +a = 88400489525748435561214772424322801940735424387059374476086380061540195533106383106058645292768184583882618416447529309092667563209674020554611735420730600230544563603205067197732294700542193132690926073616551226730374133572671574752263104887065460518465648544465644493901675697191520404003103134295411277991739251298070289943318178849283522819550754467089914366624393142821743609600747884548585131084051287428779147045244104059926258290750431971988680686316310748134301528933584713567407874082786457270232043578520242005375510759398477041854313411176583067140428176839909180590028192060229296833562026187408239159745916885830599775079774740043318539862216217993468878814593091557494325746544947502374604294317120429705803996902205227517718257858432067333919206512226818149019771321762579988083945325851613919634766519875014993187791483555628280859825152464183969162269278046339566291360938921693114634778044880826467313962030680028899150496780370929651576720785507238516946076656352933098771570358447735706635077370967560067779270497650040627607875786158990551086911698533939222843472429899585395490055366171259522727783572413255684319654750266745197198449859215767193230443915503038939626401964673343031001413570018551961993874134237570942574744746955616899228188304445182646817940901509301499755831046330582761351693501133789476666789543594019331178509505815258102066888024891308960355217773730703553324541567869303207898896084385436400963091767268669017984083725150324632269065797358641166713924912102751872014553101519425566449284330274649507995837780074203690111231891363786756899475015190737034509948630623703117334234292115747267244899147101478017745146713191921534324816079401858734773183760804901427388690984804527506799357292445176964609480587253735117266571309554104637790518718291718834987687926151903829811905958818976101392377820071554674943928711182359620885811317339283893670152197929584650402736712985327073722370124635962541007834442574900780442164124131684737590889622083673343533989001604282106267033028770658082153962670460260304315188117926454814187407761411492720275595858486457221433795858559454514421773111285066724483512312776933446966043626347944204074534641399145186223863801827486482973041927019550748316482286079280399115269084190082216856706971982930350289576615026512157279104808768444899834008242285602184636347439421290480108938703919533677035638736844785639798775168794373177634186470602674496869261504866007751917590376901630922512827669672004980781501415712403432060713017556970071847303513452839001587278109939080247861796086149578341116209583160442356025717797706716564403180252678922313277339166748301533684150967960356065239398386021230314165850436216753901137938042659993499367171341801341498305222907800563070390309475857701857275987528057254937881575185792574941606866341664541040854405656449821287434056315148560111405291032466008640245240696797237343088505130325468807724901509129696987818038134045670244892894545989498415965228084605465863926386012419305911935798511483159165927056073757241173821385352204494406625178778717382582094689478126196911569569870918394030417725889647255672064016619719537170952285877937317506777944081269398291065467134217212567381305969439627759078192657334111585287272645390847871159766564963222576869293745112737421909129311352896556024160782215014505937666310595559412651847049712850319441149412567043904424260045637352078255213180197826876011955815550038788705796358640194935729782871073577644247942089497436773231009311647480203435046312965125886102288572145987915700289847560666534131789800452636009042362935478789045136894215530556436879197467607179779580018328994004629708683074530979564550665055837271164366739277966473201587743390599759575160404749480125255629559317941047204073355694728323062071350510741005115750560421152580375174044683693346427849744858426351171693682604468082812481145102925685748983793481008591167338438544067396875781121221959889877047483532142247511910238270670981070846313361651277926493367640921844963311787051528057542238338323868407900262961440978989089058664344570967815403178844070392859896342599614507763285792646161204227143885789872700922224276612339098918530820532203241361930485626767868762324846312066124271152395764346253516332217067347368078069777486305153623559355003319475552970443510144297391987932009460008474369219066010853310832491471839169776049422817371470790393819875654807578510020687963616547719428433184212525945499346874815195955503787171013955736931581988408715954495269474688771187378332478192627951013803124953554200205532628313077427498315483071819255817357516813259330011652499010788510492253526932387896700281154955558584127748296370013543941040424948554668812374643901258168423043783621240695100269796871375733666031076941236258254981140186893961185868347992353913147402211606510062010541990582199229392172420105116739956925542864039584358592943297575234568409846705922303120205713523073587038494987656101680948777780921571856302320536239815566445663727 +b = -6762514900588494295588489717251662036235227336423233703921388948174397392635159137867229997261448232971981848284923632509275714068479929063534548554793187461447399803290220412632893895025417278538950652435754428012745835989251089836549928327848031171174523332105491569504411571839332488405881048751271058012869591351306664727610885906911901077657016924919061409031764375321175818714378205951658517437417313828467597670987112146922297167975018161644613689971808514274095550532205604291043492311156135893753185628008566550848111933783537605497532363579627290161955817492974368512933067568980543195546659530307432776089412991038196716277227188324710670119595054601097842789635002775575854199102241237371547598208658723393495730989703789617909307964334436475416857463183915438605246968935017933582003532363403751658725511742493574312765158998807390305763536331020188753212340380122803480337686666197156236346488651381225794056609579340069601197938642409096192886514551510675107368731523380016694215155726282169528421828558058409038583312449614676147216607941907437788409488953006990533978468187072993583595479601837024304011478090949965256413487494151956434110864983067962567597069123814474515646121081207764615256961698324246593556840839696122642707766595559852840226594334711243148896133806493165533861653869565529547639384332263539732040670428326329039277907928520135917840105817244072720588857082071900029208353510150913747366589954103386534218801907633140152059876186155217768443436806147435301877218722553474797618288392914453607229722250694600185672017129186261747788223802956913323708939037121344233923332551840812572836070458604300197975700549882207910429154370722923976056742438371256406023952703535376400327911755022245865865737606274287974595211310217045689259502071583887973233273416877338514895907039716058032166846904145718189975862849669551844644982171922410605858030825313483334401239448090215501050935075608795363588495841198036419302869352237393331447850236189984833354224628129564864980496020023835843621052114192467269200830118728510832070003176692796882972863587470401634299875381161309700538776172718604045524941055483927311530697299570185981420389112127992963469453632034397361106446169760665392639082443255190429719522765272777705245160861090257132659964627886723893396514051449927634244181639064780809256567418477208213058631389018539029829163440711556230063490485020588177124130284381784870357281536042090257341768567577703407832281297382643555463701963142026197025281769840637686167175753059434506003874631489665137352721345292352524076497147468793576379681169022912235252189736892522730983311642741230456230352296161581221711964780376569313057643793496377867918102106633970743753134950375993275984252994705859653649299355717968815132239495387434334257792826455299180841073656061676876038542933941884490651363562843406142370893528898446199341838352603645810012017645863124347035005866899028924982958318223538324111987463472991572217429065742169156790399780062514180624152846004677061859431479050466170681665237620861619174051989999033230265036836392308399556822194570289465780589574213792867606504062602212519694284421755818685534286824348130897666445972181584332429113459705376996878102961256152710777098888886218087306432943884225925922434555680943312353240092962429705920653538177273835562638529657608668530126668114179465420564885645734268058900102194909739479791920841059307815928435085172205007867754946085498222458611731639808644960190425744536934555854292357992245652675191869306233047217144073198443648317042983904677258024148117115974429808189649003628561867861109090489686427258959090493718717667235922919968341094023275618280994361306083905382452151341041995036972544708410490192720406223205128653396145623313309642599240026345040683718714674869487403406032425957063691126022573302138316798039023794315389119341891958097545439490040367373333800063041194287633793353477358488462494252353023572743640262109585913209803316858859119863771940233275704189129472195557082883552530557623379092480188410480487649209179784508808727788548338939064263420471700689323222276760925606044523436289035573870036186570110838251236812375771713588247440011680022355647115569221535721491443451944389267796844501862036299090442045487810958290270835257734057345647064102975039789414962829707156757280126845008337945834404770634239202185454389120175429203698113138155154338507984056245483140445933658429493710501462499204619463744002558125617776793579632938630645966943693620943718994455124604286140917997752833448194000304644729236146839907826971494665143801425223733388281797182224932598318661080900120046388534865286883535052676349360851797618354657920938517626783650751838768619657491634407925047781700402188980608677055654644669097782985487433406306638901892187197741132923490985049073441793534466568546544382173286121764218453620558022334623815477974073011478795952981337310211207337476375534 +print(a + b) +print(a - b) +print(a * b) +print(a // b) diff --git a/testcases/bigint-testcases/BigIntegerTest0.out b/testcases/bigint-testcases/BigIntegerTest0.out new file mode 100644 index 0000000..054ea76 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest0.out @@ -0,0 +1,4 @@ +88400489525748435561214772424322801940735424387059374476086380061540195533106383106058638530253283995388322827957812057430631327982337597320907814031782425833151928444067199967735033252309221150842641149984041951016305653643608040203708311699604013118662358324053011600006650279912981453350667379867398532155750000208233740014990330818112348296218648975520409955052553810333337728551996613490572261492699980764051536159337192158848601273825512910579648921940989572315587150727633055049970456768957989672561056466373319708207535741236832428164341602662308971589895971235618137097717035924335543647934017620857391047812133348225102242716195112753156584044723243624955945747024111014298779087014640069598514881326082232989526769713880516847598662803830969491129571509451242294820669080525208440485736667128220423903776816085397083879827149119152864002361968548745363915300343028405984287828575517941455909266302387252154548803031872638593386960449350740898364380405384435036608389990155776862425081707066509912578467791627490466581331855240944434721361234648315443718180175153922528628316703617415867068226808112850484144471122798579537103046808359307408788960906208776659251975728430045356030922362836318726989935479068586705580386640085614508463879763887654331631119180630708131171819820301536884498869348006336167794852661437666833959022948034166490951915171104014953170754218398143426493563904165174005685157235605763475858225656059107361685183838748533100143977907906251911680208715286741137505571401951838124647963147416039032230482422641509355935961593918985921667795085216351455022256292637262236891660237709249510104512041421147081572882017915216269956922910235008210615877042280514500849851208964088854552620526200227308823656742562969054180326216530811141209828871182848231766566014756342434659776171129657963946168352544688126797166509854508985684426639598471647652537900461945378774245158213526618235889808839608883746507274966410696362852270652490174584133298818201403189650173993457842483053925995486742678537187572621662851093318222866972867337881736469980833183133281927855295099838462621377812743744366987245220942992556555892413509136084136563993180038877542569774659260237835485685087629108882437448100871535623436785784986509094417694879972062089253387253339948532989183130445265846764640022365513254470114485477012824479391186578331033347448974076032809783639124685394858005554593529729592368377619052125466283810630115847468722088426936190074692449337184651416803657371131330618561703431481514879814505534945875135593754996812556436692398094123007552144090927813319804669858542044647282058399305621189257175924617821455949009607653820491562488859717216998318078913660699324231170154626399918763043136819045639760276593258127423993757332665682361323989357885421423284194128440235416581665622613346958681387205106300731852472301816819761125777147498206010709459404167040735560467049962196383584317073537946286290845447144605147224045551056193385852605953210438742341516891380145520276986952840193259620841815068610284249601603956286462325249834778998654868401470536632121519849710138391867927859736060652026394052889964629720503940687249041545009107221121886699108825284877560003419699774801906837415239383908235578292899752985821042716973493320592781638244440180285407360425031026350096743845247061893328796418631233366711333486729412494031907007087909319604614198503606507460078242692574650540218207481829147435859323285231472994460667670882768878667904768150168656377465415080876562307998427178558019040387879829960414348107055329657134921997197233946160278016796710260286919738903846998386483238435549150564195874902760304845887513734253266341330560922103187976162073877052850707514111094024672932523652240436408386101980011278323579741120167973242576982020076313538196296705260367700746357170045391287547723114540102259186324826652998885753407942993741696893259791920102354986017865200121746028373081465732102617997918949938092652207144536904470607939876558679568297800568004905146669491939739043411265947956325128520551549041143097669038755813354475215098772258320295291539835236517250119426097282798143436981419718335158001324361983160013191867398229207598255442315755885962190478833188454810125496013432901158951970481802743969627335688055714130370735932087837863559867531163702646665642435355688841567414520663410928795175595576775145824775066801009633402408641083237062595527962570172074853558845913480226247729823405770070143176702057800349448663029899491448441542475057525001558973226271982758868734190069825396026331373921261574886661369383806554596488616694651531216598815506496563458498706143781256106687024560925205616011154133360394360014572831319008442106287473768692328255366392881539508730944891334248472178516717812727513450157585506416212520529402326777943300210653510958421602929454407365872892799213741958766113466214847769727801731116093373543869855781700101841300161540129834083949304619966480472653032286202974704769442775903320983226028608228969288193 +88400489525748435561214772424322801940735424387059374476086380061540195533106383106058652055283085172376914004937246560754703798437010443788315656809678774627937198762342934427729556148775165114539210997249060502444442613501735109300817898074526907918268938764878277387796701114470059354655538888723424023827728502387906839871646026880454697342882859958659418778196232475310149490649499155606598000675402594093506757931151015961003915307675351033397712450691631923953015907139536372084845291396614924867903030690667164302543485777560121655544285219690857162690960382444200224082339348196123050019190034753959087271679700423436097307443354367333480495679709192361981811882162072100689872406075254935150693707308158626422081224090529938187837852913033165176708841515002394003218873562999951535682153984575007415365756223664632902495755817992103697717288336379622574409238213064273148294893302325444773360289787374400780079121029487419204914033111391118404789061165630041997283763322550089335118059009828961500691686950307629668977209140059136820494390337669665658455643221913955917058628156181754923911883924229668561311096022027931831536262692174182985607938812222757727208912102576032523221881566510367335012891660968517218407361628389527376685609730023579466825257428259657162464061982717066115012792744654829354908534340829912119374556139153872171405103840526501250963021831384474494216871643296233100963925900132842939939566512711765440240999695788804935824189542394397352857922879430541195922278422253665619381143055622812100668086237907789660055713966229421458554668697511222058776693737744211832128237023538156724563956542810347452916916276287739765533370516148834858033755116523202968696516312645714000224761443408827704775057842327384875038634957976659093323313747925361043814471421827095235315599681174149695677643565093264075987589130288600364203430782766247594119084734216622408566059237645642682569583617131045263698232974305514385652816614497311386300194949445168071992129070173888844584924077213077469855528869968694501456832022697653635763038354116439647541632389541057585256091878510293065054847972751921783622603230013577556553515489469730329938907213818345838374410022560454886762639974546090528497982982503478059847179585649466380535658196318075180326160604017327711396022784787177549918187252023635329553531007558379889881508300511547612768903331806257570432152788294713274042956807859153986890753889079882709927892893884546781746753817613187152576318154692593157905631700094188302417994553599060329189072081030542409419559407321723803325498049291604538141491353001080042192893550766151070407054884168587450630060512040654057760648115429149641619079555044142549418040173109276632121249685401223955597523637962922720017187688177132383447953269354079725194089634691225681634710136168568217591119336370400694503705012167790102566295810535994445663083858921307821086314352858914219127048064267353298376265071973103130188931662944116444234732898593144225977245730468590210961391879318334836918756829706697490039043537230232746038814417946663563415578558779896762718842324130873973429001349968860201099391127268117291238068609718570401217322714329625906334766275839687756846056708431005434987810032041840278772477079089930270821559469738978768826212537144806909298407204818114418787232272609049266801259671101232593244099254479785338574281605393793631794389505529473610344913583814625913817851709855435544542082483664218254126361244285929203788682973268487383727734010338496081046937746732652408442914067911211384324747183877627724345250037986411071066345654744994001288015610670658351369941432674629635322845784650163684257276353142121745683112882720628568179226923698380254856425705225432292081462108266995498080373090574148531247840312302353287978738146879664104066387483285713526240753141558803580302698079838969741159387457666377516734366323182757681968548508958111706047484607031164469476755342106420670096510341301781835145028971632287879283572070734022265133947155004755284981830135174197986884530691790167128151548127185266759382825212919222364762853474043163372486062396600950483275435079802918243773441855340988735952613578421039861288540032810799607854042808964166967975009063056904336194882498636235109403632576722025229920464507359048100425424601874375159280846446771419942238240354646159428287022451505496285327509336846111044889837118903272751089212232334300497550577155781652586847966522368387181958630618638601646120928550572928334110658125678998011982414722434342374383988979976151270391997796222195186076631579918533187138836178595256771048442034477526943860103498434811012163459846499315433239728400366840214868194946298756983807861136578167195768873638743609635568932421032436123455306578836297590055952067415226033654604548703724887010093749759844385595593793395774054315336382820283565716655211088365184716825578726744018632144123283996963075343642016739368769034978393250304476406327477741527207596517322279917158922850792400367809283657846451022903922039261 +-597809627637190912947537749638458295630262267562861128841412999618200346272542966310144053516915662387973564727607429238989047327239817069177899367212009635063202001055693263247521789791995552591965391391589503475514384283511079927957341307556014895295161268716733834015992183645292659953879965786285943778778351248533409123240371190756275927037530277094004804263309729011832462984733229659395086110724071995540738033376598091240387093722465880753384360851814249351563496636005346037471074709790938126574081377651556152487053732520404527982287546387883613964401553027491979492944761986370788408636554593410540282327120508255021376440199974852778691461592523632061861969850725822362227156465279155745482266249177321914025433645499660590966311113883310779791528225792163854348693496021629883044981940668701140996937683423234512176064054721480612699264131659905937140450477055198506385204091850371805283168181737869807549525822262645073879798111430866456091022961065637203381238153791093058389496130955344358052360884580800142861912323503956563012183258194140252580374527502765501925665407580380705173620868296877665741833549147271372601232815688211150749531868401926243508687009327963310536663307092721357419508746134096582143944207141269720571878530986643905313291197346266031120701164995020391939056839492045109718341220009702037366104783940204345625526103375028336601983374994256417469924493835361521895308772869798347501053733311692538151333312681079588235331746428145696789582066526841023964952134298022303930176813436691524495884990788545930772294981723200481683014187948203932117806511393277327777641441178651949364561092623702095243681506041733406089764576414390750458670434782540475113878180701150678749275843872370893329658056423247642899486862481243843389167262163776791098818264407691067302487170839213916806353378836349626461794922361679523418836408419832595005026171982530301806899308855037540137903523021834406143944477080992261866048344738057145628397780630164334683353208160950556702265564519060210905426225309351828668456629489587431766412242372659087572553030396664987049967111284934918202609397122764728325449426782863616043213890914292374756069920246415147744138150337776063541958702195188504908562231424960008746937007554270963756162602544879089559759637117788941231308793952283245311966732593001416429958383947351217466193577896202881222021282524906363689723674134358049427360931146754297390203428898519869512733145172678861819510192010149296669267455409868706619236973013183772724028340331908211680989987178178223862573226501176881178424423408057512554507806874715395319055833602480154953381632789839272091183376927209798794309707143857116130952562581374808241299230085552767278374771000020290478634922139559955508446792568630253311310832552073640101626757605492539886490432731910953367206537284248921816076868674791634727755987479565535307637554963638968420914532866872016870546095775638741522940669194947739938842271996911047201897051712455597389961820108615376726580430215660190795324383941566436724360394741160093162093526407411559645013004913097292214936350738456578203490452874602171727071837094609494493573697468441444119622632678023734020319887596444659280654666909076106660477688801317061103092810689397443557721216438184965667199363056937522020898639295632290154177455889150204141929740218083014483891195192035174967130802670339931048885925914213448663706690223135706653701207696301196395371130974187968221477119969416697812926994183098114361736333229832307680021422932355145177045228671577876884773320458895993673643371765734214295238860491562555018594555956829233596557024555626802709159102027568532277964694395937484107381628853213373467932139014678849024549673941217599212978676163895388795338088587680874945747301568465541034889247669660799029437688362490987879277414843344066468598933538596198624930080149383744996290162231521179063236688613516688864332578565296183548357686601038568078079406433673681706911999240021272025781849773535306049040750762975560220175702009988783306377409755576714446095456506148333374120739557629107024324720435917588502790742145978345108274590291408099905928326109520650415407196253764155259528122648073108982770317116548311025631232442240255951981989625104209314534269146037566409431413724379997967112487424491617535580186031178598269287569476652729066807453554568446800084472334027673235608887138031940492693461297539894912958283643602191387264993456182033224103429075145038709400110345557609881133482583557990320712416864195914126453053707577895198889577733186041287803588324589896574327331936127901468476213611219469065588584410530890721930726485910570824806716767598575683952691808184762409689334007742637871516929945628922922909648333113364462066829892698878170974860726262086459827680174639372215474016723131508671877922753221040215848848915837245676837155576153681195138354830941289559206465985341088692608889993042756576665888046206186753629961756274989092797385228961474781054034362576443706202261213362960135059968171506568786484820534432951741466318230180453989521720388283354736695007665529404312003253122321186710479596190082843085360078092678293763890195601979938674336703220588222466389846681713499448462780375615403895674477150131972637509437765160429362985651522441865882747142689245367221812791320180338679938493583600620627592708871952744811715912505543356212802408273398039352717136971576981925547887133410588395932405779028017683098245123072595972202769662767659885915328703375600474203934861565401733151523357337519798698740779684246002784764772675716859296006086558137466138851952450370893307748425802742929019814883856732111226658369896174366655989975132669800391140008078140729378888122739320699554607886875974750167529548230398390215567035401379614570247960379616502885729518635198995607783893618130684684325262971872816127595654162834112361272160300905386774112795660261936272163097160340028768637023991660236328267522836480409950885794823202104114173518225124891347744241907074176632754034710305398047284883023952708263481423269357334068863745316829612550432928072415269612884678510084010654590521343446973122386661345131675149474918703930941444384360044432774834094122613576122518324091357701497843844145543029764904322252740901763869556079777519545410405095585447692571754740825451891832871918759482471905742374688617765009955377088130497763743233564089229594356924685519436204130349880750834102972296604861216610668864682178004924592759798032860459917023066932659511849322004952707602001094907331495953477283816621068554292574191849179764921491996303153420650559001998826383438489117981580052314702318390196924178807073909081730545901521696267196611285457184623295837846763429043643675556443201210072611171387345290589734153920020659094878350629814239669764853875581728548084677370522802516909192769298994504674390074523840445312232082113699844341659534239350909251287985097669305453141252479616558506716478485525702136475344701094394514101302498834699109961098434650802747498638374298526959554301628200659603342518236685640740661486604621641706851725656493352979363940023547727164068430932227157371787867910804448340270880590828041127562390761334945875892661167860296323333679428801184382327863673793784837569681103436764310720476229126253811922764640472227072387195928677856355273786025155488345266455302085431360860784467533020645384355325598959280053034144059182281153508476989590508866859195023325678985776466139747940027327258396065727616406961902065409688799608393663658420819522829144848155374387973942288165864964093352308955938765741533759156228378482038865541262470439330333563404330302020985081607060924402788721201598206730493924822170370075354461952020068471154193213527993276044082999743105983659227046538679742872924776883251343134560810407190648261725592168427536245302781125201831308585589040673012888124260210621898812204229316220289115087366321171959875843043551466965977635822859951951886282390847251174320569889312578337303724377247802329677491037786547829333579545158282188714426142159554445830371661807306320228864099352742374422740850166396780115369507944936107452490310553729560734622844115110113248889964027021375397107049610126561801082714151064884935887621267210703888175675284629837751440289647994705429420652912131633351674712696326580511863747371541240162209026744299521856816391817309274422256627902191881728356059116934929444586278065938477261758357198343204507530610287211517029902361174395840790524269665690263109663739171566067456323563753301303287818297436267428730568452740865790163134281177285701926372660234929285347232894828141044505922773057910282184999123638771882223217873344236641549132693469346074937654798793001836112594834868753988020147580505960874781226646464665795248078297971693867504286153017923416351914764504978203840829781366120256405580055549095393568410468030619801680728508773590960588577545127771230009395115617964994105128296408412091256999755308384467395871585565294226390787545490727341881295066335312323997569390863439217205044599862715427677968741570974960313476802359674738592397775835911803001124407516579843022403076770458020541165525102514234038989671836092643755309375008910834068220119211488191157335036533670138342214335000275610546694355575522786479660153494790368510463165877626184577668248393332973916697495063826922714070848640882045125968656598287294279934083616835742967052579993397250991754037279131465695113015055897626043935154675730335096026585873035935996553106330576734970945609204768559834845058071864623783815993572786262134340970493274752130106943547141133455277414508971490632180846460370767601836776187297197135275264750173800158866200190645264007968468799524515443361920288870364460198555088057513516363134047004019190632963852384684214922399054616692561119329756684324792500599678256288732962541641282034403235737780521149602493852971468750856724975027843692739859506029342089532857759657069298053504230538934055218 +-13072132309542942414200190717410947323752480858551020735012564404725399805423492497628296 diff --git a/testcases/bigint-testcases/BigIntegerTest1.in b/testcases/bigint-testcases/BigIntegerTest1.in new file mode 100644 index 0000000..9c998bb --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest1.in @@ -0,0 +1,6 @@ +a = 727163396536672147237536792146809584216561293147885917129304736948681888594699740328921459596563307503306479927533044845800920545173993526406911496835052296419079174243015381721052295212113123967426582843255028076408123650471707936677888716139800581873850772260583992029089018862273043353508015315747555075008366785387327493941180909978546360738165360043633833477449232176308537827285416164624306323185443896501773322595714391146401584212232059565284019997355136567183479372011251467111228184620440973736645234035352852488236151844342089128547669409048854944812381280072722984028022249074050035328268815034305789687785497042781357533475746053805750169706942913258653767870367404342246315362896701886764739037810968242587392232802521333902154049502859788709735930263048858099760372657373192905470223537405358576609201384000706947784895535580328314903750565058037892669347046102098763926166709347135606069303207465229364674311190494005517588044807517394606505944579070090645477938528678237089261243550409648202936747475906456923636637541395783751395122696842786151138084863206118326048426380547882334962679652222996215878968697319423015815075632195554266727964910544013681853013210500804102973028003968651605472306933165930379297951135030371363792126354864957641437172830598394070617831075816106255277163714986371923721723294405341441765216861279220816043214726628950874265993781324914488890045877931202741409717114679864007843703205221688285226428167305518287935436222543177255712199668590154603230637831076871568783785273391755253682449360873931041270721715429095363091049552465946279036459880872481773055445653118596599346016557940262852009335025120188605199760145007443054930292095054287236935932967103303354560134756369024603918868416785686975362007539363507386877159916868103629295509439094403685867960103071902402909682826491846599326647719587087625205325960038680813147059210438325025915328434620699411272893568059770824242328479362623428116066366835843253704467822847520369593384833664982345803883282219377735972510075509761779670937551030738928588856294242302729854406640446808391260236240351379459987718892747070131573634260070035792297025118354327801599145447265731128719375458875442999142498472015899586606705786402155997037026592922611723699867520792536286520518647310795787460441586301582393066812606390598668259542798567028933704723870577017862050898303838390975929756874977403506236779896093982546350266641208667304175838272992951588873191299241179585942183074506108485247587627279290509083642254400619124996243997987584305903444479611876907596764774694599964196743951822986742283153278712799037644693179716661264750308769315518328445626409177194266175065201245094799853219501909081211808593798324897587404908904704514973454389254893999952712705351582988065665951635033920523687896465101066131102129355340025582403807163960123515919079954934135342549874192113428722713637454556262640821028837960404547642209611956734870400853841023576183504770564072102791170738334230309403473839472133746595588444226605128076823167226570818474923524840736085376678785851900585397117501362004010632750143914526806011839094849279084625746189206351882638494844928680042786952055831718758721558612695702577200565017850755082385922841011011198106365934015510956457561631751791001979096993750850504662427085543638356305816818181099136638843630427206853583267525885713345908273691403168580695014582125351440441931994268235655367033953509601975043323590881341033642347069354483411071165492074544511966135611711517952707526672267644173471851703723650779468717741180805297015935496815669316395102104148550674176351876180218588687415490851792526374761359843067054851751632173080482351853693890301700181212211781095766537609776734049218250703542641231183263927373917154363606029483986314615018500029473478193606628107211034445045306862576400241086711700664073541496930580387509136682204503361945463213660057265888768436856039123745187972611485316285959146300276887946668759420239518787579012558754730597134204453638008163143475474079232098574529814028287100794594433442960126612393179007456223782402673105000540082624648392244019056658537276060190956411062795028115488063793298039523488784403283563565054840874744388685820174258189862860732094942493714653036254380043617544644693340159358149103734256179945203655334429595078852167152234209538730464652253649472003550334905190952928793213585812020890838549957921333690741314050881276386829261577614577936921103718509675662049048734031699587541380962303671663981300113511027723759462004460158828131367592647986094589197774263576249281891463839654110386478381505500338556300613309257718443444915137388169233922396938590618666843106263275713969125535810409845332193150906894728538089824829894407358373448549557329166039087728093787619814665258692486687383447885723292549337930403883447530145944192803444122852987235515809666001661950553694515984155056319941075695883858977598787324130 +b = -2728335966475738414638470897802654721830844498804654499232688793168948877836832372957859299515193411497821356527025841316850619720266012203528889765714277355275526832653655130573971317354566354604007470439509321827339712364513299657107870509610346731757304819213640378622426969056786082376089230037104894944845156845707740592259570647766413246725561710348810320001660618408132837650416371556411927083840221859837888727563030489989478165952214823626846703029856914078879950159475270709762787784979721716442654122447021943567979492172853921129748189338427769062196734091217841069756015445832575940012849640255094845858628802172563667783861818535076331084365989485423350424305415408898530724999874046350929641674368931581274525834129539469123479278432563484911819590634633778491725260698775995410602983580451600116677860374831533373000565257427882721026171118111693774266486278772101482435244566773945585692348016207404235989843158523880526588509585584999087794632844696931070535048736678562326377368132840866339031307722874370699711052877408623704558633519672776745412272855314437985854083991614729594846921090497465717777550222804143770503705549621014413577194776781268891216427974293645298572588157654192744204852445199595961334582352164952933343090080039080258979494086448099036252981936207745070741362704134764770425486138326581727554994297303080598157089038301571432930323314195199050429890200134845603885782820983980102454564318520338937391430405781198967484970253611219190318345474213884979970505316257623877473547618437117256493492480567759909501285757955642810529465134261824405102389968591094559766425442936695962820186096866540578751755286751064440375568217024754377379535375568008539897362791901095819017624403995665895941679084289170673859630430168399170619041297211387630565668353004917990661086689355777197310799049057973626104864493342643409266516104307836508147892312431219181763806093225536990460607568742068154138804713762849286174558858382072948439824912995811760738325801437110829038770909911701772819977392581421853817950042366477814840843377273290876130622260070373260259262140963631821040486474841030732148037663667279804017395874073287873169900406557770836474978025295168193404213957987542188195280878349435621589971844779306604992553140439126858646314632807328505433044220909691517776909462192867257290245869886944611123958564856510552746606007197197096070692743927733941305677099339714136869992549313848501792822015589004432720557248975963038474272168184090748616140292311716114729891569824320728349810485212496433114398729434166576985666888079681582487277151234070708373768016289244632509637291047687239902505446919930334724389911258190570388136097638111501373616433611532110808940299052446147253916057712896555041525917752357699847017174750293880854193332147114250074465490289045195393355945078418544356481853741571206946325724727780578729483970100824060108442086623922215451195644160541914284143070808200626090169212683737088945049457570314400859474779475574603600861239981458267935385230407152164238737060133927394843732038176812145398831125269433694984467045424553903781972786042870075382793819424446018261001810487769993634676992561268658866018152555035099249050837435984116995283945337131366218760888648851296855731911013065086620530959183047254511340669821549890094335067130233390269838244081829650045607816361152028954240623528023661115700183026439346886656601345734995879061654832821773725592840703488021608756634464862314204203696655246668694545613902776337665816927523004830924249109846457087157417327218693356239627890743342231674119597953974774517455329950672939794573613199015589189775664077499188337131550790656942191675879578480792839552678112803283727406559410019764001813820573552682036164559215562417548585811146236646662235398519647899719493695300777206841770368910218000383742116034796424954122547222831954897120663920651966651981551092225894417876855675428354087625742474087610451477424804021715083333968186129705932779416755445769600875647814881033863678973811698774522547042440714254259065869463614061539172256615583978383653317337771050522365573959493569680321882874520727954676635199826785518703987748007596534658239449186140186652615799673175463803080500705007437603437938160210334737008109880915042889575064826311073743627798390886067077842884633743331752493787698609057227503594520538245903937247567534539373230453599641571756073154716024466105498131550379750136462477941988881730046244586205852920630721821811421548701418984055555647162132460876929488169602324707055114362030972060005823264733919730204217861607887961400668 +print(a + b) +print(a - b) +print(a * b) +print(a // b) diff --git a/testcases/bigint-testcases/BigIntegerTest1.out b/testcases/bigint-testcases/BigIntegerTest1.out new file mode 100644 index 0000000..d9bec33 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest1.out @@ -0,0 +1,4 @@ +727163396536672147237536792146809584216561293147885917129304736948681888594699740328921459596563307503306479927533044845800920545173993526406911496835052296419079174243015381721052295212113123967426582843255028076408123650471707936677888716139800581873850772260583992029089018862273043353508015315747555075008366785387327493941180909978543632402198884305219195006551429521586706982786611510125073634392274947623936490222756531846886390800734238208756994156038285947463213359807722577345513907265165446903991578904778881170881585489738081658108160087221515232447867980415615113518411902342292730509055174655683362718728710960405268303438641158860905012861235172666394197222600991095520753652547891566763078419402835404936975861246109406818313827643021899982172899773059379933808157833746346202440366623326478626449726113290944159999915813863885660781303543114469913177174192180969015736828281578073409335211989624159608658865357918065504738404552422548747877142406506422861616119993601906004895254064986297778631332067007926198636763495044854109720753765261511625303955323736994846769993817062970515372045018444504490618269921324012412831495180595437588867590079010640681287755782618083076801909892274877338986028161064447944053384361084785671444110147460721651594014306717867482108245490817018460644319018055301388672986615843015064397084020412881784735491852258251163213116372701209930256526205154457329136861800241878153759711590492093438305337669839800510385213418399406752006650047575741026035861049807980352355810979746456681094291706681186836418276515833134028508697387513012935946379841792222793561359205019560346364080350195192110646630890355418179713621818425715499935994791973689079846894665531870424236820561169974174028668281940083089579186555383404932312841396529166237865103657895436200897706491852712084564208612606866628821331461963210151657707522921424319654578642678415524629570478977888881807759306235365721852359888268063661690623430139880433518370956306941617838098082600541970235666257465000356437134507501221882308145649934919910964452298576406788175322351276134531629806071952208840946421681359439565905281255152045131210335762577130490800096389292105023854882116232033732626394164179391438714393355182974233230933367385621263092298778724382147715804884461509612901583204228633953241899610578837929933741361456199894933813958875245042073505722416537157979714508499588665393402622803106415728006570835407044913697309361130548386716458210447437904519407226304467851713553991417339183235696629782650018218702819390901689486492069688712315886425258978374224899172516381749730012839585940391330060372388155831706087859624000551536164216309936975929195314300483675894654645398528465202586601127801516712164976970573667777289915179863082720156037734486272843936046029487803130647489138027656829961171249276966263514852244008786027510130613406992739388979616995608314908020389685655154140758278822060365058377886026496632837551778943673867479516384862888665291414299974679083928213943176207452346588493626703206733615038707665983225788289938122762728139004030355591583609646310785732969164232925157645762702164834551280698917306687245138899850261498430470202090147551775232887967921998471081047749931022277480754387088982655170289854969042173418560943590375888927781067113415717377627973323955446342038705524533037982390445748585647882295478561181669536631269241185851282543948539295043100868998801960382566908085048071261350804838470958259553249930037392810163681586774518331458619150249293841508519712609074222800866287666662473433795843673930797174608166818019539370193135485587555820916997171334176074821030242636280426292712833664581913388091250832306245877529149671226971588253072105421909593707609871364046941295496187384865719084332589880436643282826593409743395008615879402424410555787776350761248673623903420894773141068710572681470541052049524787176143252106974032166522546536762736441169770413455156155365613019351726663688931079569644575441288390675427203939940192012777758429682350635921401119295290802407468877081030592619622386573930357014448240661364854087293854303435962412993724371156939043580759413749569292426117897487680051182004727063830280736340733099943754080468033853522276638770634837677065638039224682166754301143457034241862734554127388650922211759073949401650178323406397551358561723849430788574675660304775812358148512214538954519942557276777010785664718106762930397563938615778739212040618443351423396626801141321094057396499760755862258315923656384765455271578537619275351844359154955903789567485389581760170825638089071556726831544229471435491930435512245226869681459327557377837294503535490590644444802920057785878759681193430879631873162277797653777676441128896518068756739691333907343051425778786288951265615845630932935212447900481530527255001470737916381702464463474590297030670983245923499065913484958946547588522722455978331791586021345491665997369710825923462 +727163396536672147237536792146809584216561293147885917129304736948681888594699740328921459596563307503306479927533044845800920545173993526406911496835052296419079174243015381721052295212113123967426582843255028076408123650471707936677888716139800581873850772260583992029089018862273043353508015315747555075008366785387327493941180909978549089074131835782048471948347034831030368671784220819123539011978612845379610154968672250445916777623729880921811045838671987186903745384214780356876942461975716500569298889165926823805590718198946096598987178730876194657176894579729830854537632595805807340147482455412928216656842283125157446763512850948750595326552650653850913338518133817588971877073245512206766399656219101080237808604358933260985994271362697677437298960753038336265712587481000039608500080451484238526768676654710469735569875257296770969026197587001605872161519900023228512115505137116197802803394425306299120689757023069945530437685062612240465134746751633758429339757063754568173627233035832998627242162884804987648636511587746713393069491628424060676972214402675241805326858944032794154553314286001487941139667473314833618798656083795670944588339742077386682418270638383525129144146115662425871958585705267412814542517908975957056140142562269193631280331354478920659127416660815194049910008411917442458770459972967667819133349702145559847350937600999650585318871189948619047523565550707948153682572429117849861927694819951283132147518664771236065485659026686947759417749289604568180425414612345762785211759567037053826270607015066675246123166915025056697673401717418879622126539919952740752549532101217632852327952765685333593372039159884959030685898471589170609924589398134885394024971268674736284883448951568075033809068551631290861144828523343609841441478437207041020725915220293371170838213714291092721255157040376826569831963977210965098752944397155937306639539778198234527201086390263509940738027829884175926632297070457183194541509303531806073890564689388099121348671584729422721372100306973755115507885643518301677033729452126557946213260289908198671533490929617482250890666408750550079029016104134700697241987264988026453383714474131525112398194505239357233583868801518852265658602779852407734499018217621337760843119818459602184307436262860690425325232410160081962019299968374530832891725602202359406585344235677857972475633782278790682028290885260244793879799241455218347080157169384858676972526711581927563437979236624772629359666140271911733979846741785912502643461700567163678984048812171455599974269293155777710117402467154065102877643124130221554168588731129591734836293717839657683959325987045166697794529679007036105355088602044451556420935088189705923811784358419633958414600995521993658097652832438456279131488594608136822705254665431489858487967224038353244245145441064104605374297539430774198544099475676238245810649779254863692360359404609861837112366888722839626487916917641987034919360846027443244168870130268208693142061611759342693676185254160644127863750730324316983724541864716629450439600838102929283863823893182232630594843564797140438643419114361710479767318664820686866032426996393334700211679495397078031850790007098587143433909573289965667884337423483155930048987951579142494364927634933413557561578176052870741704702559991628069266206434587593607476543113952757165291597656673740239704870408665121518652756292865510147010751537095975538746620302163585840763119537669350351500998934155878825296376924211109025140888778929429332167302562314505600812604272786611573544824822679272720902541159634896464001686517936663234696385464520613250834015161615760796882835363265843198756160673342416469096426973300445121589876254910132397461510251453729135452835309119427653309959760488565137360143986966179142989028749976137331622324689802636627256663938340507810831803866281113739852476479176578752528628187078372421179690233966223839621830580638819453287948009231000110975637077719962490066815266958898940873890086962257949195903596286767349690305521254076396129517586643936315026757344901858257220587697120558596247263533679294429343566671786199951258916146776729286883790763666956378030971360968163252833163938333488447535414074319913738525830786397009737995408309337786826239740955086626512819349390081390342005786091632255144817584162170818817590148131333361267209011834297936753109857353611498515932623283702324857452233393643047472651681484504900089130177949274719697704198614157879783943188537430490784040392550182777003410666899414326899666291419671577834771750476909899648657075958501306831395728486799596635377701514409492226200847763991301521271080565164867374356937056109329511992980272802977254149432378317275900333766870234507371439747657412866732524137348328179661580903049123382839554047688879545789224190571729608696395304937072893236368516445114360759479105302431585701591354935904999782475405118134373056776312584666575989978321053860805900101720585486748724798 +-1983946048275662018710101342063164068548501799800526499718229646777542259723874893550484617664714350686068372438872471786372567679033258428797453584569352022814202124388835105409654720349411575398510272156253282222325342362554972895874787782907479981621938287274866724458008191371426124810987001305019704152661424646316081849025172784942801047913845500692211533268096292393684733482130246932131111609040351216701955817504913750974395123336412183973469791610769917928941064296658695307638378517580325669364758653391884501810785413846681880691601438090220165416011317838528116108345713267076525804276930036323612111900472255106341917435744551372369268267779610908207701991651529618764152234788378876966299613245138949141459379425049994975555356247396580234568084944252037892919871826981944616081156743000861546543275344264439639134396369653940327605270299013272726581450032493225389636049763360682539173005905819119759822822659058554376667036592676778096909692371373020256430178568821490620441457149381362176347778566692325711936128396150624219081429926142330409877736969296418764214625461521729870985423937181817593125966163146532485766028446949825800676503749003910186651578375571656675223708339895007558803617718026017620795574428259002441463941505649398734977427310944278931216740242596377237393684925470066427560761765189359565284508064818889594936764176234025498000298070678876877245916830679365665558530616984989340108288217466712008555905149815335667359737120353369261659447325384806620169518292551942598432957359181606628324305188213732467627648776259241488827306323064679552295406579465229153359063978267047255893133102753506339561112380302613528621794236587199323235658239548779165967897403445777881993190934957995563667875864059272422526753526243147211516496442948663204885854878108056224833299357945966157126788987826365458659742153493942191474499301215700071121294192661497380631424897007392812324612660932786874458762692104867369569457239480837925021846230730662089788387130482367768950322974004898542586924573849503367195859447055944198868643666369560567440915418759000701470022425653972537674898190570721689140871058340302620839967049562146602529294871385941223189544045276299318050116696481188991113687882107020349891590235480137472223164880798354487222962081779991555267449252051952263762859781923775511817373042444794139353435161474443615285919159626735497546232815423678980753750438329208385426297366868376776940477225620326958584043480106328289118801427451536014603251447150597946401248452732530537814160233000459068885756627524519771997089120105530228123332637774982206105056890967267015934702123115713668245759444139007255673629837291312218524042303835508501240328777342391460072654322398059778866321676249118872632345235892734053967630563334135759285916665624035077984349934697008691211813943341183708633372207043499277152129394008257367334273882759164795723366688234580569524383244666847786648244902773191668850578795147638545548664456911369334208960961898202140724845979031973612734474784053239826434925272651941997380378622242094549824185304622199510211839965821218399799046095166691093782230637463577176455466983671603651231801225753372231815868909579970015160513325701663722812800834209738544192645146279342210795911588561063965385575603888398642054616726915360174759746343557865542957553042899461526826312109154857473253387182958087341710262974572263739320896575617197113946583256165727192675991618873149540307392820963715932775610427758157289184284374119431227689730450075004061685863102851945618585727562330833222632943673157514042625637383422377703090758513536749870197913190997407423510436325339844624799396467425852564933330171732401957147385483425076921517591921457038228982892165894893233273180193013075149255135293518646444818278094100727724235394478678330211105118529881921204155495964641701193584956280870216135612794949466187142137341647056519767004111143386194234231518726289467887279390629285271601898665913122203570709852051738172642868873915112688790074021845541903566179391196844080671596509293535966748037512806156448053039741870582208149891414196807662429192994167220657860459336974446333184899047783051368342085652805956177401441921881657733124523258374172569209852972245052102943721669917821674763122763154523024199382488020621209069846962492783220241578849166011055837871754317659966471148466471206931561338920718398000538043642182989609885557902613351510637591019833110680325642411204343682625983782393088115629221248184966129996116049406434686742391822903883940768654269992557561289230930932031332046764442791122675907981853157081880519781920592677747521959995484558748150509580326048801949950428318861006884174028093378767646644279692732914805491083946585940134992830025459509896345442777578677069650463833461886222987257911277425007490737506874610790061929609699586151629085335307628668239681214612378173213590055542049523867511405899455851263691736691969009439593933650122694646105932890030374259805974828503948535763521379278807439725904937366440802437244319331077314451248507555630104441995411291924821620822517268771488144307644875458114629438427872469978032924286799423268909278238993690205017234609537242304655785719451930871141392593639388737415463039257859001318327651719826223567552334936069578594939224458536904777488416321096304242068844566733660148443551709277847130683718642988190545638456384827489236278533722985610726913547760751546065569382475115750783888524992701371488103579907296540474906379005425831812260928738564676491162322032956922308197367537870850752055822399742933549006104150681563084470256046798663129260861250319290800366687357840924758340084288742853608984270439806441180800826061115624889548302250806821802445100731732752516484556357012128971983084714675141268055843536372255407311370498274405135607125545293028657285007678031226475519882251113975857887991398568897605585035359294794442393354199078138122623540959537365135719937835458447851736384518214812932001285524187585843500292397586601786346362799268615591819185887802510046724735519630832375211692317128104706336302393776412627167884155587137888432829773677227904386967179045307337897964754275066693101145116761928252808454693330456455839061215541582761265343224336834409865619177947399738938106068192809556797790634359992603605646426084626725498917361562928201996107095199063400040233716111113363710719363003830489560810699409134509473380089295072202435125513885107053912923934635346623799574042536247252699257955613248126729933720983089169027068828761062300670864550376145575587108902302165456292315065674402090334539051828619584174177913877311221204300118473370142702129246214842164257894040724922502124822906312901229308564371175348778943846449843571134805955115380802911156484448005851596402570328290316281592307521393297424520159058827445964207857871503592480801723327813530261482741678522860287135707008939659229676449701135747804539894745706577960530973916426144238558141436160700038486964435791431211991105687511133862823640407914118108368502454613031774083857413432475492928852090573257509161113156591863640979326094102682507572249373770006716011822975888179653974547583504563925538188011747996271610752148473640205939026230815602277037881834971494299593635442947900859695962857954669832140528049402921070265426222040502003954324036310037421595409587248451436023625675885899355189807006597205799572973047372372094739577531588005862719273481376355621471967162582158122806576621163222114741870717496865112512562036801492639758104673495290332421710493815349825132490171401985931896837906148424363792548694375642833155389768991353476622608256090962766899800174677079582500027936367299562477550291077380424966933509727988922073256693410593375919218679600779100670988378828993021641806589578814530588032859068907631587571613505578534370162241138767519550456450245040024900189716747928523179212219917642302196848099388210055932491731295477861599598506398035129064838579016931286320157858611311626796939854308367528109458589465538000300167756977700295657160921823381072529908700600720727256283559530677570991662362950903072008582047469223992506138794966451059087516498657635285405727519112770314236740837452788614527504981864414860384807181587834848217010294376414762841303802046111513833471661640487725548313411690335220010953390186854478501610799995294294764675412747959095504060059515380524518364261090965927212398937501837148117519314398258620306987668210708201149613106971465039539616947278706075677262679191613400321864361576434963932843225506719763002205897110817452197562661512358097970685630856093008150597842269490913545488125070706470889629117220682053234160814572961966815806119011575981797217334323353928165347994252189779189619982339077600958351437983839226101122976480762873508934135026710877514007961552170209201502081812528316841783516795761899444258329066158663053063822080874937790024893738336891491663440833025529583129547221243189593002056709371763648816685740229074275774500654628449683196031766026373956582147725821037659612772018778972764918453398615984904701440918253746653296449407925480455888592118222795594825607050207992458299131737505566355027981713385894122462765098663785969614955978333396565536743587647100651599759302257712698638601231610011964996604777059158364277781052140974407498761282956288261877500422910428486652019872274406119857083676249782673694373817497896267100892199462687696875265835417565136965007546089182574705169533256880072643208343621862430003718663473826711036919429392050207797304582718514518840 +-266522673699884463930549260857165509251365218993089024124608258984585215126893173294934764537804953811942800085289323397126539999111290177391915990419061880032705835523734319941605819499906764244125187847049216611836706849071029575925329259891205876043789988735748760692625785559700344794325881950095191038689626251330719681448950876812996 diff --git a/testcases/bigint-testcases/BigIntegerTest10.in b/testcases/bigint-testcases/BigIntegerTest10.in new file mode 100644 index 0000000..72bc775 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest10.in @@ -0,0 +1,7 @@ +a = 2327172523254280291491780320009813040562331873848593404228468116197804163098426504528275058946195015747969161282963700483481231951844173762305235605692615928470581528618214926199824845837816647697117137806852578792598168176995908534418772282090426023017035685707623678178655903702683978229307371540153695279189663226241360101143392217637710357212511862915901689206296108196048016067315755207408356507705981928114544577712954136260708543326776891895085149814099767368896853398041640397484125300545889090022935107235097969185914428751707783871730619857157709011601411821176078583526771214893713751165924047163670999667473480333062232649997191917084827391171866427670585135579561979852398381605692948156777179861157905411720005940649159987430483235263903049097096023565998787438712518162696959295255780149914218796879628143433881515133219558101516883256921455693447469946545728369925871904189093226459103773344624554005624695262750513974382399560275592470009218230028779540156380828928749466564733009130501364359306644691431328404019585718906717852684155879772121599286323903725936727562037346990670549424647813433543547064691765828768989933873888621468887085328423629842039194396721569273871787761903083705076121957990603830482635096359878906435090057026265997295867310726421996166643732479935605561724109232246872343478760544844914836908672719102957360219905861733606642590276560756268278222176673472428637987989201205592523903654345849599376775364237096727487457214856839520058579279999734112605838266664966965882630710122409360086839229769135251518158519021115652685277027519426367468353862018762048828977582345953086489436920619936178442953200897518988831215142779039619474917454284367847702121473730346221615532932527243584107267729446938932481535592810628596301341789457004167048872551815815600850238731042709236255351422815274956715469121334570762935191748185285609953220716305192568043283724470609903347517598388056522688250307216750476718672945732820992301476392587600534160879286108130954950893866319848244208759583550835229761439485113746693626904134050070659676739845236896421949072741240119881876897691571458735145564248509233422531427388727357592398638536770502167250639532831229731484966909282502450144818377432065343909787027272175463972986818455585294969466281796621335673409573186568336268194186706829762262013896744309450194628430459168785472829107513969780725153982425273406421359265941187310586198237688500197130694823205793909849031211894008584813831424150516331748397838227367433508847931054854303755317457304783424420209936822622877378581334510326589336323511008145056432273432471058861004630481983060496777345952371763132605118858981253581172517397766672044295520498902758599660608726600117411380268785046858198422331917758551825020079252147433747905854749513184036638077534528945561832400133039900212221643965409012862473926932192973478964179067598372296849506736392566299824196395273768690238777356584374313751981087474104758920577990207151759703798060534722366406878253957219836480194437516346399606245674430587957286592072038237139608338310268937110617385759358072075825715755436042405740295158837451621559220593876575881993947831913894884141368209601261758673177321904501931455266612004309965837565795528053644002171581825887617004928757665312393295599809223479444678001490937441068134757892402636680177477003899358421764092386019999072724577018024702667586012385594485398972049085803140486749337893967114242920929491925168976552405239321395308246441582092159144667623459477782008001957509999958537763807015379672914381597645164654997440505168995753357387112455277556490114642490622514842579448901563441816300222837762788074720698371350098034994223087328851879484448564814312760847464323800945147023875139638871491842461185908011162721062565060324381004001676536174751408920137793577111690263741386861306420218229384320073331972080710948321199368011685091804407720667388059827708598793586449708590529794714385970941166511585214812381175475982710264258225944737564853890846789585446160874250295101677448696279361283434969663065388215640113117355461495238045773663498583699045637145415009939034199744264741672942506758118588990130221532402791733214291301833674516973924705293059427568942548721563059482960169485051645155110913608066935385084707676083714072283767321938866427809225167548383486074446199423822260278340003826446101260021954093487824248502264174928080800606939763216342695576786730107873164740782911519260653253942616640748338009021074742852402934425804580868670627912402119082531617598358900034108203585098308382323351837197614828915305379264043608627591028594692858681680125267787761251914819935558899380227717528509340550317086637892700700572911203637716800212647770667537000029122237791744526227231320608274998451430085408932181046271713024886594182191571888981636515146835950733174768700624102 +b = 6280922546047090590890301874984192569470847755509698790994597674981954736934164838262493641343818816633873038011889934329228781460457107756538743348214968041418319443653860431101619881318369344267553985911056166661006665230865259628943965569748439354023980854854806861174696974301380663559863774464177901487299282200640161497914857010456214368023175609740071852442575833711932947079976799681042706099068904281131652764741735579041683164102579046363227577869923651982694367646412474611092671078653355591457709997497283513122366817139958299760527411868000615629392375996292239302799855539786906015796057642311266251876966784346271740130730234017295172990869196072793005241179926130773831154719750996130465370615196566092655964249698274560190916017331954068177999301139461762389660490811172148998201699316921854674728386460315689810649431621743276446559554662063733823473324148795531247304723359237353657060804535727351146612780164783303173842611633953164343621086580916879486161468284087557138987589778622776628505131310574503040570929841933748551685478668462148359056521610912456480026167595994845677166476690215582869590879458485594678298578581660784977981826369516229132255031861989401293030505678561172432164904172932925828095469253972222976576427541459200536359467655137934563470101520737671098529240378577865162639584033292275829577096321593194141425260630593210521354764044479343420661782635840761351630344730539075459763066967060500957880247467617348847977742950339021598438740901684132332826897950701690786278774350297738878747323099908839658779932399052910296710017248964407244366525032249928090733987216284757847498699405128917767852024386152050229356854978313759875187256602897007335990631208846649805909475997326929322804197414819625768729734438960885236572307345245682963251313727895374492301146907049659135299709856739460691234729186167463239469381146333115332050077443954627074459559797934368680673123441949261423236127207308931547710231432134128215335760075681172279435293600850293189114733589492308720088585438410888831137365746038597919862486191138580944431330497739158532994828173285895989560989933062936419788110719975604682363922378552739657138043284679427370993939538054094601593695482810643507799124677479921331056017052348947077541815798382193012083929565018072433944077570115986334559552058267913537918514190442499455433097801024847124301979475863443434541722293877432217192686120077594155711216662420933262302405943158357477785154255505744616243918254070403036121213478664513864804910950739659829462662860130741502988867936467401517028752041885899455522787622781176398642848137967226021189996261601506590097352139579090682472658874377857552027527061396422245934692174891405637771687439527314149560918523650752269039700397260836249761898424565885006198833337258026147125943998689677736210292538398357659917656147707774575207138788416516914292983517889785066584511797774646227272568008238646086620643851860973719343329160873917718351522093462884009225945390682440778701341568637278424726224896923394569824848554137387716368452381827782071282200987953998117038433670063994101600021740134461660160970105192286952543872992956670662411516834531098884645507196337935655468719240533053688550774007344690789108890410537104056869389661312822139858083711034245922356338387418822154961774431682484189195002144644402969594161328826129273595136356442335246733115613522286061516871000274268594188752411873984425389385852881807597951714171137749882412291640120301605499272602731458756784068699293487085809820928738308765848113348629535633399807893984065201641255792325138351239597725466876710586831058340726926820044110299253184897038805889423417652362546564443442064510888604407691841903914718689203340804037583344731721880094361214888170773029245031823571638242437954672984866923220469786541747824658259942556954807810143032615236253210096441755941293571081975610680874797590385678009096687890521147912004523507580507033370848508749228161833456937532632819318255441618525809581899569272331652498474323577255901758380535282266256338440328624254796356122240796911399244105466506508785843413499313595666318929997872168452879528843353652547394996583658636934106777279314693376383484044831388260227562143642974512801798839449510883985856725793657064575062391220097067228245020454740177440061199249630602655864648328278576508726370168719071840760013870811585642360328621182098654672898737337078960964226160135743081058483929402892165243891121007721839572098828831815119708634888538915006477133954506702528558058836601884254715319670556452564900475659410058085397007339500259215343357083345618391682659132229983223102854019841118641910068980342547304772315303579206231860047527454397233634630182985758552104299331954272103463500881533141112048420635067305653804555791033233069663011597376479962600905832908743670323793539092090459597845158676234891923875408699116 +print(a + b) +print(a - b) +print(a * b) +print(a // b) +print(a % b) diff --git a/testcases/bigint-testcases/BigIntegerTest10.out b/testcases/bigint-testcases/BigIntegerTest10.out new file mode 100644 index 0000000..c43a693 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest10.out @@ -0,0 +1,5 @@ +6280922546047090590890301874986519741994102035801190571314607488022517068808013431666722109460016620796971464516418209388174976476205076917821707048698449273370163617416165666707312497246839925796172200837255991506844481878562376766750818148541037522200976763389225633456787400324397699245571398142356557391001966178869468869455010705735404031249416969841215244660213544069145458942892701370249002207264952297198968519949143935549389146030693590940940532006184360526021144538307559760906770846022252444855751637894767638422912706229981234867762509837186530058144083780163969922657013248798507427617233720894793023091860498097437664177893905016962646471202258305443002433097010958165003021147421581266044932595048964474261657197855051740052073922743674074118648461126892245624924393860269245021767698104360567192891083419610945590799345840540156074702988543578867043031425665678788168760416806707300202789174461599255335706006623887076518467165639577859606371600555299279046437060754096775369016369318779157457433880777139236049701431206293055196376909996866167944775428328765140635905939717594132001070202626943144906937870129035019326112012125207849669747655138506163006143653330876486621454135520600366828886473446804713589998552959048344934567031371941835632719346561573024620496367518033538409255662374744508895119519638853999938809343193936672901970105545430119194073867001839563326523516242483351628191100998817297636436539395698488947081453060141252502323592549715796962675837629171589547683737470760270066278508462903577145412290065791470368902341759139749526479152500482565763387640684935205118253413583753111709517461453957895350197977472641487149976791156756713076084775591728222478769670828321567260193843845029050796534543636435158701256978023068152966019246277727218556061942324196716281758151074098531687115525457589699422277438422422814662284656103048584453384648206889818822644845407887589396978316009992545147706737110656449146098287954822378522552510552399845225168114593151769581702334123653188006196716393361782697457213990247357503413321420900020429545077191366062667044898832962635834797886355012009161028230601852502373935381113698303905647276707210854759721297130452733138364197650061283040630354408964888240338519502493765454973881142291980039356105028991059252399662865085452616356173393941323111105082526710693642139927563286861021046288926058071865000891079350261324706655900802748138136490068842292528243593253744555715473654452636439439449712163919434248015222063478345288955427282488057667690030293639589434043722240222718974333535466306109392345410500159757733153174727303549532198141318033780022568411000583721164455719371155203504399290194001541104915945756063923035538359483822834648463677123311360995639817808641105034808756622988216923957385162278105399273377746595532485723476575036435194446601709540174708247039000638160879701996380363711998777485276738825294870940305088152823013210151685170114617097851112695074935896407214865096700050149603018768908493328341076485260947263330272823782068390617582153884798781434027745712788945240590189076670809672332411868958850751847419519042181018002707979915398696965821248968456090319478522083078331883487382614124674421898152035766017868111013392341992370668873699627150387935386137355036417504182226004423750912627086824978083998418481589322404460531602396960887165997773036619812250632474035286378447536870072998845612213455079459996810983871251853856683754854657887087776379405883041231097424441579283863996105464007539928667901980073405932225325895356631493143399766431747872217020928706706735996404252722907381879582584415727839382097600600413895675519553648468872319215804362864666279827298963325106063192001949712912290669655917067793296536192855208679211971718176268906963210509734280415858892878085941532351602072205662261619093129559219063170408813364900360183142802599991300204995000948129562466388957417887258532833003808931228247895093198557107542814611542047467327347205289196608130111024394280744748314362762732549521993466612271382071851702499314578919356473804818520158194834213768531894724425956530854775090904364703661370752151925165988768662486429196327923378607049284037433282366513705577234179993441853445476649029775723544742570311554799274515220124058022560705148712383355934062807112825145906925714316728148415650217442936535595336267455326834460070235407902638668625008544755932920691430566785212728424310671161859090869166108507939467907737829712736839611743334380361888831155555754815142975581445380960993262406465123385947582958571647432093257768958119505210924598567597666708920543233220597964511494026831730445048435811500591749105610335066024230123514765131240275244982906574184947269623651252804872243157909820263713529303808649048449757305097398330783022353841344661463027461888894781952104621768556917975730663979441234360305512185625098644109323218 +-6280922546047090590890301874981865396947593475218207010674587861941392405060316244858265173227621012470774611507361659270282586444709138595255779647731486809466475269891555195495927265389898762738935770984856341815168848583168142491137112990955841185846984946320388088892606548278363627874156150785999245583596598222410854126374703315177024704796934249638928460224938123354720435217060897991836409990872856265064337009534327222533977182174464501785514623733662943439367590754517389461278571311284458738059668357099799387821820928049935364653292313898814701200640668212420508682942697830775304603974881563727739480662073070595105816083566563017627699510536133840143008049262841303382659288292080410994885808635344167711050271301541497380329758111920234062237350141152031279154396587762075052974635700529483142156565689501020434030499517402946396818416120780548600603915222631912274325849029911767407111332434609855446957519553705679529829218057628328469080870572606534479925885875814078338908958810238466395799576381844009770031440428477574441906994047340058128773337614893059772324146395474395559353262750753488020832243888787936170030485145038113720286215997600526295258366410393102315964606875836521978035443334899061138066192385548896101018585823710976565439999588748702844506443835523441803787802818382411221430159648427730551720344849449249715380880415715756301848635661087119123514800049029198171075069588462260853283089594538422512968679041875093445193631893350962246234201644174196675117970058430643111506279040237691900612082356134026208948657523038966071066940881997446248725345409379564651063214560848816403985479937356299940185506071299662613308736918799870806674289737614065792193211591589371732351625108149624807849073851193204092836202490854853617507125368412764147370440685131594032702844142740000786583483894255889221960192019949912111816654106189617646210715506681019435326274274187981147964367930873905977698765517303961413949322174909445877908119009598962499333702472608548816796527133055331429433980454483459994964817517501829838336311650961377141459317583804112254398944757513609156144324093511113863678547990838098706990792463643407175408628809862147999982266581945655456064823193315560003974967894945994954421773514602204128700109750454472405984811754101045085615488492275146520052762930722594503964731945854174305268726268038762833227557670025668815004082553508404603109678716339352440173285943255999573996361218632572159240096654058375049793038124344221371824227204893850682440654394618991261991235295426621893571934013632712084059723968617465689518700164745402595064132521548630902510181851205169233157626293278574460200489598377600511599655763928791303386953438593718888240005015395231793650658159923990143542439582985880567464715040226143553088440281512237946894978510250783822986697108501760280125388710585875374442167238576194872948883970655415858134391538318810467159674195711389139350228077552036777324069560470635140361767147779710902921751840631761862788494189808933480364191502530516516315867628717657193278852105982221536396851613030667406045000196530455655791331084629517075900802898029366571197107830587216375503574065212971878290768931314343987823554824356391685478949512248671513467204388479081837444865079695475256344330030067032074340530450770413893397296462038386884379971522699966401478656720260691371381192499676264858242833757191758193675496871927549691576164049744287972039794900453909758512148573684388411988445177397199372113574103626179053517462673391047045503717661784070685306370331340627578123399849356220258186261582877943540706074942728026371541591077700953614471542487620184610694274523963309974516088920730264220604301722813883709320491805879724466116011952158098896166907567333513750564369827882221156683932766750595493487076855760499407221481423443654258266020780056401222894821659141519832700369079987150863746226360801465618304967060775488522509462820200115786913118973543139909955641712124866407737918433347314275106940594769518393796348942234216097632518336904489688492680810177566078329153118907425961435627964274442401118293145730296143852100428273156334373584753833891697938642608360796839393895261164270521196104386253262512428596527013270841809299995827874134156451456416914177072094005092102221735045422073134106846673242054976491573546888583580881006339710080917145001170688354685567671387763382081988617355652553412876783243591136715723895960815000257876989639675822548314334277613966407358045920295859055380945922274258139124933431959676155124410797303386044691758154333482368858061051158051288803754401950833020005246148003562767353752965939614475262991246425783228388855074759543520400483643647332479819809925887893084313096347865851403726420750634386663288233762473575048391512829513909278328559712624794664560167291071030419859561195718783729611347520201477961330011840284158749106708075014 +14616790369849106303057893825445429810432398280748372797585399315276845877195439651669300102264895057312419365193588513003606850716068489742462543066534061059279671583733028741897184746308000489676462209742233613557059979109542420702929737637729594444882948651757992629878735252871044588515306390488802118710964800978560676461269005864444477523289520007089957530944360858789719032575290278696740667349495652502992741037944562105122583766895675473206640087214413183755187360792479197399429201381634846584888869708802466508431124917309117436428911109890494157675587943079983589526121443115601340223765232644884152220422090604910268035124782790864014617833439343310536735919734219501292384572480100647664434907701903067938787141788622488340660876367856731281841908225384098757912102558250611400285613652697604538445577284551327818938057994943722495348306881287985587102209122383183333824748617616101658054182817608704778547858529410705902200047577007834393628275847917314428699221307730126569056636807998971606819596255739203031043842088806816999591767935662200890312923950932008127203812312338762902724535800821394067724835060912380419609547115534437580390434096699284079228088632692322603400014401725843023904904512024004722837481964511650261849326485919425827147905430240173512825247578305891925878853488511654485079806234617676315781704983812473167601795382728299976579969460548539440663393443825462167686759064547097542064563613579945974639251949035118380022344296916788653888332757214142216839461989026659128283709225536185148170511867306030081539384544167384244266708505328500081172463757417887238559947603804937160763055452992790647744301428252940542223135537309445389071113880866515089567981471385613693421945183597690537023503897752265149398762328946251145787197767979463404221746299445175822916704093844454678363931067592347257386521546806032432168155396154230625176824926538277977749860781035660664907185902437426719774768167970437631684316473032662887846147097448201743945894242566267059772288513924769548391019994152072953123439297445768393390074881019147463582459426545903158532286983737553541914971129427850462904515678589530172945019729433328515830680318632979183875696264683772915575474848980292701652417642957732030300353814013181397182654904774089756705894003242987428218679513380251247236737077333940800157418811781032194871921354893422945128084471345397049812863633765940631880609525208142794848346231157094933076095460669960149437754703031150336263662671743383445653504295527900296869035620454185315037459238141321383383917067362579153042450903033178535909869313601628548235685313831474008753646407139396800297575864049060339137734852407539454749853455973752816953280473473473312410682682087786588395682076928874559151659839268658011279424698007780410354881358379901594675301778531678020611649077001496228877369046930676761659752967981752142354248525140936536554863939909011824212913568452027120216984977658670677006617279881162464020537424001063460577718238130831080050865595467907663668927633998631870517119585557510285622715625461103384779701127024571656435217817570997140641290565699463135343981068065483173720613268595934633750674212091562377847170968759548300849310741636362255861439103309015467755212188180653417985913067730853419333690488513180331363003591182021073074713600777649031815314862230251866236610974770080153320673715251053418896420088558064617921320094274022112118664088102777236267512102284254557219990239051351251714177991225083854606115705478247079057687283379745722747367002265328721144709191143869766017142361772512749134607532964683946527236146328926001949031711654130167949639395567593431635774606066668643421168814984404788374538046896262618454502687072849134571419902705217833662850849778466273858716219363123929484394281134651604753139816346432969290060740539833412859747018951759075563919979345334145410115556033591728198800708120252317058611858418288264865284256273319865187809812198467449220635113184888398945633800992397863623689221551412078486982066280285000946478094560753608879513316710186113371787053626404885459272373264725829215914894177883624077026473646644397096314527221247568022690697167601618462654435607813226826937820312946468577528009317374714371245310745632930992555656160115880689181810681876536788518434343016008595202650009205667540421713736528715052159202973379027209381746973232150796736920537938700712211873208844021139499722199362880781478073613208373942306410521960099428040701577794094676967720708517348574309956467842832059498826044654642387772911541536292386430074103733714040317937387845949049720057000021105904833254110812789092968166715757687036717980511789078232002472168512006965982911590884885504105201449544603754259494339142371418356479924111210326193366124907168935336261832660143136202963257191091978440354918661336649968631186913119268675117270806947969467975803877700161192042563267859671489209320977404266067181867500400715396912791751820996622140662689174292992618838279877165078244233357064865364200707923539051081633520266219519959269926359575172258701341129425285221174757945664996436638010506048193865878376541786457937040254527568199092737502343363497510310050014183190639513012811030579402912827479357270496142393151632839412600692881874403938516275369321289580931973051540056454476114442337050150410166230312871007018101515531520062178121938265826412599722915243948884159818419552568496172756996802057000508855674196177974691949867797494718441724567916136829459862221948901415025188610604498130580028134080571223757669574946950460347666559532515785603585983764699103352972996767600480599341499658230284893209094384404602868867424663485691754786027297308840083352337034998214179802215210643612192471579899290287629344211751754211856710038435291927742252445691144114132355802754739655889086930997443939582341639650105676966109976680363593959347125087667303812764530711682173109986762318248843719351993609057446908855887618925579635109378734223162414769083441702996851223398570078486196421328980903806052175398328703978052113002517869386668296585300072143451399079275489100854273216897794748645243170741942954810542144835657772491595156848751116651261775467237789965837045946857187726359343791621704037612227723292861629765730290534268398619352472985095085420633566324325658971270465176178708672568374611494455098903372645743348682024090564872409983550824336720168460741422467911269393639802538626150192321147784321507820216471930443250206793558514786408412362240727819138003215502604172234214525191513726472795335820901999022224298997142113029731272647858131093076321457933313330414203259924298703342192106146830533888705648831305231682012932903783377453306771390706809585839188324311429992308956517676621737380698289606365014930381264947037575725871137920279728968142127149654429560719226642302773417367486064135090026514839622267719011246080155428740800939829771735226317557542288699447322332909426574934015064797108041460216889534333512107234872742370121495526501573677490619476680773733842348644057450248870053572001914260739510037483155192269373193045332546131846591459169925917405746239486247025436829201831400473538872554468056280962817684146013629185654571169500908702862469807413874788465940486238340878276354651306576960380569836785232451127776558658090653522329071317876948075177379009600688964542861651338004506231722814514549540192992232870563262535587989581306956608272857663747224589053642875803750307429766971050267758043620890413658197239483039594245079277843577180464534175633368311037243034709241317604759853917357373960941456578570682594347791886473231131489490208552983540581736296835418976702258958876264713448481582316033817544871094651990073139554050379697098993026646840630582319955029310496324371470608580123880003489586314982272825405976314455668171738607913320144396164246043137047964438149393426372353580897143907655317616951931656769921079502656303724489517867736398342537980202576664529925463971243502169159565464390548854315387046410138907507019904498428206960652062763246977069403716934237258329807697648479830887829342914617792828044500806238967758791117519127482671202522766098725140632277139392400170651180695363393626165804508409688147701883357553481027474187247707816652567167053371702163102928079532591322564403261027090293853027846432116480289585939163852498348918721112301134863478908237586300076086277002662468568791818843633105201379828608511537465617634571108388356801719460815280482028209210891185429280780619330731482953472567201632996285688315119870873849303369866418880887813709948342051608213898096393484258160474521086496486173865100555406048397590404613425214521818728055111906649981144844318264056457670180198296678662447858128516568924373028932291713055342607032454986549247258646101636058913793980592259081224981281124385320264484366397288443668666065566408400843421066280401194205429683450973518401013056955822394237562741421228221173749643857627940909828742293874735204294691693406573450732602005049889703994654195197954911476417141008678630756565239664721449979049867386416929943688302179243972175025891522402334822337861768094135517270956317653668032039130415885046022460561830537758192963916499185219913225303822261684250680452329302167455929408802235761636589448371438660066209484404928059383575870115756464540960725258659054266117387536654052663754791608278774986019346232549081025862012328196943300212452028705714150979313214601787672136702902491668275787817852000725855672935777558975824855997595498154069378963640083926610145446559280848256274670087079458306651743077953840583006390381160278256965462564968623531197908517812881741724834283368908369978273971749848787585525846773995775706893831514941390277736571089968349311815684789135693832 +0 +2327172523254280291491780320009813040562331873848593404228468116197804163098426504528275058946195015747969161282963700483481231951844173762305235605692615928470581528618214926199824845837816647697117137806852578792598168176995908534418772282090426023017035685707623678178655903702683978229307371540153695279189663226241360101143392217637710357212511862915901689206296108196048016067315755207408356507705981928114544577712954136260708543326776891895085149814099767368896853398041640397484125300545889090022935107235097969185914428751707783871730619857157709011601411821176078583526771214893713751165924047163670999667473480333062232649997191917084827391171866427670585135579561979852398381605692948156777179861157905411720005940649159987430483235263903049097096023565998787438712518162696959295255780149914218796879628143433881515133219558101516883256921455693447469946545728369925871904189093226459103773344624554005624695262750513974382399560275592470009218230028779540156380828928749466564733009130501364359306644691431328404019585718906717852684155879772121599286323903725936727562037346990670549424647813433543547064691765828768989933873888621468887085328423629842039194396721569273871787761903083705076121957990603830482635096359878906435090057026265997295867310726421996166643732479935605561724109232246872343478760544844914836908672719102957360219905861733606642590276560756268278222176673472428637987989201205592523903654345849599376775364237096727487457214856839520058579279999734112605838266664966965882630710122409360086839229769135251518158519021115652685277027519426367468353862018762048828977582345953086489436920619936178442953200897518988831215142779039619474917454284367847702121473730346221615532932527243584107267729446938932481535592810628596301341789457004167048872551815815600850238731042709236255351422815274956715469121334570762935191748185285609953220716305192568043283724470609903347517598388056522688250307216750476718672945732820992301476392587600534160879286108130954950893866319848244208759583550835229761439485113746693626904134050070659676739845236896421949072741240119881876897691571458735145564248509233422531427388727357592398638536770502167250639532831229731484966909282502450144818377432065343909787027272175463972986818455585294969466281796621335673409573186568336268194186706829762262013896744309450194628430459168785472829107513969780725153982425273406421359265941187310586198237688500197130694823205793909849031211894008584813831424150516331748397838227367433508847931054854303755317457304783424420209936822622877378581334510326589336323511008145056432273432471058861004630481983060496777345952371763132605118858981253581172517397766672044295520498902758599660608726600117411380268785046858198422331917758551825020079252147433747905854749513184036638077534528945561832400133039900212221643965409012862473926932192973478964179067598372296849506736392566299824196395273768690238777356584374313751981087474104758920577990207151759703798060534722366406878253957219836480194437516346399606245674430587957286592072038237139608338310268937110617385759358072075825715755436042405740295158837451621559220593876575881993947831913894884141368209601261758673177321904501931455266612004309965837565795528053644002171581825887617004928757665312393295599809223479444678001490937441068134757892402636680177477003899358421764092386019999072724577018024702667586012385594485398972049085803140486749337893967114242920929491925168976552405239321395308246441582092159144667623459477782008001957509999958537763807015379672914381597645164654997440505168995753357387112455277556490114642490622514842579448901563441816300222837762788074720698371350098034994223087328851879484448564814312760847464323800945147023875139638871491842461185908011162721062565060324381004001676536174751408920137793577111690263741386861306420218229384320073331972080710948321199368011685091804407720667388059827708598793586449708590529794714385970941166511585214812381175475982710264258225944737564853890846789585446160874250295101677448696279361283434969663065388215640113117355461495238045773663498583699045637145415009939034199744264741672942506758118588990130221532402791733214291301833674516973924705293059427568942548721563059482960169485051645155110913608066935385084707676083714072283767321938866427809225167548383486074446199423822260278340003826446101260021954093487824248502264174928080800606939763216342695576786730107873164740782911519260653253942616640748338009021074742852402934425804580868670627912402119082531617598358900034108203585098308382323351837197614828915305379264043608627591028594692858681680125267787761251914819935558899380227717528509340550317086637892700700572911203637716800212647770667537000029122237791744526227231320608274998451430085408932181046271713024886594182191571888981636515146835950733174768700624102 diff --git a/testcases/bigint-testcases/BigIntegerTest11.in b/testcases/bigint-testcases/BigIntegerTest11.in new file mode 100644 index 0000000..a058a09 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest11.in @@ -0,0 +1,7 @@ +a = -877410326426734819970023972544933127206285892324561107129435942507300984791637637391413805170002604470584177144742945655268459909494272074612768035725716719796538624535663657263562662838524411079984060809893273205863998113804949973488029120490002168122546772391611760917420543884361093253616521635894772379734471729827218656432395424009809107846506471064256377585098089767330043770265839374659918795229376222930156994459886485814125425663821341643274873547713208811073518747610113464352724525154965434912713924681440312981992457812006832974438209886705662400919182121871944545809360062053710719490386081987797583721212844460173272073253774240008723021843093502864304794604912455144576450451964631377850775769171426235120956276683106004250569771499077844543327439533082132819648572795090778613716851332182332710542763440780114426103284615528674220398101017561845116840893724421336036483835251939215490908197298818392023553490468226879585428553677055433710173877050893939938812077934912650858273928705179509951874259717143748048865841070165371921486613995588166603435510683105996918633417714616160692541003798448542573033109423000185624130407182599648542406063402958258607852463515303613507393556495527797931068436415065879076672022677662603583225352907907742142240958021713806943707837476039082300463917310895411250058566323875649352947732571877099273638148487521503365139394209120715092104617540188819999135368963208376251072962235658660831533378513201280677175560884229102261966962886058083245282079130304781567347333065456874384645456627224453190427748604721753848820881025099339175938830718229441313690430882108788551646563552600200787497905642762093934834909159106892471677222921508366008980944488750994141236476155660822077373550333165718368982061055898827585365556875649696262175208343635416899608335592106828857402173510520937612903549893553156816864751719197943522586460599742055472012409763699601614874441115611875954961958790069502419157637603724734828582494959434696118128544494180113964201987712334519306771802361774312970676740011822755045515824743757025492492523147220301855355613669312781904949963934125466961688131732795769154328314367311785645470078841757964101439264994338457420568099504479592100982956086122855904193788340390853569179462487398463266985844690699657787771909375724105933636142603848307989068330104118501905398691884964987783487275777996709745845675880494095056285400936854874111564721017740738671447332844722028869191921827135791266914090361150697754732293108862615869402482653097372311759916169212385497563773562872723990914087157252720844313524973054101689671028181485147037365429193757708878854460434782091201695554072595485451943663473629902372659282769557754766675487842777437987475348015547884182159078698364875440272148095259457694698419142977922542854000239047634472641706370360530930295691476290570818621952638548969982736694809462154662400952086983560229603822441093057936285452125159827267994537898551460320275368551842982158105788903974408564306445728436388484694324233121559790820473962152893226338714936681761559943148588935421799227028148851272432069210960956870133715279132154048308749902980000844079249385553632882519520128904769224234981920729466744622069381303335900621956388954517247311745197150193065771758000204011905339395464362088047359287706932305227350666765549392507996650458912216943685306126042992254387416117361081528527808530544042747035228782385456812173707335575692721460497218932013779267123704729306808284619218266061354445621098610119167381445172136666422544703565495169970638387370283193294052068356463458930241497433297678219415296708024576563290009067986705405812717105255721737432490476236653347980712456852388815249170848638389773059393702527367033205246727624140138732955465568209086665645012380266762618187577192569442338071600273677678285157300120332383062058889562075324317354122568343613641986468945719096109415434818465861667110561092697413904073530566390130741278625801979308418725049666608208441536117277673107614430504963650473431548955784487299588245331798355519018023389727693302506078880756484052686151149268289683253910146734109895641725061075767382136412735298009342347776188891478042992843437717877825760476571073748705171049143536847046785185585076160111075910904854078573003957172393669440859667080175727825982079431712983447645339511522981843385944236434697158918182285488993294929165768943559529800941761427214933058195986955627634760083480373735683608804475814502118310085372595485934821443862105112702628801792402647768807306055102328774238186061060628485199474303091031644353120405767579809819306288 +b = -776637715715752494744785878179729627251387037202437735180528037540314337351391314967020791815101235322649249085312295035682815020234763104309545675485230773766495154551919939061504988711845935359682944294368960920969809827220891071422263453665346829671677189888576646873371024449807608610753309935729977718902168739152219048688604815618252795069390033479386588842698055911255300377156599802993468529630447069494811223950382921187760526072414302420229994050961827501048330475337054693841041789565160099302339946794045514391430785958959445000940720511331733171151804447470116273442383082079311518178512480060500291976268196891528310261461928687396252007480105840220400068013553927348920575777024007472373285646041073761584678187596481044300339347892510288990962914229519408493173672862223251521655154944744757252825280292031278300912889484860419982116746586200624227229135565188185649942943552788454554094221425681550687507311194094339152783856474900750181726646432417956446227518266049179734200355650334494257510973815954925569798572838035937491857355774273907543992368424736152887183587531113507890527990412910710501990778878512704625460877125096309009007275100499949005119516787033810413391407797159385617370713609963467882766938742082912792301327967090324392923116060813058838284126227691564443501053471423513253863138947820326199286269222587686538885027903683776370538808905172571356095715649252294848865832899663802380717032347652518973206083654823264652986190530970858547886312363645811286935944328835320289995653642355296876015158540915261312365254874103092490921537331453172850788957394824113082865794520657488718884946956750488916449657438947768949169938100485908558891429529904878570025273485436983504604618427154039698761036808765973264742894373851584708448011423464152603731291733679710375273033556597232859144059028447126869138072961612659613106465684432265732926997937420301592095131085758337198775844085312413361881339934576516334808489008921531919211217526335510930551877102862308860496468377583864533856729239505398005308349407692080129523864695122284437826953221762346744185185898126120700692669635899941295555932273040409262097490619166118181814507669537945977228415544984143577433342823579482893923219931794483580604837874761868256656786917379011903179805896319905588915815494792855417781614085016898476793826974768910096763782284627689832646610737217140975998296946919104163371683206498607969462239202132292859766114191651060510571091322369550952794167703240365502629544956047108661569168575036174295439362662371679755475468666764447570751837602363465860797898295504087518850145437892582930822118586990675418690216425595261248592213262821512304186561731273398457048824611120062554743618313034338497619196877076621589112622970598691346539625499676435298605254520190468195418025215743040238916476810903783125712442720179304973989089600035254070432764647327465868793073421002850285370599182869795037750778103223903706412155638044774566275699632717981441166958993572010050209266717685093726476924655614813520844577544869597342305949913693965255481875430481588955596874833376363409728023494505017992388915239611229822507954597133879503238144773578300217849660199572420170684652868553538398739672323538846698132279420464548593019742907834177520729398463763684653155058497171444348969246622535164640040824167284587313570544580120801828899988090753584843904307564354573240074241674901973951304586541108804155956365273749269723192454613282437330205009161013582402722007031925530257961512155089276855062750013122273590268538036930185203540695967885299334679391907583262571834579593017016146224538352745064914026081838424841605776083430084992861794710259580346100192706200929427620197010523429128947895877220138621624680805177114652453633079165924129684219754885518647902594235957978422911582753963642907561049488923806560675875344688112592942939870222349759074296894396074500246672711813555578503311019170606943341486874802155570554918193470641993258424150784811030389923391141941307508329315110862931060228265241275889808785602867711460148473297518432030833677875241151807790138769096306022037544896577905396321143824935482886483645278671580945743731694602139494682306872577255587695305306376332647699751038459944867616588077883625936900351586200733694410273855667008598313879480502455125325866768386332752227442588608603678754640270331195602742445033240688343352106678281381444415419216195156507609397674404548568792731923627863120244139365342728796769263667302084227661434790399361600399 +print(a + b) +print(a - b) +print(a * b) +print(a // b) +print(a % b) diff --git a/testcases/bigint-testcases/BigIntegerTest11.out b/testcases/bigint-testcases/BigIntegerTest11.out new file mode 100644 index 0000000..b7f1150 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest11.out @@ -0,0 +1,5 @@ +-877410326426734819970023972544933127206285892324561107129435942507300984791637637391413805170003381108299892897237690441146639639121523461649970473460897247834078938873015048578529683630339512315306710058978585500899680928825184736592338666165487398896313267546163680856482048873072939188976204580189141340655441539654439547503817687463474454676178148254144954231971460791779851378876592684595648772948278391669309213508575090629743678458890731676754260136555906866984774047987270064155717993684595881982208735905390695903180218338079247276858439880756624228420230452347281600503201103843275879589688421934591629235604275246132231518254714960520054755014245307311774910878354838226655761970143143857911276061147694432012484586944567932937966023506557950383547839601095686746997493370867802621189224617828373784304348118967710907147584954876566730687091980476074636249386898094198259735356907094160235665450124098684054831791381116364445848535793802019910798104280029505126997727877856203646728482799400935633424947224454942143204993854021846822236795722234599021391956910624262967813151914971811027035261309422358527958679221573023660067899039955422816313607395326683344005350698891144620901447023518210841778938405844757589376648138539728679534361915182842642189963141230593977518250867446879459849534681609021213526449090814391435860524873205066363962541410637564178198232493246942783669061041242291422648622826347324071399161521927883419219917398229184360951931423038007434538318981773732497576927996137681231149713782489222037164429833308108013692401590912284819679428911411702821750117654173770149010720877762430906943439567758741702759218008016968037927400080644223924850073710465760833094027354545514798725195040607778827862466782823157316751010225836928071274115767079226167053778368908902336591840196725256011441872271557746378876814636447530668449460167209366986739064331033789151722785036733158212107300259670904402088827928142464031817250710190419260848227886432633538430136589311199722539186488178604619185164243114247547193074820311763967047743954974551828003453699097404717664474165781159488814497790854706467086137041145176846408443891176480767754516668711185863786009179524355546688800197149228000924251642055128944603050437881472735297644301906132804931821919115202771915486809066929513119036527068239783551910708956376667266948541751905162499178957802606065751264796309589849140818718468959128463197811567713440357429608504313496881754473746528484055066359447644673836456480545822368010452115336574444052775935326577148624284133964046360465039951420424084679027602599057736779689750653722073539724633120371250534215910250757966143124824433087815409524271528197876746801619703192659258418664896024978150766705764309777420327290578138261784452281821188968096876191802533662916554982665947506980203989557408006917280588913541417313299178174469659171993414716674852869147505008775972644061357569868840068577837602547447299511887641060355529438984607629485571657697047829567156731099035571354489361983899663014724180374308531271113281212381394277924589755894415371237078358117990117162937437881525748528799976731593178347245285950757773214641035508313001109084501644057611345330457490239127087373692251140233186211462471844445624700388337839350058218053672104911815635046740915912826105671977550889513463681671928461199051931959851519483646772390718151100770516140025699252879513289369570393422426280979458294649146237301581299047832001870020708548633614372639192458340303029347595049914705708490249328093031696293973288687624583920824700488202455065650759185465962167027691259190374504573563087326576412282658255243442742902308796417705317789810916045255563975028686968408266186994862928125804458616553448871630088333400223568817948327362919346245991112572972963547615197389579965767200548169554898423778924801137560176711343195154490241483806788098499160634371539955054087838346401219825310018122142186337710634206441734818853871568741849530768484123963502604516036363950384921170009008274669644038492297271362101743815886716548989660016648151844087317109270679875194627458657597604794116841206962375136917614869861370249847872883771306860779807022569353284144651227856646922066498608618645283076445464680671982268072068721438782656856648585773175143451854700542018115254775481034202314727131464021907590207128111059727011881136786283359651876695762848961937764082823040032256067087293983319390948214398216243363762235014006014804407218259535358998428724702164216202888277524328897785309401800322173355874847834252402101306305199993827928271072354698946437348067202370209180906687 +-877410326426734819970023972544933127206285892324561107129435942507300984791637637391413805170001827832868461392248200869390280179867020687575565597990536191758998310198312265948595642046709309844661411560807960910828315298784715210383719574814516937348780277237059840978359038895649247318256838691600403418813501919999997765360973160556143761016834793874367800938224718742880236161655086064724188817510474054191004775411197880998507172868751951609795486958870510755162263447232956864549731056625334987843219113457489930060804697285934418672017979892654700573418133791396607491115519020264145559391083742041003538206821413674214312628252833519497391288671941698416834678331470072062497138933786118897790275477195158038229427966421644075563173519491597738703107039465068578892299652219313754606244478046536291636781178762592517945058984276180781710109110054647615597432400550748473813232313596784270746150944473538099992275189555337394725008571560308847509549649821758374750626427991969098069819374610958084270323572209832553954526688286308897020736432268941734185479064455587730869453683514260510358046746287474726618107539624427347588192915325243874268498519410589833871699576331716082393885665967537385020357934424287000563967397216785478486916343900632641642291952902197019909897424084631285141078299940181801286590683556936907270034940270549132183313755564405442552080555924994487400540174039135348575622115100069428430746762949389438243846839628173376993399190345420197089395606790342433992987230264471881903544952348424526732126483421140798367163095618531222877962333138786975530127543782285112478370140886455146196349687537441659872236593277507219831742418237569561018504372132550971184867861622956473483747757270713865326884633883508279421213111885960727099456997984220166357296638318361931462624830987488401703362474749484128846930285150658782965280043271186520058433856868450321792302034490666045017641581971552847507835089651996540806498024497259050396316762032436758697826952399049028205864788936490433994358440480434378394160405203333746123983905532539499156981592595343198993046753172844404321085430077396227456290126424446361462248184843447090523185641014804742339092520809152559294447398811809956201041660530190582863784526242900234403061280672890793729039867462284112803628331942381282354153248680628376194584749499280627143530435228178070404475372598190813425940086964678600263429983155240789094666244223913763902537236080939744241502089180525054049773114362853750835628129737179409370794513190858170179467056403098193846503262991781401621363134363085017603948022343509145642562366612316572001191133754395046507174704959313424437247983320757883088477802675731606868571763919412316874092557020658850996799929325331458586897830106151612618759843908697726421299962094153311422791445495429321438303208751163653853674102363667600219930606098923470306301396204207634471932756668958344486563583524616247032502326412717107088689563909461860285021298119078334830639920110900987561456160357837205614899286482343456566916767549997255181564148660982128841961707421976428227216977939584554746975484484032214518901758287576503439152560674050930385284130071757452037931173307894390858618511001443250117051388914420661010726566446562650177865693912048292193457782354351705766975293677435178805749308192632903811820067417113087532101865892474035851128605313593790623731464206023031356364181574796124500064142344632644889120022005148141339695390032025688513538860824999243930045978191819679543647147305532626272641016180301148795433842302715357355950040078184133038485953741451898315967175336166064326019852961826550167735477718167368882531901715025769547191141557261440397449885017809222232154702413851420314328788501285194780405121848056708647962603773498827085298912187560561688759956995558918908942652377800458146535675439527205947406435928996158393224438348588728123338566351483138130992523235711898024203000043208490097512854691045442628685682862109086068965975369713812367035870604961294058852001652631302824605614297612497432674776880162048376030131303542517695048490833092910744843640938974572390979086505844654365835252290164514424952586824711823915745355213602801841035647579108729454454533528852127265652822393022111302299101430881439494965161122383970864462490086796863604079384870421449649431731961944987700471894934903959760007336083110958184487875215137627920567455064079027345816435560446546725443759513039026156404725733465352413201733369468877621742020488807653439999446685896507472294183004973364258737262370405146375065816921263142470677533827364342268892744332789410457705889 +681429951661472075547228162694404188809858734378092653174202566662557134516069782239684824538031288548821346751551823940490128514783891665249342070695483994335631741485011643505528971391225248806836786094579749540958955670555528037505070034592804924609429774106408479178432843513154584002322023811860470765777831944020500017994680566313163736047661042503856077485937898507955728562566687707570051898451966238897585781845569698593358400202592622434274728858451262814068381501094034714605003523482073362170735670483795847434399052114913360280067841025108124086847778940108773529883571005659991927994582898311748615929011192757265392753842586439299147848265650100032930543974267368088406064923145764607662425183053114412152181152168225619589457287245808806186365834214220785238104071007144153501291685368499213625365056757532524581726988965148229563592955282887948099041294847151735359908111038742749556276742398260673814853991175947394067915166580263080251441878668468901285826324382840636020197117612112107944871598254202770848134309132616559595478270914812383264257502079455427991118601060938222679281329924089705910877516019800545452833348991632458246090420432588424670868480364172733709813460163700439135056898704305023225122833102406067875512129866091190618490614381053808076416962950763565751637147882331303625688265770342027337776737394713838989013855245730750652859943667544254169730398024683921422593422633487040872407334198073461273187426937114948231182896237468940689005359315987828586347459419451850510840992479630016059097469582441844327393009066271196540360111368964461579943939423044058670758511216789901097688705903084629924562948673653287289615241204349734279794205284282087316960406950533974643210850574823090776048122131517686096275486938446328559940285717865649908282739379756999087421517543686493714199791432710164625465466218441645165899638725044848855639339338883399852802127566619393504729778645601049725996468135256552090287895488489087447893063831232714332117949237203267149133622193665425943599400826213239701954276430339670739337041809888375667858330228693718159817019051910380205012158181510639814667622457482998148384496499260344690188146699571979968660554018638191947056890480425298590894411204843711571966814635902679977041146446450726269082349198283380658470155808878681284964205483163982201498028779003614883012255906135764267584896043757538331536704725628812523577677377407547901079962591351307416637231542179489270579972242857446427166874282855089777111530174035647972458325313422412552631066272914459089060123134451046810809982608357135871574109984915410230499243924302865236451743697545072975027489064240148664165223930213680267819444141658711952734554652551680797020464229220046323879865530749833775440111134138188537232733407541987136182065943343750405978060213072982187572756391251156859814808282085344303638791173232195266123263579965459474732068095629063000511104266321799276285705134783102093896293186902336035784639994024772005207578449172232665085973359598747260188886599513454688477679222217036905727253835082481482567643273110238305205061702449136606023442139196614727852130675390256850218405451370250247726047457155450799678109803796317178155979440549432227941635643760520572321703550566234884519550982589994265703099268468191545217989395543749655761981164309650921869539510169280436488497560142954285864604049338047949703911640833128508053635853004193521892570704716263455618399430923247583288498969435187488181992206403765481216478445069334824467086123683719189210243825687159591253322050000197684240822872093575488160509954496225645524603669824978308823029834150639977065152061210815954316042388365758641660337113597679676902476993740949119269044740621623701276321497071431491737363625167797010168751691070395398822692146670090623381624774197832380009995468675121318595011279463538579319510465817804397910806303454950984167704124604128459499725039295584892591320249848942240199025980422838835214616177805879072681210189136486626302246696423284854828355355204745498448497014853080023377215565606671651912521279001738798831855288028720210669476993350561114922173520517990699939363929656624308097919303567035669005457618527498588103076607445430246882977807329357439037926979509871308318439470511762259587437241273213490583898862207694258506257320625270839843307194892705965179711078782036049426343481742225106713625043500227677852453694978608813118694097353111769481014194756759078026860194879530252271215822323594623959501150757878620943623322676841084904625460436162186023422448900425261942406600554041256153498371204704131882864477900978353021416911357306499793706958853204428846552470341336405920150112262733375081765991151255277634645971658396705784354700430144476316005840571278136662318589814709974896276874920223965331193270529516755161009271061704542981993695300048463901868577756992628105935251237808032108310651979115772825462262768463802598717026360160587094560012940294356434762360324446321385708856354704852374591083821194866128585886255953409561268230648528323898718813852465063234381605960028332198681486098473307253881005479593103318482385484407394856022578507308048373409580453378970857069104251872170691861749529888604927841362298700684206416586236051747311894782691331798153147317749082988300984745635654806405619305349723139405602213836125404123574205211750040334023425420786437514714962974951917592383416025104662253570352690625493021510257403664412696835297583055532831199922866762053505085538342575336493825033490574970152471493742583990997125356657715607022591224889013163239345432581660929494995874597905498188996927405594440665556515060831881146652700759661198288741085512103518421804795523558622484522872871491490907372143859356802766784715484538580141112335063605556674904873262945797728528844282871236728842913371116524570250507296001020351702873467407181256636533266082842218000090110626632628911724974223091087275226314672439618456890846063654928883449135737188965840132231601407753341959096413493340964917491779762867203372271750041992355879025121418881215702142666708247570728714601700328935465219644061386003565907406504078439432805570634191009618348281078672607237446554634463611857240877185704745855995496882065272645469527941089346480093087155181645771057658209525031681759954743891562566605975412710843057987491352234229674741675565722971978156386548545883234110444548074300122706142710047073638523319182291769084367576027878201649493025148653901818136376320777933804351720362915657310596521805562583909539879790556971021597764264169851716487776984266959633995293335745431447904651039332741579399877724289031202072066125579547391712060771379021265833982350298935415449057816295420680145570924348479157227894233829258022862116928061034169040627359361395532331662857101033871912386359917264811456163586186514596114401880422236602978544256370840486335078533598616435915899714135054251019497171108125305064738917646555572430858824200831417245768120939909807972957506001539498719685762187637732906918165105615587282492543601074167203106039620168145276265010599792243289102420130947777578316524268708554030083568121572886042886488438249663417527431311162545396724847012116018343951669436751834154008088509867746435399333223868031286804464544341619174566261523783074409217831264179866855717472278788715202585021778193825567542317089702711440048933789676160835065149529360806359676251096618861130826747052898285669377873065420957519287113905661593337917613515278714528696703909619829857044307451171618634066796940580045645897334936715121627388452546154044509766403960763378416092067507971267911128434778252691111059132451044889911570501234945488190536303592756487218446673475926042130873582246273252336655669964286601367340968637701469076621542186016548226613816978036641171035728055909253141967080987431792227233159115862483519533759950490349731923102252215086536427833831206150089039260849087030053947066621952649282676583967572538293189482328024634340872133289018846693059301128832001672788158791147311178832763207616805290473990934285253606158936587270419445265353286641678405093839151839426972329133463864836618262424439115058942868014412299821231033723969369521522063152570240034361577887101349977798562201286889260755885235959453067333478679813268218756386676978103878374948080914712945448668182194093818634140233450042173405086845433000622227274097223085913719717148439528192801660110231237597272559795202772127191451211721752079464995975799014516683969063889483670556510048610543681674950884599322831729789978412203215861146474660099563854437369381322415488699426687275067231094949356181507703211015950665088031378277983301010044354299145239070674225013704977888181694811733140216293642537500321017721081216073037234818627169347479170306479079886647210837258814752288378473803632388045826131403640450135467658541324806627086056479046160921431484707822291649877611264898931654935602955997352457009315139656129052063352945098910872909849725562863141803977648695561248331628347159204961395501477125306606308935485380959875717340432871091178007034030737018089796637674427570519518942339677111427357734183644008912 +1129754979280281121938327293473342107669038181615008673969939516104316148740545455125529269644110 +-225797379291963378499104241252518490639825510546666754060072453009799521996793229163000396631646431158231138939016618578579059216772493815448670084282550550760357620120699383259409373986552095336287978798235934481699094781823265440320763344852738598678238107070959372958244445658474161730956322129713436661464015700026664694050253218325979310122014775505336523036904484298891358445826075939835501762729731604036566363810871957495137099659207601408028835919037058892762667222064174795021365294893077175880804585028731528907668580442992477630520749101342785252491913379568729142763250056291749731868564349894260145438434120606867978967916672771114540278515925789911715634652338727577208585060996681163522501022519282489139024437186727172037995802599035712005803846829757296642268215038061157374762871307682777462060269563194539507767623876169388680326097526993909621031987903307935553922053539757015178916641500638921163919509249997109666479868685202673495460356375709668931922522672876734760870625217603871508091610925629010370141199396412113204594400890776225097720010627235503440110938452773735209661667566047840882232950980954151155629661394228754176449686753248236033694757638339611831035944457725735205358678457284013634620558837566066543827440080539310935128192075852755823215141871009324401705216722930068354642282948825575215007568694108356906929590554653774927587767536554784795196945103705897467865017787365096928426068858763649778617048937348063431623596129248397330991301851864428496594383745981973758003702025836534319317056765390578473748591595523302603200420392403500010475185470467655636867348865985062320920375758156853558601423159665659284930671346639985643121609790487740042859455037695089253091004444776693700739480610008103271012059502335915596905285629858485854409904751621166919369609146306138700704812649907980653254344874585868304011778034421259990640126311282560597134651806149896664573707438252899650589160720680109979854873645687121353706123061053979959133568307534937917271888874850084361784957590252878825094723010705454876831816610744303800604285007721481671314421224695174543144528580043774462372846326971502270363136424818022470924479204538240372800563148640361517049830647478365272354193123197637964500583805902001878762827886543502897164012035535986219264472064314601692784199803100284205352245223595613317718339696293321595440224602725411723305908298391277023802662925237190168271030929607746851181565196225039696113234032982547289529666131683497998686792717902712587302904165880389216143973821603909859965570393869291015621227984430683759280930146065172166786776252424605969439288606947431109789566675403222233314902041586172557489816114548212737774430788111666960682788422543784854520707348998307067718927760118575864378167254946284172627650933826775018277958808376878420639449319064297489397056847469996477073252229650554212055298820495298341503298963897426594045841490656402773719573789052820452222494800950486317399320865023749294646182651963633885158305829430808690782568669405843477604959815328045076371863498743574022943567270083853715249367630023186036037564075800879674443086344272851913062353504116706485077446347863396855310756949996262116135936563736977484068791574685300428418836293905708913480309226422980029910520699099378426323243480969251617993746955353821434104648664552377938665636736200334854400083818403408059053612940272732602714332652433903237678827644905898510967024339001657813628287738752261779272397138664644240722538876866952632128096260633461633480134101655121965776630383776912325031444097338898672106396852451872168543196734651175244764315375969730554589986186701982829889744885303602236786622084157990469013920625172734037806222241726719660853508345902597422516397031964095281949388399037362763396874473574124988506883327701671215979258413078784140249093424360531107653135885488540910023782186593743750351226472253237411620120873299947847421778091617877937240004579765300811005440625477771895181127431377503796667197528790615268928869375239748289746920269222938001000357595234051193657527609740364766807070696986635860328514851645921971831337393343149302653533000192930292315442630252256065928779022780228293310033889249728182076039177915033422307009398429529528156984577163604463795186943218461303551219185541308751121487709449155112943400899309166599095190937751215105754604702687799430473630750521432543694210302117601300911859234748760204087662515353730871537975830803826678014578199851232983564452872615107926613690431055306398 diff --git a/testcases/bigint-testcases/BigIntegerTest12.in b/testcases/bigint-testcases/BigIntegerTest12.in new file mode 100644 index 0000000..2406efd --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest12.in @@ -0,0 +1,7 @@ +a = -629526331197277938750699965053356101081958100286999783726864679227778190550183575976659564151832898697012383482836818019079067868720565552652034797751210278634434276167433698059224892215842986804263889816775984992363907853270929986926372201652406183302645285976568194814128628187556173625019877129307270302529176535092792486723836219438959849133916747888001268144230638131324180008742927035635309400392189891900635940748350228909758153886120865471027744104144518238883078084248594127731373037826478739205510070214093508653210583285080407643499893435345070818079493913254803057087250778062768900827628944655347637830611207917483756364996867986527156952681418710810355806896696929278001916321720488459884972986211793442073576182739599403176432517530334914157644559753077684438379921290329276954500301580563379514370955910771170565292912212869242008580224487064538299384533939746554715745431685214072893404441851282859888516139830750718088624402672939606057793043855691101099092957530251578752146049191974545492656436693711100632646930878912232282759417913110976731510884248880849618403796478233813320137637425466638362938925489543357677228006992776151825647780619730886651332892626913083515107611506107595673301822052984928006542835513174592758559230907932232615372607027412136678819585426325075735132990298619753251056263921019230512119371784024748918529578667169263634450801523240092060297519527066160455787331415451080932123025993937772946616760389786198681576046617946612162569829825410757186562519067775478000847613495918678775633702003057701226264714897756282869697967901264224725753495467424048411484169142183244555092697830364605082532894419747328681781414995186762873018233756623822794288261006103718952866958184785496598294017470251560844657313000172244034170264282658449360609721897154736468009651466120440677002225703641595541706230768499186239701358528567128746796515165680349660885409948564730434900493898844588616299842684127817788242088796200917294984953632491902191238041338894797474538988120375014129809274926264577920961223228252014162902867365422027775621407025253396040556521601955210513204754764650010620192358000442545429652310993632811960539179984540820851774914073679766816106191134197748861691832597102916687125433683127999583690053378106446206375315988467625786331142764225299216027822021665896575099176410171374965040669672484175892947024796928028967293378147221703878982723179720223783951029933407537113265748838549201012244537300939400466443926872984288880490686406788331789093957632495471062216039575225359536938208141456609688843781724568073047650376306807350587526589571653828038919463085416142655642605837944156416715420518525085895469487068783549632775093749408095209064066582789195896382554088507269595978703323079088757673804192996504129461293809707283314477569737444199810468977173878136158108707512947991258081833578983698909536677814484591895590915994414766744704451387920362205469759824914890531085886728422778520417142140720498808807451822450217172277808649236165633539020169525934322415885616852433607093911713555395427416938176712951511962509769504684112090381789484057391620515033287952098064802091457432425586420069965835302961404686647727225450300991747209931527792412955772110941347697575126502047138848131656534578759458182559678902281092352740473267964634777061456843275760362837797372286320316814402732899819301153040751363874877518566140521323099063795948017445482664749278587371434211143130997065191445013419719692297119484626769923512496741598271598588927670715837487821036365299469404162201593793097651120764023741435374240373256171750712978532535676043048022624512492767006170165476940938909750121514120916336869334278737860190631729742240468965652537458625621813971956272129999992369122321444854423749062532980368562665528661623530835778243885243593859619947071529682872398230211117279798719992673564107745918251420197837333910779405584447657258106834004187300210678219529169880352336262463599850971693139152981674052267733008023312306570969933031690613230459869805734304946914631722966233151323187718453260852549172921409757420005948139045130109057025520045381232085613404413149189517460485295426076318393954512662258422969368547276737512884737784216061897171396826086113219821360605401652677197661975811985299164539596566864912355266558819579357561650136639686644457651531322666316339354289490180664759445333008341303869352787981629562555159963166144905785469327928780453272144618793586615106677647815686554612009599625421994972788596007687847751492817955580913067612815256781117137634147041408696726522146688250164896441968521113732407399209340634958894624248714531486776025536609702477455238759623249212118729674955297972796412054559283024572561767430007727939628240689172469898244064848961588175 +b = -963822197278926137773893675056084619436336477537198360236751707558361908265142188273158959631349235941161413797440315668789839246899658425471033238191660118366980527409960067183933756668374818933419975657280806401206554448538692615920388676191773875342463514730696477038913813165259156757888041655809376510923007712825102857185174183996042804472128671328426440092663832388189477107976352683196754359571330372873766087026735122778648097748915669842310943381604583712615514133422300576819132169507462721756406787118173066808735591877728238494432438694800247719666110422344755419848164518698886875334985662749205808009317375028860178222822960576108543436746607613126151612188494844070447871832018936924862990298270159103141408082322122658468807737290104003000206134204656558897249582754648983326632421872035277511562055058446237053931146464172367862164719489971077222862587207842294598958943417298892187133470660139776619117930482909861465927497544078604379507807606306385997895021288859451676962262423077877894878684998256699392005449960624869492057718477388274328701223076108526406424592194913711565690500215670588495824832727262333245905397616995040831115971086549471650384127033450374236097374945146722410176340598847932291235151034828506335457290925416482416553421785643541144896828175098830695461772213392816863740702825038980460717243006834727712722531772652713858111143963804083801741271915787593066335177681438788902887685633063668534903249906508756496095691169417781383914546391508903512630048726235828341138344602806592743639690532596314142323620737971953607338026746546712120178563105993715779375423282123990515110176610011175622908746569020124189976845150648948657847549885318523457583994232980358093335999598279607638729647991291140377070475448005378741150470825099694417960688020639422972718858285799276188838743110602677371226638861047118152943723244781990247646870266863400742463319504143323341566012832065239815750035116283978035762126091734335876397577468729019025928879454174599686232943391656055820253525316453796686073355620221126725181394972377133481717466051214657805334049698268046105736898350851625503032864759710962532528933880744041534395463432543196462037271307442474224953977523971758091479715875086797463381835617727147672082588367927740739226117653710427068087228609724076196366907502734368994303692995756278090593392431542893297816950504735530020345800447459833120997124991541999753620396479009022509036183391548965717551042927273366816966927272659377718535673839417890429556889603240109612843184945898041531212760402409745825635351681072318769227922174905031899518155191673299506034245560143514028925140466337367652717475139831735486666370447657541137937927233432029772699550657013199615435823058043614559454727283478585569117931250569269641649622986381994683384842135585506457508992466258129260853541834936809765100003273342145527802857655335352929698344080042194745554017404753239322860428280448241860883303521625391571236354122043601317926695571265582318231586348326226699915114385672478593387108288401024827432747970627746153226277721988439560504929709926511243050246520804097556537039635857712776056167703134920465018986247654381169218839322611423792829408068918720563103393228637719867433739222580741800281115326119473080483872151868413105844686088777019627928833756087863191900179580342888995075027046089641323208866303738648647874509950517094591730080578391011884821991760502095210398941109913916238913516143589983190335178030742267454757163209710675625503786039458069918019498377646944358629136071357292886095956791958117282187205506268247753322564717464201706070586680146799864596682035586712379166173540323203583548046305261099884265491637043249563276677125704577498808250088124284929710438299810694879625241502037294973979878968066163569862993217937088263711486654796676580462252068245659960313904106987262811308770265645140780834799817732801375184758314305777538671039718793519079097301359871651478071339516032397389698915376531428274656181445678232250888865084399408991158215053861267555812906345186545652803882318736411262179185449101661368716791783120853830249662704454366828382473558169518241542438521009209932116565377673568645459602517759968683723827452251660841076522585744639794708117388578570398361180205676908400620782029575633484334176071465895032451674053530875594218961227272640201730680711921163607149674405735033735370418795541586583878302410044180495760777064878418842600716116562584976462594852698838342932252461617738248546697722255372424227385818986589244788583979430176308564644236289782036008354684571155726548741603339865561795987491288399339760789880306386732501135559991870110976583628371317499579490026490816539420719074765584975582171306890367007116817118114729934411876684 +print(a + b) +print(a - b) +print(a * b) +print(a // b) +print(a % b) diff --git a/testcases/bigint-testcases/BigIntegerTest12.out b/testcases/bigint-testcases/BigIntegerTest12.out new file mode 100644 index 0000000..49bf3c6 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest12.out @@ -0,0 +1,5 @@ +-629526331198241760947978891191129994757014184906436120204401877588014942257741937884924706340106057656643732718777979432876508184389355391898934456176681311872625936285800678586634852283026920560932264635709404968021188659672136541374910894268326571978837059851910658328859324664595087438185136286065158344184985911603715494436661322296145023317912790692473396815559064571416843841131116512743285753075386646260207271121223994996784889008899513568776659773986829182264682667961209641864795338403297871375017532935849915440328756351889143235377621673839503256774294160974469167509595533482617065346327831530682623493360413725493073740025728164749979913257527254247102414509823080890190411165790936331716991923136656432371846341842740811258754640188803721894934663756077890572584577849226526537254950563890011936242991188282732620351358449923173155044396854926703018874505016969417302953273979813031836821740743469993359176279607369836019107312534405533555337122460070608906699263916249473773434908643651507755079514571605979317645187578304237732720042782603034449988272523209550841479905004640237912332551137032328863154596078039182509955269326022057223264775660562002622419442098563467642141061880343693048246968775395104347141683445465827909594059414267689906298023509828690100605228967469972563308089129315215023269656737882971214944410764485466161536413394881986166223454237098203204261323610867901727703119008517416109804464782840660632249824058321101931482555374442707853739247606794671732954027971288108049573849324259817120236508595801340916797311211898606490435939854871562752500042179544226974590162857962619978374821820879715259142905595370237428350435119376739718168882705281670344173579529561302947099938542878832597892297077890290492648604140549314509618269661399599831434821591572697156030290889093159535288024979830434284816833445870412878562405646720072470041297155927996531152273349307193754404637222186154629131907923943567823358372774236679421076687968368299768706770357920726353993162720061247073200930982084831446277677024938087518523088492147209170593784158735113506607736259760544562903022810755747518543209625945578294412021956165340894419924026075216315207457270141804087413633608422702839215804355194396403000520480591381419307780525778528794743243729206851903984853191293386444637546097862263482601910779165678658036425950574769285378567690225845917798113677242049679430183012841220908942571933161157509744757861058237195636086266656951509371200239801255807763345784506867462933375522925027951819279684838202721884106182987822449246191470393708399331448625576578509701494603553346194111136384922176901202749351973081557181757886177803370609318804270216003222751290546033136297498612561895447039567288122705419036746937638543484957282778565622060711863079348932937463951732127584652604562680335645150574965642208844799916770388748798912810019960012394753246251347344465088784493582665916222874513064237750959366334970283661823938767532291735162929495423768143867849074231554397219887346396225849436801558095445820715382312738382828175387565922866177789684498209065189041800308300727107638141319130844489137700659804233488593289554990430854289209059067816946064772912415540039339596711133518875504169985417442560241269719589931937649904878931263043551054149505458585159356741654404990290599363623554737976952629209311889429778989460624361907055102523525393076091038417690793876526408457367486741039089466644610084240910981430358529563309675487454662657512190967253904807982274214431456755295557739055863677116348520830729864454944006859980533393491522560461678018960731855100393507249728695099172913806034762158976525622129287687661239540452882325043121290515995233877512215215814135751326391470764522218124277298832759744665118628687774482405857639508540591596999348106878461530947883658558184479548978692463185525458680306577671095008729560190463482474691614205402180458633291592318493077749349259247963399431433563823471502449764478669014071441966648384554740581227151378709922864119324954205143296105129685584233788964229532904998913656431491657821019599191397240706498825848808640899211481748317858779977571991018654813667618756914963722594374988347042115922197115402497752899785724623648486927189742407105245196360794586240546210346479370216504967485694384842192303913533633116031672138318511182406916885277566626929691911345471366496615490978275087821716999981350701549750023208195513508424541230337023037636187331223240232792149149464708437968354247434406334256234545473748190379808298886599404501569701117064323349973340962811928724258519581013124247662474010739074902430946385912648054292276656331923342203613015230629734225795747100992454877462822902871098703743647327352405589899246518607696289287016358794783373464859 +-629526331196314116553421038915582207406902015667563447249327480867541438842625214068394421963559739737381034246895656605281627553051775713405135139325739245396242616049066717531814932148659053047595514997842565016706627046869723432477833509036485794626453512101225731299397931710517259811854617972549382260873367158581869479011011116581774674949920705083529139472902211691231516176354737558527333047708993137541064610375476462822731418763342217373278828434302207295501473500535978613597950737249659607036002607492337101866092410218271672051622165196850638379384693665535136946664906022642920736308930057780012652167862002109474438989968007808304333992105310167373609199283570777665813421477650040588052954049286930451775306023636457995094110394871866106420354455750077478304175264731432027371745652597236747092498920633259608510234465975815310862116052119202373579894562862523692128537589390615113949987142959095726417856000054131600158141492811473678560248965251311593291486651144253683730857189740297583230233358815816221947648674179520226832798793043618919013033495974552148395327687951827388727942723713900947862723254901047532844500744659530246428030785578899770680246343155262699388074161131871498298356675330574751665943987580883357607524402401596775324447190544995583257033941885180178906957891467924291478842871104155489809294332803564031675522743939456541102678148809381980916333715443264419183871543822384745754441587205034885260983696721251295431669537861450516471400412044026842640171010164262847952121377667577540431030895410314061535732118583613959248959995947656886699006948755303869848378175426403869131810573839849494905922883244124419935212394870996786027867584807965975244402942482646134958633977826692160598695737862612831196666021859795173558722258903917298889784622202736775779989012043147721818716426427452756798595628091127959600840311410414185023551733175432702790618546547822267115396350575503022603467777444312067753125804818165155168893219296615504613769312319868868595084813520688781186417618870444324395644769431565940807282646238696846380649029891771678574505306944149876463506486718544273721841506374939512564892600031100283026658435943006425388342370877217729544798748659972794884167860839011436971250346885664617748072326230434363618007388247728399668677432337157211987418097945469529667596442041177071272044913394393582500515481903630212016788642617201358078535263346599226658959487933653916716786739816040164828852988335221849423516653506167321953218027029069796115254539742065914172612799465612516351992310099925396928441371978742437695969303988038122665351684539754309883727789785910108410082462323915231276249083150872368420329655333296883262327436208270157281830634553016496345725540888891833772920659708519634030390325607427386198210724540065633691491187742760814968333391667420627165642449383687137716246896769218598906263335668956789037935580641485068400624409193174808188065006585592030102805438486561895216895516749149262454685408221132290476706543066917934047190693942826019208030213138259046498805510688727962679446310430559725234240521329944179182380455278241007145099710935731415058428944378681376257883285149500816316713750305478508386127689567954380523458873692392668717712709977707692762824558106331375419252639985102075806750412679246895787179187615149132623087187897170937617791943431321739375686810177977944174447625226229644056190004228507333715369626433597842757518085276223812202021083148952531497276129709106784306596027656057739578388560922963423884676379417903016866921822459803572457721740358234668066949477256958186050665482465225209970958578846316553925812620206305568794905352197370955340580593133285786232432599090747464250603425716089260781499917236473148022041875707439411883145043728869437291478331267691548782655464672208380892025656771356235584874886195817767959049034138759678769457120483106942649932192193129944605766714855882922075689881522672007179810376361273238961103728199493621799636949276662568817631491884031914788487353458362341594785406325313788699577861698677338416842531907608048666854184998495240820499037383761392265242399191550982422908950046320807043902315777184533879872945302730141857591694978631277910366977815532338069719145165245036697235615965606944559809083405413624118958862688166244130325690925335245181490184241607234970404120655728447355112081649288449984047524169401191629463617754246259143759618376582266603375425147433019676207266199950985898990115062839223959759310761282489742511170857759141150029237445531353527248626226011992533158203970732844052490232364652241810211870812794564990804059343778838971403335849374770696895719149877201341895246889512272628490358357455718482769921238019862305497796182454425556632737873682055652780129334914549711491 +606751451779501411534156841971439565593091103121722183701720009137786609919072946318492436340333121894961451999541612436447312437279341990850391295254845906403455371968745436314270500533637950452261125126731006282354130611566910335299643182255438543254274102498395603946700727941205223968459381843023798358864341331168419484791608239167487247015819334378836950615951958080239553158115007193172677458574412089154109164507677053297769097644934014737156824960169518298390256948607401707212564638451836580448229822342153498649974150476387627955895460679246817885255791671005096699527974149959232362757890200889724363180741020684420252035760055288682914528121464588929985397376072285181596514207864510161031329712125267735571826003899521267376709564154154578204026698149476882025438777886550492605972081316546265340558418293551647387567525750927351232507928176348719381091087140315166957435746679127188997764706662366469851520054949008409695159140689631740494808677409478808789153993224788785885947969360614264375967045030727954085982825520873465839122380583367181228041598806561625161033079396628826124857214927745221739560682873554861388253060205906705620516394875000016710218493221543576711093645671013640859145281612710620125327345218945993016322847667771625423120648352099037743438315794456184364488844767832898127745984979286020007123377029783165451162040469329923075531602046073156856151892881715525051392381998335701625762388511774544274449616953130111906133011902006870296869179014708859091778742222304702889902302150191276819037831033304430383290226201074151201955555376054900367640801375840835260653435711260814230625888937794993886340653336519569116389404853110354366527056626422734134072864592249291479979680543023951013321085843181452512949580122442436751612727886237202134115997057620583740458957697367642811860526488412186961113738768604876532949470274571211755300966429321843056391079006757740491450952622224859933127819474409646131858536046999958798404174292021729000625561416033408979405799592836487758758961084148339002016546327581002148790670583796650030409665458280341475903566942271124402351144734797394723055196727796163269402973583143960235106600287499634206200447740480550079731940295921341558630879472769534639541115069690301544353869987157368170928532183209944983862629003147723746139760346181439509392569986154448158684942315362960164731851378098507680205048352520824196903163387298507192465003988451539215048700069173320382335547997421160949385377613505266510302526893211065050954755921339732218617456846924241195514431243906136256086658866726481475120223650356578709863855612364575027203372833132455066228561691421570934018255471655096808848629847993373445106212355338300836326844381193974107067096379773590122746274445811854486933352416983624862987089832286692037239667527921882414264562255980457273420429801424738945218566988563621861094450879341300178693955499528504343004034728892043710861881833067723125662910832935807189905963156011802606335915964678280886012389233536334607929709936052111266783529922398637072047147346611513770008665946570023281253407306798478110432190466229744183596612041818113972608329602064663263071612601998925250794732106448259010612338013628649550543065307847885283040701979810412359957633823637032037741584523550438266690445898403610580126508821406725337642743973898222917022100048871749890570076716104094221953502763337031895297718322965524997501561103838773663349048107953240860759303125563975076078520456404063619030751246902556876293205880119865112573126264753080639700589170304816660800362175943027803377494577394198027810671529062518012862697664793752606864737135466323175805808438920282070362359337192012378855714499586936118733755060485041898021880223950083270754992618355378215649898959273929779665254735553645366790808958389414686274424435233371805973263271989628720005632852611347302202087960181857635713402596368807048509708319306450373836003333548903253440675448495834931681435795412221351470330087800326891803794777399701304011376647549930547772534183122677650177328000883170495423285102541188485070842555103517337710696198304564849181413155480331250751828108671963446998306472363181898776623695727744474496086528313276075640468867722777621043036743452462774290178212112494155077568899726258160613563328820910266876160255597766300464650557654650289515840116733867918612567941502320391645994698125981061562264500735095347264291929203549517600742026174180725616639152836212577344265613243973798708860694491720911006075908724063304288811085320470233132119665926083207166863556736954618802996777612474653918840621583623799391774278353604161782042087341891600356171612069898833461972066065187469049395241815547671813462054195883424256232675326354581187338088969832653702934582925272807724308292284588329589811992153839152845579802149191790326843780938851721946007718670458053856545090322891901200298685452425519544214302410267721021156239845578539496769672829961203656208591295675901362262200540315161006627019378496606833474389118412720580801161313717384348311894975392353763901706175733356255244028856473410594494101398517164274265314199144892627820622798806010616967890871445642406781001585529733289529061442364988869474743336673783286605378479948164272140392363054844951881874597288570422213662655622003850078907975807357491248817973452888487917757825923781186660638358987780479820643498862241594194957820520992313478339451186992648694702983816716903833294496075196006092737120193691245270930161497710865437426715390895205597785473479895142658890463855974411929938234091408808311632322572387710292166299266952150166188630403217053463873194203376216947865610691729752457480665814464269661028304495402727130451195311544591347297854129852307363984738578872355600510988130469686901932695598544807303748704185617423470038482256363536880825828285155986846402750037791471725686305652592912253232462877703450566857277305234660783258437140798476733606760688880729922810026077122133456350565686582720839863355854261890598800536857452142244761602064022711526567352129973031115142414269804506296562450946334832914134861716139931030691483151235946487059023155328385249467402428959584598031354953623348526473157512769932014044136695560795670819697523415243240276133947325280598503938474761038241699284184214082580750313369226376064480443824631488945555143452608499554180458065665170322436284374614943709124192875064772451029218142055937506046814613793750353317144884924376611680326177914186006270164916496758890771200018154995890933511207135096857559529240451268745030636422553407189341047181019299012533019334934957851575071696536869338178718834550506959765240899293615840690479895675058263123689702458899718701122191093878989370333849540804009248779528844128290043687381737139231192994533163527838084382673570766436079707139056644122629305694775546596048352081830542022106309625806187696029060284700212474930022847091678560356170978506211065052565538613543407908635217846313753040951450515495655879559796522840069863724061693513123181880940718754000465910715871856244833249744720122947881910455281440602381200146569990817415207790942693791522167562609170744142372238058081711039859053450456134232116591083773391625901833630544035972206295841060223333981958832870816873058166129109569664584171633172813304730409796867877170766263756740804969424290028312806284145749079721598854008529321117795051274799865190972865845837170281754962158221826588198324080483837374699143100702330106177035509250185965026306198889784417806974659334468967957157874041068612796403524276337695753697726907489334440269723747225110799025109317677792807525983301260347814199626745741806224599256214566299831767105008551991130186346979049174518377609812965309192433290007067842207479473397538588966587285885881845950757403142280237699597708365079186792775406055781024867473760536207829023671474347809777449332597881816431688960061112468296456781132015548682079251020189189212597601232953620034130258997208460134957565838157710681461444952718287314349752616400969096692263993274835594654345708259415910691623094290980769926405038577761337263919249168926387818371814829376233241623294893569901126930955646448615548157823458302999360553366631139182831175312533069446422930613444924425639975225774936991507873492514696052035704001705752779791530967035639328284143809845948269617297481127058409830897281268664180198529956599772722128321471755228159795914638738134500191727081727055528756655831841720683585112441422333755534882166426211552062248603359919947573261733284575496617105066895365460304970450285518013641315034192496753039939245573986608991948790707918739680475110612074329202358216593300449449174345039754448025774019961959558205896858625408616815036982361910584435875460093645156380682553059317615517354337217885636707576002457126645961957685430736518500898093315667127261140233687870312516135906979281010183037410370308220441383132428199740088126225722693603630271782406035164042363736316306230774017132425732425783438787788092382205293511327151409335464211427761133146536036363639550035371173267488530178651083721365464595691755448996332414776372247767268193193658976295693591746225010104661847851848852675660249152852458342134407934904491041455839954487026277329054588256813807753300404242972000606279052855588944497471554934047136519156631033909053406153747616062621087506199961170861008833262988347236072248804542852227936504719861147289457042405552012336544457453184183565289768449252153013572087373347857244587165471741454900130098045482524190230892611700 +653156083118 +-390264877071948337929612077756913655298111611215574767460331159431273670827745826432950508141366135101499182470813867098713730299267603725557630347925024379766343156574591251147976807008832088367545924711373120394799019043221965394825938271602215834242989271270059115349841163654163991427194830596991674516244530339297306599532689753033251323420664762917852401951473457272566161710767787964189172026060445888626401567977541837157513525130651615588202767276190309742714230383716602467034752592695931818116729340375112028106016608414652326968680784086265931030025901629522046747740279667251745023389052705989158394691980148890420823879567990719838093146799536666638689021010016699920116760039162374192821791283062310414854069611388804462518235895177400589367562232644110395042946199896179297278664636200934071001767808161128864267243096121292996465834817392501319528589403231961562275338708975771878628789621581595800411098734483196762077660266965803454856494625277645632266915245208181231017362996961999448463208199461879139721345197587064302440516620515122536393849304900637689373499071899615149537102537251986448767154519074806373685299807165593608027295174235613113624900114226988720493732360055410843766730047886413020986861161641499005711797487339054768501031939663499841255659615543351261417371726818689346228332778729162276756801262509682678599111782394088717935607917219559894506960222518951614105948801639260766369785012047492009762239594417346914012713125310587294309100834430084799157799277593476829791009189490600627705425377980749189370765040590651768874653304716527898363808743904767022797835042623551681548486186467413720783223122538216301474082931813844920756065918921496921400767525194586029269966581607487790920923020394463677111064589804317153474799312715790120289506617332934217154865639540829344594143333551986494957325882882881392521914464815010565744355444388895122450303389031853717220330263605209742204821035024155190151688918526088148912886994519834752967330169793447026144722506807715676838364639665621611725691474050677007216881465194173035713891762195827573477703770322608968761649187048015624363118888100058877081630468416332414912507237291094563981953589228578360825747396208718247383700297668375897024393844538218081903654810687387123244290943144283829138092920867832895185309247980471439300832971230729511525753753135891545107697068716612279058387525038315657705582345887410729343805465081778533189153621264835795325651260633373430626119318460642615281361962950081122892023985818405468402531989423990416718050616861844426806440582247552110048644238408467975131239205254851049780623138557377735313281429107760767522050199406237031937961824884604646203928582443268226615830978739828007412993546314336516753327373517937355155472562583438583780601812958025693952404129112107955354405672163463638583314102870421785398564431526622539838451521276999557803763748530228734942536774027787893457360855901824740553602152855393409759706430375668706473591995178267509535806606949952874293163385948459790483907119590866173496913438323270761068118586146232509839176104952893473091345931788027668644011398885689298912093165168159876944791383462250446916653289804693322689794211027216741283835175297796380553642808276629730419022298823871955298308929342428773752879114200161859796932947363509282025271433964814462354990617752282037341882810351242139604057063904600537418666522601098752525847100622106893908090094362310568895151129840933336170295483711613925604819028014784083576964527666038559526002622535976203802225622406736790188831338202376713752082356598380871713550219956285529189637619690545408987473332317918133312766829720973146963702522038448554567975142728110440504989103500947873468919999865734166545757492983013180553567930619683088139725461262714037651056774775951778948221209551116145649700525635726866445538480213606243928166908458091402732802540259286953112660831488348222382899125222574096934513439840508463704438696105990665384057900307435131100670103988155898166561995730794095496617996106351605379338311569644323731162546079982068754439114570664546231725223235842689299170996616359472294982452953575120273379806728915999177819959303877731875465336125340487056085932603673851473082988146015027797926846212052586408302180395399646459201713993989501797154513643381211213430083460654051670558444290441510963881714304715897789432353525217512642399587949949795434588431844148776696783837150013923677712685771336970588365131273705922962066446761853955825836538210785249037721725771155609250561677863390960967220189281345965390067702981450418571755915124033438121780898824649451415799882816261406758267087845957419099074936396220357164610183310843742990364547895321084867808488925711541554222701397397648987891367463 diff --git a/testcases/bigint-testcases/BigIntegerTest13.in b/testcases/bigint-testcases/BigIntegerTest13.in new file mode 100644 index 0000000..6c9a3f0 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest13.in @@ -0,0 +1,7 @@ +a = 49974897309132513220381000914249128238721977153999815848334851569872635031952524666393893213175225252520492775020879785376616024947838257664343449306447905152001993805959089968618596660214026302173361834668156358842295422078980730875825102326660941845828034803299887642336562434972721300030278318490026669665864410889557915046920890828256529369645998248413763390723679036121396910987054978497263776596307519213327906399700343956287925218818907114390001094475911424957360890780560294926662579468023289066858515542739642305034873757629719084367811820558075375745944067587879246465570260025202815018803160579692855388717125043895068926505951948592318566153332583032134039653504328258687467633255426200013704132941603564459131246477616720487963020560143583098196146992779502466213520341888507878454965897679801496633232588632393519469294048211681141610757575414467977113188011321360505177941175562550837430801284971361728192279060509238149640265516471384047299193777149085384712722550250882955859148364221976627042455225418593802932638227573965760259639666722819806872075626456431540773840414474583145174035963914595392095742886914396563969454208593960703328568057849554228105478876256452302136729882946448184836760095266038166462195501962668179173800177626367489955115424010735465459817453347612995233230849278841570366767272567230395632365154215827606477039911908077170024354396819008051334518686983942690147107189432006259832388245865159030558495269838092452451954101149524686222623405318619163891578226226788660410567923804819258186209014499249795914357618636729639863100802917961475077048575579804648685505342717578215410193501527542957175331991706492890724854736238177963320718232069775843831075894655566283958921989508636517107585369489529444711054726782019720118167104383924812326460996955920672291416057497400695720132410679221750006206730887447968726945181167317101292940168158549255804747410622583090469531400650038376668052063697076341757576747766491189088230170262212651566211632183528222160043608476080393049762078134030380569788962406794087069020059166407959260634437452918084924918892476971852662570833780455235162768348295866355388163269020136402340619392425712816377666343166197613512598467288053500295375685729606656078568547976776361043128994407837702789906995654135192098370316709235946096044410043635237744595565180204497279153527535654849772654563228409153562397346102663910602723239021326183103045418756349348714982543113129681942293564211388808024786332467813901728490180659891694697104046388904624521266506515191704452134949640403443847943562135559333461324158745394172345561758187014938663659562944108963100282896679084368050219361997690003148968982804022265603164330329496422058489859586049389758624567376996698729936124369249735477003210787740091105928997240868814626168133636733745210010338126299991676824900099391498557144155809402281454121342592074685138667224853600101381080776909337644184191943940313861054548381038464484187722755499820864487174744865705861356953540877081065585091165748053062542679217684644640590072646830622803404695536070577950565682653738550621977998050697712956943141423952128905113376728495055702360162176806841589227774214967199360983779773927332545603979018823193350549341479756591385871446162409113792971660546596035518411292359431187811620145046526340793378317035422631726607972491584496669223175483475526782625933356690599331815662181882705418268576881827648343979000702517333511060138187434720974049663531021966133998897171108733387313607741958817529087604203605237602809246714681626823692109349944121684475943992902743582423132623972566364192439220560657723115734840477161252894960054131762561710098033731760886610642832025917681896144226650716831970342610410762079596147783390641273720577980773863110450137808970255212762725293975963954011448708928729078853465042372896334191523716487110175831713945228181225230482484064892495249488538131678533907619156991450017283378767571751268611714939201196796027045916652040387084158060661174846907335479124988877924739426570015453021324086323822349773130662847087415976960423958624253722409028844153864161303937451345460570532873824627643015974602227731495733062106841163434578921346792996179139724992484494906734218887145806012199260822142636835100757175966343055423034335342628002930420364017173827490862364397854030983668133031518062398044949702498881825747366786520989016354176504552166658082979318155647960069409706121417219336087074366416269839226523277343176092199611103013254841639784262735754655879591198078242815502199982452937055451171652444266421527236971965563289400089786009157949462599616667119218850265996178373750185189037572668066585898932751544185706941674252731307388462003120050731533310513176628755338498006019487609396158421887411428371635869829695225694 +b = 65762148520577713483311549977802564877352057627773300555591542831143338975544546655926981171049006546627550951453641369294225346443613703899968852676773705409317609944550414625169873834133707309855804883264546364762162546836038558183050006977657906391022898257697695009647514940625590909249149240449778165702797675238126716403889284330139548775903811767942638401729071907358210640606526363713555545801637547290707527859661933472253533088259105647789686654586754289185154097511064483542214714545965092865100480328422545581313106052925728158592967920146777227994088747983321873628229268847184583709781260258187852497995648889213177648838414680829639021893266974950124448765488983091737367160211635769048255994590429312641622569696523126101841679367097529962247455708708308897175432102957723099720136248305821060729045119269758822720910252532691659098847618011135190927129435522501939709629660135379870750179455814888970358188219137470175824506453343356853538021491206602693597759961345450952681933871645099260482620752472516666113729273342880368290246650672637013297508188908387288099946604174149579276761274916392513564513014132927650520798249713145852984781917361941000595089405058640327885094476554135324271631992528412514069145620096982284280876841821650991041067937750445189286752770835767637216362539536240631969293529162229870161621090729285637190919032640039039284941004927150959297235063376539638887890418106521403170480756130809902475116776517902810991538870743692346157450870769090748459159767609016208338838654288182489465881223952404923760594360571619748621924539079616880238030081101506670513047776005414022166008982043370747795680238877217310179778367481281391553650518012871538054595290842239055373400418729192058001749514482580442561151955335981197111747388024965445958694376279578364044105844096945768401896000673828169811702125050640352372537758640500007116286756706332254339586814840873516029160675772430198856227516346428461372636762519957821886473631012556670247166266398281044013576950497771814406845050011985493237215416386286465990011193948242385064486263664825789755718603259729323396680388813706768421678923590911075016598127972535908778923098037516685045997121297412158484388938887006525640911305770513846252201876396363842450632190174775911801563094115476793657252800389900736150667091616710612519838977748951805627275415881488105054870563305928829433467880540442155138137919330555906076651992113706904266553705098454485134015320231271386247067631142175812268212365221765840000415616724623207077970379849007434994532239244385611556743704864134146748883939732155196441895580609007902345636124528811025212572806902862719171603858794034800531848195632037228956228711890518396130196705488455535789090355055763520084208120070850407393340609593958932556468974390254160489603795435815503048444804886955731238892236968093578634345688547037908286659152165342646482082635651337998030466851971052694017789514460362951467641943550252631028158151844145553962223020971895908758703943503952794794968696892221282165490690726046873479899836674884982051864371340341449129426687182819897131483090172394334917887971159476480372776972850756370035633647946392535431234133864946235980293396065889432981236674383516737831653730217075108975631793771084339258929532149293776498384324103323843336500257106854317066715436301998254236983099945058887005662654611247518569328248241849303945244237859304343986331413617054364816043596873356313187754398117578117353563097481453464058307413010129912920980143074862426510845318520468256160877254041404534585966901570605453171834602850988903486651812396835371890912830688426496429581849564256866261717068013907586650501300032049888615590129855689237990022212475097079707931019126315351325111305688605714860568192155003678441153647634425478390677405957067039158447439217244050369971036332350897086665795465071867555031479192923228751108789996846568921965810497460559496664478961083903762432832991449980971074784882718194057138759209205748472804560279209230116818415579572223790645365595790242809679707268038833108771452988925450442314809189877894336378016790439129595561476856136113515762855191524995367384348933086223849872781017729413390480031550105934120772620306792389771165452446974038672711966778751939601511970376004114940628913390740396925977327141950496930852401278865658979663585244015962539006820544355085344965905768313611517482700886553574224462683588501112114357168257632656666170770177816411958610353425691471967068959684093980715376787723774810064126599581145803335354231283005470 +print(a + b) +print(a - b) +print(a * b) +print(a // b) +print(a % b) diff --git a/testcases/bigint-testcases/BigIntegerTest13.out b/testcases/bigint-testcases/BigIntegerTest13.out new file mode 100644 index 0000000..58562b2 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest13.out @@ -0,0 +1,5 @@ +49974897309132513220381000914249128238721977153999815848334851569872635031952524666393893213175225252520492775020879785376616024947838257664343449306447905152001993805959089968618596660214026302173361834668156358842295422078980730875825102326726703994348612516783199192314364999850073357658051619045618212497007749865102461702847871999305535916273549199867404760017904382565010614887023831174037482005625129157878321024870217790421632528674711997654547459238073971793399448963610301904320485859046187324556210552387157245660464666878868324817589986260873050984070783991768530795709808801106626786745798981421927296075335684501595290219507494393956113444040110891795973125757861346946573281045112854600458422126757661970195730019831435033928113425244063426618692574092608519139248500481475798601743125673890244616554462260622788316478631921462401868945427912463626002401188970198919858770814584444104405751409420127217175370797876398361276034564727378637728506418771655081235848652092562322956678326469432335750764122594025905890361327294102008565460727451864926141834449177341793306532073573430763185171154841724827618244826624026224104834079344140159143457028207742447242949052080958755480086736484469676043362788863798127807646454644602050818899438108988242427632090124464738802697821637859645905867862576349759275154560667176999806514733492588881393432425472590184157282047339806301047664539968724607509048190027095664891028573750253507112630594109724444980366615218670306319605689599496005713229217267856598161013113091572029021976651715612335450598250606023169025330673079582565806334212770723681325544382002519220337344460824778020551871630594383308831376139408658719451528134544892620348978705647105154702614335666087387876676117948689212320070935120858374406349593849806036278865920716515032863035806119325234799749290917251831107713401400495744732359203333326083336310915954229494681964720802361457950812792203688894680923601751671632599815803139891607817422228263962166048792074744680177496024805587827781074727524092724756849367326450899931165965827568303959934462607264620209975559244849509611303070840896741991869100602635453170229036785049297078113049591281940332724094804538834376032556289174527131307932355976772922476849591990353311540900808814682752801892488891350608484656782699247140044286795108121501409421354935923100538882850932335238586361331650088077153308421119262038575259147800249281140562103802346470012394701597518620829300089852300113795300178720015778124854023110523884871879958190467718636743300172444504842035685791070535464654174655398311210275964372669588227049863241885501969588392377576843640725051817222287380775268074341995262675887070575970701618815463511742289761245833117020900800379645209063951701964369665352201626417865710470954936432235401053870553745193477450074144484875183931408980096541287079166152058155038405982932367804647492041529944025203960175115577441185839816229172896542572945066777168661189676178291288911219542938264949913981427803948270421675179050098304522036932933378174248436025888149879067608291651267309470187533776232372896310525035958984372109108484070434211540764714726525522554331214870824631103688137166434841304534032404955490697448124572785416371521237388515295329375398957204082489863881828761526209137339232911087648295030028578205164718658484552058413790792388715979759395569818393414753785409837063376304666418551918339066214969417258882477843946938497626907126027620415957648433180268853619864215972280084365181084692081217747061236897980103621926912570558018127080798963667010837120777942247139726682368191510978229018803686739129985971357584144422405490754264398118093975327152398547804483483999145213672080013722344004279929451796074469069492606277696311621416795440407284708428970606065131132466804129828561930855582054162100563681704453945859548146588359088378023006520140441657763074794739350326609563263396124782179833939669045607040147139068005561773481086812018909127815153361267977151692772763775521743039062339157566142525559164904960692858978391125482269788990374713217058452309311321045290049187480896399185343354227166202454250567379442746593453513435161724395974694146010603596267570371327764070964022443186541633665943424635618610572478470052259455250680329399756988421018824578152307710198459197125945280479787814840168840173546027367896079188484079298060358681883480302283844207879171871936515591169203168028428977798823096601448769442021195139036576631616294442795623066238283814980033593579385774706130659994531826991633555899125959780079005948102504845545287186216635550807305362628792829702304547944582572887532461783478879260303759413500256256567698013289919801818363607845022909123800420613473476423005277582136312849319213382807211384206222548486992574174971224060978231164 +49974897309132513220381000914249128238721977153999815848334851569872635031952524666393893213175225252520492775020879785376616024947838257664343449306447905152001993805959089968618596660214026302173361834668156358842295422078980730875825102326595179697307457089816576092358759870095369242402505017934435126834721071914013368390993909657207522823018447296960122021429453689677783207087086125820490071186989909268777491774530470122154217908963102231125454729713748878121322332597510287949004673077000390809160820533092127364409282848380569843918033654855277700507817351183989962135430711249299003250860522177963783481358914403288542562792396402790681018862625055172472106181250795170428361985465739545426949843756449466948066762935402005941997927695043102769773601411466396413287792183295539958308188669685712748649910715004164250622109464501899881352569722916472328223974833672522090497111536540657570455851160522596239209187323142077938004496468215389456869881135526515688189596448409203588761618401974520918334146328243161699974915127853829511953818605993774687602316803735521288241148755375735527162900772987465956573240947204766903834074337843781247513679087491366008968008700431945848793373029408426693630157401668278205116744549280734307528700917143746737482598757897006192116937085057366344560593835981333381458379984467283791458215574939066331560647398343564155891426746298209801621372833999160772785166188836916854773747917980064554004359945566460459923541587080379066125641121037742322069927235185720722660122734518066487350441377282887256378116986667436110700870932756340384347762938388885616045466303432637210483042542230307893798792352818602472618333333067697207189908329594659067313173083664027413215229643351185646338494621030369677102038518443181065829984614918043588374056073195326311719796308875476156640515530441191668904700060374400192721531159001308119249569420362869016927530100442804722988250009096387858655180525642481050915337692393090770359038112260463137083631189622376266824062411364333005024796632175336004290210598362688242972074290764511958586806267641215959874278540104434094022070826664168478456436093956279540547289752990975726568189193569485300031237881793560850992640645401579869282819015482440389680287503963199410545357180000992652777921502416919775712083850719224752147802024979148974079769775424485894019424204138974460958947794806730229971486271086065782630187330242403085065528733710352227417570384628740743055287038570477502254272486215612025332126338209259504522328134587341530405789712857938904062234213489736352231232949615720355712372353118118756464073653132144375357730733510641082559840741540946448719663455921038011035262078537468560504709845195481101827218473338981758616448755108784333508170284368834118752380003709769711256921562246336575381782522079990040345876191377416051944669703657495917948136253463766156925310317379501878235804505681996242587045976377489448552154714984085149164029984908267778699267219710730509431411224781497741286103133483740455991132233191584088152425057195040845154257143782177998517739804831685713597589075104204933430960142411053804777798777470046269462038730464588850389109482789052074767411263499557417433527142899174393759833464860970329577445570997887442367493367614145096079439264430544827685245485951287974945260064474476422037975586293205039425152594453013579050781148557638811466456876317822358964905811847071770322184346396414210114054466537040114994248754453484299666146793190312403781822062133101593542523402699887996938310427106853278705922871345126566585255032877406248173945738665760482478073736966903709581191701991329474873885536531917015035655710145431148093043668915717289737286518838163283778566109297153734488889146352454666586017870469661130645715554263017791929669552809377958721320759389997052440843255756894476002476138886244521794688344596197345143287448798599375666225617803175427235580951481177233875569268375859887427689529581729056136617859493265776900730565326929081395552345800606654752331800683835230290313948179338047064257047165374910555886612477116379644609526871958458257337161289122384968380708700236670573686304902661832518514042731067016771978203078730601587471365821921394257006798427356147525013138673001451920051592025818419521184952175697689827244092532948295662381530908402374501936913955539221793790238695140045607605820106937404969611253270758133824829181137167817724996755468282866942339996315641385669230152953593795963046836752111890729118160938391046476089700182750765378651764650569164852075105274005125795104954240800042987555868257308380319273437550779188613594377254650761350905238748513477487196610964574889079565473784575583286553050275503482553490976503392766625040061343444216944661357782629231763834586094295287830282568300515598412220224 +3286456619143791858762154823177542503853905231804243271415751020769172531123837228348739057108237872546085687895803271644849557998622157971021875639487627726560327590297890870913723103862639717907012306644092667894003143276668444054847185352784801786773772083670263545767754699180436941922803329838852753306381566477384499793787858651382567185320126110072619960020506941881728694340068645309161029691162824095273739262629251407556653886279394547208135175295111173164739597536396385165521286227070947564950360554058909169069810725293351738014494804318382682680171578266446008249436000192846019050773894660457215217145550836113113934250600198454736947785839463610658786808340467312381137538125377769406304885403314159082508677624464653798962109114371380055486649381650758131247988763866124573578496486993257536081456753784099875345736324716304904018152483548562147639377432750915144719250272269737199628056974307976374264072289049878209209073174603204105296598710531063396516044040045522968148727587318349316617247859893781860554496815623431833055089331127447243347713286747001890330726928716201747344067534857843119455594540529539067274297367731586756711234446951158326776092532270361708088921728040220784442935049937178673361729735937356504637360103331870607336659965023586541317087979218872438717594189912041162322706912115943799413876552050121686382215428279395163223424624704614690954112395521798916396192431854795652184951505346301574711236803861125979916595964518487630887795334899274328649838118061541064740373089409379478956923773977554596459444218431179131846860913172545785873089649188998763339181276556020854477803829096347161563526982526555970400234131797859261346113225702686220198361542809836242280193992819982334996533767689154619134385386972243543299840155458175463860865136138543056882047450534954291301831525989262367096370467016086645179208651500769676364870720612295024638701273227067798220586623354683845684907841301817429019312574763889058911084070543888783503830803033808458458933886069282526906090533043747397817233833404277091890465047894018455403202367575993260852345923737560174435211558552457475803830478694991675179460740933637396864799051911355115933390626555753940946698323088090473290087655291471146978259046571668450656749956292368457088553696267645445571416767054171363165318876047842028317038071888171509385426943360134844493573315097873789172108142203906727118022866313704995088583666128929655922790816045904130536458752820981431490990944562021913010053446544893497519649552379651128719973409553204414495301357457793853547268638102906316004013929739622582327442456585224702621898799658929904347415303982864140536393855838458386264036978655872746465184869309725367810686953848235011520881081962525008752538642606413927040288532351243563616286839093463825847920832985227416386719386338204958852075155568549104248296161526491977055000691335925899369113015118798749119155134605861744930719900836944519792973679882187893614565026486401965845698049001624896856966446381367050651785366693545415914890701154654881133397651648579456008058025713002025550746541581072888127351434995500259934723001184247853016596362629696019377353938120787672215807581761666396338549588322959150527827246828052488825159112027908304008856336084741228423748039334318783031953598266821203412613090510628653260623714601824088613828865893164653553042141276475984233923738993334177644051827841543855150137127837187115799803343748240597099547905546456792963939001574840390072561824348927596480611593653877399643187537076091412041067216291877439978510098626125142915562275204055580677549283348268235545650167284454013325638724392717687929710554123055436975263728982828790130562708290369063054298383595161953154167682591421626945778023578233006346085929841878321184571134555759675592667253965031693340617765879939043135061592065495730266976339857831884857631332796246663991036710253654150935563533961932834367991001069233039547408067633719156957733958688214503222077233814944074957097290824091626899487367182948163335750474942592909579961504638797776441545648062865474267892236504113125104780671970275962843079676203350921800680464669002034438121282891164439992485117004310252997090599305696757558267829725893082929695265685816134654455289555145047399468991723859879506979314024266892114827721448824153305351114045296808117601445058628768297045970098528519300710119294439654754578906670075648663092148334404143892917933604996881425785190168632917325847893530799200622416690385434423999813334201898313648195065850594712843390411233005092649494426082019461985273287685799333949730171090229318059281006730198513313826860677730713605289387510723412300591147922047160060090226108315483263150692946926699503877676915499258618107754387183936904852849998061473157969177777070066590199192241991341242481142541784383818157676841414407443418665828646810543329178856980442066742248350326489722916844136174656923975380403586299112449293780145811976917845401232381147049224850923752681801942777350595754104915762947400668352839554465340756706876068224952981399296721588876549020476003712763547844587517430775702692559126005381373173175654918104429178586351997018929549510163553384916251193711788801474524076081245451621098289889012822401292440255074755083042710638959581345057645762364987991485208058943299464802603115634316555239828045885686527369365152027836279659637548526266638493554834270301226710151551295023015516588681669404722856193734868696100115891543770296966434460871971477325359674915605490398263906284884791786486349663367349025173054536826040574090371626090405811922797784390113838660895697414835293290035202659827439478540872238862804778549743899778275213821032598254955219603034560410327449968545946845333173270354280220682444416723203832342344124755650108387974671241241607540715854730162444116599513311086284332991154467214978727506355087816567987004831590867024477830081796593103601381061367824636797592014128346683302922250279460334174458753039527752491292257029413194978103927950699956559599516812401814592552765421271290534031840038538386162957161930997247889166568930118193801941947148160218397330814915159023461637447546127548865935910148352864302847170747837779289895319101294493446933176010565382292464870278630405090026491102098915855249254875045037312029185830482012320517690266047921448610538606442091284771004344644136948923979658686491247656878310809414190024778781669135598899913172500025812840313535914513620442675394360684725638118263134237774837706502244414494039802458716607551027989957677743196990359809582025374256716377950142169552170340038135051384644560972863324748759412628596417861174201094469985118481039968929963959605159495351874752928519776587518693942533947076698134317317188600397314402179024782553282417371758405297838028435665135009056167779843487693477209916129943849193700957582162723969052603464143557468650990120765007365411089191384134217131707040238917029758755996599304678448614273189717503284242310886833066624174569222345603779867356918958066241287723708738400486846160795285311607040304434938218598021769462728244963090290501485351162316389486100599935389139456685230161284871566521121179347436493982073880457176915689160178507620160413210946710064601135821059826795678764450172595235463616500180623710434238426807732625480804810947105459037262208344169150255044035549885031827255547339420323503114327947065202983881104402571794587300120129772927769523288894911958570926259378543453774710932000617970445370478423259437838074926010122662516635727266395966101304292378437226852135423707049368563634488864568221834873465318137661066898860460619960953468673416558942629147392388315095112127774255629445836233819023652281750587367932107706031922269986295898970024224811959351819694897585068029910619697982746477199127378909807896604916118891226926614642437129374432310748511498172962452647489209217636785528780388831193287288694206534556267414797675062620111521003421239252429461145462101792442424478919835277090029817693386776278494010803835149570834908393141029839219367537354352033066327052798880570428886537676280771385572194353891149997865371223356967440822854892081188374110774832345164099112301390222774118011329738777952002753030136933606822929880029446627377336189953871000319066053099888628277104018962137120252305714936405629216870551285831699632286133056195406529172924331791213868577164572728769553370126903266344819618857751832727958407034889556055910935577237277019264145393843968889839006060731738160711706722896359066802462542624196241482018756774236739298404846411985055998771034269015487181514863763518964829808217498845883727765964060562310587043522920498577934472171152708801029900468411640561788388129297497470582950951920408607745416078274387134055631862626190739365418196469995851430537694515442447934584477229411915982881606581250879509022607672047168557757353281869747087825313508514598403997867747237498035393326283206449491187648440439875100073793612240742894185336789870177775747810137122042299043051278466537844277983974440045904782526237411705519909207373180343562865226166636499319293769871485332384349537663422661791413800060503800211964765803286711902792731897937926714759966764668811797476810434136351024117447315383886361837177338811000267268009222366046106960774599521227946653510248568026141000688962027595645549668994528618286546180 +759934072006403617126757634697638720746284027289879999762724511676629710789086017650060938639875761992595191480978920977231037014360900597346420784655604945659987025539115656448393452380248117396427227610711784970127097138733922607410884385506 +35621445290052653439573673299002752257198849400953821176655991582920122975386647667779384997091519409415106291337861829300122516913897848347253838476144963371172064111958631750450339497055274169600917293462974662257803505573941853849969923662859529349623480072863023389863387813359186719227820099216216193963947687920052525409705794503744872153461999786444549774146232790298141198207164284921533037484533268620278123628182163578724240285805296965792326593105135835542675451968203245281788260813718049070326166413602054994129645037840984532194156684398961753995426240632619335852705910907735984853816965374885288874729179272005779460797839363003044665064703042719247040480180376339811311898204668285912156778174847918072105527367735602802864042779029520689399102223442977981989846685759278166470448501054312844618095019040345514270729213026911047741136890378428705638856387182077715011008910639035176091152025355496940041628522604534267295369270992873221661639232165828400738749098998105816937516251550821012194215891937516029108828023308503613193149715272186973694573636267015134321715261207706595202687102146473134270307988801854071385343271548626818620546352325573824356254151478079508848357119395770009515777642584267849940008988861623002663711385996470351703485176437434629416011829577438323624301751939594364561741322060545665680408321866343909912501476054163853250795126172214905390532054704486959025786799437188781256587746993276865366867584673335876256363968904561028299111707647404294303781945746792559137469691071641277938267546016789555229475921297483898431132998673235363578897297192593836414515609004458296868147381125654239702054823813410564762759857027935494523496555891073961104153254444276882382865163346707946394142295307363495542584847688036134337685750061660166420931323865698843453256594113997576319603829461450069685917828387815298662409681960810958360778666818591603994868546674499177863145005511855668265543749608321646244195246118693470639519557373791735341744607320712862195940083264546435631540080827075464765957218842824881535557409778862495267682150280629544813956495877186063816378490133120966201037247110739242500254531587112415185061165041227879370517719591134266526829178925493248566326881555592059871319806181970967956427629846113130257122635072370715145301249887726478907813016068682954964206595567289133767743873115291434406543387475746554869168059875549154430516223680380835932910050290267167470458319501286328010147496443158887345640724933649152510740277947269264184670997427228763606868889324916715012325670427770929799705952873692877512339523354808894249074426268067368390081668685557050394796944939370587167173654279692073646370474132800947468261508249515144663925826313167500001757717814302607158413809867130112954889720358976419774267999630613380008866949262886714950414899213539491159615901569663871976062659636384088721087230680958580796521004010419537360286458341300143026432997807766652428654561748584830728121436171415854281850364226441233213325457470302443875685885939828632820304189125811136441488992312229200510599336679994773699733126055550080106499247962097700032296576181363322360362160269187441857742850546677765065881222085128173669740894693954729674967638188168136357445603713368935490658199305211841220467921955953746124849952648991609402815034110725417985349642879811201826511027815150360074068486883055083329271741945999265324437188659022029831831399776004734779046155623840501983154123565695718287718107035982478332328081113368201179859943929138886670090420891172736925401494520024727322781114798508947359682309408508483507922331040040455055541525185649159624780478648836623397570043028715420390289365435951657183022255341636369182906130438490676488692668906907284650488962464415463895771677320927489210908090552893053027990859861265005030630356061027660747765046985738063190381020600603527848641749847779684829194014436277782948312979164964752580492918636935170959761326199588201496417146330024655556214087072285563697411884235261258955980833439086298061907511227363462235152502075402638605562152399662586745266537316775350556212752650529240908105490501151702664099481264274839602192685597390330121240228071682060425146539462325593503315297177821986793810202284381400650546173832990846612878690561328877752110228830159228982167230622846924222397869318772163107287667612799786240698699534146448902729013517983138694395969994437673845286154272962358708690127410222547150631841563857486170191714696195263856805371274306672466535194119264055631575533524490468420875307908507874 diff --git a/testcases/bigint-testcases/BigIntegerTest14.in b/testcases/bigint-testcases/BigIntegerTest14.in new file mode 100644 index 0000000..e6959c6 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest14.in @@ -0,0 +1,7 @@ +a = -95660017172743859738761623062211845694610273611109045511959710901863078154062024344512712624671343969753329387682920055484747077510744445400038333587989000552050956186969466507773068580604243723341619865154894127291261579346430106682153901216666019042989699127222522205133104734681347727372253540865424430319843188262169979965141321388330364485320127821105776987882328859094538638540718767717456855472366704437527313945794625743148720377239549556872108506319833820823352500526910899986242245680698751581629235260925010549212840392078726503300149566531756863417805660236087643935071615525130606291577502823739033338212450772136618944697786867118721344685548724458466403405466993609273571528474010489095535613677706296417145376012763452653429616200124022890147119890739555070213370076581239502285181264943748561013436234230892478395590580681311866389436881943539993378830692173714151482226031759659819216935662907014296968125714805949775331593599698311822912054966505098913868414695577955800030300894756102589481629658678232516486227314380347468379926665325338909334393394039153775029097066270826859596287092762164516316729633222625073275052593189334253939318384322959395869371874320757390709931381679057552723603289311083245921844368639734321398165925324160099520173268501371030255651940975965752000865219852814204080217591407995576464393602309894952478727687032803900120513380269370719854172526296547996218306449815494590004545799514217722984281349933293685023530069784727016910464048665785129534966296210105808110553979256437210555020620499035839183363867773721840907924664846268427793892659232789779192026565263633079788376037048409921076593728553074292472240455882193200055132314089884419201238602815721333010012259069948231779438199554520841437287896900027335928294024494772631532335749918096565922751565142405164143425021232996160431441434323021520957519710684527930803288206121148017079176266848089884000384886716411929695158265782311274082377070388949392473109140740943731423749225342631567485491484243087200863234877298064339825020944385340888070312825498530631119427007914253054600993190182754916905693028976513921442977271621120114206961713569903075329475238431271064190396774576567840249208323479406283614591603180520832578774558335024410772865944134981553373600056335852062615601533247680866389992654780236183092940735886163950539073453008388499868560262201133715656348602070960689736222421045657023195119043189930841900582671605004417203463205447085274513348143837621500832658033370999631242714204210606835442124063453609443819878643281624086058284482317439698114994416306432799091379070525568569057587997535931797156318440743321590093343039590322904061159392189620427199400688669556228360125351028872046276757970259471178491498190051335529003536778386451791477847398791037733539854044382966413581614295870394651844359517053749843636113131860886125949671868496120348406002792118933224967171629843870541691437355539974464117958830353767955408160941004194451272768418797260930916678535701429557733498461309589987621372021541121362401528840657180424714806149341082500946255061856044211029875177112753430278711039645019496195769034361702303242237587114173758368880256993111086205448430802842200263842869166400504799397403134590235299198324644682715890505676798066814921276521742681610024620170209400132918822563235536169126812984112608103126015963419952668111214472165855061537525169812700037719238215611204004440067855348181684658769033278108424208435115795294447168865923571865528697832206095705452500201756465638041222531502926243843396886650062715940861250420567377982817552374049400210408974069973307236148687944147795663176645980867217577466071512884815280529141934081430849081835250913771166416131566538140943879394698713765193059597840985928238023160092892308409105447935732377138364702726266627269855878361346481713702218616927761512208844992174802777246024350547341204339071932097133305221954119767585524840629325016680645406682184526097348732398329363638639750363855004953442606961171512910887837671962559388554530378454174834942286170268130309854013949212434701468541969169801415774931835476174035295806573647442691850739383963188478102013983924115980608716472098173836665376735060191730566574623346329070342867456666579997906969362037017894386431365019295507389690919864535021847967802859195741056465791212995465884267129467312830680253066642614521848056986716137055824116573409071521051760995512511966000071157686164721307287166868539342889369907298596621132149858874181278283888288064225413556131196776358141 +b = -1743120784247640084269544615518438095064131176848908039018966152046233218359042992425308035831934075421202362679660675190132303943693828483516289035940963069688763923917821339428548645353854256591055551472424071409330848061032604019779303873924864826731099662952050615987486507011067791438250574390301808368443516769256087638301681707432076348032133290834493939454830187008670005320625479401321410184834594403470409715072916316942413206968850454778912122155094715092415373115314882935894703421374700571722175491446394392635008519121525472634536784465569874280613940626148127381835295816494977288761809902798488499309775936190355080583087010637901907747456339445138707237913996065300402800097662723404623377209468263290722912131534408627340483817381242077610553868456653936080161065285832707274745243102711558928431351506255586315022379249674117849314140070204752437095873810158166620847820797232925747261916575273984438183149249357110498799255783312476623523147132920854920423865187365173389579465718331978530918677797914746473595453524790364101021404242323691377681288539030383353430646384022699803152569650927699452563704954475321338201177760539552194874100847533003777194942978088380507449599714793527986089569206070411163438088497736949320535552263832365894508325404811454836171878468709304273696252057822248753046162474950500039669662056145957718839991065299724654094682625051096875497857782550994072976613040529699744791555902633642119604036669733244698921383122205350002884092822057611382069420843197787153282865568162399783080268633843790967238943624304948810071702041940022188405340924448031978555579120955281087567788866355844103214408657178953301424708909852078536126890646500840939090230777765196713205916594177264126473750674055474743417043512989845921010965070328093204792368617314757422613563163830706081820240546116741496595529238882779891678594148546087731431412587365533147458652978532336229063174123696506701068462266341955566470879655551462367995772505473736472949034596404049933554885361773402249274927577612178602701519948806548652725986252314551530690705580011939034530024368102043423647236246376799762172645233702876104060080801009590333092023736339803297302090132176972538105985719539784410776897879249224542361145052761151926636116881678022466336378034716904449377589317637605444918025844181987772342457169665048812558175122525452001508713405802921713107649660109261329013760732456448363427169537317240972428296170647997368817598143326040794970268047388015535265547984173106354827684111062389491695667098191890426162814184720282887013955199985895817302675764686458314480794996883149943843236616917989427702625613370232115267055492177648468652440458526013795614383575801544603610413774661298210556253908510954729486338645279067127100212468679703867966857220595445543267438454918916152733487478218555352715733026566239018680910743205796055487853862096486452546185031484164140634669397853305867495728527190391493606441856342808815183169425022346498333187971807197734468112694521320563733578973378737371303384188255779103066985542238181485032880284161837561125352778220229629740132979977119133248624999771661606227813358811444006137881284916984311230566391066785488069921499941041556241914383986904867228456663052266747562014807159961187720900820744881138889845023603802006973527759608122971991173688297479596728354790894929306145200941097209928032662636874052745159988108734075656643694093176017793720474277543111437601452822562442079528756772924805899162679009380675361312334386568012022790148804751836701586736792952954222549065950297271375600942223474811441012700832327323464113977462177038432263574086047820429700413251438200165479921690152168242841065366205904471688608914929152750368350402022698722118438750721537343831982008114773864245565090419206500091489431667482238219684056755986926612687560362852147236985900576687626399488414867092561171425715569954624313478743127939344840142618861997624609328816903170956386624777063617316876911174265613039554277004389098064271854950661649169409780733358590533423870304150178925838023466630183748676457918881109091503348728340820017963352890457070745392591809811078041738555604946809435408859461463261292298648981231902477790340247157160235783326830996237305658390859161483699949561377258540509270666567857527857975759841935796337217301568990826785418152125542318564226503005290948442764540037646795327749010938496719063360674791035178144510989229069272617533209781016443734433091103312409240363972985380576260516555188618450265202201086479134941392199587788887878373504744938799026637795717751070025401931891010493521069076278617322085725686180375222335471137019959352681915510617175454637218165828358112147466798343283477401691852401635981067151214969289631243524784881694636939300046717936844008733389740563496361223861295947215426926165950928786564655206022184481310330922308149435172426912180851184298407182022391834403156425494875068388478747967361772392864069372598869679063383783536068224624575062731813013398820705 +print(a + b) +print(a - b) +print(a * b) +print(a // b) +print(a % b) diff --git a/testcases/bigint-testcases/BigIntegerTest14.out b/testcases/bigint-testcases/BigIntegerTest14.out new file mode 100644 index 0000000..ab192d6 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest14.out @@ -0,0 +1,5 @@ +-1743120784247640084269544615518438095064131176848908039018966152046233218359042992425308035831934075421202362679660675190132303943693828483516289035940963069688763923917821339428548645353854256591055551472424071409330848061032604019779303873924864826731099662952050615987486507011067791438250574390301808368443516769256087638301681707432076348032133290834493939454830187008670005320625479401321410184834594403470409715072916316942413206968850454778912122155094715188075390288058742674656326483586546266332449102555439904594719420984603626696561128978282498951957910379477515064755351301242054799506255302836822087298776488241311267552553518410970488351700062786758572392808123356561982146527769405558524593875487306280422039354056613760445218498728969449864094733881084255923349327455812672416066631433076044248559172612032574197351238344212756390032907787661607909462578247685480566642446540381646124501466132146092944502983070180462999326166683298718869203845884502484155684790197914386229971544444835278680485209554778164279255689612434299172636929372929982955184112278063721565881418520641644500939436769649044138112429412941724743668171369813123723348111336628539390872649274505525883462363167446957602289693228960558283328828052807162690612133503334651075773269153372468272406109361187699864276933369688638189928106014943878870361835770297439944871750725118941589757589639348065001212663732326325666576311352352611799758061001547510534299614625533274999816139224794831632542771054574097609383801190666167079948190907071734176474307787618820064305214451164545097164464206456338918038563549521307031148768455209220405952111825751713475088729414569663232806387967404802139416201729746762783458870512086594879131240754276784299742252045085730395358019478741846786230817884532173422383776612891221816215873058783184809507273350016862009975798609602634064204890696542306037881228081955537693258167196255320510413107417381530231138246993358866030519545440680997334291982611281847026928291033614604954175384397612585613142701299453086527366366217234342545385219042093743557255969213091727410567072778023120017375789320669272002628527426902931236374170685428791571694839457672813309561160080408751976305540240381221698673797906585152836385639825392684262386034978243945217901520439881047874398822313798036886352348865702945292053141697595852100764296270542531177775561495686922097994366072038956487279543043730530740497558486709714081569037114379421118042940774893526286454511134588878770142846048512931375772069451950459804521165628823009853170728437774883880204137954902801510331652278607901291752416116997356905556806519993318902941056884434422512041632060017897676975919864809628387217564096634123378168748799072071076500388890064328329542674497341682728633460149546093860621637456778538484003324618869455226186495866718423912977934160281895367282981703895532277908899519119681571589374962326064723306274402270509330701175612464904841750279477843641473216540424653589212537398578642639858531566303965140442376860597464795655785701627953894097483291975037272864103405852730895149122888710017385948180876301567212476288215322675722765620002979238643406826550841145344436581595263113062246040180971119533054431965719515908404006843114843744594960805844893501041765283787158462753185715418255646366490581509451759085123034574423429268596850911243335308937319874322177099662506507415744182515528083198193615474047861131425954661478471994384206020250083493358758064458202482539397623988599368296733333875507930413551630805985176551507736077875453900477610921994508301250778054976905090152052345851823519233148339164480280669850688259806189309957406362524405613910724532352432085710231766710703869091743505164451948692995084738589227795236817536458620353724689724798484415774490552125322654724967836609051203796664859112942576107513030963361709151755638225151569301114904811799387036919574394692168826924812598113873420727286206059725124111350339822310196642592315149083006879718113241310742642430320595774781194505046056059843449299451783844437682132996478212072866840592722746431226117257779447496524003996663944220108034536816905476625091607183672637035795891270659773232629677423865187122175781872489054012350219833624312759234260465751283167570589147885293754396905211996933195127383736337106323649498555834229330503035630410326928319564588577050346495287514696637170952017281868778524021559692685691471680584826695515326418005015862573419656194098288096056755016201535485896268413932479114577172980643656375921421421111660329897642901827585939446407340995807597133526001860878105926306300094716518970468061469688874658477236319395253000568069154013684453840831372278357558924686770813127413626344858358432399542950429188232863676062608544080389084327859164581739784811811592585481619962152436856761831482556393478781609039631297820544032538297047059363973551745835983701902945293919693988391905560842590216182355555347287310251142300162665993731019537937565061819956512688800476287944210175178846 +1743120784247640084269544615518438095064131176848908039018966152046233218359042992425308035831934075421202362679660675190132303943693828483516289035940963069688763923917821339428548645353854256591055551472424071409330848061032604019779303873924864826731099662952050615987486507011067791438250574390301808368443516769256087638301681707432076348032133290834493939454830187008670005320625479401321410184834594403470409715072916316942413206968850454778912122155094714996755355942571023197133080359162854877111901880337348880675297617258447318572512439952857249609269970872818739698915240331747899778017364502760154911320775384139398893613620502864833327143212616103518842083019868774038823453667556041250722160543449220301023784909012203494235749136033514705357013003032223616236972803115852742133423854772347073608303530400478598432693520155135479308595372352747896964729169372630852675053195054084205370022367018401875931863315428533757998272344883326234377842448381339225685162940176815960549187386991828678381352146041051328667935217437146429029405879111717399800178464799997045140979874247403755105365702532206354767014980496008917932734184151265980666400090358437468163517236681671235131436836262140098369889445183180264043547348942666735950458971024330080713243381656250441399937647576230908683115570745955859316164218934957121208977488341994475492808231405480507718431775610754128749783051832775662479376914728706787689825050803719773704908458713933214398026627019615868373225414589541125154755040495729407226617540229253065389686229480068761870172672797445352522978939877423705458772118299374756925962389786701341769183465906959974731340087899788243370043029852299354932837579563254919094721591043443798547280592434077743953205249303025219091476067547237845055791112256124012987200960621738293029011253268878227354133207742216620983215259868162925719152297600549869424981597092775528601659138760809351947713240830011483170998677539325045102422213870421927401699562399665625918969778159193494912934386325934218885407153855771270678036673680378754760066753462535359504125441946932150658492975958180966829918683172084327521716763040502820971745990916590389094489208015006793285043020183945193099906431198698347122879997851913296248336650280129619590886198785112099714771235629552761024356356321477174003483702822661030252631772641734245524352053974508372825241865315918921328220933248179566170747978421182365986356780587924767863287555226916573619592255511758555303486024960187152300388249919833281333883298770174319178870168567560770999154899931665681893823772445068990124273699250765015337209173876768942982129666713842659952464194342306041718492478924337399260328961052242399204011203054968965829052078750250525344612118926957581129430002793216451525566964787813313875312076984412352602531552290968377079280479089718686792453531892850582670078839782516059833066808205073291333502995100642263557963064393436102404290281441915878145462604234841976157149798425391103784128977364971755610404659085077500685090297349292679086821066748557664108650679109439090105962354715592779973127816846423073311299389658387025790209034676867600446835623738384244605449211728688624185879537519020508730099662028762550058051863048457901330450070211260788900163223769426421333676517854331299524593974628951957647456474009764486858859312802171529924859858670546523303353082007872242756402818766332361307804448134269957697813340325220609632779470083091838669182655561631525400993055343367072400701369419393053989290793265205610493949491624327121895437395710452007967487209906086241500423829470044532729973055812831127695079615759873796194676459912289451549443420140351994717049118847951904399971898965701105074285474324693853552043705719306808216441640683906616067310239326504749244075355690286287677528253895498355425235571448652860910649267607694740932764820045515150101229675714829373322955814511565514556458130561443280575806864510437789189493533522456002090463052911534919484670815468813112837797811366347875532768928706818252282759718017417729283003302926167361373463974066419774774606484611644960403559200932677643371982485672879604673879706994530548899804474174097727600157945690296845160732110840288023083091626481964100637942340902758214145565498550752378252013829000120175806544399940587671979614413360222094118600373807478617940425977322765072539875955664086609370832442904341573373629243352971878434035658110389771462326463131720540219203846142376693370578086149869802279192460074492738588553995800063919886748026251536848771124069277934873929161070043470257057467994301976138189925757855714686947421633586766582701762497702273208351547021039350636209817336780510077902157974097791537524120469272940609945025272403729011705114197074903199878505489374304946019435511696088876205874193999507030570010865830062948297458853120248533498012591500336424323614785252325318599017840659799423302894670056391763245470260773567781221610208624472402485565472751466719820189202505252179936560349649175681816622462564 +166746964155295994932900570066820768876116467714723840004751681872524280389600388874578153544348373787373102939198596074256928982755113076351883894708079760094125429930345637951277245656393921347868380109846695126622875265209257919544863973839646365571357739083449753250967954905991155142941995463291142290130687317366911328380082119661700701470726507938038462229161545049941854511386585620245075646777999229669496558943796860993022503857820380840987683515681738187060799467881479841396103972893571610267377284316144682658275866904906812689488646721002962281372694910207481638494889147663277413638160721767681937819592361125189723989297039554348846196321896796387095731853264303834236210896227856944621981984272814833375650240021815167097858050616215322660371332781726275547433607002281145040711391106774792741613845103539454853733355364112357366393621089342028328823923956195660432062697973857273017322473633066252282007257450682556204129985395762122444942871998534319713918037702585786800576267138434633744567924274168464091748736422662937583096310127707750820481744633594011005961455020613525243707547484062727578124977864270025819907970608469362231198449690440895167211178242776818791444315476101205437211273345248147618092677648458315030254078113277078785353363678116728154165913156863854326555638641917871044449749257165945650989985978523800584544409507150677115938648971958754691448844046008220648658213276429340631546285604468255535924320180304996436324396958880459718948743027851152738131198944595266184448975671605959911442770245423251876324292614130992358807117875582667651009359652673007409137783895730899090674877561938066255670387799487336013178062825999640628958476804756564431941350881947764623975264100102460489780657917130614642444035223244786697908045593529327613093450787126142376421751676031184604497544124571161713145742902653653912187304162710158711487661074535875185681308293136700930861383530102075379306136618879733223747552871191454265411338648558989783700006387242280242059300553444909067677169288721863420915300532017511250057412986184263763374383674754489267345010879716270713653381070346247780208104722703763404560429045618866018672438419560796052197072260796644076448449758599841403554904000794605335022194290307448378368165916403518593712354690162314696821331256220619366799357710438622559233347247850735533557318624849447360980549940787783704761961390504852299126566599160030580836129531286035081587920603018766585461835406201536963345149077444228449894668886894929550048146765998396437166840384875915691820511232293435980301869425957994116903872841345150628644353787691637332963728564246631711192597174236427305216574912095542144103571053523614090487943806365531713859870770995491254607472431426980590831268265090091815216724191683735649795140770248535704998559899888600938992817817957348333010318253989506325006506515875168557363985165557790252040735323980293411926365162189197946751135946942324279322049566035403044427328471481109717233809256553442433396067535936647182241437110976308108623290950788185075074204769833093449808994224420826465895478444856501954275671374587845458664450121137471917546286587741836847591346754416909185258424810404753390386129397738238480246832170164639636351448430452667880492632009421173693503873756618190870199573010311033771941811295713818181613480374799892906825024348999779082065806102987411355028231223448334137316725883752745850837204371012803675392223737238686735693306041597155599631729172208185417986528198498338891645695487852093874800809464556471838001540910952420479057725450552298445794553004634065402730205669311862879705220640811315722304799259920612257905217040531119351437912149878561057350806502480757948771414673688158933516804559604052054781300730977937167924223715061383646337518479099742444853078262851671095227585848216048697452282872294456780110795890555625449466533213041689443429056098955875829062114354436170995090452005175758806227601649095356558074510564075100770400071200901748758875769182662658267319889387278210999729925098901123391730160441924039756773270098895295192054233799886296864760210727553897033924797966966217926993923158014562245144528079295936590268404406297125489859123175870570408263107017894718988326150667708362153961364578974912077242629172464438581816492521469820483478091821094273067945910427978074046323501257371800221661330453755638113319956349334117069341711576241039853947630227988698453847188579492770220501564552380250305633110559777418794730501435657344676245281804780126572317115509884250089983893795966923110996756556596581944105864572264498508381579638422227155140354589756748431876019332188101300410356723358455121158458800542494994472858771324408278451064344595568598353442326990323536289955513512992243032574908174831741227081997348115591262874300768160913026666690639134394244566212727760906974863326506444856878279435631204364303439549568866604240702581141098808413238363585296807319727430157220569175031900893438766826560893943978295204647772475638574793478466343140563477311816622537052939251242210439678865700773605930046830742849054538741604643407389929664632147201631101018053650957910804965125607652268039343671574980020378049383918496939635452052015035094187053122000787696047127790959245667910403203106276558418982873027670375514771031859117361173980791487523135505604969580614705558153063994304382023993810587680805273686759761499058194689536119273928671958263548762268155875489291181230943291922493580280147202538034206411268610751994996036149664138223439414098111660867117863650906727520217128548433737150220148847416153284679917552458512584735899770175277450239065239109921924752720264374421478250555583837363135917365722031227658365593475498610404124510530417620065832847437884309570502916999892015515262367485771423858606086715790322790764424251393498937609375303672026694477195137538515779358857756540948149973603703465420658267896315176780173407082575854765858336210325212993885600684124243969771947961353111429876517366972769415236967967343691352381956619989577955224233325446151142559330556356291736939234817602214629023514685132880159281294498564285609077827715005182352834478523508510119558029361390359268156112866967807838540426236812468588294311721619504203568641856535047911659391696379042759595280897763227723238235373091373117768771640208695527132225909499709220440208145994140591461642955496329591382299050527052821170409301981137105140685332587249505741553114015245747612740907088901225272606174132900923888226857118699701384430718707931137057797324399130786371296832425718982793050705605185635174140193093803692993471116132344983629244673490461399484496246282724214915415282603738933083060460634786217663861554809559545738470509376093425067824887687814203458242715684272698065282649682965573911938963634630167580236760964087702195936222105948916801850700494852342009195490117182860533435516599001356438985600377198158163550851414624573777521811923964263443501096783640632247522427224242740476978372583378121264617219239562641658084774990426353904606017728865452335724837570327287400402212631446050707883234451288453831003890268554343403608003412426611646571750189052056930673726065201793395978973452904148919525820548744495360980306863988137651401291689323234161135378707752024197019375524110868247162723806110179788610113236744869855305406821309488492890365342601573444313383711765419387761197634299459809364719526040427272507979021182752781622063943100095465232627229600193326777225725687764253180826896406075942639053460939429002348248229882652656827715411572250738968728182081828021577824744292200715376165141399261407943786065014520377302994735300379104605103976243699499124368112250405053486617837837547493515930820049879044066413091861447085546164429877421279405870104600371602787160127649609185124446796196192779857911438172107483011625555922121348014874688677837077406809178408448482513212398352488018525557366593548603015314757907881511605867848495880631954398855340873229821616900552404734669718405791782916955614563504803933440304620899191885182130290590950060804552093488604068175087596774922728130711414841832670051763910605567618808789912344632558381448551329326018886862751873350883045955088129117445492168942081213111608167828993262254782893780273090293869810466585178351464193151635681788453691311777926374369950616776697152579503516702762631347987979268565455114776099464219135312022582140824529876796396495866157900768030660005980243952499739883440225748501088204125563549488969982905931660539096442721700037226624137638290125994577816908331742022017740818992109782723883154422532544796112298134621899457669787583681662774451881572040347668219007912064964837106383656957911594750040118000882860391839623407033615096776386415639187390019395674877789997154501565107367908501233755098018509969910073932388411048026835916559965671951329709584936657581016083380514033608426934984757494090254954831748044410801919174127633721515318031095105167436580391117361881014377679111472376070060000028893942434271543163467455765229008416873420996341699281666891448004034171439190809781343535628698871052725534310295881357442823154942294501630536710983572157019072048698310085174592441640124263774832850607433695220415957813706315982896252651092589568571524774206287752466765311110726339299023848476297221006642917825308229646364831064958715048938745651560555948967325981327314552233840587843755038127703323106019798301909590717890382502328384038005169406853362504912494470896290962027660416133582161133397755336173186706794774133240550498855081303129714126109405 +0 +-95660017172743859738761623062211845694610273611109045511959710901863078154062024344512712624671343969753329387682920055484747077510744445400038333587989000552050956186969466507773068580604243723341619865154894127291261579346430106682153901216666019042989699127222522205133104734681347727372253540865424430319843188262169979965141321388330364485320127821105776987882328859094538638540718767717456855472366704437527313945794625743148720377239549556872108506319833820823352500526910899986242245680698751581629235260925010549212840392078726503300149566531756863417805660236087643935071615525130606291577502823739033338212450772136618944697786867118721344685548724458466403405466993609273571528474010489095535613677706296417145376012763452653429616200124022890147119890739555070213370076581239502285181264943748561013436234230892478395590580681311866389436881943539993378830692173714151482226031759659819216935662907014296968125714805949775331593599698311822912054966505098913868414695577955800030300894756102589481629658678232516486227314380347468379926665325338909334393394039153775029097066270826859596287092762164516316729633222625073275052593189334253939318384322959395869371874320757390709931381679057552723603289311083245921844368639734321398165925324160099520173268501371030255651940975965752000865219852814204080217591407995576464393602309894952478727687032803900120513380269370719854172526296547996218306449815494590004545799514217722984281349933293685023530069784727016910464048665785129534966296210105808110553979256437210555020620499035839183363867773721840907924664846268427793892659232789779192026565263633079788376037048409921076593728553074292472240455882193200055132314089884419201238602815721333010012259069948231779438199554520841437287896900027335928294024494772631532335749918096565922751565142405164143425021232996160431441434323021520957519710684527930803288206121148017079176266848089884000384886716411929695158265782311274082377070388949392473109140740943731423749225342631567485491484243087200863234877298064339825020944385340888070312825498530631119427007914253054600993190182754916905693028976513921442977271621120114206961713569903075329475238431271064190396774576567840249208323479406283614591603180520832578774558335024410772865944134981553373600056335852062615601533247680866389992654780236183092940735886163950539073453008388499868560262201133715656348602070960689736222421045657023195119043189930841900582671605004417203463205447085274513348143837621500832658033370999631242714204210606835442124063453609443819878643281624086058284482317439698114994416306432799091379070525568569057587997535931797156318440743321590093343039590322904061159392189620427199400688669556228360125351028872046276757970259471178491498190051335529003536778386451791477847398791037733539854044382966413581614295870394651844359517053749843636113131860886125949671868496120348406002792118933224967171629843870541691437355539974464117958830353767955408160941004194451272768418797260930916678535701429557733498461309589987621372021541121362401528840657180424714806149341082500946255061856044211029875177112753430278711039645019496195769034361702303242237587114173758368880256993111086205448430802842200263842869166400504799397403134590235299198324644682715890505676798066814921276521742681610024620170209400132918822563235536169126812984112608103126015963419952668111214472165855061537525169812700037719238215611204004440067855348181684658769033278108424208435115795294447168865923571865528697832206095705452500201756465638041222531502926243843396886650062715940861250420567377982817552374049400210408974069973307236148687944147795663176645980867217577466071512884815280529141934081430849081835250913771166416131566538140943879394698713765193059597840985928238023160092892308409105447935732377138364702726266627269855878361346481713702218616927761512208844992174802777246024350547341204339071932097133305221954119767585524840629325016680645406682184526097348732398329363638639750363855004953442606961171512910887837671962559388554530378454174834942286170268130309854013949212434701468541969169801415774931835476174035295806573647442691850739383963188478102013983924115980608716472098173836665376735060191730566574623346329070342867456666579997906969362037017894386431365019295507389690919864535021847967802859195741056465791212995465884267129467312830680253066642614521848056986716137055824116573409071521051760995512511966000071157686164721307287166868539342889369907298596621132149858874181278283888288064225413556131196776358141 diff --git a/testcases/bigint-testcases/BigIntegerTest15.in b/testcases/bigint-testcases/BigIntegerTest15.in new file mode 100644 index 0000000..c050064 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest15.in @@ -0,0 +1,6 @@ +a = -94429730024920627301204494616035577821815154729554930752594793914673859721515351182006440210372845307118008705686575567016553340593076719327895253101026637785372054956545921129119177024684465851973745425614320721782322929677308317319584333176881424003709311353789226791792623299042302159998268702585698733946057187790628676866162653546621983147554188478884222973235125468760470347837776436042722697613549380650288837253416109495800300951744214043366379440404492813335512186288106704846679859976279379265922701168694676360318596147027868396943064534422479852093012256638916102537855587885265260338963779446388216866105384305722045930527085947497590196290597915028493637737979319673614405203817794349539814384527775158675761408761042405504597137840160008491210756499071152245329701084832505038714699485463526472186409916414278204449428754852230699146970334163634999308835290265282341427575980753683736875571701341069248121794434576476155002807080300310699133793964073273946758108897903531242485489728757070874988523021803847841628876474767681968829116437433150472480809688863829025391938086823381744742617170465934686413018146142601540221402943872586354984770560180357860301707112009829933344908112249247253935815447940422026854412635676923892889515115472135088101803265812711484099818255416634556186371616328875028632949431761509250842322613055474583821734050043941129868898725771090661205803664093546397371841869947394416496287192527318055784653637324101194465320703718379309290345393028212931897172224312125904736949791751271224298914877769154317146082988014335635075473352653655237952558368580080047750765982187999232672678577313121315178332941587788192339378417950968966850573564687012002169417593265684165033248396255353568073139917135886158218054807605483295420461880510543392181298526550806780277430299701712321748106573378648242054732762588231316579171395889925243669344967819658928647206493383737720887350070215542554213439509699192973866788663968454060251461179603838208727833104252145964786008162290175678399950789316081929853847002572084540870573806636864507958029429525657686425570975321872536490868042843720552321574516227554488564183233279284570985741939321688673703357016568548695409419729959822420932933871989430394352584326718542659915970053952951137796022145250367931195413264225508333945442467706800209430207248369736244957899344130028641326805731453271708872047200580078390668780636153040343640669750969314030192675436587233267508999248219843408051828242455541848173618095859906748009510887549095278503075517307121151263055080225749295400299972823376255596448955145339491367968827625638031461618260451891720611970468912857612351337639926852722597618955448793992355570390096958675749389081858538230937083138403328859871093444136453793134391815209771829060054127582512461134823320455346855182836461486266376979352393937157487293182231265644335731815856236202915851666652474040740369555262003359227532047903740822646374698490865083920289792550360290251113336848118634632220662500498638004018482094768246957621222427005363847448534096994524619294567938824608587251253107977928902782822385903822593423252578038583550265845627191615770835833588672325839080719230371347187486525256697312234647594865734891595242783433006416219522296523246128337337820696699213815435242588962435467093933173210000575759163973387898394961996822634899745353229917264583653665873701954073935036012539994485418901370701675213096501775170900458188826984104931719150040837205549054445005663913743601182766007632396613712993240865389699846415434870234350042494625089000599736868483517170747883906587605903297349534254016663555333799521002854382307156087956125878233214238846306270666580386940003235726209120453973861429867235946846137204038913162478383613131929674857902471438596613533716079496693710219233310633874241472622416514220608720140966466259337650904774907103980466053430278377508645833654704748130164339054408062688174911939289477813734518653702578971436241728275756638332202745685574142709530028674516934295328153247656988488599004273382542294535794533244942131411346733435664861425727344456005968594981862881388818352250193053322808559703797497200121128918170356883953570000408112107091795765680086041065611589852882782099600918356964606576327464059517859713951317112502337517399144935488770384082381947454550500214218427551120612558753053781948414910684403580940811503810305266048168701876374385675054823575129835079958246127243550844710292973278395875445254637925811753893239298283719185167036955061604006123505404954917386839419621487695640573368752153855153310085328719466662660404075925594900943681497937386937660699399606146996454137872376919026052004300624777319051539134500301202539834941523060657344496368628943981452558372752889923310263148377580616797404600336700838615092072481431351688568870032637739685493867942156001860877058551440967 +b = 684491128739859846727757244230827007523089611409690058815030163191835333166511012678056833630535036542989672486490230517088394754001811387633799292858494173773958841061179428051757856509644156154799592972698599805675493890927688004816379788386882903065326358024540732620882560915824995699269593411634780814353230790493896365188000999075608093424874860919177848709208379760550769909036363485714669500547429375387556422151931721623913786071279012426908776000589494113857272430487337945549726010649398237648761666996601055441138264783358305483815757249575241043509300552975984530120765166651902695473133577045879046382810196282734977569613019582399850160588046686310528122502371771118975438171811908670251474530605429739149506248017931783850392889060530195322123415389688009296599574005012493048752940229787698513588849163407738561955340905690889786241012919410987627364570825247564547639811166475378140033762268002011034070011059170076064255171442752438471617565673464673262274142396615744087806649588292014792959396228564089247663488334508706062889087643286855719829706640200113983984882121778823148632826287297942033177574431832066269700929437729376952784128646106713016282619940782953286824578901636637087320196147997613027280370216802232605941704001761403294997673515986274115390339253411489220068686115317421835332428979201472583251203160882115538714457452401470105591126072261600503680015827601049892874877632753631113864000681678004287816280654629756947788667078874892832130830183530384307459649114046027535216561419144747778290322452789656295705599099186163206542719870855822177230574437695653034343341148421620049648128715607460823729075379930223210657285768847279159099039786114094042594254980178450209644689294542375593664752335660242726814613529553052185854803644379557230575060738394624722817771411044217138304700060043161881167507780908507890943892382869296772497677155392532155754805221578356569765941896362499642369493972881079439067375892977577977851067302297483725686532932346256296753456864105667359792414834189117902674590877699298519146808164701754351306545684490125992529307157024303902021273495285398259598137840052705236262419685241901742083081848028733372420104022301414531218011919756511972487821328496976227248417652214935178195799231709443388852521899383402286241166740804695157635107166539558465392812360455967636042217143499838440225099036441349034868108050941131866806114054972502628915885204708434531508581690777579610528989004331389490699140404748238734023388789338360622885786449093315238100097577989399490494166283058118055819288171392489124906261857363275962295685602988260139084588953600297996040371698537438753948324474832328448466871601705432631878773589477508656499157007677303922512786148854364430601799642026988913492848942091891899274631791150337682686826784959188655650946120994715695875306994628004060502445418395065322249008315022837772137238949875338972541278171885262133240798903563033600819577253548929977828477924712769145449712185112955896942363063372693685428725070821460776701969030313353644638799308645280850749687336064409152542045577919799090997488087527491623752989226902369050109756355249675254765291144102791600603322530869486805466732733445534542627764207284690259543762035148653883371738374973018572952985161683948010067386269124568691960142689965236815809936335048278105233143432578366651820995153135244294010117503357180412071406025861327662518739706821055729037642327141056790984376584444192072434568651396264733113606719860708820612301366300216420877398876228448691848216856113987300052490428257783299789754057866432933488192364713991188913348470729204054583378906878012124113517576456059451833172448956158852637410724030400461655569555979326584582031730585975287023741356516158428591716449679767380003277857451116512987844894370963137686362204639780013241413654457433050826402914236150554454404844612008009339414562345656630038868470491650495774864514274537468354044365641381704211060158608699118792740420671613679467894255312034124826475731705197307249446410468437542765036691965824539691084403948437466537952603766728778373168564474284428566201426946100239802849195930065528250156653255300065327301889237595012223148403567066237840585481939441664935908672094598178706125495326690405686776374729596741044585802629160159138219911020568498458330274800877790527176364974808680498683553253845430630152565640949496108909146720516542970273663518476739042201866208803769292088887791255450093744230357217309621030825211862529389976730174713093581415898556580585600368269304840855885574239471212699603803734053493946465015598968722 +print(a + b) +print(a - b) +print(a * b) +print(a // b) diff --git a/testcases/bigint-testcases/BigIntegerTest15.out b/testcases/bigint-testcases/BigIntegerTest15.out new file mode 100644 index 0000000..349e16a --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest15.out @@ -0,0 +1,4 @@ +-94429730024920627301204494616035577821815154729554930752594793914673859721515351182006440210372845307118008705686575567016553340593076719327895253101026637785372054956545921129119177024684465851973745425614320721782322929677308317319584333176881424003709311353788542300663883439195574402754037875578175644334647497731813646702970818213455472134876131645253687936692135796273980117320688041288720886225915581357430343079642150654739121523692456186856735284249693220362813586482431210955752171971462999477535818265629350002294055414406985836027239538723210258681377475824562871747361691520077259339888171352963342005186206457012837550766535177588553832804883245527946208362591763251462473482193880563468535372100866382675171914647185133074109799894610282480561358261422390578333100029391366773931341179979710714936834675370768903896452770322109933980318431468161865731789411218899531231293245776114123855989301490908660075108124048353652631035961324872527321885293821799416152679158754024994467557944906677985927992826481724426239188465471082394824103944384397532251021990350240176228530348261426403836926280679693673493607158515236969396155379324946543818295182040324098033705100975759922285738036184992082493063009468804461180947962414649750492899371384328438513511251019752087871254166168971067851862910265985940989662576041679544202122499071489701699955226895308303581600783737913086773971597823845467934112492994610287850180479511035435843870684037276615563684066631059113142347780000932561680369991706184200735188388456273550782928603653763977892671498794266948960155930818322808973356895996828844589883866649284775220277107207530189106071341084108176511777368058094089217819933573148001487739588977867884378618639307564900994265024303755328034524423298023646306415852975326830762153778772516457824640643406006722648920410172105522183876940411000742141475742855581902520923347770010799931599032560008645507419847004885268444592230540093934080674569925859805271282729394193519433290728658481212450347919563361064870397737130227126209467445341509480132179181914046736546985212387352986365527813440705028709959534952776659938705219455056811408790701123529765764163582751922731806994516926179201436538650520755045039956294011579327050286842992856126983623797656197680931916477890575516361224146322833743067743169187653401265505494018429699273409218137499334169781427551250435376761802320480252828727930916777923955427849227230948344646703214813163486697833688625396132071730483054026845121119632658330357295952370899479271366073918268629363671677939508128659495277665741148429909396679946679007512859989595814318118422011666621575529119877989504300396508060046608542646452819878107150861955565450094058611502248009241932751748912629719466345205402430404345053454586886042610960812344412363556833920964852688899778343430447088807959904812251225435818955303348650128827596097118326898066354478000368671017823249410903057215575292355774772993058233205146700315041703791094105659544196121846071808136068036204376455105854754108679130535106089215657383759311837792509608750168957641130258392282053595788194381843320148004857512716334541950822789419478531885958249699784560908833968238106388582962223096492657394045935757063117318070663860966507337183567349185974274448003013785090364421128185733498063619819565361776450518692537148707625932413482357699775310118173586165578346210330320945809110170944375662546121026420447805357672379299854866296114618126252417307391671006426680798379223484057420730858978513241974618267846816746861253750922224282656225500520308639594178518280354937947571539327798064206101675650011734338646385758560372189652730775713806827188377518643751926873565884274198083881979397182877053282791754773702635387516897745270006412068966037290170072296397112838680620465261527385093777760254172569926085962825420351212408392904717416582542389989277140081807648304591250275797870118040225536831606628723078766840521654881881242978548570974586158719777311747620713954988167422506287318000775866736436797977221108595726415931425781547949638873978993724984528795884848184313689998572917768578948645238263897845348441314799220289235151543491090049699865233457795135893837569623441721314444659361400529694274082980808177936292992896859569804205825589124841380797140210149698525020332841317345255488725960523134023602683146020800450015219636537515839106656382937608878319947928899027178455609526573418476579779892918825354313249698069824874828809207414052443872312228303389611624586988330829566277315717818628580187790098375035685066480414230532242834584811626998444665784869876899560620092263182814384133092230069247040506046958028963230198509509034026961258842312496932634092398770542852635269401894402624398586764142937341927678060780873171647405903703823184438144258029491704212126510832683295793166526985890064208102507914412042952472245 +-94429730024920627301204494616035577821815154729554930752594793914673859721515351182006440210372845307118008705686575567016553340593076719327895253101026637785372054956545921129119177024684465851973745425614320721782322929677308317319584333176881424003709311353789911282921363158889029917242499529593221823557466877849443707029354488879788494160232245312514758009778115141246960578354864830796724509001183179943147331427190068336861480379795971899876023596559292406308210786093782198737607547981095759054309584071760002718343136879648750957858889530121749445504647037453269333328349484250453261338039387539813091727024562154431254310287636717406626559776312584529041067113366876095766336925441708135611093396954683934676350902874899677935084475785709734501860154736719913912326302140273643303498057790947342229435985157457787505002404739382351464313622236859108132885881169311665151623858715731253349895154101191229836168480745104598657374578199275748870945702634324748477363538637053037490503421512607463764049053217125971257018564484064281542834128930481903412710597387377417874555345825385337085648308060252175699332429133769966111046650508420226166151245938320391622569709123043899944404078188313502425378567886412039592527877308939198035286130859559941737690095280605670880328382344664298044520880322391764116276236287481338957482522727039459465943512873192573956156196667804268235637635730363247326809571246900178545142393905543600675725436590610925773366957340805699505438343006055493302113974456918067608738711195046268897814901151884544656399494477234404321190790774488987666931759841163331250911648097726713690125080047418712441250594542091468208166979467843843844483327195800876002851095597553500445687878153203142235152014809968016988401585191912942944534507908045759953600443274329097102730219955997417920847292736585190961925588584765461891016867048924268584817766587869307057362813954207466796267280293426199839982286788858292013652902758011048315231639629813482898022375479845810717121668405016990291929503841501936733498226559802659601608968431359682279369073646663962386485614137203040044271776550734664444704443813000052165719575765435039376207320295891454615599719516210918189382300809398889796825911449967281461654881810444229192848316310249704594660127812610160346029602382128182924823141766225947017594909002721042790642389470122557948483830035355292982367332598839676528508833341389302763325911652711397112040704169959653371531300662751061419971584754428029669502115072087155165661725822727291077734784960695973673162438482511990462141104667981011362762988513610732303728424795261680248605118098892116819648411817947725720402278771793658836652591458077709877560278824628467257440166661469067219941414527894028000275841682870477181923730175832657615509147442820612558712812719945841021465894579542085665150744883062063749150545507227940021334804116375287504805266950470081112068092700757307552006880232189289517976403923496962693879270059016789408121014152041147418369516864929239803660509083681739806563314318904638479239684434677211446079527127480259533372247823673804209777450389964325038841647643360832558580868464963753009785708927644867117252604492504587986390088290298131811901143795712720073167496202151865931707409479143070700401193390384642540506064049739137436124246526854639375067809254238648082298061231787441790931149716355581141753401193577826924262914909044595175256620376929978387645877962501061511357853591737185882774282740091682209212948604003144944801156286279985451368213883962652831577118818244417428763749657692559879558448753986557820241635884008530492966832383315376328952656247148392424659445136537949639240100173968789406287207995732273368536261510764845806451680138918571772690309427211497219851790383678514772804896829954593478372922158911081527489988228772674906942478392019930720524125770584392967271817971654966778749106712700417033611626142288452571984518747626745111738433972587156064426609371897897297831735964916784777416160117996553770031033092723919869697336755868602282130833658807523639427615905269097708938075444874667140998913439019421384777117539372806655037665330817899118359842856751167786640848534449344864922386644560149810045727422769822650011491481218393658777636220255795358314829893838777792844207534824648591345957207926847418639420375039905302831499558079096705657548677193283852968055225240070011732212148408504725570315740583073731783090380023573429132788439722516121681962941683095223407751195558175206955813783345743080556930696529192181329646983580464207290324800732506972064875721808543658994267540450931252290569709624180181490640783091329552171787945950246781523639542594974574288295795790581336366510006309127030410851912794590112859301198762179403578101785839653125107755329890986016235257419200692440750736192544454444272108952385097671676209495807342074150409689 +-64636312491358153874650331852089891598855365485032849504859199283230236829185546132249666129392967634221595726508849603460245272253011444100976009374850860857379059666408619619139859362764626159753101481398730881348004286998400668797551819293607227455014907054713752153056559478635498404421109127657955617583096333623385008858709098625529435802420763702708521444419055160634792646760871771973748304820717647655357338803490897658668074776217639788296730599514148399577526347307805155815024057397925684119381860144260454415195241542532440312129165774583399517597230857391817883545223951672239661945999441341309028112104611215263858207956904306591858763247833654196957616443696756677438988481115649620985950478051800062747190002773578951507818425882405130964007206795866818660559570571201959832346940661236465158708287524962067328026561989953801380859816220963281182251129374950302481275610244384558857399972190748819679357705373479901071588032250011358436290525227012180230625459164371243922343690494003987299407053971533578929416753038873145022034499486567347491199026085670973506391201576222224113225816688559225769714400418598416483212048431235428657627630746856641509176820390502346084715384153618571738319330468379632278033416399796084421833515355675961942465214006536694286932818956296733439441077195023983087411893020343008719893162321161820513857876240031686874470651100505598738845581831973681333210780634342087286503349574951348697778184159929360308135552773499853544081051845864381292641518700462527972080910684922415610603860120161460805395268819026303968924075224632712484487182395371688519161068442916985389938343516076696950585643934698403517877887118081494233230483029308928508034363601473014559069566058309162105336300118335803486666919924881715047736757814326558294655432687437212856615278184123690022710939616655097212398687814311664483941001741279805947877420168970599104352821756114120438025516519070400257317395978017561894909263572161799948864441127859559199621668125450436429484327023864041617032913698976720288918203313600012433293217964593608752557176059168230660429250447474944078224532654009498810388782005116182861069771979351157181979918980996244411367351566863208654997990866926317995561427750832565343130378109429984106005136597222934674827174305103170935480191765583451449216698915301434869169997814895301277137536021786318453026027408407038276644763719561851307392155564914795287631738031517510290487998040670739725848253262122260476757388177840877732328931670563429137162693617837255340984343238806428269110053073080188692936428061216566857593257465318626404971226174846042974494645536130572931631543197654793183815282264342892864892408083091732534622666846652632190366785874413207196208092220836947724037639119058266576187530563815358067273175661076940853536241046466569308877809196832630963109297092507698647436192174090745657019077542017601948326949203067288003485155544790218497651895258519984532087356534453703037801930052791032263593776524309015735472322607043657672184869060835881853117333871661072228933353964755484704021571075491601370766711447262201419757115315163472321796792621029012154855913696930401851792489860202634304665263735569831910650600158197018419591409345495864441660201470616603965878923953084032963813841637424678786768503027089292631026067901722534668827315133546675322313338551232034667934976213039449113150831477064383912288186001971666228435047437392505644503743103319512543913078152473903137660697512515388474436451199042715687879780049848567672735299394430140420509736641254003658767051498182890978192182983161600766285175651050340140674662026968457829385924661334682827700221772521500944362216796331404524302039320087083281064737832614154007058598644386853059429356435218572103502578016120011213648981578825212561287969829622429293683591758893963749788652532990546257241356650402958731741523577656573629892417605420942469680820511324966917465726663342230226039312350958452463957129733770044112411565765750387245817268049146381899836503745732472028211930932490455828763125286529797721212640908228374237115616112368406970509459848549535652896515986561727533663256173875301323568869203816699510180253420748652379472933158839538616011245314270019850012463509392079295737654895893136241760620521205492674038390894535905075749368718892176267911105151504365986882720197564686405458778917030896087463740231399437458421423344984963375906655375953997819805595835056759852201277245050876279375716916643762618017116540412079258946826491227713660142885671703202258176277076036788922637052992128159143226651384751847921787492653464378614168032695195764208915872528761199983363469596535883056602970112649465815565318727134008252229512032426735349808159329050726398324803441976057492087316618668348049913883348965252566365913134282265751557490099963280485493217619324888595724835882039163358088610061815656908720600940134499588586856850638857354279090669843780774857928975191674879912119695078028940133330753965730098475394563973340214832208250825108657182603500677201478166490793679790445687776977721311040626096790269232293700578741835617225254937533717641579943111709581328053838840799704862792359194445651405292460333724456474492168913857091179252375343336699727421167905974220335670550469167319397313060545867993982113861710695299947222964984908393195359083827296405011226114275946152122090755588079905453187425585961566664080473095758252728782713892501024649757284652863118440650164344662968336100320376191263529894173067333351698641121589009129242030198578997859843899117836496258241120702879177950144413716470372830153136329396817733704367242730617400227014995216518380574500826382282014536049149196402430567807571161481531838859046758033234283908962412279535699184733446331422387625584712043700469730926105606580072253360669836887484563871689881190565382879868764375583445812226554655102195055591729568658361929383083495130348339012636679241948940017571432533131714662496582529009009543195426844750214515372445789424522046787774155307825601795413364447577562365313478620472806694568619216773488818500005896879584717753253834378034119871395282277409910251510135694533866588012695211349208641313867126793426131789712546185378142152031597818584109687196931606189694449836163789246904000293763431374740666361751379760077920312131023643378885549876227982936888068060410643294155928304546858762583934478185910408107977939504624514997582186264602321444296014625422953163247285488402663457902014629326208672666825248208154306358133282092566013750225336916246855053103235213716019646132271781682739837666426413121315286143664396186047189794031799639888784844416580143499309128927183387014663440277934962150333701687616596182267507620212755557488312432303186386525415854910262945985450047978638228232956732795240944437318376759023163833290381539577021672210583262296247301702981409059017189428557550860379611815843233742412645655788822615013504310577408232013809957524698590515596085894032742628157844691343658571212824102830709257018384382462294845658389439560769910313555213744177360982099315323759861340798456438169116966297440447314518670018824842539907831846389934475923480783355128205415671578260232916674618852593009361247635775792915523479332966036321613011703647686707057482929038543337951402130288307904524596019142464053922083808559483577964616512490710361389973251754266600431082517150351105958064738708825801133786502335795575501047195201364031978156713483656367617902951717786438503810562056909873325909966666400122811572953364728051326144317973279537438063461429021012844263266582642742170951706389121432452905987510302166754350786140600241821305174941650988747228240950553420361886423965646791755383647503841049170038294681354977285822099531561812946319774841137535294700289431342776118892646578221748794167084135963610986936106334112295823584020042341059040443834270431893725367452397345388077748961950545912128041403664105886644987821982786325662792673884241296910889095764725296876246019804420612434099638789907576771707412417102229443492490011748680309965436469508300442345494822329265478350076042507296268566795294634094765514709575095860004787583429883217758302372886509058196720048196044411593795275223714184711435768950010509501818274065551987172788170205437248793523546201012146428307132272422549030266033142751491879628871702555511684049685039585320790559532855408918867095516696743338338607137529547534082958720049168992654313378482543890181853324411253682631586359273882397098360925706770807914798642613301218745985758017263345502150675371242272897874003645209218376749903389202041993637368364119865806884381349802801516002190776954752471709570052992281566464595891118408653978322052823031131042065094137272484643370707546675134640670895607399042903290267874002427743421646015417107329543307789155562925583357251347506263866404798633178764023411870973036134637450497424805509080651662855634984988933376121205928603487113759368454396629804068066442913992589332762844497844522123497961417920177524407950246617601934764151976670357714233109992555242861596717507743214245131016713866997731999641851963336945497633496005084922258313089368989660684476155141115838762427631893919033660791643087225871051384576552774665463404562188346429355838665455974208294191375431212553158511574842392114728111132056400533236454249414137938610774120589961427018440047782874437621329695697780257817616780736023631002377568692210149813767141544723970193246503932337662945272262434174 +-137956104995494469877306533390773538896362179316130077019477676885608861610909877224300900803227014042708914911632446497090414185211575717784011808719337766974689508306225262842498622594837302130151388343789471519500002001918551690824587869387909077573457696602916 diff --git a/testcases/bigint-testcases/BigIntegerTest16.in b/testcases/bigint-testcases/BigIntegerTest16.in new file mode 100644 index 0000000..5ade84e --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest16.in @@ -0,0 +1,6 @@ +a = 20135085208337309320952448781167358959422004172273875165805296537439124904730785513621333119604898636859521849598647400451140290424486032931915733045761775152206260491629021181798296426541914825420381331460220518573996124739248251017922081894475899608093493940296395153376490931526590529323138911982444975009570681817533888045368874738680172648894907192268197494108486230224384841096757186894305732373681023629056681566513487958383490951893780890026827379154544610362749799507007008601831514822219237644078063937567040028280157278639650865271577374570871358409257847967494398432407146574045349298827133605337909365007380957605164501577324573178150132662306701544597501119355512707636849541551368514670038329712922257691069073048006136961148919619389837031098305510238316288511512885507690888684216264316782382861639808946799606805876246751233037877923859452191859453261589106872738363785986299234972999665352393329738960637919808821864005594470169726747980477141316121652745006995667703701907792428265280086685910434353283042909852108454300493153414087994043459433748234904043054793723438236147465422647968507848071632974139426250557852893173801882492551365967842420164656277838943730730930552045503024797741057170753797481889578611376164055286921893221469671422295856642016891321390797723441426814675370212123344625811453072928002484383713971946229940356935896606509793705646967583841280717144961419552223751643931671240904021480979974682338318507177058888711302723928796466261157690385447148585453201027042577293245456802435150277765706980797013565034915486614152679758491328258449895331109938443995137093045452498856640943905741825794792888208460188360169081795106620341532454478799893026903960690813207981145692552080458787186887776126648927028541977615852412686828998502641297330850475844910068143303021800622191498606193880360986997452108825318520668149115774993556483352370756286449516123732700257442043415483766906195066362390566636735327399894801080401185068673586777348134806454591574609463807494489693480351471165129362749042043969331096863618988781854543688266842092773688318888294852672453201725473371955636143257794320401251746723249414342959223771848914211148991476172439619619947349852699917552002646407107025678961185736088158265842122126655249614648293812778460280029295178958148232425393279970516385350914705698806965497010172871170232140347824402942272339906968148577451226111171904840041789775362343014850556541618474711584184319868090642215810553785342833244652534296104283630526803528035018374147793583905418426172234159436833598842429826723668450111766309901290618930837414419023706463668048327410059217846217722493121517099291704740226131169229227157196606805745239965739865101314265814080181063440491132130650156897612958864141054745396266105799809795972937503471134953237061022727124420091424429360228462993151832507235366993497593641061624750167759806362684896857111787874270140576131515309804213766648402445469026673121098368318249366319887383273215607317676304377766990077058203653059809766010877064411146886824536821574001498215647692059229668424294100750919646604273902669025965841450433827326102297759250788209274966148265007547052776027709741349010048516883089865356968420340046205932376156378758613727105364658708359734398440717821175985603823231378183116385538330932820150528577940975430231705896680983559516469955464852888718204687451293283433678357888533198478977513669882791168158292831336818203203656187129216680980216277890012840577820724493872934467092399406838881212892024464017609936012752751125163392476602273451001889579200771171776272683429544105753964389736677235633790050940354302070021915064915118107692835675870038378348893490821706305893049357205760330734322997745797216425234376877172085329319544050902477380753934954439778891867190811578536322288218014395632004233508603931111031568801255105388031387457035634601574258810359334427455350300035824795540182184947729741084414200763331728131989835270074798645727810610211953423210647268767408997530916747918774211851399676964341759677890694571803725386566514949573036275861789578770875975142868171266115308417609543675129693427234733092352415849253067857967487423677061066309781149019464083309173772465317117626523603762303389529186762757434422437688465787987567189298183331658327643943335136476288895944031471631549049452415356093278100827996976851630898010548397492102975060582424960521410583930473685019986599304288152128382416991576889958354958470914469728014491184688746978048623428935134162199036984905582935902858347846832552481849620324345137846953625446578630348562066212649219354003691611919882163265434262559209696253725793651364915752721544045546662070005914090772613548347094433 +b = -97142917115100903737646309746786755286254286512027727847307332146074317010165637448980042845891477089998192283848286221142801999564157728180068979149076895185098834721079130584414339734389723052487178754141957216774570533759532368724375303775641822337079499544487394011700805693308205206944123895795467759730250579590051222911731414566446989757236386080716001840189315839600405030448106994926127682500256684223471908317781386085304451570510257134680554188818647240246362729557380962029356714853177321147452865291513645872393180899422350772932349825626502651573707547888641717674532894893074688180795160357423591745472403470294221646377615279206757162297731792475724868244849324396856900512100863153364699508327030885922319301979135025440031457375910427519751422204648774837860860733516381857633590709322279776812553661762838489489324566034767727720185975433645123787381064143436628654691449771267985992591083089837955934579579236720987500061796676789670232907568481273019225130787620766638518433114434451060361050760717281226617086168210657932154769474865516143295325437148850002822965510072825182997986086886383511854207814201385976618183372853443994558731603600456781153893267452897868033272261390308048510310139884301686666435675386967399498335099634758373050402619201773563341590202309220586202329148224178409476752779386091646462594864259635604909319364961694002520845130815034069824534906257949186171760461565649406320902206532877507278943372744922399289163113857595589828097446154555809590347435246563629792562494817813456155853933687368555111817093915177621460440380335528549735160745656509850403510645612258627715340613515002921700266475347834805601353458051639019395459041110897336614403445440633401272323537023218476311715586123652465434335035484807279752043629273583913513233757079708905632822144630036808560113656376702289569103906476853241017533290931874690384933821337994526123702599393597059212008833173131142455694628853540667838832465035764287812637886785119550714541434539156142684590896189209643717828641490790995538623537465578611658293004612991728813162017777637123402750487265147585191026018739106016634639267764171838886880928910897276832140531834313627940251637796261436160575550070514855153115879494589945103062040656827678544778419358225996637623900426047133045710743848384349010560244710772320441993766398499260022963758631346258922336172990771773841466118947644654678921607702238151410377679581733317636845897522156786405408945860507065724933665047683020374186655032349816473002209695927640046170746524770352275065763166138388869085477252789876695660321558428876535315662097479102754293057001395225457977936128965654542332872912053855586028598933699292828876353951023839715868280228768309428380750900744973372284897554303133983872833218204477569241810711852765603718324169312473549564122274409938826070250993972222508843819393977100230732304618749490018286969022126348377498224245475355114206083024624783175298311415147634768214609814581993552322176948068964183824269054203508986510739955656814136146661895664026947647771407202263669782450802691132881958250683078491537262026238875171687654375584013816368575352071428845857426681324215854141857015337550010689950233600048967417216391204305913123389821644837434645839065504620037807342911107560701960288831061817048807784078544517857813531454356849838918387542244103652438209490728925919626454342575667654508811373136862709860169622173849608262268392548535222961994539183664016355340925000689543105517103796330278346053558319876800493937779288140384177163002199749071407240313717922245779470057148617348946479155886884954895086813502461615018607688170511297259663850473665790154829538371559749119495626251012157905673345801638716579076127011252270524430982435091177908224306786161234059527595421487035211340386399352249485628832469868898549985628941440028934465620923807131387080776881238646463322511111842754445196038956222234659968754252154290617417942118928488328483353604921985667168292075391644213073111611408649636372989186944847892134633867286134894522753735562398214374944905010190398631942625801143936048831314146264356255960806671993243701759317723689923827460237462761343285789788626215708242409501946570298963429180767906088853860148571270394172704849666821432875010780117309346255247284857252889555959872699011835821709948452739219094652769690965576139592317106229208615433203991527372866192480246946462354418519586140429786456958337496270587698155437633841832421675343474325738570407521783608352051483062419735431969077024538914238909595384261330448790768303487780268384811499441639061164958190246936479280318214962648597050974914030227525929596427678325874960639412589499239341169861662523998391241773031479499393771427 +print(a + b) +print(a - b) +print(a * b) +print(a // b) diff --git a/testcases/bigint-testcases/BigIntegerTest16.out b/testcases/bigint-testcases/BigIntegerTest16.out new file mode 100644 index 0000000..0b2c06c --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest16.out @@ -0,0 +1,4 @@ +-97142917115100903737626174661578417976933334063246560488347910141902043134999832152442603720986746304484570950728681322505942477714559080779617838858652409152166918988033368809262133473898094031305380457715415301949150152428072148205801307650902574086061577462592918112092712199367908811790747404863941169200927440678068777936721843884629455869191017205977321667540420932408136832953998508695903297659159927036577602585407705061675394888943743646722170697866753459356335902178226417418993965053670314138851033776691426634749102835484783732904069668347863000708435970514070846316123637045107193782362753210849546396173576336688883737012607898249151997796154467902546718112187017695312303010981507640657062658785479517407649263649422103182340388302862421382790273285029385000829762428006143541345079196436772085923869445498521707106462926225820928113380099186893890749503140283984436795238188182161113254227297103538720961579913884327657761101158756980848368901974011103292477150310479450516865688107438783356659142968289015946530400257776304649111859622757061842802172023060855959363531761837921139943192363448147364388785166232878128546550398714017744000878710426654898661341901485055447868615983551364317779379587838798661868694618216213602016445521023382208995115697308552093670167906452578569311007757426454968049938104015879523117969052806562676906834981247722056290904773879137463314741200610981602330479744420687986768678454888945836038039351263942424606824795350418530939386143430627013124086277556178182643977041616786413578560688230566119961539328208196824446875345420041935582480987165181591953615314502320183720203520469550422843625531442092979806560569843178831035289959315790716272870990961833508245419576332405268330569893571572006647148147708680630825015087295968061100546928081206264335491294154191898491970353354901667377605300282972880030535838823049371864265672222219532567219247022840772762492709440430885013651213369773761643766102645197651077310486890318470313356365865569365336456089734618069108364833996301302058272066300449248909250960643660631949543028995782579714483645172373896872137723886433563432913794392216202743623134590496025085417282419970668716479788882050287169099377630895235205766026794672393100415633549801999583592683270067730795501773770797518397416931069924068981265065752624088016600486427982874672049052932539293425326000119601541701118294544702382339014639553660700184266507676893275847070535179141935848867327385795481540613796957040804563632869689516571820467913591644009519367218489751978127272179260719962696851317815956277853230494834760426423549352196188483823455642582371518994309887801555595324486655189560734068929307228959066697707124723866643109062534988802569563279436634930893191221457063171003333715935605245613428187065315586659803908528196374970078429169037348916098945830902547793148615356400825267723496937625251896377225344271958588571135539348618243326331812884048651659988507201380986365769140787908872453953858698702644296440995838596191310206362188666737077943008835854260936770706996055376845245629228689634666310558623848823112967925487955525083380472914987850527124918244102743559667430536006579175708750330002957913922523858699957368699508114440556154969481598631502269682686746006310701978252399200967561848113240641063203960847166334741427993123424029688389809601268673420732312809745366403156498877722778936304123921843579276181811733640651129284754722665744054803701707846845813151684737871472862125300825906317437768232833826003866026845379881301502964270977735731461471227560966797082386993454875166347056899955115713178622403383958355861054217951493275663469612910119363720132914473456441641426659950380973779556779854979932410686026769805491939790107984689293961482989929908989148730208051370584557830586451444912470593761641658290362227697410927044396930232112319876020355511975626133258431935054076208152870937228596887807204618454216329495077235757171198747244069152841590257535178456805316845567345301001196696213162341918177438894603717119367360682671354058598056454697054210438386673245376110851570899772969524567493480280817938500727128393341708180014794134033002729668990869940535558357740754985824885503989182280161303822779680087683254152767649101087363431903688248022682886908566781496869685700257776541040684191878374811976450323150621298059416526687176961012951107787436227139896474855644082754843487293836094625619019202526484652476283988393867285505459415430098453515970780099493052055593860866794315441686808540141890376715201924689801325427590442921470935298418764487154303792107539511611616587917214105565743294593359362994148064260495333868468629621234845761224583486619625816115861928385327682258865951046676994 +97142917115100903737666444831995092595575238960808895206266754150246590885331442745517481970796207875511813616967891119779661521413756375580520119439501381218030750454124892359566545994881352073668977050568499131599990915090992589242949299900381070588097421626381869911308899187248501602097500386726994350259573718502033667886740985248264523645281754955454682012838210746792673227942215481156352067341353441410366214050155067108933508252076770622638937679770541021136389556936535506639719464652684328156054696806335865110037258963359917812960629982905142302438979125263212589032942152741042182579227567503997637094771230603899559555742622660164362326799309117048903018377511631098401498013220218666072336357868582254436989340308847947697722526448958433656712571124268164674891959039026620173922102222207787467701237878027155271872186205843714527326991851680396356825258988002888820514144711360374858730954869076137190907579244589114317239022434596598492096913162951442745973111264762082760171178121430118764062958553145546506703772078645011215197679326973970443788478851236844046282399258307729226052779810324619659319630462169893824689816346992870245116584496774258663646444633420740288197928539229251779241240691929804711464176732557721196980224678246134537105689541094995033013012498165862603093650539021901850903567454756303769807220675712708532911803748675665948750785487750930676334328611904916770013041178710610825873125958176809178519847394225902373971501432364772648716808748878484606056608592936949076941147948018840498733147179144170990262094859622158418474005415251015163887840504147838108853405976722197071710477706560455420556907419253576631396146346260099207755628122906003956955935899919433294299227497714031684292861278675732924221521923260933928679072171251199765925920586078211546930152995105881718628256959398502911760602512670733602004530743040700008905601970453769519680185951764353345661524956905831399897738044337307574033898827426330924547965286679920631115726503212742920032725702643801218327292448985280689018975008630707974407335048582322825676781006559491667091017329357921273509914313591778469836364741136127475030138723231298528578863781248656587164023486710472585152051722510134475100465732194507497105708447763853357505964155446384262479746027081296747694004556626844629039855423668920552867387046369015645373878464330153224419346345861942005981813943350586927018828575850815602636488851486573359426621259865171636961950564335218649909253533138325236184740440375183061125536505800211270572974274559788726422859347071556815041319636689623475538090148282097326647081971998769721685130471420418931921645984456375713760179090634546977103127890638439518960045583178181036322674025468734049293482065166559053553348338045435264634029730831163341710296556108118871403528120142249977020699075511470961553194671085396651869072282387128932737967671612247083659348593772294108183860909142332466902080353165200914690608115628914283170660078841255114650690495197435284071207542269810826662815117722646891194350314955473792958524835818349150494319272376692631097605942742308159961556126989794818291928278253039782210025785898754948155185932112425129108005280345097063465977943341397977465733274294171270091810161691043367021995444263233764912707569815920436358729548882993034411607309922700974199069785289669989446965483219533884144106171712485436096409807428556372713498824430146143538527510707048087239782062431326391120287370520482219558997112129906224085733381686343118923874282813749734961030178694979265390055026663766681343253066469047409171946659422068350836058356658056731167770243046567368982997424847746931049714790827967860176744603286677856812331302121050536254566836623345022472125484217012601258753980180888394333458683663333319388847139472389512592094321353792028377496023281447434872273846955835660938699129527738242418649578136344034494709968147477356019454849315556662115319054287979086157600127066658229412897554368253713799158127345466442858800922221620603059583636455712256889665550615204909106374153412526739974052835599581994124018509140750716972324693103725035232231103674843259359010176927267365053520887472195853695701639041694073675729833179007636608744578200231989398027632613888388020696308611970210962061773537551731783943713072844820078854143204357339479765045084929028115038684241322514625592007673199507309443430180843158270876740877739049437415000944546661840370387432022516257187002443589762224249413252233432680697041321991511622843236171809397784055398012158701113275894500967197233307138615136040262118005135844579486014790404768877285041346530864182002600742586833912390791363858986888022128686433063954414992062713907209186068397155863804093047740865860 +-1955980913499005451682748824694762787016293360971931233153342351995656927891224606553017630749579137478892469785091260847911181498710837409268189766787577965124356400534464964819177494167991630183051288623356109108477091316658776482807161785595200926031097223051776763445699329317270085527877324403913494593259372955087696732912981313551746344156481557233377961571340054357934476223584281125570357545486227577659591396812163660746318100219649763873597091299571296455953466551728580918494411355931417543544186845992813376452737620734561307474574594312461475225707823864999588160192367792355107558047908909473269991831961579154526541564236094721243006634027831680825434528274388830987490285856939434662007002401030586069335405596342067315775158599502017136853352501396751081784383690094027080105718195977372814930410679755986731459086299398830646283758797559206297746688235982739955695095984152079154856930796273450963938818777880095392291020542566612372029274106360502925785795283632036565471980281862770922444196206839752096591785021413775724216977671578182208483471706859123939583128716918533959833564402612955273246263242621024423723962567101962208776131528588657403154535708370757727156244352676325003589013629006776139364449220836322167356127149477005557537966399198636988673044393247108724798228938753095813894936191415016494208556831529427656004701482154908871383537027809177989788985976661782754685155380128479213226392341018187287719921439091657799418618596240103445746438505444062206786452099494944217978576199489073147422993226321061711343207156302859889898061965511674691361772284162740386269506843832464521173613163416726341980045111441506599412764999890127729690477129608860657927106664929779232311908630100639114423543169322155825697394079692035963374889416660119708946185547578474767154332128695131926030874738559558754336373389995837274015533617600725436266338996255411284695535617981959091770394375966032608959464508492091629014690527874620410941890578375145236503723692011358374965555711790624228049162022540837486839349482969329126276268673813700964668503524467519002748008481501462913017312906228647085414319290525526390002042556258411039565868003605166917617466092547542145268544416966556628143697816266259058995298629577151899153561477871428584804554463331450832181030211549258802131421404753388614295639914820481879928501011805169399202474496096761567011823202853925575038558369154394284890856480719358522428217493986757522541680530315232399016411604370524735447029170138768115817197650429668310190479842051256014338642149816187295836872804763749272560858939568667374935598649954878709536204389567648994729322496963193990084278991714934867261913778004737524496556899221704493832140027449943811458977827061554920378809026220832286280178288880769958429385479872004443533208155585745440076929812500865370969916490332722623406277175439221598724533400810792277718296434615608385882338293931607905835806015274388932176244644579375907038632979767893855027435730351039523725081943080182661127741489693923266321887613307838708808080114742329537319984330589963132185932828779966725918671950934465058589899896150718762744636028333799162210217938952983307348781944429207388533326599751381463300730146290636375057034676263131957085536618995342408591011575345198516555417600648419744875231289685178914786189179144609389644857558762246858552078274486358824841467711515452754245267940519557135925196769516244446544226397782244560816783081935976549195000213987988599670238882903054626605976715181269489662955294956338663188878927424598325061695070211647429572736380053837903599116216840788869691750897538089439982489577937635484836696358259520017813889585626422431063110384724030056670595727208581505450620242903834901177364805874166507630091534719408554936318272625032186209762699592235444715755632024004157893262855630169956839596658433545129810943186729245226248500448593404192825217948302967932069818220892916192553657346507309192085213935114468206130283924796658017147877483556090782923965905276100234851846582028183596111243704710401694637346411681232053749366289227777298807824038467247508943848058408319809707746138994959933645054259620017055273820316852313590204224718085631186710032478246051666595429065635811939999363906822718860448887583228810304091067849381314357155405043558854792322736647672375884391138922335389164096888148178446137767825957337723097429535832655647958572628175484974453189481702724590567493665564628890292074723679148474593354717924877402705683407644418720074337537958274642204891275115512625658409645422845913009713100778014810704110843259866432233674979384949060816802137017929506278749993771967426076925692495225335289490710011265726947992710463323332281562694032919311391627496729229885297084076012263144152616530190804606305352585212325131517518596073423952954364643256308187794551447271126843167372888305228002213485461524665305815497551517074874357184446503246605232119638894314200573490288430377234008260990242858412236837265351402731070177387954813622234993609982432729162327537017623181205672790971228767141305918431298522241433061374219979515024995197143304392592226542949812305064234942630067217652274995133659269394553133723756441128738731272838706293345055336283474465787016178713653856226893306624323612143982079303102464592529081684308757237316836841321332981355909958256453883161374071233791342639353831607082229365363671287479973102331916686775057318258922570196521186462952779788995989104454573015637609159242956611955977576020607603654229811856593560457439651562663019312646926071605708595994305265818502480442540155233402022505723998664932762492077855000838786334213022918201917992749701996710044278394621737336559101627495808055974810221649586917149539933310403400662858903330876697565168324429108628654306084543645979012069490814253546400492373153549212319682095255404113964563124220849358656515813469593129318450239005047674021336554163543825032601967445741974740920676878958341740314500027942564551878466979947350576627952439624784947579321351273302290724893678588116314645696698120058680059773911529907822332861171592027311865800042053211595681446331389173903754541936168969312826805200961518468397773243265862866322430834976023837602865923692078545532241148013538780160543085436916640716349487022394308737006067139563293442390899239607115863918242097834274234484868625974132305020436443579558231885612509474863183592418753692950343602854749110825709662080150314240586761559816805829172545457565134200027786288422887564188770793942984074216603440598398533950148900933123263955790732777221926352601232259686168830651836130201451451169372267958772312056665208424031912683066839668994422318551411116346224650582633831015863643457997072762205552907104374412980767175620970290667954260036092632682288583423862799615883611896052533945041563173204846679220541711188848355034400167390954880586416876008593912081460468040207709076529834298086652249595949687744569395158173700255642065265549552662915560147020120581236229233101734901309176344140296589318062528564560383930948353713472690632708991962208688667683121866554436512180696310613043271666853035163760550753488116872144930689380565693335615850008200748292550322114764272792162294747296669155824464445752580289161747354775935573766498561334940466986879236144951331276793520352121239196944916624971523574776788689557885053677426164552740216278646417511181157086595140279220276421675570837713444052442629641908082103593936403126533663062645761421668778626033586124242145264514328986013379829745008786567826136128850886481806675097534019968561263968376930827508994839032971545328626374298121448115810399319716314303050426417319978452205923903828217115364565077930236774016920743052328570405257990775968687099785382222544627166124966999192967202938902977748875937847601084636417121992649912814280442668608744619911664936329262723545709272587939048542762410109848779360316221278569083475341662441974497103227517804016339904863328735869683049938714923916483412860329056175758549093874356785544856194777349733081355280349439152600151486485423064053514954991486372013781663362347087161788044583971308524861328678460177005614302736112976697515060903756670394548961509420528335175598789115461572968241359377761767903997701437112973895120058563819548435911328124080267362963160060007387983201992658497303971633134278911218004294251000992694176596272133575635642483969001007255657794514189203913247143323845346962001027135444885524270600776626744796982121050216052171328345621002763737468471518502815798278638463680024295587170632593228993183855390150130203308452162049307297198561993821154473879020745765728837496259189934498964888759563459498346023857056143199096438449650876317148471493043735921551122455424812767162430556753313394197017112305777076551043759112765226207721489040363044913123200716293487454205941215641509343870628687520867517665900914089165750234900528953534235677337065887903951267840368272321696176118889443929889397094442555741336807671043117406388578371457074395466972861969565885926467477649112347665920430330026029008975123293086531949525740946923228933597222482820999795598971933988818924583682101865680981069214979066583897356996110480942961230710608716043205477277247223438852284384121732032875066977859151164760143160764331340485754714579348474301874276591319508218597605375867038133718857739921225736327951563075057595319285896324278593941406666750868089308697933186165891 +-1 diff --git a/testcases/bigint-testcases/BigIntegerTest17.in b/testcases/bigint-testcases/BigIntegerTest17.in new file mode 100644 index 0000000..2a5ae96 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest17.in @@ -0,0 +1,6 @@ +a = -97440535413541563095880496720900775111396369239958868696757050914513176559525498842991099732125052875047522132529155840269697463797217711695626972529715687465087411096238760948824248103333593345004567192686187171799553788502309657869264796172466549566263640152032642978029727919250703156160699693019369703099049577343407788860909951626990567492039591659363030795150751031553542918467603290344116364580497538819754668642948486137783661821156659842250877976470897297430123097096663862577354316891207647488362239440169752381859573607870725738534110202395187470870388725155736122958116727578301406656597530866312476040525195295345618461466111839426092805368567491398256059044333985486909807623555087330147668632345936257411749077302522077251865098438168535328393896968833740688999947358865168449552838132467900651089386043170620787949352882993895489463924849865843524608560536742034710153080325488051721560968691083369000658638656261464930560068304714821206911474555618585783221194892065091786673458294819976696223196835426250307005103898983894573994945118069467747991142512979658266967151473311193128716772571016672546880761752421009610840683126824546477453431700017336809084579174674663328180404405575438803761734004906954533136975997465392239917337250785751752296454797532503765323495537183215264399734851229502764313214238319731880870733448361951324125036834035596068588029917858376522904828860147656869226305343832874027120451994613763186226385139036950922994588624352441380696192221142027751568795489908731448167218915843679840738440905585787801381956600500223888178902619088478123889640266183707657721171959102043455556405718051136443113035997399283506009001884704374772843499280723725643136355700721952315388764178710128197115138525702490356195724920604021250874302455012218539873411202694621974009256031217792783884087277225202157852154735481712900572313802495635563518948728123238226315993775083275958307896909695234969866040944713193545450960549736513872225983102322309903301431525028208311176901710914229768292279598424707684529327158013731771098949821164729933209568005217728531855430574393427296252590573271051642065233852379084440698735578160568085789984366334867598682057986154305713311644684712736653163047272667181818862633657111483696349469299312733748710523600142645891086408066350816439287706337388944999538895004137303361628442376690473922246682705185730969411833516392584577312452039657560375521408691780505580509254544431876259178266516644385595749227166202600243103534448785646197167314411307192814450823583854274571115699740219606863451966104623625608008213737892300710007760954311552352301699819704465626601732451366170129080628553954938116435011696420525656238337925752036630405166299044490599720068211655059012657303116826634753976685508510792551291597545101001577581509149301868831649970747259364524659350169491336207809491953924241688163363309555796898740114711306716371942595948106308425565846353791906812236666746915276533818072757715462033323910860682142549741949841285125922186579754225737091887579801420691346619069098317403690758691868472777860976174682463146719176710481597739919224343014970640269081108049524853197964485827238531449974358472268638640407584562953536299989266386210723719242743376439924738748187152587949779817357753541435158820724634257123121991433475904456564438630989776837565681340537436797559029530824791919792347825581289109076895231993151772083614573115408100624928560669224432537836306118814360580411633250288448788882569593537591972468189258817788254406824652676759988492912718973377987909697390159524720277761153093604388964429108958721138021804690386363515131017787048047474422582787766102285894449229255045506305581810500422716859413232281673977576317353469681969815301745632259076894114094565087608918493067984649497126158295398905642695314714556857089058677241292317483586749052636411105221258086248532745537073613845336691470260668227705866944166205070890404684970102068206813865629639017260395822044604396322402784827652422166424264011975753526068602261270122568174763800926477880699253872916784719572450614600926400743653573479286712138401600361405220111174087642615828733051791396050561032323059078191368596057183397206028817838837486356843168733893844316566395090480699191474262865402671831905460106187784938707845172201906165584162619301849834602542670641512090660731428805993933581961710799971179515361390242815461899908360193505867623877666651241011366440274433687064960672297674214887422463819627487648457911337998717206453089365690432344198755428748125884121285842397373207747949544450 +b = 1625758638358640908852309401926497438466817549086253992264147248975490105716796587608683194634788149766039476335017565873320338741109213960998340378488528874808785260626758700886409885380823010739357699376468003127790926075865950806273360318479490698384148452140307577862606350094286042364012798300601348528698924183315471723306519779362875848416234630613521419250724456501556081633217098715234074532487543731416754092632156940027472539446176085618522652268771578174289548233358610491991736601465820583942035422267315102821248239911958339127712605663189910746352068332178226716676944716400985812511153841484227369639103256384659446360601383153192461004954757637817797776319872797612876599423529155662325457346354840611677642591994211471545753249694078568973024609561607153529766351417887010959411457246814885626171558070331783568257263013230158297851980797344850411841802363943755740421147779029486293034141688050939938584874935735218527700026597493354862631117857705621992432476509927175753436316603199883320935440814649859129215528859854268335199074772440413050044269594969522458605479981933577391690747016602155133942013551218864695379797910525083970730192861291233407041098815957724663656582266898921083923918390771538687237094543021285344329172490188098698431737545949692309972607915438970671350087265185696526281726974454437575650505485982098656745912455137914065927410585278778122427065897213001690527552909935572884000354551846984300537120519496287004509845695341531142566642201831247501445667972472048850009044812270665168614966999146371877809176166615270966735974853698970136283591276416611512706347442148757777181572663046833929248113852289286172284715503746787103306880538807286486133534793593121457208535239267037056036874947861972305979056676348260797298024175006669587877174911092245841409198244850347315850695479282768806373227147470596593798008022005141056253811918709294245077341547715465018697857649321740200978108540786460833098113191844281374731627300100481526861363346728140875008996130651819582285649736502951658723457457189141875314508767712058873187202035526420857865217877542763956962807718889303947083796957258574840864613453854869743146147811330000410916788506632695319997952033659483813236442220027828158249678435076201282524692414322546753207400547714781716627524957620959181068653964789363276385858620163007318062535027419725267327081703065397476304393402058366701156308841519669613896503547416299175811144054410874836920657449022770369339514525371173249111574628317447228370752515990968526554815124067325739923160487737465346513465354597517684889211999823173730588148799120533672564562567553502703045464832373133699159810889133636982934664378060238344001376662421649434434042285911681512912356177553179283927992556523208376405950226645295527392035422361501640597759343035983561813691142024018391990156686900430072777649055753501914551969138225379219276697555688709824429177526300162544387986408465056788073097106401165498734839186351244652194186418688806088664879122455720940563213128728421190656538269932066342760169513800659276348517483305171174605264961557131324634690547018901720683229134794757721742745234949146234722005360600626492686306375673806158376570834283293980891932644130670188945222246396695569228413481534824400511287613718752830686177113434947186414900863403752677811639570930693234833677388234014391198610613420257896054644376924856295749686310219227634189578782178139459580070596524113539619030649436684434168551717536416337379731350275680727550180648664357399172813473460245053477293752334429793484125968953589635712168838084992244814191317460161790597105128636120603580609080624565284047970482991124059981274711792604999644928874919157459327398690736669625293195148018265796395586563973762124075723124137445351151415498851924813194021607029843123917781702563641096992400768868615189031470035176112635098934435097229401088573112125933919761814210613113639551120987760437225659366628748708086355768849706787939923137746828529884557137188069253736126266643194363746741015906925292004465870510395816248741641742230880904142031544401271648877806416420689713910291288853383825933390224688700210294936889807454548128443164203226780015990119399157714869579499947039937645695026787098569004285096955150312451941861625874657301117016025932794936386749921455795258560796094667796268843909740599084388404513911860473639068692824950792342259773477672920790373798303773710709869044443915621059854534184847220131430831908394346174735676926552423079370275107384856175818379966272903123216845894978366303532867174851306834760476416643923181829175070580922464015277737368080304723640782867111784930836181647796455859387195194560207206744715051551794672198037531127904856650690193820624270730272138332 +print(a + b) +print(a - b) +print(a * b) +print(a // b) diff --git a/testcases/bigint-testcases/BigIntegerTest17.out b/testcases/bigint-testcases/BigIntegerTest17.out new file mode 100644 index 0000000..bc1e1f7 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest17.out @@ -0,0 +1,4 @@ +1625758638358640908852309401926497438466817549086253992264147248975490105716796587608683194634788149766039476335017565873320338741109213960998340378488528874808785260626758700788969349967281447643477202655567228016394556835907082109516309403966314138858649609149207845737553475046763909834856958030903884731481212487688499193590832314275464752177473681789273315917131111496988888947029926915680286030177885862151957920165607373763832387413533107588794733018068422013589855213988907392942159258058031723032083795276747610781656580548927543976961574109646992278748777988061862136179405896646317169562667703700565548482443414133781469889704085723069363908290895060463480885112225309250637159253776773802751849475629102077567440196806740601157028093957955610856297031260200496932235485105410970434216161901196424160059718644238978199689771614974099253517995310435042788286715033796087108075211521617737215731619610799074840146706400406824630731192856804354915272252689256069154300008609276086367393145982411933968052446919160395204365663016329659774662332737730259969718781543247961489914396612932918753034485551671595065637298730011953220824179324741862775838127769504559948746278839261501466821156016591915980024934496197543742119025075273294201816192831921131546958426352820975537401591242892089909597666255574855843154902427976984143950488149173014077571237791809733661521835146475016388422158942679864714530087517695655546749568800094687845739588015730963508972662480077131407715412699066934287207348240591178116560682860946540131780931403077783847891317790092366137875827196829743830939758402389491060711733678962531392042535712123839340623761410908589980063573475995218307816971807359119267217691113752383016302949451465655099436374723973793403359968198224371157031840467348948415918072867636689435691147108407234279853296195776759804488522772697753094517284296362004700553089966393905480898631419518349880172155158965544476057504519535586530643100973304407963528932678126472270830145553944256787731770928493967427550168023602379344920961821625622926586385529485742879412118759568112960955522642572897916018094525343852986534060443386348857762291143951568311621119603018823509205874276864403040399527325974954486078428488256729208428513705142991714519474685790691322633007120418529126054253905978893947216274880348664540807698052077217333696200159821043209340927397352085831619680665405203653883641659700806980239392063719949706511831320662164313320514803131683961273163708931885542774185683317908333366615212629340084178124650145079057217974756768053512997072770020205232849554439447652321896368293540024418020130691294324436528820446777384471993608288890533448485878731863071029590069469607198610850188011340565813172136570689727317823368930915200162668057925935287766437723870009199940778054877409381829362324971894937763436201748783995061081228530097263576626217101594974052977653065088989756217522467287505241271159773711080102564586313849873901189738184773663143044884549857156117917619757931061590393721792520611698702614028243902979450613716901919161637210766933228578657158653131565478280898640206665053936313858260939648985029772915822323861323218050884542845021249751619578622345097191406401090511952784051119846904842705936877359940703673848225828824466999576120204579373515722843399930223134671569762114717732728749006438856784040032726341974779850311491690840624867029363475586499984890813138857439391272427482646744296181865489214277863709534294594414424903903826893711242096560403811098676058635376675901215522652501832542081967902836859876694403719017066001377671698783216835233229927880696098284297461794720044153650797682034202241490387737119820136810386111086664750634674721930748176712574221770030356099005427039253484362922629519748480922042456777713903008503635243514712106130733655089218514204634666582720739802214989669807053288434012380369987856291438148357602408344528643298337805488728683543111564801541139789593287784200209661781627738841185834569842580330980195058884974325710776997688379495820070746379621977650279175127796405539410643473803838534327482672735526016004743808223082039518196294372964292878165690540567404669720476020997778962768040236593330555453599456931772276136719217146087844696087500377382699697851015460882221083821830303887531194574981529810281707615944967361616004872793348708276025310213145315803290241862664007111954855902930308939026946057231908683230010677570181050218388022628724741032346492124063222144268570092763933121229535672564714214663727719234844097129283263933267566332353351813461064019298576508283729675961551192914271223003911297093646617658680110569437570043413717828168968210929283856561490000291625685861362327999282102379778972529404351423251062982322593882 +-1625758638358640908852309401926497438466817549086253992264147248975490105716796587608683194634788149766039476335017565873320338741109213960998340378488528874808785260626758700983850420794364573835238196097368778239187295315824819503030411232992667257909647295131407309987659225141808174893168638570298812325916635878942444253022207244450286944654995579437769522584317801506123274319404270514787863034797201600681550265098706506291112691478819063648250571519474734334989241252728313591041313944873609444851987049257882594860839899274989134278463637216732829213955358676294591297174483536155654455459639979267889190795763098635537422831498680583315558101618620215172114667527520285975116039593281537521899065217080579145787844987181682341934478405430201527089752187863013810127297217730363051484606752592433347092283397496424588936824754411486217342185966284254658035396889694091424372767084036441235370336663765302805037023043471063612424668860338182354809989983026155174830564944410578265139479487223987832673818434710139323054065394703378876895735816807150566130369757646691083427296563350934236030347008481532715202246728372425776169935416496308305165622257953077906865335918792653947860492008517205926187822902285345533632355164010769276486842152148455065849905048739078409082543624587985851433102508274796537209408551520931891007350522822791183235920587118466094470332986024082539856431972851746138666525018302175490221251140303599280755334653023261610500047028910605930877417871704595560715683987704352919583457406763594790205449002595214959907727034543138175795596122510568196441627424150443731964700961205334984162320609613969828517872466293669982364505857531498355898796789270255453705049378473433859898114121027068419012637375171750151208598145154472150437564207882664390759836276954547802247127249381293460351848094762788777808257931522243440093078731747648277411954533871024683009256051675912580157223560139677935925898712562037335135553125410384154785934321922074490782892581139512024962286221332809671737021131449403523972525953092752660824042632005938374866962285311484728754774913112512629997907520912434754907633533471130800823966935763758171174671176019641177312627702736400987599596376741344013140394455951798927108070843165009410850529910142854402183781793975011034307200796009263024414921033049230062011964019188248797302428869895018407325313236008778709120989106138711529748428976023338532247553615031112648645110456788159585360520800094913856777405865341810460955448963573316986123374889819352596968931505597989572422628346218706877180029857939174830136928869560198695139279929304701042927108994443812680969562109217968882926326013489376740517383450024257405658412683855236100258017896560482797212652575784416631250032616182131216590143842527355303288346346974713803340417463808662585294265057312153099020544111625016865084474069581409740252477721174855784385575742046288429892640832585312819847504813043219033473581607898952457096279940187928826161343488287520456059412138486980380290732704464936230682610462511620229706069725310699399391059824199677113770553371269982697170988482453831138387430144411328575794500460696982470145582687503150368442527591501595992738130796571375181560693353335477289258043539650087454261096886259395800575193750760437929541167774853354171529429871503672833785861164424128657720660915919683988749670879252060665480617597913224845562135897033938470377566018706916887646732658546303930897372572084595505158802808840658407770855635806840119358539957486230038739710250271019274584302085672126777619065415078030484867705320610168606817929599418085090351266329561173956909699423441204976917298258931780006629574812303765073188903746663173564283980075450725162538012168526006175493785746088694039885228816728526409780260374219989946617884407970544974141704829750038063679780166871154509638260725080682418216909434857814088814320854786103510237115283892582928941296753246837331339753931716357626579423753499203914098218536652471225199271694045158312413367558960677950495793652318030513262552119043141353322355487078922351164810259250268215815082877306825374684012359495667249455572407485084522254899333212210239375780865330627490791991743645467759976139702068121803738572172907486352441921069816527600927052868262369528230780403728164334395297791970032629882901176624827719587664894470772922143466595882507917657036274721642789629828616616646406814634690364698864191409060518706781023731686439644953407916369539753566548080901261089171724929204877650055497687909040697701709117150427856689166274712382536241549650222376325004116687696798948247573705026644177642513991788601455164785999818258645467423943507845106532558924413197804417242227016396792959876030740771976036217997478478221682782 +-158414792174856260554917925905894286076058028463579462024116379116419223622620459901425331921375788865339627612108094894423938351559326250675992638132622430821535510819248573902564993642613488539144883485557811947277724616909209124589100067025063099098259901237476348146120202319995189628982382094193229565096869482121814830998981632852720522963780287952591323690695806089561055570400934888873735968573156979511650551663878070105716070036907912588432863240185838003134525061133348076892172080805332635949004489358311548466680871707563836180094277971340901949218167289650947562402262781357935151773842697168108847011611503156448028008163022403459267319366181062162801054547357214169560133447152133058456095953237836084822313146858018966824747760834287884245897131303836389149784014214050420361558267004732343970665064416297297463242955746779635870961907986750436789476727106901829103948594903575688595395064010360573652396412598610667179816466467843951626970740500986866595894252752371950863896310835042726348193631943451365625779406337868001377748688207031864986528588105219524874604508697115388141267248779923030847004771949371060921290046309983536286738853777622422055662564571360128861920394991431469273687810588245187971888513678705318620070258518577564568286837536901101521685703889289772285456248931737920786311445160455779665384695391548752588357578083474288310594166100028426381147933077669598586719341796247487980392189837367901587845008564969035589965872161257525813013568122729079305887572828661002974094924741542713802178986941883730932494211731924793820037645081817964420333284642315916038127910564821947947271265108326095903267967052891930201925678263329435655806505741546208967341267712170181209279393185507770712189616632841869507755833669523204615013909091559861029601109499922593262221209511087937568186721698483087730904942286447462749510283589015993622716855778086601777015171708483761936979941176785413601785877907816769560769913280881722423565546258092345580395856213182305400263938678196470773724074886755235400203230145340624210302589060354159278346952471875602695743726848864518108827295682224113312141191175610928073721096721968002133219043537929235519002568095375319465907168056478492409387799015237907276506743499884496116404362155319695436182735510500369218222826230016855963346954328513301590500099258611480495654791303477273587430373312888432119635938128976031844843684301587960473964901774426653513772888108349287377155558440096784495576767223871549988565665735319351505276371189525342635737047917190989860352740844608916273007371551336567568039653152738283497983784875169672475412184413219701948971011592550047232119202863571899891019649716517878321337507180987477823952300784416255831342569012495680120055751734610241050411290905711734445020170476681190095087050673199383101244446783512515919319190373208642972395473262040247687985730056032648335628766865966214601410980544052540369227602509705992762785734231129112258860614463736626547381551460027640892788195501161706615578224568600823924577006117669441817448450281586211569966566214962252209700935862687957180361813920278780421919864475617163759093244215369915224963234820516584962989374521451724485922617703868975408420971310449433096720572327284195407865208704865678634679594070022515126629165568686894985439599023524715015017906362943713693287475408230890134672233177098956857448519305271657478162438812332747764094414974474376418853916472625546506470019824023282515134374449783038126513788561336267979596758791013252212403118459622565623686315497622319058781568799477203198482411348415430784067456367230587379325261586269453141970902659721480991646313174439503188282407783300651236098409926419287751193060675077043836299461686105409416414335119905031196981310384434373592653113487720275928187599794420054248692504118869767747837765757765312796408090036862035844255834826299091315895278838250700470852950799337133331319596242089146740372732732653913376089527787497219083413547343862531146092600339576527211299429878047553353057207417597198504180919464461172323838688028057196527302007234651171069041504985619354562969293181843093170275450642097147217227684898661566872222826337800917331896275737132503106707742177598524142429997637548420644461172912868786200490895452573958919695267671321465360580582943060687465900557071951951655808010719894616695106420249370085010979560938306278190759626562696871127739416001922631705443527573511683261454324341895140732817079505970707319526915830589820202589589987856274249156669195915461732513829906593909201762786679399463763033844083601932463487680353192863118539631089853615787288539341918707786500989301491702924030685981897101424867012759251939404201708690383474294780342520969457305608788556613866088331797182772330115926069507588757890235528019764862891529583464050814049149666964321662161970300008967371228839788403562007535822433108145960821475368020137422013214715088830849600281022816059870988260823288377739893786512528471355119195553740599891278796817736098109324723379083941557974046400755113199623878108150119945587815365446146149158027711490206799571963973755690015773900776890333295301586662125115385797681992143252361130038362650771161868968402826985316962702204582673595262114626652289070824184383079012387157696496499502281304719856516835608481892960761206246691868539260918317413074477122082517785252534625417028163348017261582894176755271015983443840764780537399384912353447281906125864744033513043862601835493018971312938811274193590988208288408452796944999362642865583440497867196636455225381905190655435935666898975724368580368560966020852243280452914665074858612160342032022224259092422689865364708122054190495560942608981015375034675734032150285039264562680176805619778782628216655941222888785021602789089361038633801811104586883757010698968646503845886909938031223950864826638477044854646327207990609478027760583028534998131065356102220969203149837840828486815714986583822064865379094677684726640747681812225097410759728502075053026223356987435441990594747663038613820167419662431383416515196527816899091483212297859496280002877974795941069106804183461254741753424222720420603503642994166976943023388139535868074118034809399287814421054166359294721145132098344376794135414482450502677674511383341379815860575284317819134726578629567287490529140076009366232356425865412593235864651000711346382775145640203850916859523417982654140955454384768717757834505894171693056690732066200383705963991178162986035756102677307429332761048869372006994242675158712176407065706937884808675240210657313064061641354838816991255264711139462528309188978872707175462470133093893641413279628376094368978538860027170941742586444768397456532515285803211433526736810838109664685835712332044493630465371225405542357479030612488680329430925337475237672341218224034667131818016393906827803581159588537440700634108703161105431500518247285043257691301512580963416859069376694080802446596216520390998174064647504125348306732843282483334756913345212583541165013120841246932585879789750986134289963282641785832198057517286405496768464771921389051868830667269825833201146580533760643607244440212350385507052963690785775454820575398325415667966535475715078818586536329569959277960092716879995726496562284315049689376485432097795685697555677389191916448298651356372487159838801966077589858069573451186876731315290863650288826899410704904587174092723398083843350759235425463441427182196927254660826793954353204195844530779538118667046530802809499583492297872170053685896258514082250085595577603463871119165011575986936211148559319997585150138951654178621910828367202776396267173225576792334284012052575056016459636683410978890846669693969375616761539628501127159230152566703929935924903051321294632123449285831430274760229754708878488342829731636169231716935486480043360765355394236462375099411868138964715115405667342300899061327832991382485103060458339809931705866755963497290266641349593963852882346635738996263735300582892288583044640070255623648773151522594345146794350939840717899341876489792522578156271502223290222517027613265946154437103744443694419382977621064398227825520431547530488278635984197375407253292862866802819321609751630598190918036885387861529912412480461408679953957493896352942315001757639239557212940421007390464590449463478955225767302055793127286651537372842670062306904946121862224451340899344942062784521217704623301622896486092215096651290068744903318056121159312537555461584015198767793819699429684733434168298672337509085816925601520491038412092089502336241517676731792103818913773144704297672908393486954276390726361653771916823691804685966922965802157636685128061410408687792940617017815644909535193361334571405539838387644302538449901927778120816920213887547520926037492508450353791530395979983123700948681773089355620430295589291861163663402558569149478009947625771294570695861851400904962782413198862784554521984528637346586109383489431021048473449755212816993696241436820910324636456210900963438628475891924115298279603991829087354315785247374274165414479312341016424346607869985097923950730338031749385964406378103281601451827146091305639626629334673444909545882912406143599425980594100855359230373401324092082111421055062625680437230107163641845951453979109679140012988062589760709383298548820084134129123079695443054985413946782857400 +-1 diff --git a/testcases/bigint-testcases/BigIntegerTest18.in b/testcases/bigint-testcases/BigIntegerTest18.in new file mode 100644 index 0000000..74ca7b4 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest18.in @@ -0,0 +1,7 @@ +a = -130540575852757770283380585592075019764541443076764607497170410766974953124766101083341231242150564787174304604681604455852710214530550537532114376397580605063972139391639688849688712280456299652022573044511373818082840112349034679344649843745351016158862143396053175857751868728728979563256252568129373209522521166600536295833823680839205828641668688305556858081932864276904870434469744795674888281746917821472455957729448586549597298490605915729247164299676316964376125522402315672842321168962847938994367552222237688587316114065951047720549576544483563165887095198003170828942602228097510505980173047261168413480894898237244134519506687349943866425906700397245950474466443197938933383806868802563074091167365534237553572301210579537986579957704751792953271076286280635248051720445371491774094235743047170285888702324590005566542093704563973964683438394687036186504476378216922071351200903668421712927918742076409692710128015232297466010163563147203008969354902909207117889793234477892492196082854413577089202744840644029215625722006497177458580078315684890073220250739641758394969648973668571436864228160275077583039673536268589452782998452114826188401864428750785252587389920267557545403608082314238552337059585671793954646554472971625913926406028331110179272191263389813199547285820585059753808119653478911436737884349444153036778109000559455299670322775185842615089751173905768282521517554663125659213297981431115244919589761262263000229506228189355303497110494210287806774123113285653316396940858070257933541685439490892404655716090254576105867191501702103012062767379082400539368419730377742821549755326684846481265438196345528750505601829054253757879668313369115189710956058919105891437843920938691084626801916895120262300064807601544458972319532079330930534409901132365219696372803111731085149942579756168260318617830515867794556740705254997851262352999116995277112765750484906243150476550469702995834061830168647145491540297438114706251031950620792097063276192665889811903146870192636433465224435673089995778209543733690373808152558315524652577240243379358454921536395909130978930021802029258031836365068954683277336610500921627147803407389667069239605823640375957287746351966195466033397491908976397342688547542368992532975621624864686946724323011797055080670237823456669705927536930968146082888912697860601432645592136159616384674029632653536184859304457361149407372110138259395554031925042092072492361562030269166205072026197715986361659952497139284503878564221983880126687881401681970808635084656366589832043796772966695075731165013972147534662250808229099019382429277602089183246279750492420748548551471165658017114996315694478659404228440400390151279309340201781279597453024278643041090460615358443894489099717918852401884203232450648970139515690393081348110082252161079429124098428542914730001737758443603414815976431321828564065744082194616789565465352006048319344529082544789628142485271130019874090816946174756985812390239818955846473524291469400281679611719287789729559649449856457647860350558109961789670508615886927963461208755174220384841361884974693367915943196672168430982860818627955728647348839770743069740341997165765195973761429126864596888540669857886075112409511425320377764544117669762205323400722532275413877939904810891390022609865561096897206984531178417444911925633873583965575226336679723965922775971395101027788576702016706458515150404407445191316685365496382775142795957594983396300275647552033494504527270464040748379039072348456483313965586914549395781220121537809777039313537702903119095026956039416927722807721767388634980896238793411708764532406263974422410848618340399106834848249438141914616156680999448294506808082124808593068320954821977158083559751011785256805096337079396192877668207896589671806900939400323121025226434470006318905222436209461416026241763436512330339831959023468094897647791772850942030307014837435358215900698815988498655197790603572162947906439796922441306609885980301562502169360685825192666274614662474272009791972547129975988508654094721055897286301413051378264211877007807897049389089009300246478757797300232892757455566789128681515622677197661157187015390500952932424177035917640108651212053049785061400510532842072170122856740568317440469502232216093678655453205429559241368065955658663982251651588331063310072587664128817986316413671344880177541647672098504971449895729915698488946676568702018593343574511540357034684832045737888669862642640073457809902179982911572427013245271739236900902321400026453442116834393843159454234682704419140488219611211611509771825128564963992391765199043681205479596250982454259940472486232071786822006409368148122191907069913271824493756502399416417567637022723710149269560379156933973320998953910934 +b = -6126941049297611772611229827347989781144963176048463279888483809582310921018226187293748890077374370178705207637770129468701390166948157539438143282460213984914538585305862808885268361984646741704239075208823770303446597086464495061117508777029532475712725960693675056294861455399887124587206016783045144645993112675426086686792176430868594629155923398032012967058520867328328225513395012841244386366528208737801545985472268461739673899626829059465710852561091497866476465172050090018057404568132947594969937241865670356229049913910737642657933287831646090497122797027537816838283127287132741671304164131414193850245788028238368820757220431231935835983622819918439859120582808754649339934520427904691104060484014218871478507271933121556516282171189870188417716649418772634583392407132527432085530465227946156394386462386029212055686595185956420021190645604613394095287229863783817386700945815510417427204259304514950929026047218642357402382071423803498054528729113327561951647833155637469474425671541269184021997566758696486842835163563892638379683060821910063158013318901935860776414048897076248981007661098872580714113932709850353433663641641470317699362553263611085657812245182618229446793534855005557787947987458939710426119800287696524091864460504565917923113869261109735565623174995188417742301706245092527222237884685729176523457546776775572752789472413727817327087289023095495695332832333485466931794589043211166493470896253851793328270722367467223136221555915125734192847595082504090560254636353885614927762475580715979161938383687336647227316901932950211494132144549031493476213016211083139165384945680796052892170231480084306681604927116397207718262820430676390959279420174263644258420188430302493011962505083398135567404457375171895800407368191092468259934543906695951640378377738134356736539855923993363961745867359640519871696333819290067862090362066009407809936333963899015123525280093698016484190486383314559342856801154883260868932535164657411885994460925490297099455058810580401826009100405623506756606889840398258663769543967805155745553741869909933677851722038736971222711522329274415896165910919430950289834333239069502773388027551140070951157153403680302440007441456229322257405070094316451294469071449421170092273716912578143959765473106195805105966606819993157773794019283385094780778010257780080240467556562605835816065959792995837753038721985275778393835623027147827118872852389653361386452543042452252663253644623810039204218783146968983021359027164448949874953025825640554627741766931625926503771041274782766111667926189730920491141651763257341598078755130289944121019133430157306527929697547781658118898053880121361519091866482671867558802801961091685642708658084499223426482928859585503920371386616282583518087978125510259868866928764512745657891271673973381791808346762021394270954119465076009353114541239636531273475409834495234475305837365803357346092284150929327973276089812429108274072629998532638253748293415032436374419847027254791208547036605312573582659961455335179410692044331740153486027513093511461524841738206211969291658793227120781179382781513059525833282134479586305375943156813041423522832932793450159417742808208701607773679683821757957279199779550595544580130886367686864587973635657727661562994787076892095717258826857071990364993967701644998838780174868593716856358186494983678404429705952274888004947777332992936328695108118996994543197252281156652440465303362165228278612240318493763044229087374389620333431171369218956150503381389489526810863713548702774361462089964928221170478856989106862980983831049004855724785945496501074458814079226162840844232833679596799141167537526229881094194584562607150596723494731286485026063647042860228862021982015405177830350611839858698089131446237322207292127889259912928818863197900379273845885267909979363869042239853132585678145918920973429214964075676614874075870997192033042173273737532588518919945814311061234071680816398437726907076612784701824692784943228683813626990904838196605259340906674011500165074027626152776290377535772230006357289437755291439027983303163088717270478934854818416130298157889962596342271646117618311176331246286740121774754473453741655155477221769295237152009948206752519582483548468100307796036483287917801133680447902579351729886685423261596066066287545056512532318107299448713031780347925658737572523088941888857773408411344462689594715542229313311096948543760335707591626047507698862437825829822941837690759886298314683434635856111167730182529980176668263690325198809958327367431747005030359835882359638552457513915510019775766897970833517285662147292193804153249642459355454245733892440757491907185007363089689414766705284843044 +print(a + b) +print(a - b) +print(a * b) +print(a // b) +print(a % b) diff --git a/testcases/bigint-testcases/BigIntegerTest18.out b/testcases/bigint-testcases/BigIntegerTest18.out new file mode 100644 index 0000000..c0653c1 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest18.out @@ -0,0 +1,5 @@ +-130540575852757770283380585592075019764541443076764607503297351816272564897377330910689221023295527963222767884570088265435021135548776724825863266474954975242677347029409818318390102447404457191460716326971587802997378697654897488229918205729997757863101218604876946161198465815193474624373761345158905685235247127294211352128685136239092953228874705088602002727925976952330957121261921226543482910902841219504468924787969453877925524004000928570491550666204525702177671507874584134581995068589676998460078404783329186453792579238001137738606981112616510760857032439868841185171652142008248148638106335092814503978017695264781951357789814637076608097210864528660144324712231226177302204564089233795009927150988354155993431421793388292635919892225179697644375136770294854119530227717304613330610517914237040474306418974008778201125486111696501396768968859914982342898862840602951283406887498854378132949109387681023086805415245096081283396864508962713426396559162213722068818819281696534849598464925837380587257273569757356777577369839652814928054503987226159257242248306400454881812484137232464075243911221096987646197686855170525313559412501011902437382872089849657833301503852977407898837271723955708870036422138935405040304366718154244143373199563186115737060139250848752909973405620872756277899984113983477354660998218705262772343732175554643717412624481430935142311989058591497459044975101439901231966087453844843062246677050285358495924839060522840770428905083253498973267594009539505109725211580437725156677906995406018138848563685337080196427446138055988626990529854663116518530358114065079468777072228617796692759570340894560243981814845265336897045053259049911242603126290399190198119448848055088292345064737325796653259344227775808103230739720509633423546372406215763355263777260486902980950349947947260728578552374422563746197119082993132207998892855040988641074511617844546763022172884288993063696152192234656553301476631402013721374557230714490113547466679049204371246003671347519694334156970837747407664204004659180670907607617126105054403249343784981961678143285749529237593791345997063187581918810824593211014462222960364119026118911996343655501989551295388238036186299434535536170879936527537413639704695772672835415629066320916268981728081891371531964706894906090876019810647880724226848678170966797237751558742979609542447823651936921279640082467618929487612577694822001389847991001885068330114600752254441983465861820743134188778825349528937865265016765026332379351135046305780847839303439513558815065155800131144025606118039797788089289992575160724945886200318876871949357947676682151669039693122928915358713075070824768603525247573830547457807239037749562937716351078158764402609552481841115762047902519879944087526911890535148193565998619252666852030453638777362012642186406668424989870604687208116160473867702995801945857552428956638183836419471471124328697643623784426159415960680964515108566122783540560343158482523969885174446800381281829389953684349286322367813397743271490084234770405137216580879055652492240537043868716629555564252053929306433521401970709765679892507702556834167697939007632997863850919724778678824721807043563606450902264483826670927498635242444218770537182286925878463813097080406354033371157139684361486934602740751928783761794958166836145106474920420950476061292485163536795956287769939096746026627356876885300175371508590902428869721115071448657663147743734927976332628970755671030489047724522745197400819504375710621711592577827233043158825449208912199397372744709072122075245530337428906454533671435316091409342358328758339929935011263253081285391832449389403962559634194934642989074970760225611135351040915804405392209488492348207039177754335574392407401819831810682677903731854939449900668922921415728298855577046309865016994353882446783623318369652696425259158695156923847368743533059682830305899349254690567943894046617736961927870161866280187037023777436988955483479883623512890081422115174996886426737955431060911998916868585331831800681293597323404869524277206251247983523552783681819397214463116635453022769135333072462899114745004544420120543605980360749874457494325355771348554475193807602704993483699167403372576841779128812291897611214022059095624979453985388915807463153636311760950549504126764290047688071618981111206268112031397338046300356768141773607713959643561483982213837215147201978456916627677330916097600482245892458240457082351359457358182302771120999128526671908134604871319246935763340147229849395279807594280141474137669318560530308218402141191788178035515453763773950719132630790686235839432133342092812397986401742091562588904380201665407854054362107075977743398961754870663301529463481202056454567742246623388087704238753978 +-130540575852757770283380585592075019764541443076764607491043469717677341352154871255993241461005601611125841324793120646270399293512324350238365486320206234885266931753869559380987322113508142112584429762051159833168301527043171870459381481760704274454623068187229405554305271642264484502138743791099840733809795205906861239538962225439318704054462671522511713435939751601478783747677568364806293652590994423440442990670927719221269072977210902888002777933148108226574579536930047211102647269336018879528656699661146190720839648893900957702492171976350615570917157956137500472713552314186772863322239759429522322983772101209706317681223560062811124754602536265831756624220655169700564563049648371331138255183742714319113713180627770783337240023184323888262167015802266416376573213173438370217577953571857300097470985675171232931958701297431446532597907929459090030110089915830892859295514308482465292906728096471796298614840785368513648623462617331692591542150643604692166960767187259250134793700782989773591148216111530701653674074173341539989105652644143620889198253172883061908126813810104678798484545099453167519881660217366653592006584403217749939420856767651912671873275987557707191969944440672768234637697032408182868988742227789007684479612493476104621484243275930873489121166020297363229716255192974345518814770480183043301212485825564266881928021068940750087867513289220039105998060007886350086460508509017387427592502472239167504534173395855869836565315905167076640280652217031801523068670135702790710405463883575766670462868495172072015306936865348217397135004903501684560206481346690406174322438424751896269771306051796497257029388812843170618714283367688319136818785827439021584756238993822293876908539096464443871340785387427280814713899343649028437522447396048967084128968345736559189349535211565075792058683286609171842916362327516863494525813143193001913151019883125265723278780216650412927971971468102637737681603963474215691127506670527094080579085706282575252560290069037753172596291900508432583892215082808200076708697499504944250751231142973734948164929506068732720266252258061452876090811327084773343658758778882890176580695867337794823709657729456526337456517632956396530624103881425257271737390388965312230535614183408457624466917941702738629375768752007248535835263214055567938929147224754405627539625529339623226900235613370151090078526447103369327131642581696789718215859082299076654608523308283890426678190574688838534541079644749631142492111678941427874024627757058160769430865873219620849022437745802246125856211988146506980034509041297473092878658236327306417134611824302689828057409819402400675516917560564188715283209306970232844751379642653999621478554970398521679571368748875772026930296915957760716241494574366149746713032761533495844189710865544796845606010450417404470132870829679090669158085159647855182273935735432595395294511232540972309991414541305153096869009861295524639615511108808953628466297955668026518500248201656971173405539089289257091305901156441425211485930711082706998461961579281615389878548793718885205430669840642953214429915683578656969458019080421743759355690046543622288560959215652705670140479294647278291512597513044844651589576578631870218346801309461060597549721038710517456598740125260295845442478979193410032619010895520689783348930846796691869857967509822651975557782003693456028949796527148112741658792217912461512912255659544107887137848180261990459971580539433036499961330018182884095938573768986291255035353346596055632736991034163420156705882366333684162944523574649927400911944008218685860619434148828483487594053549274867559429864787291394251110062303941640840157342601773285453662575248445211793927153417295747276989365166449178106208372842348109707851604560853729442944878957384917943194875822630147620816090989972139208734113874176599401520968761123088821051762523862871578161264774984302772537754779895015069440233714926957288872035442604889399133336148447713043582223546374763958594593798264036545102715359762428151295723710866037242270295396574854773004870970333796396884315061383147470188380261528002886400166129033837242487639374034572439916536455646134516293878878027677512308940406932166750224179286555332048348102267114575785314025010446798441503443257222806721785582407190563674455615105043145508938907216226238634586526985921618581475581384553448458917577622616249775914896220776359855771051422598468176911423634393425980267927097844144498805231439151236719421619224231538038464495570203511604426074507544844770800046848307972758037081231434841508134803366154034064397767296676175119760368622815707482958570722052011055108438534630836529759777719467671244114043043962171833744581966218242084553016067244558554293669067890 +799814412791210174780186817094936541736065495550161857451153096973617679420089991560249469462503933030729479439706886460377569571429322008643777076240232434065755481685668815688299240157329168626563242116010447234323099784420832856497740782023880239583486278343296775737903430374218851024526871652645435666952670085992701195180385366505909475944991345442656146920588549826945580957171046018815820256754813913897785879481532527683143570731881749190077017991481386292947297669378025183313890655296810329421020162541626880652236069614550645961291416673183444362064379189592823719669353521121842656185496129543885287259486919372996799308392023926097353760564068123902004242572740706247977499079216031635210360760394423651988529430965799075713536689853425215342135344892264406731183017113082394418268635022619807770857385755497676099577166827302654488891217125003527293985239201113735845846216352040518377852631358017756593461250487016838100868289971436939882086942045951601185578326212620749640751380268162360991722879048516266437956225211497998134467724588404725691446795930704007246573223445362258957375483229454517749653144253969063672796231427163522971300860507797181195135270997744377204008232021752041564916130426416125217478996766176949349917026878002712266795799466871686667980280431376094027815747071784746169484642406745388744087581949868187397226935350018667949015534539779491808841199128031734333684641141993545063671961019989758214915163961306181676342876288389030144844269339064635874497526833557723081592783827120735071487635045305158886568260897499992544052971089774726677125611227431391135665877164126466600986004963129543981092388608216529987487951980415829503228668626850863947417224581779824249908301177498010451322633640334588321656002020060677821750621685624172795448282409076885567638703222734787583540187322092052242265614108232476728038783858029176511337243201325756332045452186053942833827416631289119587747250289546944132897725191404027375338228412291761048224350452400850706904664098618912878175959880643977851546516986021743967149449950421117870919496580439667052931021894872687822861517604723980920195851155488789417765353157594454610239933867831601215329111900916692018808547436280581566680579856773283314972457907591192487242029471242416054949327563320122879396498199633094229919917207810292569264475790623412002174268363611006328426126979895350586511297888305714568202897820874905571924839757758013387767889442796450082121443728483613220759646031831341859985143055501335244032853495356023034707943340223078268574825985537912688895904123800722319697371630566742264989652803312041477426987869828871528047128350878847232783934434257970484952401308921177796632798099213867406983391947486645024619273845856894121858318372951349309589000211268606987026670242927015237652248651147769874150695328890018824110405626399153124333420838419576300545829059359228983843386272429694760869665244430395590378953221782095468886688939359106732924814545947230167841399583921350784302245104986196316351836685707574793002834604337628719867701874580714967107240627587742391662993115303125582301323134294091682408637308227107845894176327542402578683459550487757126529387382040730703169731050036982320223353170990529172194795972359567021805163153880804454857822881851772614638859185117063603142952020642749722009164555325844515167674335445428958923533396472067059169915292145919205524127892621922703019386433543025933369896151591052266498920846577217014741679680729555643021880709811409838145027016254437012598183095742241434165134937786344729664252967678135268038972476778008418815008371880633888943512514908604850287446637872546428476205821516085429398037517351757662739267172997919620379766467195945522705564693241923497724295374751767887469241143195936392128584792485373145925753612889125848633199286495144911103836435701114474002153590028205651402201638014256294447005442400024923067240183802209487348709043902665257257287309831076572669824891037257559612821319671657474119431907071300984394460430043958660997313013800305139332908877125216523261646727035067810330528233057093452223609838615458265832799082119444443034069303548489635030351993330186954014121348425616095088253387011394210556739883355943945515401037855507907753735336415416175563975897942225243612119770535588260059016258085906822218043599360895764208721328349501576586121419256875546212715886134798803711720803364001305651125001533497374556560901243285487393547738309701094104341805549451548253591452452447924112226853285099365262391522111363125039435050516846715016142389145945967734778286957231529108391545831706230225527068421872635272106592759479920559074983926657795000135766150747970136811010292707309252718463147710188147088960159299972748145730205478267926354063805231079961056383786842488324065342956238812576321772379861966548352694437583896007614577183908031864927673378408409618147313748880094180310689867877741168846125819804728484095321159295188588363560306358769665357114148804873892199314800042000116865287047256541335475105756758686025212961260487976317733896144369646577872103656413536406189752431370701514640254957731325201150012170297525329848967572901091206365271743842710227972802547044577032466339940287467305729636661284093884294017326968153683621732114468415823011706576164992045834002009568784498002569894371324263566797973356281324914814491736012857531373683792886681775753630536409314034090636984963153092063071056580204095508578958485115059481776629838598276234508006364717034946578558868199041882170172567814038278857994410035131047104521363268067469356176702094144908638389236666558971258190035457248260243394392580744657511121357753953032535931352346769582666158704946849843283402970885197923416710198158304676713199380481204608279454867365013304037273394453966282320510607849773113183112302620285356759447885203388426005492814005683988475641367250585965457787162483089081242017586625750094238853409913774937230956478386117175619723442435539876811201274987496609931180106735752807654339420013998414791516899722350021889912993203941544622322867158984202552975160770218906813605830283208560052366937765214702990100965939837710828577135394208949305765474446636970899602414615010322176661348549518749820279474387437733274075328891063976741100303721204642696622445208399837408267140877315933358430865393456073215094851183341779350311896569978468955368309744042966818282878564698001532264836375874375496354465870954935487937432510991849499512664617469319589019904070853511032468384850697245933660503021664949020941654787750847910204568009235895904317949012056511417526842785949852412293089234490553104808753008845516477309150024697449671750207622868871393848773963041160722468008129960223293063302717577255577799013960437371361336781558707834229768567914381510994363070651307498580723613572332840188590555427205604156978558070115772766365423066257272785679193696967555538291471320303885838533971834682890738000429057372471741348361617283720492183607154227672311904011706731894451420137384489957312155701733251805119515092334562482214424904451353985428119100326368040526487259053522137994929324584240323648189891248630427069292056489015026878354877996561796274800279704138902562945437329958868032813983700165853921491624679508487082790801338070570877372924427438866576103445281021925068563187471308630757527474114823952814750495124831787654597554316749800312596101085209060338960044334637089057662288327819294970177937335163059003127371120929302555467173841038049958786433911508312139942298655281091485328476813392841798420110218838323742102825493930268479411104263610222727192441636651011589625388275212545127676075568867338319474412160910545427104562414747335856517001044341157590423401745842269235791168557108317436839105677517660691917522427034083468011801558735043654302584957106152001988132170980571448189927688657323395639045707941358342159929430242641920060144488972079565736366763971132992648753153787119824235020254973592157451248493789775814001345091581958207494209518513932512576987763299508773950692190463540686479868425656476353786670647692889457236043147716019775788080774375435162686243050219269333393699240977572951637718944974762342752954568711820042334831209900543280120393623233468057600201825690565315975447185638965496048570258400715198444664385463700975986773535469075670310378798654307595330244618137647240011636789858417355777465548798044117255490768043925425921087688009340197950886830753700510957206184531840157774308518517800218001823338988596366245615186654281871499971498486311821702520672760527927547239948057512684852741431076510400884754056545349657710405109359871770228079147994737149864077185832164641710436666394399272756026872428002056312776085615292515452170491259507429994974045722037763244152550255769600179791443553175874834653418234609360380409093095543050564953343537139364344598592460362471334051899167844826486784171252502973091865867116752223584254011411491060935155550967067618377186659215257679586200521924269030011841052127165662025778277868945738386467971718523469479398518294923472955611923017908647932811934653682948557628023011231611583138769270207189041092278271198587103405277363654673120587742566119721283231212003848831049593609085416580675624501288913006324083269009385768244614546974320554558671659513081405341304717355648777583017529993486713341971621115062409880277041282469148229849379089805276145443096 +21305995080158776850070585733499255926608874703261885064 +-2139175447261069295036125151268924659731951723653455430050292736318684459130654295525967658232432543905312552400907756201995686552730298291031679046443304220709524409926048817585119867254722536705631997228616735787574309937940360023396953598139604025156849293355695438925266001923599968725185697628875971268743475780912830614715669066026668995646009586474823533461797963126995914710665521345116631489234316375816012627216448735107414051589632508692485292434186829693431549330019229651203729688032827625847840614351199596292064917565778173369144346562741547725547186570871023871325726511495892661587201020855975117811302519776639844688090216540819384078230695571120166191971799261474943840407982160993295930940098166568191635152691870057387363302060357770042990705449951802685395718643643474439127358309078707008586267433983841170269763172306705041198972441794342900676373082925239330927716635615105096265763204141694183723310896954748340416541884555789416157831159774793620030022499494162044961621258066984441661703330149028904573321756075970728683341210896391521204326210448889821423555441348699963347016006548946668255636871992974544694633404494530974237694519382945741630175697375309966070547321472001281668232464149553603731350270799605487264000304452580566502678727906797200847917719310920906549796209582412751397575475375959762550229324017870777318339128302141598693982838739366869176614029860623130642960720878941640472876975342768902441442419892443779016250208594436120094263114452921391306554660822927044254915591004739385565562494265939229548581685918250837518540795402853829007389813856654287915542048092967664907766283126029132753133107203267497996284289178105003916405226979067175248089998190195841852965800108528913485603539979205042594262548786410050029732314449985924015092941766424599074326153263197916068335558652845149154102342567586593910671008819606329193411723662618692813840738922836504799948462220985329682556351406036893851434907384078276743614600988056105109191548012692711183433172233306740247036849601605090080638309259067213641784420763646875985607506454412744181480479569427445781707641953894240905547574353348955188592291882105234882055438753287023409202256849708105827123077509395729084425877953028338997237915541345661078423237603935024755458652584518529055813750550573826766593135253847728856427562490742578073829300031897916416869969698395593579276701374157229365793905208179524797825071263941087842790686159369014145435851111050619450489232412388140886495716767458806846722985583132667777921325462880105390589347083777237661938397476975515544052189702684975889936848066215949212002148300445099684314154716911165819790619965688029130629186671633896344267309092447390582450267183803055549483464653953716633793529530051285155900250259880620023368065158259695751432119073733956519100443381239013093302170016862896964415919853376383863361221669250776711165754045598362541385509600114654934444171599179047016598292709019204805393074672236050109281905615383528875318965916487827563099395318015326147294167705322373699948858441430085676444428650668908145232077583458965243206981196495213834328678313506532953531969131975103565566156186736437567492496225043342227982339926879303847172411905485634609231235292754039525599654037749469409180389668306865789316898838200084659131900512460931844903600311614483202090608264155039125553925714008321714127623850117748738795731863031658809575839482388526827807510875079884971459479239383185847387639545612923632861650807091035770359340875201223709824425198384350780789265710596870795384269771216093973370608672237742532842557505448028043030008050944401456944611780531006197383058062312913699443937329146326547114398937187151127227947392092157365686388437924624957349704599640757788098651517808859372245901306072853846211543629956500167981731481909468066888283364911432922401096706947917471280547119264174519541352475836700425801954365522064924227432776860226721011376414607502543084338335776178215334440621901617536162417818015147072000463772177724284458547878568648859541727672623393183195149397625047101182742588374528970800493481457941815112677525537461710280825721635455567935700075846806736560097400698271741354905939264793452249505899754182559606468732812321344096359223442523943596346996754907000479570342385867302819731934451155511776197025939549286451875689898181605947590170667177039844911701012558623758029208970289701281795375951701499275954462174010475536709346174937760542291340808192074483121414693059315066937895553494640367778097827581817639909434338391980371501225073578514330762645644880131385224858056330417282026526049508824798265059723364637554549997614808146016118 diff --git a/testcases/bigint-testcases/BigIntegerTest19.in b/testcases/bigint-testcases/BigIntegerTest19.in new file mode 100644 index 0000000..3f7d7ba --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest19.in @@ -0,0 +1,6 @@ +a = 8125007660290678403093422435817867964416304867714372362332697927216056425702603737407102781617167381605085673439927434056692915737663012241212878463111372479960502101284481221162122555704009381256807893277140675625339836983401820011535628522277400654389921548092905505056584153315442493411309061437964442510526556010048995620333759454880117188968371519105459735902343942265816081757505165456880319485045292697538230822822253029516683598047740292061247620723163445064618151572563092794541589288131774090677892994896979519241283528701976435320912451299268286601644136606513142405680626860466108693518015372772527166749953631763990631956004003474716533874583368410325432116244605047795621476478332212227740336144286368781700135595496122022657407835268538367362888681534679004454215856968922471774509901520368901843511157759093609904242059170471197948991104897525260689099858908037086268220524306973593090415495066114271052672899659670403645618564408102122755096327854319159609854977167582520514895975346267940371158123759247468536118213521231031442066716832294537797275564723800159156937108404655986360054069365975373560377982755992914869546429084966722770757536526112815053615556192065714608969328278701428497261180251412637902804540416935058782755216935185068294371722533024847313706765153921165384420693442524168528245893720797983613304626247266976035396867108219431502731045422096034031935394268986234348140257092645684653388571671695168440148111031847268152494976687874631092549182754519880159379607707351670898446595396955741654469016088936379380230285536826565080973301317784290504765387478358571950899115989345687598735659114151168747093845802174504946273429189382674515154687896303199606154753575945894366073431635412588507562409818509458470553198259459142417328665046452078188841221658517761255627830247874551309886717905069349889706606564905226731107406338968036239158081665987367909066860452236170267757614934768601406244545689762003467123881630711220239553459481761393193639164933575371810415441345083026760239334699977235130106564533378637673851521003447175613334155362475137106893452087857872986952204006698633680027352378335066122651474807805024131435932122943513057772435970598865738863835167536820719021184321553702011357182860218595052856657639352679167844123768646292521353702035949306619787594519064735385312429360643420614940888692351848202847189063426168463786922030460398331040872705743812347801149516528482687740099681038765522873015621219086614558603174678281271438757501215310528126805649245802347107045743897379393259649505228729503981671920882610091502092536258274345135075519179371454548622915548593575802222046581903484758478180603751648500283268834559602828540381413578116202741885984173057657858972812896323508323220508199124869150525767807476539621097682343754412133633819058834078361729467578329424743668338887486495283432080704388369024550720655307421249127652773121998533024470465963984121918185852102526632912710604461956058500536262032718879315733874336723467305305888175880465803735393200304408039860394217878097770289435486854386537065342465834896178296008129253523423457704492850328361081286695389317574803372857781337602336431114396742900035323329597315412343078615228832828949523407904660814120819077979648763113742439183810210825967030541740354491328258279833898892747947464069443398148149904886385388767979020499941132485232316250741055097921016044856380587426687082147906735540756877501365120388163541583571592938006307940215576025785523458790764158480007061404308447702057876210252489890732418922565947587633669604294801396198484181861070943076730702400481397022423900427720114659414016725332376490249567258731675372579423090394914515029533764902808153973270566422501968084063714762757725173731519428680145088015401013841208430326498555385137700121445761823021890197088969947540167125451485398014649120090580458583751077263275152187410320634977414912239456152378631588502484709980389753560601576215888607831778650394175990245708078687133875682156212985605253429112967725412017889270760923922641540924421619745275605914919627189925334942289947614584692119858166330142776976735051612699316844593315134474317901674674176592624486990626328440415856294100901302889688830895894268884380405459637444884108681008012826424276892104982005953527689786821382830699552711448234199298886436319422259120868773714459313339480872045743217923748042096377466750170018310247690051353280910972357035983719111460821233965947006334745859484189008052241181358104766069267733177633648259876734820286587765690325700721337099503154685789890155659716156668866246874858170175963909667225403579637575211479141283747257709040622177937306161020443111407790654027362311538755512087 +b = -6426000395966292764993599966151514017252832879616956310927089371253959614657009396620381741753464491844126616832583368165575041446314789702633616695960844224851501555616505147174866915431794003760768184833687597108610839208550654998555455855996234462176663798898675935079770953245648353467304147983463955703574032847210266946452783234855765022688664580575769855018220024123526732472352462254700689371140122362216821961946553975440429718469143221111516479080533283672992765908249759988533912275549272074385321941189019015952805422962502300822042837613827027578122666106650821225238153548992518893027139633355308039802894091038328900054769807669288971956918469814260027539870407428386625911133489694422484898447831390919639426331341538496782829968919849199706390227308454482396664186060369847914032223575319815190118017303713510227046072380052208799795809124845443963048544602701813568018651751808833408186087378272318295471542224965156599702529099786649671460985833340151076914218757796262204901753178153697812394098396129968872146882786986152646868761307777548339979169578671343754799128704840386105281123427106172123170465147718478699341714567484698581456716800909448236630483071317455244403300185738280716271411650210513359498991271731400275057678603340183344136118815457627050421788967792543569361618934011098387749467898526991882541074606375532761668125345395850523170413403350951792858028880061218460450625547084461238855603975890182278796107673294484918207192605107573502962278047394108120605064968596125537023259250941072537569684083597725390718894705097234939889701949112941345220915889170473459990343628735675867926951342733742816259616040308393167061790178960181956692794171875324394799221745418499689490771982055010927080432717737993906069718790578455014606791956809114832413524451144634379740367028228513724966885298166408585252365919001750121971232111644164849058119830077894999820463968847254848466656969531383401445237856280541719733573260970314886550632395761868320019497541826913564034584692810316912763520365490461763417721677657830145936310664320455612574957292332340735404971954329747215810517644508521976278571008168466292721082131109518146768657620689062710286561342655430285960781413856066036351762952668494133665410259252042685956071478555664079202322422833847938183010926400380551386642882585536548815126422673144299070064134820724913659320853167666037764917580672734378179123275393386262053521623216631648754899965759806891214599943126337726546548153177533057895251217073861811723897471955152075868711608442960488211555121935944545098072555081541708404701549129761329439742598295745669871491702570919044101152825527536579465261057360319955154522821413813195463495743672158728753644714911824934303866176529062686320255127892516008348780081232362614778259671276149458411662555264468796601480787659595176267388613076271869529224502870723776086773625084878426616541956176601188463361574272560276492092997240537895642059748005561405569941250949565788870385837985875618043021242480007638012501617196627236348343203237714584951755770261786690864801118452489981690386664166928078716576208915576504023321311417335095974479302523863140844141283341818305298374110990675833175948309711739714502909146497507468097006053947759688461304110476504320081258929727317209433869581991664990056713471562144746513345730402373612619383226184231031123978191858300478576885468152365370867798051125614955443436719360058938211747161549941343618172489749611290254448212113439315932641741359688384171281501335418773214906323987100742835244516882422272656286745829023250107217050160463229908304880354748567463859224603692586058725939001305965913243307279126917757663091617610002049828448219041613401653551631451774869224279636111067282036894812898505189241889660346194148112835918597456494788407618653765040989776970848311994733393680892384555259969492387079009672423108877387885003988315014337616824343209618605839743081169587284035785420579336111004122327322904978611226953029559194679115211201476416502100848778925094289899023204650758663421857718554673162673481029874363091097578972189461057509193305511977659131905779161201182416031626794543507226701114665027507934730174343399461720515149364206003467936128612294785888237870647564957823817053753142733155086783100653972728980829858104523308986636432171104881107499802655150946457050857742117409767437708485601167548593286563857081062310911426125529870243156194481606463845556009562243205255201316135273720091614022405721259695444003914473464195460393195438875266936245100401334013666689215862234017421435904548928264565257735431905340932015944918455408159316793351216779557053108407693815120878116626280732998241657909150264141895064934182940739724114720153332532775790714904786168949852951489333061242050426660400935801508092216529293458429344376609283241404201549485027001478546498271945106163135014665589614232518991423211147459526192810482917406288823 +print(a + b) +print(a - b) +print(a * b) +print(a // b) diff --git a/testcases/bigint-testcases/BigIntegerTest19.out b/testcases/bigint-testcases/BigIntegerTest19.out new file mode 100644 index 0000000..7390792 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest19.out @@ -0,0 +1,4 @@ +-6426000395966292764993599966151514017252832879616956310927089371253959614657009396620381741753464491844126616832583368165575041446314789702633616695960844224851501555616505147174866915431794003760768184833687597100485831548259976595462033420178366497760358931184303572747073026029591927764700410576361174086406651242124593506525349178162849285025652339362891391906847544163024631187871241092578133667130741105408928684805878350100592735067323209575887956803132629283071217815344254931949758960106778663076260503224576505426249412913506680488283382733709838609751147001191085322894211283176437135521974176474988554757601393500098077232516778152605373909178177753012406816706962363768474338570396899880895610316057300241746431434362019255499301266943413878793938928040167880752527579547227442233405363109211121672102644531186343477092440616061576843791805650128910088465176192376381451774046704013211931707755166044577959327255856183456464107032977763992263625717294972788188232684078791807989044784255681923302492578027228125360989123693376248404809590836579599348874272053410654654940220667754117884756816453513081707675399033447426026442054897081052962892308698786693140302628752157845389426132603217765820296065382270142201375232024262864156844157372308741277419286520919829774857065167633386632253214278024738333680101923153431504558318613460663215239040378673079765633887290535898177301836814346609491122346845655963977675352563252279474255690738235702162990257420039279131239745022546794413839911047430741116329816726772544291675963285614112086092647438121199543022593729681438614175493793136441524596074642501327727669858697049089427687944345139953018950758331692029461716106297244231845616467225538340309883064630384112480485035761996339437053629854199074784321255130244033859112206666854129614352888669656562825850895952478809849593251767833003028125429937139218575628930447403379845132567665647648693713081023637017328013602443692034157323754751511844333352372936619450991354451089748724722812926175049061284933272490939151876699816608307940439329745759093724505168618324296101577323305966961838148950065408338254218663636239567060048175392369106051022887026909468823156827079581262236646795847838484255620910417869641733894330710282016912579391538099917990227681318975658234604027648451263273657934555024712549596611119724039464271717685799754602262184513048143534601832794637159676605743152676527647398218354086395912627570578412057795534031739724531284869888908800498365213771482570781340458021861522648532288274192543707575175782194478515329604209380203233338861215638122961297542517712137897414628998785958758571242951636297044848839365580018594797082138901602327198636860321065390887289996143499601296807498216930726715579274511230513122748699274852502858633106338788666057956319126296990123661525961608288140627644473064482696067307177920967239017608593021333229926333273121616998359922980160694444073750207013067480237783086935109237897246720742750440919719860070178399078421923560136253225878867798137793157986613735659385160208087431374300195581369037748101612665835943511620657467448556142454505490296840951371111852561116671760614211228572737356349239873574728643114296632575837402991035603840609331587631202318554559384053264250082286441983488640291830355047332516649199155160535175554015492989922272697880762291022144897535641806403388485442697239283131721250974124898015802285358128024376281443709378918212026533438957358368930533310605685098371000132122430915392657842430927010007160493381007431239153278765801118734272367769901357061044229607275917675230913657563825256827551419002844016265898976578032265765209035741942158738754216079520024671995741888232643015827878194760867293294862162875327663365224160684560408614456822967094398606514443231623796060296304225757582821964259074570366914972309493253172269895845952767054702519422855850145712512424565224619423101794809444715797685769810603164782067701356864573353278948595803476298466138937628545353470684884702921031364400727333163271268008826115680811123254732267069275148024360939293904507346501708914308870098872670534562746892449626782569593913546916814153753666099538449138900102951523949223471474807070677072127785779915626689532459124902922152939934546292829220091614162361480908697123065910230914597974044346484556520188987641636325008169480315806129418092922844393351126849646918612387264456575320285097685114013949055293178716775014660115293358824849741678690389611410606009579296982803339021908519936505673571812608175714224796866202035127230369793603113148647721445235588783693211992213981592889919567451705238141006545661165426276142136050657831401766655805046767051235323163290779952887012693001582634958045452420154899127530838169965882362087261163632339904950923505715145911352432500372624592182469518439107277494534324081447363903335019130661358905425974043411676926357970980099739668872165448171378650776736 +6426000395966292764993599966151514017252832879616956310927089371253959614657009396620381741753464491844126616832583368165575041446314789702633616695960844224851501555616505147174866915431794003760768184833687597116735846868841333401648878291814102426592968666613048297412468880461704779169907885390566737320741414452295940386380217291548680760351676821788648318129592504084028833756833683416823245075149503619024715239087229600780266701870963232647145001357933938062914314001155265045118065590991765485694383379153461526479361433011497921155802292493944216546494185212110557127582095814808600650532305090235627524848186788576559722877022837185972570004658761875507648263033852493004777483696582488964074186579605481597532421228321057738066358670896284520618841526576741084040800792573512253594659084041428508708133390076240676976999704144042840755799812599561977837631913013027245684263256799604454884664419590500058631615828593746856735298025221809307079296254371707513965595753436800716420758722100625472322295618765031812383304641880596056888927931778975497331084067103932032854658036741926654325805430400699262538665531261989531372241374237888344200021124903032203332958337390477065099380467768258795612246757918150884517622750519199936393271199834371625410852951109995424325986512767951700506470023589997458441818833873900552260523830599290402308097210312118621280706939516166005408414220945775827429778904248512958500035855388528085083336524608353267673424127790175867874684811072241421827370218889761509957716701775109600783463404881581338695345141972073270336756810168544444076266337985204505395384612614970024008184043988418396204831287735476833315172822026228334451669482046506416943981976265298659069098479333725909373675829673479648375085807726957835244892328783374195805714842235435139145127845386800464624082874643854007320911480070170497215817034286149111122487309212752410154508360272046861003220232915425749474876873268869049282143391770428785439748891854904285648684543993905102405256243210571572540593768240041771650135626747007719852542875569547186719981296260368579893486637941697656282670969880678789733893505776769872537266771893112985270650288331909302263746043104048623925125714989227876451793108035695254373000110236487172792520604857193337930723325870009461272338373401537487444838730740458523501019133121306824326422442469886847565134128658191797473697040524185792150615093874259125125888689160037350669939221519461818248397460161721390583204187505856700902019019863366383165425933421261771863463230673178345800640915765356559485986764906929744555593764975298225116361773058694076710744197446383266845250669354010224319564942096125842828170144040500427754066670421953430167511145930222353061109515422331409793365999025271909267998285309961866596450180553886240960504198813538813931676999967031049724890304161669847671751271084774208534564954228836526926899810790736204017003742987850676479233978981413595553501032560901884913893161759148690658020911605793352157664118924823762050146135436255461314710072670816044009695424109149273186148233199156878350714937384822235499965703861688698502556345781883299080096397488375965667477053993946280261356874647252708552055264043586076437970214452385683348562809789340959992869343970870722198179029219162804063820406647334130824952891767570274000036769188106866462947744307470926420441552995231158259914487804583479767610698086448944552758849062438674167044576111073349248278986610568689269903211325855878499742852567326718925911635992663677053048805216735048206904687915030572177542672134597002270607158182645695546159045935452669583508715605191119273140873845736846722790744672399515081299246663210548008357768663795067398925112342395610254876285683944558769339913105065388395921660812226293781781782440213398852693272589479724708117720479371329709017157294108612499214673986217719455499921990367609063257583411405409252131853876974521413993716351736009786003869484294098868729296058842333658756314968430573035887545537700031801639800970224686917311789220293620706203588983170040071177322601120454821674848656235464613244919513940489392571371361931539832770918516336774933260787302690880916115766508824737575451966223228051339879150092341597900039317350838372976975713087814677065374696011204720399248334895749485294448643928926379785689573227357968985293723433785909354816726612031023620075485450267960740449705549301537754565945726537257095784496152676451903831127585660660953580157828772622035232145536587548985920426991885247214578269574819647693334600632900103008638121354886195150363862267745437303478649829088974112322385205578177627041041268132837964080764729798839989577447514698945247992655009748330903117175364298844490183987886510166424050591639606455537618641815033782579149929815086725691663751932685962324676219234779459205313868774888606639053757977413228853420844055287767551538680011866322555250180220172794456161800910 +-52211302442257061350752761808273341165374321243517085825847106034893419598041543485670007975121361680420485166106823843699138902361852797594166627961092663958026170075030022381592706015107757511619348796896730682051601161783252849357266493667185248082846005829772549470858931370346710655500806827081029706397297598735583480507278043391727272676206616371487108889508770355897788703279045072328973970779081455965969122590304082036949835488796050846925828602556507119737705349289075629008032372786375317068453214437252641580016765443178710408689256264312736135745626930746736126816679303769830196661099184846599542786476681982837521714806747448926517331928948188754354891390351417153480187191994365572786037068580595209443198987045878171695359159297557091793668008616480179314289163013748931259950402731455700322157688599734356594849965106844131648362061641783105071922861291914364095395041341602865064008737839229492556994327374555346266570184966730364319739648601846767781770198226559909370336172831587419219339338941899186957255465404844028059948121547632657332934848322476595901258401602556426168440974994827392500139100949357079347511446255472680307728041713873655857250774642321505500353618114847176042751481505760114536091099288108137585058884853053284378282371191106261629809990616933561306464705679585481401922922874105080174907499152593515820723148656352965436553948083975575096590342530290529685171673066363484397925156508759241254149925404679560540512417549678631487120957432296531173585024646261824491522117309304273424277050851575770379273974510920756321874827217889547278395146303717970433766850995767151584763969402941716654974106068734600204363727795601431451164662092066493763330777306134495095112912667205206618416896146010315248618104232238174570008474108308356990113053596214138638998970311790317006526677111372185457949059995988425744146430485488513349423196203995966911140808080746941397090824794333130497020153175191731678793147147695685364073454489985822569230106854787315120330495372259094261059492786040951866600084271749362504982368680761571591844827249371041196579233880969179307743949911920994277634155667914733339364678172033122327064976070574233996489684868454860046992007360518269310011921219783485700897972371270180579606522401830278430693669052596284089359508637828582053741893517647753002797817501966557406517971629248198120865882383167680714729042771280415114349264489615039588255278071393423285855502697556502717641099866929842817477226483891948038750008104508450687444430084603914176562670215333407449698252411521881505528807782749295251845739410329978753781184001592142444457502098362260348050675436109711231799009033538645019471981631357167596300684230634880576247108220968062297559261934251237761758586953256919204655110497115355166846445748504052820815115778155796986147298700812695444688987850376503458997498202160120937667529380539312530544658196477764437410585185760080307706231442064220913146699026608019893063363142286847112654635717822604479984713369634995359790258592370069413211273444202536257192827910668779883553984861335155859032083122615166592886394097181090067096923828459945916692906207759878448794142016284444356935387064895165891985903557526261801144828796663256473804054537186260846277252475494966353875038368675921146951839935513107908795402361320646049468085242227641983824842571310041808072004636205580647934680690081976016739802499816207628180905972504609392885778253545681554484472140605202389399379482567479047789247109747819187986692132487186627951951028357920965101054940026180786016178161015024064996700489470337243842736688760776210802571073629077041198501178721286834000412166272006901689526699854392496352892891744303762173243505526144553253700269547583694837532741568210621544345949076477875775495023373094965352623080694949132257626356562698909998213738958006208021138106751626880417367338000193019301508577244935837097497073214169559235541766633345896627137230212431209106460891805540514102966198391937327030650359521389534485946646278771645928684305933837770490387187135910325286760971519866537725274599287226068684666935205073905939749115784877716993919218893093088177178066464360122607184382602938600607105683609331500361894172204052655458296679917846505761584325171200762884878807625488228105038053408893217525727841679233518439274042954860280571176595419901384542042333683067444351017086296800801262807848192192447978783927085036276441850593076559689893847052064944089948480342830102005781644216309343996607154128906387653072313370650818296423801353278776280448443030642868098433914342542357456757817973658929078519206645424312538014334578604352828508263547021144387296713619634413163614339616719903037075259476123838940868392782659842513042567212098002984724912892506920231901046831589328958391994963744745069749598977591358499091983811241314788683503995670641528791152910639483168261163211890188185877987757757030504688287248216410226634781830509935441217782813974544656380434639964917610454976566596767754292429298987946315803204532998021795913874493709244314170710627972256668818181962991828938710110103688623854658603696080953529051766787794805958587566791045479892462437556611995890519489769691245527422414126341286783028338776499177278109229676309286898986360618774831055291493038775393164545389080556196774946184132232195133312569680379054411160981861949331034142290637560173245418268170763831802250308375808743658323043225622469080343399280974958347587411495480787254442888649916062650577962611316182567303996743692414781652766741589223850053416879158803979746300642590719503877183980589951514387462846075767427042820634884978241354943101698299983286003047544698128081914479937025054870339204948790988522088369038049908757249086055543020488918282290554756084154404466372354469424043165226564836040532216265076798260233848713570194272424273414781281906407162950932000387393262266770311804876778753560167183434793310647543646541787011296975029795996566363832889620665053100462746324649978221555115205653716995959741007373693245880459615562320284574069603758876225094546776044761702341156411814103552576433964685425875808370789680344537730232769540465275882760902051002554886564274201566375300039283132248485960151209254089458036698609141135130940599402669624320493167793350469402097006580032176030370634933739216379606040876521320463252411168919832755819750411926989326990649440626997247097474626490385306031787935590943509697020495652297404702242962779174393358138630794841220887850747142606297329663689294297961162349400360628139610547768163081847336836233852848900234462644279545928046086508441657833936953674592295302099805741594266175609789623692424607971942224727982964216782598751513678298488951693439582055608181060974577568494018390452968280062801882250093455949305117322318409599032953692785506806410669055856978008678681209063056607705477381718486247366029727243776239175233405061063811478977809267478982739647855795615570889796155686907715437923172732601028661838384907435220348041567985800878714992922922544756275858468833874909388630970353196893350807333457410205133339995791317372841216815622689224621169399870580528495702278602867860013414132777243106708751016105706734307381888075254563015154580301462840517232699524748056147308217609991751067442385136470393851539987555591978024921270845645662221710418578946827469186802608305372673262129156591149055897380932813144649108198018679239247702698060526537017354043623516448249219159959020571307166333287315136585055940698755334513957256631044454473922056535344922873180492861910824726381726651749859444956768899951585496218356342587252364748532192584562944385340940552047775939647203170942133000530074368378731767079519508775526823204412157005366008419986545527601314901132437266795109566971724303168571239680911651437013648940137473509940637740573306218481248233151278991708813643323950811327973470389776514898510941626215801349420556148126502573208145161259726029662845110526587518032933921253917511891623891667198040477032553265262107290107176734635424322400018443199709099540064117422911356058424050082899585031003455895403197265976551714754438920938050578267204398170516975103752412823333596853984285480632996118532418199433364293675037160419904815357435427006014802097599931279108277330266686202971646808204473635521209577905366204430765414729945624281076378067184241857628230165108839621201981187359232352953360173227988601660081103322633103167119841440692382856075017522265705573022512573955794082593771345600563034977579758639864219501526690580864928880951907113119524551682480568125133170514456204751196754447698552861675079228319868866501300225908267668928912798035844573406342697972560952731072128171487110266203616960332990209444385537725672757716971219448568042894693045476980749045752492597779494937450902554881247995454862535745053916913225305791961927000958297935368092950579855179617271508032513461103115225920971842863335778930050161319710971231557000569090188053551271561295113768915441999868540395960504176098113379941612625395611126164534439901943984299528291769198820764208485588038867856399160440305850622989302467231079604187217375604186870375702246425683416427335565721348751080529888940493845899773951934699206012167679921058929039522292985797490238967423302385095855361743555606023054962343111238652743783969455945039879277439889894157241312014710679785846719209430239831417132638829134805198851180138648308876299063015383878450666933108208530425782605443442434735214022632536786718771903865007008834299079300509810512021064761916042936946438497697121118669910105021551196842631415322739397156604319652039740813669589503601 +-1 diff --git a/testcases/bigint-testcases/BigIntegerTest2.in b/testcases/bigint-testcases/BigIntegerTest2.in new file mode 100644 index 0000000..89681bd --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest2.in @@ -0,0 +1,6 @@ +a = 154239138717853301429140863459338617471934589259086137250155046682670673553747312002660415789251648095578859052329630545561387658284983362238305238528045328414244139056956253658284701687868104108800783079269656121926003451183656380834946016236461641766929457162162040093052821429491441815557088954015393084512433062270293371152997986038610700334942312352153389150806487072206178824554173202987984303121036041696542383014070040642992775107147426565474076626984028744144378541328876224266397989233152894183286478664665913913491895254274035671872658778299056693204257830623143314160512815877700349968270609842917694985901899949822585176215558186637554437110371775661860314564348454030371339773238868453100635342618175540711265631145892024022088943596413734688847523790081527172574652265301701362214555167654063667013802174732066713891786358152777347741994428587027060626430358724418244014213110409539034885790945406796425418606546163985389238152490251829529150757951213395309706306035034135823059481756332740741725458573703189139157695325287623247689352386170765220620243801543781640355018922125872256214139324428540238931148639091117040305928643548506323052171296711609041287054480253331805467614018963380162061196025121790849024942170104875917388718436532544969307255358759196248553105458401248539551053919002787181483735034374780453638063026010076487589540462552435621357916523033026482472919712180975334036110959763256925399389618835063179817640261937470852986157093081337771371038803582167946411754130380199153559775829293186771857397342714624156338475888337777544272910281609518947668654862319903226199935127606831813407006539052115400814124974460891427797113832547857071392623562837076348916540697176122902157048541612682335051065372083246705316922697840612524667197924282982567808734927330058623498408772692172460919599120345954831308663929459184105182817963769027308448358986927256783990614303673575985654372829972678006058403462971530207166279972884123842546923034580957721453851710859187430396345442979892379436445539757390774137429779588219704522980136553235284294520548825805024375613962754073059771000750042964476399335752342326852078487185864586172686826613470271667326033936694278290327649471474145182624897601533860579474659958291865517072334063707535488385473013934467363899650429146694369173189941674657232514519474109488706927065124251514898151524233901526567071280745075607491012314605974896741794561491820953976641718921377816379364153933420124125381588800308731422446736042241296769411713651366133853466452460957006579535549073271329321695076777507922911780710464337215509145961408117598275164059649712315066899371479945172692812417414621692042426016237635613284745191972365233353875944458179155771731476773124731848718357658196046310792825076356685877257545487573255076574027924996597537561340197937511211888188397077560968788423371160810138819057656117822027450150607976336230692753442115822263916088510414674631144641813037888975493930438567786242638858790352839908837501019418937200086216796310231973554932139120729394456272295808168332495493086937686871669407229134454782753026835373762250223798531725507840534120060389484349573873574614335819517698126416772368498810213019883319827763800063543094176773256914302559876683268830841066647066478078406840772342739928054531715676617824004306091027486246506361495873551151617978819592370509323768801970932217172164570675877421325124613468515354304535718669603511490750866690684731719534741426498710615174110666657147503333120249711240849146657781154131305581431477581284342931936682934300463825535555585893659824297536952990283556124363716002804106317701005998121648344000279896149881894101476934232558884513210470463943423433083985343761917653786844535008680342990519947203076978567436376212066409009233873678539585707703510455336076378571976206316288864631190886330150140863588358831154963410493033459647115105510316964230237879315090172084646547297626740484108133524054290944536218269015065950091727586176216778650673995052564948177939656064085436042194900660357171986465299085806982374423135033566204921211344532698053035607487430375698898247252075909149873124778911162311551711563354343558144889195823085973403236343855119199928085396450125444111999727174431588409600246862809066432981812519325742555099632954066128269198257036767449705589543874056499904196161944050763434192685720320105279444072656405465393696508294382666303590587078031501457657686251267373491338052133157942566921109257383665214044283798948128729555064147597508731038403673782582985353492948715786283027855296002627934848750214597475708506807237717085382977815908455314896674722964998098968629402697358330707261050376907238652964 +b = -92043475156150549034823733673904247914693211182921793548633159751549830045502967004590434361957852201739908741716447706822981361755720765729888874525271500624813927817959404932257689532740141767050434312222691643103292227230265430065934532089375150019241276614146038519904744820188255741087734195113271761579855720147781273626170295258323501152206301925678550707805032657805003022730500321900470939910182846029494629924660467525702484477681202921858412497424459548959579385028929366326952768790658433158050128062442493311336748109388925284607008972097953589419263323462804689695042198643940589449239227829610373348607099999649927027844851854860462694578766066241347312316935178194664783412527466991460777834284959151623706142354847717668940156630991502582726728682792927225509316059414706359345220285494417380836835582975846509087336105517308281945116987313297640584239842438975889715797657261432841447846681434797132860976610727335804772248535113146749115758162256418177380460373590633659596895595801181442194224394852958415273595526677424420057413924942263746148252762203433475207081659356439038426857755002723002187619531515833199274655206198619204930752396001845629210716278074329534623276171407744682228113064609184026674658540531139525677421784896555629326875493227921717789859000425023050463522443172981688986176567624228686480337075031052891431164957412767350524017441388020939020469800181928970108715489514222549057121495930574877229779212521092908399720919155603007074388005753400448386287766856969200771703858121749639688477826222388991051904756733694675937799973398875327480411070964752254738096788454093768899126981733316716364755988753639109406502513567443435182656950624572157961350298083966268099588971197987050523682859154278007828603959905405060444073900969004855769569697635365524707121751373633288580844741571542660578116605652797524062849913450035642062183794322928481974518033229763015735784916815952561137160440931826926720782305386127020214579660273074648809278783216298754858980211625118350630731011046069252290628892529118706964495829319559511990130906680536099806821326149095014822829110692978841524557593214840544160312841242128546384247416190986199200047226177009648392497201982793362646031700940180822353824400123778097829335907496770005498986289020707405538623681231318067538428268315143748445213164836659438995588550822572488484240144588667209713036679624633865141284870412906933961730050255846448935903490130198181039784735214922870902244708282627105498900746102956211286329035633657703503611929951919626910143282523585388679738556170506230138432090170130859540221326426861672504843278533222567528503656796708499883756186155212709129916415421481330835810911017538504775523399111164266559317984162637486659872997275723698213540495408402696389551010280261654259611875666705465575890920167432462030771228984397605478281692337987238996549647811815921674402114044422335287721062743140907597082490778438504792429155595291956134009041383551922391709718304902712111532804999429708825893005334690746525666932733534534203414498775341083124805034645790877145179432166391561594323180447098627468148279639896459981464646230177415037761710584978936287251961615217425430590058519650128974855527394781369739743543195547458600025353680740601783005980767842361599499248837119291246049817880734073939046427662200913909874195786996781501156697864700810619109155399362447124248293015880875583752024164693228854420796047689961369023581850960256347534221935715787678989354689203244360519445510870807745338808675160157788640058649146865244460847424392583053752438873482477607133807433585157571440060973568259872872409202381360781257803454779388692696491358606306686101604632498500827863281684925495212682566188757408970580539614073002955316247932298516299981364927849050342768517802439648048924045664660250352861903232914088603162382896124195845303755165844679200847698181767576016064352367262695906615220024304241227745178434467290013482181707992019361516154747692313353535628134823845435563327228394937219900050921970395893806310926002041160913900945052253015534978938288170474002536432583579300578670799376102880857003264238333228650984520804688329012466267062121973578566873255070928129689931211132524748092842976440788305808294282980073781038177700660464638892729565823093552707996409169485082200633249139830348573532718827456074705748331850887116227383863991309252002094890721047305232706215315008078155555191378642282673388020992582773649166702996210432804322798287333785058710822448883538569646766425131829923815966932267051138664199104171242727384159689479109237499024518293514938738217900076330417346 +print(a + b) +print(a - b) +print(a * b) +print(a // b) diff --git a/testcases/bigint-testcases/BigIntegerTest2.out b/testcases/bigint-testcases/BigIntegerTest2.out new file mode 100644 index 0000000..cae877c --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest2.out @@ -0,0 +1,4 @@ +154239138717853301429140863459338617471934589259086137158111571526520124518923578328756167874558436912657065503696470794011557612782016357647870876570193126674335397340508546835303339932147338378911908553998155497112075633224251448577256483496319874716495144939470396989760594199226011749622556864640243065271156448124254851248253165850354959247208117238881627570950766924424905198383877944664483150914734116017991675209037382837989752376647104665003136716801182714649748616668408698563913511551949972324873981240206364953912510225344669344919889987640623535154129768180650002823764706488775065361261637744964105566638576487017895481173359542696964987871143946051486965957248454380444311928387013592637940763852109299363953314210713829357305531068946743228069689505122375548868509910453983693274398536662561084287073491939139488382470298738070988396774143092609679789594775748571734926877004892230752940673958093498784834366703725009499522354832990396687702911269778598176845329424306800018287233221219593992609700411446770961777234951696989588092456790369583778426019406690823225081423395448447836156725399486276492782895876887683565098846984192067284625313541708886039099434948737498606192958812764760957130443629119945219814225892030546382765442265124800287079142294150012221878446917870109013873632134106231552156859541146858735848204025585053437126018019379453932371739955408797795992582637149922442604946002350489574875372177447042240797170461755541882877441603567115222313917307651593069181974917859106245160054910137583764783009336961223707952188121480808343501206423487769307980177036097514235148030370873137137469206565653240073333713903496139173059017044093763302493496581103759632551784708422483792750546028045238899868408421458674547355572399756646256567608953084995517285052068175780615669804812786767400475525219376949975539094231823818580475696212395394019867514245355714123412497698020778461591522916522642363996219668648601725191761939654360826811138117765005160316691269927360503675563137593765359221865879484316125328150996371920949663999924928116933663789537779735772084985070224954352806504920723404964409204845661790752271665859715491157863997502777292825801476343479437746167336630232016636240650185342874380274612732114855868679836861724742125739441312994286541545826029022916271343854034177887227015533185088781301388441443020196830613095965586382818626067580238948052016726055152324253310321347232286766928682241753182514222869063007217191419858750052884973510832552111098588371928916151210982564207752674379474036648327168373110408747741874265208277098534385295882235818125594012886484321093541808836760939389775041833272196088194830369921172959102390717216688315568524853992188272023943062601560357703250517882546747178507806017301677245521610698227503410617589914154927720873839347799702529108515498637386797299314528811495494104673243166735950389565419379378991938625214471749777835024919538862602858709470239698993466640206209375824645335041776299574401404045071863823645243952207754926680051163222420815826682344739490808738623669600081602996125143740296400920248549612336598421167098993497079716963388940628223092787979550394167237192049549846776875908517345566789705904790002089478564157889521295299085134446093210311190937672210950683625471032599196732507073115651264143263704308021505478663999896374302314498687573542552628589694862924504554971250660801681634328343112311817489603725099560448112128303742442391715838659157674474545921945256245861099813371751226129389888890310246932195589793752488226595139687576163488789593017790216777218499666508896894341136690879902868578411523263948567124639170736866472462564724322661415960664299011640801268082582642175280530564373224957295485928701994241385887448702249115285751450716853726443045116269569005168089437452380760130639677690016307499703341835987381623061148710782230917745832783106785211872596228361067854983190894326780891381452947539636409951756478274880183851006319159334871703281934989033472239527762551465996231664044723919887447208347003636358330475240371419047194740096346304870289374136804246724681485389214784997302199822893614894186490740688309015278979775042979474089819720205116399972105521890548943564591761796431645732665052458009842726991791880936743050601386800994462256656513277822460903974056693668667411843213591861011466596120957210726196276550835023078810823516575116820163789466926591597842255227144385230273822259958121489243161412110637334214893942375587058489092420305846056167043155014735081871700677572150181030694661382001224317032847119089365201983789465645784690840305450034244313616804284072169290563275518989731130378179064815768522832476830908235618 +154239138717853301429140863459338617471934589259086137342198521838821222588571045676564663703944859278500652600962790297111217703787950366828739600485897530154152880773403960481266063443588869838689657604541156746739931269143061313092635548976603408817363769384853683196345048659756871881491621043390543103753709676416331891057742806226866441422676507465425150730662207219987452450724468461311485455327337967375093090819102698447995797837647748465945016537166874773639008465989343749968882466914355816041698976089125462873071280283203401998825427568957489851254385893065636625497260925266625634575279581940871284405165223412627274871257756830578143886349599605272233663171448453680298367618090723313563329921384241782058577948081070218686872356123880726149625358075040678796280794620149419031154711798645566249740530857524993939401102417567483707087214714081444441463265941700264753101549215926847316830907932720094066002846388602961278953950147513262370598604632648192442567282645761471627831730291445887490841216735959607316538155698878256907286247981971946662814468196396740055628614448803296676271553249370803985079401401294550515513010302904945361479029051714332043474674011769165004742269225161999366991948421123636478235658448179205452011994607940289651535368423368380275227763998932388065228475703899342810810610527602702171427922026435099538053062905725417310344093090657255168953256787212028225467275917176024275923407060223084118838110062119399823094872582595560320428160299512742823641533342901292061959496748448789778931785348468024604724763655194746745044614139731268587357132688542292217251839884340526489344806512450990728294536045425643682535210621001950840291750544570393065281296685929762011563551055180125770233722322707818863278272995924578792766786895480969618332417786484336631327012732597577521363673021314959687078233627094549629889939715142660597029203728498799444568730909326373509717222743422713648120587257294458689140798006113886858282707951396910282591012151791014357117127748366019399651025200030465422946708562804518459381960348178353634925251559871874276666242855283191766735496579362523988389466659022862951885308512013681187509655724163250508850591529909118834487962312716273729009145017724846778674707184468875165464831265690328851031504714874648186253474829270472467002525849171427238013505763130196112465688805482832965689952502216670315516493909912266930007903156797469230278801636409621186354755601002450244505438803833031059343318850564577871382639532371494950451498386581056724368697169239633685034449819374285532981405813141580615284322394289135136056104690641183663843798205882821297037803570115303552352638741048553714930859516168835852273695629161941853759700644334368480861393188546213179554168569213584815568348475467850143816863471735892563233900922272321235774880693345913908277739407357822623048035246827515604394948576285254489480921836960733836171035134453809502912638158226490552819043927082311310781651501310927150235941281131278413629930175014229156220225837693783895946641857425632106567805100807598041321386092272377618195074161867989316956441334149103333348603566371298717679299492555875911168196755061434446985846406056668828480274859250060734865525510648522030464025218529519985307273327350491195621922005473188210512086283123601990315701971504744907874033467014348723095372799988737270065642188390057842741017359879373078480550073208321906114625213219005346337778758910853197990938977747600410325178522875308402965087453195193294489273293091809403005315376067021369110466935973546176297202379811334633280894394568819982086177011639430421368824563427196689371453444871604125951134087329735039465541537907800818757385619672845304204690887440123150610350278203141315366444595152445703904841849121301707279091575422631087510166247317583458291392626504274722616270229559039936672918658666028006880079009075153283812509018338424405567392620775439286017388401713142305941331806315291630307008888585531710972565311751890417444523829108462342578430359647648083446952196942592973710707614600122931242545701651529970786104972133314928591859346533489471536612799192304328924684852063067081636314088144146933644136815688571925966830406500582188347850912606201138454456578266789296405166976473501933737196122913023651850490647942609394854434077492540016841230743767244534521138796925727767144316142189094889805187480077321796235813967229227121838741009338918928918617685041550242576625493432942854205247799627324572391743369599475177590411402943085140180282380205106669993015789676291236049571341738677744886166504495516639729305632322774169984136521642015012626557624058882654477208206128427215651845645999268276983569070310 +-14196706332682788597211723145723774460124226351735562620492108020085880521267767119291868835639480690434888351385957803781267440112094794247458782813798742123014322099202305688495385633867417950157941414546307064019203757211535602489120577207386653707221687274890175846905904665323908213370520204712097002124930332412104590465323301584148044530380856952260416072328638821312493381126829960196041672773757812852141510656928507529088866024012174722888712020121145334207155162587810065828567806817401991895338700196012991239568047293694353542503431083566471511773701546351337884483460894326155661895290764119470204422638856654338248983994762963609312770992324207742403698516086225720482960661745445783225377084771339555039363073990392597206049196322975901515528641565681366623649681892753186509873426057129220307787395661690378538957882504362016254154134888761279650223495827824293717701705140350613442879211075117414869140172926529078885833416645694049588831978366350000818067074719401134589698184164979718454744560240844731247843388849471024955141913984905877871612332056398457056927565072830702242744508027508891616913628148817741736790107195304132535896923005324489117983928011957684379654201007197492651294423128626651973880857083440966099676705940241322151761119547200930800287270315339375748122938266604704990066654997119644011738724299955113171662120101919224033667113346788887111138999661197702441320688270793835033790402725298443472772484829270375179611046943330565808800132365766931787235229062574517130712812849411144717629339118905945089356387393967460318510698986269297742619776241370983333422882378997743228196621051169454325856118877023210660356473185295591251826757206349491524184118875628798969887182811811333699360564080959431123542808984283667002691072697122170730168762413597289963719980643012072350931350274555815946263839023347789517236805001413975143760257841517622380285601382900218279113475171203688625364990161441716861523107724664371733142752672430041205312677567453480141837615938424807104152150070967485146342013943917330962626828971663188718589188261494480909970859011380066587890345612200124805167263849988519469953445523828042040467345171096173450568117143344095950714358345686778130466895484234020967360237946778902048784817291232752491775598164475423786330842445727567900295907312452535647311695977213581608133837339696868376534784540720887563303075592750141161035394716823481631085191015586927285281811833480989874142831606480285779799326551157390717954948273345185425461536186194160785350314458669547171159923372845429976375344643604629144850809767323021055878715202669159496090650947503953334181359293183695964780685898560072452012439935916133347793946740712778201181838757741138136799309402164721004989919331665812372564734921114768414623429960076427018512457497214861266962473781647232146966122457475457021057522531553895711034915224001696459358749913359621095410640301852794369914589804650797667078904123297365124396107518440059926987053527979560222159707174877078192769141179418133786779196746427904957740991838641894389379509848542429819335666382017047622010360654574328629416464838126860794892589653947174652217912827960779586046068039107189317036344174396634200835152208996281054147053573292603317795743347705079337399893277614143965839607287751849925872146605637413798679572796551360499914792288255495218382766654104511103134763722652948854602978355379618152951926504468371689440180964626275927477130726732416621805904334705362699922049738151640934543034025004567850529540664713225667680226224486141845354087055567174636585356109341221590437879949035437659783056001297867389089485968192130810432048902320822072675997501490734938710660922733467709834122040163997531077306774347103754090293784861488248446489226783345501330816980576151662581814739528757611440060332080569358992533181580314201336062256025528242718586387609744067767534126679679890539207348186860522551146556743961679862538361384653120870012069994699197615818792526043159138471240966355761439954384054985738902556730066688916374572105092104558001982815779881008265473470009102320827420998827082822485851138856378696041655928346461821666183762934435462573765445001792702112236756095561062454315957140020416561319366942030302646052536932434817804600607729530072651296785785736179939241689735889308813715697362998560158878196732909109028328476164167843826712718967600620282657861040026541280875833983054479072392925147442573747282420149248475464416764673073421380698059690424246614585564774768270484653642210455979761670920496948704929735686543149621282743628484131975999005056918089161843659585341800180212942032238583572591843989443513951602720265269464334438988873376181293867433527721526912308142188801290768171114846411578314598967600280879018450465277820420866801651110676983704382412807719067858391519164467365188177483126957919625548640528021871636543311046281646168139527850393422095956437453571574754771705823375341773149082039258445142935362410654449605474409753886259137631737794948344450561337041928022355104822549425822170099350930214882801902636603453259222245027977423066915090214858630744778327516126015881637244481905488833761232427639927647701367245913136916315191423032270611481094657065503216410843090242580974032459724840856878372947282542012188624632164068075471701722144955721147845108238600035723524956631610904048538119504996390213114226897921440894058677147765533971388850689156739244472224317813312730874558807907238226449558545046394228569228774411886590229572828406015610400534609720993177941962534637200982424726975726224330997442192958964790175709164809567778571211952235712787918478869314613832402533211557676811256559814716474269519969000138714177084592887775094416195051792965537476374758475230968362785755947138483691032985257820034951641172182425466642118945387066370828500983741803277117192823498018934654013185487038195431290524256999726370169911083269736629030129259346438800853142941421001554160705725875932173062263092132485483363729595240456985606184145500532125167192397989893613418840727704078402792477143670405733702154854516590987962398506492750630151800374750783807909100717451773794491318242332857711009037499780074241321454818734719259367564556235257568117617190418880028896232377677149890906685842440146316490805333921470814303632384573677304424139488650123016854705819434570985916468011940244114077419677574665238541369633728949545256151181485244377514289215464351894815110375327479689524821876576087111258691185989561840322157204560835685776988391292284726220437385324456290184613588117486742415217789512344533248085231561939463170264753371584451422682887434387700357879284921430321392500692624725882818276379279929680362664604647198142960637339681399564211311234985369693808350253761744240261023161320217419789377632862117975292924148253168801608014625558242109102431351929594605815684194496861673392606252520820892570715121039311750152495181132393352219092719831330607528005200077785625813066630370817495472560306166152458428482563537316832414348948700885646358690808553314168887847491279587945126066639210050984400962030576879234355960546261926888438526721831815833533339635299800056252871960956323875348848219201549156330175913047606229561628982350776791369557069833261279229661315561327178903373014806037050773745107533695688058865778297580816332560830322734980923966578887366728554387014293722361210115387023719506489808499449379751432885307319901085415382254239206668020072331908226820644227691300481217984838224274095877790123489293604668600222469607091250701290499218623303652622776934779329620290554875757877096860111915015796820810632682220178497191797409076523939584458448352788737521994063428612158395038194546106188017677296519153146446354790652595744110656448119057782225073781023486990545286184116975535468554938106509617361399871711205775693538712868735016850199333536458970846430112509388787669217646663000854503968689505798731833151588858543394208805794581100075124231027762046226039419453917612767335491143618006460562724759479057347787116144805075071536128514433116526975785536995951191498539007065319017566816772685723950984904853417947689692908877402669825532107422483346784995763260358281926075944541621603995521284738186647353046842269871836882320270040448732183493517638830146594009720164146082100769543976411738243785054016787203117831789121382310670780874006828957340328778895720358415829773984172213924672114149580016453591195777919996021749918479024815945227410499212220851224442836526635972779033816545759453827563905002135151419915426403442174415665681531332750640356708048546172087702762135292729977003881436684164149623418528369198287312268130628279503335753824054534057888502498400034295373543704859404131090090225281024138127178708834893824520884880408682820404537495191801852119154094044914023401523117354573417071573232399548849564262395466755391629936990853779351163749514742810944304800475886104232182106103665911979734500033508079162958718956739925095264689842004965636455577540243500206375445438938723733376353952913510993056314868064823597368442776289876093576067936132659931377017654427090775082702445829874571102091053768390882037677232791413727360154111620141774620839210453697993506588835494852629532414006504618417537289714858309806725646699863190882961031957725517261572982709164979913544 +-1675720505513167820579865514103725092379711352210993628 diff --git a/testcases/bigint-testcases/BigIntegerTest3.in b/testcases/bigint-testcases/BigIntegerTest3.in new file mode 100644 index 0000000..be48c12 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest3.in @@ -0,0 +1,7 @@ +a = -2412401212299685888489787162546832949542989100249885503096056396426028995841374975453917618572691710800413609980779725577694839869949050068856514381755028368083302834565901481630503417585119773013541792815271171825977629089850439187768898294779084655196533226015004235473615855869723044474153711877814123295149365619259815424436097674241805082055675575096181706425902080655622678527978292107909388140632942942090895659575543018483841623652506799965033844528048214391283810889787849829753783647397188291454694334935119728445629725057553836437708330055649831332053394403871239362147251396407475771210651849278246455392692275191386596363290731966814174162362331370977443127663766704292926202933119436326168902406569509050338297027706253500098871243236674097920973750076268344525524572699542679670164329638959995433439241482498798231680628003890419355803742213022713000088331225050832865203338540720618522766964831931344332937249781062221617463031817366723327961342598999168484912969526479916323615244194669297450770911109488218538630861692592122878434236497637335816743672981009699916033725903455828735153956531322702155055770894073051023534167769686188063392602586379201351968133836359721271796841617403848855943104376585807809735426019464430527473736458665309444943894180027983852107899871747394317141682471544643002109233230128515891098376050702862021715927311929855477207927355266764788836471778773692556507418532017657649417919069667345990234236820114105354245801408569418670439540395538181538139846141637056515233214638969970986050700842302458954696546521225012586412357895771046940995409376773149832963445924019505138330841174811629582281733565671660100231970987346325172745862023797753645436575676221373880672394145361087888152117785263346999004816260255130584614437045457383926439800682707429738964353435509719369426613089955158704531329085940016931914911137499270520495157809078511918230659781540225421743111336795974279246373337322312866334089360964766457147454577262525490368813181079973662631827288036293598474872623865492001186327904062265652866646732855281691396933473345259291807041414731097741128361109456241021747674749710253126577389449261431560512609360696033335790023466680278540825654136299893590904611352718032565154063871710909333417782663020790579659062466524728655095274618568502222133165226803846906522262168553103228336331688447519345869622590275082623691054230697803712560153420674642758231991360913301998525121026650319871426490576188511222740974145788014583729243193943129993549691669700055971661369336551957572641169478085068114398420268674204423199555380946804155800486904442627331776605431702302365490629618191697759073409914129977259657160603554276464389669046956082517701421892604159092631274633267744740095333695263467134235696041097659050076266319559459322889748923139230161133633464601775770937610846327929835621683082956204887107155787543251262762308250028579215453402983633986592938800957434726915343987505425127270421103769539519858815973220196680364103616232466097793430423970894322692966807791097190334901865278637721105495433966706932513512230164892174863156899073835158253740793857834918862155897533211651843222093681849840483449949748105805945515166492608548501156867596470680945158849580225691619646838464868201624013299319224883129388443571792610686803578510389554580938300816299910806142426906181485634561548578874929521116844316178832616987511747075299596064641677513682833161010047288349881854386204962586693968334263670791079237982064898685302103536859860199036595704649193109016375390209436856825213245617685542306394448450122582806820203634477486806519187932598591912502316970458628443467056328860460569819233673258630109704421556054211879277598291034941206883425057491796205945183671992993776935509791713426040607203009552773223468097713973548232785551471199054456324198326908806703034421746200996476842890545068743198533014175350591310953148273073755493052385969677269378198428648869400434382636892464587288971760396448613195002391820416587459051944443535364698146708730143133333735817961698263828581906921758054643747742566401407378672328855268517838152150386344432498105049219109234593083365252148189084152318199079428045312585291392602727976738220888321744582709163664640471229205013124736235952356787236328493453205521415698401670689107536762456516351627002595285411820336938295985910437831669075203121376321176171200157004660238402450308183431287295153030055327121677251110789903630896129289054399563278110134194734726752537190474462943909748580319247718165221145935416443473002399787496332487856561998057017138795565564898644057218774268268304778309540182097842570706745910121810406991251348479721048862032118602320644053825135475668689390899444335338592806945066 +b = -68827848280222662429792059060707513545670949701990582175976299364831391106040615706147812360641234585486204341496752970536654191512240867726633520922246252154786910640556062774567709911377916956838557178954088648436291666144887126439890325263476631241308527949010697009505617398805589320282116095463447655362425378038219075201588470252010241904401902107712661216154241328520066001996552381403667318501357076679043806767976478719019148174417518503360697098336419486409571644827490646552295644472087531554696804487085753374359096885325710867322580611940206897600754906091276203148370888034952247249286139053884675062893722148822941913244950261820494681454131468274441195023515451955702542396517174654656337218050349634337352454858246583922107678303617165435881126183523570591366271322519168412857320857208199224708372947838322612302739821914494100190628646595460176731811663334427181099822881264369545983433072632966372579477943922396068951352049246398400910029471677940336676067067650591706033288568799408114193836347707796697993624562372982768067880896772435590609796021771997531390211889723313195759123099292034128524462006596464682213808852392096078044101561880132464812658947993791336462226420080030914833406654744795752530488438985765711889922449560912721730390557405882421654165472828598071715453856184393599654952023140700354504491998184867734222034113083972276822315839012959373242103673844336916517125763599022977361660455654504791421589320526664782927097446795960167055033491486463715323642502191131391310741657591205803096834365299662616663266821070968790036770746266217899098852927349699532922570276679715486878775885409983211565180388537316954176710456005742158730041544284164438721388783093683243850216686677805179619357168333276226004674721967850969301438034847136259893426060750072437903830802977165104319994235251301985146726134456182029826273774708169711155704024933366827024916196173912745833879240910675456216622766325583873090971575533213772961604266737700822721941181859865407345156486128667060275728565724210396049737347521786053643269185014010793178763186132077880808518398943177531079762752542151782632877483529042114538743273833484338009084311528363044672195142336704680113817956815779891432834477780000563000686058151672359838189467797639809472347705825246248919920819411144319386680573635197120303242547965380255365007482318174319596262232368673405344620367936504497728204668475385463405662112001445287337246682822921846597327896868374750256355066035501119225413931881972577301712335219267029309302528713527222846001213143719003390744997599326044324604425041526997263956509095237841782795438329187963935313574829611146655023732399033755792092199130921320347897703847645177329758459684352618352787033637274888844326559279403518351261952978757510887391088296160433868011508225679606940650641064913767957151832282510138650438743956593444939238482758392970054724666605404814140635840349441357308248825089197461328884675006221742930657179036201390492439337057866219750077002968027908424033617467835244878731730631220748117414903180119669708814731569058841260780653443577505612735207974428080820958441733430760805019815043894440973851889483692331130099754653259229786525744801502583490771191188896927969581728168512551838894270469362427064996596651063992019223870705733037483710956743807991096662031616548059573708165769926952602485222268750269460343407393274834436919699854275871014867841902367096906690683165696682236445091350866605649205841829187702798134350654773530511009743279987012522142620607830561742650474897635124642081468204467578196400336448116048532539748482292606003249217003338440768195642883223401377333590634164052159731639434260984138109785180073467498861743979327570509909476631256062439069065355425711196471359822007470551020057847481839951919678243146078797467681161281807784955373120241310786668700003841549794242839656178580520813196236270153086780616785391393372361371772629402536671337161451720837055552745199418241525029395991095402543454486754393600116714671140951372594345264034851472008713403005237519063041293825627324473637293126117943092495808703705577338464991085325317723370738441705883671573671922204079061042034278528315539150559086099954616797475374565922572119041181206183884856890664011396344034447476838452662259478035177278110857743361877303456365423958348379382136494879503226854253172907892172114031056388674459184137461789263326957149035493773485048129681863105607775099343604293941731270219021368753514598637208557844830182851219294753506492181350616033639334272451225435965311040151291376618212259068375985118 +print(a + b) +print(a - b) +print(a * b) +print(a // b) +print(a % b) diff --git a/testcases/bigint-testcases/BigIntegerTest3.out b/testcases/bigint-testcases/BigIntegerTest3.out new file mode 100644 index 0000000..1146ae9 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest3.out @@ -0,0 +1,5 @@ +-2412401212299685888489787162546832949542989100249885503096056396426028995841374975453917618572691710800413609980779725577694839869949050068856514450582876648305965264357960542338016963256069475004123968791570536657368735130466145335581258936013670141400874722767974772127807368110590771107674634124066278082060006175322589992146009052158761920612854529184830142717568225542749118418303555584540629449160891952787905165192941824073161905768602263412689206953426252610359012478258101839995688049299296004115910489176448248511631721609935240105026831412726510375860162380349958381295425813925979131907750185697732864964337102682033148658935204054345728859166818456730817486760652030003793525513731376533066503161475600326541445398594288452346120529375727982596036643798417167467437817649804500164845783770428269874634264997950753934223024521065074012140960263372347337440786083297416787311016844337783958648091015454914924303521103581390030320352674574922552669715546837491097215709348394410423805872841264757627502722772822645719730684573856492424417669570270302189323150924932095984985077952702227136063986003000642491731837961723642729567456338485596177586438934086998049961758398732704039864722514176284446552900398357805341125637909187743723232859557957343573468356186624448534321708724139490395185784033424775466921892178122307227560602470782892936549333966674651229738415794252530500726394228334605278237809089423540071072084542495944061949690676298498953900753431710119024944032393723049272361880254721028792055530477982930359292804516146795871213672284824035563774018351425551732416998697299814615890543370815465305385874666298093297605376067862791491542712644937530975842696389097416262099842497292342670709164891627305787250970712613046531927386536934846071493212930867367138004981071244746693141063891515461528156654634239323143252717869033700175765127824177075700114514977411788144235334503508076391044549371643110539139799398072385304237920163941931561467448812513827475515539315536155692458101062744463309630576648798858828211244100236178398700525973765957147613556239670843164898012990264311514089965376193941844469615931570118533922545935390098620788337926420243731839760814202064594468923321313904384083374538850110445962582270654086864497545415562942362291939950053770769634017892401986560142249538332209951194457310889807908450149645263299237302457068055083186691740288849476072398342888472282567704339066738548247445041846061464190813171149823708343044216693753394839094250676261304313145953902068729377005989704488462070369374146560453577804082380675649710536802063769726002397814801311002082032960497737803484716043550073670336375122249349244288966463132267803687235670260099801521092166890203485136955879058309271737359290204358704976018491479426847014011579894389070469544772655538263916925725663732697091285508550175575012951441542640557505459942821180526151606634809307982733804664936612744103826192045730887349211999013650806877361754410604433626773125052479190502754054976422691238369662453652715663021532457702595149042501118987162462803682791796129974841114839898396606087556252871359644233233194892785081905974536179679751646127299317675728328681478737026693632581395788668170865682328039739786419630233669269125259573672842629704834257760958313890193463386836505127777430399873246912068400570953170035928952650982988218052319770063826449086426044347345168826406017544662023129638274164746825180233917994082919338097161706394685064996295287339138811690230668612254706022082128949306056048056586383850812309909291132696228113459587909403301139133288279489056648725828353412168393774427779615300451321113401973978066072140447582341376293866460671447072030951847003919679759239408785079825393939912254477723420475286382938759008716764481375398652435996624845431304607712284945283110633315440462308112088880170533283490180324047352800021699999260972083240706017022149619632895762963603406027524751218150348327112546513180104573625869096756715769568854505789060520420429008846187283191543278667521926379403486822598578483655221954268293530684046284413903562859099509384408013717256393675415740423593507592673595988986683481966819330035524912544343462896784594004795607965495801262182147371907182800957766589172297508933439941529695252227413818770928892154140107554360681208684660595412669036873813727359487497382085865054629144449769043948440217352406340889517129066461704527465734771991482717586599712428388900761374258006592510764987236458513576871221632040417328716116817640752433278774553895605119553905262265726744645367981630047046186699001901173339997987661512715999538523799678293696696479779264590740304661626286004854971902399478065757936593095279261100786708840682276062547597661182930184 +-2412401212299685888489787162546832949542989100249885503096056396426028995841374975453917618572691710800413609980779725577694839869949050068856514312927180087860640404773842420922989871914170071022959616838971806994586523049234733039956537653544499168992191729262033698819424343628855317840632789631561968508238725063197040856726186296324848243498496621007533270134235935768496238637653028631278146832104993931393886153958144212894521341536411336517378482102670176172208609301317597819511879245495080578793478180693791208379627728505172432770389828698573152288246626427392520342999076978888972410513553512858760045821047447700740044067646259879282619465557844285224068768566881378582058880352507496119271301651663417774135148656818218547851621957097620213245910856354119521583611327749280859175482875507491720992244217967046842529138231486715764699466524162673078662735876366804248943095660237103453086885838648407773741570978458543053204605710960158524103252969651160845872610229704565422223424615548073837274039099446153791357531038811327753332450803425004369444164195037087303847082373854209430334243927059644761818379703826422459317500879200886779949198766238671404653974509273986738503728960720631413265333308354813810278345214129741117331714613359373275316419432173431519169894091019355298239097580909664510537296574282134724554636149630622831106882520657185059724677438916280999076946549329212779834777027974611775227763753596838747918518782963929711754590849385428718315935048397353313803917812028553084238410898799957011612808597168458122038179420757625989609050697440116542149573820056246485050036348477223544971275807683325165866958091063480528708921229329755119369649027658498091028773308855150405090635623399094869989053264857913647466082245983575415097735661160047400714874620294170112784787642979503977210696571545670994265809940302846333688064694450821465340875800640745235692225985059572374452441673301948838019352947276572240428430258557987601352827460342011223505222087046623791632805553513328123887319168598932125174161411707888352907032767491944606235180310707019675418716069839197883968166756842718540199025733567850387719232232963132764500236880794971822939740286119158492487182384951285882797725848166585954684345545472767731802338019910478638797026184982995686540556531344735017884124080915275483861850067026216398548222513731631739454436788112495082060690368172546131352721963952877002948759643655088055749605200207239175552039810002553314102437731597822634328364235711624955673953429437331382566316748968615453074912964809609682650992758156672759135862308698123882309203159007574252581520250365666801246265215686309725181771697578910710230347858074840749241543667833812363514310676895004833048306670208226217742831377186168229292452900602768471086140952744729848176234725190740196405341541265470854450589713142480284658291924623271852268754368753905976373917981690749175697102141030655229082051409869138566481475975997199447663480453128474606090858821387914170225453177488509504348491185488135929722912083124491785520761229438288279748187185141617735052183345489885953120226241894798956863248354520777052642405820530243623934798060064382005238571218017474585197397751589428428831448052864901622103898068926782114114034103256893773543192340877491452368583423756748716245829726620905862249808201061646651576355901161379983051070777387686032593147262588010320065148617476605937168999645080862618841141786176582616844370675248218778702871672232054243019664273899128758349501051637591448767135361241799834181938470509582580954198377775783175209487757766956886124583758543126620200869982090769404209704182619803854912956046585580473557297091052650799547961771081156576754635516822830473628687024721043680157412643923510701170932260574710087599839007366669549822090764123339384180625819831764793472186088541728733235535560002221668906332981068437487136093945109995165599756676913251748022501365911829787538246508970626254355585169211303305481186805023328371884215723120412745909257701603879186117625895533906863180649037344912872435209545549985425241211071229239955657835273302523318419910625356948441402702505764622480199483248537477048132779723853815393193840576577989597490457675179594496117258235526371514353286112517316032530375018322245243168135482150677256695787017533864840252437290584968316757096281186379209885955821034193700637198804202134989993973119803347738438911839396839818314577393067643642073832679045887534251985598034139319761754812598231873033963620209771001856408205216661776546686751278981683739072830347296994083076949927335275689957789799300452924832536998085756940786667499205362148901079938959187696497841987539698245998479268048192828389170164628538099522826123079524430959948 +166040384631188001340196026127397031975382978659888295022593879726401767352299609795671448550092566853785951223952400318024830684650845434897300422399916035327120935461524023523527966481138719731161484385492735342817823262648027358380061320549669266938188250481038637513815086074024071265841529387167010599233006818043503972653265075761199889882122885411793946296418860138079634310971429409334935623082453747547629050864256820459011055703399019314805678762033444333286912020040757669631545068715224988165750142341735813026046034927359399952058226618505986995366864454164674768460346303725821079993770941371377257623090868524112555685135702145073609072305921446794760910371996072827731141749223447184523607904213307109429444547055124220648697561809388046246937322665714479075509264457607954532576444151126828838062769074173628861116771225207866473690130077943969020905079573497197038211362348763017059540552909759419160056054063106790695056733886431338745580156397162771053207237966521175623625479850465913025588662885216781323983146454093486995064102936547186269659157566551457087038039672139616574065757344210440125259761507567527580931548676759847850462181177259373067694760840543794793710890454136800059168665814962990315992344907887762625024725414759118353350673244345184589680376201110970419910797668068400416352821612023684391405319842169563118244886359772276996905590900652191913752743056960021956599567784469281758598856871045155597992633345286680151623258500910628723181852915475324306739182633448039911230620421689332977745095741624829610362721683917546543152392427225095339058530757530684378711802451274613837829653700885520653313996351322628860547739079154885834102403690684878788399663046781292045473105985661971391272554143397304816643863683158859767273206611260289862285970689864501558970623309993103301372118030165707445164701988452710866757374874138646683035825080983876057129767227242457344264957223942416287392067946742042889393324238646940244064185979545033312207383745295685814540911846879633971932369952751823788190872996467185486406268201646530229479965403577403319435354520102741804542734450060760094542871866482232098722653714005591767616173998638891311180951734208417450001625242406834673860642763120795685076275260970594319685264642258357383957101169702609649392765074508772429115776595717509130353147932386847791696077410008641030698386683732812975503644968920914341295246733771725856984972253618066704623316765210904450822313539449148945225415209880080630145645690491276858547168368467716591533796320010575383811329280254571121257941765241806133693589716510074612646869003440120126553695921618107116407269138542086057948046026126644735931540969468183582279288767574899158101874829962943085172138013746976587109492464798775269841498613590834979017086722766615690422657836059352658989063156155992473899860975161288728919492058242092089744687484866956625506706883418769258035241673010318471150214199418575371046380878663875172158799984124802180581396108954629206066629389000296976053806089624910091335094150240935778555515518361862267686243528762954564203712964990712181766798053414752756215514664975323543714156667520326743971743644244235248396417209070790191887700094542357196168425451153552718234591173556904237003479333390891503255678113771498607513250608361971027793507208904345892421993172825197991681037791495332912665184044299013988312057660804870335723411409523495684855895244023877612582217880400228960466127174803085560016425042871327110092750989717104778086179778050129710080968372674497206967121722831829352133587188227851058392342071750524470987333561980972507453505565897815948149548509942700213459939550648077699555021373855684829427093390282048864112472641206466874905531579353527552391515104789833362218188682999678045527747570542747758145806672160569468331470737006046029059768698506502851328200643963674741868702761021761368242658770546483837163831139236693157818666448533545575853915150854052232494670049034712226471282149182701937613146483496784746365503038753481884756716191342175173205645531710403048819089963765443560665664791810879892403038383775919746000983650127346237584306239866949194565058651752525384449479803758075347852168543492227386985972300746953760397866965944335838252481105186967880979467046566324122696803165127031430750497532315876441862017705137086383796774264760008103698291434120953336599579681933449748638590622868514453555482993853070512325235680564466527833767388147916508420920045568221536985234853088731315376289844615237673550744365421240015226854172978703336739461278679156376790839638142315672657108692976717639751917978777004322382535276661038463445751322859245111814097809139126824289046694235649015298419909380203011633903204692808081682830976101146572853016280828557069536116212424275131573536561219459275202501627503659747574841760741429596165414574136172303998554613965886770110654019290801510439582303175020065235514525359035065912730329633484214969800140519957862591220413807483847913555718112554723739741430740467289640697795514954705413420967979319770666361464686310941253401109510693349796427678678567272973930642230517100320517731699960681081835766714737257858799387602135018380957212972596972746910336142444969293126985284299201130819864620322964192554381113377169958860746056222916911160204902707765230699485240751982058442594000642071496779778229094575779133416821462683600676268437731866009213766429442387750228882046231011094409668938864885092144047748744740195163405514513203451492488877395939880496449793419341767806975256254434186960337744079936098346991026171609751839498544351321164547581396530821832832382051417967022739442229455448210047790822962664429078997354380424338478051413054560258887347977528460106941340685911447123048823880046908157623725623823692989658122422107535584964820340827227446443782752650982422886694814909118401878025820376594498717226508290876821472095732619475924206831061218274814205782345957263022632436818910012822686361447835980756140387960868376517669933532508911312688879885693422486517632401634710112067573078441002870223105484650606874344541845295714310437140677359552236027903362860495198262847833580867661707290070086128084339540175138339275563871858599852642133870019427983425629153243841503702289514471377439751375972330139835938470139270898709435973636480383002515975850086737394171852225142942959910380266411237467004482229170128773423549432844618555008270052772113111109883912475487466039481649747632712332739856234299679247502669910083888490737814450253321649887193988167693821579897852182964125450983925259123935124904656825203692507499800830200683825841360965366976240839283811436681090508141599945735584207424862317220319169035247316832174089742123961627945459105894416055510275189905432088469395260589784390112089876217189362237653180314324691934477491670309282329779717323609440881875883481434821811705065181500150737589878162531679748099746624441519088223406784347981983681872592547015718393376408329783741251771525494272352529602951710930092811689075711739695102339465470045350026099764229416850473475887668317222700896780550589211905608898565606944250666444354553902202505157922263263487242188474926568647977042206025606742707591691948079759618210212323249746878381610754076169255650315396072842650293623618183114715347270690104849546553251018241092934899344848696447904399267713960986354562770940082236389891022521508204488387145826026164816446471402241672670168802987910451960260342615038144289889695640817802202659221694227715073596512546439737519929476153119081091051862377893786465128287882271562112460796371117869277917278615119213840377451395094441679576795217941424789096989946759391160560640888383670922777634846284363489850571389603868283384202971355355640072888048482082997214853731238245789432989653329178827386712057966468888842577908369934461255247304407659020899414203113781053980704993074959844011593809970954613495977849792207169003414319818220614036450228956135536102557569560417910886587115192252100590799474134410820278037202511291158783267576498020095724115662074135079602599227961382947278686602361437889114548151866221891172197268130617043201893040485853202921035029682010185784191064526444028598155986760127054046505223779573655939231996448024199076871147848255368379710042263154077912778667077390411415026755025652169675171917419665688003216231473539572903071290149472624493498257974639555831108955312814419813386251211760699329447882279666344134833669751934147655808951642581838935812490765502397597294094903244691463901926002006630306719224889110551474734604738860094071610661422349148302549778477779945773679526693954691972341946857011449343931801973428825256092423827047480088683733709890561910964714909841461337982013468840028361278375171749135345135328708037642706512165172790264513170994937110371423814348635522458144868942664798079667517187883278444155685899805624600165552232140637543876709551105500429060798433607593139995244868952196901741514591856513511704747762429939633703435515597275244305326587260879959645026342167248507837670863510640072635012577336573186629676645431133498583050353697266644610530693724820097157739407660108412802177200847280942340733557251738962447110557425067682571637494788558393386837916471378646180726437228449772675356847554162323019897670867087696280191271121057164022831679859527788 +35049783954859987937875301429085838224740927125060406766209553426651714977293373447054398801881401450433395853791043689848727262151689140583082167 +-3207132420562328391131355453436633760326689252691260551716859440819104767009695835894663020649714798318914859656800303124307478106056353268071122492108772821365942554530458079117597138205195641342769458436970789128958998567630663867901334694906411293055630150227328967624546107105592872871479909975256985221584734453599630304948060816623122292406886329054242149559969305052609448237827263952079038245048504375767901075967834087913139993296898235607307939554305082538610845627190635335153046864364513327601856630021327252043810932449510507319806086454888562749785582466996289365465314327677998478325290547223652442513657478860902532285746420847326184659530182609118525287821444659052644666824979919710140812926149180142648239156959833762496032305594173617940430917770451239670017128001100881832679710813896247113665045017246743184942389850128459973282028587928729148762596536101104714062081397120108681208589673350793254362187589038224378454340001458207131647896719807987944349136379489970753475622474146587115964838189879271259953788672435323422250621686579896410815523119774767014017181312401887072502735554298259514611744360017690212836794957947501309301800094816001990160134992402994196994838127359373393327307454792979055211398114832572114860318600646665061370563499392797423469847000426307504341646354043611267819421444289008952390479030637157842924439468751199043443183748007605153349404062729532228622138744692285485846772946915418483834698694499139075578187074074550137658041065406016142471641866488215360117073164060892561095282900656212472061982422649355780088019559813459185282129285757800539353265996296078747169591353487247613201060159161256808135397579998906377178160024021342815841013004415892639111258123777429571692533734442289480085776381719992652161583323617184825665434494172615812856449806513459868715870915192565087755635281747922201328776338390833953093609476983597484372938210394877176123523895192000466811717160109105784079246505332152703201413110462251990391912198398760487879824881553981267596392154829922736929622082207535063016289230612781823875148914936900570129147833455192939920369103156956963925901877209633778571163963247050048462554679861524884035777562110027972709926485393188638572234814920810748409872444454185956915576475531253623875884756541400899904887218607834298321024434150007059758191345920821859638438381350025562704116368822635082198559862574488087159603847472524140575136774955881044526097757606419700090131917619410537543552926247808283517806942522025084082920239005485008983468106414828250476352727720814482353462006235517336927787616950268884438897857434628610982812690065976951327794299624340252340058467611558301454841016724473918883301015045777609626595016666410340359859274426010189327745627116362149561114321100716223701715826525087315878198910266809551894152085195882002926927190002686457705532569817368385578134348528160281773179031341817340894868532379403921485552206795602477934912623632200112414835900805244090438643685733759017950951374328600417979758855120893304136203823745468119700490246390599995670299883812064607222934128174591293067743579558258358681216250179212640824056372117212141761409856944952187385792509272726148929446529631742080477524111073667179681554438493206280286798675448895686792068481866815061437384947499282477050677289167094971254577171447175678459442468041061061878404968630619605605326866781551388815875524856164740565364264976564982356572397458291665850747134700095614646889308195253501505654527687912103560628033507182587685917517098012025493767084878089767237020938527661786416632971438187961691016370132988317189204910990701990535210342402070537479748940966458643020594413599838208333588934423203852579440951981701552577734867006428954929413626720806719876876601618717561535234943484097067136724017971368172473919824751427989296950177340031442092027452414833875462171222344324728069024770760853104263406695935831028926232123399532866656686129368184201306704978440227684757295307502474427714270536103785042573458835507797281876176121575448761847022496461267092145025128157675438827396231996061195316866495391701612061077238458031150894438571284228502481938503976487399061583761252520753165908339775249564398516228220807399432925844039806081482395341096070400044177466660694604292919789435103011229017631113958685569459613786275277213077151418177579621791037895862206532670849506738581689296326330218245866649455262911855371156207252693600372331247413040255784231866692588807272855661897880011214841760334349782298736388238292971712554307788036800071714718109138522465579049499443754360 diff --git a/testcases/bigint-testcases/BigIntegerTest4.in b/testcases/bigint-testcases/BigIntegerTest4.in new file mode 100644 index 0000000..849d186 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest4.in @@ -0,0 +1,7 @@ +a = 962504924259233906785095455431265516089800391316333403384919303010191892640856804790624438196574925784052271197535768341682820879068853154969553777334746322210644006265788198486965484473398354844227191091264053733192761891504905410622613534817459898249532367281734250386468542429217534137003724903331147810851387420575956162597462768369256961780655208538341875468146499976167581465082753542701817073753506898679890813310219062619648575486919320326315945511197730382619756081092193200904636648213807864221978928858763490873221650346258052108624925564320092538299172236393705843560600136565888033652056087645286651210043988774983649447345627418475954615563667103470460044838690314942411817790760459521636594255380058432877717983249622475178507653743995854501071762368546806342084878666531193448652714733235194337285547923332822423435520561463981941296053882408455789149699683924621281945732211824850704712588063125198192903145165933524589283180082453446958128169029682497156215359958362783894766615665727724540134801997952678030420584502346505886731499200136215179699854520546606014142288517875764322063098204172725666095784970271317874831552937176227620090019417389119127773141433728657829411417759912689887497357344348938686882855353629358307927179391532649467231671862621805071997660293725141320839431086322895682118057940491429813233469125984760617328695885975113026847185587557833061316397882067381247363070919680729888247758258323990295566256714649785067947835811543293257038009968580264630296254011206970526858151708889911663610189079597207277686673827718176246745115158454419036241652183466411840358950034100169913966541756807215807215087185983496299283025599064308927480548932851711842346621494201571171164316132692552460936599395162681906679571337040644051995809676111801953969768125247512526705638205485504586900797751319803507593408514916975227153372089638867511058699164885490106900360839860573790012198900952289986355818767634954845146330706987020707278350606702640696963441282030967514207944330009958585501216811400141588298591283395848071505012771760957826675065320119943357650400791602769856173196750262232995279738225518194292550071483526380327803926012625245479671978037572537269749032145679994412869343062694296602656100615578170520743409872314967093371766436446391937343150235164791908146518634920002658194240672800939707034192327366495213805617493702630049424516902271120868699869099169552876782284775591027510977210107034559405271116982037414895187818625069679124104967228863820546895677291811693809776782030532759385438288324411460281845758565187721902404231681485710073384125683272978985557782090607047161022203998019983363846389473940328497227634595407863126187275818153540086354840431304616541950185997796303433086828613578355506320575964660169817725620216324561991063400725608090264587069622030599111812108186561431848517314547552579513906956348160193917967219277216748983927520104006399925219539098584061109136821822330263807338710936286957750841807463637383730923142119068455208428276562453375418267420232180391432623017617354187097481144420210888071016932454875841157329937223992926201433041691888401150070745007462126364517922858956761132194514818513267038512101991836621412739782400670503237062170946597213546842263184901951990596505802944615720623486368087278124803156272093213490220238871841559682392696314480140092784067641255207715617926629278402619614882184779857561393918710558498293296932883355382133853894657357191492793208948455659950750471513244928793231152757834597463319633494219276496275254831669394738079613455553952600138563098908876920555658536874003837050839670805804070452446261373568322837132710328833054198753911662706421704111670172981169909060815559044937931556968860705446074217014698182326379712799602835599684500054556364587063871024999605503534018423471601857654151868240500499576186360061672416299783568785258877170797923257612709054232398148474626181037490747867589035385399815875825568046265779953292249515605282841745667094895567260358631336824355648802823862766285090566058663888406226101929142894201451904340492628395897404824651600742373692689436981380641542125518539855305198035767911569861458920391395962240876770314902290549657242363208352158848122508884000735525012160641176092848801130844025977924622057301549143207943289343189791612784529136126742884829385339460673240229671558016867035551097950995928042477798749387047736810995095197680009694029404429009823004635478069338098416519480827270618533005144298350675590608750688978327994313869325228711959293170577715 +b = 33749517237705272839195499976001605707688633507038030385202259428045523025585135983451824155642899427583338949056201673399779515988870670251396174130969957170188698444096699953077754427538946458882755755635743422647362297399704072999591359822079126129220260169008323070089433022934644131663526724599629925195188258161247917707596016871617030946632992968671078852876080507076962682370295771910039688407093574079915754534100590344889818460223775217119528669268826396167599031968891487158477426907933894401806833494215597887068397229752901204550570714830295729044722848815453571957579378167737894183798633215099129752306919655465235151215804444277457915721922529269237250270602828638113130774055145790624792127673055804190921973415866333098789529745948677717980823399309086575944490317007374810956691076433701550117532764934396005943768767681422289526384504976203846761571138854128072591773825100512011280500354473772677802341594509305233698232675840578695055673125983352655656846950660608218822710347468356838099614376450086741435944304237715617320547025667870084473400071820804587669100355712689724259843650414244891379590963628422578426234995386167347684638681795437201961894648166720423429033247319241208720723416044209190218064980792501501484468355332629240949009707472027020335887360401017287895319884909859345436997717218184050655456757166815558591773923448616840225099429813229470005380524706501089316391842015331582504879766362431074368361485260398080461848597198160981936976935471145115522333717320465237523409355811430495098710153206119240503226408819873768565154538817537441304586933861131833962748387532240191503822051334998642494427300754950237358778173117053214814160198086569317824637288123239670752466116494401486359592340080872764224246331103269138723415925529813621726067284885502771125398603828613020478953695702064778273967936363588482346609743822376708143338121355901966069574418735093616131821581469298795186391975646536964803024525259383765148176714928648564939624172336140933602686496910572566371844835652056956025504696219518755591552505979735130225535191519442528508630469855029695053705468821791410861279941009989175738951944680213903308845536644012842042737233124955927537215498880932533965113334702811225017635527936564035337594654464836382790093301780081917843610740393935495519664932667174104200487341170435179745639544915680323024628014510374847880617754024580338021711455119539915617389338254543808018449722937762144590669003781729812639111608739878247023183605011825217691464016731613111700605182230063241714260849451425240065518673724404412844991503710516749100954481003338189386093604613014046163324817233712612847772585965854292901986673302327256514322429589572069039111415781195522958004536274497363030013222181784803250988444119285262067309698219333804092006570577976514499987940795993708153813374951394101351620404918898826624269827014106587857118820502827469830193486585699674057672266107470411170719885136005812469053164177684872353893590080971070925707114931618644289060839189782010418883384348590695623822976668974111948386402528283865277753105475110148014253868227185492130869918201197210897228208283002109362575480920315952464479142684907925645200516283318981850280406612012678844420886998144857803677816334099018384039181775739509711030058881211762321669835895895318723871850602658325401550802381897052661693900210611044690279338692675800953131202492078564205316569776758325256684538430954121577281802531383503420378282593174325362667513399033629808091705586306596476739978162366647287843192005780888914717319486834115193940590254677379824895992226968857859580938076397149438617028488091822422392129396178852503595872588266086718776282472362004881189947141831995966240111901863407017152392292449734953253518014783947110468551215126290791184248646014959602220526458645329190327891950856262986111815933856895501612401978984787974173698718935877508171866692900067209131045989589002298137706285486531316038371671099900409326708831445232313991368906376448561898839072841744804682960719496568594315823255531841390882064158151672147652319669942830647951708017558318770009173759485199289019869219684705735622408003689912675996461007909730078584524685865059513440050609463996137934259382941210692171277508174832399426225065108490708978589576618742864638050886876122946953129641814281770219726839881355020636255828718742146281325082714482320500398654897416480104424267695937983643770292671587528912567349166547258856914633965175151394465867183984285157867379434229924772311613224471158005647203421557376389597019 +print(a + b) +print(a - b) +print(a * b) +print(a // b) +print(a % b) diff --git a/testcases/bigint-testcases/BigIntegerTest4.out b/testcases/bigint-testcases/BigIntegerTest4.out new file mode 100644 index 0000000..a6c31cc --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest4.out @@ -0,0 +1,5 @@ +33749517237706235344119759209908390803144064772554120185593575761448907944888146175344465012447690052021535523981985725670977051757212353072275242984124926723966033190418910597084020215737433424367229153990587649838453561453437265761482864727489748742755077628906572602456714757185030600205955942133766928920091589309058769095016592827779628409401362225632859508084618848952430828870271939491504771160636275896989508040999270235703128679286394865695015588589152712113110229699274106914558519101134799038455047302079819865997255993243774426200916972882404353970287168907991871129815771873581454783935199103132781808394564942116445195204579427926905261349341005223852813937706299098157969464370088202442582888132577440785177353474299210816772779368423856225634567395163587647706858863813716895835357607627150202832266000128733291491692100503845725046945968958145142815453547309917222291457749721793957012712179324477390390404719707498136843398609365167978235755579430310783825876633157764434182668710252251604715280104174626876237942256915746037905049372173756815972600208035984287523620902318703866548361526178566954477795136354088674211205266704042179237575858023057291981312037285848196570466975977070620138483328734096687575409329731188384339821984690937168128401240121494252007749982206089285555613610051180184868084040113866168713397248596628792060899908209234168920985404926256317190968082539562405714273909396578945575799447092319322126619809250693646718563246983228929772788478764402153532302297585095533777420562781957353250419043117782850692306006027151455238982256993784186419745388280168075614931853944080550453856151504912609036184107970757452445964156613352497839759262395496798373570139835082017373960318065572650675725032633333700823641493785175818294752966173865617535743396687456740893523851341139726117159181206651679071719256167096075755124660797603861515427760223413024768739304225200516492661442043088807385292927936523320621792160214228911478883701949355843290230874976837897043968527878086774316174845610642457242316096361107054182835901827806635238306952477269203573950589798387345454497071591647584058030203242984455477177462874506453380329063024340645968749858370435599515253071418202282997259014697224094360698222233166691438210232635357126199965616747175289610047186785872838669900097459082250719122261173093373986312345855387357216955381005588653498111456654629762538613726240408615486488507807420590303225313965273121800776038341135083756093646154773434841808674690949322658692880552160007377896993923873018496291382210810678353843085184686258603556691432419153332635966713411573511776877591999603945415424280873635051770605949218139291460613630824484148917837452698256314929569321281877798435840891039313216011018485217890079602022474791582643274358389151529712222895139967577900713548886258295223435405550505913459806966350747343938817379593620494813466980696745437049470703334683601577776272507395630709818469197114949290875494441492211064829877038721912733170752315349567431179907644990438695445837724008963044055157060406734966003756715381346422173316363181164946708744068342822068093911127398643938920096684152180107582943046680470387338099446040120160019029550357493952272243233425418626821557501381919974624413547645860647224083727730106216833003496932385808037923174020121880143943816148545640422643941579445358008380350703828757920593900391418879760480894698179087501349634319719175395096929247418510165157913517357315035639784667118571615969058984380279604950515099827629497812759829966921337411282277164169548988881572194807396144207277518387994901103889413518117812080234200278287834292162274868653502964501689636306201421320285472687945178783708992860120123001905027055670946801338574121252997895809170268216197110326823268154050725975291238805010602023473245526064148863208751363552713917137980056434356471687972463651401087757742483977813048306095124305609121441529194464215183335628454153075566701438187546925468455592488784737481829596651748122115656794406333200376141507316368299392457082108346097900054770470384253601290546521121847171140580103914963143421609916133177888726001249861226831254162263308887948443908030869368650469980486926741829828342341159121238501142611541789333201055278243699844560067401157957291839822615554543364921939600030084066236296319433427066299355853582766184405975716501958971817839341949750033418451394582939894278853811315432748978738967972681281558316996358989551894334983972063591670875293137802517290302165730109820533523000591552465471874972432133516669560174734 +-33749517237704310334271240742094820612233202241521940584810943094642138106282125791559183298838108803145142374130417621128581980220528987430517105277814987616411363697774489309071488639340459493398282357280899195456271033345970880237699854916668503515685442709110073537722151288684257663121097507065492921470284927013437066320175440915454433483864623711709298197667542165201494535870319604328574605653550872262842001027201910454076508241161155568544041749948500080222087834238508867402396334714732989765158619686351375908139538466262027982900224456778187104119158528722915272785342984461894333583662067327065477696219274368814025107227029460628010570094504053314621686603499358178068292083740203378807001367213534167596666593357433455380806280123473499210327079403454585504182121770201032726078024545240252897402799529740058720395845434858998854005823040994262550707688730398338922892089900479230065548288529623067965214278469311112330553066742315989411875590672536394527487817268163452003462751984684462071483948648725546606633946351559685196736044679161983352974199935605624887814579809106675581971325774649922828281386790902756482641264724068292516131701505567817111942477259047592650287599518661411797302963503354321692860720631853814618629114725974321313769618174822559788664024738595945290235026159768538506005911394322501932597516265737002325122647938687999511529213454700202622819792966873439772918509774634084219433960085632542826610103161270102514205133947413093034101165392177888077512365137055834941269398148840903636947001263294455630314146811612596081891326820641290696189428479442095592310564921120399832553787951165084675952670493539143022271592189620753931788561133777641837275704436411397324130971914923230322043459647528411827624851168421362459152078884885761625916391173083548801357273356316086314840748210197477877476216616560080888938094826847149554771248482488390907370409533244986715770981720895508782987491023356550608984256890304538618817469727907941286589017469695443970161404465943058358427514825693471454808693296077930457000269110131663625212763430561615853443310349911672044652913866051935237664529678776993896000726426485921353237362010263685038116724607879476255559177926343662784932967654708398355674572833639961379236979076294315639380220986812988546077174294001998152369429767875265957681852421167776985504966743975973288832300648015161042263124051394530913504809183998671215748290168701667025733674131910251167380561969222324541522129571324983059204558535332701112724235152911066216023313370536253464932230316692039801777194262264122567086426315988614344869272995293264805260410331634028488381234210186551590643774565982490446512512732973830028879727021726445881763293262241109168117573231657955412844015425878351716422374865763778941491345038049516078471790246015985451099262332705729121084191344352282289243433843487050309309722274434592680900770660308909502610916269836715746537568259707545191631621301074896675647230833913877533642957303123220229118243477547887721146941770734573582142320930973172428203590796277541488930769048341186384133332894587039131081798992386028162193645925274995777855536319881852038617568018793951434541620185923775731130382003016280469748288569990599939062020216494907795632731219120552176120854279823748913205227114265491138835301748617770515567599757389168105162678960822214659965379420070518260622638083484960183026501924089458949323131789919196931337973979932660824644398447149249649525720925401681532153719057739082879336578460657513365323982143564903327654348972729284613659885650092096035580485036302077241261797083350048302201044064072560098598946222684021369976130755827856015370885543755211887964864619765940300769519774160662086905424552856925475460183531587003660736238819832457567397668948379526606291129692281427895731195526853141795171904420348998608834243575433357319315252340306568488190604913460058706710248609080191012976732897514962821260646958417897495930638555795274332363060928878152982798386086064630781467003271812483113467858605070693744731549538164965782726993657932049743004758118218038490155323312120153494118408431385792509852038488578142580217082552698491876908084891146450809687188562444988289198537760059806753774725907224093088183287276772649820238785048972259689578134563598694120807336501743668179657609939850201497241083600096996525635296795155478512474723308215678931222549402726854938681355037219959126988548572612661893499508138339343542623378845295866758631913638596565451280013569028758639316021622634896476844136321974709598083219019304 +32484076532663222774130389886765353986846528808442686726810208910232647280089155625858363172035593419480848516714228101523457522866878722830006713435182441302113877594330067105440273069220649779844493851255089390341219911296746978553041193341299001448520214548943251271181486700008806100954949621897615451323691828273072649222151561175353392413524352003468529389394418421628324965573654286647065087883770779106628627302968426493967585163970469412711187207493127774624996790288444984936823574891747284465667173999668489551504289710224397575800339979340314763455737981170153727056813745087147290199330188394880663115990055677552162244294994308603611133790910936775515846927417712241085169495900391229705679376983872045383560066357252630437716046326384235882281735345333202218737105964142754757272924120210697407883907362891849462558679288258485137440380809761900569877405539981150425088023531809433085448641133248083435100672621836837119981423925822033276492711201539441262525287092462185420748776083585811233179980254444729066271011155676661697027488485359033972526589527655572907368040314124739420179289037888817402758266632139935022741092867227944111261899403693929272670249483524224223938712023343860152768103607510804710721147307135448790087524539931769557545615462835658452344464400836468494364851697717317580490451487173940329992322909387695387524516695949362751538841821972207988030088856702584054595139258021363733173907007978648907317108162899166220017689671051949830163855459610989960633172137974118112113455338532509171877332042213165738683891117160719597056729384039506350499552983430896907749282598097521025054359434040345516651098974322106296659590404556257104417995609624852135898973155271817882552159977391574766573721305927031315727707588081150620031824138331514567489344960669089042633906483143511383028857811937535417153354050028642793613715762417410320172837869619273001630577530912898824523587277526970867713109092926778515984932126157921575967503819089330139328394956097855492526347289876860681091577466848127608623574535422931148656054173699023009296209568082516573796114059474112937520214574346213260449031744281149020336485664961765759678902888254303334965937135538791948221039563416868398388763199592894067097799977898113420516634288743297421209712480800964464408796988051578342593422928563690130506718332000801455268330896943692394481628271072228058051158030106508681781986601569534044634566921415913223025721663980183206443162783282269173318800065873560847338760526451039967324658702334977943406749594564324026230644544591087140734795517819228066894766933103673590658268817527451571572735661929327835093968754980155548774636944170935590612751784368277283067885782607478043596243565338298521878365741021229468149821627845788619274072145033629961181826202309613066808522405848508140703206908477580585486787907717966754065855523111559240714977656147103945169958908266257355226522072511709721562012710024082432913125734928213419013417863376883442063434889994674257692583948711981924144544230826536464860519420496229189214216650347294929359046445361053610855801442948527155179172231456635564143144195295064094744698324954860290255524008539499028043678670549644932940469891460511758025460956580616454648102382578665376758616194275970219643573741776572033209006217783429315032556198927345588880158503785962402637485223006275337330107564445949252616794305052521674298834372494524774431454293757182950910169020904351841823517468273502093897813753161250242616872842907224346573022923138275319925465227399246805329477575191033127620119508320582097134862303483743558088705832961519948884101694804700353853732943315260996061069824794643795768257501864989982759222048668347594500025920295817244587974976904602405775589037779967584364919427018268895341868665386706394469051973825399230128760686038961904964104683660038117547250890956448281169262482186270989161727320686691389700655039018604675849761946389478100098867156411524805649638584380641090406687789607916060521208268760113262436016071741810047121177022972930681498201513743274925116744204109545478291723397251296569792462673061189210781799605647027475619724140272735464628448655772620196768029523852337378152524229963648080608307468963405730751657488534076229446792886424309205264871675312394116575696705251950756516513969533224400337790042150963150127632937870839507078598862248273974088503361078207627188693639298142963851391353062202801107450701139945684985315701632677745387150477319376283583833305573679087988990361415296528973703550793610157953624375794779868910322282848615570380540162610713403748650655279649311396374289678591475728410369245097783381435845308912504955299791766222748408922841218622751745238415650230826087943963155673693584512472627201553249106306373942630543058237028463163340261643984540113248239609379482039395443087128046696063539969428484684813917305502632790366446355638429146499422022503134054662398510233492253938266562886475442545038369110716253077239360268055762675927010059723646087710315512573895063401978674692762561070301280060330260042587916297488868738307874190349782630576591831854747378305977126424721264799953499023480207699512038753686046021734961816224626035687840361259614528422378282867111168035319815571517528024460534772440032243050576841562654198148385705973303195229499656061661292671749052906541998783574007167374339626650141187924044978184886076505566151873959749880209072171018564118962747595246934484987949429406938846315353004243531119833055305798386214694659848527213562638142373209505306947393507619523620798161252463099123019583679693413545100987516248342185525829334954105726484389374552204481641556901080633397968487134380716135006123136484614319311824531141856673168274739912364083230178119780682907632391872719192416994067599486184777909083850307163166582002550233812366341480853044663179949942070106924933094223466988933734179133305706030948563506552106719848834504607264329766590003287156173055535595005555342893906909764262974970707918914703211409417154776238255670129591897884824782589955434308000368188747484320738664451393948251016961711117217847633055304494792719228090349929091246285176509659509853788021726285138917154791640559933684281714294350194508434767038660561068783848854904539536246277549759422997081937097715343766396277528053828521617643494403013733881069149584190286968641297230271546220020972601921177341019084571677587380186604268510141415295517654603485481166552349975219982276131075147969448536431626510878550051680548477063684572412259471089139871434864061443774733310716388025544305058574010676132274196341710586421064112751573041390532293943000202253586701374699370233129261528272479526563583394188791478877499179107242516381055558516864191509053541954740808627994922866765494440179231300829892358678439952239670520153330311036478049898693718408868102224480296168013159874015444113890191384441794472937600292893640801040354606092764910540461089635095728178405379541124762812715795555822535105688490361678751951892212906114515030790769828777272750319436714446149896713465094768182870080912850271151384542079803762518067217204584691356777536558961482283183644416808643985456436052911485168167741843992062346647069220256232793205926620825121235207990441400770627679090736224178425160024594465217829925662015307464040195881693730932491135134163073111073773297147048562406720348459562985051413808233612483694415309724799390393963457024446845020186470615086167755036362513693171838217757480218847860259788710760634230538884826000579267063195065110202576774396552645407196917984260742761599916175681453202516538398333825807277671820085650795203102509275487927788344367167749161105036224949494450364809225590682722632744064401652102546940835814320384301165892912162564582485096511498652007846369538868498389072828947264315796116807602419130679235148885863620387089756640852816408286588471335023073291667758224584437759109570120066766156009020509100213326152815708177144471350137814230753362185543934850896158019817366199514287128802357386152113071582040249944015502608288638208594120659748611596101753106459557808937164804500366947348341431034284836732934276690855751585172645000040669148019653996516150609161818254894917689284639158617773196315120759870619742333270471656629928316479862379849708850255877075029286453870814025719138968006005732537457176135619399266726235123389204442711337652516039102631201650694224111601702311588968585225421346924895202190445673433723314552173504965321858534379286519094265464643853855259813121941680340206262197714215445725854826320160335639528363705619653561551470043454116915446563532491435771843433916044552230778285055413787179789451258704617562805584483900252470482104278105037309935805025559625494483436889209678814759156481444950164412327459730755006955878860721024511163292231485867661635533786255867070586592151428411800918360060835320905476559240735847156031230960495075977140625629607587274703962288844046985642362135071887519225849413116934350613001814788408748846638525386574422655293639192149450058439154697754630202693359690040455690338568110167620079357157208079976271831585 +0 +962504924259233906785095455431265516089800391316333403384919303010191892640856804790624438196574925784052271197535768341682820879068853154969553777334746322210644006265788198486965484473398354844227191091264053733192761891504905410622613534817459898249532367281734250386468542429217534137003724903331147810851387420575956162597462768369256961780655208538341875468146499976167581465082753542701817073753506898679890813310219062619648575486919320326315945511197730382619756081092193200904636648213807864221978928858763490873221650346258052108624925564320092538299172236393705843560600136565888033652056087645286651210043988774983649447345627418475954615563667103470460044838690314942411817790760459521636594255380058432877717983249622475178507653743995854501071762368546806342084878666531193448652714733235194337285547923332822423435520561463981941296053882408455789149699683924621281945732211824850704712588063125198192903145165933524589283180082453446958128169029682497156215359958362783894766615665727724540134801997952678030420584502346505886731499200136215179699854520546606014142288517875764322063098204172725666095784970271317874831552937176227620090019417389119127773141433728657829411417759912689887497357344348938686882855353629358307927179391532649467231671862621805071997660293725141320839431086322895682118057940491429813233469125984760617328695885975113026847185587557833061316397882067381247363070919680729888247758258323990295566256714649785067947835811543293257038009968580264630296254011206970526858151708889911663610189079597207277686673827718176246745115158454419036241652183466411840358950034100169913966541756807215807215087185983496299283025599064308927480548932851711842346621494201571171164316132692552460936599395162681906679571337040644051995809676111801953969768125247512526705638205485504586900797751319803507593408514916975227153372089638867511058699164885490106900360839860573790012198900952289986355818767634954845146330706987020707278350606702640696963441282030967514207944330009958585501216811400141588298591283395848071505012771760957826675065320119943357650400791602769856173196750262232995279738225518194292550071483526380327803926012625245479671978037572537269749032145679994412869343062694296602656100615578170520743409872314967093371766436446391937343150235164791908146518634920002658194240672800939707034192327366495213805617493702630049424516902271120868699869099169552876782284775591027510977210107034559405271116982037414895187818625069679124104967228863820546895677291811693809776782030532759385438288324411460281845758565187721902404231681485710073384125683272978985557782090607047161022203998019983363846389473940328497227634595407863126187275818153540086354840431304616541950185997796303433086828613578355506320575964660169817725620216324561991063400725608090264587069622030599111812108186561431848517314547552579513906956348160193917967219277216748983927520104006399925219539098584061109136821822330263807338710936286957750841807463637383730923142119068455208428276562453375418267420232180391432623017617354187097481144420210888071016932454875841157329937223992926201433041691888401150070745007462126364517922858956761132194514818513267038512101991836621412739782400670503237062170946597213546842263184901951990596505802944615720623486368087278124803156272093213490220238871841559682392696314480140092784067641255207715617926629278402619614882184779857561393918710558498293296932883355382133853894657357191492793208948455659950750471513244928793231152757834597463319633494219276496275254831669394738079613455553952600138563098908876920555658536874003837050839670805804070452446261373568322837132710328833054198753911662706421704111670172981169909060815559044937931556968860705446074217014698182326379712799602835599684500054556364587063871024999605503534018423471601857654151868240500499576186360061672416299783568785258877170797923257612709054232398148474626181037490747867589035385399815875825568046265779953292249515605282841745667094895567260358631336824355648802823862766285090566058663888406226101929142894201451904340492628395897404824651600742373692689436981380641542125518539855305198035767911569861458920391395962240876770314902290549657242363208352158848122508884000735525012160641176092848801130844025977924622057301549143207943289343189791612784529136126742884829385339460673240229671558016867035551097950995928042477798749387047736810995095197680009694029404429009823004635478069338098416519480827270618533005144298350675590608750688978327994313869325228711959293170577715 diff --git a/testcases/bigint-testcases/BigIntegerTest5.in b/testcases/bigint-testcases/BigIntegerTest5.in new file mode 100644 index 0000000..bf2a8cd --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest5.in @@ -0,0 +1,7 @@ +a = 565307724136942222118116843068096520989574390249995944162968726890424830866682147556469316101750010723463435684547071688916367836683781317080680612383678648721927348382379474922758291551629436209532608839643684379247753455279458095770478609030485099832005161181257420343134864132332919532404307190089799915050533827476336595885649943997243664851219807836459429510708405141667134424375737173383065967676732840273783644495577467818189558375309040153269739498820970417648726003654080353017195959901519328920344187711236923756118357990781955039974088106241879409753525446355112429169115704986001203759214558471153732557401374909330352502401676572612673353556166959082624512660558915657862631118840887428381110229779966621752362642105584423773185114732328622928882904841810597967547639991886760459832548175904089388582117889661576920520917677442723082980758499918918203827508035404277333611677397155599924415103049372760049011952669697178586649870305286416310971487396429236339852024728648245750928347153369067061148766699355765227066095801419106467835814613040571826443694091309990793426932978524410228750662458239546327212353250039068025653419753611064824830668621732702622017674856535229688632052085973032854097478392185603051970282241297225771028655190695815581517873693976436838942720055918224664872837701260296075647235023534413021692619922298474291916269580177275130508383011331418372704930200326153220122013614241226948034956722934864470380572231215597120426040505541432502497597101849397303980432372320359341686483596952420791216502008136427739052056079742843359525510862276420703655729084272042926280019347506758375970144941177877077754430672302601783366700405945166630622655793225760679794906960422110571045250138544260231754864663789570831997513969378217357519262990293578480463765319909914783515697222306902862557255768317442159997985550682272056562979162024531043189670343829006324539896411794040389133289151007404301919955956600669793152054505391187439481434567400262694194098593237614094778333757538417131287241304012406181929149685918645735213005761751619156078807967651422406737858174916927840325496655180900088966510939660755798082131105632638057226359390633418608510421178287043120173257598798638633894383158992014141851687556285047162397927082073924566105050754206069175350403396322594471630175241910322943697305052265171491452065316130531922916540713381034883278239544111299046605213075628359257480427415381183597939417592055650107406341299921941642292100038232565604407011826099733266787633195983073027679789520875557902731966423588310266586378494584773954927605245875793096237190744894218138738078598994875305666444021886306153654475999115354154640626549021359904371695097641100598376844852653146110866346885306445513447149408844189010601471897676528391658423707566072708550267529204574665877179376188511244232202695327693573340116882826800659478121104638355626408570190412310500919628381682117305304565647965666404763687382643086670894343121358423176821687081866793671878247342783598885717424602160840104781060090858954693023430640149517756867030774998064639380781903525049216183487447451641066056787185093081092823254413320726791661328216976880909499205123749840012736811330093243438436554022351932810319691259354572482489126351831139981434177400966588804940495538027619851921364011036158014115613368147442346376272373563686427547938939304400918450264235766779330078206880114574879599858921953911014417778480916986594415784604640879757547779418895096947775371279555117133719985678630753460559841213502838391532770813881137580706668038283294681961656511462619317544314772282132928940738413527977556437585768993749823649779337754487142835862768687466222277333278756269139665440103320934975972312463815284330058356888119303615867300946507994023164008027645836606403330381571527359621199872598356009655973209053049365478430089060716983909982971871428029140091111862842459170042476601083098843715128131238633595479354810083408412097266929572690471230284562265427384713996424354647077322530891860008990660868360153106403578272328177133346987783442509877693357355968903995847861029583420826693781113084028370468894908127645518150756068050365192532140865917933403353782758324689730475078708879101863181427625997571682219801828933173678542733205030592396899432572703845312288205064726740479304294795253208165418111814179643317744109811613922862251592625835956818988506899503384639749573523638287339017117830264171661965570097497038454484911641176755383584357645699125993766010496552599592963299278594043844408139790330310843962863152669721398277874216485759823286733946862405896261182305894165251653181728933009193605991732216645771395354007014112531838481097027098600864575358755279531925766031557760336059490260248328439419297763291751797367864633241820628947866 +b = 6870011986309123552318057582291472527466539581844598941534536871624558534195616844298254547663957893321042080305386216571735070545770901901313596845361364721557505164430773094206481677403922788325560273346122027874113425264461018710403002736521342505287739115086223479221226448012622689850904435221120476483291679881722209239575433762060884121706781663845998002839256435783541263848437017603205550488699929320506787392128736094823373887533803017176815602686225293401889451778923045683370162350366389387895940144876863906698045018269580414931836914380254464666526967942403027344574668321096989608271397621605222481805510120439622671463134726480941585261221350238618668587767462572981598625679346858811173612917436988151758639033084883357238489272704284009200737359850849895093253787612351764155484538999297810662217423933360889821471850377292551055758528914201270300337991416436479884838831325553654107608157742971510090408325937934281691528350167780225969654873236408975770987064372046294395854187821335666750567401495878869321666085085461282085711651030722076113793563331124079341362533216328280528934146990755789556275479958345308609899403990013129834911235904410242860018075213785387058492015359037956979351973671417647214106901081476745675288185096453604258266812123958196268390059175501163440741438461125905817464612076857366532941272503848850109817213069260966640288421774209174179133688848299527131548512010918033792180622640506918396665894867549824384693940923415295087381557408617681635952878616623530156479862336129090078741709099545129393663571657487971851244200199377405453281376900793644509772562829881814332374530855802895698356135557332053736125270804738119616183283628118227452872917165906436668609592339948711666663339207380533612879301381226413246725779557758395940483499964795828097791711687214841094603225395346029730863507695540544970768260054315389812309132649065178664576327048617176632223997255981321134353559941202450557061871610215137695664289219485038812538119167786910927030560065504642477396156188048893742150027077375533551430879409021556488777780811875172988275821871964417975308302654440327190431685067009535186758078755840456356097111923741263367469985496295918820808794718158580055274657971153990905239191707698521924263008426084459944956072896637697248156330613789875039156775350553317007055781181225637853137717311403129274514152383283903042280213839429173496741177999908420515169651852854914312431921701505888380169715238922196355501564123243970428782891483199934963287000309572021496752169057082577059369684430058169630165228532883929338005294831672136182597172903213967784526329621728249413291440333945625732359088624004733327834006651355168416061952266656464217770206461212364635285636027517640289048396818997898585474287707895345235905273745431251129877460872488113765448960585600748323627524073721060786471958097373193414027430182556937303656165055157852360019685459132529820042952541153215946509327003420764351753900267212548504297601553056835224068761313886048572955304341237267048476004937112392965381944930395221601390228926273643793511455573356976256830342436005255176960328298250123336296574214730083596646638956870200803262161450352579512918794585764633299839983753132579825840319125889222546476201144141588930479790196243723064652674674684850373625390812074744340515776595959715531137101664992842353097879444338147965577725877213886784653584480433041750985585902970587116350769671496478227384535395882270004011045483774101023549932842349586720759509339950085836364535056516933770909065163796142155789671748746801866804273462280596076552283597403342699695233282178530139328380535755123490277451160298951300402025585594062941704540374434527903591371102886430638906735357072467588076153657841843341628839859595887678686677320645998390080211299791499889518943871969737053491611979157848571134891389418323506037812536440205729833212919170929827834416684367084975796381107875123316846915104952772721766389005404191866975287334452842531034123828836888708373408174313515647242931745607139883684378122806885217981397572967099423066098622612735935263577131015149917477857774153796987720247409949818993738031200869750856436260214459267355852965960877859730040734942352981469066489370636864735440276209766253264929528306131049484474512071440090371609883235623058168599708397941538245732345438374768984685371705330009404166190977173763004065534422160234139757227502904570736374271228132427820467914079999661076235710949922016422627671603200382659003195532508429068274721233432751813379817109189143098769335558971558218238663184362071968795609613193210106819229847613598786935595994698718930673795835751671285200738063380802485040901357992634183025962028801629766172239729432378450385626023 +print(a + b) +print(a - b) +print(a * b) +print(a // b) +print(a % b) diff --git a/testcases/bigint-testcases/BigIntegerTest5.out b/testcases/bigint-testcases/BigIntegerTest5.out new file mode 100644 index 0000000..032be0b --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest5.out @@ -0,0 +1,5 @@ +565307724136942222118116843068096520989574390250002814174955036013977148924264439028996782641331855322404970221418696247450563453528079571628344570276999690802232734598951209993304062453530749806377970204365241884412184228373664577447882531818810660105351283209131533768399325151043322535140828532595087654165620050955557822333662566687094569286440928312942721190590127350906709858137798057504772749340578838276622900931361009082037995392912245703758439428141477205040854739748903726904729762918696144523030413004638813207897281036465325202324454495629775349898402310261810474187385285400933040673594812935820259525343777936674927170722773562220944751177772181564430022780998538329325765845321829013642331580018585290340130104678566022398864461591139796541800341829962356606580724875243998949105252459913290125941968739556670174308530029206878567519757797729580421251441396294098805462054689706655682944017250643060387003369106177063425481195858940523919129230367939326748177962662929937279278514933595036716022003108331536214130467847713502322023635948707322393845189970179312459512018439806495940401693180315660120775684374118409388186636081891593758977659377522258897497633201843839588036042099102867765333382802428463070045496026684284263044014228652794933491545111623650945843801532663899953057934154864554342459358981730681411751795423461915033354730706083092595120459868697951313977434049176263037335082875207867236456730932109043604069420530742728668938051423575224683120237608767793969875299922144744035627407012247508172773910625818063691930672703272999839387846991366499445364828629401436589851676835478609620170344318583330359131331465947111555929530287759499005153511596121459035930464292475846696316054876663876415038492782017023704914679875814885967111602939005245143802972700443527662817078448720149588336813526713382643497950346510369848274666376865625646415065689858737188047591952339011157393343466397216611052605021779334369479103122567819663478690548721397047754039795688171156649943972676112795576460789051218720048317472829572765773071266394096552234996016545164556764935550450479271204905676737388866747322814833744073904003070050613365529013830960609040195488187822229878252013439254994731006306900255381611837183852203867971192645240653979840763021908196974414542111094844518734638601326370267899770201689962419647782679106005571079691891266698041939059420769749152184322524478757633771632810699284225878153257021229146848584341208342456811943952893146878036328713331988113436502872118179428529243912764845986685623449623523273553586688066606270707096662328452852465921620803063848303966611482924213310961275694022488750827379213083138680970248277270773195812029043266832957465468857386473944872998240474861575399416065308406780807933110041163677294451225206361756947086527103160140164887271533747149505948126578823450800989370940566108438706705386679253932643911473096972877725754875531332734748204902970060928742540495446690579802253888243219774228235082740181205250763547950639617691814709344402382613147694178761784744526198090712171372012265113115385719015918014598128417842673242456285713458736874604278827770296983622003764222232057869827503373873176309311026060176840085075510892552736072481141611934085401283712116464439821417930533546414645259621427250166328122508152625088493905809611870506999050947058414060052938751014048741434226860195482310467179871872956927977479303260101876592143655694803771248000265037682630743133682389482213298545042776033344518255381560900757471605324987603861941465613163467858340216007988369131046496713028396390226609478568424288718612487160329844360711048049589826375933376741097186838069144947217605550657869033879759417116600402272235377997898057878226034598731322647207207238403832938632929899365100113424682556988223414868988461059468486034696333293855051439445689729880560606502853854941608481520752070269711413594061431894924589136656251568336968466808398525739911242828781634014548486852338159685582274299818949197076413466327935083726984277995321202684140527407109216885506755162096958157120625102963108787680225983836468638808091354080183451436567517520863580781727887083200282670389915019714921123601192708143683468506279578629958299441642085264927535185762706792903719277675558012061463388803209568580752564414830980005408832600926302692639930183254270014927627345434672091461959990567374202551333945274272369325121278853647691505208095004027175727499992257731178211712414545747491757855585778126946461680090496213675828674249200610466472079742990712969847158395661098789672999107649237573203103843136005504665596741277452383490316366091004977989215604925426752590625201620612899467434475795746029274660411110426564732663829412360245376960848252882511465381326564921517969607594065620271014573889 +565307724136942222118116843068096520989574390249989074150982417766872512809099856083941849562168166124521901147675447130382172219839483062533016654490357606641621962165807739852212520649728122612687247474922126874083322682185251614093074686242159539558659039153383306917870403113622516529667785847584512175935447603997115369437637321307392760415998687359976137830826682932427558990613676289261359186012886842270944388059793926554341121357705834602781039569500463630256597267559256979129662156884342513317657962417835034304339434945098584877623721716853983469608648582448414384150846124571069366844834304006487205589458971881985777834080579583004401955934561736600819002540119292986399496392359945843119888879541347953164595179532602825147505767873517449315965467853658839328514555108529521970559843891894888651222267039766483666733305325678567598441759202108255986403574674514455861761300104604544165886188848102459711020536233217293747818544751632308702813744424919145931526086794366554222578179373143097406275530290379994240001723755124710613647993277373821259042198212440669127341847517242324517099631736163432533649022125959726663120203425330535890683677865943146346537716511226619789228062072843197942861573981942743033895068455910167279013296152738836229544202276329222732041638579172549376687741247656037808835111065338144631633444421135033550477808454271457665896306153964885431432426351476043402908944353274586659613182513760685336691723931688465571914029587507640321874956594931000638085564822495974647745560181657333409659093390454791786173439456212686879663174733186341961946629539142649262708361859534907131769945563772423796377529878658092010803870524130834256091799990330062323659349628368374445774445400424644048471236545562117959080348062941548747926923041581911817124557939376301904214315995893656136777698009921501676498020754854174264851291947183436439964274997799275461032200871249069620873234835617591992787306891422005216825005888214555215484178586079128340634157390787057032906723542400721466998021818973593643809981899007718704652940257109141759922619918757680256710780799383376409446087633624411311185699064487767522260259141214662748923704950306228176825354168751856362094501758342282536782459417728646671866191260366226353603208923493869291447079600215163936158695697800670208621749157450377987624408414567923335121451526255492766141190160064027827497058318473445908887901672499084743328044131478141317725578162882153366228341391501426472640247183318253172485310320211353097072394273786717526115666276905129119840483223653346979586068922563277202758548163298733726552760686724587973509545715065537300371612349750123556481572785147569628311004820771946612931361152015368239288220847919818276859695530138029451494882752379971240395010685311893106022396189925783660153448531305989191589471480843275338958457264076563695879244394713035210517535503890031998884496469351524028961531008488703277874383091028362748598632224790726651208883988828603133869145928650847162551243922019247131817157389612335807179507034023730624262116754100944801562689537731016163375844791132083834238557052230039675827860911449287581367681056344469961318892211721703949170906873626503716162596600009646791797597152151129548158240906775059563694540587197840141450424268386762964621369648805073375720219869447227534325417124424377693701597688713312802157126864560060402673668276051248192976541887272221781720414583805945436691901267030201940831304171599128771961876448307980597005699783076889749184589796360749449514357439401814841599928464294416821197328088197458317426599994528848408479150976139977139268989666726110752164123488397673271366181934411787447602580590157326893896797523632778862214279804369634573946726869752342625517982453591400024496198060077355116428650955178248530249672539728185730781340276710677322978652563054659285267130297560827464966111002134374537528111954014271324278653058277577061031178687925508800382560183880255573995412899844596894090122409438948580469609043651632880688317126699993033703326415517622072279749435439468759938813469926862634761611748829020311469738222698202845296208145984605304370272295391710254573625052900447714674366712120945683106372808505695992443877839128245426921213166730215829253840951073443637807790852049123330410061935839109872011995298473475549775988664203723690906040374089271707860874188555754262543194684297711086643068524734399954377868193628883172826140656501167596431147937262898697257408736606019009313129513271305525851930496891523357252349356577621216736536589947651840767330644240653123556640783733946443469624757719307126925623334335947012989997366861040397996378539006538952165506393415325596242486398308167927068739607083994331187702650755275295158132267614145413457268961661985625128135200863370243321843 +3883670840773924503178985141735919906674660250769099429247726135768948332513191673230042173219757825431772285049010730809651485396385168844943388199854804721382781117220807696638272229836183546436924044712734089021376139895584347613685258989264388756607393015363833457480560717068338217408206259868118777022854273736669701041601668601953491401095567990729080998720763164952889500821344015225933041523758938554062206823902378944641742373278489247581958040999850729402804289831268170511839119571303552870557089859870563419642615629046594929493732748092432327708305146749995809037639805405296717880456836293580186875621833338574154246934799940948258793187388051897350967006827060648702904394380691811823972175850679481928609385171705479416706524809424793915451985440065486949063031976733696568339779433631613451972689631902826262025064825538946076561748974582807723815258110744760073389979562025549731244313868879507109869172773349826580912350060720695479516089387782344851734388013266100343162969158158839549743016916480186812274825897581364731728683544600491054007385469444560754375771919789861879511312322490100805313618338183432166561720988849180041479618934417208699741861339877160542530125696983380339446293056394129414192442487900230432981527372553631065836141364734308405004050051430803511517096173407488961518489142477694210910915167718265673909934679330154415454335068715941683975316459665860525831665715110005476619769416206005048665770595620489260534491795051505874169337001649862703623092355388657425033419414109075904804342451646974263025426165271451310691094597683710339153999271732490325388814815280526113384345159307073102474647121785131650890715888098494827717189592197685506245983796099566943985009353560341844125200911859591257892796204370463189726498677862492005878345290699541354403359308280988779311097908373031738161286370196694140974016186735164048228172943177836969040983231044677748267335156918804226361267637295004632752858771486566552530951628630103813201167364512865022409998505027119311903807891171456932532410845976481820455388067140332006189153051343752731026222255723190255503607137516211704756247840393687745760547768715889771146675011691473624306678264345215043709393796124107964062356435011575931825219759012042479252033461551731978561109349219759368157741655105509423725193993807723924601634549311538542957509620599944908771679228713296267918228024225812864396642758473107948954122159051793606076802102487846417235466037170883839115011258752075355698800355634640772277955837809430711869945915716700629606593393160981480386766199636265233679235759758624786023610277743854664673688855536050616673954256503910547491705838934718885960238631286691468042157769237571290579076103669115642197190503703486095433759416155338029159118629282329986785528111640944560665888600704231748762693006390996669684544401759016974326430301124321144855985961992514229552937137213926245742974197701657642850021549205748972785470162615803085262139976786992369950446673730039017069226618875904870109802003918004462244065458039060427845660075918835563391357402279905801560998028338487525917396785827097845473004015426431450284464394576978904465634393877630855452268735161480804534801741421941639137565559567354755815656862295420268978542071715387384343185089126260830478152272281363703651069902028831772556446179592421481047526147354968338263711492369921783226998240169204665909665661655740695632891950111948528928184292856047800384744183548139600400448585680984169267375683506197495049457879293979240123678647807924080721917224277928455997871984657445799259506189077949118179179339606575486128392361047645915909490006180631047198084410172414113378082456127883247257650774660478579603082720836085146298648293522202710299431056674639083320530010399713369069706101945286753192045422856969125042704884702059160689813808045260924945815375995436041601825666816624866073260034160015781928070057141301622874859778966773024709319154320541207315082037807684438742934336655157182223565835347770759064604221650027683384050688415379022734659069176902739849435688628054342051972552032597635080405331571825530203406088563595844860764695110617860520931688307164077021889758229589795649791378567016255906479771497249043115304045086215735500458549531845271423429846986650123251755903816403300816717191524257514497307365266941164370693391723877520909619964390107271540571787591714417800250002529625886444547306775087884810050513975235189583523995663157433051952685888591026215826856466682263771857276375811503793439819243822864032955202143420333057538983949651948642590963768417638630315415842513168995777459903718697701330364796030091898409296276893839001197294913788358459864469822822619178625949695374222715666249972400937915172317381753274305819869032977308198775040184213091689093089315907330075524364811120578401622991574661906026524638500040600210518884283206646322203302102140101827906895264627292633068533477806017951016867897042052858563967578467818248817500029610311760085894497906590966470911725362012142918638683551284420563709261174890157731586044860598951314600640464487434773003905002908259390982240717372724922712243567463229163506757385019104147567084082724814364356692540756848784768208972066010772381311900480468389913442732607533542911494617089505035903041504662633817279071670480643207288448992443215179930335862400156134727524242383403111389910531767617249636879488533353013096968368846098047094799705170821443772927123599338779791835287961000965555856989532871681055055816662506933011859347129609986358647930874747921139326150558265559557389665851218025241597228995495844160128877949510379215858169036986608896559267406904124639251197376819353069117106006827633631187655822428638157745097565832696394078369236161043554207624736469051706230699517221063765851238597611511381744406645539052074850887037595305625264818281725617845861756986330871285180672285763682270007318113898476920406574775865228557910873547345373162259175241183789105905998403841513081612452501298808829556867390753557994639500471341592341502588473989894814782912925797639642809087008189551864596494522154833179031763606357939046054474514692904978450429437723774815156934332690403445183072475512934601633181133084245290470070855569899841080671381073137554388269540917030973921655530275837208911383594277339188617023063177434278606959246181075578698724033401468876539025979844421101720113232045981425201422601467906285835058920684207420906307966669829793277953757090050051330923472591786781206154049656273507774243981155653464824448785019157079336217953228760208183530833325166359600402512162165423620248378539003462897019593148130943730370991941500261278492463252106501806398447474568680396726923995847806504477338249166297659185527631806030248173008459154939880637708106933673703834947284257187075750125278367562137470072151774021849478126265345971134856984090818120288128356672183395323048297967100399743737555656690268024176576901455871207431267903795600806485019044071420798599674148572670706385483871505868361897017231214429968395636164011640729590932176138085284244706043997302581857433127842832372562243424770287552368161869902973421758756238517672566041575804475754701387467578910509558211553282170497975601461971240175696123018782724556894913441264495496375629528757898999020936543874574575843157558476965871735138598318886271819054204580101695158843599972166234334112866081726765405597858991622812470443848676780715752982640859995596343534838432384734373415064435368269688624931510860256885858155145370066159440236767070259796821899913708546360491098438512909393868137084719860014285589461233916674704628940810514178291536804284401880823628141549892851119998933415923443053841519245821181894389699110943570265236657985755294608901604059529310014245925766903260918177681071129219005198316011501485363400524374377902192207800511206353487045891860838322642067540404782897565673610806306448986086043206145942430519290015948612221231283397799986734930864481342715780683254475714843786274918626559234722390150972588127274534432712423990718484441842556237611842900697880350225172669672443152074994794078181998905801250161645181740487975519695477155881184631261006045381071440497529557289576023079292451213943993158525078113729259410197890948773591299517563814124288129415291189249463628861896922694540571984236951703594027543343361232106610247461967203957992843472697820810703243138699769092960403909793075786519801270812122877715630566330616968140079245058481589374767442292478025434287351463460300709006793968414227450982598865315914467548204788670386153874080814567885941129937081871764018823554102181737378528146261063614036352836123408412787331070263494312708585999844492167993823380281098942715953230218419441125888127111663719693524315975036610957816922786313506555211729705658294701966766573939740112365402269613991894578557714641293243701577513364563225666700338717032664091878328903002122947574705836274418394025115244632164972580070407726751979144804630025248268682199949594921353367322185836896790938930757402843642174981744924162282388260589115382834964403757991178357179133086762269401561193865980987748075857622416463930102952679368580190106792156458921195742833672768861281277577291423930057420023667550362627163773478312743260293778269927005050948025800354447051636496961276930107608838387048796958397651820188775824874719448057641178661392189956586708254462529845312411467616199006045843640315165224973497673309419843527834874157298804972024378397969294035283409579248628934380210214318308224239916918 +82286279159849139045910963919639926278103694961886 +5848418180783276093253910845704092503309413393384696515287418506714501836757222671128958301934839238183076803323414181104257905662653285792762707696219076801271152508207569172637929428209748728827705398833735279745913712011241150645707863996440151843864692097070497848916267932426586441235972943479193241016668293215640066046035868908147874714002297304925833034730122588977850048501076815738357326783257782066036057296713357721758501741345882551234148421354936344668391703046295732761180978103026636136908802517079769038865736309580096524339174075242188689079066261821262158775178830469516566798381322898005212909571726292666937588625077320141301440214737283663566298682539290760534118607302981095682218689545820560730545600992006373397371730929652228498905740881018549135239145333241222836759115256694087083561199101774884256536087983977087497154077665734514747026001742484750190235895612900005510818267565424028931352794851809046029153289384360024841929804570217617720251732637856429407495584431286904863357545718912610124004623402203914885937425973632607439742457789807374222102313993150213471316535998384407132822153454055894635413813257276619379541527578695581318142244335184454614986590802783237803944449771468787290158538027402501724745083917362265112016964830869567319550346398559122533775538943385580368362230382283743542246675427418669774620674609352736805322497379063160931947178324722178141312291004535502418942144389727088431839381453067283124120439105648589104969705070003238074304663739490465105483926867032690259541752010454079727154966575975740145507306991235861807822849105828353983028370131511012290787723912346775973021277164523291766944290472891384269017450674451366287037166205619883490065954465968462648204785481967036899747185126171148439610456313568174335190091041590626362482872525851943853340487494941694999357950092513002985987970851370554318036449226994446980656124980409392418782190181725069070635236158069588513884457866309273080070976666526710530012014282849110662766257951248921302542616560416600060281652733859222964610383640468126349193324216321726841495793471092205601321740622857062062383502228517789493307935780401352844029152228941025270702366963314338145318138461426031426435810632663655388490922983926596358515296469529810714961386861133362953664376941026076269368529348708433330790565527129755812273293560442474580187665159078758388142440084147353599110104546243906515865381082862106841384664811379388748421997219278482648828809726391801468848003340075006532752402943309533461036723552901905879868919901326565646467482777485910011772873130706423772190788660106725892419022665289929976289310241887592858659159826423703476980972879736114093294240321794462027450260271594755671081523440302039588544085905769835939991754783460833952399667985528192766956220567570378141568144966511160015534935731777562441730816007652347029822497181915760503856031402805374109312511605300230520601908665807838420000261746398564367160538087141038864306587713468193322472844021694978502117907001326136502642205328954922735540037705912603702233944481759873794271832589350140757167955358894636413965145765658405208810777857174683897939891589396157240573885264003697318869367963611892772764201454619857032855372277398008502125372706158664735872065619301662661823110974189876858628564925493641892596789942090773345165472617432050734364799030548586017503299100701223141629431291063223264332322361044863619299036119242255852580221567878134551929599471944194955888337834674580692007183117409995790372064426408595563033251962297364124397259508797354250707692663137559294362701642960553657390496311854542910313945894305009478181313847815450709828309184705530457202431458478506514750647885687012121762803873773809769794661651453383541322196305136317680633611998952179574752605937763317366827911662274967965024085944365820754031851427603743396259820202506163677705318664964875289118077098178955816945460009137978376355500668084332781483960754314719053942758191137315315542858607528644710610145426428539492787569606161858143863294813107216168132715752592105847642727548382615542755340952986369073002574057852288746620398613690875210763798725321621736448392504640708148984148744907838919610773128608620949971159513488817987508957598068745696779146871553031119999924988362443142070320222546160416601400370098723524706516054603497718387661356222536760525425273627741077429104103441898802285242008257709400881133398800227220737197822135768268461094278468674889574971505767022104449144001682261249382943738093918823758753429522853657302653983258416261916719256698953350999599068814520844715642311794686602430082976890298935638204766300384824949497686731863967196115301444247139079555370908655828273906469439235615363394188488 diff --git a/testcases/bigint-testcases/BigIntegerTest6.in b/testcases/bigint-testcases/BigIntegerTest6.in new file mode 100644 index 0000000..f57bcd4 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest6.in @@ -0,0 +1,6 @@ +a = -221361132552498312615410091278042815265905178210942714679336922175880786069624454985551583394555889083858821149601813996766800034993923073779661402013710170550009601717903799332612700345172416673710157267110763007781698363365944278019761049916498535566633664884610464784235884490346358448577370593926886497311692236960637503246930629127318649519585712562376229656597139774550282390747939296737466498020530551719897156908539809878643255015862187165372404898429489495103738907190875738621126460789177081192070517293253894632910762578043160383654694366370418865737250315378933698838689596994813867769750888983437722255037376409498209379533418327061266576415002558381028864687101173153218998145937693327155804274786711078994809333857708551300281657432190900679840518808084749806240887553500484360653845362514082211924433471309525356776969808326854472906695623190798060938517264266550424021549191174439974382466117313725126426457364311416297929883844825398067502519175434052617873314653373249070766643396069712835667954641636383037856601452619071590508733160302555760034452945568987274931287530362492151707862752883714009961975371558674280360356875818621008039240684633265770469879393135937753101140896048130476541630514552524194857566206673623136972378858200288975919049261256978225369150563580904232612973393938732019954411230808094534293900196356480540118970559331734595240185461263822612374176006017912442477441892346430447064617775895094311320171376732486524802183732259506527562814205849857192707915385701338560270850608594191782224521896751053525280930159621853813097480722746128795607848601018892281119578190541925718190288615826416998152923906809068728720135689537057601452471374281973165525665994187949666125373817803721944609630311297220297551851447654457401026803816643438712147098653829905659051772737379759833768310851014506038638430089741078818111654300797522374858353223326320062559481717688389135770408654475940794756976662284461127140294813672653449900416829291961474395288958461930968464540211681429693320370443039244872344143665297811737195957031754948567300223570651502595321513989456525309865121071988402673981642821308785844251445278566996203706138431910738534973720854415709608845048955740948770233996118051114865929147319687928610473060672266977123523023303334713386958879214551965155020049050778348145898584997478271645178920131685888358907933703994885953811724711047838457991917872725746512845677273411859159769045151155703301403824612302372123120655812843219812406401274235585745761255025013595609198464141016523580415872518773706114010310899298227055870196779183442494712089516925019586867458645745841286895430029596501500430519968577965259044233256263183020818420918079769110639182916689706974168105711326573373699236304781713281677104592388498474351689185905013081491998823312640178369354080796174937940672811645710811469121890248872007631776403159946782699299078610818288502572592277684575879335516692917698490307253889560927752889850710773642279844983853259486031074593005498197269938814938445579811185491804205052070183444881052445856403421613410086880950750524075003737407046225629254688294587711021147710491421759027848939537032149622777839924871745175539260570821243849073914106349106242819849423060404299181269951101805282113538505654071413479143272380482945243645093288201964247913735409494440220712373638879554364307263682661000097387191140485668040750699909611963166937389549951824000847566814621776787684452696245720686503481922918001254269462082384697916081126596978999486822148951545065932702029381256262042273927197758090424861575399045455619831653943802313389403999789998016096055020319363981615169005341480167202758302261552372823116038464514976809839110781472080170400428808123939676638304726967401454613827246679359033619409628541315277260186196214746390073632211286097061632604944009821240057865270019851876959489945791601976745625821832960661358813937083487437912484072464186724453578414570176444622176927822211973793611475849603322888893827517643788216129200676515848510842422759891380825121682969852470781669047563621048230445717767755983147685423987946752894509260992795642838977896801192382147057331660942811941664635847967538452948028619408524335716636377011043060467717913503477023494460168795546593385286303348200828575157077649663676215974981842304226213411871938937441127381944695845089730171368493569982706969814533382803222354573601159722519446625126848316182119096327295323375445985401849057787160404781937337688158409255176051307409354896879562998998751613002606900272623723224202493745282173567924847610241545320699008653111715705217070758058127068399686562154588510292 +b = 83751117225991073857194622331384348639973281194852548779145153142406967900219518607091085779020571221535874651680670021304263974249027529683043040297866573739589404568721435863767320105728545587674423671427627413272562747458882947693411274107935657252393399227877183816675087735491285464494711840612387960580348262115249701865057953017478812202316398156293523858160978575489576360953293494565045936018193663247013683792054217392835690465498791934076663571581465101334600076670883801637048363617035036533704822332837582289756923124530129516517777032748426958111598307381827946214051618180064974816813521231570944213381862629181851523364540650676895605267540884586463490465589801932834416599215827732408809680440038069552052415061948968013655061252559343186387215652781165658097009092893777305382345827877462940486420445668983798538391606013180367296223084723153412252399267521539251681815436041205987835575472929633384433471596789715707592093602415054939417170753707111359206046679663940648096244052370021179932272294264572924257153048772039155495234188274999504375011737427875478075898891041191180680666979783201983719367260783039221485457558870092011784090657551947544140098067056792265755971648134178524330223423468204445419078594507317672026809471350083691665415272621869493260430952447224375173743480555500709266819532478069697427991282070523971798544545291462752660445729704091516002478098437485252367381240446448317213228515660376906993088383888380256448532324485218997210672009160734469480395779326720348468728784870924129575639382826071818019492026145962380407534416654692282443879542657316317970382393375513262917821121069573364838256314006880883548798069980519835996523750019824424230786157818256845472006837906848548561752007962381142849467889019559849672239104944207231409515217536159126549332557547411385081633645074932092421963957111580649142463095272434332741707465882134253384014974803693364538199582845456348263800910036900226910093612735611535932507130293287298992548291281607663479825943833409615780661851748669611118709581100523314544335879803199631188869371379801395019778271409073622034366802053505472541198085015363332490292722019521906976289007692323626035424158107958385463912639383879942978066046032901725499081183507045852150187470724902840193785987612448150303976202204704333658814649013425646681044668222750070138695063196754813050619210540257477434409976259215019887729897797488859881110748551969071825842149581944085626511975831455264473705395534306040634730137286937051173013949309424066137718023520420608113805492419747145912751782669438710204505460035567852067245184890013100136968859977382188955035603694404098099430267072510764571508078509028622952224154647273832579420620225723990397004737334837625346405851863601178452285329101101659189793350746659271397441006650646172086602873932165702531330428324463563407748909174797813349766364283526940657218013435913031127274045953245329692209857976843229918999741278491044370512999256690785205226163657624803990806535378023252322292496027447131448589666205621588358344151799501312746865774314598092184857710640092708104627679226598089616081904729571911150235673852700301247518190624759696292408948917035867120466896023325405086182284988029920182572150107270952525737817662035724689871353913764546741714366706688650386330834265915055807276974617234578024931218644769384030093730070670816122180838919460468555119822917927106440227093914453591962297865907835336838948256938038157122481037251570666271347703132357103307515609092660689126568663528726779149168313500024777193367059350787187385542800560478235919129579710352825320328149447024627267505903638761948449836163275789447687214735787773527305102778198767602902156919699572346736552914920038680706971525064339680174432405180477808931203162528735736015808619859385032247273223348613251135947944194960839109912272461335969478548526824890882804264455512831516737774121622109990069874769599946817778138087447374492287334690538093314738972079610218360384467583092974997981319128061809672980912207693297545544960765091007591142414729644064923304473414970469827683235053837115586916619422487267590843217040526599965407488607788730490120405066556301647416485439166530302543030948428853836980216657358616109914846220991713594395825044310189908507046748255734582738371179503366157134307063138988579654065565167187298199803933112876676324769392121017508232676351628138651752872271074965023305413657832434862647471987748804699423013884010866176800513834017723819071293390030476714042504860069426529635792133282459690924764855274528548201424199902204114623086398406540623377278407560428880542841800079981709682895784544440817276405339306226942221894041344626782146818298126447796969225627790757382415545393486633 +print(a + b) +print(a - b) +print(a * b) +print(a // b) diff --git a/testcases/bigint-testcases/BigIntegerTest6.out b/testcases/bigint-testcases/BigIntegerTest6.out new file mode 100644 index 0000000..98a6682 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest6.out @@ -0,0 +1,4 @@ +83751117225991073857194622331384348639973281194852548779145153142406967900219518607091085779020571221314513519128171708688853882970984714417137862086923859060252482392840649794142865120176962193118534587568806263670748750692082912699488200328274255238683228677867582098771288402878585119322295166902230693469585254333551338499113674997717762285817862589659858973550513791253691870606935045987675342091307165935321446831416714145905061338180142414490951009205235444737460302120601410889109066879568538513174270612940425381217113245886874500655589867376022059682108812278089039023175879558938514027636440039500426920127967996271088945321380267022201238897122018849213175086656103094144819604401959962657920697002315814514676005563739588480236734191292766771384657271752300970995835939674779159444652500721658665699709366674174464680683054712898709864032184043312893444314517715298364128314951680552142473061390717708950962162071432938737783766747942148243793979955646172841941780129239919098905069612395638713814958569138146466892841632474109271650408790207496985199577684810002163422525641970424537284597266947534029077730877745182620032838487279583278623788101791913091194529079781860978225609155982470661577339709458242470047519920226957315150990850342044450980782006851399613867295014694123234277695350078959078752267008283212131221317658933551592940344256315543703399188751478722365438897194204872278973442508426493905982420421126083006796731903348261285889200589889978811749408186548360293474377866884242906576382354423859511799744288514751646642759539621160196675274910127129468238029685464608402584681054815242412309226929287348842941505260481599953389176216167422355273777621224216575629767265537137267281464912188658259945925590964228218942658820290839713982702047342754760035233244370633460555144607881286011263829923130322462110666736814028797694808637871407528925064027169987154730185069144641591800819823011688037412786403998261796820352533917499881631709607918428945769221971219048181762137554697639207126185910953912634456425119973383019730663226353299214359577409905406106061316340440609081822685372360185102098158840143019188824994910282325949944534059125023402464772655512636871474456114074014821906077643358920082677772397662794406871620474521196701761875249077474429449560492595859284703073700243191650562993553356820922819007134586281752378352233416734454131075262872256140673177932642468810830332400406070486828363877936765165494826087472547330769710509580494315923682298828945133300288202796578388864306164360651562962649789118343321300449410546318054391662240223161450793009599144251845111955264368183724814019080113988225580656560958500453672209851453158426173040712152561743062495600638856531751258896047942195316809350363170658483707363842057425933530167725840850479361237540006989169913166957997596820003854950764327102967195893120708757377865809175251471313000354421032303961405774875975611413683038902557107354030467021922480264127249059008802066216874925504912195717089520679730014811451567795931896748507131281104454590871748422896155000672318247201004451154061633511622181029328150801143459149760725658431468800630117802637138178903292870795538830154916369942821019587998039956655733341625594861128959560461103978789813096187657721731135924621869969191167428079565086985192000949458170731797385154964526919463499432928288447957132310468109425440317196174636877674282013152025129666539856552803425687122963200068702573730893439820037154183475130862035091606403397903645925723299576616839527879212334546536712340324497121338664283705462624799306208773836744881794271698723349149960202478315960837706059919068579901233515520489456645362911951906057322578935948958354606310168346946554898823983660387607543449170674832952237977719506669650789705619697551293643049545921465801143178212822327824004518322534382944871006722142231869167791271473175723140235571330541559375232036357858588672538314212834128266207316627017314838661133824793180477633472734562634622431616184044235640623897188908448020968843967130390588646385414214592517670271311828623811647580933855717410048899457715942906638756748420457149145774843724518755317948821072841445508071201698717683183382617119043001675959327719223861715777132018045028609566537064164101498248243871198780717281634709751770979030440497930052095928111936152061690163803739635137566283291038466043920188933075598701964462435777890428770738809893541718894993735265527291903714969251645390440883469830699300634920596716719788870754194595879733221110347516695805987136315478779453425470761041019417964866426464677143230489315967923510680865881544090187077374809410272061320238323531123165738302094611652496023927773493706582421230726211167500722357695853390804976341 +-83751117225991073857194622331384348639973281194852548779145153142406967900219518607091085779020571221757235784233168333919674065527070344948948218508809288418926326744602221933391775091280128982230312755286448562874376744225682982687334347887597059266103569777886785534578887068103985809667128514322545227691111269896948065231002231037239862118814933722927188742771443359725460851299651943142416529945080160558705920752691720639766319592817441453662376133957694757931739851221166192384987660354501534554235374052734739198296733003173384532379964198120831856541087802485566853404927356801191435605990602423641461506635757262092614101407701034331589971637959750323713805844523500771524013594029695502159698663877760324589428824560158347547073388313825919601389774033810030345198182246112775451320039155033267215273131524663793132396100157313462024728413985402993931060484017327780139235315920401859833198089555141557817904781122146492677400420456887961635040361551768049876470313230087962197287418492344403646049586019390999381621464465069969039340059586342502023550445790045748792729272140111957824076736692618869938361003643820895822938076630460600744944393213311981997085667054331723553286334140285886387083107137478166420790637268787678028902628092358122932350048538392339372653566890200325516069791611032042339781372056672927263634664905207496350656744834267381801921702707929460666566059002670098225761319972466402728444036610194670807189444864428499227007864059080459182671935831773108645486413691769197790361075215317988747351534477137391989396224512670764564139793923182255096649729399850024233356083731935784113526415312851797886735007367532161813708419923793617316719269878815432272831805050099376423662548763625038837177578424960534066756276957748279985361776162545659702783797190701684792543520507213536758899437367019541722733261177409132500590117552673461136558350904594281352037844880462745137275579342679224659114815416075538656999834691553723190233304652668145652215874611344167145197514332969180024435137792543426587780994042227663609358008533253100048018161332854196683978240202377538162246048231746825842984237329887707476155590533756717864008043956259623849606075660703279899453369164693745064050054448706883368320389969351297297428754466928608978625696726147421871158391911813549382614555597783659642799095783088679217458382991807227873722886187663780500737744689646173899102281862952508908931889096697867656823320421227123005758197864190363198177700281488117765345777975744928969045739695822269743411129882680189653264961195721150970525054154792559366017348679847974253341480770635774355161982455586580653096052127274819970618203973186521075470806305564898819731407597141985922096345639812591449042750578621733055376002353364031698420863294360145892446056533767477692315520775761285355003292580906333808242657001698162799712530622456474917942154862757878629843123026517405029950586686131614683773006032914783902730645452089960166260761871264322561608386110440324103069417353666525824914570180603326466965282583904111895612233712727254202597576547956877937168710970126123782697633177423868028431020350309383096642039878904770484692399243070616099714022359003916817870990971027062812132407914242718214770283171254981443947496845510975261722020976691604471613459542245949221207574683339829162156383217437084001085335517826039335131899012184209321776252252398603740935602768161572199728429058162367327371792306128547710477827811302345420805142037348957857411833371173107803217127572259598078676520487529574345963790090287709229889612780037290669308460801814747698001514277626433951917307148933846776219050969571463977831092425318063374884972826212635102704148233818599256845959233088976346526550931016093701026335506679508685515912572383236111192755535351851774480323596669224143028745303519013679944071883871599143836879673915949796725227885858510292432805770790091702933988868012183622281160866661579422722147908687432357557354542415052804684763681586963986206300543754333811918402615499722157053376394417751123959530941535629768070236941617858534780323018293358721510752697625331716117295938335778433265976931907425087090458460259512159167968687604532093134253195149677987967018895181748346241209453001455087811647413373860651727485987122131573142894715794187530766990588027701873770684074182049047371979068644210792659972728659470061611072740321846083389754001291814867727854113379191236717285596769875990029416683593894429594382377580848883770328367400527041425866991190199233489129986917742711754888460577783066370750257123586335361828981839541802781495653582591930786633304439991879541593413082588609955519507768643311021687512874151789832135586665325790799930013831664867727283754859157068977699981996925 +-18539242161682434877939681473440307178417771846989492049962233037761089055051837849758865326443032190361371147789532877451713189255445110640205256287926701991574747014258276908453027730077773219438524654459923005698683798029120395271146658598436828635115354029161042476480572510205376071215123141644825239039143442808868666847509466839277105629719461646578591329937216972661582956662948032516397761101238139396509442476064139160224297134735867452254575521105232139477513148380854114964248761378058648397872542222684343767671601701764653388895314914320439992834604626004532931664825909734160236970512520569348646116454589983283006731170031429109700835196252601944633426992673447413936390173735765017008159853985980470698041487666346816180059673253294168253358549670234719334604443799617591638592362655640823701997705116081582691741354720224263219223923493718952844573409480825002515592376598239222326506257684428395770944241248368211278338001334429944397266913346280880334620000522982446323436072863720948864323706576326842214597372105503121112862815297098066785617634713783288907848899434410097276273227519226740056647852324622902282188843925698234672853055090641776565115252613223447233422256966598553178285836147943101804359361632359250397504150939621535960095324775273701028930396046262113692830395285092864511734080965299519387334460670704389521857243880529507209408967512607390770735526820723263218689442858476847147515887150365733416817942642634174075145483614816720913441762379405397393914581740344312999855435963557904026574563436863722549883907747027576350114376088331466418190232825739001707457935895350264332610161105591301587244295017615062211371956189687736464851679416308315477709482943189685289417967240017648629727496927635130717879521303202386094581763206837331843064358254402824484122870212622822785185747106727634827818535290297737276447136297665660550043926266811490750549885207914020680354302830470490485527065092877630782907879618570917819220638327095691827731100950299138225382436240706889840292800959707419795223562454846091700931350828043196298931987830855697600784815198639691510512221213574566852137021269447750063115861383659466317241947481654886728794358432208906094912705334262400463045690662485594849739395390217956286835452810716080196423768763128035743604117997892903330930030277213704818072230983172738585204561795235836361611399399211902394216811222042059893045377843074879106448486414114965365119797491751554223812900064750848446838393701470798020403829798455094464657582938136318375805731273695434718800175881669258825846568503918930686108261330355593848744574460443786621549334921803714510603251279473510749833268256488926430037885212473539045220075713950600217344013246651815753364508218912952045221716745394549203057824880062863075501624623823875368100598832291058161618258711971756204631892091701329517147649240960883037965391696160409052511743951131936065912280676346318210826986892660267317009413743917491711808383601298578709173002116972298221362842681328655685290646142985809652142714803153033334918147880772555962326863202193402544888664633443884836330877321087029655839537102726609903543895119433570216109844629179194019242317508404590213493436224702130095807745005383012700518624967894037856582286051902232381185551871131179665168577807595969311717521119034617431091960949184597586395023599910594459577940019544641080696385490421730085018056097878103159643128042839768438425174073459662315881105161730785433309911609283729739467367290003826580412016768257779324587630830803015198142254141895100499599229805723265336761621042010109306454342615246686324809530648047018490879536020019711726082107178713097945481369194859386035267497115769231177679819173913758592776062658131328541614561970615708888734303545337958391991200039020902677357793462821696993276888396085103492319645912992588029558541187659423548376822750056619539522610091895510100079219927775756538027269619641517843940168676482631737125967344654162373558375782258134852909086728866110918043019036795726029143568868209852476963892402137252039067494154170860677683906266292090356722573498853774323567442300068180593219150060449567953471043507207765267273196847473963804580101060087970924592254502219787707638876932994777553368690285509487119286885180362284081452641797354829124514360409312863563047423690973008338401610579059069993610316529768318103481758054492942810204310329022281458253447764689667141131956030186756595859564686432224521438781948731083260450801547408743949774428023214979392428449949771779657392674998669282602795013073741007356047013576436916427629634643716735520368188616294801609312879006485393800739089470724802526884388125569451009664660147448739843449127902199872212619730302057137400623672790934603401502526614030215524187798203376283747186198807485371086180652733350140751514552283591885158211462322927845715457290538015935354426236439572502570596946705689965156152001554038500367150121359399502684699551867235347371011902403558911352538396615087786787677961812419084311304720420851975877282306994831206376944762148120565945181644501685967080990117638741281243027610859623849157441522796619595604928304476852259118390841131034602984823476726400712832590716539474843386602141977756884785327559815748164776043252382346178818414533306725827925038811695594470811214669989393493089021911933898046811235594103785221094013466761805878849784232168358296567328183170717590849844049787811351399261281700651473324395409222044925429279677177173357414879276659595190341529259190066955964851152473931732022186263137274503571944110640673066104547496173683766822100477603532014654772818322294284745193820689475583995298591828380128904525951624908657634370756609300644173549708672379773225510197118495142932090927257009779742415134194088383174406095634678682568852470192086605718437176555119528671791569086828897700946198918908612786861802190414986725272047990762522013048395455280560823020512925863080138973840675306426638200304229927394370901457517474219736350951518472222848834335460095282113841066458063308623092931706489720407563823243500143078574000886607351249324919367450132432988997565797191811784037072023230759273506161626015316775440058601859981077692557221643349184456225595473880281743479513997157493852007102704969948169132417226732516415298020518225170853755653839184946159710075775422936215482496097950954869217220705075514167625107512674921022825433532158366163564514276499810170258760619296424906352924243907649485935249298869811936965920723007610332791893516274505540211692107183333363279166789878841923662389553716891625636714186138496729964931173981209082132194504605122772476165090836517081639951144172691234366117334570986224361211678727945467397384822393234291042242470987062586934239930430694465489608020520560802151303565540055364519273664577237418459430752652168704405764900508468235317998670523792765834075342295595685154225218188430603856161882070033151024156979595419614396043365938593042688445857597743831577805359899628300354344837339270512466593686587778155699964878803245339023539503695507764611328611296888984310707853556216347302284854400190448224601779795499682083916371285787543449030093698899682050307160180935063359267720926062167273840812740750902835546142157317603067309924776509167645086350619019242273484054259837723758495341020003755226240086525851952510316715707676118561236843147204446564824086480579881632454226651121276303483455421497225757756248961796400140496692029157398351176945975809634840727715284779151380490496945164306930083624365801882209122855137427940727560760129194623962995179614770673331222206672708914455308914536874654706519418965979755702611598316442762373769863724013560492036304424715909570990535056944097432515947413818227348475763280032161671535827439772216445682388370486895532891720406360708258395995338171393990840265980451769261664954978384501944522728769488599723457437953056043115944718809784800674279811986611702667862467523169045618932619202450773216693240120712999670645746278654701130893861265928121894152987974055671995206834513356672715132528378720592609656301052967111008495210897770045617868617552290460286677770879331278117311182109113931144677177842654597623634090648626515108132079277227704901718837611549023527292116873450502491299643405270074845398946111948745337583633240909967516793136895877513249341452536881631027598531367890343126966149167952616456502582305087887122296152483966449030116715918137019050133832467746980242352127151963492372519509983124572988025214111863413612468601355796755298046939370503310164309278295538870925557753596480195848042989776071481938420987179809013966884122434747024764215638433232480830978190094467766134977177443731610439203166203293683667261875019927068603914754158320477307436700262372810400609946498552903120683672573127153288492403363143971513105704477043033041427844276631253629358478462512542255693743088894273803487239222724464055845032903575795848706752064506322090560869205890752930666522209384176366015850300877981207823460316398456754360078080715526541019751583988688530469499176758192035305558636697561676664532373795212257823167812192299778246451651599012724306388380071978822186099137155548475508453760281177945344531461680676490009746712708417644190685743873585807743924348817517184726780912577741671213961911881582086713392958508095317967612729375263077911144435444888525993674055607547555284926836 +-1 diff --git a/testcases/bigint-testcases/BigIntegerTest7.in b/testcases/bigint-testcases/BigIntegerTest7.in new file mode 100644 index 0000000..665c4be --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest7.in @@ -0,0 +1,7 @@ +a = 30737373537204345871630235071054306057778248179570997362429226217922536064505685472982721174379224798532725273569247904268795556450305262671453807584532991615817647875135342965341048676149892123199815855453982502112106692663903792265580218943752186330398279594962786394820255769802353433975350531713220282594558947342154249629128028763136792581817209765446547320431980017841618449316906941991788297425923987148420492069703611799335492164154298993389979802349548623664781926371192595988501170258156734787774813128252898767287661059670795230694301188743254250247646305437576767904044398808192796966305092331789229006091382262139657136217623504515990601115357944865494297421482114696586352891496489656212305667698633257916927820570236638465312864549686146122145147818096390986848774268074225911384246977015780951407954977479646577018182596552849489488445225445874376906094574966444046859164930829002101326546094671653061356254151228412062030812136937364635068842728239104698061634254120006240532085726608184320529750278234855286146448019086393066288785265233612231391162903230953505255092735362785474465404998633532949550803803124723648054729556565248759412950020559354738232079275019596340630573757795360255551128124950051976834271975486557219627732298400841888931197310004377053471718452356802571130104327142178194863131604749645068784161443664889021870546979454004195775448630890117669077197438234357838811399603417328736594567109812599864674007802349643457584717165803607700121731148188146847169348811479856803435839994669422596667852655112691739831355974533458424304969109215149613699243728374225985911947175451891102862683770811334428181543354996796410584315843152305988773446096594675529160954644674930040163340102233428544024587428118717053828750158930234788919049916690084157100625618208618129878156133057687887041323878153910812068971934412285789167909917637787953979197656754193781978093037533568102018698968784160277501370450185399674186356856807130329557259856291808108375225854413684585333880555901071585793398291913607302577937684288053825109206378115524634791599233030899616391305159214187376266327527580916937984588955690623799922120749399775666002701700902193186779087092301930381385254723158059343914935473700304543464015906272912597264592918314511344726218847881970271570481067602884446337616379184676300235571307383125476773312654153195140535602071749577407928658291713874362866131162698941105027001909391100822113509863059785238013592555909872905827951133942653556304841249304922869576443290141115360370704328617808861873424161588594294266836613755245272766135625990278819534421937509544642164162367031966176068363377583179584632424259775101681944947406667043369911331510988124669597469938958117893338193492944582838609215151857445559220780400712716973540316898772299614371510367310946531438204117314054454970303665998379929909540743111422200496559201990326434974989512990429308264520640816175570320150726890657911203103030021704595534272154239161453753141965839038240567489212352148722140939426563893932976067068421265352670181270934923037062475797059597550101579149155280748614746348396194379492488418425595928394620213839325003304975383704806741185534987298366653813468356403770722082486888941877347759744458647694695390322235357658908888347904879741759022887016437018709692732187857766870122927808736107606089947810607474525721419536456324418630247171949932199655138816620792116537118773644882787407752960516595522885499382046775458415312921512891862853797327808898144450470851144231559395830414610501726303580848782932444387784214427514087652845549642592946443210080198708689474562862728130263655938396657181837709736590318782070383336460099923454845103869972079224820020773688624047276569847767294819160489116373967361757297982488407595148470707848506486802542172329604258147998604049007212331976211538440710669242929743938772246516268628466348997505860819051025357107761173688838503894377822359648143348019733747430417064686257273534866456067058413636909047416577528680584557440121557885571655195593830767715893170030020552486273014886425859171470258435662584177298233929973203774182064620066502374546884038875252003153986448985436477301597799182891522184149476732286201868272711930180968943988671320449129866235161321762635416123335184707825154023388767188601212211479725177397534132757891309289388833570078047212522042332298056487561818487432790186588068593702836999608721627524365466637043419709608416417745047798456612530878161781661860226642300430931642818678425029292257119396663648538621334300222081528277242698941401307699162275982341637385534575671334982598255160338876132405887715684611449998336701980793931659091637115598111368721181183599916938094957420469951633738313145088875330229492257264945302517038676324667872 +b = 240230357422502083039460492003128070232749431430305221136761416853609771115855207851598351098881380668192147890203505877127343926899452038786257367128383014723401126439690221679773188700013622786357413522968573448505551698460704349490366359397231049361879270743872230896516799028951465139950681313183953182586124969408623651821679490975876988836428454655320405312737035874307735145988490057179795118751767112795922641891245279085645993314694295749948799962382717600069177902671095852024818476846707751536563904619445650545120938025273888730885336203454917712229820438229023481038410901133062894256078733109752332535372225152852262689251365843931172712364168859051482671967929679752569533532304601883047906066526659728098898341477781434277795546768247899656174599932521056173988674079873601665348488759804362523279981225108946936509650057524628985362997031852167386540764792354675861392958843744239038593885401887911606475413729623895609042618599247219230957986127259327637372817503919375263430799726184254442338708756128528596400242566798892939248398151391725816567204258396095825367813783480302614497767230573315639378818137318988323343204398256504266989986478567282373297470811697329149141520931081785552927415737182421254347542947682197299397637367400132396781051776556977984103770552113092040584454679515205807808246341926013843303520229222413751155106895187950348307218157936548421412594625507071237578159851526238927856436169221207498902820773210591073974753824116434783973915785495701783011455350878052763132685516536679817044678795984304901637919834271566236906859093665593366471236074760527048928279621294982989971632684890564860806519962570053237123603987036491162363109487348492121434264661277036567421836549062076096700918939272186422822989034275792181545317667657461076170497241260098314897225268154668080602034197372441225754261637691074556325387155849625664710824943499505824136780466440443177595503290333142312928128626957936533518405305751822359357930740811752386496688789065776927686942036946307213845804210630189262660598582036517825229177821343896793233993257031977884624257229062511319206337160640813463024536785603743130039545691631152259694194731977861686411934094122523332939516033079567077374013804081865664656930349754426799611549405839569026114472942399889736652827199177564979011714765741143946698673179135187290078509725595342455164099441485748775479688398025264596999665609157412808131456716547342688177385145873659916447596343252282295023352287454035169748264875506933171289188859865614126389468721223029370076033910571209506699839022112192365149523161836128743685121428045722238044608109476923196230707244996542586704282694014895290525881643496713760448700940030057438320948293581304085666178479763423326952057762638529188008593624187006793221026210245563055937459770172322614143137684634177488479030087978977723618442685678510361501559488577057307479739605778690951844519846132110835139552882886612971586645866853769078305128529078043366198795684099874807838625674259192101809277131188362243708847665540552697689889885755705827119319468503748597081408854245158383277471243374913292253691221337898555971177061013739969757040870363469581593863539400400156848233380701322100777265285380122208399175787141295030349192858651443199326197335867332246740093367748678017947462762635597835344799923382058176954227073190296904078678752651503008272266042957631424785867467053422016239903243165551856599969314933388752546635832225349152639708784359116635277929479623525610212118195016524956773017883617017078148924583551382516030703454370387947588742305012732753345881033156438735086641111076379049573185239261179141430200768346862635800832980390508945062719635582296239810337030319979329464304612505618162866862593096591972789931098151883897321107924922768348854295448503156852789748108576380871840625126854012612871827668588991605463951247090738494412212070152710557006649819711323306675976886757496392701192850261415998922523309471818757375226508746393347683907442107269734896375689041443966251603156309479417664374611194146758095143514485951061100184546567803261002612019187674123693021924034824974519013800878726672855074855971094977499373532040645832122513775295684887549363839479612861075156600542897594076981869781848260941456359024145059804315789453002708022445857295417644671698212870697975575512281404771579706135565404215468229323217686639546545650431162664095786435771913689597793903963160667983967473221988803949606006528807647905032167549162642946280579370961831213540798664074104972293167416530245161399143775118370419112839209789085618453676546209133569287883882021267295601396840546862415490339667644534950577142525717489756787195519199063019385774987951148375008921446706349874047180447367391407000961518579867082889603413904308143709919381607883757473361565593 +print(a + b) +print(a - b) +print(a * b) +print(a // b) +print(a % b) diff --git a/testcases/bigint-testcases/BigIntegerTest7.out b/testcases/bigint-testcases/BigIntegerTest7.out new file mode 100644 index 0000000..d076a80 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest7.out @@ -0,0 +1,5 @@ +240230357422502083039460492003128070232749431461042594673965762725240006186909513909376599278452378030621374108126041941633029399882173213165482165661108288292649030708485778130078451371467430370890405138786221323640894663801753025640258482597046904815861772855978923560420591294531684083702867643582232777548911364228879421624032924951227520549648737249879352654891285503435763909125282638997004884198314433227902659732863728402552935306482593175872787110803209669772789702006588016179117470236687553886112528284227576916313534013775058989042070991229730840482719205516684540709206131827364082999332983357398637972948993056896661497444162810236265044153397865142864934107586815970193038048295202998405850932020957149581013038064134325774285202980553567354807857849448876744225312545186466215034634881949510341376372211957721204583875968908875962378777983260122364020411369372858457945808333232684264039759778794006181441857776483060539871620700573765325629639188615581788601229565950187400368164361253097170577813454190162850520248807330978665856582471921476094802059544542543844454206849769087879731379461964478542609771642574081058705989872721909265623519428118086176422194459752058705706769690494735573486770475414500529367139288312771057192997622951260521731103753391249959590327771740824338985296568446403117812623395397732295660322800352518078297285090051081953056863226720709865077483647377618217032164047301687558746553838298404937137178612021990677392082560711001893786515650169709585361098808462769928936293216658410965232825643153653713117776637707406231576281690333446021583927814591883023461738045599952099186782298589808589180745948482000412575495089899174933174443915530035476431061071861352410574142537835522193295594468433141067497919074439132283778746211682048504289214295088848473827460057073717997292118354473066843962879767569230689383075042890949542864735755568477758549066255608353095233291244312339969682322408936029571051973407770521328142091018313122836682088463252133784494072366503567070137612319005415117074283167370398381130249407137295085147600559609915568912311054171717697321861795432412696055436401995048289253733067897479787275111669962450642102557894044644082339291699082268778276206990860952756958860731139681522769608749754504499814777485863905642925739796442157897326226110467362794580643450705668357681394171932958834348775741721320082862813874798577251152860749693014879881034124476000979891259508739791079146537448279284204414453109567545032808050113520525727199061765693565260332122277527870619380956780147652796840954382482896693767332023709552905273715722312558851799853382243058822220986064530964524213827336179057657557847819565077138031880524662481698096049975526251492333221849674754837940182432235999126966711517525200286165609048854778207794905329393103014855854658174494387251329702350488090929389217116714478815613943547360973478119535688231694955942046628670037129879317861602484577075175118289719121304099398194093089453595302977837860330269793464256048438584941504209547885906108041910042038607896645253683213401479815665502674206915339654212394280437389089313288771439477705126457809628486318153235249855958000019459467795020370687558384006297484482072026565657195697542440954763386752963580733930088268074683627076705387788063139000253305121671523945740224541682404945193391245782883029091936445622774430817008373649047579235393341992774841552696227661795799028549901514588527569167427948762467926284591571766869595794525002509024992258893653431837878285909746470814405957822728001853367174935013766218362199244031316313602128813477544222949514155198729224599215778185704389221628909457821425498528963244046447341719901473292032830129119100703315789564228067350722032838941817916612746478555145428453745088402744083257465228262810260454835278155703724851579689131613656554785201431926736990209512958459422714705950652780821953486750588591957839575304443235755002253520243875618523760096212147975713135197586156889741367417654872524334421153649223907900033310016793218526834241903291778704198216701400057606256694015314283696431032632571673947138579447783206295232954676385056024906785048059745277042119440034415192716161389027298838873998349275956914458874339492065081743553714155983716533653386539993089048475636238582868943183767619930833768006882920695851998964279470005983791185860742801749600987214526976028380115728478375186138118733828401251416281336753347256052561176058988412671233530894274284948451877157579060691328377827574362091702580325934331614593598348173063839824173067375489815776487748410419918675758074486376268229285189720429571583738477932396991161674650242790110916018658123377472471806969197399721366568919610240012124519558075071055230780364305486364421431470213605396034692289234537635967184326910400796149686233465 +-240230357422502083039460492003128070232749431399567847599557070981979536044800901793820102919310383305762921672280969812621658453916730864407032568595657741154153222170894665229467926028559815201824421907150925573370208733119655673340474236197415193907896768631765538232613006763371246196198494982785673587623338574588367882019326057000526457123208172060761457970582786245179706382851697475362585353305219792363942624049626829768739051322905998324024812813962225530365566103335603687870519483456727949187015280954663724173928342036772718472728601415680104583976921670941362421367615670438761705512824482862106027097795457248807863881058568877626080380574939852960100409828272543534946029016314000767689961201032362306616783644891428542781305890555942231957541342015593235603752035614560737115662342637659214705183590238260172668435424146140382008347216080444212409061118215336493264840109354255793813148011024981817031508969682764730678213616497920673136286333065903073486144405441888563126493435091115411714099604058066894342280236326266807212640213830861975538332348972249647806281420717191517349264154999182152736147864632063895587980418923791099268356453529016478570172747163642599592576272171668835532368060998950341979327946607051623541602277111849004271830999799722706008617213332485359742183612790584008497803869288454295390946717658092309424012928700324818743557573089152386977747705603636524258124155655750790296966318500144010060668462934399191470557425087521867674161315920821693980661811893293335597329077816414948668856531948814956090158063030835726242237436496997740711358544334929171074394821196990013880756483071191321132432293976658106061671712884173807391551775059166948766437468250692720724269530560288630000106243410111231778148058994112452079311889123632873648051780187431348155966990479235618163911950040271815607545643507812918423267699268808301786556914131430533889724494677272533259957715336353944656173934844979843495984837203733123390573770463310381936311289114879420070879811707389047357553996102254963408246913996702637269328106235550498501320385954454040200336203403953304941090812525849214229993637169212437970825358315364824732113277793993272730721310294200402583539740367076865376471820617302778572354999968369172076453490061924633552414168398935873830379914601912972060697203421014925098816702907564706222475625279257726075979423141250177468096562921251951942846470468621810736381879308618684396463510783007528753748655238225280385632251465340525306688479637493340615379315954037662992446815164918188120771111040994766216558723661741488036531714299962704582096527133778885624289362836710787570240428425462120649194738051850732923493915467428350382865521355397633178545846611636356678999135109852091815963933093041059249050475730848813300276443371636347904080014210951542213430420711093860589706730473607467356307496154240306244187505033606753641481359675869150208733097645635551633149226447911623458596216558589248437488952958757892639308137772896771777816921078724919947570115677435220277869809424973063485337741163614766400555425535527681528660143501574977112342548206312437495194093671236319406815896312398993621360846490870981163168267611005779943008908377396346717072458544194587221100809133327826673945422136568956310384319988107587788092398672358355782589803853747249930465058164359171160517208363497564716220911882528575199536158436867683614178392941332002479783578824535304684650037115278249935925843715688230378994825996951363674761333956738026228165342736601212035260126020763219750340026439100911664886471894974557532978240578709151904562948588768654520659127023423533499930592292817969061231492078872299773072702716734570548405537797872559649491554959936642869364381157660514292894783368276571199101307050875314049553813105762279232480328086745858870301340513427910163992118640051470440542223410440993001414944034758762282873771359483467627262711047464807038047510537759990531882141824904308237748834470967924379552866860603045327950160011690205048639102154174987899193189519400432001086845930609589317973585628914295865506353778851910090972591466701401108806596064863354716083351216701428438925101652196912912879307029666098948083638523292530901100378403002311263275973709020713444600249583579979988229526178055201071132995340323136472861124094660001521336513505045543952186745092803559368226410388006681335471431908397250712975572383950142053454137715426127779306471172974079915373770384989195227978482163341010861612457940746225201232780914349300335379017002213878329992736484887426482974114482861251022449190671167751318231595017931890870346482574322105019619055203161327839819004685046279790238266393311602041102584069200726317404981056292056737893323335337628692863580530429296449580491566946128769744514538574078651452654436305366718797036897721 +7384050231071557137324033553191533689774755433159118425798449559736412614040455396606843411679198561072821098300412868832325529676679341457203515581524814982927349973265811072184206676885293299007928358838045684534248803935459522177220261049939750696608605801057557085438066035966728425009443444578247274504960708868437290651705844859699072670918392311448525156584275277831416347058096188106511880511345324728382263049527787801832356089868601169887685252366438073816168991541288306414391907461997552472157082468685302595048944883780431712422902637002696372883701846773715850511445484883690804475480708610129604566581578942250438080519773328903630006606649614064541958420580052196752215350688430906001742661891292565325220499980076887006632884143757236295172831174147270844052128910362698009671177035498982995510963110729437878299812719735527977521758770901510182010146478972053402503021168652758182477970449576089681022359814238917177707489663473514960641992822577601392081853181643255882957736524318842830207588726483992262685235612449240114462274533199050325014821446630741174345683898496472789810779462764156194437927341040694590819120016438993627053081806962260631480844936128523692093927185553204237401116246009536432909526937052753216588363129208262725083548923968367854194177563498150321602433364746468535324873298013264586530494414848118087992183290084312296660917769310141018105717378295326907776347098722081514660127352027478079576391726832636289829602617141182531675287634383128907927250552394711539005438598957171344976014811038620924980930294920970636084916409241923747263582544206382621478294496524872089585015675628497219639441271120316877707617115006892680500152480892178238123712205137892349272093337242747675158744716718890019681312059949103495739942412316656657228588101551939128784708478661004639351991119993887890107415252345719270498533598044905480645235197001130181026220595523888997007155242491029339676496971022635458463198905514188746871385188967216505908224912499073306923583665178308830751189782319828612920145722496340591819746478831230047313335860671354416064927180871706158314136912511713243502161199200027325439232263390960044724645217463440692234613893784485991493479624271421769400341944099535778972661318227854345870181667777764481024460506190745999860286284154906620767794559160461046183143806234843794185216424643587069202215883374513572168199066133351611620067126557846533529590769127715903057169243453225141179242808639391865129420952704663932141519195274986016154786228179808309707918284543429830027270893864179975397806934631692624077884004346970956354903622518122845801835752718779470676245813420766865791271687971507574851938383857084891415339644001824210060045740714630048863274115701447845614067243568673787712985716927729846426635934474672572231535140226713284762697369888170111598719431241089784373454757216590580551826029497180049184555740542333088916468132776665775527018313000191898477988454075915063361522986277932163443753441185365452487837521582969695457883348022657655181026642129990724519188825562133369392041469156773702604018657236749198274503751265496077392753155176491303470082770498231685382011552268443958284812968119320940590083218893048640872502386138383471058606442464309082414896229410286441813074448124509868496547942866544952524004085617768636640937017589401607585872194752515885416884867106387781567766434083737554080231953793355045842329559007056050686655877372933528787452820061015522298247971294470005904008786855328234785970029953557153615580578873537241858006362607012900052254164274338076462499593328037753122518580085528736215789806609088482865814303786994745304976757052240461229795048904698393916547912763189127014020463408091902769041116604736380436060079985945442306142723503101992652329995393087768475884252381053223218099604317575072177190887173460564565453224147528777753585773660588180824072948770016191476831569856813609017580378209473416807174200190875576435371401841074664816419350782449562211245347177994690873119760844728147004995410080760107243434794337721053167151952408226371186137635756986912577050020639155302313225576551405234996416794697591156182559881681309809643137716823923374447851371706104598549560243408278658220394681342256226798957383529780833439661064023350345394192447386115631407180138079310961053138591134096189719965605575466946575122405872783892200886721221861674834204680699123827505752876858810389387162587697852617741196307438941374839466543859127854059796507027449824310898599471737784693546940026349498079297078203185929674713023915608042653265331989246051698659258554391203048954828882649536738836194615636286718927205108294444020138875561522736214113114917563153569387395191009935286905366934443517809157113809478031299404924251454647955720912942327316188065862526714992933469851388507162332322925346844363002553641024273393980962179625963652058073842822518886137798882626371434169386456137937583761124280317476319167014366948543531392965862360095170099608273227735834844770499975697451522490507138002794228032468754879584293147250121133159624274349731664571547685856169877416101970953813309182893836782879076151046283073551715928412408340251718259922669981838924461632379152018330719233911432521164331463118373046564653625860588950259360673875091643156067612089737434259746718829352361858269859514313029355445259957891333358817834422082374025222189378149709528816952061316683033980750924921732870942730151536715477612150363106436500565786684964774967776130636124761780002524513093163082359969842771951706856700079748068142032611984258232796577460817689213024145649162500476126268291961647482523862553039510107104409645848410605343607204148921357530599909173780207333504428327987127943394298573678599840529396039727693210288090385103344664251891592168597956114763972275783590605050947779437730701776238517418647698166883100934268163668779583534997296332730044922083196799152899132497560013729560039434410046334204130144080017155411310166317332011830082426056155316019970069660312352324580284126996815807683040040005001336199893001824807882202431304280774468560184425483499324997282173388356242229297565863838876302297856947784681041798814380378341025667848645400581435413284938773884835864999282990790424137288205920088994843217429425464106927375602436575411123993658730872675618718637838918221377707246552808039525966163209352010270592025029554058059895090732482708618885528294076330866567651225911634308614578319992023012171503641157704280246360044692687216410669312064824919510859006532882277513786459870538875315151535509649711418005725946561382605749104435777300351077495137024719413724995219309203414404523245859683104886957826276595862582127112323301738581412924153229313487278883321474744827181121522726927119503692252257696261162131155791989177106684267906277406167422858499082080180723200082260619394539358456533597114055297095450656974571339693255919107307585194410630703679290437569425442164413956651219553359267289082389553646293094697355997904345667074351667222354056623128830705193050315923384533645248933098563423043838344112561670458247177394686498614840956934756163087622701674392022063919293226660174324925405220215517084513773971095937377268817973779137163676954677324838769439060433627183175328246382994120740268561317686689552566567881583278367084987215377076751003330626775542539680314196235156891719948743302507638428593455262012331341231558321015634138540687168439087347928522781140102286521218187908630185408791869957706478865296591679497900292124493770391724673351896055356635809248416027889506055273312113561874187242282318597457454602735377354771993974616292476720718092421090416468084848497882298719672530517087949725528370633889909490954522106144262404478058448322481007588192318037793382765912225899776700328900955319508560241313419564375116079863408279558003121963026920344884398422757947207885772137162313366852381497902206030249924200436713346565524906153415563387226816322622949862551331140324888789334377832423249713272518640006236697068883470585178893743515984970010541947160853082514200792154983417606963474139729404453608773035563691663785446031567268387546124779901000580526046556581281053319876944740067061170183455467471125217484606797661371960062045864489234390390265993647760517985710977052495461105668962551447872973854584208945520356759920763221290942601994283110765696744709646115535002244029666454497032509354318802845413712318237783636682041120643604173661249672330299339905659725852735500220259994104082339508285856982540475323638831734523962161817248721368953281107625230829242410161090701842178268202766435392267456096487058899277905242644665526429779380183526281263414608363791064134726671662835073065524336499105989891609523085352522491020506285187568525734670150987512494953958561166992281578999027257400753870091700486545087559113876406645354298826611250330084582682061751008715876617897846570508530142595868057083935451213013141137350808824276856596700494558582887171570059904437704184198097270792164771507575963276636970289609994588976129050431112183114871718661887487861128878752492467027148833592070791164214599203673384359256376610853800874367993071944564231396767217128365278282293872912542590470236610947680090109262463969589177010418222699463737187142761599982744635099491837680973586571279251801608498301637468224091382541752475095906068653980540307101159439857354013190490918642376888426576018822495023619098842343229049574641474493408855017380092716953388455613396970821041223839383877621640415037354416963252777675476743424392273243514330396349721191732271055667728096 +0 +30737373537204345871630235071054306057778248179570997362429226217922536064505685472982721174379224798532725273569247904268795556450305262671453807584532991615817647875135342965341048676149892123199815855453982502112106692663903792265580218943752186330398279594962786394820255769802353433975350531713220282594558947342154249629128028763136792581817209765446547320431980017841618449316906941991788297425923987148420492069703611799335492164154298993389979802349548623664781926371192595988501170258156734787774813128252898767287661059670795230694301188743254250247646305437576767904044398808192796966305092331789229006091382262139657136217623504515990601115357944865494297421482114696586352891496489656212305667698633257916927820570236638465312864549686146122145147818096390986848774268074225911384246977015780951407954977479646577018182596552849489488445225445874376906094574966444046859164930829002101326546094671653061356254151228412062030812136937364635068842728239104698061634254120006240532085726608184320529750278234855286146448019086393066288785265233612231391162903230953505255092735362785474465404998633532949550803803124723648054729556565248759412950020559354738232079275019596340630573757795360255551128124950051976834271975486557219627732298400841888931197310004377053471718452356802571130104327142178194863131604749645068784161443664889021870546979454004195775448630890117669077197438234357838811399603417328736594567109812599864674007802349643457584717165803607700121731148188146847169348811479856803435839994669422596667852655112691739831355974533458424304969109215149613699243728374225985911947175451891102862683770811334428181543354996796410584315843152305988773446096594675529160954644674930040163340102233428544024587428118717053828750158930234788919049916690084157100625618208618129878156133057687887041323878153910812068971934412285789167909917637787953979197656754193781978093037533568102018698968784160277501370450185399674186356856807130329557259856291808108375225854413684585333880555901071585793398291913607302577937684288053825109206378115524634791599233030899616391305159214187376266327527580916937984588955690623799922120749399775666002701700902193186779087092301930381385254723158059343914935473700304543464015906272912597264592918314511344726218847881970271570481067602884446337616379184676300235571307383125476773312654153195140535602071749577407928658291713874362866131162698941105027001909391100822113509863059785238013592555909872905827951133942653556304841249304922869576443290141115360370704328617808861873424161588594294266836613755245272766135625990278819534421937509544642164162367031966176068363377583179584632424259775101681944947406667043369911331510988124669597469938958117893338193492944582838609215151857445559220780400712716973540316898772299614371510367310946531438204117314054454970303665998379929909540743111422200496559201990326434974989512990429308264520640816175570320150726890657911203103030021704595534272154239161453753141965839038240567489212352148722140939426563893932976067068421265352670181270934923037062475797059597550101579149155280748614746348396194379492488418425595928394620213839325003304975383704806741185534987298366653813468356403770722082486888941877347759744458647694695390322235357658908888347904879741759022887016437018709692732187857766870122927808736107606089947810607474525721419536456324418630247171949932199655138816620792116537118773644882787407752960516595522885499382046775458415312921512891862853797327808898144450470851144231559395830414610501726303580848782932444387784214427514087652845549642592946443210080198708689474562862728130263655938396657181837709736590318782070383336460099923454845103869972079224820020773688624047276569847767294819160489116373967361757297982488407595148470707848506486802542172329604258147998604049007212331976211538440710669242929743938772246516268628466348997505860819051025357107761173688838503894377822359648143348019733747430417064686257273534866456067058413636909047416577528680584557440121557885571655195593830767715893170030020552486273014886425859171470258435662584177298233929973203774182064620066502374546884038875252003153986448985436477301597799182891522184149476732286201868272711930180968943988671320449129866235161321762635416123335184707825154023388767188601212211479725177397534132757891309289388833570078047212522042332298056487561818487432790186588068593702836999608721627524365466637043419709608416417745047798456612530878161781661860226642300430931642818678425029292257119396663648538621334300222081528277242698941401307699162275982341637385534575671334982598255160338876132405887715684611449998336701980793931659091637115598111368721181183599916938094957420469951633738313145088875330229492257264945302517038676324667872 diff --git a/testcases/bigint-testcases/BigIntegerTest8.in b/testcases/bigint-testcases/BigIntegerTest8.in new file mode 100644 index 0000000..27c335f --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest8.in @@ -0,0 +1,7 @@ +a = -553772287834534773906949796267690035799114010555690907995811637140940757644116111989273366286047656910552160663851542376433505234194914949422486935353318064606674460098329654427097114168180241934767272479918501757254805589956569592735062752598379024676992611352552559753799137066738040279000514700938477139427547114373181489342764648107916540196928980923650230783399771262018970139808722609689207688682266190221400431774942000531960760500414989696307863043715169577782328689747720943913463253952507486895564060285776578851394437704727099353165516450563735326509581973684215078086858144210980420917721748935383674289016070163947137895598855403322490064693102359015077278081417258659342771352579055386791664628791207326546943909446644513644019817860951260817813648675967765979135684184920315316293587383169148062805241042269863078731534397526675299688857606499261189639069424311247169093292293160645847686986658117071985238717230163041376051210781853912501335079177612001047457040900362028655904639199046304594587338389708086740609794478949788701386185077394392881080755800810310838149520202685616754990632992412642596814594108184737161665595102939942582133256867196375225747029241191970250638034983292300551767309335745336791225994064032438901389309372771351004301964264880203542935765747598601204353446134219531372810015667025009287540718078265532828227811397633850794504125570779228980949812325513391738550319043165138608850695612109718439379114589678842505243768814153907959306431031807334945203128256595666150747117705305184853365737525543406052615887720425697011910475812786208739712795997191758606829733736647544020358213023061533868985386419994295467658370746381962227000730892314654226183474303716264976088007791178508777283232881571891978400305680184814994473694782165440500436298169560861349384852607779033339148884408701524905879216579475283866463239955650810764759884526212801311610256906339398467066765816641809934372120887775823056770754048159407299547192876510970088386712590533395549717545803623268531611119437063747017647000440888613902038783131736200016291599030162069953393278034559466224554732518801741491160107720714645988527093169459458476981794828371391358245239517407603879967473837728658405100222183684099885338521413568820069308371326397257460555185003337255024568976550218532921627331246090133452320118506772999754570759404289049020337489186513366171001085389622341623738287078771955379884061137070010512924147653710618947414561836116325236036621503009424436006640449035869902493715591243801291585641322243651652098894333414650307569360183217222466676428853418165458191446127950324217115060541849155466526048296217007298440853576802494269588021938267308980250759541348425297586928338135549944050610925344780999029924118528566884482797709939445182126624900439921208393532073066869064824732600620520058205140052651980756893818458261556212303055717347429573421261880372484464348152082410017268741583934990680561418121363191303116756261410907516100451397595585913118224993714357736080981651431622906278410562887135911172397898959509553571674725089060706398874052886317044491488319694876372985352958813876790442495459409109890867004155770144331440304682899225283409913796093897542838080736000041288911683346045887783145896148533364714187149823955877817450186058570877937618694751661471481949936899913645400988699979256120402143140762370730183810944405052799963891611361757286224734161957993997798032678625543859823699521427264582147367096534526702861409558320287919741004117107515987232372839414332457022542570265065275606746599445456552107081131532636992308156622810691770265149190904462397473434962356864119949418197567791105750449724106288073364557678350805884157831731187471567627795146883906561707484938315571376839236716128953859505588408441180205518711393133774191050240317322057670782831384479199876120899336121083789285291810077997908487254949530331184573409089595072807786295300023817228133853540797678716122570761838644479600388290323161070414171033635774290332802456557584800917317650347803482255124965289184708114159632507439467519374464516514070953190844904532159902590166196134665366186877826897550772499036763114038507786181521772838878962670022408920566259491635540719552783153733133885775294566696303789337251245146996241783050151768710843692364506352975567926607775875376733268885989092374847102043631384812803597377256689751231994029069780401550653711013743269892504870860138529066868500992833371929443908232173321303602501454219251736542368658494052776869133975788621708696441585811979245493759328193543523116273548230925469616407280114813204246935320210161917569243818419256039768575525414192766035589318031294958280919317129222576463670014197654198608304742330777440797141550283533881789051887201347421799339925136070821744186123980299076838216661481034807405371711283894899095346830306290481887002022724306719159483052651016330492585375711930534543259370520855559191409604308687489276100795906701819541237602586771648074902557827730 +b = -19245662080806791590059265241218267610763617040354005873453970986153793126216773502730319601317099592169458890238603428817587921906881979745717981850766757557015214201009820556150181765773151227517488857025487790138310491631704994921046206558734961583436676153729259165245632625754516950222812044505083785344500768199071671830020927268765775967809698663062356996217877975535075900184707200546175304595100810135999563822965570151216765684697131636271690103943831764806289379238829692183503678647155369850603045577116036957128972163751671262832951079956050723348818972669680172058213214060020622425925131117625347823808753269489480762006531634309440443124812536874954961232888881637071007023749981704086850313079789990076162774829271831888770830722928685706463901462459665356399348758838766029324513498785987060056393821917700923577662475065183580030273730375641608054554872989078838080571685540619193397354730787785310796240125602838774382008581793998625087952100280749226206038628249072603503139944175262171126743195494825979453437480542753211825203145033476482375737445878552339184748040223136672038133196181014557080413672037556999262366363183853185916145839085567348401404871615825781012399971721032451376737431221711270802050313007850473109042542964344127251995572465605308799985861153998629725421064127147863472365581331653446514515120685222886250393211475979294530276393761572322192084202112250240761043179000614077186874605443163823173450688613192506584371796395331946257214219869437606377408211646039706510483767653847653977434121636922057696907009709427602791447983917933750665241390950700510759263288730061014417202645994055347066794905493315130708715838391657909584050554320038989587298127275686306338816163240535124099161621534437996880969998946261342981709541796974494798466361336403417002336745736577256082425955356629956951042836497164810389399216527300983470590393177549936549818782211675402291571214042181064413789994444767134948491504787669509094062461634298916926500885289175324076147335792557668317066415950611293248098349983104552578840339315573982874586680735626932582148972328374517645333456404190202018245416547853830341799122500889244116278056667734604403598502225652353537977611299482876264643302113833976191573524692574708096059451894699562655442212719768974785393902940424662872270039816052159987654398796928991083048716972216809701879972587133723574206050167456584106221485130165858817042484964569406437303460196644052908577626011601227314914200221362307255324606319257564559266523365475075140166011272930174581804743485613726490057631669910755344994946139276096693205186441619621424391897768395456670985698367178030206396950703809255951700167065822376507709197157202178518488900008563606907469816700469110286149282230931197098345362437384776904592135223620127071057743919614858796953765705834835920223701640360782110338616769524954684424688115007033448047072154246954566440363212371459040805964579416396902509775630616371324314489407513416991787053706492421446395988045821840934315528447886944663136380470315157105168559055703118313908841704895080412527430505896525681770351765074430603622643719128293155088918412008578956657360613164955406397368617109688908715475354306553378631239308148429569881177152691928158947064868092405381171789613283131633515483607981718933393862828655345821521883452978770127077797350631275824072649883790524158377245242338609499852944447674472752803989941206437546940418539178302911733630400077243741923192164523699432720554813054853975467852516442265624395647152762869210508748462173497090910123877440430001382996520056282558635432198843990242814396320810683534168085805569514042394504531661199127899585076337305310320589633825432959083869317331780249254163105902667324606690070821153042182730367223574319557225691903384783492855897440335936763932382967780520521402282420949997039467739949524921994990788507118491109355591030903139008165318388695318943243630348288258660210179212538479128388300201707814814274062792612490155421761181882336064163446189256368053915749688514803152467724669557867480162566729363011079977355914472256544592985991270587558399396892097297115593808065105466781564763832855356756109386115763876245494143528305005802539004169529271255044576969870952033192475503851174056530703908880394105132560712006552895852326887859178577835277302919877497103690704984573532935469396445502123217640448811884727616055824460700860500760702257083528943710613081725123403595024323075982982005990909486912921352808170284712328406936695508572084008070204769492988044787879069832655583847937947358401409705609968712673278426900594046040487628047999359305612458141648714603835634468931458055057075397271580825720604195659536174871861560555401465212712489965789087983844218309727398251537807701664684666894504178413173633910163641662752470102210415583559431401631557819125662603622081380009222134664779367623704754801408563781710149721383497596017923755949279010242748915996 +print(a + b) +print(a - b) +print(a * b) +print(a // b) +print(a % b) diff --git a/testcases/bigint-testcases/BigIntegerTest8.out b/testcases/bigint-testcases/BigIntegerTest8.out new file mode 100644 index 0000000..b2863c6 --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest8.out @@ -0,0 +1,5 @@ +-553772287834534773906949796267690035799114029801352988802603227200205998862383722752890406640053530364523146817644668593207007964514516266522079104812208303210103277686251561309076859886162092701524829495132702767075361740138335365886290270087236050164782749663044191458794058112944599013962098137614630868686712360005807243859714870919961045280714325424418429855071601282946238905584690419387870751039262408099375966850842185239161306675719584797117999043278992543352479906513405641045099525642611430727328866575155817681086621208405746508535367053609312442546539102656378829758120977162060376968445097754356343969188128377161197916221281328453607690040926167768346767562179265190977080793022180199328539583752440215428580980453668263625723904711264340607803724838742595250967572955751038244979293847070610522470597441618621917497563722040174085675917662893083107339993001973722234276872323434376223328594712671944974317555310734726916670404179208643289120389973852126650295815282370610449903264286998404875336564595746714989682397982089732876648356204137588375906735254247791380902732027888761788467115368150088475366933292932777384802267141073138763147813947610047263304028503558333434491220899438139637334657737150208407051775076432410622421760749508782226013235066930516550786238856641144168697573386215103838415324467010870441539347803686596955375674869999432126157572085294349666172698575906603214529613573441532370423017804193920551629355350722021505857846001028513402470254205258023558395634840967462546079063962519404722803343902951617698655594230909464665758129790220330376634853694098768316257336528095527938291963688302924819685897179257584197719385163584608221056077959109559719498605012432103367745917375229063097322222468870019254086612019000978235008818881327062034874295050530860295646195589488575136123379207167886242282633581812029603040496038076766121389841477255637808775067295738614994367749287232203111922057437594605268446156339730621341728257290300964533153847539024900337387054897685730165910036363564632306822324517035949694596451448802615966902892278260419936497830613399805540128715393388422226787040302863618316901610814792914881171996846616807906099069859206726380856717954006715072834826587282602110990874951546431368791247591040559574389161194910779717143684646277984816326893901532346172089093292166902694995422276559088836389649174167764967930076472671058595955096780651927967017784711276060680380731759932104077580420653158810200606027940312884632650693357613495914094942906158001512947948577568257971356458892681173673044435323383233739606603435222908943805172618007955887025815886844101605802144989422193740060475001194392037983478609253007347428789747745376001396184289835717009872987433053978156232102637017466893046404617409261882595735186589203439324729171412231502209509505212655281825267123709724676508677255215321918137891637571131213782043990711101233873106766834705383748617383037752715665075929631666329127720451713480679867794498095688748841365038672225488495068423409959984902984333531899218219739893825082019561669752197086869189209991485603547191438008785214690248039226404220948391985090880242632078586373766975159432976054314201821922375050554903451245691406438657528793034954603258500202701911995953495298253525758994602877986729825002486787157042643271563220031547160884596681698189514264971796108192252067263923175179877761242242637581358874617952482152375043275017235043712768147195900017386137308302972073643279948736623199653371404194351257910424537363113765177577355625119040743459263041711080947754233894401847501056618796307782680389026631334463780469955018639422755381617041558033920146770534789822241450363247864848278662363392386599467212871484189216882297118763748530460708554047909203113668694311108504812208782214286816373780607540896377228008523287863983368976796776457020553217674777858518429889537370480328224041149039119994802777083807142308337489444571700817724287889150533963422844018638611419730624350246174253418721102658265399615191380442960293637676886147171520772277605821763807521435124153031317223420915514462399640065156895559145745343542792299154095365485028033701596907183073619069954472770735127875702131023324490897475662169269497010131269438095001309591876255414676267496827627121639662876884840010204149624457311684755770838401446701098927742954370519243991381432654559609628729097719774764975083589180410188772015722511308950413794484556817294072789944668934430404832546212067300976859945963682817128759851139966698108621617794393982263957822166264889052095200281618435694962604452067993883036902519168148109275970653524029224752441853952314786812076076946079294317586531775270871291067505648666585656663361817728049021622862154479193417963923748761902823264552637626036610832169968198608804236468199288736472090038605788073312268980740469932144639472124934722302718914454282574149618247979334011914552481505185634926815114359110096053057810945628085317137255526342720927085145306743726 +-553772287834534773906949796267690035799113991310028827189020047081675516425848501225656325932041783456581174510058416159660002503875313632322894765894427826003245642510407747545117368450198391168009715464704300747434249439774803819583835235109521999189202473042060928048804216020531481544038931264262323410168381868740555734825814425295872035113143636422882031711727941241091701374032754799990544626325269972343424896699041815824760214325110394595497727044151346612212177472982036246781826982262403543063799253996397340021702254201048452197795665847518158210472624844712051326415595311259900464866998400116411004608844011950733077874976429478191372439345278550261807788600655252127708461912135930574254789673829974437665306838439620763662315731010638181027823572513192936707303795414089592387607880919267685603139884642921104239965505073013176513701797550105439271938145846648772103909712262886915472045378603562198996159879149591355835432017384499181713549768381371875444618266518353446861906014111094204313838112183669458491537190975809844526124013950651197386254776347372830295396308377482471721514150616675196718262254923436696938528923064806746401118699786782703188190029978825607066784849067146461466199960934340465175400213051632467180356857996033919782590693462829890535085292638556058240009318882223958907204706867039148133542088352844468701079947925268269462850679056264108295726926075120180262571024512888744847278373420025516327128873828635663504629691627279302516142607858356646332010621672223869755415171448090964983928131148135194406576181209941929358062821835352087102790738300284748897402130945199560102424462357820142918284875660731006737597356329179316232945383825519748732868343595000426584430098207127954457244243294273764702713999341368651753938570683003818965998301288590862403123509626069491542174389610235163569475799577138538129885983873224855408129927575169964814445446516940181939765782346051416756822184337957040845095351756588193257366128462720975643619577642041890762048036709560806897312202510562861728471676364741278109481114814669784065680305782063719970288725455719126908980749644215060755533175138565673660152575524126002072791592810125974810391409175608481379078229721450601737365617780085597659686167875591208769825495061753955346721208811763730331994268454159081026927768590647920732551143721379096814146096532019009204285329198858967374072094306573624651521477376891982792750337562863960345467563547489133817248703019073840271467215065705964239362587540458243890892488276329601070223334066919045332841329774148126942094285043051211193746254271613421972577719637892692547204305196854209327249951603011820856821232152410596501192565267281610613072729334951474593777672386435382878228234417635583841827745600039666875919190802469628481657514614290638977462334974721506627439955696028384834585012981594236837278959661307790506468219797123727933060479770033867694823197397985329153734550486943608407171166796750939904384802370101551521035000693076137487608622390043246673468234439835852571918141440739923126576058025194025123787780425924325928558895781148485435785201380967531280457878401349359936598933727339539101929725166521687721176389744136364997905217137240182224915780593643920294573657137172307791589595154733474879001394385996640297494130411930872750602346280299692336653768280129917380718260322726539314485416549208300357965634925722166540980085933213574850371433835620552790340016044006879251846954511778157425890096979762442870380017376186110604039863774064040208315714899736467729515411089807754230157179832156459928368663426483559694449313600860141271750474461014476914906074305484517219353577548291354128913422753905278752108836763489653300069988343668042718809578596241117851112882612292969919384348704605342482505773855598828640571980732008319873093747738113557139481094416383265001895785147025352908842297477387084972528580334145105669140070150812795506792905326118778262509894539707957252373143325536356757942034902410203991821097295161944502254849769986643254857735313326833363783406848643950713443251071413603624776001710918485466175346664679740023436833123585388830963354641006179513045492526480108389289424475723285154604916942139001495658780183963443397037969257640281151038391297986798247075617724986738473181897758810499889002501801511395903866994982628136325277085821951249716743525634225762099953769873734890338364795828017718241617297767769287230411326644339252445168372671068943147529916237774658790841137526613138773634170976793887127984879134795775088777641694533165352391498034951032265478026155976628362492235743371591351472272214559167834112809287327095297098513598719995101689983295598975306858987573861859834379728722740553247666933505859971420946087874345614180025640792020334127212646105032656202279761989349439965123673333142720704816779716485921712920142648819134531920513891135600051651019458511366922772089849154534037235856076191567704849507278925494390646185318321945219678830822369064659808911734 +10657714321378730037255138557861991815025058547437444290566894771366564183462106601264633303430729396398314130829223672559035858194154611712911480844316165048419378227157234210626294428735184948632876591056211813362999469184101065374366508579486125228356288795670583991535444431852241645288760032440368726191359792880365263337123075449459380668478917315321532972628388444942746121082892991769960363272941109106193621238279843115080340616376401415979575140687674183916628536271911850369848669992901609195348072701536034610384908805261358539425844801888696712764209596025817681444980492578333415234704051425107090690550368099859017290163960076055921068132416765658773702574928741656215528722729062486158566613282757045102699284893393253874577372807197847721649912989620770076764653044122338799948151152892646829021361590627192435505061616539657301711367986176802093829738906985835706588840949555707193272173305730548363018275667845149121688104214946897737627923103928982118343462674313534309391761316192283404341284594020887989329233486009782140620538445536458285035987360420154639723231956052262544037246963570781256187554788352167353069550661104532678779700728060351230491962116816111935571070924072384393405255069623566842341254351718020728612626364060784556301080184247404251254377354732975760887842194434396629371701440562241105109042816702115944763159470705912525158966326689605640312864441687983976350402731885011258825676178681194758904307595070763340767345263185335081338218434654380518884182010091202724842124737381034655299996624965022014991473350247516585839932211714534451005209874606756941179955218878477517197773231448093812201899754604355656035903359308931127938994663633751199304327835681126671527098465965236068365939902071788024688823802829820787459909546560112910512552933433488048902111443110150861093270580493550200362292701792133645589275808641913432977506610280895106499685643397509630560702469211087250059103265645451926649031755258753563133059040981766160341593798498704259997221824174022473866959491969622170498671062630749825317991400196973960525163119402333091095531241103684075203085227378228426445621175393840599253235670284301979118891121465389804289426509314230067562265612835371696862561827781075466203712595729271689487027986236519738747334474373030319384315932376331724781081831571638613205335804915111739588862328112721711099675571297375536513382734595650960536843066998260753887916950946760506609348691902414380954562681951080148172791081194648457235919679403934354889690550809786849201039290002312975800020557821628686966321004416741679459318597163430850110213135085028561999612848438783096736303786230849168702253642051239991499383649526383300158658516137386172925127736820477958272684796903772879665163099690155811122930423148712659460421291426469664473908294294249061243948790693674932992783441351148983161182912826006595225528259605465494738234393056504365488669471110270348285400992907563534144618991210084822096002887875244215775609396257323696690403121070788662564243156507106858615307201556914870259098337581568041377813011275470607529160676430044206192950074248961780873137464380587839868393283708788805899818843033606916032208974554543912463905726111755136039414736401321465653490469930235025932955839861330247118255887987062813721366665956154006306378266673916401093504689771889960203960299416373653180713863817233933289009549079674423170308429394346221625209603631542905499478407959304204685205592239451258109497804113116222443229284607709613454384978786610415100098472061542594353185485265572576620473251206631086185526042718118182591012195334283775824752898076211720235250879523324295997402210581010924838760274294131571095552676149218633616503771938316904596968018501040897900858421613430072807307457834760726302850862704669877391979927052134045077761531223957019109687514227863039567257795489461169993810246297650649317960053447052570735996471100548819145927058868826842300849961043664322226816659568819522542231340877342740499349526485696090819890295553135885984637399148894376744236385698443924432195319553546849117750458653807236932400399897811514647511143200533083170463346247659691343422140617945337204983481061564789170826694468512238351653492470459759242216481010395971173109691645576266505997372123816168985192941419230669402036758884520574107564950991128607538429059440606960480916714162082801821506912830431900755349585633067015884744683830921457271971977882782653233238985951137468222060765901677243334149052853529917921652469497595269165102178691532688307810730114729742139383682393197180074335049852453439545311047646349285176581955283182858205821518590667959535641226187420833352395539413998402746652617353237616141779227875265797774332133940807911699565420677250762085705041828022197552955672833902006771762006328561955956121356317566599031974306358995923881949619385025445995578916308906908910647647035549164468179605677261339917701851532802489353233016211413395095315064267035080591446723376656020961165831775644651965577625247133965072363184918978507686374382616011836783574058776301602242161182887303390148435916789813542287431091888988612995215667640211128239982008231165400683855796049456933974380269532401678058994042379864327130279373874021374555817214168550108361766970583270188504372349118883766623570239953245368417769099407805179071449221832382472708781614033402091510892127405235665960255761237616578986063528602264171213680331792414422543863403991098941725604106474979392074953399683218051263017424976719535636014454803569404258999922684299160352666675499887271781221590976897484729085929910713632546236104621353083547348290347674002570807243790151290484671988354164248995128577284193104605709618370889294630617916776146140521648209768920216332200953748578392274958060673583641062878828360363337824682673624576377717364358649325379165989341678318170560897836517933836322046584528453724770557414500875503575843479681941921828604790159433651055810253671533790947152734701257016480347755827077223686944436360305703635034565721149534456804587332159143179890112369874605205582802048324712136301743575986934017465387218159860115953115051690955684575064765108002224046209988463061254286891102329229246178419028562971625443593094791471855242213998072091083949307672096935252074046810103968409575361206943330840040900460205038943279114483386851971639473941310732661126831242664782431839461615618670431814102777124792819081668650880000722213393480200489679889435428906640329335669698068221662430943908236744806069210566072546124729521453785407208818053639021431091212740534816438512178638217129175371188110966239324200287297733037876564845947811264739982071913363467853396699708741754505533871925228821219910723012076034345212837581782484263822842510389807831086986219361741018220467763774388965500828418571782894410358863549733393408816376471918258787025634398026181656713641579049604251903493322560720029027876019114634868000521062394400536864377638236615388723861790105859147057286853675196942560633769164914789974066959820297964651398766457062892259262561246703376599682526767272618938032678705952408027052115690108865270619297140794199381734318047094193285788528090109540674417930017435690911885421850178828802070680776924675146287395755535061220501005925142699191080763972230263314346317099578469453820917075431731930635083672747678348120853185718104741879900965197366532651863942273295479863978400775630696578873737605930186344600682314730258308104979508729048457773691702839846557067466446023154620195090779496786382566430342975069916156016564605244913287762219872772568702545941119567781555346526437855250306073404484655297316363599578023421731262976497928117417755467747156920181241198268224045457219571241871604083911928021842535051235838281464788300714706957698765860809642503540533862981591383646349359954628283285192031611402648978136450600436620798574498119554084985407331301842969350166958292226940040436192080188584531017985687273185332251569743287012361918345767535648189122975752309354952699223891198539566809786676331021541761065672277028291933253665188902618727344659905454884685090011992967175685438331561924085417599236378325592508282031835355735392759611779295538757589961437241774255366501857117205083742476087607513144048245193129520173883355107192919613583794849377422997440752977351834252731762626131000892346128012452465288819065507233546309491904019422100344928888827456970968824831627644068823787884677671123788874931597624720519624157342008985059198523068429038501040131721581867568385519619904850313839443320571510742817676807848321064039543847360221819342152550247682619448771665753596612722724504029995660491878369153677164175199468675497845390857377548162550277840410912161722061477250117652945017020669205985782744010925029269587538010144530276276905473975753503486024116630381611075843464990471352326451580656364215102266662907522659900699165536941924416394334763202617259874491516610991725300996122498728370324522746299783016858499213106621411927158434925003456398320564368128873605898601565155384898867070869110753219850447002380589627207156826835985867666309010084682046719911350787809541838212503559435278025758670731317166973238030823934953724539647274248501249683077710954153213651662928051700037046306598576984557891625329144860331410895006962800625338807606618587973239086482440028373080903637944352737130724128357483692818074100039329727594701676145799410774751189353126509769611466833122927336634784802172664602984895166739564504222967061695478873018727506879870073030161975074965305610733607595398586662183087136279523103907582975423870768648120018785615151935528692413069411247946076332142648072468588077765041737005882102494318661582792829775936142147210232944662260291849874506465597802901724209285231231874127966073091335082561241320977337124367051635454856003278939416574121542010761778442924706336191012464741431459438101749668716189204031889136479461282133766694281073309162009369080 +28773875666600099267965838751906660571423766 +-14142264482971868049785893007134200072514372709710781935600625749448546290728391899563119984466205356358955604038240665804920543922579691691177641204762839337659184166287805475794372209385569143690189673439910023495875900709736542934142867531763168214167100737845472146520036557702193526407601801293709119266205692954689662285007263502476298803251859189102074955710444627619899123368781781862353468811391466634376410471931376489540283952816577464452704817157965060987688602231913394977409591299942633205419805396195490735294830881274818017899379690273033957271691959379166251041687516265476130817152445588614393888230621472754343775740423343203964266953607536055814228713360624863433170665077592759096562763257666219779968699378196176600315157886804559508951687504806623773214897131671262093566002086861480549533994486156502392755068166016808321152612255825198185633914797354367533775862517385758802867375306019306558028676329633057510239721998531309149161123929333730638836090790602362666168579430295136537166507827145764310270259415462362926454986627747499686741014428546739705919043844895745885126760324071691619516258287176817849949796568000969077640490900282530591726215344084463678279056994460124571621836226757123517667596410668517458520388995747050375967857012682065105896696311031028886436993617503228158480580305253294084620740910532287063447764942555379878879312646654963302170846973641671793348013346804392844142760917999479933317972653221604522150418280845336993689494742582921077264008732807578865680510348654003180449676037365564259689595286512768805257306736054853479702405538241451209964546094490752303981482811732840990702016631314383125980730920588227745918152274120273137670993372972412599654960675071163997776481619179603008304027047711153144689168088863860040507347260303744812570558593115299985480411053074380243911187920455497116568637256159686228815954101020039930999582170326574174801026056934512322829923613382493942303324028638887622956048204605583575052529013834433384858082870508727908288187759036180947337002451799818643329565983130827429445361003823359250337942780361236771276688612697307498179487325644906729998685117453185551017188716468008401921531653457568098848092134250056242427133512436529744627948820990064563298870044756114318029746397282677996420483463908743056900523110441223538945833526743319933194799100983854010100359343033097599657649080145851025351987601186601339016041340139858841309473009034360046809549768154695160964561362280497885022274537657945414262648010892303014342424390520147908890207397820602071056533762188036806015534301528060021887783049537241393414325531387830196732141648847880470295194385573444017459668889254245357589557452700035489345799994055042591151539017166780561240276674128589932914593144725711724295455264264006136514526327715372129667738718825445564387229816853046019058209387227191660316203626102777066245447485301825863853639585893559175246714812222535823498990108703562269129806951162922758261710713030983652388918559010192504281554490306626018248896048474807359232804577802646501026634676611730567650339778841307187566667348100069321615282272083917309202994431503970904010731532531901706724993739990216610981003149855295375780986781542928632592704706431173943444268196512013106189815096400685797644110294126677871026810788684138926725702951181559802863626114373493113075978014425976090712286378346265348308498279821411050242169984258528329120704379577133281128039264893742494337683464823836326389737036599152557153176822570626466881764281815957774074624328093778454909626217811559424556856206331623610488808694895598371726089884513395799738527375852853310252708419820282389048747593724381725575002725425761744518274274284811612542377970365049809873908199213346372822126133518015754830533554792411222983309083131643903247685731267935478120196532409199778175973401007433461214465977344989923638745799879132801401989352003570802943625477365381649208274592617668721982613180000277751283451315670945403963216087347780387944817702565844640769702578996409156791428462460606581732949680441125702296564349136939781194225369740043867749598342550047616845512100173957121146201538930204854592207510919222670899926476078374670280964554855025564938968514872058250667770823746980768174120976330127487263999453463593650746826714433490417538040390968302864695555926120711102902710327512902843695253436812749004812304030757818171006516110226043500909959707316591672932965513748059931388664723752315340691755226952060244478737059604256484202233988679275647694133318926196423341894722182343547612042360341051585578353815710270011097048508310187330816719048246807238235892870304427159462644861081634041924209666478330444279873429174469468523142239643167971835084816477818035017968620673668141988681903004446619855823605036184168018204489496388711034882509724154017615822628288591848748991300105874550761549348598472428027059138889371747252248354810009798460810981771705866794 diff --git a/testcases/bigint-testcases/BigIntegerTest9.in b/testcases/bigint-testcases/BigIntegerTest9.in new file mode 100644 index 0000000..6d4aa9e --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest9.in @@ -0,0 +1,6 @@ +a = 418142476350444853118043479087878484599531596529336275882175631035367458161304436433092305670564751385420146442177167531861152271424105033253431885328658342602413295872578338124369269638807361105029029265085954135442772332220714523337141405048940116659854315635467305888028748147134779071619591194068206947725199034533174380441261682376015307631548401663295626627204624387867126212969307255446311185840545336516839078056592231857741650772985896803790307958193573146664845674848433213637999366298781992150818625984913832061762485486120530175982166692649915219714619840657520889068369654106410532195543308823500744014192483598828497399965656991044104587795369603909984303501489208884537531282416708288503232657697786641205457366021112414773446595508852102249536975842289399105877799331729160619373015009808284703122074910065374599518911318389114013977188998651209595054473845608149353852780456087769743366089433440969182539862609787419679578749131424707064997096380409419375668619568452228266478688777966423096058052309750560152957883286403397970271642841904511935204862805624320734183849758591939890002482001581859024011521764268480207822136006129733314356585742108823727332843472784232313003790730395123760914119939118257276677429387332777960456940599357866160212509066428793439397687240935837987853486988471424310203162659596051049840495189467272512031411732577617501572087712689799366461437620751076304571029028873228762645484495165015481063731665070946666970688039719049661943582000039933269541541464812474557307210656359051232886383034940492956552874937500190063376858248961083440932270268301886590008229611438429400858151381946803775577217683465939505052000965999305071781297755108274483978410452595209893571333270556356334051827694293532092775541755042219511662463023628314790669384087617538808173974292207091907974750834072576714272276894557784115435973937766946738075096813822330883464380070959596229410528203338107715112738373273294704529623296325971265108190071252955974562715909279669961888605892565292071954157131384944989066695577811696162088888476880511116710488808683396022509522437721945033460471523242736994270331985766861224953742265294138811551014569161136281750870062781442200982083203246847414779749435416372436932698239322055954266590067494695639529266049459490649903211683737663952198043327269050964547084276741931333327524532275524826555879898103384938879108997335587279112193443277797504412452281452366053819297479122655367641160389895401424462155261973753609171466487571185882646876238515408887536364081117078480150377741501202635371882799112800439243698567352282177067708665704353891163932176800774182358786764949394802066667731612420095269546161871541646579955225437494509442940010147647894161608359222412485850393918907941751137530842671683721874956815407341670128053041212751268501748825379179149903119127655080329456419643881625695601671818358410688257451635083987486452914536427853624623682215395057413965882669445453243680302494725959657522809763012374021083650836930542120625928554757337877716621613671564581122205481450436365889539665944874153288033471101462344961409559444916300092622047369269690222217905137163619762625782178099242684964991766720275122428517934826270907742497356889218216475721236770672801581863886553184326933756907024391689301071727437503956977522767052755566062318191750819753757598449463053618131236614210058213254752066224719355836147923374969571370589634187952394217580641010795824787645234639226088063345690157271307482642162173927146099936113019174570693456014676782660729667395788912865997899695248561243234728685689844981230056683371633765635233957129584718132241231268530769631735992139519699992448043641348953623867869847950844280538765976466690204334119592049277998063197504421472906749149487376017712122425905934434452574770275474275673223731413665651313317308049266800118942982138001123258372877823678072550002394636234750469768222514656590720487776702929241813542629337678644135214033518811054371322902905216967470970147448909605748943693718617684273486570181950545102536468601006909936960632183119822533235740724007358528663174701912402534408521223932843322160835783122041281225567438202281323042513284375022002859238478497337598084073578698012531866097528226561046532464811486019553618503720456033926955883101274930721405579348550832969847971677508082983386681906765998541506013628117185845348891862669737906899982842537720272344745549306549423360413070716534500776847350508166488157454860414996174554526329080103340876125634470866569753605204877127427502458206323341675752701268589046389700266279264071691547918304604 +b = -5861855826839519394737732689822044409673369861297184560826182728433015724225757379764627916191281558095747847453208083259263561236089601606208007870573496337625662582416277491431196704950403437975492123662688266666932954667095951856471386698926777332713276275424297140950028046012112625713534637473124897266112939173182827477004525035130796960014421519035084002930286972500181304781156140461739986328140767803967220712907285858020996645207313417775823067268132500803116670057508471526809113077352517441391670512725626809292086660000871807032310013702474063201557616210879405280828915461962540762601609997343527959601388914736059465081870429702734295623345255356002127919110759023646226019262973297208750110343721557925726325488295954362579010129975446721892843260333880550572993987628594843472235589725628279545701858748161592727578564675572961880497491786803758694883253335766751749635345315234246490685316376525347772951423122281322552893253039917763357823241157115279623637045081263610950288322316292895372639995631329933848448336961933237551779012732811054137724562781163173653963915155797152350673916079717263583985395109107945998680750439468405929463360638250638237809166666264359428216134811371067004152607902420350390354283017221635426812757773500199233852880009216404208409098089407208641220670660607796386256623596092017775675887551856846714247646961814311284591662886648803022305120162152620035460879894788573816929781780542891101878630413600321138385837098831861965202897181715189665274954672108484071368519634429205680851367305653912365037070101675748201918175430034749292731232120206645988549379089243333475349715860216365509894577625911083560504311238866285872196149704700990679567195437541628403459693256413865981267105276778594775166151779997744686504206352873363909879635650765937732803695727444649856204314099798828394590142668082162452373035265987703245052117652993069717793842477273037409713329285516055943892205853359974977508668615854786858547189640738621003197486767787534392514369144977750958347577904393055826413235408283053989720500361237790411530349891087662517212401936496080438706952141348348589937801832506172313066476112743115244630013693587429315682747282626479312456316996163650113231780265296791169068247910977663639105163999381261004198014675352554450631917727216593860244315069355083737569902800078312131989883152312033881846824203438573395475206530314351046178523180027536960440654700160689558726473043012573462829064245468869208063419969491462549771063770227901258421947130297267318500667149086451118356984571063409348135007730556025341434569131179886574533798418962388065717015786618657862026062119048481031815147487667101578069995219600357211735970530843496149132619024905502058476378443122190944879959671272393735003347620961677732940460975044444507607842097270007057380880831785643121978388818415813969229553632634700716977591391037872102570611937713898083993854365861750063550247070088359600833057465206397832183572985863732817870184588784005259136779685971428258536937613497835714887728927298354857097032307902262093835764941727470201705952381099980522099137248191365605695529172999397807111035996305580561043384314644996928452887108036246936980472851533931395063295090889598885670731809727193696393244810368172857738857779978922999572257640817178391417126495099023387263191538883483306790555324134027775349670128688481619537284085757880261676271374557716480045598887386135408421535107526567457778110833371137287233165173721637269183834143666250834604615680093119703304189202093669235700839270753263795941045903907034717564384013108857846119219724493729852980884428229263538083781381821831977840844487161841554685657290214576504154465435170849386905458269917016604282800006474556245162900401761912661895986974203840021967576318799520441827272063090951087512720132034559558715414356680041626735364713141450628435332196234934070875258945962026163361878136599496766866981908297853880274246742582490756251561871183410940078972151228158557573134971613946119293015703707335822496588755202986435153428899495863992876645886013097477588752004254231936039694919554953853083712257827568187725826707762094065025277392100303343863591968841001727177837074915300465543350073630947759429042280516072834444753169745004899072439592257626775836741799304948463768016701680406013534307474443441584025985178415417922857181231363705062986037572911384491154359746278951281630932561180977889181031094140580625920323442375765471820984898709119213607706917019357879009096906169227938753722136107868678810736193588880467729506780561920009882454723144986360709456042997377753611989949159844637431026754376550194057257950896505078033644333665006911653220594122995875492451306151632199160708275580705556157885550927694467232161472477621616359633738439635878998809904641126114812898941125004396906744024327643853490420465038332758805541536805793229354489111271408229268 +print(a + b) +print(a - b) +print(a * b) +print(a // b) diff --git a/testcases/bigint-testcases/BigIntegerTest9.out b/testcases/bigint-testcases/BigIntegerTest9.out new file mode 100644 index 0000000..474946d --- /dev/null +++ b/testcases/bigint-testcases/BigIntegerTest9.out @@ -0,0 +1,4 @@ +-5861855826839519394737732689822044409673369861297184560826182728433015724225757379764627916191281558095747847453208083259263561236089601606208007870573496337625662582416277491431196704950403437975492123662688266666932954667095951856471386698926777332713276275424297140950028046012112625713534219330648546821259821129703739598519925503534267623738539343404048635472125668063748212475485575710354566181698590636435359560635861752987743213321984759433220653972259922464992300787869664165704084048087431487256227740393406094768749518595822866915650159386838595895669587462732270501757295870768472555653884798308994785220947653053683449774238881301070999996718050731614260792897789716390779708077132751872233271265664965693868583837522968465775219822017253148746178414659032117359355988262296061480084771099643365713640096262675472197402582508880311965277777166963101173994184966112645339103149771925422989941302184041748944454023156624331508788665244548159447838937655626070739099513798846902661785089658595108731434538265308821433674890366424385449529475756968764738618684981831444493344542140787344065970794004807198209385876197789556884666773250469754719868306164405030088455313885808271658472768721937626034970068039810562970674704268090210719747760677119789814477211389647951980142619400629242218124612608298045826103665712805614377705615909014942202312442099008686963857479036890211082415117680151038176436868373024305336721959644536761368564273827858212314658504255359077732889893390984794541514040552169365814091842205041872902890910365054554498876857592609319408478777742793813454743378633218174564239175926583737424299875365026898237382546214178505943002739151153596072829688267080239603262624408512755174697047771918700965786041545113523828499181091958025636842262770873323976610094109301125258246388516788290804971427716763887901633589793144662262309658407738742161611185382724767831203834247661598980312471134134109140116628635676509038003616614888787553475408342983512728713508357334939182620797811707194602013526076698762294320459866528011770208837898214162096739680507000044978404227962203873346798977390514276013223529555611614528951040138805348297891938596773606984799282902555519716226906467960312005516667526923517874363718287681337667840055809310008048223451959443274780670029121324028568172360912223698792580836104500500435827794263835153370730113714629889999452697007876629101145062708504294223446384368174922697501519300747279324017513230899708071781669099428681107570081687024654411007167380861850946063734450847129062402717980995914652495478464506565850784665919496148910581600375635119014752468702341915930692734594516205506988591607768998193131116110603021624456858337400218351628206572624049692422559145643068289512318510882498333578885465699703979331289508556873321725195221031491648493344467704526043498238440674312766594181749835587916538347692470519820393544229048193730102690433684949289367888283323410206030990797474785412088303439701861276223604633558567764627336745961280610642776005138613302401878533379446915345894777059590410113889984912062860035824328058767770830635499365986426545626053871742726781579576661698935347782642826638517764629656401162949494019936997503541438671408674203828256765927057748243149564507873446898081334970215910625551173989980247849296500566544266049385474917269811742209433118652577338983780589022536745383996052286778799331309964998271563745506265338766138731312889621430294158348207588959187990480208729870548908711715148316008333707937595762814085972726372432465028037688889377242756718970150127693172694712037130408615262746970962800225318365911071787264027624223382514787226355925227344627444035462510279435109599022926011935886899327382416330405788893915234367075614116678022669898910858149864696268836157358267900125963154838068338149438578544881932753627012645837822498715241755379874088961506248381030277715905342791728112501365539637282263776056622611743477110846498616731861878735367298730018527360288709622290691075180142826325499373216230447310757139788930731955992746714505500628173890671571654317551679461660565419246331222439418060944510260138459026588819111927024154133727425520185519418838607090943086605147077950886759353143171056499800466973443496766109034530971380261385220934723870619774328334801014858410952736712294916623200956871402075440075878949321850271294403072879866215039675643767147001217615776579718530026772456665248187771979744842798282161150198033618703575666605929232684914160119400511759308085154360055709604241771150584175147056415656243487226943416289426420796189103259434525321591798405061156979311872959922943770989868287291259409390491449916458488316115048983482687223013032954731033806886649854158852220292485441351050150847116723994984320166755944637563885109549918706563765000480342032371371399192029616596825185647167078789285631490216495147105526950090417419723489924664 +5861855826839519394737732689822044409673369861297184560826182728433015724225757379764627916191281558095747847453208083259263561236089601606208007870573496337625662582416277491431196704950403437975492123662688266666932954667095951856471386698926777332713276275424297140950028046012112625713535055615601247710966057216661915355489124566727326296290303694666119370388448276936614397086826705213125406474582944971499081865178709963054250077092642076118425480564005079141241039327147278887914142106617603395527113285057847523815423801405920747148969868018109530507445644959026540059900535053156608969549335196378061133981830176418435480389501978104397591249972459980389995045323728330901672330448813842545266949421778150157584067139068940259382800437933640295039508106008728983786631986994893625464386408351613193377763621233647713257754546842265611795717206406644416215772321705420858160167540858543069991429330569008946601448823087938313596997840835287367267807544658604488508174576363680319238791554973990682013845452997351046263221783557442089654028549708653343536830440580494902814583288170806960635377038154627328958584914020426335112694727628467057139058415112096246387163019446720447197959500900804507973335147765030137810033861766353060133877754869880608653228548628784856436675576778185175064316728712917546946409581479378421173646159194698751226182851824619935605325846736407394962195122644154201894484891416552842297137603916549020835192986999342429962113169942304646197515900972445584789035868792047602328645197063816538458811824246253270231197282610742176995357573117275685130719085607195117412859582251902929526399556355405832782406609037643661178005883326578975671562611142321741755871766466570501632222338740909030996748169008443665721833122468037463736166149934873403843149177192230750207361002938101008907437200482833768887546695543019662642436412124236664328493049923261371604383850706884475839114187436898002747667783071043440917013720616820786163618970938493729277681465178240129602407940478248307314681629732087349358506010950038096209232162824261418726321019275175280056020575910788287530614926892182421166652074109400730097181912086680882191368088790401251646566211662697438908685727524366988220946893003670064463772777534273989610370272189452513960172577391261834120593806333109159152316269226486468682558969495656123828151972040788914392963534692247256791497716052752072991211983651550779697434925032146456419951426785277867601640615260038030344345170839554243991972045853431148105836726879732683690937599847325773174311251161130904043774536996605484832084472342863624238485996462289657116681562870895399793359389643580756556641703367565204963008874328597692799015082724286773946637031477186954424530197740601313600247600831662289136427809776223651486549632441532015693490488973508522466268417195866760200458539196157315171864925515433813517416835089605224384747679646379602437885018298038550837732605856853308995635124132938010252278842532025604359516764544009442753646222625981575906431099221857058127373579321217262798848169838744933777557639898542877543376080434141193273367638997016744784845432292127052887440492415949462186738985986463355339141144559671330924466925766070359248687918773104993943084697692396639149636925112862898817396380589741935373593341291654108933537752423653780725140908160497154871371677529615478211715559668354426493690572119228981724021232784117161396345691509433504678111757325431704621397873459153315386475850138713403989458956572184185660875523422590476592522405677814906006373640852617150349125372837663941741956073314180585283623176702016496905736450490547455288903535139420281440894462618398455764743870544966642728873821271318772761875029640506650792235194224055197255958725189407147301122075037549530179238883801441682615754418163027064106687290825490574235498075086347437415648230711041145876996575430963619760720240176018709534995643771833453896451700040539085148805016374318482895771261863631454581427925775096028405523979252152712095759705908041455414545866753266183939574901806245013480252663598135523383523186456829002211513970592778685266749363571144876236992626826705076203026400650473181167541664518843396363412587544683522980199940794118724462358284094058702172123397304959038417883493963580529681053709270275095912677622450624099732151991747930011765976530280951886523864091168324337246105860106147125215161718274942125983543335095589499113113874416301416409042364723601332910023266221751632497982728919878596357506434504253301517451734667973966207037297240121345279215526334180423730338488650100869461984386764402957102162822919007816314939109737763232100823256492402518706150830179013898774322958501022978718030171578496377748467257698941118626874420051704541817740327960635076476774629912994162208078913245517251749283765510878609601783871451830102059813762140791034027394587926506059508618560802819326533872 +-2451090911443961098601579602139532805927169691840698374276433672243663720321962478830517757995941316906409409175510710045808302350399107935415549449263034017566176674969186636625577348744296103124318169198552650425443888515607893345473420497104662073291473102295643562279980027092169944694188572483660542562397731793586193819835139114351921828990914058532377282506352283725502482372409162541476862930611462790510791569740473431270632546662854066708027513183024343853173110043956810520467668448461062098325492439897996482643277448229898324037290460992192830437571859084487845192236459785372727383340340289652376736991811017919399195710253721262492264850119500596625247708262564941295930537743614937470129687867677425730891377088279194216433120737691041423090825468987309179957831433398343750311420581766453766821849993953752356785502919994389310182389308660966447986399130466882243985530711625906264583238527421801022667002795039824662529496634875723450600109702906981712798833129167105847932189081564707952751296210959777179879879850177388761992144188796511904893701059045134934333411512354425441842142237002346894401574294067373179855612787206570466311984018031580491034777668210241955591649394347101386671640913797617002662265369913608509800545292562587922688006486504498398767385279416274736695410029067105672843747630278849944918638565647612378152977343449665083522656203302170541492915967914666160147793428368285536412046582898358141718219903967529081531815265508251236483456943848534072577118670379171599527404251382588187878364110581188377927053876228055421218580024985327944572126035386625969691245834619829270274120957510469429649139779891171842847193480041179857377262508311239786098255898045588523144059212456771098421946027441663189884304618099781426385889233085375263011970118262309824497425681972300491545614368153742282053453769007709853902240611287030259199319462864348503187405456297432797025511272211289081487765848658393124079869727214697001857149050382167278143290650208374196981511876367542560160344134352698357237407273463622164080570391448557793465595383750459645378222482841633953327347430801537313124252875255585223039787462615601562523197929842928598316813035314159449466453243322562529327422708933176794180269576069115905206910068993085457872892807925978630471865947192280875952321111409086382522023040310532807033406979851818050573821877744250385425037207697790897581044873773355456820011745323400896862736292397816954011877679135764110841337123877708453309905123296917864383647957246550441827389671201225567967167461131947804509253429913384340955712510190028487127144800650122437242623703639184005820871553169251403394617624280407411677845586547589818314617426583115622314600404913191617554286230064611036953287820568977471638560301003661937586862626508169664878613342897555779936024786731412267792910492323265597679875205513464105059861621757375740297176223254847625059009862820644102696640494940378088123007960973116480357561268553448994878116315886477958798209160241277100452279478425176823273083975229642268827733739273585104986378909221441038709649939072202808671206299769020631126517025903146173840078782311600984015435196446003603629269005748786074283731153051517449283599565042081452452234663898616950682111823285166800376302235642216998113968496975455681748266813138405615358048155237630972225320344106064836764469510845249622898115359073952494868780856833056164774078739977933299580337737794082399582920421724591736872562804482888110107738452025199331051874196714424275021696752816538875409882691783280127395705186050880912881489465189280256264412962753903130760781300173666267493235146097749207082865740693282560545787349833775929349743442672637629881028204577864544980476165707927989608699200970745628160968439191605530756064959591294707210588728584226050983617523062623438286450732463755599276429624900764094437668343106949703306490576016031216050209490453054363574109735052358589178595283314235448842376680515767187285705687125423460508702518736771695502120000060961030639965170620560104959580973837126422061660671158638457444745201340451256634461770851216843106565710224671240287191153698584635779521849841209718449132894606554624268705284245178696090613310115125336042092967180891257872002800217201927787452951277765490996301082077031496793305322080863670081255764935208881565291678456622182007238598781860613796029049076908486746838947714451882974968684109481256869938488558485532891206638053752205870792056445525698383161408513178381455276162878987847171603006991394922890841981423303943223914960424278232657146964043961690026931565309267624959355164865971917639148678423827841589768246256157546992694735453191365034381939728593895805580812156302990434092252190846000266617337029094356572436267061745962038224546464676380638162111814456331811922100730150937747678372973437397418128395793665340398410940215632345749556671599735450082047431456511998625356220699349925619100983578262911465737188683440905176406080265640131309706617653269322426237281230537065812243507058910743368321220363214215047172371608699174644294181827876779943947764145547781116133376014702616337470628178306218314986106612226302855225230803375895946492749921412541705964369002550028987001063886335776241749884616247953527128729612149264930844480140654669318888615972347611908469277492517339521326871428059238816432131384937583516560356908192679747330099243105689271833496477519402311387693568826858282498043432292352233995740444544953336705357006086651257503587750174605517289279513500621039810618341472265296922098832416095465318299221911214018350961803891203255646703578663664296563260145205225478858305798488014764678932653374784417168682604568081684347541987913453041119322433995207905197800381804967398218069710844610666692223330508083323129607450204190449581810706379727868735900937377781702024270463070118147452917300643043915209961848149213514855555909767956262542691401306154330478119014911913094919510011839707610303181372455179403402634383477367402021892501891251048569070324957543838794316433514609421545241791908687424417892943218950962356024638041554356625352678241711351355396801240395311823223975969438569069058789440359460430260998729623166937505529475332366224381300276487054985308493782115754007078807091287819349158544583308791790956752766819772189145056176999986186961113954292571414403729647684148186901194196619972012337197613096284885580324309286221334970088376821477575231810845092097657625870701043187560293813256896183822295631640387689165389813074510222270004704378877273977046509003708668193171070192342395938442105780356655055285508131395808863057552978888707367719271603040497161594154308971428759860461588650162406814600762401499310066735650764208432879177971205726446410688641954611646895814170014972020704787563251525789212570499807290520885469028479486768649976291177186638151236346973062935162228022487790614000712968517131071600915147157305863900768278214582797994471392729409706092819568530146300424485938239578066166693459922011430960849979599718367534352066048465679250880045790042821081282774155262854898408012170702608158288293224530492620129922275710322129999663316405349257297957042738504189929988207449246810783301308078027868490642517960048945733853770434626919722826979004747840351634081576055612266757238991835577424773371138819801392093432210901471887354356199595507767865921119038628864302266817756943232718932766083717346459519395129230446249767220211079427423276223666428114953922785517462332034191464982038831097655006488182159736831606125937042361556394676229930359701194398028906088981914259496404674484638327599751257966597900467011917294198554943373227342134487467869724513413796007021651627091494528837662292972591206663273188412035377020474604184722788466315777199145288344206354502244601018788720935271900970781004036284395068775165423150048434782054134993164106761542524272988798078852195536843528068365991714641947611007150675461094729629643235001373228373913126141133519590839863332000740785290875663496679654538879935822666887959579088864237911965898497501445026384073599135995857498758011584380833952694187202710365095651912263619435758579940102563359009634338838939714635857687060920881953991678363512851185566226726200974504843139703647297874925814265572686038873245222815377146932176921930989288476717791560947919100474987185956845784891506513716626029458066281339968642927044570533351431026315112623926796446819545045698396405765947448130522450206813472860660089051482394105504420824525203737268013055629046858469938182010498953116309948995484450234262028605235807016742716953775321737311739245660119529356544783103147850564579831808036458366219847150902742524956506991564529937383362171360409003451930895766901710071109970811414096632797870391131750517205217256886453796527973675432960062651201666689707468355797578747313425642927690947249714069074704116119397297895359730189317396841451339181005783447656037049807811867737304488021521932352542833591322567594368085344052979115968628031684284907838621737760940960700578233011016560569028375807530229955256449760789278557860831859836701850928893085969546661707906657963012487681706883970003647184279365107098974855790476298031944000834399410470954157016647781045379949267671751934077231142753564969578507078983346686232967203738953463179180701573379747201515910676959559307228951755406168814754201618820893589293120392514486081833991627017031140261462951956528999407431928878202709227383933117753967182939302983990525156068096291949872 +-1 diff --git a/testcases/test.py b/testcases/test.py new file mode 100644 index 0000000..2c029d1 --- /dev/null +++ b/testcases/test.py @@ -0,0 +1,21 @@ +import filecmp +import os +if os.path.exists("temp"): + os.system("rm -rf ./temp") +os.makedirs("temp") +for i in range(14): + inst ="./code < testData/test"+str(i)+".in > temp/test"+str(i)+".out" + print(inst) + os.system(inst) + if not filecmp.cmp("testData/test"+str(i)+".out","temp/test"+str(i)+".out"): + f = open("testData/test" + str(i) + ".in", mode='r') + title = f.readline()[1:] + print("test", i, "wrong:", title) +os.system("rm -rf ./temp") +os.makedirs("temp") +for i in range(20): + inst = "./code < BigIntegerTest/BigIntegerTest" + str(i) + ".in > temp/test" + str(i) + ".out" + print(inst) + os.system(inst) + if not filecmp.cmp("BigIntegerTest/BigIntegerTest" + str(i) + ".out", "temp/test" + str(i) + ".out"): + print("big integer test", i, "wrong")