From dc532fcd19eb6d654e0817564d5f8676c15c19a0 Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Wed, 19 Oct 2022 01:19:52 +0200 Subject: [PATCH] Forgot to add the parsing javascript module. --- .../LogarithmPlotter/js/parsing/README.md | 5 ++++ .../LogarithmPlotter/js/parsing/parsing.js | 28 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/README.md create mode 100644 LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/parsing.js diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/README.md b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/README.md new file mode 100644 index 0000000..a0ff7e7 --- /dev/null +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/README.md @@ -0,0 +1,5 @@ +# General information + +Here lies the potential new, abandoned, cleaner implementation of the parsing system that was supposed to replace expr-eval.js, but never came to be because it's unfinished. If somebody has the will to finish this, you're welcome to try, as I won't. + +Currently, the tokenizer is complete in use to provide tokens for the syntax highlighting. diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/parsing.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/parsing.js new file mode 100644 index 0000000..c1e1aaf --- /dev/null +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/parsing.js @@ -0,0 +1,28 @@ +/** + * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. + * Copyright (C) 2022 Ad5001 + * + * 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 . + */ + +.pragma library + +.import "reference.js" as Reference +.import "tokenizer.js" as TK +.import "common.js" as Common + +var Input = Common.InputExpression +var TokenType = TK.TokenType +var Token = TK.Token +var Tokenizer = TK.ExpressionTokenizer