diff --git a/index.html b/index.html index 6119100..efaa858 100644 --- a/index.html +++ b/index.html @@ -1,3 +1,19 @@ + diff --git a/main.js b/main.js index 4f22f6b..c286db6 100644 --- a/main.js +++ b/main.js @@ -1,3 +1,19 @@ +/* +Copyright (C) 2025 filifa + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ import { tokenize } from "./modules/lexer.js"; import { shunt } from "./modules/parser.js"; import { compute } from "./modules/compute.js"; diff --git a/modules/compute.js b/modules/compute.js index d038194..cda89d8 100644 --- a/modules/compute.js +++ b/modules/compute.js @@ -1,3 +1,19 @@ +/* +Copyright (C) 2025 filifa + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ import { modinv, modpow, modsqrt, ord } from "./math.js"; function binaryOpPop(stack) { diff --git a/modules/lexer.js b/modules/lexer.js index 45b383e..9e65f30 100644 --- a/modules/lexer.js +++ b/modules/lexer.js @@ -1,3 +1,19 @@ +/* +Copyright (C) 2025 filifa + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ function tokenize(expr) { // NOTE: not handling whitespace // NOTE: currently ends early if string doesn't match token diff --git a/modules/math.js b/modules/math.js index 150f5fd..8bb4ff2 100644 --- a/modules/math.js +++ b/modules/math.js @@ -1,3 +1,19 @@ +/* +Copyright (C) 2025 filifa + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ function xgcd(a, b) { let [old_r, r] = [a, b]; let [old_s, s] = [1n, 0n]; diff --git a/modules/parser.js b/modules/parser.js index 4c93a56..cc76fa5 100644 --- a/modules/parser.js +++ b/modules/parser.js @@ -1,3 +1,19 @@ +/* +Copyright (C) 2025 filifa + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ function isLeftAssociative(op) { return op === "+" || op === "-" || op === "*" || op === "/"; } diff --git a/styles.css b/styles.css index 16d8abd..b90a161 100644 --- a/styles.css +++ b/styles.css @@ -1,3 +1,19 @@ +/* +Copyright (C) 2025 filifa + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ #calculator { display: grid; grid-template-columns: repeat(4, 1fr);