diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c1eac3..65a8955 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to **antlr-calculator** are documented here. +## v2.1.0: +- The calculator now supports trailing comments in a formula, separated by a semicolon `;` at the end of the actual formula input. For example, `1 + 2; Hello World!` now just evaluates `1 + 2` and ignores everything after the semicolon `;` +- Add support for substitutions in formulas + ## v2.0.4: - The internal check for null or empty formulas was changed for better compatibility with Node diff --git a/README.md b/README.md index 2e037ef..eb49521 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # antlr-calculator -[![Build Status](https://jenkins.dangl.me/buildStatus/icon?job=antlr-calculator)](https://jenkins.dangl.me/buildStatus/icon?job=antlr-calculator) +[![Build Status](https://jenkins.dangl.me/buildStatus/icon?job=GeorgDangl%2Fantlr-calculator%2Fdevelop)](https://jenkins.dangl.me/job/GeorgDangl/job/antlr-calculator/job/develop/) [![npm](https://img.shields.io/npm/v/antlr-calculator.svg)](https://www.npmjs.com/package/antlr-calculator) This calculator is using the [ANTLR4 TypeScript target](https://github.com/tunnelvisionlabs/antlr4ts) @@ -17,6 +17,8 @@ Whenever a calculation is performed, a `CalculationResult` is returned with the [You can check out the live demo here!](https://antlr-calculator.dangl.me) +You can find the .NET version here: https://github.com/GeorgDangl/Dangl.Calculator + ## Installation Clone this repository or just go with `npm install antlr-calculator`. @@ -118,6 +120,36 @@ Comments in Formulas are supported by encapsulating them either in `/*...*/`, `' `4"Length"*3"Width"` resolves to `12` +## Substitutions + +The calculator can be called with an overload that accepts a callback function for substitution values. For example, take the following formula: +`1,2*#Z4+3` +Here, `#Z4` is a _substitution_, which is a placeholder that can be externally supplied. Let's say you want to resolve `#Z4` to the value three, you could make this simple call: + +```typescript +const formula = "1,2*#Z4+3"; +const result = Calculator.calculate(formula, substitution => +{ + if (substitution === "#Z4") + { + return 3; + } + + return null; +}); +``` + +The callback is in the form of a `(substitution: string) => number`, and it will be called for every substitution found in the formula. Multiple substitutions are supported. If duplicates in substitutions are present, the calculator will request each one individually. If a substitution resolves to `null`, the formula is considered invalid. + +Substitutions must always start with the `#` character and can then have the following characters: `[a-z] | [A-Z] | [äÄöÖüÜ] | [0-9]` + +## Trailing comments + +Formulas may be terminated with a semicolon `;` at the end, followed by extra input that is not evaluated. This is useful when, instead of regular comments, you +just want to attach some trailing formation at the end of a formula. For example, the following formula: +`1 + 3; As per our counting` +Would just evaluate the `1 + 3` portion and return a valid result with the value `4`, ignoring the trailing semicolon and all input that follows. + --- [MIT License](License.md) diff --git a/build/Build.cs b/build/Build.cs index 656917e..8d99cee 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -19,6 +19,7 @@ using static Nuke.Common.Tools.Slack.SlackTasks; using Nuke.Common.Tools.Slack; using System.IO; +using Nuke.Common.Tools.Teams; [UnsetVisualStudioEnvironmentVariables] class Build : NukeBuild @@ -31,8 +32,8 @@ class Build : NukeBuild public static int Main() => Execute(x => x.Clean); - [Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] - readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release; + [Parameter] readonly string Configuration = IsLocalBuild ? "Debug" : "Release"; + [GitVersion(Framework = "netcoreapp3.1")] readonly GitVersion GitVersion; [GitRepository] readonly GitRepository GitRepository; @@ -53,8 +54,32 @@ class Build : NukeBuild [KeyVaultSecret("AntlrCalculatorDemo-WebDeployUsername")] string WebDeployUsername; [KeyVaultSecret("AntlrCalculatorDemo-WebDeployPassword")] string WebDeployPassword; [KeyVaultSecret] string GitHubAuthenticationToken; + [KeyVaultSecret] readonly string DanglCiCdTeamsWebhookUrl; [Parameter] string AppServiceName = "antlr-calculator-demo"; + protected override void OnTargetFailed(string target) + { + if (IsServerBuild) + { + SendTeamsMessage("Build Failed", $"Target {target} failed for Dangl.Calculator, " + + $"Branch: {GitRepository.Branch}", true); + } + } + + void SendTeamsMessage(string title, string message, bool isError) + { + if (!string.IsNullOrWhiteSpace(DanglCiCdTeamsWebhookUrl)) + { + var themeColor = isError ? "f44336" : "00acc1"; + TeamsTasks + .SendTeamsMessage(m => m + .SetTitle(title) + .SetText(message) + .SetThemeColor(themeColor), + DanglCiCdTeamsWebhookUrl); + } + } + Target Clean => _ => _ .Executes(() => { @@ -75,6 +100,8 @@ class Build : NukeBuild Target Publish => _ => _ .DependsOn(Clean) + .OnlyWhenDynamic(() => Nuke.Common.CI.Jenkins.Jenkins.Instance == null + || Nuke.Common.CI.Jenkins.Jenkins.Instance.ChangeId == null) .Executes(() => { Npm("ci", RootDirectory); @@ -91,6 +118,12 @@ class Build : NukeBuild : "next"; Npm($"publish --tag={npmTag}", distDirectory); + + if (npmTag == "latest") + { + SendTeamsMessage("New Release", $"New release available for antlr-calculator: {GitVersion.NuGetVersion}", false); + } + }); Target DeployDemo => _ => _ @@ -99,6 +132,8 @@ class Build : NukeBuild .Requires(() => WebDeployPassword) .Requires(() => AppServiceName) .Requires(() => DanglCiCdSlackWebhookUrl) + .OnlyWhenDynamic(() => Nuke.Common.CI.Jenkins.Jenkins.Instance == null + || Nuke.Common.CI.Jenkins.Jenkins.Instance.ChangeId == null) .Executes(async () => { Npm("ci", RootDirectory); diff --git a/build/_build.csproj b/build/_build.csproj index 684b288..a72d746 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -10,9 +10,9 @@ - + - + diff --git a/package-lock.json b/package-lock.json index 1597644..4b044ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -359,6 +359,16 @@ "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", "dev": true }, + "@types/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", + "dev": true, + "requires": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, "@types/jasmine": { "version": "3.5.11", "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-3.5.11.tgz", @@ -371,6 +381,18 @@ "integrity": "sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ==", "dev": true }, + "@types/minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "dev": true + }, + "@types/node": { + "version": "14.14.22", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.22.tgz", + "integrity": "sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==", + "dev": true + }, "@webassemblyjs/ast": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", @@ -656,14 +678,14 @@ "dev": true }, "antlr4ts": { - "version": "0.5.0-alpha.3", - "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.3.tgz", - "integrity": "sha512-La89tKkGcHFIVuruv4Bm1esc3zLmES2NOTEwwNS1pudz+zx/0FNqQeUu9p48i9/QHKPVqjN87LB+q3buTg7oDQ==" + "version": "0.5.0-alpha.4", + "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", + "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==" }, "antlr4ts-cli": { - "version": "0.5.0-alpha.3", - "resolved": "https://registry.npmjs.org/antlr4ts-cli/-/antlr4ts-cli-0.5.0-alpha.3.tgz", - "integrity": "sha512-i6oyxfaXU6qnw4HgyeSIsOLlsvT7zU3vmenoJKFNVFP1QNodtJMZYpnyxc8TmOFpJs7fEoWanLavSSDEmcCZBQ==", + "version": "0.5.0-alpha.4", + "resolved": "https://registry.npmjs.org/antlr4ts-cli/-/antlr4ts-cli-0.5.0-alpha.4.tgz", + "integrity": "sha512-lVPVBTA2CVHRYILSKilL6Jd4hAumhSZZWA7UbQNQrmaSSj7dPmmYaN4bOmZG79cOy0lS00i4LY68JZZjZMWVrw==", "dev": true }, "anymatch": { @@ -798,6 +820,15 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } + }, "async-each": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", @@ -898,8 +929,7 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "resolved": "", "dev": true } } @@ -928,15 +958,6 @@ "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", "dev": true }, - "better-assert": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", - "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", - "dev": true, - "requires": { - "callsite": "1.0.0" - } - }, "big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", @@ -1323,11 +1344,15 @@ } } }, - "callsite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", - "dev": true + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } }, "chokidar": { "version": "3.4.1", @@ -1561,12 +1586,6 @@ "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=", "dev": true }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -1643,20 +1662,12 @@ "dev": true }, "compressible": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.17.tgz", - "integrity": "sha512-BGHeLCK1GV7j1bSmQQAi26X+GgWcTjLr/0tzSvMCl3LH1w1IJ4PFSPoV5316b30cneTziC+B1a+3OjoSUcQYmw==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", "dev": true, "requires": { - "mime-db": ">= 1.40.0 < 2" - }, - "dependencies": { - "mime-db": { - "version": "1.42.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.42.0.tgz", - "integrity": "sha512-UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ==", - "dev": true - } + "mime-db": ">= 1.43.0 < 2" } }, "compression": { @@ -1969,9 +1980,9 @@ "dev": true }, "deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.0.tgz", - "integrity": "sha512-ZbfWJq/wN1Z273o7mUSjILYqehAktR2NVoSrOukDkU9kg2v/Uv89yU4Cvz8seJeAmtN5oqiefKq8FPuXOboqLw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", "dev": true, "requires": { "is-arguments": "^1.0.4", @@ -1983,12 +1994,12 @@ } }, "default-gateway": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-2.7.2.tgz", - "integrity": "sha512-lAc4i9QJR0YHSDFdzeBQKfZ1SRDG3hsJNEkrpcZa8QhBfidLAilT60BDEIVUUGqosFp425KOgB3uYqcnQrWafQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz", + "integrity": "sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA==", "dev": true, "requires": { - "execa": "^0.10.0", + "execa": "^1.0.0", "ip-regex": "^2.1.0" } }, @@ -2056,25 +2067,51 @@ "dev": true }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true } } }, "del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", - "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", + "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==", "dev": true, "requires": { + "@types/glob": "^7.1.1", "globby": "^6.1.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "p-map": "^1.1.1", - "pify": "^3.0.0", - "rimraf": "^2.2.8" + "is-path-cwd": "^2.0.0", + "is-path-in-cwd": "^2.0.0", + "p-map": "^2.0.0", + "pify": "^4.0.1", + "rimraf": "^2.6.3" + }, + "dependencies": { + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } } }, "depd": { @@ -2253,88 +2290,6 @@ "once": "^1.4.0" } }, - "engine.io": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.4.2.tgz", - "integrity": "sha512-b4Q85dFkGw+TqgytGPrGgACRUhsdKc9S9ErRAXpPGy/CXKs4tYoHDkvIRdsseAF7NjfVwjRFIn6KTnbw7LwJZg==", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "base64id": "2.0.0", - "cookie": "0.3.1", - "debug": "~4.1.0", - "engine.io-parser": "~2.2.0", - "ws": "^7.1.2" - }, - "dependencies": { - "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", - "dev": true - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, - "engine.io-client": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.4.3.tgz", - "integrity": "sha512-0NGY+9hioejTEJCaSJZfWZLk4FPI9dN+1H1C4+wj2iuFba47UgZbJzfWs4aNFajnX/qAaYKbe2lLTfEEWzCmcw==", - "dev": true, - "requires": { - "component-emitter": "~1.3.0", - "component-inherit": "0.0.3", - "debug": "~4.1.0", - "engine.io-parser": "~2.2.0", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "ws": "~6.1.0", - "xmlhttprequest-ssl": "~1.5.4", - "yeast": "0.1.2" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "ws": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.4.tgz", - "integrity": "sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } - } - } - }, "engine.io-parser": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.0.tgz", @@ -2511,13 +2466,13 @@ } }, "execa": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", - "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", "dev": true, "requires": { "cross-spawn": "^6.0.0", - "get-stream": "^3.0.0", + "get-stream": "^4.0.0", "is-stream": "^1.1.0", "npm-run-path": "^2.0.0", "p-finally": "^1.0.0", @@ -2713,8 +2668,7 @@ }, "kind-of": { "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "resolved": "", "dev": true } } @@ -2732,9 +2686,9 @@ "dev": true }, "faye-websocket": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", - "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz", + "integrity": "sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA==", "dev": true, "requires": { "websocket-driver": ">=0.5.1" @@ -3222,12 +3176,6 @@ "dev": true, "optional": true }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, @@ -3574,9 +3522,9 @@ } }, "function-bind": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", - "integrity": "sha1-FhdnFMgBeY5Ojyz391KUZ7tKV3E=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, "gensync": { @@ -3585,17 +3533,25 @@ "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", "dev": true }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true + "get-intrinsic": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.2.tgz", + "integrity": "sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } }, "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } }, "get-value": { "version": "2.0.6", @@ -3647,12 +3603,6 @@ "which": "^1.3.1" } }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -3701,12 +3651,6 @@ "pinkie-promise": "^2.0.0" }, "dependencies": { - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", @@ -3722,18 +3666,18 @@ "dev": true }, "handle-thing": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.0.tgz", - "integrity": "sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", + "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", "dev": true }, "has": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", - "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { - "function-bind": "^1.0.2" + "function-bind": "^1.1.1" } }, "has-binary2": { @@ -3919,9 +3863,9 @@ } }, "html-entities": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", - "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz", + "integrity": "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==", "dev": true }, "html-escaper": { @@ -3950,9 +3894,9 @@ } }, "http-parser-js": { - "version": "0.4.10", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.10.tgz", - "integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.3.tgz", + "integrity": "sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg==", "dev": true }, "http-proxy": { @@ -3967,315 +3911,15 @@ } }, "http-proxy-middleware": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz", - "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz", + "integrity": "sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==", "dev": true, "requires": { - "http-proxy": "^1.16.2", + "http-proxy": "^1.17.0", "is-glob": "^4.0.0", - "lodash": "^4.17.5", - "micromatch": "^3.1.9" - }, - "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - } + "lodash": "^4.17.11", + "micromatch": "^3.1.10" } }, "https-browserify": { @@ -4356,9 +4000,9 @@ "dev": true }, "ini": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", - "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", + "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", "dev": true }, "inline-source-map": { @@ -4371,13 +4015,13 @@ } }, "internal-ip": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-3.0.1.tgz", - "integrity": "sha512-NXXgESC2nNVtU+pqmC9e6R8B1GpKxzsAQhffvh5AL79qKnodd+L7tnEQmTiUAVngqLalPbSqRA7XGIEL5nCd0Q==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz", + "integrity": "sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg==", "dev": true, "requires": { - "default-gateway": "^2.6.0", - "ipaddr.js": "^1.5.2" + "default-gateway": "^4.2.0", + "ipaddr.js": "^1.9.0" } }, "interpret": { @@ -4386,12 +4030,6 @@ "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, "ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", @@ -4405,9 +4043,15 @@ "dev": true }, "ipaddr.js": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", - "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true + }, + "is-absolute-url": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", + "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==", "dev": true }, "is-accessor-descriptor": { @@ -4492,15 +4136,6 @@ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, "is-generator-function": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.7.tgz", @@ -4535,27 +4170,27 @@ } }, "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", "dev": true }, "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz", + "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==", "dev": true, "requires": { - "is-path-inside": "^1.0.0" + "is-path-inside": "^2.1.0" } }, "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz", + "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==", "dev": true, "requires": { - "path-is-inside": "^1.0.1" + "path-is-inside": "^1.0.2" } }, "is-plain-object": { @@ -4576,12 +4211,12 @@ } }, "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", + "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", "dev": true, "requires": { - "has": "^1.0.1" + "has-symbols": "^1.0.1" } }, "is-stream": { @@ -5663,15 +5298,6 @@ "is-buffer": "^1.1.5" } }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, "loader-runner": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", @@ -5742,9 +5368,9 @@ } }, "loglevel": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.4.tgz", - "integrity": "sha512-p0b6mOGKcGa+7nnmKbpzR6qloPbrgLcnio++E+14Vo/XffOGwZtRpUhr8dTH/x2oCMmEoIU0Zwm3ZauhvYD17g==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.7.1.tgz", + "integrity": "sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw==", "dev": true }, "lru-cache": { @@ -5773,15 +5399,6 @@ } } }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", @@ -5822,17 +5439,6 @@ "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", "dev": true }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, "memory-fs": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", @@ -5929,12 +5535,21 @@ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "dev": true }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "mime-db": { + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", + "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==", "dev": true }, + "mime-types": { + "version": "2.1.28", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz", + "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==", + "dev": true, + "requires": { + "mime-db": "1.45.0" + } + }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -5957,9 +5572,9 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, "minipass": { @@ -6048,20 +5663,12 @@ } }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "dev": true, "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } + "minimist": "^1.2.5" } }, "move-concurrently": { @@ -6157,9 +5764,9 @@ "dev": true }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, "object.pick": { @@ -6192,9 +5799,9 @@ "dev": true }, "node-forge": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz", - "integrity": "sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==", "dev": true }, "node-libs-browser": { @@ -6232,8 +5839,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "optional": true + "dev": true }, "npm-run-path": { "version": "2.0.2", @@ -6244,16 +5850,10 @@ "path-key": "^2.0.0" } }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "object-component": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", - "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, "object-copy": { @@ -6387,61 +5987,12 @@ "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", "dev": true }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - }, - "dependencies": { - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - } - } - }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", "dev": true }, - "p-is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", - "dev": true - }, "p-limit": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", @@ -6461,11 +6012,20 @@ } }, "p-map": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", "dev": true }, + "p-retry": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-3.0.1.tgz", + "integrity": "sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w==", + "dev": true, + "requires": { + "retry": "^0.12.0" + } + }, "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -6534,24 +6094,6 @@ "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", "dev": true }, - "parseqs": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", - "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } - }, - "parseuri": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", - "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } - }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -6654,9 +6196,9 @@ "dev": true }, "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true }, "pinkie": { @@ -6684,38 +6226,29 @@ } }, "portfinder": { - "version": "1.0.25", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.25.tgz", - "integrity": "sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg==", + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", + "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", "dev": true, "requires": { "async": "^2.6.2", "debug": "^3.1.1", - "mkdirp": "^0.5.1" + "mkdirp": "^0.5.5" }, "dependencies": { - "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - }, "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { "ms": "^2.1.1" } }, "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true } } @@ -6745,13 +6278,13 @@ "dev": true }, "proxy-addr": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", - "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", "dev": true, "requires": { "forwarded": "~0.1.2", - "ipaddr.js": "1.9.0" + "ipaddr.js": "1.9.1" } }, "prr": { @@ -6852,9 +6385,9 @@ "dev": true }, "querystringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz", - "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", "dev": true }, "randombytes": { @@ -6938,12 +6471,13 @@ } }, "regexp.prototype.flags": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz", - "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", + "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==", "dev": true, "requires": { - "define-properties": "^1.1.2" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" } }, "remove-trailing-separator": { @@ -6970,12 +6504,6 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -7044,6 +6572,12 @@ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, + "retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", + "dev": true + }, "rfdc": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.1.4.tgz", @@ -7107,12 +6641,12 @@ "dev": true }, "selfsigned": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.7.tgz", - "integrity": "sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA==", + "version": "1.10.8", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.8.tgz", + "integrity": "sha512-2P4PtieJeEwVgTU9QEcwIRDQ/mXJLX8/+I3ur+Pg16nS8oNbrGxEso9NyYWy8NAmXiNl4dlAp5MwoNeCWzON4w==", "dev": true, "requires": { - "node-forge": "0.9.0" + "node-forge": "^0.10.0" } }, "semver": { @@ -7186,21 +6720,6 @@ "statuses": ">= 1.4.0 < 2" } }, - "mime-db": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", - "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==", - "dev": true - }, - "mime-types": { - "version": "2.1.24", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", - "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", - "dev": true, - "requires": { - "mime-db": "1.40.0" - } - }, "setprototypeof": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", @@ -7278,9 +6797,9 @@ "dev": true }, "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", "dev": true }, "snapdragon": { @@ -7376,8 +6895,7 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "resolved": "", "dev": true } } @@ -7392,19 +6910,25 @@ } }, "socket.io": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.3.0.tgz", - "integrity": "sha512-2A892lrj0GcgR/9Qk81EaY2gYhCBxurV0PfmmESO6p27QPrUK1J3zdns+5QPqvUYK2q657nSj0guoIil9+7eFg==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.4.1.tgz", + "integrity": "sha512-Si18v0mMXGAqLqCVpTxBa8MGqriHGQh8ccEOhmsmNS3thNCGBwO8WGrwMibANsWtQQ5NStdZwHqZR3naJVFc3w==", "dev": true, "requires": { "debug": "~4.1.0", - "engine.io": "~3.4.0", + "engine.io": "~3.5.0", "has-binary2": "~1.0.2", "socket.io-adapter": "~1.1.0", - "socket.io-client": "2.3.0", + "socket.io-client": "2.4.0", "socket.io-parser": "~3.4.0" }, "dependencies": { + "cookie": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", + "dev": true + }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -7414,55 +6938,54 @@ "ms": "^2.1.1" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, - "socket.io-adapter": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz", - "integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==", - "dev": true - }, - "socket.io-client": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.3.0.tgz", - "integrity": "sha512-cEQQf24gET3rfhxZ2jJ5xzAOo/xhZwK+mOqtGRg5IowZsMgwvHwnf/mCRapAAkadhM26y+iydgwsXGObBB5ZdA==", - "dev": true, - "requires": { - "backo2": "1.0.2", - "base64-arraybuffer": "0.1.5", - "component-bind": "1.0.0", - "component-emitter": "1.2.1", - "debug": "~4.1.0", - "engine.io-client": "~3.4.0", - "has-binary2": "~1.0.2", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "object-component": "0.0.3", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "socket.io-parser": "~3.3.0", - "to-array": "0.1.4" - }, - "dependencies": { - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true + "engine.io": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.5.0.tgz", + "integrity": "sha512-21HlvPUKaitDGE4GXNtQ7PLP0Sz4aWLddMPw2VTyFz1FVZqu/kZsJUO8WNpKuE/OCL7nkfRaOui2ZCJloGznGA==", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "base64id": "2.0.0", + "cookie": "~0.4.1", + "debug": "~4.1.0", + "engine.io-parser": "~2.2.0", + "ws": "~7.4.2" + } }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "engine.io-client": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.5.0.tgz", + "integrity": "sha512-12wPRfMrugVw/DNyJk34GQ5vIVArEcVMXWugQGGuw2XxUSztFNmJggZmv8IZlLyEdnpO1QB9LkcjeWewO2vxtA==", "dev": true, "requires": { - "ms": "^2.1.1" + "component-emitter": "~1.3.0", + "component-inherit": "0.0.3", + "debug": "~3.1.0", + "engine.io-parser": "~2.2.0", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parseqs": "0.0.6", + "parseuri": "0.0.6", + "ws": "~7.4.2", + "xmlhttprequest-ssl": "~1.5.4", + "yeast": "0.1.2" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } } }, "isarray": { @@ -7472,20 +6995,40 @@ "dev": true }, "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "parseqs": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz", + "integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==", + "dev": true + }, + "parseuri": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.6.tgz", + "integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==", "dev": true }, - "socket.io-parser": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.0.tgz", - "integrity": "sha512-hczmV6bDgdaEbVqhAeVMM/jfUfzuEZHsQg6eOmLgJht6G3mPKMxYm75w2+qhAQZ+4X+1+ATZ+QFKeOZD5riHng==", + "socket.io-client": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.4.0.tgz", + "integrity": "sha512-M6xhnKQHuuZd4Ba9vltCLT9oa+YvTsP8j9NcEiLElfIg8KeYPyhWOes6x4t+LTAC8enQbE/995AdTem2uNyKKQ==", "dev": true, "requires": { - "component-emitter": "1.2.1", + "backo2": "1.0.2", + "component-bind": "1.0.0", + "component-emitter": "~1.3.0", "debug": "~3.1.0", - "isarray": "2.0.1" + "engine.io-client": "~3.5.0", + "has-binary2": "~1.0.2", + "indexof": "0.0.1", + "parseqs": "0.0.6", + "parseuri": "0.0.6", + "socket.io-parser": "~3.3.0", + "to-array": "0.1.4" }, "dependencies": { "debug": { @@ -7502,11 +7045,34 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true + }, + "socket.io-parser": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.2.tgz", + "integrity": "sha512-FJvDBuOALxdCI9qwRrO/Rfp9yfndRtc1jSgVgV8FDraihmSP/MLGD5PEuJrNfjALvcQ+vMDM/33AWOYP/JSjDg==", + "dev": true, + "requires": { + "component-emitter": "~1.3.0", + "debug": "~3.1.0", + "isarray": "2.0.1" + } } } + }, + "ws": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.2.tgz", + "integrity": "sha512-T4tewALS3+qsrpGI/8dqNMLIVdq/g/85U98HPMa6F0m6xTbvhXU6RCQLqPH3+SlomNV/LdY6RXEbBpMH6EOJnA==", + "dev": true } } }, + "socket.io-adapter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz", + "integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==", + "dev": true + }, "socket.io-parser": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.4.1.tgz", @@ -7548,59 +7114,49 @@ } }, "sockjs": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz", - "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==", + "version": "0.3.21", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.21.tgz", + "integrity": "sha512-DhbPFGpxjc6Z3I+uX07Id5ZO2XwYsWOrYjaSeieES78cq+JaJvVe5q/m1uvjIQhXinhIeCFRH6JgXe+mvVMyXw==", "dev": true, "requires": { - "faye-websocket": "^0.10.0", - "uuid": "^3.0.1" - }, - "dependencies": { - "uuid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", - "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==", - "dev": true - } + "faye-websocket": "^0.11.3", + "uuid": "^3.4.0", + "websocket-driver": "^0.7.4" } }, "sockjs-client": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.3.0.tgz", - "integrity": "sha512-R9jxEzhnnrdxLCNln0xg5uGHqMnkhPSTzUZH2eXcR03S/On9Yvoq2wyUZILRUhZCNVu2PmwWVoyuiPz8th8zbg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.5.0.tgz", + "integrity": "sha512-8Dt3BDi4FYNrCFGTL/HtwVzkARrENdwOUf1ZoW/9p3M8lZdFT35jVdrHza+qgxuG9H3/shR4cuX/X9umUrjP8Q==", "dev": true, "requires": { - "debug": "^3.2.5", + "debug": "^3.2.6", "eventsource": "^1.0.7", - "faye-websocket": "~0.11.1", - "inherits": "^2.0.3", - "json3": "^3.3.2", - "url-parse": "^1.4.3" + "faye-websocket": "^0.11.3", + "inherits": "^2.0.4", + "json3": "^3.3.3", + "url-parse": "^1.4.7" }, "dependencies": { "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { "ms": "^2.1.1" } }, - "faye-websocket": { - "version": "0.11.3", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz", - "integrity": "sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA==", - "dev": true, - "requires": { - "websocket-driver": ">=0.5.1" - } + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true } } @@ -7655,9 +7211,9 @@ "dev": true }, "spdy": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.1.tgz", - "integrity": "sha512-HeZS3PBdMA+sZSu0qwpCxl3DeALD5ASx8pAX0jZdKXSpPWbQ6SYGnlg3BBmYLx5LtiZrmkAZfErCm2oECBcioA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", + "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", "dev": true, "requires": { "debug": "^4.1.0", @@ -7668,12 +7224,12 @@ }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "ms": { @@ -7699,12 +7255,12 @@ }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "ms": { @@ -7714,9 +7270,9 @@ "dev": true }, "readable-stream": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", - "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -7725,9 +7281,9 @@ } }, "safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, "string_decoder": { @@ -7891,17 +7447,6 @@ } } }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, "string.prototype.trimend": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", @@ -8376,9 +7921,9 @@ "dev": true }, "typescript": { - "version": "3.9.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.6.tgz", - "integrity": "sha512-Pspx3oKAPJtjNwE92YS05HQoY7z2SFyOpHo9MqJor3BXAGNaPUs83CuVp9VISFkSjyRfiTpmKuAYGJB7S7hOxw==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz", + "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==", "dev": true }, "ua-parser-js": { @@ -8559,6 +8104,12 @@ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", "dev": true }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, "v8-compile-cache": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", @@ -9101,14 +8652,15 @@ } }, "webpack-dev-middleware": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.4.0.tgz", - "integrity": "sha512-Q9Iyc0X9dP9bAsYskAVJ/hmIZZQwf/3Sy4xCAZgL5cUkjZmUZLt4l5HpbST/Pdgjn3u6pE7u5OdGd1apgzRujA==", + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.3.tgz", + "integrity": "sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ==", "dev": true, "requires": { - "memory-fs": "~0.4.1", - "mime": "^2.3.1", - "range-parser": "^1.0.3", + "memory-fs": "^0.4.1", + "mime": "^2.4.4", + "mkdirp": "^0.5.1", + "range-parser": "^1.2.1", "webpack-log": "^2.0.0" }, "dependencies": { @@ -9123,57 +8675,54 @@ } }, "mime": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", - "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.0.tgz", + "integrity": "sha512-ft3WayFSFUVBuJj7BMLKAQcSlItKtfjsKDDsii3rqFDAZ7t11zRe8ASw/GlmivGwVUYtwkQrxiGGpL6gFvB0ag==", "dev": true } } }, "webpack-dev-server": { - "version": "3.1.11", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.11.tgz", - "integrity": "sha512-E/uGbO9ndXrXgNUzw+O2UrrvYY/eIw10fpJnbvJf8VOH/NWZuY3nUG7arbgB/kbkORlF/sPHxnv10tKFtKf3aA==", + "version": "3.11.2", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.11.2.tgz", + "integrity": "sha512-A80BkuHRQfCiNtGBS1EMf2ChTUs0x+B3wGDFmOeT4rmJOHhHTCH2naNxIHhmkr0/UillP4U3yeIyv1pNp+QDLQ==", "dev": true, "requires": { "ansi-html": "0.0.7", "bonjour": "^3.5.0", - "chokidar": "^2.0.0", - "compression": "^1.5.2", - "connect-history-api-fallback": "^1.3.0", - "debug": "^3.1.0", - "del": "^3.0.0", - "express": "^4.16.2", - "html-entities": "^1.2.0", - "http-proxy-middleware": "~0.18.0", + "chokidar": "^2.1.8", + "compression": "^1.7.4", + "connect-history-api-fallback": "^1.6.0", + "debug": "^4.1.1", + "del": "^4.1.1", + "express": "^4.17.1", + "html-entities": "^1.3.1", + "http-proxy-middleware": "0.19.1", "import-local": "^2.0.0", - "internal-ip": "^3.0.1", + "internal-ip": "^4.3.0", "ip": "^1.1.5", - "killable": "^1.0.0", - "loglevel": "^1.4.1", - "opn": "^5.1.0", - "portfinder": "^1.0.9", + "is-absolute-url": "^3.0.3", + "killable": "^1.0.1", + "loglevel": "^1.6.8", + "opn": "^5.5.0", + "p-retry": "^3.0.1", + "portfinder": "^1.0.26", "schema-utils": "^1.0.0", - "selfsigned": "^1.9.1", - "semver": "^5.6.0", - "serve-index": "^1.7.2", - "sockjs": "0.3.19", - "sockjs-client": "1.3.0", - "spdy": "^4.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^5.1.0", + "selfsigned": "^1.10.8", + "semver": "^6.3.0", + "serve-index": "^1.9.1", + "sockjs": "^0.3.21", + "sockjs-client": "^1.5.0", + "spdy": "^4.0.2", + "strip-ansi": "^3.0.1", + "supports-color": "^6.1.0", "url": "^0.11.0", - "webpack-dev-middleware": "3.4.0", + "webpack-dev-middleware": "^3.7.2", "webpack-log": "^2.0.0", - "yargs": "12.0.2" + "ws": "^6.2.1", + "yargs": "^13.3.2" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, "anymatch": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", @@ -9195,47 +8744,6 @@ } } }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, "chokidar": { "version": "2.1.8", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", @@ -9256,212 +8764,13 @@ "upath": "^1.1.1" } }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, - "decamelize": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-2.0.0.tgz", - "integrity": "sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg==", - "dev": true, - "requires": { - "xregexp": "4.0.0" - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "ms": "2.1.2" } }, "glob-parent": { @@ -9485,130 +8794,12 @@ } } }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, "readdirp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", @@ -9621,60 +8812,10 @@ } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "yargs": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.2.tgz", - "integrity": "sha512-e7SkEx6N6SIZ5c5H22RTZae61qtn3PYUE8JYbBFlK9sYmh3DMQ6E5ygtaG/2BW0JZi4WGgTR2IV5ChqlqrDGVQ==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^2.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^10.1.0" - } } } }, @@ -9686,14 +8827,6 @@ "requires": { "ansi-colors": "^3.0.0", "uuid": "^3.3.2" - }, - "dependencies": { - "uuid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", - "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==", - "dev": true - } } }, "webpack-sources": { @@ -9715,12 +8848,12 @@ } }, "websocket-driver": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.3.tgz", - "integrity": "sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg==", + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", "dev": true, "requires": { - "http-parser-js": ">=0.4.0 <0.4.11", + "http-parser-js": ">=0.5.1", "safe-buffer": ">=5.1.0", "websocket-extensions": ">=0.1.1" } @@ -9794,16 +8927,6 @@ } } }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -9811,10 +8934,13 @@ "dev": true }, "ws": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz", - "integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==", - "dev": true + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz", + "integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==", + "dev": true, + "requires": { + "async-limiter": "~1.0.0" + } }, "xmlbuilder": { "version": "12.0.0", @@ -9828,12 +8954,6 @@ "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=", "dev": true }, - "xregexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.0.0.tgz", - "integrity": "sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg==", - "dev": true - }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", @@ -9938,23 +9058,6 @@ } } }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - } - } - }, "yeast": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", diff --git a/package.json b/package.json index a5e7e11..6c3c0b4 100644 --- a/package.json +++ b/package.json @@ -15,24 +15,24 @@ "antlr4ts": "antlr4ts -visitor -o ./src/GeneratedAntlr ./src/Calculator.g4" }, "dependencies": { - "antlr4ts": "0.5.0-alpha.3" + "antlr4ts": "0.5.0-alpha.4" }, "devDependencies": { - "antlr4ts-cli": "0.5.0-alpha.3", - "webpack": "^4.43.0", - "webpack-dev-server": "3.1.11", - "ts-loader": "8.0.1", - "typescript": "3.9.6", + "@types/jasmine": "3.5.11", + "antlr4ts-cli": "0.5.0-alpha.4", "karma": "~5.0.0", - "karma-jasmine": "~3.3.0", "karma-chrome-launcher": "~3.1.0", - "karma-jasmine-html-reporter": "^1.5.0", "karma-coverage-istanbul-reporter": "~3.0.2", + "karma-html-reporter": "0.2.7", + "karma-jasmine": "~3.3.0", + "karma-jasmine-html-reporter": "^1.5.0", "karma-junit-reporter": "~2.0.1", "karma-typescript": "5.0.3", - "@types/jasmine": "3.5.11", - "karma-html-reporter": "0.2.7", + "terser-webpack-plugin": "3.0.6", + "ts-loader": "8.0.1", + "typescript": "4.1.3", + "webpack": "^4.43.0", "webpack-cli": "3.3.12", - "terser-webpack-plugin": "3.0.6" + "webpack-dev-server": "^3.11.2" } } diff --git a/src/Calculator.g4 b/src/Calculator.g4 index d5975bf..ddf3692 100644 --- a/src/Calculator.g4 +++ b/src/Calculator.g4 @@ -18,7 +18,7 @@ grammar Calculator; */ // Main entry for the calculator -calculator : expression '='? compileUnit; +calculator : expression '='? trailingComment? compileUnit; // Possible expression types expression : SUB expression #Unary // Unary minus sign (negative numbers) @@ -63,10 +63,12 @@ expression : SUB expression #Unary / | NUMBER #Number // Single integer or float number | PI '()'? #Pi // Mathematical constant pi = 3,141593 | EULER #Euler // Mathematical constant e = 2,718282 + | SUBSTITUTION #Substitution ; // End of file -compileUnit : EOF; +trailingComment: SEMICOLON .*? ; +compileUnit : EOF ; /* * Lexer Rules @@ -117,9 +119,11 @@ RAD : [Rr][Aa][Dd] ; DEG : [Dd][Ee][Gg] ; WS : (' '|'\t'|'\r'|'\n') -> skip ; COM : COMMENT -> skip ; +SUBSTITUTION: '#' ([a-z] | [A-Z] | [äÄöÖüÜ] | [0-9])+ ; +SEMICOLON : ';' ; INVALID : . ; fragment COMMENT : '/*' .*? '*/' | '\'' .*? '\'' | '"'.*?'"' - ; \ No newline at end of file + ; diff --git a/src/Calculator.spec.ts b/src/Calculator.spec.ts index b2111d8..ddf9f10 100644 --- a/src/Calculator.spec.ts +++ b/src/Calculator.spec.ts @@ -460,8 +460,7 @@ describe('Calculator', () => { expectations = { formula: 'sqrt(4)', - expectedResult: - 2 + expectedResult: 2 }; }); @@ -578,8 +577,7 @@ describe('Calculator', afterEach(() => { // Common code used in all tests expect(expectations).not.toBeNull(); - if (expectations !== null) - { + if (expectations !== null) { var calculationResult = Calculator.calculate(expectations.formula); expect(calculationResult.result).toBeNaN(); expect(calculationResult.isValid).toBeFalsy(); @@ -635,4 +633,298 @@ describe('Calculator', }; }); }); + + describe('with division by zero', () => { + it('test 01', () => { + const formula = '1/0'; + var calculationResult = Calculator.calculate(formula); + expect(calculationResult.result).toBeNaN() + expect(calculationResult.isValid).toBeFalse(); + }); + + it('test 02', () => { + const formula = '-1/0'; + var calculationResult = Calculator.calculate(formula); + expect(calculationResult.result).toBeNaN() + expect(calculationResult.isValid).toBeFalse(); + }); + + it('test 03', () => { + const formula = 'floor(1/0)'; + var calculationResult = Calculator.calculate(formula); + expect(calculationResult.result).toBeNaN() + expect(calculationResult.isValid).toBeFalse(); + }); + }); + + describe('with substitutions', () => { + + it('ErrorWhenSubstitutionCanNotBeResolved_NoneGiven', () => { + const formula = "1+#1"; + const result = Calculator.calculate(formula); + + expect(result.isValid).toBeFalse(); + expect(result.result).toBeNaN(); + expect(result.errorPosition).toBe(2); + expect(result.errorMessage).toContain('#1'); + }); + + it('ErrorWhenSubstitutionCanNotBeResolved_ReturnsNull', () => { + const formula = "1+#1"; + const result = Calculator.calculate(formula, _ => null); + + console.log(result); + + expect(result.isValid).toBeFalse(); + expect(result.result).toBeNaN(); + expect(result.errorPosition).toBe(2); + expect(result.errorMessage).toContain('#1'); + }); + + it('CanCalculateSubstitution', () => { + const formula = "1+#Z"; + const result = Calculator.calculate(formula, _ => 3); + + expect(result.isValid).toBeTrue(); + expect(result.result).toBe(4); + }); + + it('CanCalculateSubstitution_02', () => { + const formula = "1+#Z4+4"; + const result = Calculator.calculate(formula, _ => 3); + + expect(result.isValid).toBeTrue(); + expect(result.result).toBe(8); + }); + + it('CanCalculateMultipleSubstitutions', () => { + const formula = "#first + #second * #third"; + const result = Calculator.calculate(formula, _ => 3); + + expect(result.isValid).toBeTrue(); + expect(result.result).toBe(12); + }); + + it('CanSubstituteCustomValues', () => { + const formula = "#first + #second * #third"; + const result = Calculator.calculate(formula, substitution => { + switch (substitution) { + case "#first": + return 2; + case "#second": + return 3; + case "#third": + return 4; + default: + throw new Error(); + } + }); + + expect(result.isValid).toBeTrue(); + expect(result.result).toBe(14); + }); + + it('CanSubstituteComplex', () => { + const formula = "log10*pi/#12d*e"; + const result = Calculator.calculate(formula, _ => 3); + + expect(result.isValid).toBeTrue(); + expect(result.result).toBeCloseTo(2.846578, 5); + }); + + it('ReportsCorrectSubstitution', () => { + const formula = "1+2+#3+4"; + let reportedSubstitution = ''; + const result = Calculator.calculate(formula, subs => { + reportedSubstitution = subs; + return null; + }); + expect(reportedSubstitution).toBe("#3"); + }); + + it('IgnoresSubstitutionLikeInComment_DoubleQuotes', () => { + const formula = "1+2+\"#3+\"4"; + const actual = Calculator.calculate(formula); + expect(actual.result).toBe(7); + expect(actual.isValid).toBeTrue(); + }); + + it('IgnoresSubstitutionLikeInComment_SingleQuotes', () => { + const formula = "1+2+'#3+'4"; + const actual = Calculator.calculate(formula); + expect(actual.result).toBe(7); + expect(actual.isValid).toBeTrue(); + }); + + it('IgnoresSubstitutionLikeInComment_CStyle', () => { + const formula = "1+2+/*#3+*/4"; + const actual = Calculator.calculate(formula); + expect(actual.result).toBe(7); + expect(actual.isValid).toBeTrue(); + }); + }); + + describe('with trailing comments after semicolon', () => { + var expectations: { formula: string, expectedResult: number | null, shouldBeSuccess: boolean; }; + + beforeEach(() => { + expectations = null; + }); + + afterEach(() => { + // Common code used in all tests + expect(expectations).not.toBeNull(); + if (expectations !== null) { + var calculationResult = Calculator.calculate(expectations.formula); + if (expectations.expectedResult != null) { + expect(calculationResult.result).toBe(expectations.expectedResult); + } + expect(calculationResult.isValid).toBe(expectations.shouldBeSuccess); + } + }); + + it('CalculatesCorrectly_WithoutExtraText', () => { + expectations = { + formula: "1+1;", + expectedResult: 2, + shouldBeSuccess: true + }; + }); + + it('CalculatesCorrectly_WithSingleLetterExtraText', () => { + expectations = { + formula: "1+1;a", + expectedResult: 2, + shouldBeSuccess: true + }; + }); + + it('CalculatesCorrectly_WithExtraText', () => { + expectations = { + formula: "1+1;Hello World!", + expectedResult: 2, + shouldBeSuccess: true + }; + }); + + it('CalculatesCorrectly_WithExtraTextAndNewlines_01', () => { + expectations = { + formula: "1+1;Hello\rWorld!", + expectedResult: 2, + shouldBeSuccess: true + }; + }); + + it('CalculatesCorrectly_WithExtraTextAndNewlines_02', () => { + expectations = { + formula: "1+1;Hello\r\nWorld!", + expectedResult: 2, + shouldBeSuccess: true + }; + }); + + it('CalculatesCorrectly_WithExtraTextAndNewlines_03', () => { + expectations = { + formula: "1+1;Hello\nWorld!", + expectedResult: 2, + shouldBeSuccess: true + }; + }); + + it('CalculatesCorrectly_WithExtraTextWithManySymbols', () => { + expectations = { + formula: "1+1;012abcABC#öäüÄÖÜ!\"§😀", + expectedResult: 2, + shouldBeSuccess: true + }; + }); + + it('CalculatesCorrectly_WithSemicolonInComment_DoubleQuotes', () => { + expectations = { + formula: "1\"here;look\"+1", + expectedResult: 2, + shouldBeSuccess: true + }; + }); + + it('CalculatesCorrectly_WithSemicolonInComment_SingleQuotes', () => { + expectations = { + formula: "1'here;look'+1", + expectedResult: 2, + shouldBeSuccess: true + }; + }); + + it('CalculatesCorrectly_WithSemicolonInComment_CStyle', () => { + expectations = { + formula: "1/*here;look*/+1", + expectedResult: 2, + shouldBeSuccess: true + }; + }); + + it('CalculatesCorrectly_WithSemicolonInCommentAndAtEndWithoutExtraText_DoubleQuotes', () => { + expectations = { + formula: "1\"here;look\"+1;", + expectedResult: 2, + shouldBeSuccess: true + }; + }); + + it('CalculatesCorrectly_WithSemicolonInCommentAndAtEndWithoutExtraText_SingleQuotes', () => { + expectations = { + formula: "1'here;look'+1;", + expectedResult: 2, + shouldBeSuccess: true + }; + }); + + it('CalculatesCorrectly_WithSemicolonInCommentAndAtEndWithoutExtraText_CStyle', () => { + expectations = { + formula: "1/*here;look*/+1;", + expectedResult: 2, + shouldBeSuccess: true + }; + }); + + it('CalculatesCorrectly_WithSemicolonInCommentAndAtEndWithExtraText_DoubleQuotes', () => { + expectations = { + formula: "1\"here;look\"+1;Hello World!", + expectedResult: 2, + shouldBeSuccess: true + }; + }); + + it('CalculatesCorrectly_WithSemicolonInCommentAndAtEndWithExtraText_SingleQuotes', () => { + expectations = { + formula: "1'here;look'+1;Hello World!", + expectedResult: 2, + shouldBeSuccess: true + }; + }); + + it('CalculatesCorrectly_WithSemicolonInCommentAndAtEndWithExtraText_CStyle', () => { + expectations = { + formula: "1/*here;look*/+1;Hello World!", + expectedResult: 2, + shouldBeSuccess: true + }; + }); + + it('DoesNotFailDueToFalselyDetectedSubstitutionAfterSemicolon_01', () => { + expectations = { + formula: "1+1;See #1", + expectedResult: 2, + shouldBeSuccess: true + }; + }); + + it('DoesNotFailDueToFalselyDetectedSubstitutionAfterSemicolon_02', () => { + expectations = { + formula: "1+1;See #1", + expectedResult: 2, + shouldBeSuccess: true + }; + }); + }); }); \ No newline at end of file diff --git a/src/Calculator.ts b/src/Calculator.ts index dd7a612..9bc80c0 100644 --- a/src/Calculator.ts +++ b/src/Calculator.ts @@ -1,4 +1,4 @@ -import { ANTLRInputStream, CommonTokenStream } from 'antlr4ts'; +import { CharStreams, CommonTokenStream } from 'antlr4ts'; import { CalculationResult } from './CalculationResult'; import { CalculatorLexer } from './GeneratedAntlr/CalculatorLexer'; @@ -7,24 +7,28 @@ import { FormulaErrorListener } from './FormulaErrorListener'; import { FormulaVisitor } from './FormulaVisitor'; export class Calculator { - public static calculate(formula: string): CalculationResult { + public static calculate(formula: string, substitutionResolver?: (substitution: string) => number): CalculationResult { var result = new CalculationResult(); if (formula == null || /^\s*$/.test(formula)) { result.result = 0; result.isValid = true; return result; } - var inputStream = new ANTLRInputStream(formula); + var inputStream = CharStreams.fromString(formula); var lexer = new CalculatorLexer(inputStream); var commonTokenStream = new CommonTokenStream(lexer); var parser = new CalculatorParser(commonTokenStream); var errorListener = new FormulaErrorListener(); parser.removeErrorListeners(); parser.addErrorListener(errorListener); - var visitor = new FormulaVisitor(); + if (!substitutionResolver) { + substitutionResolver = _ => null; + } + + var visitor = new FormulaVisitor(substitutionResolver, errorListener); var parseTree = parser.calculator(); + var visitorResult = visitor.visitCalculator(parseTree); if (errorListener.isValid) { - var visitorResult = visitor.visitCalculator(parseTree); if (isNaN(visitorResult)) { result.isValid = false; result.result = NaN; diff --git a/src/FormulaErrorListener.ts b/src/FormulaErrorListener.ts index c5a0741..bcb61a4 100644 --- a/src/FormulaErrorListener.ts +++ b/src/FormulaErrorListener.ts @@ -58,4 +58,10 @@ */ public reportContextSensitivity(recognizer, dfa, startIndex, stopIndex, prediction, configs) { }; + + public reportSubstitutionNotFound(errorLocation: number, substitution: string) { + this._isValid = false; + this._errorLocation = errorLocation; + this._errorMessage = `The substitution '${substitution}' could not be resolved`; + } } \ No newline at end of file diff --git a/src/FormulaVisitor.ts b/src/FormulaVisitor.ts index 0d739a1..cf8f354 100644 --- a/src/FormulaVisitor.ts +++ b/src/FormulaVisitor.ts @@ -1,75 +1,92 @@ -import { CalculatorVisitor } from './GeneratedAntlr/CalculatorVisitor'; -import { AbstractParseTreeVisitor } from 'antlr4ts/tree/AbstractParseTreeVisitor' +import { AbsContext, SubstitutionContext } from "./GeneratedAntlr/CalculatorParser"; -import { UnaryContext } from "./GeneratedAntlr/CalculatorParser"; -import { UnaryPlusContext } from "./GeneratedAntlr/CalculatorParser"; -import { FloorContext } from "./GeneratedAntlr/CalculatorParser"; +import { AbstractParseTreeVisitor } from 'antlr4ts/tree/AbstractParseTreeVisitor' +import { AddSubContext } from "./GeneratedAntlr/CalculatorParser"; +import { ArccosContext } from "./GeneratedAntlr/CalculatorParser"; +import { ArccotContext } from "./GeneratedAntlr/CalculatorParser"; +import { ArcsinContext } from "./GeneratedAntlr/CalculatorParser"; +import { Arctan2Context } from "./GeneratedAntlr/CalculatorParser"; +import { ArctanContext } from "./GeneratedAntlr/CalculatorParser"; +import { CalculatorContext } from "./GeneratedAntlr/CalculatorParser"; +import { CalculatorVisitor } from './GeneratedAntlr/CalculatorVisitor'; import { CeilContext } from "./GeneratedAntlr/CalculatorParser"; -import { AbsContext } from "./GeneratedAntlr/CalculatorParser"; -import { RoundkContext } from "./GeneratedAntlr/CalculatorParser"; -import { RoundContext } from "./GeneratedAntlr/CalculatorParser"; -import { TruncContext } from "./GeneratedAntlr/CalculatorParser"; -import { SinContext } from "./GeneratedAntlr/CalculatorParser"; import { CosContext } from "./GeneratedAntlr/CalculatorParser"; -import { TanContext } from "./GeneratedAntlr/CalculatorParser"; -import { CotContext } from "./GeneratedAntlr/CalculatorParser"; -import { SinhContext } from "./GeneratedAntlr/CalculatorParser"; import { CoshContext } from "./GeneratedAntlr/CalculatorParser"; -import { TanhContext } from "./GeneratedAntlr/CalculatorParser"; -import { ArcsinContext } from "./GeneratedAntlr/CalculatorParser"; -import { ArccosContext } from "./GeneratedAntlr/CalculatorParser"; -import { ArctanContext } from "./GeneratedAntlr/CalculatorParser"; -import { Arctan2Context } from "./GeneratedAntlr/CalculatorParser"; -import { ArccotContext } from "./GeneratedAntlr/CalculatorParser"; +import { CotContext } from "./GeneratedAntlr/CalculatorParser"; +import { DegContext } from "./GeneratedAntlr/CalculatorParser"; +import { EexContext } from "./GeneratedAntlr/CalculatorParser"; +import { EulerContext } from "./GeneratedAntlr/CalculatorParser"; import { ExpContext } from "./GeneratedAntlr/CalculatorParser"; +import { ExponentContext } from "./GeneratedAntlr/CalculatorParser"; +import { ExpressionContext } from "./GeneratedAntlr/CalculatorParser"; +import { FloorContext } from "./GeneratedAntlr/CalculatorParser"; +import { FormulaErrorListener } from "./FormulaErrorListener"; import { LnContext } from "./GeneratedAntlr/CalculatorParser"; -import { EexContext } from "./GeneratedAntlr/CalculatorParser"; import { LogContext } from "./GeneratedAntlr/CalculatorParser"; -import { RadContext } from "./GeneratedAntlr/CalculatorParser"; -import { DegContext } from "./GeneratedAntlr/CalculatorParser"; -import { SqrtContext } from "./GeneratedAntlr/CalculatorParser"; -import { SqrContext } from "./GeneratedAntlr/CalculatorParser"; -import { ExponentContext } from "./GeneratedAntlr/CalculatorParser"; -import { NegExponentContext } from "./GeneratedAntlr/CalculatorParser"; -import { PowContext } from "./GeneratedAntlr/CalculatorParser"; import { ModContext } from "./GeneratedAntlr/CalculatorParser"; -import { WholeContext } from "./GeneratedAntlr/CalculatorParser"; -import { SqRootContext } from "./GeneratedAntlr/CalculatorParser"; import { MulDivContext } from "./GeneratedAntlr/CalculatorParser"; -import { ParenthesisContext } from "./GeneratedAntlr/CalculatorParser"; import { MultContext } from "./GeneratedAntlr/CalculatorParser"; -import { AddSubContext } from "./GeneratedAntlr/CalculatorParser"; +import { NegExponentContext } from "./GeneratedAntlr/CalculatorParser"; import { NumberContext } from "./GeneratedAntlr/CalculatorParser"; +import { ParenthesisContext } from "./GeneratedAntlr/CalculatorParser"; import { PiContext } from "./GeneratedAntlr/CalculatorParser"; -import { EulerContext } from "./GeneratedAntlr/CalculatorParser"; -import { CalculatorContext } from "./GeneratedAntlr/CalculatorParser"; -import { ExpressionContext } from "./GeneratedAntlr/CalculatorParser"; +import { PowContext } from "./GeneratedAntlr/CalculatorParser"; +import { RadContext } from "./GeneratedAntlr/CalculatorParser"; +import { RoundContext } from "./GeneratedAntlr/CalculatorParser"; +import { RoundkContext } from "./GeneratedAntlr/CalculatorParser"; +import { SinContext } from "./GeneratedAntlr/CalculatorParser"; +import { SinhContext } from "./GeneratedAntlr/CalculatorParser"; +import { SqRootContext } from "./GeneratedAntlr/CalculatorParser"; +import { SqrContext } from "./GeneratedAntlr/CalculatorParser"; +import { SqrtContext } from "./GeneratedAntlr/CalculatorParser"; +import { TanContext } from "./GeneratedAntlr/CalculatorParser"; +import { TanhContext } from "./GeneratedAntlr/CalculatorParser"; +import { TruncContext } from "./GeneratedAntlr/CalculatorParser"; +import { UnaryContext } from "./GeneratedAntlr/CalculatorParser"; +import { UnaryPlusContext } from "./GeneratedAntlr/CalculatorParser"; +import { WholeContext } from "./GeneratedAntlr/CalculatorParser"; -export class FormulaVisitor extends AbstractParseTreeVisitor implements CalculatorVisitor { +export class FormulaVisitor extends AbstractParseTreeVisitor implements CalculatorVisitor { protected defaultResult(): number { return 0; } + constructor(private substitutionResolver: (substitution: string) => number, + private formulaErrorListener: FormulaErrorListener) { + super(); + } + + visitSubstitution(context: SubstitutionContext): number { + const substitution = context.text; + const resolved = this.substitutionResolver(substitution); + if (resolved != null) { + return resolved; + } + + this.formulaErrorListener.reportSubstitutionNotFound(context.start.tokenIndex, substitution); + return 0; + } + // Visit a parse tree produced by calculatorParser#calculator. visitCalculator(context: CalculatorContext): number { return context.expression().accept(this); }; - + visitExpression(context: ExpressionContext): number { return context.accept(this); }; - + // Visit a parse tree produced by calculatorParser#Tan. visitTan(context: TanContext): number { return Math.tan(this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#Cosh. visitCosh(context: CoshContext): number { return Math.cosh(this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#SqRoot. visitSqRoot(context: SqRootContext): number { var nthRoot = this.visitExpression(context.expression(0)); @@ -78,22 +95,22 @@ export class FormulaVisitor extends AbstractParseTreeVisitor implements } return Math.pow(this.visitExpression(context.expression(1)), 1 / nthRoot); }; - + // Visit a parse tree produced by calculatorParser#NegExponent. visitNegExponent(context: NegExponentContext): number { return this.visitExpression(context.expression(0)) * Math.pow(10, -1 * this.visitExpression(context.expression(1))); }; - + // Visit a parse tree produced by calculatorParser#Exponent. visitExponent(context: ExponentContext): number { return this.visitExpression(context.expression(0)) * Math.pow(10, this.visitExpression(context.expression(1))); }; - + // Visit a parse tree produced by calculatorParser#Arctan2. visitArctan2(context: Arctan2Context): number { return Math.atan2(this.visitExpression(context.expression(0)), this.visitExpression(context.expression(1))); }; - + // Visit a parse tree produced by calculatorParser#MulDiv. visitMulDiv(context: MulDivContext): number { if (context._op.text === '*') { @@ -111,129 +128,129 @@ export class FormulaVisitor extends AbstractParseTreeVisitor implements visitMult(context: MultContext): number { return this.visitExpression(context.expression(0)) * this.visitExpression(context.expression(1)); }; - + // Visit a parse tree produced by calculatorParser#Arcsin. visitArcsin(context: ArcsinContext): number { return Math.asin(this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#Arccot. visitArccot(context: ArccotContext): number { return Math.PI * 0.5 - Math.atan(this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#Arccos. visitArccos(context: ArccosContext): number { return Math.acos(this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#Euler. visitEuler(context: EulerContext): number { return Math.E; }; - + // Visit a parse tree produced by calculatorParser#Arctan. visitArctan(context: ArctanContext): number { return Math.atan(this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#Parenthesis. visitParenthesis(context: ParenthesisContext): number { return this.visitExpression(context.expression()); }; - + // Visit a parse tree produced by calculatorParser#Abs. visitAbs(context: AbsContext): number { return Math.abs(this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#Number. visitNumber(context: NumberContext): number { return Number(context.text.replace(',', '.')); }; - + // Visit a parse tree produced by calculatorParser#Sinh. visitSinh(context: SinhContext): number { return Math.sinh(this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#Round. visitRound(context: RoundContext): number { return Math.round(this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#Trunc. visitTrunc(context: TruncContext): number { return Math.trunc(this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#Pi. visitPi(context: PiContext): number { return Math.PI; }; - + // Visit a parse tree produced by calculatorParser#Tanh. visitTanh(context: TanhContext): number { return Math.tanh(this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#Floor. visitFloor(context: FloorContext): number { return Math.floor(this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#Ln. visitLn(context: LnContext): number { return Math.log(this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#Mod. visitMod(context: ModContext): number { return this.visitExpression(context.expression(0)) % this.visitExpression(context.expression(1)); }; - + // Visit a parse tree produced by calculatorParser#Log. visitLog(context: LogContext): number { return Math.log10(this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#AddSub. visitAddSub(context: AddSubContext): number { return context._op.text === '+' ? (this.visitExpression(context.expression(0)) + this.visitExpression(context.expression(1))) : (this.visitExpression(context.expression(0)) - this.visitExpression(context.expression(1))); }; - + // Visit a parse tree produced by calculatorParser#Cos. visitCos(context: CosContext): number { return Math.cos(this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#Deg. visitDeg(context: DegContext): number { return this.visitExpression(context.expression()) * 180 / Math.PI; }; - + // Visit a parse tree produced by calculatorParser#Sqrt. visitSqrt(context: SqrtContext): number { return Math.sqrt(this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#Cot. visitCot(context: CotContext): number { return 1 / Math.tan(this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#Whole. visitWhole(context: WholeContext): number { return Math.trunc(this.visitExpression(context.expression(0)) / this.visitExpression(context.expression(1))); }; - + // Visit a parse tree produced by calculatorParser#Unary. visitUnary(context: UnaryContext): number { return -1 * this.visitExpression(context.expression()); }; - + // Visit a parse tree produced by calculatorParser#UnaryPlus. visitUnaryPlus(context: UnaryPlusContext): number { return this.visitExpression(context.expression()); @@ -243,37 +260,37 @@ export class FormulaVisitor extends AbstractParseTreeVisitor implements visitRad(context: RadContext): number { return this.visitExpression(context.expression()) * Math.PI / 180; }; - + // Visit a parse tree produced by calculatorParser#Sqr. visitSqr(context: SqrContext): number { return this.visitExpression(context.expression()) * this.visitExpression(context.expression()); }; - + // Visit a parse tree produced by calculatorParser#Sin. visitSin(context: SinContext): number { return Math.sin(this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#Eex. visitEex(context: EexContext): number { return Math.pow(10, this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#Pow. visitPow(context: PowContext): number { return Math.pow(this.visitExpression(context.expression(0)), this.visitExpression(context.expression(1))); }; - + // Visit a parse tree produced by calculatorParser#Ceil. visitCeil(context: CeilContext): number { return Math.ceil(this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#Exp. visitExp(context: ExpContext): number { return Math.pow(Math.E, this.visitExpression(context.expression())); }; - + // Visit a parse tree produced by calculatorParser#Roundk. visitRoundk(context: RoundkContext): number { return Math.round(this.visitExpression(context.expression(0)) * Math.pow(10, this.visitExpression(context.expression(1)))) / diff --git a/src/GeneratedAntlr/Calculator.interp b/src/GeneratedAntlr/Calculator.interp index f679582..99a4739 100644 --- a/src/GeneratedAntlr/Calculator.interp +++ b/src/GeneratedAntlr/Calculator.interp @@ -2,7 +2,6 @@ token literal names: null '=' '(' -';' ')' '^' '**' @@ -52,6 +51,8 @@ null null null null +';' +null token symbolic names: null @@ -64,7 +65,6 @@ null null null null -null NUMBER FLOAT DIGIT @@ -106,13 +106,16 @@ RAD DEG WS COM +SUBSTITUTION +SEMICOLON INVALID rule names: calculator expression +trailingComment compileUnit atn: -[3, 51485, 51898, 1421, 44986, 20307, 1543, 60043, 49729, 3, 54, 135, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 3, 2, 3, 2, 5, 2, 11, 10, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 94, 10, 3, 3, 3, 5, 3, 97, 10, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 128, 10, 3, 12, 3, 14, 3, 131, 11, 3, 3, 4, 3, 4, 3, 4, 2, 2, 3, 4, 5, 2, 2, 4, 2, 6, 2, 2, 7, 3, 2, 7, 8, 4, 2, 9, 9, 16, 16, 3, 2, 10, 11, 3, 2, 18, 19, 3, 2, 20, 21, 2, 174, 2, 8, 3, 2, 2, 2, 4, 96, 3, 2, 2, 2, 6, 132, 3, 2, 2, 2, 8, 10, 5, 4, 3, 2, 9, 11, 7, 3, 2, 2, 10, 9, 3, 2, 2, 2, 10, 11, 3, 2, 2, 2, 11, 12, 3, 2, 2, 2, 12, 13, 5, 6, 4, 2, 13, 3, 3, 2, 2, 2, 14, 15, 8, 3, 1, 2, 15, 16, 7, 21, 2, 2, 16, 97, 5, 4, 3, 44, 17, 18, 7, 20, 2, 2, 18, 97, 5, 4, 3, 43, 19, 20, 7, 28, 2, 2, 20, 97, 5, 4, 3, 42, 21, 22, 7, 29, 2, 2, 22, 97, 5, 4, 3, 41, 23, 24, 7, 30, 2, 2, 24, 97, 5, 4, 3, 40, 25, 26, 7, 31, 2, 2, 26, 27, 7, 4, 2, 2, 27, 28, 5, 4, 3, 2, 28, 29, 7, 5, 2, 2, 29, 30, 5, 4, 3, 2, 30, 31, 7, 6, 2, 2, 31, 97, 3, 2, 2, 2, 32, 33, 7, 32, 2, 2, 33, 97, 5, 4, 3, 38, 34, 35, 7, 33, 2, 2, 35, 97, 5, 4, 3, 37, 36, 37, 7, 34, 2, 2, 37, 97, 5, 4, 3, 36, 38, 39, 7, 35, 2, 2, 39, 97, 5, 4, 3, 35, 40, 41, 7, 36, 2, 2, 41, 97, 5, 4, 3, 34, 42, 43, 7, 37, 2, 2, 43, 97, 5, 4, 3, 33, 44, 45, 7, 38, 2, 2, 45, 97, 5, 4, 3, 32, 46, 47, 7, 39, 2, 2, 47, 97, 5, 4, 3, 31, 48, 49, 7, 40, 2, 2, 49, 97, 5, 4, 3, 30, 50, 51, 7, 41, 2, 2, 51, 97, 5, 4, 3, 29, 52, 53, 7, 42, 2, 2, 53, 97, 5, 4, 3, 28, 54, 55, 7, 43, 2, 2, 55, 97, 5, 4, 3, 27, 56, 57, 7, 44, 2, 2, 57, 58, 7, 4, 2, 2, 58, 59, 5, 4, 3, 2, 59, 60, 7, 5, 2, 2, 60, 61, 5, 4, 3, 2, 61, 62, 7, 6, 2, 2, 62, 97, 3, 2, 2, 2, 63, 64, 7, 45, 2, 2, 64, 97, 5, 4, 3, 25, 65, 66, 7, 46, 2, 2, 66, 97, 5, 4, 3, 24, 67, 68, 7, 47, 2, 2, 68, 97, 5, 4, 3, 23, 69, 70, 7, 48, 2, 2, 70, 97, 5, 4, 3, 22, 71, 72, 7, 49, 2, 2, 72, 97, 5, 4, 3, 21, 73, 74, 7, 50, 2, 2, 74, 97, 5, 4, 3, 20, 75, 76, 7, 51, 2, 2, 76, 97, 5, 4, 3, 19, 77, 78, 7, 26, 2, 2, 78, 97, 5, 4, 3, 18, 79, 80, 7, 27, 2, 2, 80, 97, 5, 4, 3, 17, 81, 82, 7, 4, 2, 2, 82, 83, 5, 4, 3, 2, 83, 84, 7, 6, 2, 2, 84, 97, 3, 2, 2, 2, 85, 86, 7, 4, 2, 2, 86, 87, 5, 4, 3, 2, 87, 88, 7, 6, 2, 2, 88, 89, 5, 4, 3, 7, 89, 97, 3, 2, 2, 2, 90, 97, 7, 13, 2, 2, 91, 93, 7, 22, 2, 2, 92, 94, 7, 12, 2, 2, 93, 92, 3, 2, 2, 2, 93, 94, 3, 2, 2, 2, 94, 97, 3, 2, 2, 2, 95, 97, 7, 25, 2, 2, 96, 14, 3, 2, 2, 2, 96, 17, 3, 2, 2, 2, 96, 19, 3, 2, 2, 2, 96, 21, 3, 2, 2, 2, 96, 23, 3, 2, 2, 2, 96, 25, 3, 2, 2, 2, 96, 32, 3, 2, 2, 2, 96, 34, 3, 2, 2, 2, 96, 36, 3, 2, 2, 2, 96, 38, 3, 2, 2, 2, 96, 40, 3, 2, 2, 2, 96, 42, 3, 2, 2, 2, 96, 44, 3, 2, 2, 2, 96, 46, 3, 2, 2, 2, 96, 48, 3, 2, 2, 2, 96, 50, 3, 2, 2, 2, 96, 52, 3, 2, 2, 2, 96, 54, 3, 2, 2, 2, 96, 56, 3, 2, 2, 2, 96, 63, 3, 2, 2, 2, 96, 65, 3, 2, 2, 2, 96, 67, 3, 2, 2, 2, 96, 69, 3, 2, 2, 2, 96, 71, 3, 2, 2, 2, 96, 73, 3, 2, 2, 2, 96, 75, 3, 2, 2, 2, 96, 77, 3, 2, 2, 2, 96, 79, 3, 2, 2, 2, 96, 81, 3, 2, 2, 2, 96, 85, 3, 2, 2, 2, 96, 90, 3, 2, 2, 2, 96, 91, 3, 2, 2, 2, 96, 95, 3, 2, 2, 2, 97, 129, 3, 2, 2, 2, 98, 99, 12, 16, 2, 2, 99, 100, 7, 23, 2, 2, 100, 128, 5, 4, 3, 17, 101, 102, 12, 15, 2, 2, 102, 103, 7, 24, 2, 2, 103, 128, 5, 4, 3, 16, 104, 105, 12, 14, 2, 2, 105, 106, 9, 2, 2, 2, 106, 128, 5, 4, 3, 15, 107, 108, 12, 13, 2, 2, 108, 109, 9, 3, 2, 2, 109, 128, 5, 4, 3, 14, 110, 111, 12, 12, 2, 2, 111, 112, 7, 17, 2, 2, 112, 128, 5, 4, 3, 13, 113, 114, 12, 11, 2, 2, 114, 115, 9, 4, 2, 2, 115, 128, 5, 4, 3, 12, 116, 117, 12, 10, 2, 2, 117, 118, 9, 5, 2, 2, 118, 128, 5, 4, 3, 11, 119, 120, 12, 6, 2, 2, 120, 121, 9, 6, 2, 2, 121, 128, 5, 4, 3, 7, 122, 123, 12, 8, 2, 2, 123, 124, 7, 4, 2, 2, 124, 125, 5, 4, 3, 2, 125, 126, 7, 6, 2, 2, 126, 128, 3, 2, 2, 2, 127, 98, 3, 2, 2, 2, 127, 101, 3, 2, 2, 2, 127, 104, 3, 2, 2, 2, 127, 107, 3, 2, 2, 2, 127, 110, 3, 2, 2, 2, 127, 113, 3, 2, 2, 2, 127, 116, 3, 2, 2, 2, 127, 119, 3, 2, 2, 2, 127, 122, 3, 2, 2, 2, 128, 131, 3, 2, 2, 2, 129, 127, 3, 2, 2, 2, 129, 130, 3, 2, 2, 2, 130, 5, 3, 2, 2, 2, 131, 129, 3, 2, 2, 2, 132, 133, 7, 2, 2, 3, 133, 7, 3, 2, 2, 2, 7, 10, 93, 96, 127, 129] \ No newline at end of file +[3, 51485, 51898, 1421, 44986, 20307, 1543, 60043, 49729, 3, 55, 148, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 3, 2, 3, 2, 5, 2, 13, 10, 2, 3, 2, 5, 2, 16, 10, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 99, 10, 3, 3, 3, 3, 3, 5, 3, 103, 10, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 134, 10, 3, 12, 3, 14, 3, 137, 11, 3, 3, 4, 3, 4, 7, 4, 141, 10, 4, 12, 4, 14, 4, 144, 11, 4, 3, 5, 3, 5, 3, 5, 3, 142, 2, 3, 4, 6, 2, 2, 4, 2, 6, 2, 8, 2, 2, 7, 3, 2, 6, 7, 4, 2, 8, 8, 15, 15, 3, 2, 9, 10, 3, 2, 17, 18, 3, 2, 19, 20, 2, 189, 2, 10, 3, 2, 2, 2, 4, 102, 3, 2, 2, 2, 6, 138, 3, 2, 2, 2, 8, 145, 3, 2, 2, 2, 10, 12, 5, 4, 3, 2, 11, 13, 7, 3, 2, 2, 12, 11, 3, 2, 2, 2, 12, 13, 3, 2, 2, 2, 13, 15, 3, 2, 2, 2, 14, 16, 5, 6, 4, 2, 15, 14, 3, 2, 2, 2, 15, 16, 3, 2, 2, 2, 16, 17, 3, 2, 2, 2, 17, 18, 5, 8, 5, 2, 18, 3, 3, 2, 2, 2, 19, 20, 8, 3, 1, 2, 20, 21, 7, 20, 2, 2, 21, 103, 5, 4, 3, 45, 22, 23, 7, 19, 2, 2, 23, 103, 5, 4, 3, 44, 24, 25, 7, 27, 2, 2, 25, 103, 5, 4, 3, 43, 26, 27, 7, 28, 2, 2, 27, 103, 5, 4, 3, 42, 28, 29, 7, 29, 2, 2, 29, 103, 5, 4, 3, 41, 30, 31, 7, 30, 2, 2, 31, 32, 7, 4, 2, 2, 32, 33, 5, 4, 3, 2, 33, 34, 7, 54, 2, 2, 34, 35, 5, 4, 3, 2, 35, 36, 7, 5, 2, 2, 36, 103, 3, 2, 2, 2, 37, 38, 7, 31, 2, 2, 38, 103, 5, 4, 3, 39, 39, 40, 7, 32, 2, 2, 40, 103, 5, 4, 3, 38, 41, 42, 7, 33, 2, 2, 42, 103, 5, 4, 3, 37, 43, 44, 7, 34, 2, 2, 44, 103, 5, 4, 3, 36, 45, 46, 7, 35, 2, 2, 46, 103, 5, 4, 3, 35, 47, 48, 7, 36, 2, 2, 48, 103, 5, 4, 3, 34, 49, 50, 7, 37, 2, 2, 50, 103, 5, 4, 3, 33, 51, 52, 7, 38, 2, 2, 52, 103, 5, 4, 3, 32, 53, 54, 7, 39, 2, 2, 54, 103, 5, 4, 3, 31, 55, 56, 7, 40, 2, 2, 56, 103, 5, 4, 3, 30, 57, 58, 7, 41, 2, 2, 58, 103, 5, 4, 3, 29, 59, 60, 7, 42, 2, 2, 60, 103, 5, 4, 3, 28, 61, 62, 7, 43, 2, 2, 62, 63, 7, 4, 2, 2, 63, 64, 5, 4, 3, 2, 64, 65, 7, 54, 2, 2, 65, 66, 5, 4, 3, 2, 66, 67, 7, 5, 2, 2, 67, 103, 3, 2, 2, 2, 68, 69, 7, 44, 2, 2, 69, 103, 5, 4, 3, 26, 70, 71, 7, 45, 2, 2, 71, 103, 5, 4, 3, 25, 72, 73, 7, 46, 2, 2, 73, 103, 5, 4, 3, 24, 74, 75, 7, 47, 2, 2, 75, 103, 5, 4, 3, 23, 76, 77, 7, 48, 2, 2, 77, 103, 5, 4, 3, 22, 78, 79, 7, 49, 2, 2, 79, 103, 5, 4, 3, 21, 80, 81, 7, 50, 2, 2, 81, 103, 5, 4, 3, 20, 82, 83, 7, 25, 2, 2, 83, 103, 5, 4, 3, 19, 84, 85, 7, 26, 2, 2, 85, 103, 5, 4, 3, 18, 86, 87, 7, 4, 2, 2, 87, 88, 5, 4, 3, 2, 88, 89, 7, 5, 2, 2, 89, 103, 3, 2, 2, 2, 90, 91, 7, 4, 2, 2, 91, 92, 5, 4, 3, 2, 92, 93, 7, 5, 2, 2, 93, 94, 5, 4, 3, 8, 94, 103, 3, 2, 2, 2, 95, 103, 7, 12, 2, 2, 96, 98, 7, 21, 2, 2, 97, 99, 7, 11, 2, 2, 98, 97, 3, 2, 2, 2, 98, 99, 3, 2, 2, 2, 99, 103, 3, 2, 2, 2, 100, 103, 7, 24, 2, 2, 101, 103, 7, 53, 2, 2, 102, 19, 3, 2, 2, 2, 102, 22, 3, 2, 2, 2, 102, 24, 3, 2, 2, 2, 102, 26, 3, 2, 2, 2, 102, 28, 3, 2, 2, 2, 102, 30, 3, 2, 2, 2, 102, 37, 3, 2, 2, 2, 102, 39, 3, 2, 2, 2, 102, 41, 3, 2, 2, 2, 102, 43, 3, 2, 2, 2, 102, 45, 3, 2, 2, 2, 102, 47, 3, 2, 2, 2, 102, 49, 3, 2, 2, 2, 102, 51, 3, 2, 2, 2, 102, 53, 3, 2, 2, 2, 102, 55, 3, 2, 2, 2, 102, 57, 3, 2, 2, 2, 102, 59, 3, 2, 2, 2, 102, 61, 3, 2, 2, 2, 102, 68, 3, 2, 2, 2, 102, 70, 3, 2, 2, 2, 102, 72, 3, 2, 2, 2, 102, 74, 3, 2, 2, 2, 102, 76, 3, 2, 2, 2, 102, 78, 3, 2, 2, 2, 102, 80, 3, 2, 2, 2, 102, 82, 3, 2, 2, 2, 102, 84, 3, 2, 2, 2, 102, 86, 3, 2, 2, 2, 102, 90, 3, 2, 2, 2, 102, 95, 3, 2, 2, 2, 102, 96, 3, 2, 2, 2, 102, 100, 3, 2, 2, 2, 102, 101, 3, 2, 2, 2, 103, 135, 3, 2, 2, 2, 104, 105, 12, 17, 2, 2, 105, 106, 7, 22, 2, 2, 106, 134, 5, 4, 3, 18, 107, 108, 12, 16, 2, 2, 108, 109, 7, 23, 2, 2, 109, 134, 5, 4, 3, 17, 110, 111, 12, 15, 2, 2, 111, 112, 9, 2, 2, 2, 112, 134, 5, 4, 3, 16, 113, 114, 12, 14, 2, 2, 114, 115, 9, 3, 2, 2, 115, 134, 5, 4, 3, 15, 116, 117, 12, 13, 2, 2, 117, 118, 7, 16, 2, 2, 118, 134, 5, 4, 3, 14, 119, 120, 12, 12, 2, 2, 120, 121, 9, 4, 2, 2, 121, 134, 5, 4, 3, 13, 122, 123, 12, 11, 2, 2, 123, 124, 9, 5, 2, 2, 124, 134, 5, 4, 3, 12, 125, 126, 12, 7, 2, 2, 126, 127, 9, 6, 2, 2, 127, 134, 5, 4, 3, 8, 128, 129, 12, 9, 2, 2, 129, 130, 7, 4, 2, 2, 130, 131, 5, 4, 3, 2, 131, 132, 7, 5, 2, 2, 132, 134, 3, 2, 2, 2, 133, 104, 3, 2, 2, 2, 133, 107, 3, 2, 2, 2, 133, 110, 3, 2, 2, 2, 133, 113, 3, 2, 2, 2, 133, 116, 3, 2, 2, 2, 133, 119, 3, 2, 2, 2, 133, 122, 3, 2, 2, 2, 133, 125, 3, 2, 2, 2, 133, 128, 3, 2, 2, 2, 134, 137, 3, 2, 2, 2, 135, 133, 3, 2, 2, 2, 135, 136, 3, 2, 2, 2, 136, 5, 3, 2, 2, 2, 137, 135, 3, 2, 2, 2, 138, 142, 7, 54, 2, 2, 139, 141, 11, 2, 2, 2, 140, 139, 3, 2, 2, 2, 141, 144, 3, 2, 2, 2, 142, 143, 3, 2, 2, 2, 142, 140, 3, 2, 2, 2, 143, 7, 3, 2, 2, 2, 144, 142, 3, 2, 2, 2, 145, 146, 7, 2, 2, 3, 146, 9, 3, 2, 2, 2, 9, 12, 15, 98, 102, 133, 135, 142] \ No newline at end of file diff --git a/src/GeneratedAntlr/Calculator.tokens b/src/GeneratedAntlr/Calculator.tokens index ff10e1b..510ed46 100644 --- a/src/GeneratedAntlr/Calculator.tokens +++ b/src/GeneratedAntlr/Calculator.tokens @@ -7,60 +7,61 @@ T__5=6 T__6=7 T__7=8 T__8=9 -T__9=10 -NUMBER=11 -FLOAT=12 -DIGIT=13 -MOD=14 -WHOLE=15 -MUL=16 -DIV=17 -ADD=18 -SUB=19 -PI=20 -EXPONENT=21 -NEGEXPONENT=22 -EULER=23 -SQRT=24 -SQR=25 -FLOOR=26 -CEIL=27 -ABS=28 -ROUNDK=29 -ROUND=30 -TRUNC=31 -SIN=32 -COS=33 -TAN=34 -COT=35 -SINH=36 -COSH=37 -TANH=38 -ARCSIN=39 -ARCCOS=40 -ARCTAN=41 -ARCTAN2=42 -ARCCOT=43 -EXP=44 -LN=45 -EEX=46 -LOG=47 -RAD=48 -DEG=49 -WS=50 -COM=51 -INVALID=52 +NUMBER=10 +FLOAT=11 +DIGIT=12 +MOD=13 +WHOLE=14 +MUL=15 +DIV=16 +ADD=17 +SUB=18 +PI=19 +EXPONENT=20 +NEGEXPONENT=21 +EULER=22 +SQRT=23 +SQR=24 +FLOOR=25 +CEIL=26 +ABS=27 +ROUNDK=28 +ROUND=29 +TRUNC=30 +SIN=31 +COS=32 +TAN=33 +COT=34 +SINH=35 +COSH=36 +TANH=37 +ARCSIN=38 +ARCCOS=39 +ARCTAN=40 +ARCTAN2=41 +ARCCOT=42 +EXP=43 +LN=44 +EEX=45 +LOG=46 +RAD=47 +DEG=48 +WS=49 +COM=50 +SUBSTITUTION=51 +SEMICOLON=52 +INVALID=53 '='=1 '('=2 -';'=3 -')'=4 -'^'=5 -'**'=6 -'%'=7 -'~'=8 -'//'=9 -'()'=10 -'*'=16 -'/'=17 -'+'=18 -'-'=19 +')'=3 +'^'=4 +'**'=5 +'%'=6 +'~'=7 +'//'=8 +'()'=9 +'*'=15 +'/'=16 +'+'=17 +'-'=18 +';'=52 diff --git a/src/GeneratedAntlr/CalculatorLexer.interp b/src/GeneratedAntlr/CalculatorLexer.interp index e9cdf43..ca2ab96 100644 --- a/src/GeneratedAntlr/CalculatorLexer.interp +++ b/src/GeneratedAntlr/CalculatorLexer.interp @@ -2,7 +2,6 @@ token literal names: null '=' '(' -';' ')' '^' '**' @@ -52,6 +51,8 @@ null null null null +';' +null token symbolic names: null @@ -64,7 +65,6 @@ null null null null -null NUMBER FLOAT DIGIT @@ -106,6 +106,8 @@ RAD DEG WS COM +SUBSTITUTION +SEMICOLON INVALID rule names: @@ -118,7 +120,6 @@ T__5 T__6 T__7 T__8 -T__9 NUMBER FLOAT DIGIT @@ -160,6 +161,8 @@ RAD DEG WS COM +SUBSTITUTION +SEMICOLON INVALID COMMENT @@ -171,4 +174,4 @@ mode names: DEFAULT_MODE atn: -[3, 51485, 51898, 1421, 44986, 20307, 1543, 60043, 49729, 2, 54, 361, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 6, 12, 135, 10, 12, 13, 12, 14, 12, 136, 5, 12, 139, 10, 12, 3, 13, 6, 13, 142, 10, 13, 13, 13, 14, 13, 143, 3, 13, 3, 13, 7, 13, 148, 10, 13, 12, 13, 14, 13, 151, 11, 13, 3, 13, 3, 13, 6, 13, 155, 10, 13, 13, 13, 14, 13, 156, 5, 13, 159, 10, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 45, 3, 45, 3, 45, 3, 45, 3, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 51, 3, 52, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, 54, 7, 54, 337, 10, 54, 12, 54, 14, 54, 340, 11, 54, 3, 54, 3, 54, 3, 54, 3, 54, 7, 54, 346, 10, 54, 12, 54, 14, 54, 349, 11, 54, 3, 54, 3, 54, 3, 54, 7, 54, 354, 10, 54, 12, 54, 14, 54, 357, 11, 54, 3, 54, 5, 54, 360, 10, 54, 5, 338, 347, 355, 2, 2, 55, 3, 2, 3, 5, 2, 4, 7, 2, 5, 9, 2, 6, 11, 2, 7, 13, 2, 8, 15, 2, 9, 17, 2, 10, 19, 2, 11, 21, 2, 12, 23, 2, 13, 25, 2, 14, 27, 2, 15, 29, 2, 16, 31, 2, 17, 33, 2, 18, 35, 2, 19, 37, 2, 20, 39, 2, 21, 41, 2, 22, 43, 2, 23, 45, 2, 24, 47, 2, 25, 49, 2, 26, 51, 2, 27, 53, 2, 28, 55, 2, 29, 57, 2, 30, 59, 2, 31, 61, 2, 32, 63, 2, 33, 65, 2, 34, 67, 2, 35, 69, 2, 36, 71, 2, 37, 73, 2, 38, 75, 2, 39, 77, 2, 40, 79, 2, 41, 81, 2, 42, 83, 2, 43, 85, 2, 44, 87, 2, 45, 89, 2, 46, 91, 2, 47, 93, 2, 48, 95, 2, 49, 97, 2, 50, 99, 2, 51, 101, 2, 52, 103, 2, 53, 105, 2, 54, 107, 2, 2, 3, 2, 28, 4, 2, 46, 46, 48, 48, 3, 2, 50, 59, 4, 2, 79, 79, 111, 111, 4, 2, 81, 81, 113, 113, 4, 2, 70, 70, 102, 102, 4, 2, 75, 75, 107, 107, 4, 2, 88, 88, 120, 120, 4, 2, 82, 82, 114, 114, 4, 2, 71, 71, 103, 103, 4, 2, 85, 85, 117, 117, 4, 2, 83, 83, 115, 115, 4, 2, 84, 84, 116, 116, 4, 2, 86, 86, 118, 118, 4, 2, 72, 72, 104, 104, 4, 2, 78, 78, 110, 110, 4, 2, 69, 69, 101, 101, 4, 2, 67, 67, 99, 99, 4, 2, 68, 68, 100, 100, 4, 2, 87, 87, 119, 119, 4, 2, 80, 80, 112, 112, 4, 2, 77, 77, 109, 109, 4, 2, 74, 74, 106, 106, 3, 2, 52, 52, 4, 2, 90, 90, 122, 122, 4, 2, 73, 73, 105, 105, 5, 2, 11, 12, 15, 15, 34, 34, 2, 370, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 3, 109, 3, 2, 2, 2, 5, 111, 3, 2, 2, 2, 7, 113, 3, 2, 2, 2, 9, 115, 3, 2, 2, 2, 11, 117, 3, 2, 2, 2, 13, 119, 3, 2, 2, 2, 15, 122, 3, 2, 2, 2, 17, 124, 3, 2, 2, 2, 19, 126, 3, 2, 2, 2, 21, 129, 3, 2, 2, 2, 23, 138, 3, 2, 2, 2, 25, 158, 3, 2, 2, 2, 27, 160, 3, 2, 2, 2, 29, 162, 3, 2, 2, 2, 31, 166, 3, 2, 2, 2, 33, 170, 3, 2, 2, 2, 35, 172, 3, 2, 2, 2, 37, 174, 3, 2, 2, 2, 39, 176, 3, 2, 2, 2, 41, 178, 3, 2, 2, 2, 43, 181, 3, 2, 2, 2, 45, 184, 3, 2, 2, 2, 47, 187, 3, 2, 2, 2, 49, 189, 3, 2, 2, 2, 51, 194, 3, 2, 2, 2, 53, 198, 3, 2, 2, 2, 55, 204, 3, 2, 2, 2, 57, 209, 3, 2, 2, 2, 59, 213, 3, 2, 2, 2, 61, 220, 3, 2, 2, 2, 63, 226, 3, 2, 2, 2, 65, 232, 3, 2, 2, 2, 67, 236, 3, 2, 2, 2, 69, 240, 3, 2, 2, 2, 71, 244, 3, 2, 2, 2, 73, 248, 3, 2, 2, 2, 75, 253, 3, 2, 2, 2, 77, 258, 3, 2, 2, 2, 79, 263, 3, 2, 2, 2, 81, 270, 3, 2, 2, 2, 83, 277, 3, 2, 2, 2, 85, 284, 3, 2, 2, 2, 87, 292, 3, 2, 2, 2, 89, 299, 3, 2, 2, 2, 91, 303, 3, 2, 2, 2, 93, 306, 3, 2, 2, 2, 95, 310, 3, 2, 2, 2, 97, 314, 3, 2, 2, 2, 99, 318, 3, 2, 2, 2, 101, 322, 3, 2, 2, 2, 103, 326, 3, 2, 2, 2, 105, 330, 3, 2, 2, 2, 107, 359, 3, 2, 2, 2, 109, 110, 7, 63, 2, 2, 110, 4, 3, 2, 2, 2, 111, 112, 7, 42, 2, 2, 112, 6, 3, 2, 2, 2, 113, 114, 7, 61, 2, 2, 114, 8, 3, 2, 2, 2, 115, 116, 7, 43, 2, 2, 116, 10, 3, 2, 2, 2, 117, 118, 7, 96, 2, 2, 118, 12, 3, 2, 2, 2, 119, 120, 7, 44, 2, 2, 120, 121, 7, 44, 2, 2, 121, 14, 3, 2, 2, 2, 122, 123, 7, 39, 2, 2, 123, 16, 3, 2, 2, 2, 124, 125, 7, 128, 2, 2, 125, 18, 3, 2, 2, 2, 126, 127, 7, 49, 2, 2, 127, 128, 7, 49, 2, 2, 128, 20, 3, 2, 2, 2, 129, 130, 7, 42, 2, 2, 130, 131, 7, 43, 2, 2, 131, 22, 3, 2, 2, 2, 132, 139, 5, 25, 13, 2, 133, 135, 5, 27, 14, 2, 134, 133, 3, 2, 2, 2, 135, 136, 3, 2, 2, 2, 136, 134, 3, 2, 2, 2, 136, 137, 3, 2, 2, 2, 137, 139, 3, 2, 2, 2, 138, 132, 3, 2, 2, 2, 138, 134, 3, 2, 2, 2, 139, 24, 3, 2, 2, 2, 140, 142, 5, 27, 14, 2, 141, 140, 3, 2, 2, 2, 142, 143, 3, 2, 2, 2, 143, 141, 3, 2, 2, 2, 143, 144, 3, 2, 2, 2, 144, 145, 3, 2, 2, 2, 145, 149, 9, 2, 2, 2, 146, 148, 5, 27, 14, 2, 147, 146, 3, 2, 2, 2, 148, 151, 3, 2, 2, 2, 149, 147, 3, 2, 2, 2, 149, 150, 3, 2, 2, 2, 150, 159, 3, 2, 2, 2, 151, 149, 3, 2, 2, 2, 152, 154, 9, 2, 2, 2, 153, 155, 5, 27, 14, 2, 154, 153, 3, 2, 2, 2, 155, 156, 3, 2, 2, 2, 156, 154, 3, 2, 2, 2, 156, 157, 3, 2, 2, 2, 157, 159, 3, 2, 2, 2, 158, 141, 3, 2, 2, 2, 158, 152, 3, 2, 2, 2, 159, 26, 3, 2, 2, 2, 160, 161, 9, 3, 2, 2, 161, 28, 3, 2, 2, 2, 162, 163, 9, 4, 2, 2, 163, 164, 9, 5, 2, 2, 164, 165, 9, 6, 2, 2, 165, 30, 3, 2, 2, 2, 166, 167, 9, 6, 2, 2, 167, 168, 9, 7, 2, 2, 168, 169, 9, 8, 2, 2, 169, 32, 3, 2, 2, 2, 170, 171, 7, 44, 2, 2, 171, 34, 3, 2, 2, 2, 172, 173, 7, 49, 2, 2, 173, 36, 3, 2, 2, 2, 174, 175, 7, 45, 2, 2, 175, 38, 3, 2, 2, 2, 176, 177, 7, 47, 2, 2, 177, 40, 3, 2, 2, 2, 178, 179, 9, 9, 2, 2, 179, 180, 9, 7, 2, 2, 180, 42, 3, 2, 2, 2, 181, 182, 9, 10, 2, 2, 182, 183, 7, 45, 2, 2, 183, 44, 3, 2, 2, 2, 184, 185, 9, 10, 2, 2, 185, 186, 7, 47, 2, 2, 186, 46, 3, 2, 2, 2, 187, 188, 9, 10, 2, 2, 188, 48, 3, 2, 2, 2, 189, 190, 9, 11, 2, 2, 190, 191, 9, 12, 2, 2, 191, 192, 9, 13, 2, 2, 192, 193, 9, 14, 2, 2, 193, 50, 3, 2, 2, 2, 194, 195, 9, 11, 2, 2, 195, 196, 9, 12, 2, 2, 196, 197, 9, 13, 2, 2, 197, 52, 3, 2, 2, 2, 198, 199, 9, 15, 2, 2, 199, 200, 9, 16, 2, 2, 200, 201, 9, 5, 2, 2, 201, 202, 9, 5, 2, 2, 202, 203, 9, 13, 2, 2, 203, 54, 3, 2, 2, 2, 204, 205, 9, 17, 2, 2, 205, 206, 9, 10, 2, 2, 206, 207, 9, 7, 2, 2, 207, 208, 9, 16, 2, 2, 208, 56, 3, 2, 2, 2, 209, 210, 9, 18, 2, 2, 210, 211, 9, 19, 2, 2, 211, 212, 9, 11, 2, 2, 212, 58, 3, 2, 2, 2, 213, 214, 9, 13, 2, 2, 214, 215, 9, 5, 2, 2, 215, 216, 9, 20, 2, 2, 216, 217, 9, 21, 2, 2, 217, 218, 9, 6, 2, 2, 218, 219, 9, 22, 2, 2, 219, 60, 3, 2, 2, 2, 220, 221, 9, 13, 2, 2, 221, 222, 9, 5, 2, 2, 222, 223, 9, 20, 2, 2, 223, 224, 9, 21, 2, 2, 224, 225, 9, 6, 2, 2, 225, 62, 3, 2, 2, 2, 226, 227, 9, 14, 2, 2, 227, 228, 9, 13, 2, 2, 228, 229, 9, 20, 2, 2, 229, 230, 9, 21, 2, 2, 230, 231, 9, 17, 2, 2, 231, 64, 3, 2, 2, 2, 232, 233, 9, 11, 2, 2, 233, 234, 9, 7, 2, 2, 234, 235, 9, 21, 2, 2, 235, 66, 3, 2, 2, 2, 236, 237, 9, 17, 2, 2, 237, 238, 9, 5, 2, 2, 238, 239, 9, 11, 2, 2, 239, 68, 3, 2, 2, 2, 240, 241, 9, 14, 2, 2, 241, 242, 9, 18, 2, 2, 242, 243, 9, 21, 2, 2, 243, 70, 3, 2, 2, 2, 244, 245, 9, 17, 2, 2, 245, 246, 9, 5, 2, 2, 246, 247, 9, 14, 2, 2, 247, 72, 3, 2, 2, 2, 248, 249, 9, 11, 2, 2, 249, 250, 9, 7, 2, 2, 250, 251, 9, 21, 2, 2, 251, 252, 9, 23, 2, 2, 252, 74, 3, 2, 2, 2, 253, 254, 9, 17, 2, 2, 254, 255, 9, 5, 2, 2, 255, 256, 9, 11, 2, 2, 256, 257, 9, 23, 2, 2, 257, 76, 3, 2, 2, 2, 258, 259, 9, 14, 2, 2, 259, 260, 9, 18, 2, 2, 260, 261, 9, 21, 2, 2, 261, 262, 9, 23, 2, 2, 262, 78, 3, 2, 2, 2, 263, 264, 9, 18, 2, 2, 264, 265, 9, 13, 2, 2, 265, 266, 9, 17, 2, 2, 266, 267, 9, 11, 2, 2, 267, 268, 9, 7, 2, 2, 268, 269, 9, 21, 2, 2, 269, 80, 3, 2, 2, 2, 270, 271, 9, 18, 2, 2, 271, 272, 9, 13, 2, 2, 272, 273, 9, 17, 2, 2, 273, 274, 9, 17, 2, 2, 274, 275, 9, 5, 2, 2, 275, 276, 9, 11, 2, 2, 276, 82, 3, 2, 2, 2, 277, 278, 9, 18, 2, 2, 278, 279, 9, 13, 2, 2, 279, 280, 9, 17, 2, 2, 280, 281, 9, 14, 2, 2, 281, 282, 9, 18, 2, 2, 282, 283, 9, 21, 2, 2, 283, 84, 3, 2, 2, 2, 284, 285, 9, 18, 2, 2, 285, 286, 9, 13, 2, 2, 286, 287, 9, 17, 2, 2, 287, 288, 9, 14, 2, 2, 288, 289, 9, 18, 2, 2, 289, 290, 9, 21, 2, 2, 290, 291, 9, 24, 2, 2, 291, 86, 3, 2, 2, 2, 292, 293, 9, 18, 2, 2, 293, 294, 9, 13, 2, 2, 294, 295, 9, 17, 2, 2, 295, 296, 9, 17, 2, 2, 296, 297, 9, 5, 2, 2, 297, 298, 9, 14, 2, 2, 298, 88, 3, 2, 2, 2, 299, 300, 9, 10, 2, 2, 300, 301, 9, 25, 2, 2, 301, 302, 9, 9, 2, 2, 302, 90, 3, 2, 2, 2, 303, 304, 9, 16, 2, 2, 304, 305, 9, 21, 2, 2, 305, 92, 3, 2, 2, 2, 306, 307, 9, 10, 2, 2, 307, 308, 9, 10, 2, 2, 308, 309, 9, 25, 2, 2, 309, 94, 3, 2, 2, 2, 310, 311, 9, 16, 2, 2, 311, 312, 9, 5, 2, 2, 312, 313, 9, 26, 2, 2, 313, 96, 3, 2, 2, 2, 314, 315, 9, 13, 2, 2, 315, 316, 9, 18, 2, 2, 316, 317, 9, 6, 2, 2, 317, 98, 3, 2, 2, 2, 318, 319, 9, 6, 2, 2, 319, 320, 9, 10, 2, 2, 320, 321, 9, 26, 2, 2, 321, 100, 3, 2, 2, 2, 322, 323, 9, 27, 2, 2, 323, 324, 3, 2, 2, 2, 324, 325, 8, 51, 2, 2, 325, 102, 3, 2, 2, 2, 326, 327, 5, 107, 54, 2, 327, 328, 3, 2, 2, 2, 328, 329, 8, 52, 2, 2, 329, 104, 3, 2, 2, 2, 330, 331, 11, 2, 2, 2, 331, 106, 3, 2, 2, 2, 332, 333, 7, 49, 2, 2, 333, 334, 7, 44, 2, 2, 334, 338, 3, 2, 2, 2, 335, 337, 11, 2, 2, 2, 336, 335, 3, 2, 2, 2, 337, 340, 3, 2, 2, 2, 338, 339, 3, 2, 2, 2, 338, 336, 3, 2, 2, 2, 339, 341, 3, 2, 2, 2, 340, 338, 3, 2, 2, 2, 341, 342, 7, 44, 2, 2, 342, 360, 7, 49, 2, 2, 343, 347, 7, 41, 2, 2, 344, 346, 11, 2, 2, 2, 345, 344, 3, 2, 2, 2, 346, 349, 3, 2, 2, 2, 347, 348, 3, 2, 2, 2, 347, 345, 3, 2, 2, 2, 348, 350, 3, 2, 2, 2, 349, 347, 3, 2, 2, 2, 350, 360, 7, 41, 2, 2, 351, 355, 7, 36, 2, 2, 352, 354, 11, 2, 2, 2, 353, 352, 3, 2, 2, 2, 354, 357, 3, 2, 2, 2, 355, 356, 3, 2, 2, 2, 355, 353, 3, 2, 2, 2, 356, 358, 3, 2, 2, 2, 357, 355, 3, 2, 2, 2, 358, 360, 7, 36, 2, 2, 359, 332, 3, 2, 2, 2, 359, 343, 3, 2, 2, 2, 359, 351, 3, 2, 2, 2, 360, 108, 3, 2, 2, 2, 13, 2, 136, 138, 143, 149, 156, 158, 338, 347, 355, 359, 3, 8, 2, 2] \ No newline at end of file +[3, 51485, 51898, 1421, 44986, 20307, 1543, 60043, 49729, 2, 55, 369, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 6, 11, 135, 10, 11, 13, 11, 14, 11, 136, 5, 11, 139, 10, 11, 3, 12, 6, 12, 142, 10, 12, 13, 12, 14, 12, 143, 3, 12, 3, 12, 7, 12, 148, 10, 12, 12, 12, 14, 12, 151, 11, 12, 3, 12, 3, 12, 6, 12, 155, 10, 12, 13, 12, 14, 12, 156, 5, 12, 159, 10, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 3, 44, 3, 45, 3, 45, 3, 45, 3, 46, 3, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 51, 3, 52, 3, 52, 6, 52, 333, 10, 52, 13, 52, 14, 52, 334, 3, 53, 3, 53, 3, 54, 3, 54, 3, 55, 3, 55, 3, 55, 3, 55, 7, 55, 345, 10, 55, 12, 55, 14, 55, 348, 11, 55, 3, 55, 3, 55, 3, 55, 3, 55, 7, 55, 354, 10, 55, 12, 55, 14, 55, 357, 11, 55, 3, 55, 3, 55, 3, 55, 7, 55, 362, 10, 55, 12, 55, 14, 55, 365, 11, 55, 3, 55, 5, 55, 368, 10, 55, 5, 346, 355, 363, 2, 2, 56, 3, 2, 3, 5, 2, 4, 7, 2, 5, 9, 2, 6, 11, 2, 7, 13, 2, 8, 15, 2, 9, 17, 2, 10, 19, 2, 11, 21, 2, 12, 23, 2, 13, 25, 2, 14, 27, 2, 15, 29, 2, 16, 31, 2, 17, 33, 2, 18, 35, 2, 19, 37, 2, 20, 39, 2, 21, 41, 2, 22, 43, 2, 23, 45, 2, 24, 47, 2, 25, 49, 2, 26, 51, 2, 27, 53, 2, 28, 55, 2, 29, 57, 2, 30, 59, 2, 31, 61, 2, 32, 63, 2, 33, 65, 2, 34, 67, 2, 35, 69, 2, 36, 71, 2, 37, 73, 2, 38, 75, 2, 39, 77, 2, 40, 79, 2, 41, 81, 2, 42, 83, 2, 43, 85, 2, 44, 87, 2, 45, 89, 2, 46, 91, 2, 47, 93, 2, 48, 95, 2, 49, 97, 2, 50, 99, 2, 51, 101, 2, 52, 103, 2, 53, 105, 2, 54, 107, 2, 55, 109, 2, 2, 3, 2, 29, 4, 2, 46, 46, 48, 48, 3, 2, 50, 59, 4, 2, 79, 79, 111, 111, 4, 2, 81, 81, 113, 113, 4, 2, 70, 70, 102, 102, 4, 2, 75, 75, 107, 107, 4, 2, 88, 88, 120, 120, 4, 2, 82, 82, 114, 114, 4, 2, 71, 71, 103, 103, 4, 2, 85, 85, 117, 117, 4, 2, 83, 83, 115, 115, 4, 2, 84, 84, 116, 116, 4, 2, 86, 86, 118, 118, 4, 2, 72, 72, 104, 104, 4, 2, 78, 78, 110, 110, 4, 2, 69, 69, 101, 101, 4, 2, 67, 67, 99, 99, 4, 2, 68, 68, 100, 100, 4, 2, 87, 87, 119, 119, 4, 2, 80, 80, 112, 112, 4, 2, 77, 77, 109, 109, 4, 2, 74, 74, 106, 106, 3, 2, 52, 52, 4, 2, 90, 90, 122, 122, 4, 2, 73, 73, 105, 105, 5, 2, 11, 12, 15, 15, 34, 34, 11, 2, 50, 59, 67, 92, 99, 124, 198, 198, 216, 216, 222, 222, 230, 230, 248, 248, 254, 254, 2, 379, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 3, 111, 3, 2, 2, 2, 5, 113, 3, 2, 2, 2, 7, 115, 3, 2, 2, 2, 9, 117, 3, 2, 2, 2, 11, 119, 3, 2, 2, 2, 13, 122, 3, 2, 2, 2, 15, 124, 3, 2, 2, 2, 17, 126, 3, 2, 2, 2, 19, 129, 3, 2, 2, 2, 21, 138, 3, 2, 2, 2, 23, 158, 3, 2, 2, 2, 25, 160, 3, 2, 2, 2, 27, 162, 3, 2, 2, 2, 29, 166, 3, 2, 2, 2, 31, 170, 3, 2, 2, 2, 33, 172, 3, 2, 2, 2, 35, 174, 3, 2, 2, 2, 37, 176, 3, 2, 2, 2, 39, 178, 3, 2, 2, 2, 41, 181, 3, 2, 2, 2, 43, 184, 3, 2, 2, 2, 45, 187, 3, 2, 2, 2, 47, 189, 3, 2, 2, 2, 49, 194, 3, 2, 2, 2, 51, 198, 3, 2, 2, 2, 53, 204, 3, 2, 2, 2, 55, 209, 3, 2, 2, 2, 57, 213, 3, 2, 2, 2, 59, 220, 3, 2, 2, 2, 61, 226, 3, 2, 2, 2, 63, 232, 3, 2, 2, 2, 65, 236, 3, 2, 2, 2, 67, 240, 3, 2, 2, 2, 69, 244, 3, 2, 2, 2, 71, 248, 3, 2, 2, 2, 73, 253, 3, 2, 2, 2, 75, 258, 3, 2, 2, 2, 77, 263, 3, 2, 2, 2, 79, 270, 3, 2, 2, 2, 81, 277, 3, 2, 2, 2, 83, 284, 3, 2, 2, 2, 85, 292, 3, 2, 2, 2, 87, 299, 3, 2, 2, 2, 89, 303, 3, 2, 2, 2, 91, 306, 3, 2, 2, 2, 93, 310, 3, 2, 2, 2, 95, 314, 3, 2, 2, 2, 97, 318, 3, 2, 2, 2, 99, 322, 3, 2, 2, 2, 101, 326, 3, 2, 2, 2, 103, 330, 3, 2, 2, 2, 105, 336, 3, 2, 2, 2, 107, 338, 3, 2, 2, 2, 109, 367, 3, 2, 2, 2, 111, 112, 7, 63, 2, 2, 112, 4, 3, 2, 2, 2, 113, 114, 7, 42, 2, 2, 114, 6, 3, 2, 2, 2, 115, 116, 7, 43, 2, 2, 116, 8, 3, 2, 2, 2, 117, 118, 7, 96, 2, 2, 118, 10, 3, 2, 2, 2, 119, 120, 7, 44, 2, 2, 120, 121, 7, 44, 2, 2, 121, 12, 3, 2, 2, 2, 122, 123, 7, 39, 2, 2, 123, 14, 3, 2, 2, 2, 124, 125, 7, 128, 2, 2, 125, 16, 3, 2, 2, 2, 126, 127, 7, 49, 2, 2, 127, 128, 7, 49, 2, 2, 128, 18, 3, 2, 2, 2, 129, 130, 7, 42, 2, 2, 130, 131, 7, 43, 2, 2, 131, 20, 3, 2, 2, 2, 132, 139, 5, 23, 12, 2, 133, 135, 5, 25, 13, 2, 134, 133, 3, 2, 2, 2, 135, 136, 3, 2, 2, 2, 136, 134, 3, 2, 2, 2, 136, 137, 3, 2, 2, 2, 137, 139, 3, 2, 2, 2, 138, 132, 3, 2, 2, 2, 138, 134, 3, 2, 2, 2, 139, 22, 3, 2, 2, 2, 140, 142, 5, 25, 13, 2, 141, 140, 3, 2, 2, 2, 142, 143, 3, 2, 2, 2, 143, 141, 3, 2, 2, 2, 143, 144, 3, 2, 2, 2, 144, 145, 3, 2, 2, 2, 145, 149, 9, 2, 2, 2, 146, 148, 5, 25, 13, 2, 147, 146, 3, 2, 2, 2, 148, 151, 3, 2, 2, 2, 149, 147, 3, 2, 2, 2, 149, 150, 3, 2, 2, 2, 150, 159, 3, 2, 2, 2, 151, 149, 3, 2, 2, 2, 152, 154, 9, 2, 2, 2, 153, 155, 5, 25, 13, 2, 154, 153, 3, 2, 2, 2, 155, 156, 3, 2, 2, 2, 156, 154, 3, 2, 2, 2, 156, 157, 3, 2, 2, 2, 157, 159, 3, 2, 2, 2, 158, 141, 3, 2, 2, 2, 158, 152, 3, 2, 2, 2, 159, 24, 3, 2, 2, 2, 160, 161, 9, 3, 2, 2, 161, 26, 3, 2, 2, 2, 162, 163, 9, 4, 2, 2, 163, 164, 9, 5, 2, 2, 164, 165, 9, 6, 2, 2, 165, 28, 3, 2, 2, 2, 166, 167, 9, 6, 2, 2, 167, 168, 9, 7, 2, 2, 168, 169, 9, 8, 2, 2, 169, 30, 3, 2, 2, 2, 170, 171, 7, 44, 2, 2, 171, 32, 3, 2, 2, 2, 172, 173, 7, 49, 2, 2, 173, 34, 3, 2, 2, 2, 174, 175, 7, 45, 2, 2, 175, 36, 3, 2, 2, 2, 176, 177, 7, 47, 2, 2, 177, 38, 3, 2, 2, 2, 178, 179, 9, 9, 2, 2, 179, 180, 9, 7, 2, 2, 180, 40, 3, 2, 2, 2, 181, 182, 9, 10, 2, 2, 182, 183, 7, 45, 2, 2, 183, 42, 3, 2, 2, 2, 184, 185, 9, 10, 2, 2, 185, 186, 7, 47, 2, 2, 186, 44, 3, 2, 2, 2, 187, 188, 9, 10, 2, 2, 188, 46, 3, 2, 2, 2, 189, 190, 9, 11, 2, 2, 190, 191, 9, 12, 2, 2, 191, 192, 9, 13, 2, 2, 192, 193, 9, 14, 2, 2, 193, 48, 3, 2, 2, 2, 194, 195, 9, 11, 2, 2, 195, 196, 9, 12, 2, 2, 196, 197, 9, 13, 2, 2, 197, 50, 3, 2, 2, 2, 198, 199, 9, 15, 2, 2, 199, 200, 9, 16, 2, 2, 200, 201, 9, 5, 2, 2, 201, 202, 9, 5, 2, 2, 202, 203, 9, 13, 2, 2, 203, 52, 3, 2, 2, 2, 204, 205, 9, 17, 2, 2, 205, 206, 9, 10, 2, 2, 206, 207, 9, 7, 2, 2, 207, 208, 9, 16, 2, 2, 208, 54, 3, 2, 2, 2, 209, 210, 9, 18, 2, 2, 210, 211, 9, 19, 2, 2, 211, 212, 9, 11, 2, 2, 212, 56, 3, 2, 2, 2, 213, 214, 9, 13, 2, 2, 214, 215, 9, 5, 2, 2, 215, 216, 9, 20, 2, 2, 216, 217, 9, 21, 2, 2, 217, 218, 9, 6, 2, 2, 218, 219, 9, 22, 2, 2, 219, 58, 3, 2, 2, 2, 220, 221, 9, 13, 2, 2, 221, 222, 9, 5, 2, 2, 222, 223, 9, 20, 2, 2, 223, 224, 9, 21, 2, 2, 224, 225, 9, 6, 2, 2, 225, 60, 3, 2, 2, 2, 226, 227, 9, 14, 2, 2, 227, 228, 9, 13, 2, 2, 228, 229, 9, 20, 2, 2, 229, 230, 9, 21, 2, 2, 230, 231, 9, 17, 2, 2, 231, 62, 3, 2, 2, 2, 232, 233, 9, 11, 2, 2, 233, 234, 9, 7, 2, 2, 234, 235, 9, 21, 2, 2, 235, 64, 3, 2, 2, 2, 236, 237, 9, 17, 2, 2, 237, 238, 9, 5, 2, 2, 238, 239, 9, 11, 2, 2, 239, 66, 3, 2, 2, 2, 240, 241, 9, 14, 2, 2, 241, 242, 9, 18, 2, 2, 242, 243, 9, 21, 2, 2, 243, 68, 3, 2, 2, 2, 244, 245, 9, 17, 2, 2, 245, 246, 9, 5, 2, 2, 246, 247, 9, 14, 2, 2, 247, 70, 3, 2, 2, 2, 248, 249, 9, 11, 2, 2, 249, 250, 9, 7, 2, 2, 250, 251, 9, 21, 2, 2, 251, 252, 9, 23, 2, 2, 252, 72, 3, 2, 2, 2, 253, 254, 9, 17, 2, 2, 254, 255, 9, 5, 2, 2, 255, 256, 9, 11, 2, 2, 256, 257, 9, 23, 2, 2, 257, 74, 3, 2, 2, 2, 258, 259, 9, 14, 2, 2, 259, 260, 9, 18, 2, 2, 260, 261, 9, 21, 2, 2, 261, 262, 9, 23, 2, 2, 262, 76, 3, 2, 2, 2, 263, 264, 9, 18, 2, 2, 264, 265, 9, 13, 2, 2, 265, 266, 9, 17, 2, 2, 266, 267, 9, 11, 2, 2, 267, 268, 9, 7, 2, 2, 268, 269, 9, 21, 2, 2, 269, 78, 3, 2, 2, 2, 270, 271, 9, 18, 2, 2, 271, 272, 9, 13, 2, 2, 272, 273, 9, 17, 2, 2, 273, 274, 9, 17, 2, 2, 274, 275, 9, 5, 2, 2, 275, 276, 9, 11, 2, 2, 276, 80, 3, 2, 2, 2, 277, 278, 9, 18, 2, 2, 278, 279, 9, 13, 2, 2, 279, 280, 9, 17, 2, 2, 280, 281, 9, 14, 2, 2, 281, 282, 9, 18, 2, 2, 282, 283, 9, 21, 2, 2, 283, 82, 3, 2, 2, 2, 284, 285, 9, 18, 2, 2, 285, 286, 9, 13, 2, 2, 286, 287, 9, 17, 2, 2, 287, 288, 9, 14, 2, 2, 288, 289, 9, 18, 2, 2, 289, 290, 9, 21, 2, 2, 290, 291, 9, 24, 2, 2, 291, 84, 3, 2, 2, 2, 292, 293, 9, 18, 2, 2, 293, 294, 9, 13, 2, 2, 294, 295, 9, 17, 2, 2, 295, 296, 9, 17, 2, 2, 296, 297, 9, 5, 2, 2, 297, 298, 9, 14, 2, 2, 298, 86, 3, 2, 2, 2, 299, 300, 9, 10, 2, 2, 300, 301, 9, 25, 2, 2, 301, 302, 9, 9, 2, 2, 302, 88, 3, 2, 2, 2, 303, 304, 9, 16, 2, 2, 304, 305, 9, 21, 2, 2, 305, 90, 3, 2, 2, 2, 306, 307, 9, 10, 2, 2, 307, 308, 9, 10, 2, 2, 308, 309, 9, 25, 2, 2, 309, 92, 3, 2, 2, 2, 310, 311, 9, 16, 2, 2, 311, 312, 9, 5, 2, 2, 312, 313, 9, 26, 2, 2, 313, 94, 3, 2, 2, 2, 314, 315, 9, 13, 2, 2, 315, 316, 9, 18, 2, 2, 316, 317, 9, 6, 2, 2, 317, 96, 3, 2, 2, 2, 318, 319, 9, 6, 2, 2, 319, 320, 9, 10, 2, 2, 320, 321, 9, 26, 2, 2, 321, 98, 3, 2, 2, 2, 322, 323, 9, 27, 2, 2, 323, 324, 3, 2, 2, 2, 324, 325, 8, 50, 2, 2, 325, 100, 3, 2, 2, 2, 326, 327, 5, 109, 55, 2, 327, 328, 3, 2, 2, 2, 328, 329, 8, 51, 2, 2, 329, 102, 3, 2, 2, 2, 330, 332, 7, 37, 2, 2, 331, 333, 9, 28, 2, 2, 332, 331, 3, 2, 2, 2, 333, 334, 3, 2, 2, 2, 334, 332, 3, 2, 2, 2, 334, 335, 3, 2, 2, 2, 335, 104, 3, 2, 2, 2, 336, 337, 7, 61, 2, 2, 337, 106, 3, 2, 2, 2, 338, 339, 11, 2, 2, 2, 339, 108, 3, 2, 2, 2, 340, 341, 7, 49, 2, 2, 341, 342, 7, 44, 2, 2, 342, 346, 3, 2, 2, 2, 343, 345, 11, 2, 2, 2, 344, 343, 3, 2, 2, 2, 345, 348, 3, 2, 2, 2, 346, 347, 3, 2, 2, 2, 346, 344, 3, 2, 2, 2, 347, 349, 3, 2, 2, 2, 348, 346, 3, 2, 2, 2, 349, 350, 7, 44, 2, 2, 350, 368, 7, 49, 2, 2, 351, 355, 7, 41, 2, 2, 352, 354, 11, 2, 2, 2, 353, 352, 3, 2, 2, 2, 354, 357, 3, 2, 2, 2, 355, 356, 3, 2, 2, 2, 355, 353, 3, 2, 2, 2, 356, 358, 3, 2, 2, 2, 357, 355, 3, 2, 2, 2, 358, 368, 7, 41, 2, 2, 359, 363, 7, 36, 2, 2, 360, 362, 11, 2, 2, 2, 361, 360, 3, 2, 2, 2, 362, 365, 3, 2, 2, 2, 363, 364, 3, 2, 2, 2, 363, 361, 3, 2, 2, 2, 364, 366, 3, 2, 2, 2, 365, 363, 3, 2, 2, 2, 366, 368, 7, 36, 2, 2, 367, 340, 3, 2, 2, 2, 367, 351, 3, 2, 2, 2, 367, 359, 3, 2, 2, 2, 368, 110, 3, 2, 2, 2, 15, 2, 136, 138, 143, 149, 156, 158, 332, 334, 346, 355, 363, 367, 3, 8, 2, 2] \ No newline at end of file diff --git a/src/GeneratedAntlr/CalculatorLexer.tokens b/src/GeneratedAntlr/CalculatorLexer.tokens index ff10e1b..510ed46 100644 --- a/src/GeneratedAntlr/CalculatorLexer.tokens +++ b/src/GeneratedAntlr/CalculatorLexer.tokens @@ -7,60 +7,61 @@ T__5=6 T__6=7 T__7=8 T__8=9 -T__9=10 -NUMBER=11 -FLOAT=12 -DIGIT=13 -MOD=14 -WHOLE=15 -MUL=16 -DIV=17 -ADD=18 -SUB=19 -PI=20 -EXPONENT=21 -NEGEXPONENT=22 -EULER=23 -SQRT=24 -SQR=25 -FLOOR=26 -CEIL=27 -ABS=28 -ROUNDK=29 -ROUND=30 -TRUNC=31 -SIN=32 -COS=33 -TAN=34 -COT=35 -SINH=36 -COSH=37 -TANH=38 -ARCSIN=39 -ARCCOS=40 -ARCTAN=41 -ARCTAN2=42 -ARCCOT=43 -EXP=44 -LN=45 -EEX=46 -LOG=47 -RAD=48 -DEG=49 -WS=50 -COM=51 -INVALID=52 +NUMBER=10 +FLOAT=11 +DIGIT=12 +MOD=13 +WHOLE=14 +MUL=15 +DIV=16 +ADD=17 +SUB=18 +PI=19 +EXPONENT=20 +NEGEXPONENT=21 +EULER=22 +SQRT=23 +SQR=24 +FLOOR=25 +CEIL=26 +ABS=27 +ROUNDK=28 +ROUND=29 +TRUNC=30 +SIN=31 +COS=32 +TAN=33 +COT=34 +SINH=35 +COSH=36 +TANH=37 +ARCSIN=38 +ARCCOS=39 +ARCTAN=40 +ARCTAN2=41 +ARCCOT=42 +EXP=43 +LN=44 +EEX=45 +LOG=46 +RAD=47 +DEG=48 +WS=49 +COM=50 +SUBSTITUTION=51 +SEMICOLON=52 +INVALID=53 '='=1 '('=2 -';'=3 -')'=4 -'^'=5 -'**'=6 -'%'=7 -'~'=8 -'//'=9 -'()'=10 -'*'=16 -'/'=17 -'+'=18 -'-'=19 +')'=3 +'^'=4 +'**'=5 +'%'=6 +'~'=7 +'//'=8 +'()'=9 +'*'=15 +'/'=16 +'+'=17 +'-'=18 +';'=52 diff --git a/src/GeneratedAntlr/CalculatorLexer.ts b/src/GeneratedAntlr/CalculatorLexer.ts index a278846..b57f4c3 100644 --- a/src/GeneratedAntlr/CalculatorLexer.ts +++ b/src/GeneratedAntlr/CalculatorLexer.ts @@ -1,4 +1,4 @@ -// Generated from ./src/Calculator.g4 by ANTLR 4.7.3-SNAPSHOT +// Generated from ./src/Calculator.g4 by ANTLR 4.9.0-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; @@ -25,49 +25,50 @@ export class CalculatorLexer extends Lexer { public static readonly T__6 = 7; public static readonly T__7 = 8; public static readonly T__8 = 9; - public static readonly T__9 = 10; - public static readonly NUMBER = 11; - public static readonly FLOAT = 12; - public static readonly DIGIT = 13; - public static readonly MOD = 14; - public static readonly WHOLE = 15; - public static readonly MUL = 16; - public static readonly DIV = 17; - public static readonly ADD = 18; - public static readonly SUB = 19; - public static readonly PI = 20; - public static readonly EXPONENT = 21; - public static readonly NEGEXPONENT = 22; - public static readonly EULER = 23; - public static readonly SQRT = 24; - public static readonly SQR = 25; - public static readonly FLOOR = 26; - public static readonly CEIL = 27; - public static readonly ABS = 28; - public static readonly ROUNDK = 29; - public static readonly ROUND = 30; - public static readonly TRUNC = 31; - public static readonly SIN = 32; - public static readonly COS = 33; - public static readonly TAN = 34; - public static readonly COT = 35; - public static readonly SINH = 36; - public static readonly COSH = 37; - public static readonly TANH = 38; - public static readonly ARCSIN = 39; - public static readonly ARCCOS = 40; - public static readonly ARCTAN = 41; - public static readonly ARCTAN2 = 42; - public static readonly ARCCOT = 43; - public static readonly EXP = 44; - public static readonly LN = 45; - public static readonly EEX = 46; - public static readonly LOG = 47; - public static readonly RAD = 48; - public static readonly DEG = 49; - public static readonly WS = 50; - public static readonly COM = 51; - public static readonly INVALID = 52; + public static readonly NUMBER = 10; + public static readonly FLOAT = 11; + public static readonly DIGIT = 12; + public static readonly MOD = 13; + public static readonly WHOLE = 14; + public static readonly MUL = 15; + public static readonly DIV = 16; + public static readonly ADD = 17; + public static readonly SUB = 18; + public static readonly PI = 19; + public static readonly EXPONENT = 20; + public static readonly NEGEXPONENT = 21; + public static readonly EULER = 22; + public static readonly SQRT = 23; + public static readonly SQR = 24; + public static readonly FLOOR = 25; + public static readonly CEIL = 26; + public static readonly ABS = 27; + public static readonly ROUNDK = 28; + public static readonly ROUND = 29; + public static readonly TRUNC = 30; + public static readonly SIN = 31; + public static readonly COS = 32; + public static readonly TAN = 33; + public static readonly COT = 34; + public static readonly SINH = 35; + public static readonly COSH = 36; + public static readonly TANH = 37; + public static readonly ARCSIN = 38; + public static readonly ARCCOS = 39; + public static readonly ARCTAN = 40; + public static readonly ARCTAN2 = 41; + public static readonly ARCCOT = 42; + public static readonly EXP = 43; + public static readonly LN = 44; + public static readonly EEX = 45; + public static readonly LOG = 46; + public static readonly RAD = 47; + public static readonly DEG = 48; + public static readonly WS = 49; + public static readonly COM = 50; + public static readonly SUBSTITUTION = 51; + public static readonly SEMICOLON = 52; + public static readonly INVALID = 53; // tslint:disable:no-trailing-whitespace public static readonly channelNames: string[] = [ @@ -81,26 +82,31 @@ export class CalculatorLexer extends Lexer { public static readonly ruleNames: string[] = [ "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8", - "T__9", "NUMBER", "FLOAT", "DIGIT", "MOD", "WHOLE", "MUL", "DIV", "ADD", - "SUB", "PI", "EXPONENT", "NEGEXPONENT", "EULER", "SQRT", "SQR", "FLOOR", - "CEIL", "ABS", "ROUNDK", "ROUND", "TRUNC", "SIN", "COS", "TAN", "COT", - "SINH", "COSH", "TANH", "ARCSIN", "ARCCOS", "ARCTAN", "ARCTAN2", "ARCCOT", - "EXP", "LN", "EEX", "LOG", "RAD", "DEG", "WS", "COM", "INVALID", "COMMENT", + "NUMBER", "FLOAT", "DIGIT", "MOD", "WHOLE", "MUL", "DIV", "ADD", "SUB", + "PI", "EXPONENT", "NEGEXPONENT", "EULER", "SQRT", "SQR", "FLOOR", "CEIL", + "ABS", "ROUNDK", "ROUND", "TRUNC", "SIN", "COS", "TAN", "COT", "SINH", + "COSH", "TANH", "ARCSIN", "ARCCOS", "ARCTAN", "ARCTAN2", "ARCCOT", "EXP", + "LN", "EEX", "LOG", "RAD", "DEG", "WS", "COM", "SUBSTITUTION", "SEMICOLON", + "INVALID", "COMMENT", ]; private static readonly _LITERAL_NAMES: Array = [ - undefined, "'='", "'('", "';'", "')'", "'^'", "'**'", "'%'", "'~'", "'//'", - "'()'", undefined, undefined, undefined, undefined, undefined, "'*'", - "'/'", "'+'", "'-'", + undefined, "'='", "'('", "')'", "'^'", "'**'", "'%'", "'~'", "'//'", "'()'", + undefined, undefined, undefined, undefined, undefined, "'*'", "'/'", "'+'", + "'-'", undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, "';'", ]; private static readonly _SYMBOLIC_NAMES: Array = [ undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, "NUMBER", "FLOAT", "DIGIT", - "MOD", "WHOLE", "MUL", "DIV", "ADD", "SUB", "PI", "EXPONENT", "NEGEXPONENT", - "EULER", "SQRT", "SQR", "FLOOR", "CEIL", "ABS", "ROUNDK", "ROUND", "TRUNC", - "SIN", "COS", "TAN", "COT", "SINH", "COSH", "TANH", "ARCSIN", "ARCCOS", - "ARCTAN", "ARCTAN2", "ARCCOT", "EXP", "LN", "EEX", "LOG", "RAD", "DEG", - "WS", "COM", "INVALID", + undefined, undefined, undefined, "NUMBER", "FLOAT", "DIGIT", "MOD", "WHOLE", + "MUL", "DIV", "ADD", "SUB", "PI", "EXPONENT", "NEGEXPONENT", "EULER", + "SQRT", "SQR", "FLOOR", "CEIL", "ABS", "ROUNDK", "ROUND", "TRUNC", "SIN", + "COS", "TAN", "COT", "SINH", "COSH", "TANH", "ARCSIN", "ARCCOS", "ARCTAN", + "ARCTAN2", "ARCCOT", "EXP", "LN", "EEX", "LOG", "RAD", "DEG", "WS", "COM", + "SUBSTITUTION", "SEMICOLON", "INVALID", ]; public static readonly VOCABULARY: Vocabulary = new VocabularyImpl(CalculatorLexer._LITERAL_NAMES, CalculatorLexer._SYMBOLIC_NAMES, []); @@ -133,7 +139,7 @@ export class CalculatorLexer extends Lexer { public get modeNames(): string[] { return CalculatorLexer.modeNames; } public static readonly _serializedATN: string = - "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x026\u0169\b\x01" + + "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x027\u0171\b\x01" + "\x04\x02\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06" + "\x04\x07\t\x07\x04\b\t\b\x04\t\t\t\x04\n\t\n\x04\v\t\v\x04\f\t\f\x04\r" + "\t\r\x04\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12\t" + @@ -142,160 +148,165 @@ export class CalculatorLexer extends Lexer { "\x1C\x04\x1D\t\x1D\x04\x1E\t\x1E\x04\x1F\t\x1F\x04 \t \x04!\t!\x04\"\t" + "\"\x04#\t#\x04$\t$\x04%\t%\x04&\t&\x04\'\t\'\x04(\t(\x04)\t)\x04*\t*\x04" + "+\t+\x04,\t,\x04-\t-\x04.\t.\x04/\t/\x040\t0\x041\t1\x042\t2\x043\t3\x04" + - "4\t4\x045\t5\x046\t6\x03\x02\x03\x02\x03\x03\x03\x03\x03\x04\x03\x04\x03" + - "\x05\x03\x05\x03\x06\x03\x06\x03\x07\x03\x07\x03\x07\x03\b\x03\b\x03\t" + - "\x03\t\x03\n\x03\n\x03\n\x03\v\x03\v\x03\v\x03\f\x03\f\x06\f\x87\n\f\r" + - "\f\x0E\f\x88\x05\f\x8B\n\f\x03\r\x06\r\x8E\n\r\r\r\x0E\r\x8F\x03\r\x03" + - "\r\x07\r\x94\n\r\f\r\x0E\r\x97\v\r\x03\r\x03\r\x06\r\x9B\n\r\r\r\x0E\r" + - "\x9C\x05\r\x9F\n\r\x03\x0E\x03\x0E\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03" + - "\x10\x03\x10\x03\x10\x03\x10\x03\x11\x03\x11\x03\x12\x03\x12\x03\x13\x03" + - "\x13\x03\x14\x03\x14\x03\x15\x03\x15\x03\x15\x03\x16\x03\x16\x03\x16\x03" + - "\x17\x03\x17\x03\x17\x03\x18\x03\x18\x03\x19\x03\x19\x03\x19\x03\x19\x03" + - "\x19\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03" + - "\x1B\x03\x1B\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1D\x03\x1D\x03" + - "\x1D\x03\x1D\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03" + - "\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03 \x03 \x03 \x03 \x03 " + - "\x03 \x03!\x03!\x03!\x03!\x03\"\x03\"\x03\"\x03\"\x03#\x03#\x03#\x03#" + - "\x03$\x03$\x03$\x03$\x03%\x03%\x03%\x03%\x03%\x03&\x03&\x03&\x03&\x03" + - "&\x03\'\x03\'\x03\'\x03\'\x03\'\x03(\x03(\x03(\x03(\x03(\x03(\x03(\x03" + - ")\x03)\x03)\x03)\x03)\x03)\x03)\x03*\x03*\x03*\x03*\x03*\x03*\x03*\x03" + - "+\x03+\x03+\x03+\x03+\x03+\x03+\x03+\x03,\x03,\x03,\x03,\x03,\x03,\x03" + - ",\x03-\x03-\x03-\x03-\x03.\x03.\x03.\x03/\x03/\x03/\x03/\x030\x030\x03" + - "0\x030\x031\x031\x031\x031\x032\x032\x032\x032\x033\x033\x033\x033\x03" + - "4\x034\x034\x034\x035\x035\x036\x036\x036\x036\x076\u0151\n6\f6\x0E6\u0154" + - "\v6\x036\x036\x036\x036\x076\u015A\n6\f6\x0E6\u015D\v6\x036\x036\x036" + - "\x076\u0162\n6\f6\x0E6\u0165\v6\x036\x056\u0168\n6\x05\u0152\u015B\u0163" + - "\x02\x027\x03\x02\x03\x05\x02\x04\x07\x02\x05\t\x02\x06\v\x02\x07\r\x02" + - "\b\x0F\x02\t\x11\x02\n\x13\x02\v\x15\x02\f\x17\x02\r\x19\x02\x0E\x1B\x02" + - "\x0F\x1D\x02\x10\x1F\x02\x11!\x02\x12#\x02\x13%\x02\x14\'\x02\x15)\x02" + - "\x16+\x02\x17-\x02\x18/\x02\x191\x02\x1A3\x02\x1B5\x02\x1C7\x02\x1D9\x02" + - "\x1E;\x02\x1F=\x02 ?\x02!A\x02\"C\x02#E\x02$G\x02%I\x02&K\x02\'M\x02(" + - "O\x02)Q\x02*S\x02+U\x02,W\x02-Y\x02.[\x02/]\x020_\x021a\x022c\x023e\x02" + - "4g\x025i\x026k\x02\x02\x03\x02\x1C\x04\x02..00\x03\x022;\x04\x02OOoo\x04" + - "\x02QQqq\x04\x02FFff\x04\x02KKkk\x04\x02XXxx\x04\x02RRrr\x04\x02GGgg\x04" + - "\x02UUuu\x04\x02SSss\x04\x02TTtt\x04\x02VVvv\x04\x02HHhh\x04\x02NNnn\x04" + - "\x02EEee\x04\x02CCcc\x04\x02DDdd\x04\x02WWww\x04\x02PPpp\x04\x02MMmm\x04" + - "\x02JJjj\x03\x0244\x04\x02ZZzz\x04\x02IIii\x05\x02\v\f\x0F\x0F\"\"\x02" + - "\u0172\x02\x03\x03\x02\x02\x02\x02\x05\x03\x02\x02\x02\x02\x07\x03\x02" + - "\x02\x02\x02\t\x03\x02\x02\x02\x02\v\x03\x02\x02\x02\x02\r\x03\x02\x02" + - "\x02\x02\x0F\x03\x02\x02\x02\x02\x11\x03\x02\x02\x02\x02\x13\x03\x02\x02" + - "\x02\x02\x15\x03\x02\x02\x02\x02\x17\x03\x02\x02\x02\x02\x19\x03\x02\x02" + - "\x02\x02\x1B\x03\x02\x02\x02\x02\x1D\x03\x02\x02\x02\x02\x1F\x03\x02\x02" + - "\x02\x02!\x03\x02\x02\x02\x02#\x03\x02\x02\x02\x02%\x03\x02\x02\x02\x02" + - "\'\x03\x02\x02\x02\x02)\x03\x02\x02\x02\x02+\x03\x02\x02\x02\x02-\x03" + - "\x02\x02\x02\x02/\x03\x02\x02\x02\x021\x03\x02\x02\x02\x023\x03\x02\x02" + - "\x02\x025\x03\x02\x02\x02\x027\x03\x02\x02\x02\x029\x03\x02\x02\x02\x02" + - ";\x03\x02\x02\x02\x02=\x03\x02\x02\x02\x02?\x03\x02\x02\x02\x02A\x03\x02" + - "\x02\x02\x02C\x03\x02\x02\x02\x02E\x03\x02\x02\x02\x02G\x03\x02\x02\x02" + - "\x02I\x03\x02\x02\x02\x02K\x03\x02\x02\x02\x02M\x03\x02\x02\x02\x02O\x03" + - "\x02\x02\x02\x02Q\x03\x02\x02\x02\x02S\x03\x02\x02\x02\x02U\x03\x02\x02" + - "\x02\x02W\x03\x02\x02\x02\x02Y\x03\x02\x02\x02\x02[\x03\x02\x02\x02\x02" + - "]\x03\x02\x02\x02\x02_\x03\x02\x02\x02\x02a\x03\x02\x02\x02\x02c\x03\x02" + - "\x02\x02\x02e\x03\x02\x02\x02\x02g\x03\x02\x02\x02\x02i\x03\x02\x02\x02" + - "\x03m\x03\x02\x02\x02\x05o\x03\x02\x02\x02\x07q\x03\x02\x02\x02\ts\x03" + - "\x02\x02\x02\vu\x03\x02\x02\x02\rw\x03\x02\x02\x02\x0Fz\x03\x02\x02\x02" + - "\x11|\x03\x02\x02\x02\x13~\x03\x02\x02\x02\x15\x81\x03\x02\x02\x02\x17" + - "\x8A\x03\x02\x02\x02\x19\x9E\x03\x02\x02\x02\x1B\xA0\x03\x02\x02\x02\x1D" + - "\xA2\x03\x02\x02\x02\x1F\xA6\x03\x02\x02\x02!\xAA\x03\x02\x02\x02#\xAC" + - "\x03\x02\x02\x02%\xAE\x03\x02\x02\x02\'\xB0\x03\x02\x02\x02)\xB2\x03\x02" + - "\x02\x02+\xB5\x03\x02\x02\x02-\xB8\x03\x02\x02\x02/\xBB\x03\x02\x02\x02" + - "1\xBD\x03\x02\x02\x023\xC2\x03\x02\x02\x025\xC6\x03\x02\x02\x027\xCC\x03" + - "\x02\x02\x029\xD1\x03\x02\x02\x02;\xD5\x03\x02\x02\x02=\xDC\x03\x02\x02" + - "\x02?\xE2\x03\x02\x02\x02A\xE8\x03\x02\x02\x02C\xEC\x03\x02\x02\x02E\xF0" + - "\x03\x02\x02\x02G\xF4\x03\x02\x02\x02I\xF8\x03\x02\x02\x02K\xFD\x03\x02" + - "\x02\x02M\u0102\x03\x02\x02\x02O\u0107\x03\x02\x02\x02Q\u010E\x03\x02" + - "\x02\x02S\u0115\x03\x02\x02\x02U\u011C\x03\x02\x02\x02W\u0124\x03\x02" + - "\x02\x02Y\u012B\x03\x02\x02\x02[\u012F\x03\x02\x02\x02]\u0132\x03\x02" + - "\x02\x02_\u0136\x03\x02\x02\x02a\u013A\x03\x02\x02\x02c\u013E\x03\x02" + - "\x02\x02e\u0142\x03\x02\x02\x02g\u0146\x03\x02\x02\x02i\u014A\x03\x02" + - "\x02\x02k\u0167\x03\x02\x02\x02mn\x07?\x02\x02n\x04\x03\x02\x02\x02op" + - "\x07*\x02\x02p\x06\x03\x02\x02\x02qr\x07=\x02\x02r\b\x03\x02\x02\x02s" + - "t\x07+\x02\x02t\n\x03\x02\x02\x02uv\x07`\x02\x02v\f\x03\x02\x02\x02wx" + - "\x07,\x02\x02xy\x07,\x02\x02y\x0E\x03\x02\x02\x02z{\x07\'\x02\x02{\x10" + - "\x03\x02\x02\x02|}\x07\x80\x02\x02}\x12\x03\x02\x02\x02~\x7F\x071\x02" + - "\x02\x7F\x80\x071\x02\x02\x80\x14\x03\x02\x02\x02\x81\x82\x07*\x02\x02" + - "\x82\x83\x07+\x02\x02\x83\x16\x03\x02\x02\x02\x84\x8B\x05\x19\r\x02\x85" + - "\x87\x05\x1B\x0E\x02\x86\x85\x03\x02\x02\x02\x87\x88\x03\x02\x02\x02\x88" + - "\x86\x03\x02\x02\x02\x88\x89\x03\x02\x02\x02\x89\x8B\x03\x02\x02\x02\x8A" + - "\x84\x03\x02\x02\x02\x8A\x86\x03\x02\x02\x02\x8B\x18\x03\x02\x02\x02\x8C" + - "\x8E\x05\x1B\x0E\x02\x8D\x8C\x03\x02\x02\x02\x8E\x8F\x03\x02\x02\x02\x8F" + - "\x8D\x03\x02\x02\x02\x8F\x90\x03\x02\x02\x02\x90\x91\x03\x02\x02\x02\x91" + - "\x95\t\x02\x02\x02\x92\x94\x05\x1B\x0E\x02\x93\x92\x03\x02\x02\x02\x94" + - "\x97\x03\x02\x02\x02\x95\x93\x03\x02\x02\x02\x95\x96\x03\x02\x02\x02\x96" + - "\x9F\x03\x02\x02\x02\x97\x95\x03\x02\x02\x02\x98\x9A\t\x02\x02\x02\x99" + - "\x9B\x05\x1B\x0E\x02\x9A\x99\x03\x02\x02\x02\x9B\x9C\x03\x02\x02\x02\x9C" + - "\x9A\x03\x02\x02\x02\x9C\x9D\x03\x02\x02\x02\x9D\x9F\x03\x02\x02\x02\x9E" + - "\x8D\x03\x02\x02\x02\x9E\x98\x03\x02\x02\x02\x9F\x1A\x03\x02\x02\x02\xA0" + - "\xA1\t\x03\x02\x02\xA1\x1C\x03\x02\x02\x02\xA2\xA3\t\x04\x02\x02\xA3\xA4" + - "\t\x05\x02\x02\xA4\xA5\t\x06\x02\x02\xA5\x1E\x03\x02\x02\x02\xA6\xA7\t" + - "\x06\x02\x02\xA7\xA8\t\x07\x02\x02\xA8\xA9\t\b\x02\x02\xA9 \x03\x02\x02" + - "\x02\xAA\xAB\x07,\x02\x02\xAB\"\x03\x02\x02\x02\xAC\xAD\x071\x02\x02\xAD" + - "$\x03\x02\x02\x02\xAE\xAF\x07-\x02\x02\xAF&\x03\x02\x02\x02\xB0\xB1\x07" + - "/\x02\x02\xB1(\x03\x02\x02\x02\xB2\xB3\t\t\x02\x02\xB3\xB4\t\x07\x02\x02" + - "\xB4*\x03\x02\x02\x02\xB5\xB6\t\n\x02\x02\xB6\xB7\x07-\x02\x02\xB7,\x03" + - "\x02\x02\x02\xB8\xB9\t\n\x02\x02\xB9\xBA\x07/\x02\x02\xBA.\x03\x02\x02" + - "\x02\xBB\xBC\t\n\x02\x02\xBC0\x03\x02\x02\x02\xBD\xBE\t\v\x02\x02\xBE" + - "\xBF\t\f\x02\x02\xBF\xC0\t\r\x02\x02\xC0\xC1\t\x0E\x02\x02\xC12\x03\x02" + - "\x02\x02\xC2\xC3\t\v\x02\x02\xC3\xC4\t\f\x02\x02\xC4\xC5\t\r\x02\x02\xC5" + - "4\x03\x02\x02\x02\xC6\xC7\t\x0F\x02\x02\xC7\xC8\t\x10\x02\x02\xC8\xC9" + - "\t\x05\x02\x02\xC9\xCA\t\x05\x02\x02\xCA\xCB\t\r\x02\x02\xCB6\x03\x02" + - "\x02\x02\xCC\xCD\t\x11\x02\x02\xCD\xCE\t\n\x02\x02\xCE\xCF\t\x07\x02\x02" + - "\xCF\xD0\t\x10\x02\x02\xD08\x03\x02\x02\x02\xD1\xD2\t\x12\x02\x02\xD2" + - "\xD3\t\x13\x02\x02\xD3\xD4\t\v\x02\x02\xD4:\x03\x02\x02\x02\xD5\xD6\t" + - "\r\x02\x02\xD6\xD7\t\x05\x02\x02\xD7\xD8\t\x14\x02\x02\xD8\xD9\t\x15\x02" + - "\x02\xD9\xDA\t\x06\x02\x02\xDA\xDB\t\x16\x02\x02\xDB<\x03\x02\x02\x02" + - "\xDC\xDD\t\r\x02\x02\xDD\xDE\t\x05\x02\x02\xDE\xDF\t\x14\x02\x02\xDF\xE0" + - "\t\x15\x02\x02\xE0\xE1\t\x06\x02\x02\xE1>\x03\x02\x02\x02\xE2\xE3\t\x0E" + - "\x02\x02\xE3\xE4\t\r\x02\x02\xE4\xE5\t\x14\x02\x02\xE5\xE6\t\x15\x02\x02" + - "\xE6\xE7\t\x11\x02\x02\xE7@\x03\x02\x02\x02\xE8\xE9\t\v\x02\x02\xE9\xEA" + - "\t\x07\x02\x02\xEA\xEB\t\x15\x02\x02\xEBB\x03\x02\x02\x02\xEC\xED\t\x11" + - "\x02\x02\xED\xEE\t\x05\x02\x02\xEE\xEF\t\v\x02\x02\xEFD\x03\x02\x02\x02" + - "\xF0\xF1\t\x0E\x02\x02\xF1\xF2\t\x12\x02\x02\xF2\xF3\t\x15\x02\x02\xF3" + - "F\x03\x02\x02\x02\xF4\xF5\t\x11\x02\x02\xF5\xF6\t\x05\x02\x02\xF6\xF7" + - "\t\x0E\x02\x02\xF7H\x03\x02\x02\x02\xF8\xF9\t\v\x02\x02\xF9\xFA\t\x07" + - "\x02\x02\xFA\xFB\t\x15\x02\x02\xFB\xFC\t\x17\x02\x02\xFCJ\x03\x02\x02" + - "\x02\xFD\xFE\t\x11\x02\x02\xFE\xFF\t\x05\x02\x02\xFF\u0100\t\v\x02\x02" + - "\u0100\u0101\t\x17\x02\x02\u0101L\x03\x02\x02\x02\u0102\u0103\t\x0E\x02" + - "\x02\u0103\u0104\t\x12\x02\x02\u0104\u0105\t\x15\x02\x02\u0105\u0106\t" + - "\x17\x02\x02\u0106N\x03\x02\x02\x02\u0107\u0108\t\x12\x02\x02\u0108\u0109" + - "\t\r\x02\x02\u0109\u010A\t\x11\x02\x02\u010A\u010B\t\v\x02\x02\u010B\u010C" + - "\t\x07\x02\x02\u010C\u010D\t\x15\x02\x02\u010DP\x03\x02\x02\x02\u010E" + - "\u010F\t\x12\x02\x02\u010F\u0110\t\r\x02\x02\u0110\u0111\t\x11\x02\x02" + - "\u0111\u0112\t\x11\x02\x02\u0112\u0113\t\x05\x02\x02\u0113\u0114\t\v\x02" + - "\x02\u0114R\x03\x02\x02\x02\u0115\u0116\t\x12\x02\x02\u0116\u0117\t\r" + - "\x02\x02\u0117\u0118\t\x11\x02\x02\u0118\u0119\t\x0E\x02\x02\u0119\u011A" + - "\t\x12\x02\x02\u011A\u011B\t\x15\x02\x02\u011BT\x03\x02\x02\x02\u011C" + - "\u011D\t\x12\x02\x02\u011D\u011E\t\r\x02\x02\u011E\u011F\t\x11\x02\x02" + - "\u011F\u0120\t\x0E\x02\x02\u0120\u0121\t\x12\x02\x02\u0121\u0122\t\x15" + - "\x02\x02\u0122\u0123\t\x18\x02\x02\u0123V\x03\x02\x02\x02\u0124\u0125" + - "\t\x12\x02\x02\u0125\u0126\t\r\x02\x02\u0126\u0127\t\x11\x02\x02\u0127" + - "\u0128\t\x11\x02\x02\u0128\u0129\t\x05\x02\x02\u0129\u012A\t\x0E\x02\x02" + - "\u012AX\x03\x02\x02\x02\u012B\u012C\t\n\x02\x02\u012C\u012D\t\x19\x02" + - "\x02\u012D\u012E\t\t\x02\x02\u012EZ\x03\x02\x02\x02\u012F\u0130\t\x10" + - "\x02\x02\u0130\u0131\t\x15\x02\x02\u0131\\\x03\x02\x02\x02\u0132\u0133" + - "\t\n\x02\x02\u0133\u0134\t\n\x02\x02\u0134\u0135\t\x19\x02\x02\u0135^" + - "\x03\x02\x02\x02\u0136\u0137\t\x10\x02\x02\u0137\u0138\t\x05\x02\x02\u0138" + - "\u0139\t\x1A\x02\x02\u0139`\x03\x02\x02\x02\u013A\u013B\t\r\x02\x02\u013B" + - "\u013C\t\x12\x02\x02\u013C\u013D\t\x06\x02\x02\u013Db\x03\x02\x02\x02" + - "\u013E\u013F\t\x06\x02\x02\u013F\u0140\t\n\x02\x02\u0140\u0141\t\x1A\x02" + - "\x02\u0141d\x03\x02\x02\x02\u0142\u0143\t\x1B\x02\x02\u0143\u0144\x03" + - "\x02\x02\x02\u0144\u0145\b3\x02\x02\u0145f\x03\x02\x02\x02\u0146\u0147" + - "\x05k6\x02\u0147\u0148\x03\x02\x02\x02\u0148\u0149\b4\x02\x02\u0149h\x03" + - "\x02\x02\x02\u014A\u014B\v\x02\x02\x02\u014Bj\x03\x02\x02\x02\u014C\u014D" + - "\x071\x02\x02\u014D\u014E\x07,\x02\x02\u014E\u0152\x03\x02\x02\x02\u014F" + - "\u0151\v\x02\x02\x02\u0150\u014F\x03\x02\x02\x02\u0151\u0154\x03\x02\x02" + - "\x02\u0152\u0153\x03\x02\x02\x02\u0152\u0150\x03\x02\x02\x02\u0153\u0155" + - "\x03\x02\x02\x02\u0154\u0152\x03\x02\x02\x02\u0155\u0156\x07,\x02\x02" + - "\u0156\u0168\x071\x02\x02\u0157\u015B\x07)\x02\x02\u0158\u015A\v\x02\x02" + - "\x02\u0159\u0158\x03\x02\x02\x02\u015A\u015D\x03\x02\x02\x02\u015B\u015C" + - "\x03\x02\x02\x02\u015B\u0159\x03\x02\x02\x02\u015C\u015E\x03\x02\x02\x02" + - "\u015D\u015B\x03\x02\x02\x02\u015E\u0168\x07)\x02\x02\u015F\u0163\x07" + - "$\x02\x02\u0160\u0162\v\x02\x02\x02\u0161\u0160\x03\x02\x02\x02\u0162" + - "\u0165\x03\x02\x02\x02\u0163\u0164\x03\x02\x02\x02\u0163\u0161\x03\x02" + - "\x02\x02\u0164\u0166\x03\x02\x02\x02\u0165\u0163\x03\x02\x02\x02\u0166" + - "\u0168\x07$\x02\x02\u0167\u014C\x03\x02\x02\x02\u0167\u0157\x03\x02\x02" + - "\x02\u0167\u015F\x03\x02\x02\x02\u0168l\x03\x02\x02\x02\r\x02\x88\x8A" + - "\x8F\x95\x9C\x9E\u0152\u015B\u0163\u0167\x03\b\x02\x02"; + "4\t4\x045\t5\x046\t6\x047\t7\x03\x02\x03\x02\x03\x03\x03\x03\x03\x04\x03" + + "\x04\x03\x05\x03\x05\x03\x06\x03\x06\x03\x06\x03\x07\x03\x07\x03\b\x03" + + "\b\x03\t\x03\t\x03\t\x03\n\x03\n\x03\n\x03\v\x03\v\x06\v\x87\n\v\r\v\x0E" + + "\v\x88\x05\v\x8B\n\v\x03\f\x06\f\x8E\n\f\r\f\x0E\f\x8F\x03\f\x03\f\x07" + + "\f\x94\n\f\f\f\x0E\f\x97\v\f\x03\f\x03\f\x06\f\x9B\n\f\r\f\x0E\f\x9C\x05" + + "\f\x9F\n\f\x03\r\x03\r\x03\x0E\x03\x0E\x03\x0E\x03\x0E\x03\x0F\x03\x0F" + + "\x03\x0F\x03\x0F\x03\x10\x03\x10\x03\x11\x03\x11\x03\x12\x03\x12\x03\x13" + + "\x03\x13\x03\x14\x03\x14\x03\x14\x03\x15\x03\x15\x03\x15\x03\x16\x03\x16" + + "\x03\x16\x03\x17\x03\x17\x03\x18\x03\x18\x03\x18\x03\x18\x03\x18\x03\x19" + + "\x03\x19\x03\x19\x03\x19\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A" + + "\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1C\x03\x1C\x03\x1C\x03\x1C" + + "\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1E\x03\x1E" + + "\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F" + + "\x03\x1F\x03 \x03 \x03 \x03 \x03!\x03!\x03!\x03!\x03\"\x03\"\x03\"\x03" + + "\"\x03#\x03#\x03#\x03#\x03$\x03$\x03$\x03$\x03$\x03%\x03%\x03%\x03%\x03" + + "%\x03&\x03&\x03&\x03&\x03&\x03\'\x03\'\x03\'\x03\'\x03\'\x03\'\x03\'\x03" + + "(\x03(\x03(\x03(\x03(\x03(\x03(\x03)\x03)\x03)\x03)\x03)\x03)\x03)\x03" + + "*\x03*\x03*\x03*\x03*\x03*\x03*\x03*\x03+\x03+\x03+\x03+\x03+\x03+\x03" + + "+\x03,\x03,\x03,\x03,\x03-\x03-\x03-\x03.\x03.\x03.\x03.\x03/\x03/\x03" + + "/\x03/\x030\x030\x030\x030\x031\x031\x031\x031\x032\x032\x032\x032\x03" + + "3\x033\x033\x033\x034\x034\x064\u014D\n4\r4\x0E4\u014E\x035\x035\x036" + + "\x036\x037\x037\x037\x037\x077\u0159\n7\f7\x0E7\u015C\v7\x037\x037\x03" + + "7\x037\x077\u0162\n7\f7\x0E7\u0165\v7\x037\x037\x037\x077\u016A\n7\f7" + + "\x0E7\u016D\v7\x037\x057\u0170\n7\x05\u015A\u0163\u016B\x02\x028\x03\x02" + + "\x03\x05\x02\x04\x07\x02\x05\t\x02\x06\v\x02\x07\r\x02\b\x0F\x02\t\x11" + + "\x02\n\x13\x02\v\x15\x02\f\x17\x02\r\x19\x02\x0E\x1B\x02\x0F\x1D\x02\x10" + + "\x1F\x02\x11!\x02\x12#\x02\x13%\x02\x14\'\x02\x15)\x02\x16+\x02\x17-\x02" + + "\x18/\x02\x191\x02\x1A3\x02\x1B5\x02\x1C7\x02\x1D9\x02\x1E;\x02\x1F=\x02" + + " ?\x02!A\x02\"C\x02#E\x02$G\x02%I\x02&K\x02\'M\x02(O\x02)Q\x02*S\x02+" + + "U\x02,W\x02-Y\x02.[\x02/]\x020_\x021a\x022c\x023e\x024g\x025i\x026k\x02" + + "7m\x02\x02\x03\x02\x1D\x04\x02..00\x03\x022;\x04\x02OOoo\x04\x02QQqq\x04" + + "\x02FFff\x04\x02KKkk\x04\x02XXxx\x04\x02RRrr\x04\x02GGgg\x04\x02UUuu\x04" + + "\x02SSss\x04\x02TTtt\x04\x02VVvv\x04\x02HHhh\x04\x02NNnn\x04\x02EEee\x04" + + "\x02CCcc\x04\x02DDdd\x04\x02WWww\x04\x02PPpp\x04\x02MMmm\x04\x02JJjj\x03" + + "\x0244\x04\x02ZZzz\x04\x02IIii\x05\x02\v\f\x0F\x0F\"\"\v\x022;C\\c|\xC6" + + "\xC6\xD8\xD8\xDE\xDE\xE6\xE6\xF8\xF8\xFE\xFE\x02\u017B\x02\x03\x03\x02" + + "\x02\x02\x02\x05\x03\x02\x02\x02\x02\x07\x03\x02\x02\x02\x02\t\x03\x02" + + "\x02\x02\x02\v\x03\x02\x02\x02\x02\r\x03\x02\x02\x02\x02\x0F\x03\x02\x02" + + "\x02\x02\x11\x03\x02\x02\x02\x02\x13\x03\x02\x02\x02\x02\x15\x03\x02\x02" + + "\x02\x02\x17\x03\x02\x02\x02\x02\x19\x03\x02\x02\x02\x02\x1B\x03\x02\x02" + + "\x02\x02\x1D\x03\x02\x02\x02\x02\x1F\x03\x02\x02\x02\x02!\x03\x02\x02" + + "\x02\x02#\x03\x02\x02\x02\x02%\x03\x02\x02\x02\x02\'\x03\x02\x02\x02\x02" + + ")\x03\x02\x02\x02\x02+\x03\x02\x02\x02\x02-\x03\x02\x02\x02\x02/\x03\x02" + + "\x02\x02\x021\x03\x02\x02\x02\x023\x03\x02\x02\x02\x025\x03\x02\x02\x02" + + "\x027\x03\x02\x02\x02\x029\x03\x02\x02\x02\x02;\x03\x02\x02\x02\x02=\x03" + + "\x02\x02\x02\x02?\x03\x02\x02\x02\x02A\x03\x02\x02\x02\x02C\x03\x02\x02" + + "\x02\x02E\x03\x02\x02\x02\x02G\x03\x02\x02\x02\x02I\x03\x02\x02\x02\x02" + + "K\x03\x02\x02\x02\x02M\x03\x02\x02\x02\x02O\x03\x02\x02\x02\x02Q\x03\x02" + + "\x02\x02\x02S\x03\x02\x02\x02\x02U\x03\x02\x02\x02\x02W\x03\x02\x02\x02" + + "\x02Y\x03\x02\x02\x02\x02[\x03\x02\x02\x02\x02]\x03\x02\x02\x02\x02_\x03" + + "\x02\x02\x02\x02a\x03\x02\x02\x02\x02c\x03\x02\x02\x02\x02e\x03\x02\x02" + + "\x02\x02g\x03\x02\x02\x02\x02i\x03\x02\x02\x02\x02k\x03\x02\x02\x02\x03" + + "o\x03\x02\x02\x02\x05q\x03\x02\x02\x02\x07s\x03\x02\x02\x02\tu\x03\x02" + + "\x02\x02\vw\x03\x02\x02\x02\rz\x03\x02\x02\x02\x0F|\x03\x02\x02\x02\x11" + + "~\x03\x02\x02\x02\x13\x81\x03\x02\x02\x02\x15\x8A\x03\x02\x02\x02\x17" + + "\x9E\x03\x02\x02\x02\x19\xA0\x03\x02\x02\x02\x1B\xA2\x03\x02\x02\x02\x1D" + + "\xA6\x03\x02\x02\x02\x1F\xAA\x03\x02\x02\x02!\xAC\x03\x02\x02\x02#\xAE" + + "\x03\x02\x02\x02%\xB0\x03\x02\x02\x02\'\xB2\x03\x02\x02\x02)\xB5\x03\x02" + + "\x02\x02+\xB8\x03\x02\x02\x02-\xBB\x03\x02\x02\x02/\xBD\x03\x02\x02\x02" + + "1\xC2\x03\x02\x02\x023\xC6\x03\x02\x02\x025\xCC\x03\x02\x02\x027\xD1\x03" + + "\x02\x02\x029\xD5\x03\x02\x02\x02;\xDC\x03\x02\x02\x02=\xE2\x03\x02\x02" + + "\x02?\xE8\x03\x02\x02\x02A\xEC\x03\x02\x02\x02C\xF0\x03\x02\x02\x02E\xF4" + + "\x03\x02\x02\x02G\xF8\x03\x02\x02\x02I\xFD\x03\x02\x02\x02K\u0102\x03" + + "\x02\x02\x02M\u0107\x03\x02\x02\x02O\u010E\x03\x02\x02\x02Q\u0115\x03" + + "\x02\x02\x02S\u011C\x03\x02\x02\x02U\u0124\x03\x02\x02\x02W\u012B\x03" + + "\x02\x02\x02Y\u012F\x03\x02\x02\x02[\u0132\x03\x02\x02\x02]\u0136\x03" + + "\x02\x02\x02_\u013A\x03\x02\x02\x02a\u013E\x03\x02\x02\x02c\u0142\x03" + + "\x02\x02\x02e\u0146\x03\x02\x02\x02g\u014A\x03\x02\x02\x02i\u0150\x03" + + "\x02\x02\x02k\u0152\x03\x02\x02\x02m\u016F\x03\x02\x02\x02op\x07?\x02" + + "\x02p\x04\x03\x02\x02\x02qr\x07*\x02\x02r\x06\x03\x02\x02\x02st\x07+\x02" + + "\x02t\b\x03\x02\x02\x02uv\x07`\x02\x02v\n\x03\x02\x02\x02wx\x07,\x02\x02" + + "xy\x07,\x02\x02y\f\x03\x02\x02\x02z{\x07\'\x02\x02{\x0E\x03\x02\x02\x02" + + "|}\x07\x80\x02\x02}\x10\x03\x02\x02\x02~\x7F\x071\x02\x02\x7F\x80\x07" + + "1\x02\x02\x80\x12\x03\x02\x02\x02\x81\x82\x07*\x02\x02\x82\x83\x07+\x02" + + "\x02\x83\x14\x03\x02\x02\x02\x84\x8B\x05\x17\f\x02\x85\x87\x05\x19\r\x02" + + "\x86\x85\x03\x02\x02\x02\x87\x88\x03\x02\x02\x02\x88\x86\x03\x02\x02\x02" + + "\x88\x89\x03\x02\x02\x02\x89\x8B\x03\x02\x02\x02\x8A\x84\x03\x02\x02\x02" + + "\x8A\x86\x03\x02\x02\x02\x8B\x16\x03\x02\x02\x02\x8C\x8E\x05\x19\r\x02" + + "\x8D\x8C\x03\x02\x02\x02\x8E\x8F\x03\x02\x02\x02\x8F\x8D\x03\x02\x02\x02" + + "\x8F\x90\x03\x02\x02\x02\x90\x91\x03\x02\x02\x02\x91\x95\t\x02\x02\x02" + + "\x92\x94\x05\x19\r\x02\x93\x92\x03\x02\x02\x02\x94\x97\x03\x02\x02\x02" + + "\x95\x93\x03\x02\x02\x02\x95\x96\x03\x02\x02\x02\x96\x9F\x03\x02\x02\x02" + + "\x97\x95\x03\x02\x02\x02\x98\x9A\t\x02\x02\x02\x99\x9B\x05\x19\r\x02\x9A" + + "\x99\x03\x02\x02\x02\x9B\x9C\x03\x02\x02\x02\x9C\x9A\x03\x02\x02\x02\x9C" + + "\x9D\x03\x02\x02\x02\x9D\x9F\x03\x02\x02\x02\x9E\x8D\x03\x02\x02\x02\x9E" + + "\x98\x03\x02\x02\x02\x9F\x18\x03\x02\x02\x02\xA0\xA1\t\x03\x02\x02\xA1" + + "\x1A\x03\x02\x02\x02\xA2\xA3\t\x04\x02\x02\xA3\xA4\t\x05\x02\x02\xA4\xA5" + + "\t\x06\x02\x02\xA5\x1C\x03\x02\x02\x02\xA6\xA7\t\x06\x02\x02\xA7\xA8\t" + + "\x07\x02\x02\xA8\xA9\t\b\x02\x02\xA9\x1E\x03\x02\x02\x02\xAA\xAB\x07," + + "\x02\x02\xAB \x03\x02\x02\x02\xAC\xAD\x071\x02\x02\xAD\"\x03\x02\x02\x02" + + "\xAE\xAF\x07-\x02\x02\xAF$\x03\x02\x02\x02\xB0\xB1\x07/\x02\x02\xB1&\x03" + + "\x02\x02\x02\xB2\xB3\t\t\x02\x02\xB3\xB4\t\x07\x02\x02\xB4(\x03\x02\x02" + + "\x02\xB5\xB6\t\n\x02\x02\xB6\xB7\x07-\x02\x02\xB7*\x03\x02\x02\x02\xB8" + + "\xB9\t\n\x02\x02\xB9\xBA\x07/\x02\x02\xBA,\x03\x02\x02\x02\xBB\xBC\t\n" + + "\x02\x02\xBC.\x03\x02\x02\x02\xBD\xBE\t\v\x02\x02\xBE\xBF\t\f\x02\x02" + + "\xBF\xC0\t\r\x02\x02\xC0\xC1\t\x0E\x02\x02\xC10\x03\x02\x02\x02\xC2\xC3" + + "\t\v\x02\x02\xC3\xC4\t\f\x02\x02\xC4\xC5\t\r\x02\x02\xC52\x03\x02\x02" + + "\x02\xC6\xC7\t\x0F\x02\x02\xC7\xC8\t\x10\x02\x02\xC8\xC9\t\x05\x02\x02" + + "\xC9\xCA\t\x05\x02\x02\xCA\xCB\t\r\x02\x02\xCB4\x03\x02\x02\x02\xCC\xCD" + + "\t\x11\x02\x02\xCD\xCE\t\n\x02\x02\xCE\xCF\t\x07\x02\x02\xCF\xD0\t\x10" + + "\x02\x02\xD06\x03\x02\x02\x02\xD1\xD2\t\x12\x02\x02\xD2\xD3\t\x13\x02" + + "\x02\xD3\xD4\t\v\x02\x02\xD48\x03\x02\x02\x02\xD5\xD6\t\r\x02\x02\xD6" + + "\xD7\t\x05\x02\x02\xD7\xD8\t\x14\x02\x02\xD8\xD9\t\x15\x02\x02\xD9\xDA" + + "\t\x06\x02\x02\xDA\xDB\t\x16\x02\x02\xDB:\x03\x02\x02\x02\xDC\xDD\t\r" + + "\x02\x02\xDD\xDE\t\x05\x02\x02\xDE\xDF\t\x14\x02\x02\xDF\xE0\t\x15\x02" + + "\x02\xE0\xE1\t\x06\x02\x02\xE1<\x03\x02\x02\x02\xE2\xE3\t\x0E\x02\x02" + + "\xE3\xE4\t\r\x02\x02\xE4\xE5\t\x14\x02\x02\xE5\xE6\t\x15\x02\x02\xE6\xE7" + + "\t\x11\x02\x02\xE7>\x03\x02\x02\x02\xE8\xE9\t\v\x02\x02\xE9\xEA\t\x07" + + "\x02\x02\xEA\xEB\t\x15\x02\x02\xEB@\x03\x02\x02\x02\xEC\xED\t\x11\x02" + + "\x02\xED\xEE\t\x05\x02\x02\xEE\xEF\t\v\x02\x02\xEFB\x03\x02\x02\x02\xF0" + + "\xF1\t\x0E\x02\x02\xF1\xF2\t\x12\x02\x02\xF2\xF3\t\x15\x02\x02\xF3D\x03" + + "\x02\x02\x02\xF4\xF5\t\x11\x02\x02\xF5\xF6\t\x05\x02\x02\xF6\xF7\t\x0E" + + "\x02\x02\xF7F\x03\x02\x02\x02\xF8\xF9\t\v\x02\x02\xF9\xFA\t\x07\x02\x02" + + "\xFA\xFB\t\x15\x02\x02\xFB\xFC\t\x17\x02\x02\xFCH\x03\x02\x02\x02\xFD" + + "\xFE\t\x11\x02\x02\xFE\xFF\t\x05\x02\x02\xFF\u0100\t\v\x02\x02\u0100\u0101" + + "\t\x17\x02\x02\u0101J\x03\x02\x02\x02\u0102\u0103\t\x0E\x02\x02\u0103" + + "\u0104\t\x12\x02\x02\u0104\u0105\t\x15\x02\x02\u0105\u0106\t\x17\x02\x02" + + "\u0106L\x03\x02\x02\x02\u0107\u0108\t\x12\x02\x02\u0108\u0109\t\r\x02" + + "\x02\u0109\u010A\t\x11\x02\x02\u010A\u010B\t\v\x02\x02\u010B\u010C\t\x07" + + "\x02\x02\u010C\u010D\t\x15\x02\x02\u010DN\x03\x02\x02\x02\u010E\u010F" + + "\t\x12\x02\x02\u010F\u0110\t\r\x02\x02\u0110\u0111\t\x11\x02\x02\u0111" + + "\u0112\t\x11\x02\x02\u0112\u0113\t\x05\x02\x02\u0113\u0114\t\v\x02\x02" + + "\u0114P\x03\x02\x02\x02\u0115\u0116\t\x12\x02\x02\u0116\u0117\t\r\x02" + + "\x02\u0117\u0118\t\x11\x02\x02\u0118\u0119\t\x0E\x02\x02\u0119\u011A\t" + + "\x12\x02\x02\u011A\u011B\t\x15\x02\x02\u011BR\x03\x02\x02\x02\u011C\u011D" + + "\t\x12\x02\x02\u011D\u011E\t\r\x02\x02\u011E\u011F\t\x11\x02\x02\u011F" + + "\u0120\t\x0E\x02\x02\u0120\u0121\t\x12\x02\x02\u0121\u0122\t\x15\x02\x02" + + "\u0122\u0123\t\x18\x02\x02\u0123T\x03\x02\x02\x02\u0124\u0125\t\x12\x02" + + "\x02\u0125\u0126\t\r\x02\x02\u0126\u0127\t\x11\x02\x02\u0127\u0128\t\x11" + + "\x02\x02\u0128\u0129\t\x05\x02\x02\u0129\u012A\t\x0E\x02\x02\u012AV\x03" + + "\x02\x02\x02\u012B\u012C\t\n\x02\x02\u012C\u012D\t\x19\x02\x02\u012D\u012E" + + "\t\t\x02\x02\u012EX\x03\x02\x02\x02\u012F\u0130\t\x10\x02\x02\u0130\u0131" + + "\t\x15\x02\x02\u0131Z\x03\x02\x02\x02\u0132\u0133\t\n\x02\x02\u0133\u0134" + + "\t\n\x02\x02\u0134\u0135\t\x19\x02\x02\u0135\\\x03\x02\x02\x02\u0136\u0137" + + "\t\x10\x02\x02\u0137\u0138\t\x05\x02\x02\u0138\u0139\t\x1A\x02\x02\u0139" + + "^\x03\x02\x02\x02\u013A\u013B\t\r\x02\x02\u013B\u013C\t\x12\x02\x02\u013C" + + "\u013D\t\x06\x02\x02\u013D`\x03\x02\x02\x02\u013E\u013F\t\x06\x02\x02" + + "\u013F\u0140\t\n\x02\x02\u0140\u0141\t\x1A\x02\x02\u0141b\x03\x02\x02" + + "\x02\u0142\u0143\t\x1B\x02\x02\u0143\u0144\x03\x02\x02\x02\u0144\u0145" + + "\b2\x02\x02\u0145d\x03\x02\x02\x02\u0146\u0147\x05m7\x02\u0147\u0148\x03" + + "\x02\x02\x02\u0148\u0149\b3\x02\x02\u0149f\x03\x02\x02\x02\u014A\u014C" + + "\x07%\x02\x02\u014B\u014D\t\x1C\x02\x02\u014C\u014B\x03\x02\x02\x02\u014D" + + "\u014E\x03\x02\x02\x02\u014E\u014C\x03\x02\x02\x02\u014E\u014F\x03\x02" + + "\x02\x02\u014Fh\x03\x02\x02\x02\u0150\u0151\x07=\x02\x02\u0151j\x03\x02" + + "\x02\x02\u0152\u0153\v\x02\x02\x02\u0153l\x03\x02\x02\x02\u0154\u0155" + + "\x071\x02\x02\u0155\u0156\x07,\x02\x02\u0156\u015A\x03\x02\x02\x02\u0157" + + "\u0159\v\x02\x02\x02\u0158\u0157\x03\x02\x02\x02\u0159\u015C\x03\x02\x02" + + "\x02\u015A\u015B\x03\x02\x02\x02\u015A\u0158\x03\x02\x02\x02\u015B\u015D" + + "\x03\x02\x02\x02\u015C\u015A\x03\x02\x02\x02\u015D\u015E\x07,\x02\x02" + + "\u015E\u0170\x071\x02\x02\u015F\u0163\x07)\x02\x02\u0160\u0162\v\x02\x02" + + "\x02\u0161\u0160\x03\x02\x02\x02\u0162\u0165\x03\x02\x02\x02\u0163\u0164" + + "\x03\x02\x02\x02\u0163\u0161\x03\x02\x02\x02\u0164\u0166\x03\x02\x02\x02" + + "\u0165\u0163\x03\x02\x02\x02\u0166\u0170\x07)\x02\x02\u0167\u016B\x07" + + "$\x02\x02\u0168\u016A\v\x02\x02\x02\u0169\u0168\x03\x02\x02\x02\u016A" + + "\u016D\x03\x02\x02\x02\u016B\u016C\x03\x02\x02\x02\u016B\u0169\x03\x02" + + "\x02\x02\u016C\u016E\x03\x02\x02\x02\u016D\u016B\x03\x02\x02\x02\u016E" + + "\u0170\x07$\x02\x02\u016F\u0154\x03\x02\x02\x02\u016F\u015F\x03\x02\x02" + + "\x02\u016F\u0167\x03\x02\x02\x02\u0170n\x03\x02\x02\x02\x0F\x02\x88\x8A" + + "\x8F\x95\x9C\x9E\u014C\u014E\u015A\u0163\u016B\u016F\x03\b\x02\x02"; public static __ATN: ATN; public static get _ATN(): ATN { if (!CalculatorLexer.__ATN) { diff --git a/src/GeneratedAntlr/CalculatorListener.ts b/src/GeneratedAntlr/CalculatorListener.ts index fafe4eb..2dcb37e 100644 --- a/src/GeneratedAntlr/CalculatorListener.ts +++ b/src/GeneratedAntlr/CalculatorListener.ts @@ -1,4 +1,4 @@ -// Generated from ./src/Calculator.g4 by ANTLR 4.7.3-SNAPSHOT +// Generated from ./src/Calculator.g4 by ANTLR 4.9.0-SNAPSHOT import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener"; @@ -44,8 +44,10 @@ import { AddSubContext } from "./CalculatorParser"; import { NumberContext } from "./CalculatorParser"; import { PiContext } from "./CalculatorParser"; import { EulerContext } from "./CalculatorParser"; +import { SubstitutionContext } from "./CalculatorParser"; import { CalculatorContext } from "./CalculatorParser"; import { ExpressionContext } from "./CalculatorParser"; +import { TrailingCommentContext } from "./CalculatorParser"; import { CompileUnitContext } from "./CalculatorParser"; @@ -587,6 +589,19 @@ export interface CalculatorListener extends ParseTreeListener { */ exitEuler?: (ctx: EulerContext) => void; + /** + * Enter a parse tree produced by the `Substitution` + * labeled alternative in `CalculatorParser.expression`. + * @param ctx the parse tree + */ + enterSubstitution?: (ctx: SubstitutionContext) => void; + /** + * Exit a parse tree produced by the `Substitution` + * labeled alternative in `CalculatorParser.expression`. + * @param ctx the parse tree + */ + exitSubstitution?: (ctx: SubstitutionContext) => void; + /** * Enter a parse tree produced by `CalculatorParser.calculator`. * @param ctx the parse tree @@ -609,6 +624,17 @@ export interface CalculatorListener extends ParseTreeListener { */ exitExpression?: (ctx: ExpressionContext) => void; + /** + * Enter a parse tree produced by `CalculatorParser.trailingComment`. + * @param ctx the parse tree + */ + enterTrailingComment?: (ctx: TrailingCommentContext) => void; + /** + * Exit a parse tree produced by `CalculatorParser.trailingComment`. + * @param ctx the parse tree + */ + exitTrailingComment?: (ctx: TrailingCommentContext) => void; + /** * Enter a parse tree produced by `CalculatorParser.compileUnit`. * @param ctx the parse tree diff --git a/src/GeneratedAntlr/CalculatorParser.ts b/src/GeneratedAntlr/CalculatorParser.ts index 49ece39..03a21ff 100644 --- a/src/GeneratedAntlr/CalculatorParser.ts +++ b/src/GeneratedAntlr/CalculatorParser.ts @@ -1,4 +1,4 @@ -// Generated from ./src/Calculator.g4 by ANTLR 4.7.3-SNAPSHOT +// Generated from ./src/Calculator.g4 by ANTLR 4.9.0-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; @@ -37,70 +37,76 @@ export class CalculatorParser extends Parser { public static readonly T__6 = 7; public static readonly T__7 = 8; public static readonly T__8 = 9; - public static readonly T__9 = 10; - public static readonly NUMBER = 11; - public static readonly FLOAT = 12; - public static readonly DIGIT = 13; - public static readonly MOD = 14; - public static readonly WHOLE = 15; - public static readonly MUL = 16; - public static readonly DIV = 17; - public static readonly ADD = 18; - public static readonly SUB = 19; - public static readonly PI = 20; - public static readonly EXPONENT = 21; - public static readonly NEGEXPONENT = 22; - public static readonly EULER = 23; - public static readonly SQRT = 24; - public static readonly SQR = 25; - public static readonly FLOOR = 26; - public static readonly CEIL = 27; - public static readonly ABS = 28; - public static readonly ROUNDK = 29; - public static readonly ROUND = 30; - public static readonly TRUNC = 31; - public static readonly SIN = 32; - public static readonly COS = 33; - public static readonly TAN = 34; - public static readonly COT = 35; - public static readonly SINH = 36; - public static readonly COSH = 37; - public static readonly TANH = 38; - public static readonly ARCSIN = 39; - public static readonly ARCCOS = 40; - public static readonly ARCTAN = 41; - public static readonly ARCTAN2 = 42; - public static readonly ARCCOT = 43; - public static readonly EXP = 44; - public static readonly LN = 45; - public static readonly EEX = 46; - public static readonly LOG = 47; - public static readonly RAD = 48; - public static readonly DEG = 49; - public static readonly WS = 50; - public static readonly COM = 51; - public static readonly INVALID = 52; + public static readonly NUMBER = 10; + public static readonly FLOAT = 11; + public static readonly DIGIT = 12; + public static readonly MOD = 13; + public static readonly WHOLE = 14; + public static readonly MUL = 15; + public static readonly DIV = 16; + public static readonly ADD = 17; + public static readonly SUB = 18; + public static readonly PI = 19; + public static readonly EXPONENT = 20; + public static readonly NEGEXPONENT = 21; + public static readonly EULER = 22; + public static readonly SQRT = 23; + public static readonly SQR = 24; + public static readonly FLOOR = 25; + public static readonly CEIL = 26; + public static readonly ABS = 27; + public static readonly ROUNDK = 28; + public static readonly ROUND = 29; + public static readonly TRUNC = 30; + public static readonly SIN = 31; + public static readonly COS = 32; + public static readonly TAN = 33; + public static readonly COT = 34; + public static readonly SINH = 35; + public static readonly COSH = 36; + public static readonly TANH = 37; + public static readonly ARCSIN = 38; + public static readonly ARCCOS = 39; + public static readonly ARCTAN = 40; + public static readonly ARCTAN2 = 41; + public static readonly ARCCOT = 42; + public static readonly EXP = 43; + public static readonly LN = 44; + public static readonly EEX = 45; + public static readonly LOG = 46; + public static readonly RAD = 47; + public static readonly DEG = 48; + public static readonly WS = 49; + public static readonly COM = 50; + public static readonly SUBSTITUTION = 51; + public static readonly SEMICOLON = 52; + public static readonly INVALID = 53; public static readonly RULE_calculator = 0; public static readonly RULE_expression = 1; - public static readonly RULE_compileUnit = 2; + public static readonly RULE_trailingComment = 2; + public static readonly RULE_compileUnit = 3; // tslint:disable:no-trailing-whitespace public static readonly ruleNames: string[] = [ - "calculator", "expression", "compileUnit", + "calculator", "expression", "trailingComment", "compileUnit", ]; private static readonly _LITERAL_NAMES: Array = [ - undefined, "'='", "'('", "';'", "')'", "'^'", "'**'", "'%'", "'~'", "'//'", - "'()'", undefined, undefined, undefined, undefined, undefined, "'*'", - "'/'", "'+'", "'-'", + undefined, "'='", "'('", "')'", "'^'", "'**'", "'%'", "'~'", "'//'", "'()'", + undefined, undefined, undefined, undefined, undefined, "'*'", "'/'", "'+'", + "'-'", undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, "';'", ]; private static readonly _SYMBOLIC_NAMES: Array = [ undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, "NUMBER", "FLOAT", "DIGIT", - "MOD", "WHOLE", "MUL", "DIV", "ADD", "SUB", "PI", "EXPONENT", "NEGEXPONENT", - "EULER", "SQRT", "SQR", "FLOOR", "CEIL", "ABS", "ROUNDK", "ROUND", "TRUNC", - "SIN", "COS", "TAN", "COT", "SINH", "COSH", "TANH", "ARCSIN", "ARCCOS", - "ARCTAN", "ARCTAN2", "ARCCOT", "EXP", "LN", "EEX", "LOG", "RAD", "DEG", - "WS", "COM", "INVALID", + undefined, undefined, undefined, "NUMBER", "FLOAT", "DIGIT", "MOD", "WHOLE", + "MUL", "DIV", "ADD", "SUB", "PI", "EXPONENT", "NEGEXPONENT", "EULER", + "SQRT", "SQR", "FLOOR", "CEIL", "ABS", "ROUNDK", "ROUND", "TRUNC", "SIN", + "COS", "TAN", "COT", "SINH", "COSH", "TANH", "ARCSIN", "ARCCOS", "ARCTAN", + "ARCTAN2", "ARCCOT", "EXP", "LN", "EEX", "LOG", "RAD", "DEG", "WS", "COM", + "SUBSTITUTION", "SEMICOLON", "INVALID", ]; public static readonly VOCABULARY: Vocabulary = new VocabularyImpl(CalculatorParser._LITERAL_NAMES, CalculatorParser._SYMBOLIC_NAMES, []); @@ -120,6 +126,10 @@ export class CalculatorParser extends Parser { // @Override public get serializedATN(): string { return CalculatorParser._serializedATN; } + protected createFailedPredicateException(predicate?: string, message?: string): FailedPredicateException { + return new FailedPredicateException(this, predicate, message); + } + constructor(input: TokenStream) { super(input); this._interp = new ParserATNSimulator(CalculatorParser._ATN, this); @@ -132,19 +142,29 @@ export class CalculatorParser extends Parser { try { this.enterOuterAlt(_localctx, 1); { - this.state = 6; - this.expression(0); this.state = 8; + this.expression(0); + this.state = 10; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === CalculatorParser.T__0) { { - this.state = 7; + this.state = 9; this.match(CalculatorParser.T__0); } } - this.state = 10; + this.state = 13; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === CalculatorParser.SEMICOLON) { + { + this.state = 12; + this.trailingComment(); + } + } + + this.state = 15; this.compileUnit(); } } @@ -182,19 +202,19 @@ export class CalculatorParser extends Parser { let _alt: number; this.enterOuterAlt(_localctx, 1); { - this.state = 94; + this.state = 100; this._errHandler.sync(this); - switch ( this.interpreter.adaptivePredict(this._input, 2, this._ctx) ) { + switch ( this.interpreter.adaptivePredict(this._input, 3, this._ctx) ) { case 1: { _localctx = new UnaryContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 13; + this.state = 18; this.match(CalculatorParser.SUB); - this.state = 14; - this.expression(42); + this.state = 19; + this.expression(43); } break; @@ -203,10 +223,10 @@ export class CalculatorParser extends Parser { _localctx = new UnaryPlusContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 15; + this.state = 20; this.match(CalculatorParser.ADD); - this.state = 16; - this.expression(41); + this.state = 21; + this.expression(42); } break; @@ -215,10 +235,10 @@ export class CalculatorParser extends Parser { _localctx = new FloorContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 17; + this.state = 22; this.match(CalculatorParser.FLOOR); - this.state = 18; - this.expression(40); + this.state = 23; + this.expression(41); } break; @@ -227,10 +247,10 @@ export class CalculatorParser extends Parser { _localctx = new CeilContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 19; + this.state = 24; this.match(CalculatorParser.CEIL); - this.state = 20; - this.expression(39); + this.state = 25; + this.expression(40); } break; @@ -239,10 +259,10 @@ export class CalculatorParser extends Parser { _localctx = new AbsContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 21; + this.state = 26; this.match(CalculatorParser.ABS); - this.state = 22; - this.expression(38); + this.state = 27; + this.expression(39); } break; @@ -251,18 +271,18 @@ export class CalculatorParser extends Parser { _localctx = new RoundkContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 23; + this.state = 28; this.match(CalculatorParser.ROUNDK); - this.state = 24; + this.state = 29; this.match(CalculatorParser.T__1); - this.state = 25; + this.state = 30; this.expression(0); - this.state = 26; - this.match(CalculatorParser.T__2); - this.state = 27; + this.state = 31; + this.match(CalculatorParser.SEMICOLON); + this.state = 32; this.expression(0); - this.state = 28; - this.match(CalculatorParser.T__3); + this.state = 33; + this.match(CalculatorParser.T__2); } break; @@ -271,10 +291,10 @@ export class CalculatorParser extends Parser { _localctx = new RoundContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 30; + this.state = 35; this.match(CalculatorParser.ROUND); - this.state = 31; - this.expression(36); + this.state = 36; + this.expression(37); } break; @@ -283,10 +303,10 @@ export class CalculatorParser extends Parser { _localctx = new TruncContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 32; + this.state = 37; this.match(CalculatorParser.TRUNC); - this.state = 33; - this.expression(35); + this.state = 38; + this.expression(36); } break; @@ -295,10 +315,10 @@ export class CalculatorParser extends Parser { _localctx = new SinContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 34; + this.state = 39; this.match(CalculatorParser.SIN); - this.state = 35; - this.expression(34); + this.state = 40; + this.expression(35); } break; @@ -307,10 +327,10 @@ export class CalculatorParser extends Parser { _localctx = new CosContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 36; + this.state = 41; this.match(CalculatorParser.COS); - this.state = 37; - this.expression(33); + this.state = 42; + this.expression(34); } break; @@ -319,10 +339,10 @@ export class CalculatorParser extends Parser { _localctx = new TanContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 38; + this.state = 43; this.match(CalculatorParser.TAN); - this.state = 39; - this.expression(32); + this.state = 44; + this.expression(33); } break; @@ -331,10 +351,10 @@ export class CalculatorParser extends Parser { _localctx = new CotContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 40; + this.state = 45; this.match(CalculatorParser.COT); - this.state = 41; - this.expression(31); + this.state = 46; + this.expression(32); } break; @@ -343,10 +363,10 @@ export class CalculatorParser extends Parser { _localctx = new SinhContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 42; + this.state = 47; this.match(CalculatorParser.SINH); - this.state = 43; - this.expression(30); + this.state = 48; + this.expression(31); } break; @@ -355,10 +375,10 @@ export class CalculatorParser extends Parser { _localctx = new CoshContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 44; + this.state = 49; this.match(CalculatorParser.COSH); - this.state = 45; - this.expression(29); + this.state = 50; + this.expression(30); } break; @@ -367,10 +387,10 @@ export class CalculatorParser extends Parser { _localctx = new TanhContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 46; + this.state = 51; this.match(CalculatorParser.TANH); - this.state = 47; - this.expression(28); + this.state = 52; + this.expression(29); } break; @@ -379,10 +399,10 @@ export class CalculatorParser extends Parser { _localctx = new ArcsinContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 48; + this.state = 53; this.match(CalculatorParser.ARCSIN); - this.state = 49; - this.expression(27); + this.state = 54; + this.expression(28); } break; @@ -391,10 +411,10 @@ export class CalculatorParser extends Parser { _localctx = new ArccosContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 50; + this.state = 55; this.match(CalculatorParser.ARCCOS); - this.state = 51; - this.expression(26); + this.state = 56; + this.expression(27); } break; @@ -403,10 +423,10 @@ export class CalculatorParser extends Parser { _localctx = new ArctanContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 52; + this.state = 57; this.match(CalculatorParser.ARCTAN); - this.state = 53; - this.expression(25); + this.state = 58; + this.expression(26); } break; @@ -415,18 +435,18 @@ export class CalculatorParser extends Parser { _localctx = new Arctan2Context(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 54; + this.state = 59; this.match(CalculatorParser.ARCTAN2); - this.state = 55; + this.state = 60; this.match(CalculatorParser.T__1); - this.state = 56; + this.state = 61; this.expression(0); - this.state = 57; - this.match(CalculatorParser.T__2); - this.state = 58; + this.state = 62; + this.match(CalculatorParser.SEMICOLON); + this.state = 63; this.expression(0); - this.state = 59; - this.match(CalculatorParser.T__3); + this.state = 64; + this.match(CalculatorParser.T__2); } break; @@ -435,10 +455,10 @@ export class CalculatorParser extends Parser { _localctx = new ArccotContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 61; + this.state = 66; this.match(CalculatorParser.ARCCOT); - this.state = 62; - this.expression(23); + this.state = 67; + this.expression(24); } break; @@ -447,10 +467,10 @@ export class CalculatorParser extends Parser { _localctx = new ExpContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 63; + this.state = 68; this.match(CalculatorParser.EXP); - this.state = 64; - this.expression(22); + this.state = 69; + this.expression(23); } break; @@ -459,10 +479,10 @@ export class CalculatorParser extends Parser { _localctx = new LnContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 65; + this.state = 70; this.match(CalculatorParser.LN); - this.state = 66; - this.expression(21); + this.state = 71; + this.expression(22); } break; @@ -471,10 +491,10 @@ export class CalculatorParser extends Parser { _localctx = new EexContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 67; + this.state = 72; this.match(CalculatorParser.EEX); - this.state = 68; - this.expression(20); + this.state = 73; + this.expression(21); } break; @@ -483,10 +503,10 @@ export class CalculatorParser extends Parser { _localctx = new LogContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 69; + this.state = 74; this.match(CalculatorParser.LOG); - this.state = 70; - this.expression(19); + this.state = 75; + this.expression(20); } break; @@ -495,10 +515,10 @@ export class CalculatorParser extends Parser { _localctx = new RadContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 71; + this.state = 76; this.match(CalculatorParser.RAD); - this.state = 72; - this.expression(18); + this.state = 77; + this.expression(19); } break; @@ -507,10 +527,10 @@ export class CalculatorParser extends Parser { _localctx = new DegContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 73; + this.state = 78; this.match(CalculatorParser.DEG); - this.state = 74; - this.expression(17); + this.state = 79; + this.expression(18); } break; @@ -519,10 +539,10 @@ export class CalculatorParser extends Parser { _localctx = new SqrtContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 75; + this.state = 80; this.match(CalculatorParser.SQRT); - this.state = 76; - this.expression(16); + this.state = 81; + this.expression(17); } break; @@ -531,10 +551,10 @@ export class CalculatorParser extends Parser { _localctx = new SqrContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 77; + this.state = 82; this.match(CalculatorParser.SQR); - this.state = 78; - this.expression(15); + this.state = 83; + this.expression(16); } break; @@ -543,12 +563,12 @@ export class CalculatorParser extends Parser { _localctx = new ParenthesisContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 79; + this.state = 84; this.match(CalculatorParser.T__1); - this.state = 80; + this.state = 85; this.expression(0); - this.state = 81; - this.match(CalculatorParser.T__3); + this.state = 86; + this.match(CalculatorParser.T__2); } break; @@ -557,14 +577,14 @@ export class CalculatorParser extends Parser { _localctx = new MultContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 83; + this.state = 88; this.match(CalculatorParser.T__1); - this.state = 84; + this.state = 89; this.expression(0); - this.state = 85; - this.match(CalculatorParser.T__3); - this.state = 86; - this.expression(5); + this.state = 90; + this.match(CalculatorParser.T__2); + this.state = 91; + this.expression(6); } break; @@ -573,7 +593,7 @@ export class CalculatorParser extends Parser { _localctx = new NumberContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 88; + this.state = 93; this.match(CalculatorParser.NUMBER); } break; @@ -583,15 +603,15 @@ export class CalculatorParser extends Parser { _localctx = new PiContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 89; + this.state = 94; this.match(CalculatorParser.PI); - this.state = 91; + this.state = 96; this._errHandler.sync(this); - switch ( this.interpreter.adaptivePredict(this._input, 1, this._ctx) ) { + switch ( this.interpreter.adaptivePredict(this._input, 2, this._ctx) ) { case 1: { - this.state = 90; - this.match(CalculatorParser.T__9); + this.state = 95; + this.match(CalculatorParser.T__8); } break; } @@ -603,15 +623,25 @@ export class CalculatorParser extends Parser { _localctx = new EulerContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 93; + this.state = 98; this.match(CalculatorParser.EULER); } break; + + case 34: + { + _localctx = new SubstitutionContext(_localctx); + this._ctx = _localctx; + _prevctx = _localctx; + this.state = 99; + this.match(CalculatorParser.SUBSTITUTION); + } + break; } this._ctx._stop = this._input.tryLT(-1); - this.state = 127; + this.state = 133; this._errHandler.sync(this); - _alt = this.interpreter.adaptivePredict(this._input, 4, this._ctx); + _alt = this.interpreter.adaptivePredict(this._input, 5, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { if (this._parseListeners != null) { @@ -619,21 +649,21 @@ export class CalculatorParser extends Parser { } _prevctx = _localctx; { - this.state = 125; + this.state = 131; this._errHandler.sync(this); - switch ( this.interpreter.adaptivePredict(this._input, 3, this._ctx) ) { + switch ( this.interpreter.adaptivePredict(this._input, 4, this._ctx) ) { case 1: { _localctx = new ExponentContext(new ExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, CalculatorParser.RULE_expression); - this.state = 96; - if (!(this.precpred(this._ctx, 14))) { - throw new FailedPredicateException(this, "this.precpred(this._ctx, 14)"); + this.state = 102; + if (!(this.precpred(this._ctx, 15))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 15)"); } - this.state = 97; + this.state = 103; this.match(CalculatorParser.EXPONENT); - this.state = 98; - this.expression(15); + this.state = 104; + this.expression(16); } break; @@ -641,14 +671,14 @@ export class CalculatorParser extends Parser { { _localctx = new NegExponentContext(new ExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, CalculatorParser.RULE_expression); - this.state = 99; - if (!(this.precpred(this._ctx, 13))) { - throw new FailedPredicateException(this, "this.precpred(this._ctx, 13)"); + this.state = 105; + if (!(this.precpred(this._ctx, 14))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 14)"); } - this.state = 100; + this.state = 106; this.match(CalculatorParser.NEGEXPONENT); - this.state = 101; - this.expression(14); + this.state = 107; + this.expression(15); } break; @@ -656,14 +686,14 @@ export class CalculatorParser extends Parser { { _localctx = new PowContext(new ExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, CalculatorParser.RULE_expression); - this.state = 102; - if (!(this.precpred(this._ctx, 12))) { - throw new FailedPredicateException(this, "this.precpred(this._ctx, 12)"); + this.state = 108; + if (!(this.precpred(this._ctx, 13))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 13)"); } - this.state = 103; + this.state = 109; (_localctx as PowContext)._op = this._input.LT(1); _la = this._input.LA(1); - if (!(_la === CalculatorParser.T__4 || _la === CalculatorParser.T__5)) { + if (!(_la === CalculatorParser.T__3 || _la === CalculatorParser.T__4)) { (_localctx as PowContext)._op = this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { @@ -673,8 +703,8 @@ export class CalculatorParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 104; - this.expression(13); + this.state = 110; + this.expression(14); } break; @@ -682,13 +712,13 @@ export class CalculatorParser extends Parser { { _localctx = new ModContext(new ExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, CalculatorParser.RULE_expression); - this.state = 105; - if (!(this.precpred(this._ctx, 11))) { - throw new FailedPredicateException(this, "this.precpred(this._ctx, 11)"); + this.state = 111; + if (!(this.precpred(this._ctx, 12))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 12)"); } - this.state = 106; + this.state = 112; _la = this._input.LA(1); - if (!(_la === CalculatorParser.T__6 || _la === CalculatorParser.MOD)) { + if (!(_la === CalculatorParser.T__5 || _la === CalculatorParser.MOD)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { @@ -698,8 +728,8 @@ export class CalculatorParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 107; - this.expression(12); + this.state = 113; + this.expression(13); } break; @@ -707,14 +737,14 @@ export class CalculatorParser extends Parser { { _localctx = new WholeContext(new ExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, CalculatorParser.RULE_expression); - this.state = 108; - if (!(this.precpred(this._ctx, 10))) { - throw new FailedPredicateException(this, "this.precpred(this._ctx, 10)"); + this.state = 114; + if (!(this.precpred(this._ctx, 11))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 11)"); } - this.state = 109; + this.state = 115; this.match(CalculatorParser.WHOLE); - this.state = 110; - this.expression(11); + this.state = 116; + this.expression(12); } break; @@ -722,14 +752,14 @@ export class CalculatorParser extends Parser { { _localctx = new SqRootContext(new ExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, CalculatorParser.RULE_expression); - this.state = 111; - if (!(this.precpred(this._ctx, 9))) { - throw new FailedPredicateException(this, "this.precpred(this._ctx, 9)"); + this.state = 117; + if (!(this.precpred(this._ctx, 10))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 10)"); } - this.state = 112; + this.state = 118; (_localctx as SqRootContext)._op = this._input.LT(1); _la = this._input.LA(1); - if (!(_la === CalculatorParser.T__7 || _la === CalculatorParser.T__8)) { + if (!(_la === CalculatorParser.T__6 || _la === CalculatorParser.T__7)) { (_localctx as SqRootContext)._op = this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { @@ -739,8 +769,8 @@ export class CalculatorParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 113; - this.expression(10); + this.state = 119; + this.expression(11); } break; @@ -748,11 +778,11 @@ export class CalculatorParser extends Parser { { _localctx = new MulDivContext(new ExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, CalculatorParser.RULE_expression); - this.state = 114; - if (!(this.precpred(this._ctx, 8))) { - throw new FailedPredicateException(this, "this.precpred(this._ctx, 8)"); + this.state = 120; + if (!(this.precpred(this._ctx, 9))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 9)"); } - this.state = 115; + this.state = 121; (_localctx as MulDivContext)._op = this._input.LT(1); _la = this._input.LA(1); if (!(_la === CalculatorParser.MUL || _la === CalculatorParser.DIV)) { @@ -765,8 +795,8 @@ export class CalculatorParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 116; - this.expression(9); + this.state = 122; + this.expression(10); } break; @@ -774,11 +804,11 @@ export class CalculatorParser extends Parser { { _localctx = new AddSubContext(new ExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, CalculatorParser.RULE_expression); - this.state = 117; - if (!(this.precpred(this._ctx, 4))) { - throw new FailedPredicateException(this, "this.precpred(this._ctx, 4)"); + this.state = 123; + if (!(this.precpred(this._ctx, 5))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 5)"); } - this.state = 118; + this.state = 124; (_localctx as AddSubContext)._op = this._input.LT(1); _la = this._input.LA(1); if (!(_la === CalculatorParser.ADD || _la === CalculatorParser.SUB)) { @@ -791,8 +821,8 @@ export class CalculatorParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 119; - this.expression(5); + this.state = 125; + this.expression(6); } break; @@ -800,24 +830,24 @@ export class CalculatorParser extends Parser { { _localctx = new MultContext(new ExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, CalculatorParser.RULE_expression); - this.state = 120; - if (!(this.precpred(this._ctx, 6))) { - throw new FailedPredicateException(this, "this.precpred(this._ctx, 6)"); + this.state = 126; + if (!(this.precpred(this._ctx, 7))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 7)"); } - this.state = 121; + this.state = 127; this.match(CalculatorParser.T__1); - this.state = 122; + this.state = 128; this.expression(0); - this.state = 123; - this.match(CalculatorParser.T__3); + this.state = 129; + this.match(CalculatorParser.T__2); } break; } } } - this.state = 129; + this.state = 135; this._errHandler.sync(this); - _alt = this.interpreter.adaptivePredict(this._input, 4, this._ctx); + _alt = this.interpreter.adaptivePredict(this._input, 5, this._ctx); } } } @@ -836,13 +866,55 @@ export class CalculatorParser extends Parser { return _localctx; } // @RuleVersion(0) + public trailingComment(): TrailingCommentContext { + let _localctx: TrailingCommentContext = new TrailingCommentContext(this._ctx, this.state); + this.enterRule(_localctx, 4, CalculatorParser.RULE_trailingComment); + try { + let _alt: number; + this.enterOuterAlt(_localctx, 1); + { + this.state = 136; + this.match(CalculatorParser.SEMICOLON); + this.state = 140; + this._errHandler.sync(this); + _alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx); + while (_alt !== 1 && _alt !== ATN.INVALID_ALT_NUMBER) { + if (_alt === 1 + 1) { + { + { + this.state = 137; + this.matchWildcard(); + } + } + } + this.state = 142; + this._errHandler.sync(this); + _alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) public compileUnit(): CompileUnitContext { let _localctx: CompileUnitContext = new CompileUnitContext(this._ctx, this.state); - this.enterRule(_localctx, 4, CalculatorParser.RULE_compileUnit); + this.enterRule(_localctx, 6, CalculatorParser.RULE_compileUnit); try { this.enterOuterAlt(_localctx, 1); { - this.state = 130; + this.state = 143; this.match(CalculatorParser.EOF); } } @@ -871,39 +943,39 @@ export class CalculatorParser extends Parser { private expression_sempred(_localctx: ExpressionContext, predIndex: number): boolean { switch (predIndex) { case 0: - return this.precpred(this._ctx, 14); + return this.precpred(this._ctx, 15); case 1: - return this.precpred(this._ctx, 13); + return this.precpred(this._ctx, 14); case 2: - return this.precpred(this._ctx, 12); + return this.precpred(this._ctx, 13); case 3: - return this.precpred(this._ctx, 11); + return this.precpred(this._ctx, 12); case 4: - return this.precpred(this._ctx, 10); + return this.precpred(this._ctx, 11); case 5: - return this.precpred(this._ctx, 9); + return this.precpred(this._ctx, 10); case 6: - return this.precpred(this._ctx, 8); + return this.precpred(this._ctx, 9); case 7: - return this.precpred(this._ctx, 4); + return this.precpred(this._ctx, 5); case 8: - return this.precpred(this._ctx, 6); + return this.precpred(this._ctx, 7); } return true; } public static readonly _serializedATN: string = - "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x036\x87\x04\x02" + - "\t\x02\x04\x03\t\x03\x04\x04\t\x04\x03\x02\x03\x02\x05\x02\v\n\x02\x03" + - "\x02\x03\x02\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" + + "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x037\x94\x04\x02" + + "\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x03\x02\x03\x02\x05\x02" + + "\r\n\x02\x03\x02\x05\x02\x10\n\x02\x03\x02\x03\x02\x03\x03\x03\x03\x03" + "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" + "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" + "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" + @@ -911,59 +983,66 @@ export class CalculatorParser extends Parser { "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" + "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" + "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" + - "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x05" + - "\x03^\n\x03\x03\x03\x05\x03a\n\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" + "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" + + "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x05\x03c\n\x03\x03\x03\x03\x03\x05" + + "\x03g\n\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" + "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" + - "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x07\x03\x80\n\x03" + - "\f\x03\x0E\x03\x83\v\x03\x03\x04\x03\x04\x03\x04\x02\x02\x03\x04\x05\x02" + - "\x02\x04\x02\x06\x02\x02\x07\x03\x02\x07\b\x04\x02\t\t\x10\x10\x03\x02" + - "\n\v\x03\x02\x12\x13\x03\x02\x14\x15\x02\xAE\x02\b\x03\x02\x02\x02\x04" + - "`\x03\x02\x02\x02\x06\x84\x03\x02\x02\x02\b\n\x05\x04\x03\x02\t\v\x07" + - "\x03\x02\x02\n\t\x03\x02\x02\x02\n\v\x03\x02\x02\x02\v\f\x03\x02\x02\x02" + - "\f\r\x05\x06\x04\x02\r\x03\x03\x02\x02\x02\x0E\x0F\b\x03\x01\x02\x0F\x10" + - "\x07\x15\x02\x02\x10a\x05\x04\x03,\x11\x12\x07\x14\x02\x02\x12a\x05\x04" + - "\x03+\x13\x14\x07\x1C\x02\x02\x14a\x05\x04\x03*\x15\x16\x07\x1D\x02\x02" + - "\x16a\x05\x04\x03)\x17\x18\x07\x1E\x02\x02\x18a\x05\x04\x03(\x19\x1A\x07" + - "\x1F\x02\x02\x1A\x1B\x07\x04\x02\x02\x1B\x1C\x05\x04\x03\x02\x1C\x1D\x07" + - "\x05\x02\x02\x1D\x1E\x05\x04\x03\x02\x1E\x1F\x07\x06\x02\x02\x1Fa\x03" + - "\x02\x02\x02 !\x07 \x02\x02!a\x05\x04\x03&\"#\x07!\x02\x02#a\x05\x04\x03" + - "%$%\x07\"\x02\x02%a\x05\x04\x03$&\'\x07#\x02\x02\'a\x05\x04\x03#()\x07" + - "$\x02\x02)a\x05\x04\x03\"*+\x07%\x02\x02+a\x05\x04\x03!,-\x07&\x02\x02" + - "-a\x05\x04\x03 ./\x07\'\x02\x02/a\x05\x04\x03\x1F01\x07(\x02\x021a\x05" + - "\x04\x03\x1E23\x07)\x02\x023a\x05\x04\x03\x1D45\x07*\x02\x025a\x05\x04" + - "\x03\x1C67\x07+\x02\x027a\x05\x04\x03\x1B89\x07,\x02\x029:\x07\x04\x02" + - "\x02:;\x05\x04\x03\x02;<\x07\x05\x02\x02<=\x05\x04\x03\x02=>\x07\x06\x02" + - "\x02>a\x03\x02\x02\x02?@\x07-\x02\x02@a\x05\x04\x03\x19AB\x07.\x02\x02" + - "Ba\x05\x04\x03\x18CD\x07/\x02\x02Da\x05\x04\x03\x17EF\x070\x02\x02Fa\x05" + - "\x04\x03\x16GH\x071\x02\x02Ha\x05\x04\x03\x15IJ\x072\x02\x02Ja\x05\x04" + - "\x03\x14KL\x073\x02\x02La\x05\x04\x03\x13MN\x07\x1A\x02\x02Na\x05\x04" + - "\x03\x12OP\x07\x1B\x02\x02Pa\x05\x04\x03\x11QR\x07\x04\x02\x02RS\x05\x04" + - "\x03\x02ST\x07\x06\x02\x02Ta\x03\x02\x02\x02UV\x07\x04\x02\x02VW\x05\x04" + - "\x03\x02WX\x07\x06\x02\x02XY\x05\x04\x03\x07Ya\x03\x02\x02\x02Za\x07\r" + - "\x02\x02[]\x07\x16\x02\x02\\^\x07\f\x02\x02]\\\x03\x02\x02\x02]^\x03\x02" + - "\x02\x02^a\x03\x02\x02\x02_a\x07\x19\x02\x02`\x0E\x03\x02\x02\x02`\x11" + - "\x03\x02\x02\x02`\x13\x03\x02\x02\x02`\x15\x03\x02\x02\x02`\x17\x03\x02" + - "\x02\x02`\x19\x03\x02\x02\x02` \x03\x02\x02\x02`\"\x03\x02\x02\x02`$\x03" + - "\x02\x02\x02`&\x03\x02\x02\x02`(\x03\x02\x02\x02`*\x03\x02\x02\x02`,\x03" + - "\x02\x02\x02`.\x03\x02\x02\x02`0\x03\x02\x02\x02`2\x03\x02\x02\x02`4\x03" + - "\x02\x02\x02`6\x03\x02\x02\x02`8\x03\x02\x02\x02`?\x03\x02\x02\x02`A\x03" + - "\x02\x02\x02`C\x03\x02\x02\x02`E\x03\x02\x02\x02`G\x03\x02\x02\x02`I\x03" + - "\x02\x02\x02`K\x03\x02\x02\x02`M\x03\x02\x02\x02`O\x03\x02\x02\x02`Q\x03" + - "\x02\x02\x02`U\x03\x02\x02\x02`Z\x03\x02\x02\x02`[\x03\x02\x02\x02`_\x03" + - "\x02\x02\x02a\x81\x03\x02\x02\x02bc\f\x10\x02\x02cd\x07\x17\x02\x02d\x80" + - "\x05\x04\x03\x11ef\f\x0F\x02\x02fg\x07\x18\x02\x02g\x80\x05\x04\x03\x10" + - "hi\f\x0E\x02\x02ij\t\x02\x02\x02j\x80\x05\x04\x03\x0Fkl\f\r\x02\x02lm" + - "\t\x03\x02\x02m\x80\x05\x04\x03\x0Eno\f\f\x02\x02op\x07\x11\x02\x02p\x80" + - "\x05\x04\x03\rqr\f\v\x02\x02rs\t\x04\x02\x02s\x80\x05\x04\x03\ftu\f\n" + - "\x02\x02uv\t\x05\x02\x02v\x80\x05\x04\x03\vwx\f\x06\x02\x02xy\t\x06\x02" + - "\x02y\x80\x05\x04\x03\x07z{\f\b\x02\x02{|\x07\x04\x02\x02|}\x05\x04\x03" + - "\x02}~\x07\x06\x02\x02~\x80\x03\x02\x02\x02\x7Fb\x03\x02\x02\x02\x7Fe" + - "\x03\x02\x02\x02\x7Fh\x03\x02\x02\x02\x7Fk\x03\x02\x02\x02\x7Fn\x03\x02" + - "\x02\x02\x7Fq\x03\x02\x02\x02\x7Ft\x03\x02\x02\x02\x7Fw\x03\x02\x02\x02" + - "\x7Fz\x03\x02\x02\x02\x80\x83\x03\x02\x02\x02\x81\x7F\x03\x02\x02\x02" + - "\x81\x82\x03\x02\x02\x02\x82\x05\x03\x02\x02\x02\x83\x81\x03\x02\x02\x02" + - "\x84\x85\x07\x02\x02\x03\x85\x07\x03\x02\x02\x02\x07\n]`\x7F\x81"; + "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" + + "\x03\x03\x03\x03\x03\x03\x03\x07\x03\x86\n\x03\f\x03\x0E\x03\x89\v\x03" + + "\x03\x04\x03\x04\x07\x04\x8D\n\x04\f\x04\x0E\x04\x90\v\x04\x03\x05\x03" + + "\x05\x03\x05\x03\x8E\x02\x03\x04\x06\x02\x02\x04\x02\x06\x02\b\x02\x02" + + "\x07\x03\x02\x06\x07\x04\x02\b\b\x0F\x0F\x03\x02\t\n\x03\x02\x11\x12\x03" + + "\x02\x13\x14\x02\xBD\x02\n\x03\x02\x02\x02\x04f\x03\x02\x02\x02\x06\x8A" + + "\x03\x02\x02\x02\b\x91\x03\x02\x02\x02\n\f\x05\x04\x03\x02\v\r\x07\x03" + + "\x02\x02\f\v\x03\x02\x02\x02\f\r\x03\x02\x02\x02\r\x0F\x03\x02\x02\x02" + + "\x0E\x10\x05\x06\x04\x02\x0F\x0E\x03\x02\x02\x02\x0F\x10\x03\x02\x02\x02" + + "\x10\x11\x03\x02\x02\x02\x11\x12\x05\b\x05\x02\x12\x03\x03\x02\x02\x02" + + "\x13\x14\b\x03\x01\x02\x14\x15\x07\x14\x02\x02\x15g\x05\x04\x03-\x16\x17" + + "\x07\x13\x02\x02\x17g\x05\x04\x03,\x18\x19\x07\x1B\x02\x02\x19g\x05\x04" + + "\x03+\x1A\x1B\x07\x1C\x02\x02\x1Bg\x05\x04\x03*\x1C\x1D\x07\x1D\x02\x02" + + "\x1Dg\x05\x04\x03)\x1E\x1F\x07\x1E\x02\x02\x1F \x07\x04\x02\x02 !\x05" + + "\x04\x03\x02!\"\x076\x02\x02\"#\x05\x04\x03\x02#$\x07\x05\x02\x02$g\x03" + + "\x02\x02\x02%&\x07\x1F\x02\x02&g\x05\x04\x03\'\'(\x07 \x02\x02(g\x05\x04" + + "\x03&)*\x07!\x02\x02*g\x05\x04\x03%+,\x07\"\x02\x02,g\x05\x04\x03$-.\x07" + + "#\x02\x02.g\x05\x04\x03#/0\x07$\x02\x020g\x05\x04\x03\"12\x07%\x02\x02" + + "2g\x05\x04\x03!34\x07&\x02\x024g\x05\x04\x03 56\x07\'\x02\x026g\x05\x04" + + "\x03\x1F78\x07(\x02\x028g\x05\x04\x03\x1E9:\x07)\x02\x02:g\x05\x04\x03" + + "\x1D;<\x07*\x02\x02\x07+\x02\x02>?\x07\x04\x02\x02" + + "?@\x05\x04\x03\x02@A\x076\x02\x02AB\x05\x04\x03\x02BC\x07\x05\x02\x02" + + "Cg\x03\x02\x02\x02DE\x07,\x02\x02Eg\x05\x04\x03\x1AFG\x07-\x02\x02Gg\x05" + + "\x04\x03\x19HI\x07.\x02\x02Ig\x05\x04\x03\x18JK\x07/\x02\x02Kg\x05\x04" + + "\x03\x17LM\x070\x02\x02Mg\x05\x04\x03\x16NO\x071\x02\x02Og\x05\x04\x03" + + "\x15PQ\x072\x02\x02Qg\x05\x04\x03\x14RS\x07\x19\x02\x02Sg\x05\x04\x03" + + "\x13TU\x07\x1A\x02\x02Ug\x05\x04\x03\x12VW\x07\x04\x02\x02WX\x05\x04\x03" + + "\x02XY\x07\x05\x02\x02Yg\x03\x02\x02\x02Z[\x07\x04\x02\x02[\\\x05\x04" + + "\x03\x02\\]\x07\x05\x02\x02]^\x05\x04\x03\b^g\x03\x02\x02\x02_g\x07\f" + + "\x02\x02`b\x07\x15\x02\x02ac\x07\v\x02\x02ba\x03\x02\x02\x02bc\x03\x02" + + "\x02\x02cg\x03\x02\x02\x02dg\x07\x18\x02\x02eg\x075\x02\x02f\x13\x03\x02" + + "\x02\x02f\x16\x03\x02\x02\x02f\x18\x03\x02\x02\x02f\x1A\x03\x02\x02\x02" + + "f\x1C\x03\x02\x02\x02f\x1E\x03\x02\x02\x02f%\x03\x02\x02\x02f\'\x03\x02" + + "\x02\x02f)\x03\x02\x02\x02f+\x03\x02\x02\x02f-\x03\x02\x02\x02f/\x03\x02" + + "\x02\x02f1\x03\x02\x02\x02f3\x03\x02\x02\x02f5\x03\x02\x02\x02f7\x03\x02" + + "\x02\x02f9\x03\x02\x02\x02f;\x03\x02\x02\x02f=\x03\x02\x02\x02fD\x03\x02" + + "\x02\x02fF\x03\x02\x02\x02fH\x03\x02\x02\x02fJ\x03\x02\x02\x02fL\x03\x02" + + "\x02\x02fN\x03\x02\x02\x02fP\x03\x02\x02\x02fR\x03\x02\x02\x02fT\x03\x02" + + "\x02\x02fV\x03\x02\x02\x02fZ\x03\x02\x02\x02f_\x03\x02\x02\x02f`\x03\x02" + + "\x02\x02fd\x03\x02\x02\x02fe\x03\x02\x02\x02g\x87\x03\x02\x02\x02hi\f" + + "\x11\x02\x02ij\x07\x16\x02\x02j\x86\x05\x04\x03\x12kl\f\x10\x02\x02lm" + + "\x07\x17\x02\x02m\x86\x05\x04\x03\x11no\f\x0F\x02\x02op\t\x02\x02\x02" + + "p\x86\x05\x04\x03\x10qr\f\x0E\x02\x02rs\t\x03\x02\x02s\x86\x05\x04\x03" + + "\x0Ftu\f\r\x02\x02uv\x07\x10\x02\x02v\x86\x05\x04\x03\x0Ewx\f\f\x02\x02" + + "xy\t\x04\x02\x02y\x86\x05\x04\x03\rz{\f\v\x02\x02{|\t\x05\x02\x02|\x86" + + "\x05\x04\x03\f}~\f\x07\x02\x02~\x7F\t\x06\x02\x02\x7F\x86\x05\x04\x03" + + "\b\x80\x81\f\t\x02\x02\x81\x82\x07\x04\x02\x02\x82\x83\x05\x04\x03\x02" + + "\x83\x84\x07\x05\x02\x02\x84\x86\x03\x02\x02\x02\x85h\x03\x02\x02\x02" + + "\x85k\x03\x02\x02\x02\x85n\x03\x02\x02\x02\x85q\x03\x02\x02\x02\x85t\x03" + + "\x02\x02\x02\x85w\x03\x02\x02\x02\x85z\x03\x02\x02\x02\x85}\x03\x02\x02" + + "\x02\x85\x80\x03\x02\x02\x02\x86\x89\x03\x02\x02\x02\x87\x85\x03\x02\x02" + + "\x02\x87\x88\x03\x02\x02\x02\x88\x05\x03\x02\x02\x02\x89\x87\x03\x02\x02" + + "\x02\x8A\x8E\x076\x02\x02\x8B\x8D\v\x02\x02\x02\x8C\x8B\x03\x02\x02\x02" + + "\x8D\x90\x03\x02\x02\x02\x8E\x8F\x03\x02\x02\x02\x8E\x8C\x03\x02\x02\x02" + + "\x8F\x07\x03\x02\x02\x02\x90\x8E\x03\x02\x02\x02\x91\x92\x07\x02\x02\x03" + + "\x92\t\x03\x02\x02\x02\t\f\x0Fbf\x85\x87\x8E"; public static __ATN: ATN; public static get _ATN(): ATN { if (!CalculatorParser.__ATN) { @@ -982,6 +1061,9 @@ export class CalculatorContext extends ParserRuleContext { public compileUnit(): CompileUnitContext { return this.getRuleContext(0, CompileUnitContext); } + public trailingComment(): TrailingCommentContext | undefined { + return this.tryGetRuleContext(0, TrailingCommentContext); + } constructor(parent: ParserRuleContext | undefined, invokingState: number) { super(parent, invokingState); } @@ -1181,6 +1263,7 @@ export class RoundkContext extends ExpressionContext { return this.getRuleContext(i, ExpressionContext); } } + public SEMICOLON(): TerminalNode { return this.getToken(CalculatorParser.SEMICOLON, 0); } constructor(ctx: ExpressionContext) { super(ctx.parent, ctx.invokingState); this.copyFrom(ctx); @@ -1577,6 +1660,7 @@ export class Arctan2Context extends ExpressionContext { return this.getRuleContext(i, ExpressionContext); } } + public SEMICOLON(): TerminalNode { return this.getToken(CalculatorParser.SEMICOLON, 0); } constructor(ctx: ExpressionContext) { super(ctx.parent, ctx.invokingState); this.copyFrom(ctx); @@ -1945,7 +2029,7 @@ export class NegExponentContext extends ExpressionContext { } } export class PowContext extends ExpressionContext { - public _op: Token; + public _op!: Token; public expression(): ExpressionContext[]; public expression(i: number): ExpressionContext; public expression(i?: number): ExpressionContext | ExpressionContext[] { @@ -2053,7 +2137,7 @@ export class WholeContext extends ExpressionContext { } } export class SqRootContext extends ExpressionContext { - public _op: Token; + public _op!: Token; public expression(): ExpressionContext[]; public expression(i: number): ExpressionContext; public expression(i?: number): ExpressionContext | ExpressionContext[] { @@ -2089,7 +2173,7 @@ export class SqRootContext extends ExpressionContext { } } export class MulDivContext extends ExpressionContext { - public _op: Token; + public _op!: Token; public expression(): ExpressionContext[]; public expression(i: number): ExpressionContext; public expression(i?: number): ExpressionContext | ExpressionContext[] { @@ -2191,7 +2275,7 @@ export class MultContext extends ExpressionContext { } } export class AddSubContext extends ExpressionContext { - public _op: Token; + public _op!: Token; public expression(): ExpressionContext[]; public expression(i: number): ExpressionContext; public expression(i?: number): ExpressionContext | ExpressionContext[] { @@ -2309,6 +2393,63 @@ export class EulerContext extends ExpressionContext { } } } +export class SubstitutionContext extends ExpressionContext { + public SUBSTITUTION(): TerminalNode { return this.getToken(CalculatorParser.SUBSTITUTION, 0); } + constructor(ctx: ExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: CalculatorListener): void { + if (listener.enterSubstitution) { + listener.enterSubstitution(this); + } + } + // @Override + public exitRule(listener: CalculatorListener): void { + if (listener.exitSubstitution) { + listener.exitSubstitution(this); + } + } + // @Override + public accept(visitor: CalculatorVisitor): Result { + if (visitor.visitSubstitution) { + return visitor.visitSubstitution(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class TrailingCommentContext extends ParserRuleContext { + public SEMICOLON(): TerminalNode { return this.getToken(CalculatorParser.SEMICOLON, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return CalculatorParser.RULE_trailingComment; } + // @Override + public enterRule(listener: CalculatorListener): void { + if (listener.enterTrailingComment) { + listener.enterTrailingComment(this); + } + } + // @Override + public exitRule(listener: CalculatorListener): void { + if (listener.exitTrailingComment) { + listener.exitTrailingComment(this); + } + } + // @Override + public accept(visitor: CalculatorVisitor): Result { + if (visitor.visitTrailingComment) { + return visitor.visitTrailingComment(this); + } else { + return visitor.visitChildren(this); + } + } +} export class CompileUnitContext extends ParserRuleContext { diff --git a/src/GeneratedAntlr/CalculatorVisitor.ts b/src/GeneratedAntlr/CalculatorVisitor.ts index 52b7512..6d96832 100644 --- a/src/GeneratedAntlr/CalculatorVisitor.ts +++ b/src/GeneratedAntlr/CalculatorVisitor.ts @@ -1,4 +1,4 @@ -// Generated from ./src/Calculator.g4 by ANTLR 4.7.3-SNAPSHOT +// Generated from ./src/Calculator.g4 by ANTLR 4.9.0-SNAPSHOT import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor"; @@ -44,8 +44,10 @@ import { AddSubContext } from "./CalculatorParser"; import { NumberContext } from "./CalculatorParser"; import { PiContext } from "./CalculatorParser"; import { EulerContext } from "./CalculatorParser"; +import { SubstitutionContext } from "./CalculatorParser"; import { CalculatorContext } from "./CalculatorParser"; import { ExpressionContext } from "./CalculatorParser"; +import { TrailingCommentContext } from "./CalculatorParser"; import { CompileUnitContext } from "./CalculatorParser"; @@ -385,6 +387,14 @@ export interface CalculatorVisitor extends ParseTreeVisitor { */ visitEuler?: (ctx: EulerContext) => Result; + /** + * Visit a parse tree produced by the `Substitution` + * labeled alternative in `CalculatorParser.expression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSubstitution?: (ctx: SubstitutionContext) => Result; + /** * Visit a parse tree produced by `CalculatorParser.calculator`. * @param ctx the parse tree @@ -399,6 +409,13 @@ export interface CalculatorVisitor extends ParseTreeVisitor { */ visitExpression?: (ctx: ExpressionContext) => Result; + /** + * Visit a parse tree produced by `CalculatorParser.trailingComment`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTrailingComment?: (ctx: TrailingCommentContext) => Result; + /** * Visit a parse tree produced by `CalculatorParser.compileUnit`. * @param ctx the parse tree