diff --git a/.appveyor.yml b/.appveyor.yml index c3f614ed..51dd64f7 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,24 +1,22 @@ version: 1.0.{build} image: Visual Studio 2015 init: -- git config --global core.autocrlf true + - git config --global core.autocrlf true install: -- ps: Install-Product node 10 -- npm install -g npm@6 + - ps: Install-Product node 10 + - npm install -g npm@6 branches: only: - - master + - master environment: JAVA6_HOME: C:/Program Files/Java/jdk1.6.0/jre build_script: -- npm install -- npm run tslint -- npm run pack-tool -- npm run pack-runtime + - npm install + - npm run lint test_script: -- npm test + - npm test artifacts: -- path: 'antlr4ts-*.tgz' + - path: "antlr4ts-*.tgz" cache: -- node_modules -> **\package.json -- C:\Users\appveyor\.m2 -> **\pom.xml + - node_modules -> **\package.json + - C:\Users\appveyor\.m2 -> **\pom.xml diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..f20bbdb6 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,7 @@ +!.eslintrc.js +node_modules/ +dist +gen +cross-target +reference +runtime/typescript/*.js \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..8f408422 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,22 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "plugins": ["@typescript-eslint"], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended" + ], + "rules": { + "@typescript-eslint/camelcase": 0, + "@typescript-eslint/no-explicit-any": 0, + "@typescript-eslint/no-namespace": 0, + "@typescript-eslint/no-non-null-assertion": 0, + "@typescript-eslint/no-unused-vars": 0, + "@typescript-eslint/no-use-before-define": 0, + "@typescript-eslint/no-var-requires": 0, + "no-case-declarations": 0, + "no-constant-condition": 0, + "no-inner-declarations": 0 + } +} diff --git a/.gitignore b/.gitignore index 7b163977..235fad72 100644 --- a/.gitignore +++ b/.gitignore @@ -42,7 +42,7 @@ jspm_packages/ /src/tree/xpath/XPathLexer.ts gen/ /target/ -/tool/target/ +tool/typescript/target doc/ # Visual Studio build output and per-user files @@ -60,3 +60,8 @@ bin/ # NPM pack output *.tgz + +**/dist +tsconfig.tsbuildinfo +test/runtime/cross-target/ +.antlr/ diff --git a/.mocharc.yml b/.mocharc.yml new file mode 100644 index 00000000..772302a4 --- /dev/null +++ b/.mocharc.yml @@ -0,0 +1,8 @@ +# mocha.opts: +# +# --require source-map-support/register +# --recursive +# test/dist + +spec: test/dist/**/*.js +require: source-map-support/register diff --git a/.travis.yml b/.travis.yml index abb4dde3..9df65af4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,4 @@ script: - nyc --reporter=none mocha --timeout=10000 - nyc report --reporter=text-lcov > coverage.lcov - codecov - - npm run tslint - - npm run pack-tool - - npm run pack-runtime + - npm run lint diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..37d965ed --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,10 @@ +{ + "recommendations": [ + "dbaeumer.vscode-eslint", + "donjayamanne.githistory", + "eamodio.gitlens", + "editorconfig.editorconfig", + "esbenp.prettier-vscode", + "mike-lischke.vscode-antlr4" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json index eeb32d6e..c65e676c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,48 +1,49 @@ { - "version": "0.2.0", - "configurations": [ - { - "name": "Debug Tests", - "type": "node", - "request": "launch", - "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", - "stopOnEntry": false, - "args": [ - "--debug", "-R", "dot" - ], - "cwd": "${workspaceRoot}", - "preLaunchTask": "tsc", - "runtimeExecutable": null, - "runtimeArgs": [ - "--nolazy" - ], - "env": { - "NODE_ENV": "development" - }, - "console": "integratedTerminal", - "sourceMaps": true, - "outDir": "${workspaceRoot}/target" - }, - { - "name": "Attach", - "type": "node", - "request": "attach", - "port": 5858, - "address": "localhost", - "restart": false, - "sourceMaps": true, - "outDir": null, - "localRoot": "${workspaceRoot}", - "remoteRoot": null - }, - { - "name": "Attach to Process", - "type": "node", - "request": "attach", - "processId": "${command.PickProcess}", - "port": 5858, - "sourceMaps": true, - "outDir": "${workspaceRoot}/target" - } - ] + "version": "0.2.0", + "configurations": [ + { + "name": "Debug Tests", + "type": "node", + "request": "launch", + "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", + "stopOnEntry": false, + "args": [ + "--debug", + "-R", + "dot" + ], + "cwd": "${workspaceRoot}", + "runtimeExecutable": null, + "runtimeArgs": [ + "--nolazy" + ], + "env": { + "NODE_ENV": "development" + }, + "console": "integratedTerminal", + "sourceMaps": true, + "outDir": "${workspaceRoot}/target" + }, + { + "name": "Attach", + "type": "node", + "request": "attach", + "port": 5858, + "address": "localhost", + "restart": false, + "sourceMaps": true, + "outDir": null, + "localRoot": "${workspaceRoot}", + "remoteRoot": null + }, + { + "name": "Attach to Process", + "type": "node", + "request": "attach", + "processId": "${command.PickProcess}", + "port": 5858, + "sourceMaps": true, + "outDir": "${workspaceRoot}/target" + } + ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index ebfc407d..d5b0bcb6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ -// Place your settings in this file to overwrite default and user settings. { - "typescript.tsdk": "./node_modules/typescript/lib", "editor.rulers": [ 120 - ] -} \ No newline at end of file + ], + "typescript.tsdk": "./node_modules/typescript/lib", + "eslint.lintTask.enable": true +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json index f8dd73cc..ded44c65 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,18 +1,32 @@ { - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "2.0.0", - "command": "npm", - "type": "shell", - "args": ["run", "tsc-watch"], - "presentation": { - "echo": true, - "reveal": "silent", - "focus": false, - "panel": "shared", - "showReuseMessage": true, - "clear": false + "version": "2.0.0", + "tasks": [ + { + "type": "npm", + "script": "tsc", + "problemMatcher": ["$tsc"], + "label": "npm: tsc", + "detail": "tsc --build" }, - "isBackground": true, - "problemMatcher": "$tsc" + { + "type": "npm", + "script": "tsc-watch", + "problemMatcher": ["$tsc-watch"], + "label": "npm: tsc-watch", + "detail": "tsc --build --watch", + "isBackground": true, + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "type": "npm", + "script": "lint", + "problemMatcher": ["$eslint-stylish"], + "label": "eslint: lint whole folder", + "group": "build", + "detail": "eslint . --ext .ts" + } + ] } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7944ccf4..cd400343 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,13 +8,21 @@ only be considered when sent from users who have signed the ## Building from Source +### NPM vs YARN + +There are two significant package managers these days, NPM (which is included with Node.js), and YARN (which has been innovating.) Unfortunately the build process for antlr4ts currently does not support YARN. + +We'll try to change that in the future, but for now the desire to ship a stable version 1.0 release overcomes any short-term advantages YARN may offer. So use NPM for now. + +If you are deeply into YARN, the problem seems to be in that NPM creates symbolic links in the project root's node_module folder for antlr4ts and antlr4ts-cli, while YARN apparently copies the files instead. Unfortunately, the timing of the copy doesn't work, because under YARN, node_modules\antlr4ts-cli\target\antlr4-typescript-4.7.3-SNAPSHOT-complete.jar doesn't get included because it is copied before its build. + ### Prerequisites Building this repository from source requires several tools: -* Node.js 6.7.x -* Maven 3.3.1+ (3.3.9+ recommended) -* Java Development Kit 1.6+ (1.8+ recommended) +- Node.js 6.7.x +- Maven 3.3.1+ (3.3.9+ recommended) +- Java Development Kit 1.6+ (1.8+ recommended) Users working in Visual Studio Code should update their workspace settings to specify the paths for the Java Development Kit and Apache Maven: @@ -67,7 +75,7 @@ the actual file name produced by the profiler. node --prof-process isolate-000001C4B0FF38A0-v8.log >profile.txt ``` -The resulting file, `profile.txt` will contain a summary of the results from running a sampling profiler. +The resulting file, `profile.txt` will contain a summary of the results from running a sampling profiler. ## Versioning @@ -116,38 +124,54 @@ ability to provide meaningful release notes. > > In addition to the above, building the design-time tool requires: > -> - A Java development kit, 1.8x or greater (see above.) -> - The [Maven](https://maven.apache.org/download.cgi) project system after downloading, [set it up according to these instructions](https://maven.apache.org/install.html). +> - A Java development kit, 1.8x or greater (see above.) +> - The [Maven](https://maven.apache.org/download.cgi) project system after downloading, [set it up according to these instructions](https://maven.apache.org/install.html). > -> After you clone the project, run `npm install` from the root directory, this will install other runtime- and development-time dependencies. +> After you clone the project, run `npm install` from the root directory, this will install other runtime- and development-time dependencies. > -> The first time you run `npm install`, it will build and install the current version of the **antlr4ts** tool locally. After that, if you update the tool, you will need to execute the command `npm install tool`. This includes if you pull any updates that change the tool. +> The first time you run `npm install`, it will build and install the current version of the **antlr4ts** tool locally. After that, if you update the tool, you will need to execute the command `npm install tool`. This includes if you pull any updates that change the tool. > > ## Dev setup with Visual Studio +> > Any edition of [Visual Studio 2015](https://www.visualstudio.com/vs/) (or greater) should work, including Communitity Edition. > You'll want to be sure you have the following VS extensions installed: +> > - [Node Tools for Visual Studio 1.2](https://www.visualstudio.com/vs/node-js/) (or greater) > - [TypeScript for Visual Studio 2015](https://www.microsoft.com/en-us/download/details.aspx?id=48593) 2.03 or greater. > -> You ***should*** be able to run tests from the Test Explorer, etc... but there seems to be an unresolved problem making this work, for now use the command-line method below to be sure you run them all. +> You **_should_** be able to run tests from the Test Explorer, etc... but there seems to be an unresolved problem making this work, for now use the command-line method below to be sure you run them all. > > ### Running basic tests should be as simple as... +> > ``` > npm test > ``` +> > How we integrate with runtime-testsuite is TBD. > > ### Generating test code coverage report +> > ``` -> npm run cover +> npm run cover > ``` +> > This executes a code-coverage test run, then generates an interactive HTML report in `coverage/lcov-report/index.html`. > > ### Java Reference code -> To view the Java code this project was derived from, use the following commands in the project root directory. This *isn't* strictly needed for building the project, and the reference implementation is expected to be fairly stable. +> +> To view the Java code this project was derived from, use the following commands in the project root directory. This _isn't_ strictly needed for building the project, and the reference implementation is expected to be fairly stable. > > ``` > git submodule init > git submodule update > ``` -> The later (update) command may need to be repeated occasionally after another contributor updates the version of reference code. \ No newline at end of file +> +> The later (update) command may need to be repeated occasionally after another contributor updates the version of reference code. + +# A note on the build process + +The build process for this project has grown organically based on npm scripts. One part of those scripts used the +**npm link** command, and with further experience, this seems to have caused a fragile build situation. As stands the +build can leave npm **global** symlinks pointing into this build directory. They can effect what version of ANTLR4TS +is used by other projects, outside this repository. For this reason, I'm removing them from package.json, but leaving +in place a **npm run unlink** script which can help the cleanup process. diff --git a/antlr4ts.njsproj b/antlr4ts.njsproj index 0cbb5d4c..aafdee12 100644 --- a/antlr4ts.njsproj +++ b/antlr4ts.njsproj @@ -27,7 +27,7 @@ $(MSBuildProjectDirectory)\target False - True + False $(MSBuildProjectDirectory)\target diff --git a/benchmark/JavaUnicodeInputStream.ts b/benchmark/JavaUnicodeInputStream.ts index d66c59ed..49c7b381 100644 --- a/benchmark/JavaUnicodeInputStream.ts +++ b/benchmark/JavaUnicodeInputStream.ts @@ -5,14 +5,10 @@ // ConvertTo-TS run at 2016-10-04T11:27:01.9391717-07:00 -import { CharStream } from "../src/CharStream"; -import { IntegerList } from "../src/misc/IntegerList"; -import { Interval } from "../src/misc/Interval"; -import { NotNull } from "../src/Decorators"; -import { Override } from "../src/Decorators"; - import * as assert from "assert"; +import { CharStream, IntegerList, Interval } from "antlr4ts"; + const BACKSLASH = "\\".charCodeAt(0); const LOWER_U = "u".charCodeAt(0); const UPPER_A = "A".charCodeAt(0); @@ -27,19 +23,19 @@ const DIGIT_9 = "9".charCodeAt(0); * @author Sam Harwell */ export class JavaUnicodeInputStream implements CharStream { - @NotNull + private source: CharStream; - private escapeIndexes: IntegerList = new IntegerList(); - private escapeCharacters: IntegerList = new IntegerList(); - private escapeIndirectionLevels: IntegerList = new IntegerList(); + private escapeIndexes: IntegerList = new IntegerList(); + private escapeCharacters: IntegerList = new IntegerList(); + private escapeIndirectionLevels: IntegerList = new IntegerList(); - private escapeListIndex: number = 0; - private range: number = 0; - private slashCount: number = 0; + private escapeListIndex = 0; + private range = 0; + private slashCount = 0; private la1: number; - constructor(@NotNull source: CharStream) { + constructor(source: CharStream) { if (source == null) { throw new Error("NullPointerException: source"); } @@ -48,27 +44,27 @@ export class JavaUnicodeInputStream implements CharStream { this.la1 = source.LA(1); } - @Override + // @Override get size(): number { return this.source.size; } - @Override + // @Override get index(): number { return this.source.index; } - @Override + // @Override get sourceName(): string { return this.source.sourceName; } - @Override + // @Override public getText(interval: Interval): string { return this.source.getText(interval); } - @Override + // @Override public consume(): void { if (this.la1 !== BACKSLASH) { this.source.consume(); @@ -86,7 +82,7 @@ export class JavaUnicodeInputStream implements CharStream { this.slashCount++; } else { - let indirectionLevel: number = this.escapeIndirectionLevels.get(this.escapeListIndex); + const indirectionLevel: number = this.escapeIndirectionLevels.get(this.escapeListIndex); for (let i = 0; i < 6 + indirectionLevel; i++) { this.source.consume(); } @@ -99,7 +95,7 @@ export class JavaUnicodeInputStream implements CharStream { assert(this.range >= this.index); } - @Override + // @Override public LA(i: number): number { if (i === 1 && this.la1 !== BACKSLASH) { return this.la1; @@ -120,7 +116,7 @@ export class JavaUnicodeInputStream implements CharStream { return this.source.LA(desiredIndex - this.index); } else { - let desiredIndex: number = this.index + i - 1; + let desiredIndex: number = this.index + i - 1; for (let j = this.escapeListIndex; j < this.escapeIndexes.size; j++) { if (this.escapeIndexes.get(j) === desiredIndex) { return this.escapeCharacters.get(j); @@ -133,12 +129,12 @@ export class JavaUnicodeInputStream implements CharStream { } } - let currentIndex: number[] = [this.index]; - let slashCountPtr: number[] = [this.slashCount]; - let indirectionLevelPtr: number[] = [0]; + const currentIndex: number[] = [this.index]; + const slashCountPtr: number[] = [this.slashCount]; + const indirectionLevelPtr: number[] = [0]; for (let j = 0; j < i; j++) { - let previousIndex: number = currentIndex[0]; - let c: number = this.readCharAt(currentIndex, slashCountPtr, indirectionLevelPtr); + const previousIndex: number = currentIndex[0]; + const c: number = this.readCharAt(currentIndex, slashCountPtr, indirectionLevelPtr); if (currentIndex[0] > this.range) { if (currentIndex[0] - previousIndex > 1) { this.escapeIndexes.add(previousIndex); @@ -158,17 +154,17 @@ export class JavaUnicodeInputStream implements CharStream { } } - @Override + // @Override public mark(): number { return this.source.mark(); } - @Override + // @Override public release(marker: number): void { this.source.release(marker); } - @Override + // @Override public seek(index: number): void { if (index > this.range) { throw new Error("UnsupportedOperationException"); @@ -215,27 +211,27 @@ export class JavaUnicodeInputStream implements CharStream { assert(slashCountPtr != null && slashCountPtr.length === 1); assert(indirectionLevelPtr != null && indirectionLevelPtr.length === 1); - let blockUnicodeEscape: boolean = (slashCountPtr[0] % 2) !== 0; + const blockUnicodeEscape: boolean = (slashCountPtr[0] % 2) !== 0; - let c0: number = this.source.LA(nextIndexPtr[0] - this.index + 1); + const c0: number = this.source.LA(nextIndexPtr[0] - this.index + 1); if (c0 === BACKSLASH) { slashCountPtr[0]++; if (!blockUnicodeEscape) { - let c1: number = this.source.LA(nextIndexPtr[0] - this.index + 2); + const c1: number = this.source.LA(nextIndexPtr[0] - this.index + 2); if (c1 === LOWER_U) { - let c2: number = this.source.LA(nextIndexPtr[0] - this.index + 3); + let c2: number = this.source.LA(nextIndexPtr[0] - this.index + 3); indirectionLevelPtr[0] = 0; while (c2 === LOWER_U) { indirectionLevelPtr[0]++; c2 = this.source.LA(nextIndexPtr[0] - this.index + 3 + indirectionLevelPtr[0]); } - let c3: number = this.source.LA(nextIndexPtr[0] - this.index + 4 + indirectionLevelPtr[0]); - let c4: number = this.source.LA(nextIndexPtr[0] - this.index + 5 + indirectionLevelPtr[0]); - let c5: number = this.source.LA(nextIndexPtr[0] - this.index + 6 + indirectionLevelPtr[0]); + const c3: number = this.source.LA(nextIndexPtr[0] - this.index + 4 + indirectionLevelPtr[0]); + const c4: number = this.source.LA(nextIndexPtr[0] - this.index + 5 + indirectionLevelPtr[0]); + const c5: number = this.source.LA(nextIndexPtr[0] - this.index + 6 + indirectionLevelPtr[0]); if (JavaUnicodeInputStream.isHexDigit(c2) && JavaUnicodeInputStream.isHexDigit(c3) && JavaUnicodeInputStream.isHexDigit(c4) && JavaUnicodeInputStream.isHexDigit(c5)) { - let value: number = JavaUnicodeInputStream.hexValue(c2); + let value: number = JavaUnicodeInputStream.hexValue(c2); value = (value << 4) + JavaUnicodeInputStream.hexValue(c3); value = (value << 4) + JavaUnicodeInputStream.hexValue(c4); value = (value << 4) + JavaUnicodeInputStream.hexValue(c5); diff --git a/benchmark/Stopwatch.ts b/benchmark/Stopwatch.ts index abc7dd4e..cae973bc 100644 --- a/benchmark/Stopwatch.ts +++ b/benchmark/Stopwatch.ts @@ -10,7 +10,7 @@ export class Stopwatch { private _start?: number[]; public static startNew(): Stopwatch { - let result = new Stopwatch(); + const result = new Stopwatch(); result.start(); return result; } @@ -24,9 +24,9 @@ export class Stopwatch { } public elapsed(): TimeSpan { - let result = { seconds: this._elapsed[0], nanos: this._elapsed[1] }; + const result = { seconds: this._elapsed[0], nanos: this._elapsed[1] }; if (this._start !== undefined) { - let stop = process.hrtime(); + const stop = process.hrtime(); result.seconds += stop[0] - this._start[0]; if (stop[0] === this._start[0]) { result.nanos += stop[1] - this._start[1]; diff --git a/benchmark/TestPerformance.ts b/benchmark/TestPerformance.ts index 43fe2854..92250673 100644 --- a/benchmark/TestPerformance.ts +++ b/benchmark/TestPerformance.ts @@ -1,3 +1,8 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/explicit-function-return-type */ +/* eslint-disable @typescript-eslint/no-non-null-assertion */ + /*! * Copyright 2016 The ANTLR Project. All rights reserved. * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. @@ -5,74 +10,78 @@ // ConvertTo-TS run at 2016-10-04T11:27:15.5869363-07:00 +import * as Utils from "antlr4ts"; +import * as assert from "assert"; +import * as fs from "fs"; +import * as path from "path"; +/* eslint-disable no-inner-declarations */ +/* eslint-disable @typescript-eslint/no-namespace */ +/* eslint-disable @typescript-eslint/no-use-before-define */ +/* eslint-disable @typescript-eslint/interface-name-prefix */ import * as sourceMapSupport from "source-map-support"; -sourceMapSupport.install(); -import { ANTLRErrorListener } from "../src/ANTLRErrorListener"; -import { ANTLRInputStream } from "../src/ANTLRInputStream"; -import { Array2DHashSet } from "../src/misc/Array2DHashSet"; -import { ATN } from "../src/atn/ATN"; -import { ATNConfig } from "../src/atn/ATNConfig"; -import { ATNConfigSet } from "../src/atn/ATNConfigSet"; -import { ATNDeserializer } from "../src/atn/ATNDeserializer"; -import { BailErrorStrategy } from "../src/BailErrorStrategy"; -import { BitSet } from "../src/misc/BitSet"; -import { CharStream } from "../src/CharStream"; -import { CharStreams } from "../src/CharStreams"; -import { CodePointBuffer } from "../src/CodePointBuffer"; -import { CodePointCharStream } from "../src/CodePointCharStream"; -import { CommonTokenStream } from "../src/CommonTokenStream"; -import { DefaultErrorStrategy } from "../src/DefaultErrorStrategy"; -import { DFA } from "../src/dfa/DFA"; -import { DFAState } from "../src/dfa/DFAState"; -import { DiagnosticErrorListener } from "../src/DiagnosticErrorListener"; -import { ErrorNode } from "../src/tree/ErrorNode"; -import { Interval } from "../src/misc/Interval"; +import { + ANTLRErrorListener, + ATN, + ATNConfig, + ATNConfigSet, + ATNDeserializer, + Array2DHashSet, + BailErrorStrategy, + BitSet, + CharStream, + CharStreams, + CodePointBuffer, + CodePointCharStream, + CommonTokenStream, + DFA, + DFAState, + DefaultErrorStrategy, + DiagnosticErrorListener, + ErrorNode, + Interval, + Lexer, + LexerATNSimulator, + MurmurHash, + ObjectEqualityComparator, + ParseCancellationException, + ParseTree, + ParseTreeListener, + ParseTreeWalker, + Parser, + ParserATNSimulator, + ParserErrorListener, + ParserInterpreter, + ParserRuleContext, + PredictionContextCache, + PredictionMode, + RecognitionException, + Recognizer, + SimulatorState, + TerminalNode, + Token, + TokenStream +} from "antlr4ts"; + +import { JavaLRLexer } from "./gen/lr/JavaLRLexer"; +import { JavaLRLexer as JavaLRLexerAtn } from "./gen/lr-atn/JavaLRLexer"; +import { JavaLRParser } from "./gen/lr/JavaLRParser"; +import { JavaLRParser as JavaLRParserAtn } from "./gen/lr-atn/JavaLRParser"; +import { JavaLexer } from "./gen/std/JavaLexer"; +import { JavaLexer as JavaLexerAtn } from "./gen/std-atn/JavaLexer"; +import { JavaParser } from "./gen/std/JavaParser"; +import { JavaParser as JavaParserAtn } from "./gen/std-atn/JavaParser"; import { JavaUnicodeInputStream } from "./JavaUnicodeInputStream"; -import { Lexer } from "../src/Lexer"; -import { LexerATNSimulator } from "../src/atn/LexerATNSimulator"; -import { MurmurHash } from "../src/misc/MurmurHash"; -import { NotNull } from "../src/Decorators"; -import { ObjectEqualityComparator } from "../src/misc/ObjectEqualityComparator"; -import { Override } from "../src/Decorators"; -import { ParseCancellationException } from "../src/misc/ParseCancellationException"; -import { Parser } from "../src/Parser"; -import { ParserATNSimulator } from "../src/atn/ParserATNSimulator"; -import { ParserErrorListener } from "../src/ParserErrorListener"; -import { ParserInterpreter } from "../src/ParserInterpreter"; -import { ParserRuleContext } from "../src/ParserRuleContext"; -import { ParseTree } from "../src/tree/ParseTree"; -import { ParseTreeListener } from "../src/tree/ParseTreeListener"; -import { ParseTreeWalker } from "../src/tree/ParseTreeWalker"; -import { PredictionContextCache } from "../src/atn/PredictionContextCache"; -import { PredictionMode } from "../src/atn/PredictionMode"; -import { RecognitionException } from "../src/RecognitionException"; -import { Recognizer } from "../src/Recognizer"; -import { SimulatorState } from "../src/atn/SimulatorState"; import { Stopwatch } from "./Stopwatch"; -import { TerminalNode } from "../src/tree/TerminalNode"; import { TimeSpan } from "./TimeSpan"; -import { Token } from "../src/Token"; -import { TokenSource } from "../src/TokenSource"; -import { TokenStream } from "../src/TokenStream"; -import * as Utils from "../src/misc/Utils"; - -import { JavaLexer as JavaLexer } from "./gen/std/JavaLexer"; -import { JavaLexer as JavaLexerAtn } from "./gen/std-atn/JavaLexer"; -import { JavaLRLexer as JavaLRLexer } from "./gen/lr/JavaLRLexer"; -import { JavaLRLexer as JavaLRLexerAtn } from "./gen/lr-atn/JavaLRLexer"; - -import { JavaParser as JavaParser } from "./gen/std/JavaParser"; -import { JavaParser as JavaParserAtn } from "./gen/std-atn/JavaParser"; -import { JavaLRParser as JavaLRParser } from "./gen/lr/JavaLRParser"; -import { JavaLRParser as JavaLRParserAtn } from "./gen/lr-atn/JavaLRParser"; +sourceMapSupport.install(); -import * as assert from "assert"; -import * as fs from "fs"; -import * as path from "path"; +interface IJavaParser extends Parser { + compilationUnit(): ParserRuleContext; +} -type AnyJavaParser = JavaParser | JavaParserAtn | JavaLRParser | JavaLRParserAtn | ParserInterpreter; +type AnyJavaParser = IJavaParser | ParserInterpreter; function assertTrue(value: boolean, message?: string) { assert.strictEqual(value, true, message); @@ -84,8 +93,8 @@ function assertTrue(value: boolean, message?: string) { */ function shuffleArray(array: T[]) { for (let i = array.length - 1; i > 0; i--) { - let j = (Math.random() * (i + 1)) | 0; - let temp = array[i]; + const j = (Math.random() * (i + 1)) | 0; + const temp = array[i]; array[i] = array[j]; array[j] = temp; } @@ -232,21 +241,21 @@ export class TestPerformance { /** * Parse each file with {@code JavaParser.compilationUnit}. */ - private static readonly RUN_PARSER: boolean = true; + private static readonly RUN_PARSER: boolean = true; /** * {@code true} to use {@link BailErrorStrategy}, {@code false} to use * {@link DefaultErrorStrategy}. */ - private static readonly BAIL_ON_ERROR: boolean = false; + private static readonly BAIL_ON_ERROR: boolean = false; /** * {@code true} to compute a checksum for verifying consistency across * optimizations and multiple passes. */ - private static readonly COMPUTE_CHECKSUM: boolean = true; + private static readonly COMPUTE_CHECKSUM: boolean = true; /** * This value is passed to {@link Parser#setBuildParseTree}. */ - private static readonly BUILD_PARSE_TREES: boolean = false; + private static readonly BUILD_PARSE_TREES: boolean = false; /** * Use * {@link ParseTreeWalker#DEFAULT}{@code .}{@link ParseTreeWalker#walk walk} @@ -255,9 +264,9 @@ export class TestPerformance { * will instead be called during the parsing process via * {@link Parser#addParseListener}. */ - private static readonly BLANK_LISTENER: boolean = false; + private static readonly BLANK_LISTENER: boolean = false; - private static readonly EXPORT_LARGEST_CONFIG_CONTEXTS: boolean = false; + private static readonly EXPORT_LARGEST_CONFIG_CONTEXTS: boolean = false; /** * Shows the number of {@link DFAState} and {@link ATNConfig} instances in @@ -266,21 +275,21 @@ export class TestPerformance { * will only apply to one file (the last file if {@link #NUMBER_OF_THREADS} * is 0, otherwise the last file which was parsed on the first thread). */ - private static readonly SHOW_DFA_STATE_STATS: boolean = true; + private static readonly SHOW_DFA_STATE_STATS: boolean = true; /** * If {@code true}, the DFA state statistics report includes a breakdown of * the number of DFA states contained in each decision (with rule names). */ - public static readonly DETAILED_DFA_STATE_STATS: boolean = true; + public static readonly DETAILED_DFA_STATE_STATS: boolean = true; - private static readonly ENABLE_LEXER_DFA: boolean = true; + private static readonly ENABLE_LEXER_DFA: boolean = true; - private static readonly ENABLE_PARSER_DFA: boolean = true; + private static readonly ENABLE_PARSER_DFA: boolean = true; /** * If {@code true}, the DFA will be used for full context parsing as well as * SLL parsing. */ - private static readonly ENABLE_PARSER_FULL_CONTEXT_DFA: boolean = false; + private static readonly ENABLE_PARSER_FULL_CONTEXT_DFA: boolean = false; /** * Specify the {@link PredictionMode} used by the @@ -288,48 +297,48 @@ export class TestPerformance { * {@code true}, this value only applies to the second stage, as the first * stage will always use {@link PredictionMode#SLL}. */ - private static readonly PREDICTION_MODE: PredictionMode = PredictionMode.LL; - private static readonly FORCE_GLOBAL_CONTEXT: boolean = false; - private static readonly TRY_LOCAL_CONTEXT_FIRST: boolean = true; - private static readonly OPTIMIZE_LL1: boolean = true; - private static readonly OPTIMIZE_UNIQUE_CLOSURE: boolean = true; - private static readonly OPTIMIZE_TAIL_CALLS: boolean = true; - private static readonly TAIL_CALL_PRESERVES_SLL: boolean = true; - private static readonly TREAT_SLLK1_CONFLICT_AS_AMBIGUITY: boolean = false; + private static readonly PREDICTION_MODE: PredictionMode = PredictionMode.LL; + private static readonly FORCE_GLOBAL_CONTEXT: boolean = false; + private static readonly TRY_LOCAL_CONTEXT_FIRST: boolean = true; + private static readonly OPTIMIZE_LL1: boolean = true; + private static readonly OPTIMIZE_UNIQUE_CLOSURE: boolean = true; + private static readonly OPTIMIZE_TAIL_CALLS: boolean = true; + private static readonly TAIL_CALL_PRESERVES_SLL: boolean = true; + private static readonly TREAT_SLLK1_CONFLICT_AS_AMBIGUITY: boolean = false; - private static readonly TWO_STAGE_PARSING: boolean = true; + private static readonly TWO_STAGE_PARSING: boolean = true; - private static readonly SHOW_CONFIG_STATS: boolean = false; + private static readonly SHOW_CONFIG_STATS: boolean = false; /** * If {@code true}, detailed statistics for the number of DFA edges were * taken while parsing each file, as well as the number of DFA edges which * required on-the-fly computation. */ - public static readonly COMPUTE_TRANSITION_STATS: boolean = false; - private static readonly SHOW_TRANSITION_STATS_PER_FILE: boolean = false; + public static readonly COMPUTE_TRANSITION_STATS: boolean = false; + private static readonly SHOW_TRANSITION_STATS_PER_FILE: boolean = false; /** * If {@code true}, the transition statistics will be adjusted to a running * total before reporting the final results. */ - private static readonly TRANSITION_RUNNING_AVERAGE: boolean = false; + private static readonly TRANSITION_RUNNING_AVERAGE: boolean = false; /** * If {@code true}, transition statistics will be weighted according to the * total number of transitions taken during the parsing of each file. */ - private static readonly TRANSITION_WEIGHTED_AVERAGE: boolean = false; + private static readonly TRANSITION_WEIGHTED_AVERAGE: boolean = false; /** * If {@code true}, after each pass a summary of the time required to parse * each file will be printed. */ - private static readonly COMPUTE_TIMING_STATS: boolean = false; + private static readonly COMPUTE_TIMING_STATS: boolean = false; /** * If {@code true}, the timing statistics for {@link #COMPUTE_TIMING_STATS} * will be cumulative (i.e. the time reported for the nth file will * be the total time required to parse the first n files). */ - private static readonly TIMING_CUMULATIVE: boolean = false; + private static readonly TIMING_CUMULATIVE: boolean = false; /** * If {@code true}, the timing statistics will include the parser only. This * flag allows for targeted measurements, and helps eliminate variance when @@ -337,17 +346,17 @@ export class TestPerformance { *

* This flag has no impact when {@link #RUN_PARSER} is {@code false}. */ - private static readonly TIME_PARSE_ONLY: boolean = false; + private static readonly TIME_PARSE_ONLY: boolean = false; /** * When {@code true}, messages will be printed to {@link System#err} when * the first stage (SLL) parsing resulted in a syntax error. This option is * ignored when {@link #TWO_STAGE_PARSING} is {@code false}. */ - private static readonly REPORT_SECOND_STAGE_RETRY: boolean = true; - public static readonly REPORT_SYNTAX_ERRORS: boolean = true; - public static readonly REPORT_AMBIGUITIES: boolean = false; - public static readonly REPORT_FULL_CONTEXT: boolean = false; + private static readonly REPORT_SECOND_STAGE_RETRY: boolean = true; + public static readonly REPORT_SYNTAX_ERRORS: boolean = true; + public static readonly REPORT_AMBIGUITIES: boolean = false; + public static readonly REPORT_FULL_CONTEXT: boolean = false; public static readonly REPORT_CONTEXT_SENSITIVITY: boolean = TestPerformance.REPORT_FULL_CONTEXT; /** @@ -355,27 +364,27 @@ export class TestPerformance { * {@link Lexer#setInputStream} will be called to initialize it for each * source file. Otherwise, a new instance will be created for each file. */ - private static readonly REUSE_LEXER: boolean = false; + private static readonly REUSE_LEXER: boolean = false; /** * If {@code true}, a single DFA will be used for lexing which is shared * across all threads and files. Otherwise, each file will be lexed with its * own DFA which is accomplished by creating one ATN instance per thread and * clearing its DFA cache before lexing each file. */ - private static readonly REUSE_LEXER_DFA: boolean = true; + private static readonly REUSE_LEXER_DFA: boolean = true; /** * If {@code true}, a single {@code JavaParser} will be used, and * {@link Parser#setInputStream} will be called to initialize it for each * source file. Otherwise, a new instance will be created for each file. */ - private static readonly REUSE_PARSER: boolean = false; + private static readonly REUSE_PARSER: boolean = false; /** * If {@code true}, a single DFA will be used for parsing which is shared * across all threads and files. Otherwise, each file will be parsed with * its own DFA which is accomplished by creating one ATN instance per thread * and clearing its DFA cache before parsing each file. */ - private static readonly REUSE_PARSER_DFA: boolean = true; + private static readonly REUSE_PARSER_DFA: boolean = true; /** * If {@code true}, the shared lexer and parser are reset after each pass. * If {@code false}, all passes after the first will be fully "warmed up", @@ -383,31 +392,31 @@ export class TestPerformance { * but it will not distinguish bytecode load/JIT time from warm-up time * during the first pass. */ - private static readonly CLEAR_DFA: boolean = false; + private static readonly CLEAR_DFA: boolean = false; /** * Total number of passes to make over the source. */ - private static readonly PASSES: number = 4; + private static readonly PASSES: number = 4; /** * This option controls the granularity of multi-threaded parse operations. * If {@code true}, the parsing operation will be parallelized across files; * otherwise the parsing will be parallelized across multiple iterations. */ - private static readonly FILE_GRANULARITY: boolean = true; + private static readonly FILE_GRANULARITY: boolean = true; /** * Number of parser threads to use. */ - public static readonly NUMBER_OF_THREADS: number = 1; + public static readonly NUMBER_OF_THREADS: number = 1; - private static readonly sharedLexers: Array = new Array(TestPerformance.NUMBER_OF_THREADS); - private static readonly sharedLexerATNs: Array = new Array(TestPerformance.NUMBER_OF_THREADS); + private static readonly sharedLexers: (Lexer | undefined)[] = new Array(TestPerformance.NUMBER_OF_THREADS); + private static readonly sharedLexerATNs: (ATN | undefined)[] = new Array(TestPerformance.NUMBER_OF_THREADS); - private static readonly sharedParsers: Array = new Array(TestPerformance.NUMBER_OF_THREADS); - private static readonly sharedParserATNs: Array = new Array(TestPerformance.NUMBER_OF_THREADS); + private static readonly sharedParsers: (AnyJavaParser | undefined)[] = new Array(TestPerformance.NUMBER_OF_THREADS); + private static readonly sharedParserATNs: (ATN | undefined)[] = new Array(TestPerformance.NUMBER_OF_THREADS); - private static readonly sharedListeners: Array = new Array(TestPerformance.NUMBER_OF_THREADS); + private static readonly sharedListeners: (ParseTreeListener | undefined)[] = new Array(TestPerformance.NUMBER_OF_THREADS); private static readonly totalTransitionsPerFile: Uint32Array[] = new Array(TestPerformance.PASSES); private static readonly computedTransitionsPerFile: Uint32Array[] = new Array(TestPerformance.PASSES); @@ -429,8 +438,8 @@ export class TestPerformance { assertTrue(jdkSourceRoot != null && jdkSourceRoot.length > 0, "The JDK_SOURCE_ROOT environment variable must be set for performance testing."); jdkSourceRoot = jdkSourceRoot as string; - let lexerCtor: {new(input: CharStream): JavaLRLexer | JavaLRLexerAtn | JavaLexer | JavaLexerAtn} = TestPerformance.USE_LR_GRAMMAR ? JavaLRLexer : JavaLexer; - let parserCtor: {new(input: TokenStream): JavaLRParser | JavaLRParserAtn | JavaParser | JavaParserAtn} = TestPerformance.USE_LR_GRAMMAR ? JavaLRParser : JavaParser; + let lexerCtor: new (input: CharStream) => JavaLRLexer | JavaLRLexerAtn | JavaLexer | JavaLexerAtn = TestPerformance.USE_LR_GRAMMAR ? JavaLRLexer : JavaLexer; + let parserCtor: new (input: TokenStream) => IJavaParser = TestPerformance.USE_LR_GRAMMAR ? JavaLRParser : JavaParser; if (TestPerformance.FORCE_ATN) { lexerCtor = TestPerformance.USE_LR_GRAMMAR ? JavaLRLexerAtn : JavaLexerAtn; parserCtor = TestPerformance.USE_LR_GRAMMAR ? JavaLRParserAtn : JavaParserAtn; @@ -439,20 +448,26 @@ export class TestPerformance { parserCtor = TestPerformance.USE_LR_GRAMMAR ? JavaLRParser : JavaParser; } - let listenerName: string = TestPerformance.USE_LR_GRAMMAR ? "JavaLRBaseListener" : "JavaBaseListener"; - let entryPoint: string = "compilationUnit"; - let factory: ParserFactory = this.getParserFactory(lexerCtor, parserCtor, EmptyListener, JavaLRParser.prototype.compilationUnit.name, (parser) => parser.compilationUnit()); + const listenerName: string = TestPerformance.USE_LR_GRAMMAR ? "JavaLRBaseListener" : "JavaBaseListener"; + const entryPoint = "compilationUnit"; + const factory: ParserFactory = this.getParserFactory( + lexerCtor, + parserCtor, + EmptyListener, + JavaLRParser.prototype.compilationUnit.name, + (parser: IJavaParser) => parser.compilationUnit() + ); if (TestPerformance.TOP_PACKAGE.length > 0) { jdkSourceRoot = jdkSourceRoot + "/" + TestPerformance.TOP_PACKAGE.replace(/\./g, "/"); } - let directory: string = jdkSourceRoot; + const directory: string = jdkSourceRoot; assertTrue(fs.lstatSync(directory).isDirectory()); - let filesFilter: FilenameFilter = FilenameFilters.extension(".java", false); - let directoriesFilter: FilenameFilter = FilenameFilters.ALL_FILES; - let sources: InputDescriptor[] = this.loadSources(directory, filesFilter, directoriesFilter, TestPerformance.RECURSIVE); + const filesFilter: FilenameFilter = FilenameFilters.extension(".java", false); + const directoriesFilter: FilenameFilter = FilenameFilters.ALL_FILES; + const sources: InputDescriptor[] = this.loadSources(directory, filesFilter, directoriesFilter, TestPerformance.RECURSIVE); for (let i = 0; i < TestPerformance.PASSES; i++) { if (TestPerformance.COMPUTE_TRANSITION_STATS) { @@ -480,7 +495,7 @@ export class TestPerformance { // let executorService: ExecutorService = Executors.newFixedThreadPool(TestPerformance.FILE_GRANULARITY ? 1 : TestPerformance.NUMBER_OF_THREADS, new NumberedThreadFactory()); // let passResults: Promise[] = []; // passResults.add(executorService.submit(new Runnable() { - // @Override + // // @Override // run(): void { try { this.parse1(0, factory, sources, TestPerformance.SHUFFLE_FILES_AT_START); @@ -491,19 +506,19 @@ export class TestPerformance { // } // })); for (let i = 0; i < TestPerformance.PASSES - 1; i++) { - let currentPass: number = i + 1; - // passResults.add(executorService.submit(new Runnable() { - // @Override - // run(): void { + const currentPass: number = i + 1; + // passResults.add(executorService.submit(new Runnable() { + // // @Override + // run(): void { if (TestPerformance.CLEAR_DFA) { - let index: number = TestPerformance.FILE_GRANULARITY ? 0 : 0; + const index: number = TestPerformance.FILE_GRANULARITY ? 0 : 0; if (TestPerformance.sharedLexers.length > 0 && TestPerformance.sharedLexers[index] != null) { - let atn: ATN = TestPerformance.sharedLexers[index]!.atn; + const atn: ATN = TestPerformance.sharedLexers[index]!.atn; atn.clearDFA(); } if (TestPerformance.sharedParsers.length > 0 && TestPerformance.sharedParsers[index] != null) { - let atn: ATN = TestPerformance.sharedParsers[index]!.atn; + const atn: ATN = TestPerformance.sharedParsers[index]!.atn; atn.clearDFA(); } @@ -519,8 +534,8 @@ export class TestPerformance { // Logger.getLogger(TestPerformance.class.getName()).log(Level.SEVERE, null, ex); console.error(ex); } - // } - // })); + // } + // })); } // for (let passResult of passResults) { @@ -568,12 +583,12 @@ export class TestPerformance { } } - let sumNum: Uint32Array = new Uint32Array(TestPerformance.totalTransitionsPerFile[0].length); - let sumDen: Uint32Array = new Uint32Array(TestPerformance.totalTransitionsPerFile[0].length); - let sumNormalized: Float64Array = new Float64Array(TestPerformance.totalTransitionsPerFile[0].length); + const sumNum: Uint32Array = new Uint32Array(TestPerformance.totalTransitionsPerFile[0].length); + const sumDen: Uint32Array = new Uint32Array(TestPerformance.totalTransitionsPerFile[0].length); + const sumNormalized: Float64Array = new Float64Array(TestPerformance.totalTransitionsPerFile[0].length); for (let i = 0; i < TestPerformance.PASSES; i++) { - let num: Uint32Array = TestPerformance.computedTransitionsPerFile[i]; - let den: Uint32Array = TestPerformance.totalTransitionsPerFile[i]; + const num: Uint32Array = TestPerformance.computedTransitionsPerFile[i]; + const den: Uint32Array = TestPerformance.totalTransitionsPerFile[i]; for (let j = 0; j < den.length; j++) { sumNum[j] += num[j]; sumDen[j] += den[j]; @@ -583,8 +598,8 @@ export class TestPerformance { } } - let weightedAverage: Float64Array = new Float64Array(TestPerformance.totalTransitionsPerFile[0].length); - let average: Float64Array = new Float64Array(TestPerformance.totalTransitionsPerFile[0].length); + const weightedAverage: Float64Array = new Float64Array(TestPerformance.totalTransitionsPerFile[0].length); + const average: Float64Array = new Float64Array(TestPerformance.totalTransitionsPerFile[0].length); for (let i = 0; i < average.length; i++) { if (sumDen[i] > 0) { weightedAverage[i] = sumNum[i] / sumDen[i]; @@ -596,15 +611,15 @@ export class TestPerformance { average[i] = sumNormalized[i] / TestPerformance.PASSES; } - let low95: Float64Array = new Float64Array(TestPerformance.totalTransitionsPerFile[0].length); - let high95: Float64Array = new Float64Array(TestPerformance.totalTransitionsPerFile[0].length); - let low67: Float64Array = new Float64Array(TestPerformance.totalTransitionsPerFile[0].length); - let high67: Float64Array = new Float64Array(TestPerformance.totalTransitionsPerFile[0].length); - let stddev: Float64Array = new Float64Array(TestPerformance.totalTransitionsPerFile[0].length); + const low95: Float64Array = new Float64Array(TestPerformance.totalTransitionsPerFile[0].length); + const high95: Float64Array = new Float64Array(TestPerformance.totalTransitionsPerFile[0].length); + const low67: Float64Array = new Float64Array(TestPerformance.totalTransitionsPerFile[0].length); + const high67: Float64Array = new Float64Array(TestPerformance.totalTransitionsPerFile[0].length); + const stddev: Float64Array = new Float64Array(TestPerformance.totalTransitionsPerFile[0].length); for (let i = 0; i < stddev.length; i++) { - let points: Float64Array = new Float64Array(TestPerformance.PASSES); + const points: Float64Array = new Float64Array(TestPerformance.PASSES); for (let j = 0; j < TestPerformance.PASSES; j++) { - let totalTransitions: number = TestPerformance.totalTransitionsPerFile[j][i]; + const totalTransitions: number = TestPerformance.totalTransitionsPerFile[j][i]; if (totalTransitions > 0) { points[j] = TestPerformance.computedTransitionsPerFile[j][i] / TestPerformance.totalTransitionsPerFile[j][i]; } @@ -615,15 +630,15 @@ export class TestPerformance { points.sort(); - let averageValue: number = TestPerformance.TRANSITION_WEIGHTED_AVERAGE ? weightedAverage[i] : average[i]; - let value: number = 0; + const averageValue: number = TestPerformance.TRANSITION_WEIGHTED_AVERAGE ? weightedAverage[i] : average[i]; + let value = 0; for (let j = 0; j < TestPerformance.PASSES; j++) { - let diff: number = points[j] - averageValue; + const diff: number = points[j] - averageValue; value += diff * diff; } - let ignoreCount95: number = Math.round(TestPerformance.PASSES * (1 - 0.95) / 2.0) | 0; - let ignoreCount67: number = Math.round(TestPerformance.PASSES * (1 - 0.667) / 2.0) | 0; + const ignoreCount95: number = Math.round(TestPerformance.PASSES * (1 - 0.95) / 2.0) | 0; + const ignoreCount67: number = Math.round(TestPerformance.PASSES * (1 - 0.667) / 2.0) | 0; low95[i] = points[ignoreCount95]; high95[i] = points[points.length - 1 - ignoreCount95]; low67[i] = points[ignoreCount67]; @@ -633,7 +648,7 @@ export class TestPerformance { console.log("File\tAverage\tStd. Dev.\t95%% Low\t95%% High\t66.7%% Low\t66.7%% High"); for (let i = 0; i < stddev.length; i++) { - let averageValue: number = TestPerformance.TRANSITION_WEIGHTED_AVERAGE ? weightedAverage[i] : average[i]; + const averageValue: number = TestPerformance.TRANSITION_WEIGHTED_AVERAGE ? weightedAverage[i] : average[i]; console.log(`${i + 1}\t${averageValue}\t${stddev[i]}\t${averageValue - low95[i]}\t${high95[i] - averageValue}\t${averageValue - low67[i]}\t${high67[i] - averageValue}`); } } @@ -644,55 +659,55 @@ export class TestPerformance { private computeTimingStatistics(): void { if (TestPerformance.TIMING_CUMULATIVE) { for (let i = 0; i < TestPerformance.PASSES; i++) { - let data: Float64Array = TestPerformance.timePerFile[i]; + const data: Float64Array = TestPerformance.timePerFile[i]; for (let j = 0; j < data.length - 1; j++) { data[j + 1] += data[j]; } - let data2: Int32Array = TestPerformance.tokensPerFile[i]; + const data2: Int32Array = TestPerformance.tokensPerFile[i]; for (let j = 0; j < data2.length - 1; j++) { data2[j + 1] += data2[j]; } } } - let fileCount: number = TestPerformance.timePerFile[0].length; - let sum: Float64Array = new Float64Array(fileCount); + const fileCount: number = TestPerformance.timePerFile[0].length; + const sum: Float64Array = new Float64Array(fileCount); for (let i = 0; i < TestPerformance.PASSES; i++) { - let data: Float64Array = TestPerformance.timePerFile[i]; - let tokenData: Int32Array = TestPerformance.tokensPerFile[i]; + const data: Float64Array = TestPerformance.timePerFile[i]; + const tokenData: Int32Array = TestPerformance.tokensPerFile[i]; for (let j = 0; j < data.length; j++) { sum[j] += data[j] / tokenData[j]; } } - let average: Float64Array = new Float64Array(fileCount); + const average: Float64Array = new Float64Array(fileCount); for (let i = 0; i < average.length; i++) { average[i] = sum[i] / TestPerformance.PASSES; } - let low95: Float64Array = new Float64Array(fileCount); - let high95: Float64Array = new Float64Array(fileCount); - let low67: Float64Array = new Float64Array(fileCount); - let high67: Float64Array = new Float64Array(fileCount); - let stddev: Float64Array = new Float64Array(fileCount); + const low95: Float64Array = new Float64Array(fileCount); + const high95: Float64Array = new Float64Array(fileCount); + const low67: Float64Array = new Float64Array(fileCount); + const high67: Float64Array = new Float64Array(fileCount); + const stddev: Float64Array = new Float64Array(fileCount); for (let i = 0; i < stddev.length; i++) { - let points: Float64Array = new Float64Array(TestPerformance.PASSES); + const points: Float64Array = new Float64Array(TestPerformance.PASSES); for (let j = 0; j < TestPerformance.PASSES; j++) { points[j] = TestPerformance.timePerFile[j][i] / TestPerformance.tokensPerFile[j][i]; } points.sort(); - let averageValue: number = average[i]; - let value: number = 0; + const averageValue: number = average[i]; + let value = 0; for (let j = 0; j < TestPerformance.PASSES; j++) { - let diff: number = points[j] - averageValue; + const diff: number = points[j] - averageValue; value += diff * diff; } - let ignoreCount95: number = Math.round(TestPerformance.PASSES * (1 - 0.95) / 2.0) | 0; - let ignoreCount67: number = Math.round(TestPerformance.PASSES * (1 - 0.667) / 2.0) | 0; + const ignoreCount95: number = Math.round(TestPerformance.PASSES * (1 - 0.95) / 2.0) | 0; + const ignoreCount67: number = Math.round(TestPerformance.PASSES * (1 - 0.667) / 2.0) | 0; low95[i] = points[ignoreCount95]; high95[i] = points[points.length - 1 - ignoreCount95]; low67[i] = points[ignoreCount67]; @@ -702,13 +717,13 @@ export class TestPerformance { console.log("File\tAverage\tStd. Dev.\t95% Low\t95% High\t66.7% Low\t66.7% High"); for (let i = 0; i < stddev.length; i++) { - let averageValue: number = average[i]; + const averageValue: number = average[i]; console.log(`${i + 1}\t${averageValue}\t${stddev[i]}\t${averageValue - low95[i]}\t${high95[i] - averageValue}\t${averageValue - low67[i]}\t${high67[i] - averageValue}`); } } private getSourceRoot(prefix: string): string | undefined { - let sourceRoot = process.env[prefix + "_SOURCE_ROOT"]; + const sourceRoot = process.env[prefix + "_SOURCE_ROOT"]; // if (sourceRoot == null) { // sourceRoot = System.getProperty(prefix+"_SOURCE_ROOT"); // } @@ -724,7 +739,7 @@ export class TestPerformance { // } public static getOptionsDescription(topPackage: string): string { - let builder: string = ""; + let builder = ""; builder += ("Input="); if (topPackage.length === 0) { builder += ("*"); @@ -795,8 +810,8 @@ export class TestPerformance { assert(fs.lstatSync(directory).isDirectory()); - let sources: string[] = listFilesSync(directory, filesFilter); - for (let file of sources) { + const sources: string[] = listFilesSync(directory, filesFilter); + for (const file of sources) { if (!fs.lstatSync(file).isFile()) { continue; } @@ -805,8 +820,8 @@ export class TestPerformance { } if (recursive) { - let children: string[] = listFilesSync(directory, directoriesFilter); - for (let child of children) { + const children: string[] = listFilesSync(directory, directoriesFilter); + for (const child of children) { if (fs.lstatSync(child).isDirectory()) { this.loadSources(child, filesFilter, directoriesFilter, true, result); } @@ -814,21 +829,21 @@ export class TestPerformance { } } - public configOutputSize: number = 0; + public configOutputSize = 0; protected parseSources(currentPass: number, factory: ParserFactory, sources: InputDescriptor[], shuffleSources: boolean): void { if (shuffleSources) { - let sourcesList: InputDescriptor[] = sources.slice(0); + const sourcesList: InputDescriptor[] = sources.slice(0); shuffleArray(sourcesList); sources = sourcesList; } - let startTime: Stopwatch = Stopwatch.startNew(); + const startTime: Stopwatch = Stopwatch.startNew(); TestPerformance.tokenCount[currentPass] = 0; - let inputSize: number = 0; - let inputCount: number = 0; + let inputSize = 0; + let inputCount = 0; - let results: Array = []; + const results: (FileParseResult | undefined)[] = []; // let executorService: ExecutorService; // if (TestPerformance.FILE_GRANULARITY) { // executorService = Executors.newFixedThreadPool(TestPerformance.FILE_GRANULARITY ? TestPerformance.NUMBER_OF_THREADS : 1, new NumberedThreadFactory()); @@ -836,40 +851,40 @@ export class TestPerformance { // executorService = Executors.newSingleThreadExecutor(new FixedThreadNumberFactory((Thread.currentThread()).getThreadNumber())); // } - for (let inputDescriptor of sources) { + for (const inputDescriptor of sources) { if (inputCount >= TestPerformance.MAX_FILES_PER_PARSE_ITERATION) { break; } - let input: CharStream = inputDescriptor.getInputStream(); + const input: CharStream = inputDescriptor.getInputStream(); input.seek(0); inputSize += input.size; inputCount++; - let futureChecksum: () => FileParseResult | undefined = () => { + const futureChecksum: () => FileParseResult | undefined = () => { // @Override // call(): FileParseResult { - // this incurred a great deal of overhead and was causing significant variations in performance results. - // console.log(`Parsing file ${input.sourceName}`); - try { - return factory.parseFile(input, currentPass, 0); - } catch (ex) { - console.error(ex); - } + // this incurred a great deal of overhead and was causing significant variations in performance results. + // console.log(`Parsing file ${input.sourceName}`); + try { + return factory.parseFile(input, currentPass, 0); + } catch (ex) { + console.error(ex); + } - return undefined; + return undefined; // } }; results.push(futureChecksum()); } - let checksum = new MurmurHashChecksum(); - let currentIndex: number = -1; - for (let future of results) { + const checksum = new MurmurHashChecksum(); + let currentIndex = -1; + for (const future of results) { currentIndex++; - let fileChecksum: number = 0; + let fileChecksum = 0; // try { - let fileResult: FileParseResult | undefined = future; + const fileResult: FileParseResult | undefined = future; if (fileResult == null) { continue; } @@ -909,22 +924,22 @@ export class TestPerformance { console.log(`${currentPass + 1}. Total parse time for ${inputCount} files (${Math.round(inputSize / 1024)} KiB, ${TestPerformance.tokenCount[currentPass]} tokens${TestPerformance.COMPUTE_CHECKSUM ? `, checksum 0x${(checksum.getValue() >>> 0).toString(16)}` : ""}): ${Math.round(startTime.elapsedMillis())}ms`); if (TestPerformance.sharedLexers.length > 0) { - let index: number = TestPerformance.FILE_GRANULARITY ? 0 : 0; - let lexer: Lexer = TestPerformance.sharedLexers[index]!; - let lexerInterpreter: LexerATNSimulator = lexer.interpreter; - let modeToDFA: DFA[] = lexerInterpreter.atn.modeToDFA; + const index: number = TestPerformance.FILE_GRANULARITY ? 0 : 0; + const lexer: Lexer = TestPerformance.sharedLexers[index]!; + const lexerInterpreter: LexerATNSimulator = lexer.interpreter; + const modeToDFA: DFA[] = lexerInterpreter.atn.modeToDFA; if (TestPerformance.SHOW_DFA_STATE_STATS) { - let states: number = 0; - let configs: number = 0; - let uniqueConfigs: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE); + let states = 0; + let configs = 0; + const uniqueConfigs: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE); - for (let dfa of modeToDFA) { + for (const dfa of modeToDFA) { if (dfa == null) { continue; } states += dfa.states.size; - for (let state of dfa.states) { + for (const state of dfa.states) { configs += state.configs.size; uniqueConfigs.addAll(state.configs); } @@ -935,17 +950,17 @@ export class TestPerformance { if (TestPerformance.DETAILED_DFA_STATE_STATS) { console.log("\tMode\tStates\tConfigs\tMode"); for (let i = 0; i < modeToDFA.length; i++) { - let dfa: DFA = modeToDFA[i]; + const dfa: DFA = modeToDFA[i]; if (dfa == null || dfa.states.isEmpty) { continue; } - let modeConfigs: number = 0; - for (let state of dfa.states) { + let modeConfigs = 0; + for (const state of dfa.states) { modeConfigs += state.configs.size; } - let modeName: string = lexer.modeNames[i]; + const modeName: string = lexer.modeNames[i]; console.log(`\t${dfa.decision}\t${dfa.states.size}\t${modeConfigs}\t${modeName}`); } } @@ -953,24 +968,24 @@ export class TestPerformance { } if (TestPerformance.RUN_PARSER && TestPerformance.sharedParsers.length > 0) { - let index: number = TestPerformance.FILE_GRANULARITY ? 0 : 0; - let parser: Parser = TestPerformance.sharedParsers[index]!; + const index: number = TestPerformance.FILE_GRANULARITY ? 0 : 0; + const parser: Parser = TestPerformance.sharedParsers[index]!; // make sure the individual DFAState objects actually have unique ATNConfig arrays - let interpreter: ParserATNSimulator = parser.interpreter; - let decisionToDFA: DFA[] = interpreter.atn.decisionToDFA; + const interpreter: ParserATNSimulator = parser.interpreter; + const decisionToDFA: DFA[] = interpreter.atn.decisionToDFA; if (TestPerformance.SHOW_DFA_STATE_STATS) { - let states: number = 0; - let configs: number = 0; - let uniqueConfigs: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE); + let states = 0; + let configs = 0; + const uniqueConfigs: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE); - for (let dfa of decisionToDFA) { + for (const dfa of decisionToDFA) { if (dfa == null) { continue; } states += dfa.states.size; - for (let state of dfa.states) { + for (const state of dfa.states) { configs += state.configs.size; uniqueConfigs.addAll(state.configs); } @@ -987,49 +1002,49 @@ export class TestPerformance { } for (let i = 0; i < decisionToDFA.length; i++) { - let dfa: DFA = decisionToDFA[i]; + const dfa: DFA = decisionToDFA[i]; if (dfa == null || dfa.states.isEmpty) { continue; } - let decisionConfigs: number = 0; - for (let state of dfa.states) { + let decisionConfigs = 0; + for (const state of dfa.states) { decisionConfigs += state.configs.size; } - let ruleName: string = parser.ruleNames[parser.atn.decisionToState[dfa.decision].ruleIndex]; + const ruleName: string = parser.ruleNames[parser.atn.decisionToState[dfa.decision].ruleIndex]; - let calls: number = 0; - let fullContextCalls: number = 0; - let nonSllCalls: number = 0; - let transitions: number = 0; - let computedTransitions: number = 0; - let fullContextTransitions: number = 0; - let lookahead: number = 0; - let fullContextLookahead: number = 0; + let calls = 0; + let fullContextCalls = 0; + let nonSllCalls = 0; + let transitions = 0; + let computedTransitions = 0; + let fullContextTransitions = 0; + let lookahead = 0; + let fullContextLookahead = 0; let formatString: string; if (TestPerformance.COMPUTE_TRANSITION_STATS) { - for (let data of TestPerformance.decisionInvocationsPerFile[currentPass]) { + for (const data of TestPerformance.decisionInvocationsPerFile[currentPass]) { calls += data[i]; } - for (let data of TestPerformance.fullContextFallbackPerFile[currentPass]) { + for (const data of TestPerformance.fullContextFallbackPerFile[currentPass]) { fullContextCalls += data[i]; } - for (let data of TestPerformance.nonSllPerFile[currentPass]) { + for (const data of TestPerformance.nonSllPerFile[currentPass]) { nonSllCalls += data[i]; } - for (let data of TestPerformance.totalTransitionsPerDecisionPerFile[currentPass]) { + for (const data of TestPerformance.totalTransitionsPerDecisionPerFile[currentPass]) { transitions += data[i]; } - for (let data of TestPerformance.computedTransitionsPerDecisionPerFile[currentPass]) { + for (const data of TestPerformance.computedTransitionsPerDecisionPerFile[currentPass]) { computedTransitions += data[i]; } - for (let data of TestPerformance.fullContextTransitionsPerDecisionPerFile[currentPass]) { + for (const data of TestPerformance.fullContextTransitionsPerDecisionPerFile[currentPass]) { fullContextTransitions += data[i]; } @@ -1053,28 +1068,28 @@ export class TestPerformance { } } - let localDfaCount: number = 0; - let globalDfaCount: number = 0; - let localConfigCount: number = 0; - let globalConfigCount: number = 0; - let contextsInDFAState: Int32Array = new Int32Array(0); + let localDfaCount = 0; + let globalDfaCount = 0; + let localConfigCount = 0; + let globalConfigCount = 0; + let contextsInDFAState: Int32Array = new Int32Array(0); - for (let dfa of decisionToDFA) { + for (const dfa of decisionToDFA) { if (dfa == null) { continue; } if (TestPerformance.SHOW_CONFIG_STATS) { - for (let state of dfa.states) { + for (const state of dfa.states) { if (state.configs.size >= contextsInDFAState.length) { - let contextsInDFAState2 = new Int32Array(state.configs.size + 1); + const contextsInDFAState2 = new Int32Array(state.configs.size + 1); contextsInDFAState2.set(contextsInDFAState); contextsInDFAState = contextsInDFAState2; } if (state.isAcceptState) { - let hasGlobal: boolean = false; - for (let config of state.configs) { + let hasGlobal = false; + for (const config of state.configs) { if (config.reachesIntoOuterContext) { globalConfigCount++; hasGlobal = true; @@ -1095,9 +1110,9 @@ export class TestPerformance { } if (TestPerformance.EXPORT_LARGEST_CONFIG_CONTEXTS) { - for (let state of dfa.states) { - for (let config of state.configs) { - let configOutput: string = config.toDotString(); + for (const state of dfa.states) { + for (const config of state.configs) { + const configOutput: string = config.toDotString(); if (configOutput.length <= this.configOutputSize) { continue; } @@ -1132,8 +1147,8 @@ export class TestPerformance { } private static sum(array: Uint32Array): number { - let result: number = 0; - for (let value of array) { + let result = 0; + for (const value of array) { result += value; } @@ -1144,7 +1159,7 @@ export class TestPerformance { if (typeof value === "number") { checksum.update(value); } else { - let token: Token | undefined = value; + const token: Token | undefined = value; if (token == null) { checksum.update(0); return; @@ -1159,7 +1174,7 @@ export class TestPerformance { } } - protected getParserFactory(lexerCtor: {new(input: CharStream): JavaLRLexer | JavaLRLexerAtn | JavaLexer | JavaLexerAtn}, parserCtor: {new(input: TokenStream): JavaLRParser | JavaLRParserAtn | JavaParser | JavaParserAtn}, listenerCtor: {new(): ParseTreeListener}, entryPointName: string, entryPoint: (parser: JavaLRParser | JavaLRParserAtn | JavaParser | JavaParserAtn) => ParserRuleContext): ParserFactory { + protected getParserFactory(lexerCtor: new (input: CharStream) => JavaLRLexer | JavaLRLexerAtn | JavaLexer | JavaLexerAtn, parserCtor: new (input: TokenStream) => IJavaParser, listenerCtor: new () => ParseTreeListener, entryPointName: string, entryPoint: (parser: IJavaParser) => ParserRuleContext): ParserFactory { // try { // let loader: ClassLoader = new URLClassLoader(new URL[] { new File(tmpdir).toURI().toURL() }, ClassLoader.getSystemClassLoader()); // lexerClass: Class = loader.loadClass(lexerName).asSubclass(Lexer.class); @@ -1169,124 +1184,196 @@ export class TestPerformance { // lexerCtor: Constructor = lexerClass.getConstructor(CharStream.class); // parserCtor: Constructor = parserClass.getConstructor(TokenStream.class); - // construct initial instances of the lexer and parser to deserialize their ATNs - let lexerInstance = new lexerCtor(CharStreams.fromString("")); - let parserInstance = new parserCtor(new CommonTokenStream(lexerInstance)); + // construct initial instances of the lexer and parser to deserialize their ATNs + const lexerInstance = new lexerCtor(CharStreams.fromString("")); + const parserInstance = new parserCtor(new CommonTokenStream(lexerInstance)); - if (!TestPerformance.REUSE_LEXER_DFA) { - let lexerSerializedATN: string = lexerInstance.serializedATN; - for (let i = 0; i < TestPerformance.NUMBER_OF_THREADS; i++) { - TestPerformance.sharedLexerATNs[i] = new ATNDeserializer().deserialize(Utils.toCharArray(lexerSerializedATN)); - } + if (!TestPerformance.REUSE_LEXER_DFA) { + const lexerSerializedATN: string = lexerInstance.serializedATN; + for (let i = 0; i < TestPerformance.NUMBER_OF_THREADS; i++) { + TestPerformance.sharedLexerATNs[i] = new ATNDeserializer().deserialize(Utils.toCharArray(lexerSerializedATN)); } + } - if (TestPerformance.RUN_PARSER && !TestPerformance.REUSE_PARSER_DFA) { - let parserSerializedATN: string = parserInstance.serializedATN; - for (let i = 0; i < TestPerformance.NUMBER_OF_THREADS; i++) { - TestPerformance.sharedParserATNs[i] = new ATNDeserializer().deserialize(Utils.toCharArray(parserSerializedATN)); - } + if (TestPerformance.RUN_PARSER && !TestPerformance.REUSE_PARSER_DFA) { + const parserSerializedATN: string = parserInstance.serializedATN; + for (let i = 0; i < TestPerformance.NUMBER_OF_THREADS; i++) { + TestPerformance.sharedParserATNs[i] = new ATNDeserializer().deserialize(Utils.toCharArray(parserSerializedATN)); } + } - return { - // @SuppressWarnings("unused") - // @Override - parseFile(input: CharStream, currentPass: number, thread: number): FileParseResult { - let checksum = new MurmurHashChecksum(); + return { + // @SuppressWarnings("unused") + // @Override + parseFile(input: CharStream, currentPass: number, thread: number): FileParseResult { + const checksum = new MurmurHashChecksum(); - let startTime: Stopwatch = Stopwatch.startNew(); - assert(thread >= 0 && thread < TestPerformance.NUMBER_OF_THREADS); + const startTime: Stopwatch = Stopwatch.startNew(); + assert(thread >= 0 && thread < TestPerformance.NUMBER_OF_THREADS); - try { - let listener: ParseTreeListener | undefined = TestPerformance.sharedListeners[thread]; - if (listener == null) { - listener = new listenerCtor(); - TestPerformance.sharedListeners[thread] = listener; + try { + let listener: ParseTreeListener | undefined = TestPerformance.sharedListeners[thread]; + if (listener == null) { + listener = new listenerCtor(); + TestPerformance.sharedListeners[thread] = listener; + } + + let lexer: Lexer | undefined = TestPerformance.sharedLexers[thread]; + if (TestPerformance.REUSE_LEXER && lexer != null) { + lexer.inputStream = input; + } else { + const previousLexer: Lexer | undefined = lexer; + lexer = new lexerCtor(input); + TestPerformance.sharedLexers[thread] = lexer; + let atn: ATN = (TestPerformance.FILE_GRANULARITY || previousLexer == null ? lexer : previousLexer).atn; + if (!TestPerformance.REUSE_LEXER_DFA || (!TestPerformance.FILE_GRANULARITY && previousLexer == null)) { + atn = TestPerformance.sharedLexerATNs[thread]!; } - let lexer: Lexer | undefined = TestPerformance.sharedLexers[thread]; - if (TestPerformance.REUSE_LEXER && lexer != null) { - lexer.inputStream = input; - } else { - let previousLexer: Lexer | undefined = lexer; - lexer = new lexerCtor(input); - TestPerformance.sharedLexers[thread] = lexer; - let atn: ATN = (TestPerformance.FILE_GRANULARITY || previousLexer == null ? lexer : previousLexer).atn; - if (!TestPerformance.REUSE_LEXER_DFA || (!TestPerformance.FILE_GRANULARITY && previousLexer == null)) { - atn = TestPerformance.sharedLexerATNs[thread]!; - } + if (!TestPerformance.ENABLE_LEXER_DFA) { + lexer.interpreter = new NonCachingLexerATNSimulator(atn, lexer); + } else if (!TestPerformance.REUSE_LEXER_DFA || TestPerformance.COMPUTE_TRANSITION_STATS) { + lexer.interpreter = new StatisticsLexerATNSimulator(atn, lexer); + } + } - if (!TestPerformance.ENABLE_LEXER_DFA) { - lexer.interpreter = new NonCachingLexerATNSimulator(atn, lexer); - } else if (!TestPerformance.REUSE_LEXER_DFA || TestPerformance.COMPUTE_TRANSITION_STATS) { - lexer.interpreter = new StatisticsLexerATNSimulator(atn, lexer); - } + lexer.removeErrorListeners(); + lexer.addErrorListener(DescriptiveLexerErrorListener.INSTANCE); + + lexer.interpreter.optimize_tail_calls = TestPerformance.OPTIMIZE_TAIL_CALLS; + if (TestPerformance.ENABLE_LEXER_DFA && !TestPerformance.REUSE_LEXER_DFA) { + lexer.interpreter.atn.clearDFA(); + } + + const tokens: CommonTokenStream = new CommonTokenStream(lexer); + tokens.fill(); + TestPerformance.tokenCount[currentPass] += tokens.size; + + if (TestPerformance.COMPUTE_CHECKSUM) { + for (const token of tokens.getTokens()) { + TestPerformance.updateChecksum(checksum, token); } + } + + if (!TestPerformance.RUN_PARSER) { + return new FileParseResult(input.sourceName, checksum.getValue(), undefined, tokens.size, startTime, lexer, undefined); + } - lexer.removeErrorListeners(); - lexer.addErrorListener(DescriptiveLexerErrorListener.INSTANCE); + const parseStartTime: Stopwatch = Stopwatch.startNew(); + let parser: AnyJavaParser | undefined = TestPerformance.sharedParsers[thread]; + if (TestPerformance.REUSE_PARSER && parser != null) { + parser.inputStream = tokens; + } else { + const previousParser: Parser | undefined = parser; - lexer.interpreter.optimize_tail_calls = TestPerformance.OPTIMIZE_TAIL_CALLS; - if (TestPerformance.ENABLE_LEXER_DFA && !TestPerformance.REUSE_LEXER_DFA) { - lexer.interpreter.atn.clearDFA(); + if (TestPerformance.USE_PARSER_INTERPRETER) { + const referenceParser: Parser = new parserCtor(tokens); + parser = new ParserInterpreter(referenceParser.grammarFileName, referenceParser.vocabulary, referenceParser.ruleNames, referenceParser.atn, tokens); + } + else { + parser = new parserCtor(tokens); } - let tokens: CommonTokenStream = new CommonTokenStream(lexer); - tokens.fill(); - TestPerformance.tokenCount[currentPass] += tokens.size; + let atn: ATN = (TestPerformance.FILE_GRANULARITY || previousParser == null ? parser : previousParser).atn; + if (!TestPerformance.REUSE_PARSER_DFA || (!TestPerformance.FILE_GRANULARITY && previousParser == null)) { + atn = TestPerformance.sharedParserATNs[thread]!; + } - if (TestPerformance.COMPUTE_CHECKSUM) { - for (let token of tokens.getTokens()) { - TestPerformance.updateChecksum(checksum, token); - } + if (!TestPerformance.ENABLE_PARSER_DFA) { + parser.interpreter = new NonCachingParserATNSimulator(atn, parser); + } else if (!TestPerformance.REUSE_PARSER_DFA || TestPerformance.COMPUTE_TRANSITION_STATS) { + parser.interpreter = new StatisticsParserATNSimulator(atn, parser); + } + + TestPerformance.sharedParsers[thread] = parser; + } + + parser.removeParseListeners(); + parser.removeErrorListeners(); + if (!TestPerformance.TWO_STAGE_PARSING) { + parser.addErrorListener(DescriptiveErrorListener.INSTANCE); + parser.addErrorListener(new SummarizingDiagnosticErrorListener()); + } + + if (TestPerformance.ENABLE_PARSER_DFA && !TestPerformance.REUSE_PARSER_DFA) { + parser.interpreter.atn.clearDFA(); + } + + parser.interpreter.setPredictionMode(TestPerformance.TWO_STAGE_PARSING ? PredictionMode.SLL : TestPerformance.PREDICTION_MODE); + parser.interpreter.force_global_context = TestPerformance.FORCE_GLOBAL_CONTEXT && !TestPerformance.TWO_STAGE_PARSING; + parser.interpreter.always_try_local_context = TestPerformance.TRY_LOCAL_CONTEXT_FIRST || TestPerformance.TWO_STAGE_PARSING; + parser.interpreter.enable_global_context_dfa = TestPerformance.ENABLE_PARSER_FULL_CONTEXT_DFA; + parser.interpreter.optimize_ll1 = TestPerformance.OPTIMIZE_LL1; + parser.interpreter.optimize_unique_closure = TestPerformance.OPTIMIZE_UNIQUE_CLOSURE; + parser.interpreter.optimize_tail_calls = TestPerformance.OPTIMIZE_TAIL_CALLS; + parser.interpreter.tail_call_preserves_sll = TestPerformance.TAIL_CALL_PRESERVES_SLL; + parser.interpreter.treat_sllk1_conflict_as_ambiguity = TestPerformance.TREAT_SLLK1_CONFLICT_AS_AMBIGUITY; + parser.buildParseTree = TestPerformance.BUILD_PARSE_TREES; + if (!TestPerformance.BUILD_PARSE_TREES && TestPerformance.BLANK_LISTENER) { + parser.addParseListener(listener); + } + if (TestPerformance.BAIL_ON_ERROR || TestPerformance.TWO_STAGE_PARSING) { + parser.errorHandler = new BailErrorStrategy(); + } + + // let parseMethod: Method = parserClass.getMethod(entryPoint); + let parseResult: ParserRuleContext; + + try { + if (TestPerformance.COMPUTE_CHECKSUM && !TestPerformance.BUILD_PARSE_TREES) { + parser.addParseListener(new ChecksumParseTreeListener(checksum)); + } + + if (parser instanceof ParserInterpreter) { + parseResult = parser.parse(parser.ruleNames.indexOf(entryPointName)); + } + else { + parseResult = entryPoint(parser); + } + } catch (ex) { + if (!TestPerformance.TWO_STAGE_PARSING) { + throw ex; + } + + let sourceName: string = tokens.sourceName; + sourceName = sourceName != null && sourceName.length > 0 ? sourceName + ": " : ""; + if (TestPerformance.REPORT_SECOND_STAGE_RETRY) { + console.error(sourceName + "Forced to retry with full context."); } - if (!TestPerformance.RUN_PARSER) { - return new FileParseResult(input.sourceName, checksum.getValue(), undefined, tokens.size, startTime, lexer, undefined); + if (!(ex instanceof ParseCancellationException)) { + throw ex; } - let parseStartTime: Stopwatch = Stopwatch.startNew(); - let parser: AnyJavaParser | undefined = TestPerformance.sharedParsers[thread]; - if (TestPerformance.REUSE_PARSER && parser != null) { + tokens.seek(0); + if (TestPerformance.REUSE_PARSER && TestPerformance.sharedParsers[thread] != null) { parser.inputStream = tokens; } else { - let previousParser: Parser | undefined = parser; - if (TestPerformance.USE_PARSER_INTERPRETER) { - let referenceParser: Parser = new parserCtor(tokens); + const referenceParser: Parser = new parserCtor(tokens); parser = new ParserInterpreter(referenceParser.grammarFileName, referenceParser.vocabulary, referenceParser.ruleNames, referenceParser.atn, tokens); } else { parser = new parserCtor(tokens); } - let atn: ATN = (TestPerformance.FILE_GRANULARITY || previousParser == null ? parser : previousParser).atn; - if (!TestPerformance.REUSE_PARSER_DFA || (!TestPerformance.FILE_GRANULARITY && previousParser == null)) { - atn = TestPerformance.sharedParserATNs[thread]!; - } - - if (!TestPerformance.ENABLE_PARSER_DFA) { - parser.interpreter = new NonCachingParserATNSimulator(atn, parser); - } else if (!TestPerformance.REUSE_PARSER_DFA || TestPerformance.COMPUTE_TRANSITION_STATS) { - parser.interpreter = new StatisticsParserATNSimulator(atn, parser); - } - TestPerformance.sharedParsers[thread] = parser; } parser.removeParseListeners(); parser.removeErrorListeners(); - if (!TestPerformance.TWO_STAGE_PARSING) { - parser.addErrorListener(DescriptiveErrorListener.INSTANCE); - parser.addErrorListener(new SummarizingDiagnosticErrorListener()); - } - - if (TestPerformance.ENABLE_PARSER_DFA && !TestPerformance.REUSE_PARSER_DFA) { - parser.interpreter.atn.clearDFA(); + parser.addErrorListener(DescriptiveErrorListener.INSTANCE); + parser.addErrorListener(new SummarizingDiagnosticErrorListener()); + if (!TestPerformance.ENABLE_PARSER_DFA) { + parser.interpreter = new NonCachingParserATNSimulator(parser.atn, parser); + } else if (!TestPerformance.REUSE_PARSER_DFA) { + parser.interpreter = new StatisticsParserATNSimulator(TestPerformance.sharedParserATNs[thread]!, parser); + } else if (TestPerformance.COMPUTE_TRANSITION_STATS) { + parser.interpreter = new StatisticsParserATNSimulator(parser.atn, parser); } - - parser.interpreter.setPredictionMode(TestPerformance.TWO_STAGE_PARSING ? PredictionMode.SLL : TestPerformance.PREDICTION_MODE); - parser.interpreter.force_global_context = TestPerformance.FORCE_GLOBAL_CONTEXT && !TestPerformance.TWO_STAGE_PARSING; - parser.interpreter.always_try_local_context = TestPerformance.TRY_LOCAL_CONTEXT_FIRST || TestPerformance.TWO_STAGE_PARSING; + parser.interpreter.setPredictionMode(TestPerformance.PREDICTION_MODE); + parser.interpreter.force_global_context = TestPerformance.FORCE_GLOBAL_CONTEXT; + parser.interpreter.always_try_local_context = TestPerformance.TRY_LOCAL_CONTEXT_FIRST; parser.interpreter.enable_global_context_dfa = TestPerformance.ENABLE_PARSER_FULL_CONTEXT_DFA; parser.interpreter.optimize_ll1 = TestPerformance.OPTIMIZE_LL1; parser.interpreter.optimize_unique_closure = TestPerformance.OPTIMIZE_UNIQUE_CLOSURE; @@ -1294,114 +1381,42 @@ export class TestPerformance { parser.interpreter.tail_call_preserves_sll = TestPerformance.TAIL_CALL_PRESERVES_SLL; parser.interpreter.treat_sllk1_conflict_as_ambiguity = TestPerformance.TREAT_SLLK1_CONFLICT_AS_AMBIGUITY; parser.buildParseTree = TestPerformance.BUILD_PARSE_TREES; + if (TestPerformance.COMPUTE_CHECKSUM && !TestPerformance.BUILD_PARSE_TREES) { + parser.addParseListener(new ChecksumParseTreeListener(checksum)); + } if (!TestPerformance.BUILD_PARSE_TREES && TestPerformance.BLANK_LISTENER) { parser.addParseListener(listener); } - if (TestPerformance.BAIL_ON_ERROR || TestPerformance.TWO_STAGE_PARSING) { + if (TestPerformance.BAIL_ON_ERROR) { parser.errorHandler = new BailErrorStrategy(); } - // let parseMethod: Method = parserClass.getMethod(entryPoint); - let parseResult: ParserRuleContext; - - try { - if (TestPerformance.COMPUTE_CHECKSUM && !TestPerformance.BUILD_PARSE_TREES) { - parser.addParseListener(new ChecksumParseTreeListener(checksum)); - } - - if (parser instanceof ParserInterpreter) { - parseResult = parser.parse(parser.ruleNames.indexOf(entryPointName)); - } - else { - parseResult = entryPoint(parser); - } - } catch (ex) { - if (!TestPerformance.TWO_STAGE_PARSING) { - throw ex; - } - - let sourceName: string = tokens.sourceName; - sourceName = sourceName != null && sourceName.length > 0 ? sourceName + ": " : ""; - if (TestPerformance.REPORT_SECOND_STAGE_RETRY) { - console.error(sourceName + "Forced to retry with full context."); - } - - if (!(ex instanceof ParseCancellationException)) { - throw ex; - } - - tokens.seek(0); - if (TestPerformance.REUSE_PARSER && TestPerformance.sharedParsers[thread] != null) { - parser.inputStream = tokens; - } else { - if (TestPerformance.USE_PARSER_INTERPRETER) { - let referenceParser: Parser = new parserCtor(tokens); - parser = new ParserInterpreter(referenceParser.grammarFileName, referenceParser.vocabulary, referenceParser.ruleNames, referenceParser.atn, tokens); - } - else { - parser = new parserCtor(tokens); - } - - TestPerformance.sharedParsers[thread] = parser; - } - - parser.removeParseListeners(); - parser.removeErrorListeners(); - parser.addErrorListener(DescriptiveErrorListener.INSTANCE); - parser.addErrorListener(new SummarizingDiagnosticErrorListener()); - if (!TestPerformance.ENABLE_PARSER_DFA) { - parser.interpreter = new NonCachingParserATNSimulator(parser.atn, parser); - } else if (!TestPerformance.REUSE_PARSER_DFA) { - parser.interpreter = new StatisticsParserATNSimulator(TestPerformance.sharedParserATNs[thread]!, parser); - } else if (TestPerformance.COMPUTE_TRANSITION_STATS) { - parser.interpreter = new StatisticsParserATNSimulator(parser.atn, parser); - } - parser.interpreter.setPredictionMode(TestPerformance.PREDICTION_MODE); - parser.interpreter.force_global_context = TestPerformance.FORCE_GLOBAL_CONTEXT; - parser.interpreter.always_try_local_context = TestPerformance.TRY_LOCAL_CONTEXT_FIRST; - parser.interpreter.enable_global_context_dfa = TestPerformance.ENABLE_PARSER_FULL_CONTEXT_DFA; - parser.interpreter.optimize_ll1 = TestPerformance.OPTIMIZE_LL1; - parser.interpreter.optimize_unique_closure = TestPerformance.OPTIMIZE_UNIQUE_CLOSURE; - parser.interpreter.optimize_tail_calls = TestPerformance.OPTIMIZE_TAIL_CALLS; - parser.interpreter.tail_call_preserves_sll = TestPerformance.TAIL_CALL_PRESERVES_SLL; - parser.interpreter.treat_sllk1_conflict_as_ambiguity = TestPerformance.TREAT_SLLK1_CONFLICT_AS_AMBIGUITY; - parser.buildParseTree = TestPerformance.BUILD_PARSE_TREES; - if (TestPerformance.COMPUTE_CHECKSUM && !TestPerformance.BUILD_PARSE_TREES) { - parser.addParseListener(new ChecksumParseTreeListener(checksum)); - } - if (!TestPerformance.BUILD_PARSE_TREES && TestPerformance.BLANK_LISTENER) { - parser.addParseListener(listener); - } - if (TestPerformance.BAIL_ON_ERROR) { - parser.errorHandler = new BailErrorStrategy(); - } - - if (parser instanceof ParserInterpreter) { - parseResult = parser.parse(parser.ruleNames.indexOf(entryPointName)); - } else { - parseResult = entryPoint(parser); - } - } - - if (TestPerformance.COMPUTE_CHECKSUM && TestPerformance.BUILD_PARSE_TREES) { - ParseTreeWalker.DEFAULT.walk(new ChecksumParseTreeListener(checksum), parseResult); - } - if (TestPerformance.BUILD_PARSE_TREES && TestPerformance.BLANK_LISTENER) { - ParseTreeWalker.DEFAULT.walk(listener, parseResult); + if (parser instanceof ParserInterpreter) { + parseResult = parser.parse(parser.ruleNames.indexOf(entryPointName)); + } else { + parseResult = entryPoint(parser); } + } - return new FileParseResult(input.sourceName, checksum.getValue(), parseResult, tokens.size, TestPerformance.TIME_PARSE_ONLY ? parseStartTime : startTime, lexer, parser); - } catch (e) { - if (!TestPerformance.REPORT_SYNTAX_ERRORS && e instanceof ParseCancellationException) { - return new FileParseResult("unknown", checksum.getValue(), undefined, 0, startTime, undefined, undefined); - } + if (TestPerformance.COMPUTE_CHECKSUM && TestPerformance.BUILD_PARSE_TREES) { + ParseTreeWalker.DEFAULT.walk(new ChecksumParseTreeListener(checksum), parseResult); + } + if (TestPerformance.BUILD_PARSE_TREES && TestPerformance.BLANK_LISTENER) { + ParseTreeWalker.DEFAULT.walk(listener, parseResult); + } - // e.printStackTrace(System.out); - console.error(e); - throw new Error("IllegalStateException: " + e); + return new FileParseResult(input.sourceName, checksum.getValue(), parseResult, tokens.size, TestPerformance.TIME_PARSE_ONLY ? parseStartTime : startTime, lexer, parser); + } catch (e) { + if (!TestPerformance.REPORT_SYNTAX_ERRORS && e instanceof ParseCancellationException) { + return new FileParseResult("unknown", checksum.getValue(), undefined, 0, startTime, undefined, undefined); } - }, - }; + + // e.printStackTrace(System.out); + console.error(e); + throw new Error("IllegalStateException: " + e); + } + }, + }; // } catch (Exception e) { // e.printStackTrace(System.out); // Assert.fail(e.getMessage()); @@ -1443,7 +1458,7 @@ export class FileParseResult { this.elapsedTime = this.startTime.elapsed(); if (lexer != null) { - let interpreter: LexerATNSimulator = lexer.interpreter; + const interpreter: LexerATNSimulator = lexer.interpreter; if (interpreter instanceof StatisticsLexerATNSimulator) { this.lexerTotalTransitions = interpreter.totalTransitions; this.lexerComputedTransitions = interpreter.computedTransitions; @@ -1452,8 +1467,8 @@ export class FileParseResult { this.lexerComputedTransitions = 0; } - let dfaSize: number = 0; - for (let dfa of interpreter.atn.decisionToDFA) { + let dfaSize = 0; + for (const dfa of interpreter.atn.decisionToDFA) { if (dfa != null) { dfaSize += dfa.states.size; } @@ -1467,7 +1482,7 @@ export class FileParseResult { } if (parser != null) { - let interpreter: ParserATNSimulator = parser.interpreter; + const interpreter: ParserATNSimulator = parser.interpreter; if (interpreter instanceof StatisticsParserATNSimulator) { this.decisionInvocations = interpreter.decisionInvocations; this.fullContextFallback = interpreter.fullContextFallback; @@ -1484,8 +1499,8 @@ export class FileParseResult { this.parserFullContextTransitions = new Uint32Array(0); } - let dfaSize: number = 0; - for (let dfa of interpreter.atn.decisionToDFA) { + let dfaSize = 0; + for (const dfa of interpreter.atn.decisionToDFA) { if (dfa != null) { dfaSize += dfa.states.size; } @@ -1518,13 +1533,13 @@ class StatisticsLexerATNSimulator extends LexerATNSimulator { } } - @Override + // @Override protected getExistingTargetState(s: DFAState, t: number): DFAState | undefined { this.totalTransitions++; return super.getExistingTargetState(s, t); } - @Override + // @Override protected computeTargetState(input: CharStream, s: DFAState, t: number): DFAState { this.computedTransitions++; return super.computeTargetState(input, s, t); @@ -1554,7 +1569,7 @@ class StatisticsParserATNSimulator extends ParserATNSimulator { public adaptivePredict(input: TokenStream, decision: number, outerContext: ParserRuleContext): number; public adaptivePredict(input: TokenStream, decision: number, outerContext: ParserRuleContext, useContext: boolean): number; - @Override + // @Override public adaptivePredict(input: TokenStream, decision: number, outerContext: ParserRuleContext, useContext?: boolean): number { if (useContext === undefined) { try { @@ -1574,19 +1589,19 @@ class StatisticsParserATNSimulator extends ParserATNSimulator { } } - @Override + // @Override protected getExistingTargetState(previousD: DFAState, t: number): DFAState | undefined { this.totalTransitions[this.decision]++; return super.getExistingTargetState(previousD, t); } - @Override + // @Override protected computeTargetState(dfa: DFA, s: DFAState, remainingGlobalContext: ParserRuleContext, t: number, useContext: boolean, contextCache: PredictionContextCache): [DFAState, ParserRuleContext | undefined] { this.computedTransitions[this.decision]++; return super.computeTargetState(dfa, s, remainingGlobalContext, t, useContext, contextCache); } - @Override + // @Override protected computeReachSet(dfa: DFA, previous: SimulatorState, t: number, contextCache: PredictionContextCache): SimulatorState | undefined { if (previous.useContext) { this.totalTransitions[this.decision]++; @@ -1599,16 +1614,16 @@ class StatisticsParserATNSimulator extends ParserATNSimulator { } class DescriptiveErrorListener implements ParserErrorListener { - public static INSTANCE: DescriptiveErrorListener = new DescriptiveErrorListener(); + public static INSTANCE: DescriptiveErrorListener = new DescriptiveErrorListener(); - @Override + // @Override public syntaxError(recognizer: Recognizer, offendingSymbol: T | undefined, line: number, charPositionInLine: number, msg: string, e: RecognitionException | undefined): void { if (!TestPerformance.REPORT_SYNTAX_ERRORS) { return; } - let inputStream = recognizer.inputStream; - let sourceName: string = inputStream != null ? inputStream.sourceName : ""; + const inputStream = recognizer.inputStream; + let sourceName: string = inputStream != null ? inputStream.sourceName : ""; if (sourceName.length > 0) { sourceName = `${sourceName}:${line}:${charPositionInLine}: `; } @@ -1619,16 +1634,16 @@ class DescriptiveErrorListener implements ParserErrorListener { } class DescriptiveLexerErrorListener implements ANTLRErrorListener { - public static INSTANCE: DescriptiveLexerErrorListener = new DescriptiveLexerErrorListener(); + public static INSTANCE: DescriptiveLexerErrorListener = new DescriptiveLexerErrorListener(); - @Override + // @Override public syntaxError(recognizer: Recognizer, offendingSymbol: T | undefined, line: number, charPositionInLine: number, msg: string, e: RecognitionException | undefined): void { if (!TestPerformance.REPORT_SYNTAX_ERRORS) { return; } - let inputStream = recognizer.inputStream; - let sourceName: string = inputStream != null ? inputStream.sourceName : ""; + const inputStream = recognizer.inputStream; + let sourceName: string = inputStream != null ? inputStream.sourceName : ""; if (sourceName.length > 0) { sourceName = `${sourceName}:${line}:${charPositionInLine}: `; } @@ -1642,13 +1657,13 @@ class SummarizingDiagnosticErrorListener extends DiagnosticErrorListener { private _sllConflict: BitSet | undefined; private _sllConfigs: ATNConfigSet; - @Override + // @Override public reportAmbiguity(recognizer: Parser, dfa: DFA, startIndex: number, stopIndex: number, exact: boolean, ambigAlts: BitSet | undefined, configs: ATNConfigSet): void { if (TestPerformance.COMPUTE_TRANSITION_STATS && TestPerformance.DETAILED_DFA_STATE_STATS) { - let sllPredictions: BitSet = this.getConflictingAlts(this._sllConflict, this._sllConfigs); - let sllPrediction: number = sllPredictions.nextSetBit(0); - let llPredictions: BitSet = this.getConflictingAlts(ambigAlts, configs); - let llPrediction: number = llPredictions.cardinality() === 0 ? ATN.INVALID_ALT_NUMBER : llPredictions.nextSetBit(0); + const sllPredictions: BitSet = this.getConflictingAlts(this._sllConflict, this._sllConfigs); + const sllPrediction: number = sllPredictions.nextSetBit(0); + const llPredictions: BitSet = this.getConflictingAlts(ambigAlts, configs); + const llPrediction: number = llPredictions.cardinality() === 0 ? ATN.INVALID_ALT_NUMBER : llPredictions.nextSetBit(0); if (sllPrediction !== llPrediction) { (recognizer.interpreter as StatisticsParserATNSimulator).nonSll[dfa.decision]++; } @@ -1659,13 +1674,13 @@ class SummarizingDiagnosticErrorListener extends DiagnosticErrorListener { } // show the rule name along with the decision - let decision: number = dfa.decision; - let rule: string = recognizer.ruleNames[dfa.atnStartState.ruleIndex]; - let input: string = recognizer.inputStream.getText(Interval.of(startIndex, stopIndex)); + const decision: number = dfa.decision; + const rule: string = recognizer.ruleNames[dfa.atnStartState.ruleIndex]; + const input: string = recognizer.inputStream.getText(Interval.of(startIndex, stopIndex)); recognizer.notifyErrorListeners(`reportAmbiguity d=${decision} (${rule}): ambigAlts=${ambigAlts}, input='${input}'`); } - @Override + // @Override public reportAttemptingFullContext(recognizer: Parser, dfa: DFA, startIndex: number, stopIndex: number, conflictingAlts: BitSet | undefined, conflictState: SimulatorState): void { this._sllConflict = conflictingAlts; this._sllConfigs = conflictState.s0.configs; @@ -1674,18 +1689,18 @@ class SummarizingDiagnosticErrorListener extends DiagnosticErrorListener { } // show the rule name and viable configs along with the base info - let decision: number = dfa.decision; - let rule: string = recognizer.ruleNames[dfa.atnStartState.ruleIndex]; - let input: string = recognizer.inputStream.getText(Interval.of(startIndex, stopIndex)); - let representedAlts: BitSet = this.getConflictingAlts(conflictingAlts, conflictState.s0.configs); + const decision: number = dfa.decision; + const rule: string = recognizer.ruleNames[dfa.atnStartState.ruleIndex]; + const input: string = recognizer.inputStream.getText(Interval.of(startIndex, stopIndex)); + const representedAlts: BitSet = this.getConflictingAlts(conflictingAlts, conflictState.s0.configs); recognizer.notifyErrorListeners(`reportAttemptingFullContext d=${decision} (${rule}), input='${input}', viable=${representedAlts}`); } - @Override + // @Override public reportContextSensitivity(recognizer: Parser, dfa: DFA, startIndex: number, stopIndex: number, prediction: number, acceptState: SimulatorState): void { if (TestPerformance.COMPUTE_TRANSITION_STATS && TestPerformance.DETAILED_DFA_STATE_STATS) { - let sllPredictions: BitSet = this.getConflictingAlts(this._sllConflict, this._sllConfigs); - let sllPrediction: number = sllPredictions.nextSetBit(0); + const sllPredictions: BitSet = this.getConflictingAlts(this._sllConflict, this._sllConfigs); + const sllPrediction: number = sllPredictions.nextSetBit(0); if (sllPrediction !== prediction) { (recognizer.interpreter as StatisticsParserATNSimulator).nonSll[dfa.decision]++; } @@ -1696,9 +1711,9 @@ class SummarizingDiagnosticErrorListener extends DiagnosticErrorListener { } // show the rule name and viable configs along with the base info - let decision: number = dfa.decision; - let rule: string = recognizer.ruleNames[dfa.atnStartState.ruleIndex]; - let input: string = recognizer.inputStream.getText(Interval.of(startIndex, stopIndex)); + const decision: number = dfa.decision; + const rule: string = recognizer.ruleNames[dfa.atnStartState.ruleIndex]; + const input: string = recognizer.inputStream.getText(Interval.of(startIndex, stopIndex)); recognizer.notifyErrorListeners(`reportContextSensitivity d=${decision} (${rule}), input='${input}', viable={${prediction}}`); } } @@ -1717,13 +1732,13 @@ namespace FilenameFilters { export function extension(extension: string): FilenameFilter; export function extension(extension: string, caseSensitive: boolean): FilenameFilter; - export function extension(extension: string, caseSensitive: boolean = true): FilenameFilter { + export function extension(extension: string, caseSensitive = true): FilenameFilter { return new FileExtensionFilenameFilter(extension, caseSensitive); } export function name(filename: string): FilenameFilter; export function name(filename: string, caseSensitive: boolean): FilenameFilter; - export function name(filename: string, caseSensitive: boolean = true): FilenameFilter { + export function name(filename: string, caseSensitive = true): FilenameFilter { return new FileNameFilenameFilter(filename, caseSensitive); } @@ -1757,7 +1772,7 @@ class FileExtensionFilenameFilter implements FilenameFilter { this.caseSensitive = caseSensitive; } - @Override + // @Override public accept(dir: string, name: string): boolean { if (this.caseSensitive) { return name.endsWith(this.extension); @@ -1776,7 +1791,7 @@ class FileNameFilenameFilter implements FilenameFilter { this.caseSensitive = caseSensitive; } - @Override + // @Override public accept(dir: string, name: string): boolean { if (this.caseSensitive) { return name === this.filename; @@ -1794,9 +1809,9 @@ class AllFilenameFilter implements FilenameFilter { this.filters = filters.slice(0); } - @Override + // @Override public accept(dir: string, name: string): boolean { - for (let filter of this.filters) { + for (const filter of this.filters) { if (!filter.accept(dir, name)) { return false; } @@ -1813,9 +1828,9 @@ class AnyFilenameFilter implements FilenameFilter { this.filters = filters.slice(0); } - @Override + // @Override public accept(dir: string, name: string): boolean { - for (let filter of this.filters) { + for (const filter of this.filters) { if (filter.accept(dir, name)) { return true; } @@ -1832,7 +1847,7 @@ class NotFilenameFilter implements FilenameFilter { this.filter = filter; } - @Override + // @Override public accept(dir: string, name: string): boolean { return !this.filter.accept(dir, name); } @@ -1859,17 +1874,17 @@ class NonCachingParserATNSimulator extends StatisticsParserATNSimulator { super(atn, parser); } - @Override + // @Override protected setDFAEdge(p: DFAState, t: number, q: DFAState): void { // Do not set the edge } } class ChecksumParseTreeListener implements ParseTreeListener { - private static VISIT_TERMINAL: number = 1; - private static VISIT_ERROR_NODE: number = 2; - private static ENTER_RULE: number = 3; - private static EXIT_RULE: number = 4; + private static VISIT_TERMINAL = 1; + private static VISIT_ERROR_NODE = 2; + private static ENTER_RULE = 3; + private static EXIT_RULE = 4; private checksum: MurmurHashChecksum; @@ -1877,26 +1892,26 @@ class ChecksumParseTreeListener implements ParseTreeListener { this.checksum = checksum; } - @Override + // @Override public visitTerminal(node: TerminalNode): void { this.checksum.update(ChecksumParseTreeListener.VISIT_TERMINAL); TestPerformance.updateChecksum(this.checksum, node.symbol); } - @Override + // @Override public visitErrorNode(node: ErrorNode): void { this.checksum.update(ChecksumParseTreeListener.VISIT_ERROR_NODE); TestPerformance.updateChecksum(this.checksum, node.symbol); } - @Override + // @Override public enterEveryRule(ctx: ParserRuleContext): void { this.checksum.update(ChecksumParseTreeListener.ENTER_RULE); TestPerformance.updateChecksum(this.checksum, ctx.ruleIndex); TestPerformance.updateChecksum(this.checksum, ctx.start); } - @Override + // @Override public exitEveryRule(ctx: ParserRuleContext): void { this.checksum.update(ChecksumParseTreeListener.EXIT_RULE); TestPerformance.updateChecksum(this.checksum, ctx.ruleIndex); @@ -1909,14 +1924,14 @@ export class InputDescriptor { private source: string; private inputStream?: CodePointBuffer; - constructor(@NotNull source: string) { + constructor(source: string) { this.source = source; if (TestPerformance.PRELOAD_SOURCES) { this.getInputStream(); } } - @NotNull + public getInputStream(): CharStream { if (this.inputStream === undefined) { this.inputStream = this.bufferFromFileName(this.source, TestPerformance.ENCODING); @@ -1926,18 +1941,18 @@ export class InputDescriptor { } private bufferFromFileName(source: string, encoding: string): CodePointBuffer { - let input = fs.readFileSync(this.source, encoding); - let array = new Uint16Array(input.length); + const input = fs.readFileSync(this.source, encoding); + const array = new Uint16Array(input.length); for (let i = 0; i < input.length; i++) { array[i] = input.charCodeAt(i); } - let builder = CodePointBuffer.builder(input.length); + const builder = CodePointBuffer.builder(input.length); builder.append(array); return builder.build(); } } // Create an instance of the benchmark class and run it -let benchmark = new TestPerformance(); +const benchmark = new TestPerformance(); benchmark.compileJdk(); diff --git a/benchmark/TimeLexerSpeed.ts b/benchmark/TimeLexerSpeed.ts index 08b561b8..adb6820a 100644 --- a/benchmark/TimeLexerSpeed.ts +++ b/benchmark/TimeLexerSpeed.ts @@ -7,13 +7,13 @@ import * as fs from "fs"; import * as path from "path"; import * as util from "util"; -import { ANTLRInputStream } from "../src/ANTLRInputStream"; -import { CharStream } from "../src/CharStream"; -import { CharStreams } from "../src/CharStreams"; -import { CommonTokenStream } from "../src/CommonTokenStream"; +import { ANTLRInputStream } from "antlr4ts"; +import { CharStream } from "antlr4ts"; +import { CharStreams } from "antlr4ts"; +import { CommonTokenStream } from "antlr4ts"; import { GraphemesLexer } from "./gen/GraphemesLexer"; import { JavaLexer } from "./gen/std/JavaLexer"; -import { Lexer } from "../src/Lexer"; +import { Lexer } from "antlr4ts"; import { Stopwatch } from "./Stopwatch"; import { TimeSpan } from "./TimeSpan"; @@ -172,7 +172,7 @@ export class TimeLexerSpeed { public static readonly RuleContext_java_file: string = path.resolve(__dirname, "../../reference/antlr4/runtime/Java/src/org/antlr/v4/runtime/RuleContext.java"); public static readonly PerfDir: string = path.resolve(__dirname, "../../benchmark"); - public output: boolean = true; + public output = true; public streamFootprints: string[] = []; @@ -192,11 +192,11 @@ export class TimeLexerSpeed { console.log(); // console.log(VM.current().details()); - let tests: TimeLexerSpeed = new TimeLexerSpeed(); + const tests: TimeLexerSpeed = new TimeLexerSpeed(); await tests.compilerWarmUp(100); - let n: number = 3500; + let n = 3500; // await tests.load_legacy_java_ascii_file(TimeLexerSpeed.Parser_java_file, n); // await tests.load_legacy_java_ascii_file(TimeLexerSpeed.RuleContext_java_file, n); // await tests.load_legacy_java_ascii(TimeLexerSpeed.Parser_java_file, n); @@ -229,7 +229,7 @@ export class TimeLexerSpeed { await tests.lex_new_grapheme_utf8("emoji.txt", n, false); await tests.lex_new_grapheme_utf8("emoji.txt", n, true); - for (let streamFootprint of tests.streamFootprints) { + for (const streamFootprint of tests.streamFootprints) { console.log(streamFootprint); } } @@ -403,49 +403,49 @@ export class TimeLexerSpeed { // } public lex_legacy_java_utf8(n: number, clearLexerDFACache: boolean): void { - let content = fs.readFileSync(TimeLexerSpeed.Parser_java_file, { encoding: "utf-8" }); + const content = fs.readFileSync(TimeLexerSpeed.Parser_java_file, { encoding: "utf-8" }); // tslint:disable-next-line:deprecation - let input: CharStream = new ANTLRInputStream(content); - let lexer: JavaLexer = new JavaLexer(input); - let avg: TimeSpan = this.tokenize(lexer, n, clearLexerDFACache); - let currentMethodName: string = "lex_legacy_java_utf8"; + const input: CharStream = new ANTLRInputStream(content); + const lexer: JavaLexer = new JavaLexer(input); + const avg: TimeSpan = this.tokenize(lexer, n, clearLexerDFACache); + const currentMethodName = "lex_legacy_java_utf8"; if (this.output) { console.log(`${padStart(currentMethodName, 27)} average time ${Math.round(avg.totalMicroseconds)}us over ${n} runs of ${input.size} symbols${clearLexerDFACache ? " DFA cleared" : ""}`); } } public async lex_new_java_utf8(n: number, clearLexerDFACache: boolean): Promise { - let content = fs.readFileSync(TimeLexerSpeed.Parser_java_file, { encoding: "utf-8" }); - let size: number = await TimeLexerSpeed.getResourceSize(TimeLexerSpeed.Parser_java_file); - let input: CharStream = CharStreams.fromString(content); - let lexer: JavaLexer = new JavaLexer(input); - let avg: TimeSpan = this.tokenize(lexer, n, clearLexerDFACache); - let currentMethodName: string = "lex_new_java_utf8"; + const content = fs.readFileSync(TimeLexerSpeed.Parser_java_file, { encoding: "utf-8" }); + const size: number = await TimeLexerSpeed.getResourceSize(TimeLexerSpeed.Parser_java_file); + const input: CharStream = CharStreams.fromString(content); + const lexer: JavaLexer = new JavaLexer(input); + const avg: TimeSpan = this.tokenize(lexer, n, clearLexerDFACache); + const currentMethodName = "lex_new_java_utf8"; if (this.output) { console.log(`${padStart(currentMethodName, 27)} average time ${Math.round(avg.totalMicroseconds)}us over ${n} runs of ${input.size} symbols${clearLexerDFACache ? " DFA cleared" : ""}`); } } public lex_legacy_grapheme_utf8(fileName: string, n: number, clearLexerDFACache: boolean): void { - let content = fs.readFileSync(path.join(TimeLexerSpeed.PerfDir, fileName), { encoding: "utf-8" }); + const content = fs.readFileSync(path.join(TimeLexerSpeed.PerfDir, fileName), { encoding: "utf-8" }); // tslint:disable-next-line:deprecation - let input: CharStream = new ANTLRInputStream(content); - let lexer: GraphemesLexer = new GraphemesLexer(input); - let avg: TimeSpan = this.tokenize(lexer, n, clearLexerDFACache); - let currentMethodName: string = "lex_legacy_grapheme_utf8"; + const input: CharStream = new ANTLRInputStream(content); + const lexer: GraphemesLexer = new GraphemesLexer(input); + const avg: TimeSpan = this.tokenize(lexer, n, clearLexerDFACache); + const currentMethodName = "lex_legacy_grapheme_utf8"; if (this.output) { console.log(`${padStart(currentMethodName, 27)} average time ${Math.round(avg.totalMicroseconds)}us over ${n} runs of ${input.size} symbols from ${fileName}${clearLexerDFACache ? " DFA cleared" : ""}`); } } public async lex_new_grapheme_utf8(fileName: string, n: number, clearLexerDFACache: boolean): Promise { - let resourceName: string = path.join(TimeLexerSpeed.PerfDir, fileName); - let content = fs.readFileSync(resourceName, { encoding: "utf-8" }); - let size: number = await TimeLexerSpeed.getResourceSize(resourceName); - let input: CharStream = CharStreams.fromString(content); - let lexer: GraphemesLexer = new GraphemesLexer(input); - let avg: TimeSpan = this.tokenize(lexer, n, clearLexerDFACache); - let currentMethodName: string = "lex_new_grapheme_utf8"; + const resourceName: string = path.join(TimeLexerSpeed.PerfDir, fileName); + const content = fs.readFileSync(resourceName, { encoding: "utf-8" }); + const size: number = await TimeLexerSpeed.getResourceSize(resourceName); + const input: CharStream = CharStreams.fromString(content); + const lexer: GraphemesLexer = new GraphemesLexer(input); + const avg: TimeSpan = this.tokenize(lexer, n, clearLexerDFACache); + const currentMethodName = "lex_new_grapheme_utf8"; if (this.output) { console.log(`${padStart(currentMethodName, 27)} average time ${Math.round(avg.totalMicroseconds)}us over ${n} runs of ${input.size} symbols from ${fileName}${clearLexerDFACache ? " DFA cleared" : ""}`); } @@ -455,17 +455,17 @@ export class TimeLexerSpeed { // always wipe the DFA before we begin tests so previous tests don't affect this run! lexer.interpreter.clearDFA(); let times: TimeSpan[] = []; - for (let i: number = 0; i < n; i++) { + for (let i = 0; i < n; i++) { lexer.reset(); if (clearLexerDFACache) { lexer.interpreter.clearDFA(); } - let start: Stopwatch = Stopwatch.startNew(); - let tokens: CommonTokenStream = new CommonTokenStream(lexer); + const start: Stopwatch = Stopwatch.startNew(); + const tokens: CommonTokenStream = new CommonTokenStream(lexer); tokens.fill(); // lex whole file. // let size: number = lexer.inputStream.size; - let stop: TimeSpan = start.elapsed(); + const stop: TimeSpan = start.elapsed(); times.push(stop); // if (this.output) { // console.log(`Tokenized ${size} char in ${times[i].totalMilliseconds}ms`); @@ -478,8 +478,8 @@ export class TimeLexerSpeed { } public avg(values: TimeSpan[]): TimeSpan { - let sum: number = 0.0; - for (let v of values) { + let sum = 0.0; + for (const v of values) { sum += v.totalMilliseconds; } @@ -487,8 +487,8 @@ export class TimeLexerSpeed { } public std(mean: number, values: number[]): number { // unbiased std dev - let sum: number = 0.0; - for (let v of values) { + let sum = 0.0; + for (const v of values) { sum += (v - mean) * (v - mean); } @@ -500,9 +500,9 @@ export class TimeLexerSpeed { } public static async getResourceSize(resourceName: string): Promise { - let stats = await util.promisify(fs.stat)(resourceName); + const stats = await util.promisify(fs.stat)(resourceName); return stats.size; } } -let _ = TimeLexerSpeed.main(); +const _ = TimeLexerSpeed.main(); diff --git a/benchmark/TimeSpan.ts b/benchmark/TimeSpan.ts index 32a3c4f5..bb27ebc0 100644 --- a/benchmark/TimeSpan.ts +++ b/benchmark/TimeSpan.ts @@ -13,8 +13,8 @@ export class TimeSpan { } public static fromMilliseconds(millis: number): TimeSpan { - let seconds = Math.trunc(millis / TimeSpan.MILLIS_PER_SECOND); - let nanos = (millis - (seconds * TimeSpan.MILLIS_PER_SECOND)) * TimeSpan.NANOS_PER_MILLISECOND; + const seconds = Math.trunc(millis / TimeSpan.MILLIS_PER_SECOND); + const nanos = (millis - (seconds * TimeSpan.MILLIS_PER_SECOND)) * TimeSpan.NANOS_PER_MILLISECOND; return new TimeSpan(seconds, nanos); } @@ -27,10 +27,11 @@ export class TimeSpan { } } +// eslint-disable-next-line @typescript-eslint/no-namespace export namespace TimeSpan { - export const MILLIS_PER_SECOND: number = 1000; - export const MICROS_PER_SECOND: number = 1000000; - export const NANOS_PER_SECOND: number = 1000000000; - export const NANOS_PER_MICROSECOND: number = 1000; - export const NANOS_PER_MILLISECOND: number = 1000000; + export const MILLIS_PER_SECOND = 1000; + export const MICROS_PER_SECOND = 1000000; + export const NANOS_PER_SECOND = 1000000000; + export const NANOS_PER_MICROSECOND = 1000; + export const NANOS_PER_MILLISECOND = 1000000; } diff --git a/benchmark/package-lock.json b/benchmark/package-lock.json new file mode 100644 index 00000000..9fb35476 --- /dev/null +++ b/benchmark/package-lock.json @@ -0,0 +1,1648 @@ +{ + "name": "antlr4ts-benchmark", + "version": "0.5.0-dev", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.8.3" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", + "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==", + "dev": true + }, + "@babel/highlight": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", + "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.0", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true + }, + "@types/eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", + "dev": true + }, + "@types/json-schema": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz", + "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==", + "dev": true + }, + "@types/node": { + "version": "13.11.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.11.1.tgz", + "integrity": "sha512-eWQGP3qtxwL8FGneRrC5DwrJLGN4/dH1clNTuLfN81HCrxVtxRjygDTUoZJ5ASlDEeo0ppYFQjQIlXhtXpOn6g==", + "dev": true + }, + "@types/source-map-support": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@types/source-map-support/-/source-map-support-0.5.1.tgz", + "integrity": "sha512-VDqnZe9D2zR19qbeRvwYyHSp7AtUtCkTaRVFQ8wzwH9TXw9kKKq/vBhfEnFEXVupO2M0lBMA9mr/XyQ6gEkUOA==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@typescript-eslint/eslint-plugin": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.28.0.tgz", + "integrity": "sha512-w0Ugcq2iatloEabQP56BRWJowliXUP5Wv6f9fKzjJmDW81hOTBxRoJ4LoEOxRpz9gcY51Libytd2ba3yLmSOfg==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "2.28.0", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^3.0.0", + "tsutils": "^3.17.1" + }, + "dependencies": { + "tsutils": { + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", + "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/eslint-plugin-tslint": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin-tslint/-/eslint-plugin-tslint-2.28.0.tgz", + "integrity": "sha512-a6cU6aJZa10sK6DybAtOdCV/tU1rWTTurBgYtyJb2DsG3BJwF6vYob9qOKw9n3MjV/F757LGqXz3RNmrvrimww==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "2.28.0", + "lodash": "^4.17.15" + } + }, + "@typescript-eslint/experimental-utils": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.28.0.tgz", + "integrity": "sha512-4SL9OWjvFbHumM/Zh/ZeEjUFxrYKtdCi7At4GyKTbQlrj1HcphIDXlje4Uu4cY+qzszR5NdVin4CCm6AXCjd6w==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/typescript-estree": "2.28.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + } + }, + "@typescript-eslint/parser": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.28.0.tgz", + "integrity": "sha512-RqPybRDquui9d+K86lL7iPqH6Dfp9461oyqvlXMNtap+PyqYbkY5dB7LawQjDzot99fqzvS0ZLZdfe+1Bt3Jgw==", + "dev": true, + "requires": { + "@types/eslint-visitor-keys": "^1.0.0", + "@typescript-eslint/experimental-utils": "2.28.0", + "@typescript-eslint/typescript-estree": "2.28.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.28.0.tgz", + "integrity": "sha512-HDr8MP9wfwkiuqzRVkuM3BeDrOC4cKbO5a6BymZBHUt5y/2pL0BXD6I/C/ceq2IZoHWhcASk+5/zo+dwgu9V8Q==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "eslint-visitor-keys": "^1.1.0", + "glob": "^7.1.6", + "is-glob": "^4.0.1", + "lodash": "^4.17.15", + "semver": "^6.3.0", + "tsutils": "^3.17.1" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "tsutils": { + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", + "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "acorn": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "dev": true + }, + "acorn-jsx": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", + "dev": true + }, + "ajv": { + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.1.tgz", + "integrity": "sha512-AUh2mDlJDAnzSRaKkMHopTD1GKwC1ApUq8oCzdjAOM5tavncgqWU+JoRu5Y3iYY0Q/euiU+1LWp0/O/QY8CcHw==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "opencollective-postinstall": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ansi-escapes": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "dev": true, + "requires": { + "type-fest": "^0.11.0" + }, + "dependencies": { + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + } + } + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", + "dev": true + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "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" + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.17.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", + "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.3", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.2", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^7.0.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.3", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "eslint-plugin-prettier": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.3.tgz", + "integrity": "sha512-+HG5jmu/dN3ZV3T6eCD7a4BlAySdN7mLIbJYo0z1cFQuI+r2DiTJEFeF68ots93PsnrMxbzIZ2S/ieX+mkrBeQ==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-scope": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", + "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", + "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "dev": true + }, + "espree": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", + "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "fast-deep-equal": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "dev": true + }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "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" + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "dev": true + }, + "has": { + "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.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "hosted-git-info": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "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 + }, + "inquirer": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz", + "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^3.0.0", + "cli-cursor": "^3.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.15", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.5.3", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "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": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "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-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", + "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==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "mkdirp": { + "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": "^1.2.5" + } + }, + "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 + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + } + }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "opencollective-postinstall": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz", + "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==", + "dev": true + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + }, + "resolve": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.16.0.tgz", + "integrity": "sha512-LarL/PIKJvc09k1jaeT4kQb/8/7P+qV4qSnN2K80AES+OHdfZELAKVOBjxsvtToT/uLOfFbvYvKfZmV8cee7nA==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", + "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "rxjs": { + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz", + "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shell-quote": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", + "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", + "dev": true + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + }, + "dependencies": { + "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 + } + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "source-map-support": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", + "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "string.prototype.padend": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.0.tgz", + "integrity": "sha512-3aIv8Ffdp8EZj8iLwREGpQaUZiPyrWrpzMBHvkiSW/bK/EGve9np07Vwy7IJ5waydpGXzQZu/F8Oze2/IWkBaA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string.prototype.trimleft": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", + "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimstart": "^1.0.0" + } + }, + "string.prototype.trimright": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", + "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimend": "^1.0.0" + } + }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + } + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", + "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==", + "dev": true + }, + "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" + } + }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "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 + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "tslib": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", + "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + }, + "typescript": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz", + "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "v8-compile-cache": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", + "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + } + } +} diff --git a/benchmark/package.json b/benchmark/package.json new file mode 100644 index 00000000..1b3927d7 --- /dev/null +++ b/benchmark/package.json @@ -0,0 +1,51 @@ +{ + "name": "antlr4ts-benchmark", + "private": true, + "version": "0.5.0-dev", + "description": "ANTLR 4 performance benchmark for JavaScript written in Typescript", + "scripts": { + "build": "run-s antlr tsc", + "antlr": "npm-run-all --parallel --aggregate-output antlr-benchmark-*", + "antlr-benchmark-graphemes": "antlr4ts -visitor Graphemes.g4 -o gen", + "antlr-benchmark-std": "antlr4ts -visitor Java.g4 -o gen/std", + "antlr-benchmark-std-atn": "antlr4ts -visitor -Xforce-atn Java.g4 -o gen/std-atn", + "antlr-benchmark-lr": "antlr4ts -visitor JavaLR.g4 -o gen/lr", + "antlr-benchmark-lr-atn": "antlr4ts -visitor -Xforce-atn JavaLR.g4 -o gen/lr-atn", + "tsc": "tsc --build --verbose .", + "benchmark": "node dist/TestPerformance.js", + "benchmark-lexer": "node dist/TimeLexerSpeed.js", + "profile": "node --cpu-prof dist/TestPerformance.js", + "profile-lexer": "node --cpu-prof dist/TimeLexerSpeed.js", + "tslint": "tslint -p .", + "tslint-fix": "tslint -p . --fix" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/tunnelvisionlabs/antlr4ts.git" + }, + "keywords": [ + "ANTLR4", + "typescript" + ], + "author": "Terence Parr, Sam Harwell, and Burt Harris", + "license": "BSD-3-Clause", + "bugs": { + "url": "https://github.com/tunnelvisionlabs/antlr4ts/issues" + }, + "homepage": "https://github.com/tunnelvisionlabs/antlr4ts#readme", + "devDependencies": { + "@types/source-map-support": "^0.5.1", + "@typescript-eslint/eslint-plugin": "^2.28.0", + "@typescript-eslint/eslint-plugin-tslint": "^2.28.0", + "@typescript-eslint/parser": "^2.28.0", + "antlr4ts-cli": "0.5.0-dev", + "eslint": "^6.8.0", + "eslint-plugin-prettier": "^3.1.3", + "npm-run-all": "^4.1.5", + "typescript": "^3.8.3" + }, + "dependencies": { + "antlr4ts": "0.5.0-dev", + "source-map-support": "^0.5.16" + } +} diff --git a/benchmark/tsconfig.json b/benchmark/tsconfig.json new file mode 100644 index 00000000..a42a6877 --- /dev/null +++ b/benchmark/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "../tsconfig.base.json", + "references": [ + { + "path": "../runtime/typescript" + } + ], + "exclude": ["node_modules", "dist"], + "compilerOptions": { + "outDir": "dist" + } +} diff --git a/lerna.json b/lerna.json new file mode 100644 index 00000000..5f134ea2 --- /dev/null +++ b/lerna.json @@ -0,0 +1,9 @@ +{ + "packages": [ + "tool/typescript", + "runtime/typescript", + "benchmark", + "test" + ], + "version": "0.5.0-dev" +} diff --git a/package-lock.json b/package-lock.json index 52a8a97c..76249a01 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,6 @@ "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", - "dev": true, "requires": { "@babel/highlight": "^7.8.3" } @@ -46,44 +45,35 @@ "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==", + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true - }, - "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } } } }, "@babel/generator": { - "version": "7.9.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.3.tgz", - "integrity": "sha512-RpxM252EYsz9qLUIq6F7YJyK1sv0wWDBFuztfDGWaQKzHjqDHysxSiRUpA/X9jmfqo+WzkAVKFaUily5h+gDCQ==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.5.tgz", + "integrity": "sha512-GbNIxVB3ZJe3tLeDm1HSn2AhuD/mVcyLDpgtLXa5tplmWrJdF/elxB56XNqCuD6szyNkDi6wuoKXln3QeBmCHQ==", "dev": true, "requires": { - "@babel/types": "^7.9.0", + "@babel/types": "^7.9.5", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" } }, "@babel/helper-function-name": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", - "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz", + "integrity": "sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw==", "dev": true, "requires": { "@babel/helper-get-function-arity": "^7.8.3", "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/types": "^7.9.5" } }, "@babel/helper-get-function-arity": { @@ -169,10 +159,9 @@ } }, "@babel/helper-validator-identifier": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz", - "integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==", - "dev": true + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", + "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==" }, "@babel/helpers": { "version": "7.9.2", @@ -189,47 +178,27 @@ "version": "7.9.0", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", - "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.9.0", "chalk": "^2.0.0", "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - } } }, "@babel/parser": { - "version": "7.9.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.3.tgz", - "integrity": "sha512-E6SpIDJZ0cZAKoCNk+qSDd0ChfTnpiJN9FfNf3RZ20dzwA2vL2oq5IX1XTVT+4vDmRlta2nGk5HGMMskJAR+4A==", + "version": "7.9.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", + "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==", "dev": true }, + "@babel/runtime": { + "version": "7.9.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.2.tgz", + "integrity": "sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, "@babel/template": { "version": "7.8.6", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", @@ -242,17 +211,17 @@ } }, "@babel/traverse": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.0.tgz", - "integrity": "sha512-jAZQj0+kn4WTHO5dUZkZKhbFrqZE7K5LAQ5JysMnmvGij+wOdr+8lWqPeW0BcF4wFwrEXXtdGO7wcV6YPJcf3w==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.5.tgz", + "integrity": "sha512-c4gH3jsvSuGUezlP6rzSJ6jf8fYjLj3hsMZRx/nX0h+fmHN0w+ekubRrHPqnMec0meycA2nwCsJ7dC8IPem2FQ==", "dev": true, "requires": { "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.9.0", - "@babel/helper-function-name": "^7.8.3", + "@babel/generator": "^7.9.5", + "@babel/helper-function-name": "^7.9.5", "@babel/helper-split-export-declaration": "^7.8.3", "@babel/parser": "^7.9.0", - "@babel/types": "^7.9.0", + "@babel/types": "^7.9.5", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" @@ -266,65 +235,129 @@ "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 } } }, "@babel/types": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.0.tgz", - "integrity": "sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng==", + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.5.tgz", + "integrity": "sha512-XjnvNqenk818r5zMaba+sLQjnbda31UfUURv3ei0qPQw4u+j2jMyJ5b11y8ZHYTRSI3NnInQkkkRT4fLqqPdHg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.9.0", + "@babel/helper-validator-identifier": "^7.9.5", "lodash": "^4.17.13", "to-fast-properties": "^2.0.0" } }, - "@deboxsoft/cpx": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@deboxsoft/cpx/-/cpx-1.5.0.tgz", - "integrity": "sha512-4hkpKja/1jn+mxpGM3oczee2qXGGChunQYYnORIc7U+91XZPzSdXtvVr/yeH//rnM3Sl9QWzUjMKN9I+IqKu9g==", + "@evocateur/libnpmaccess": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@evocateur/libnpmaccess/-/libnpmaccess-3.1.2.tgz", + "integrity": "sha512-KSCAHwNWro0CF2ukxufCitT9K5LjL/KuMmNzSu8wuwN2rjyKHD8+cmOsiybK+W5hdnwc5M1SmRlVCaMHQo+3rg==", "dev": true, "requires": { - "co": "^4.6.0", - "debounce": "^1.1.0", - "debug": "^3.1.0", - "duplexer": "^0.1.1", - "fs-extra": "^6.0.1", - "glob": "^7.1.2", - "glob2base": "0.0.12", - "minimatch": "^3.0.4", - "resolve": "^1.8.1", - "safe-buffer": "^5.1.2", - "shell-quote": "^1.6.1", - "subarg": "^1.0.0" + "@evocateur/npm-registry-fetch": "^4.0.0", + "aproba": "^2.0.0", + "figgy-pudding": "^3.5.1", + "get-stream": "^4.0.0", + "npm-package-arg": "^6.1.0" }, "dependencies": { - "fs-extra": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", - "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } + "aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "dev": true + } + } + }, + "@evocateur/libnpmpublish": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@evocateur/libnpmpublish/-/libnpmpublish-1.2.2.tgz", + "integrity": "sha512-MJrrk9ct1FeY9zRlyeoyMieBjGDG9ihyyD9/Ft6MMrTxql9NyoEx2hw9casTIP4CdqEVu+3nQ2nXxoJ8RCXyFg==", + "dev": true, + "requires": { + "@evocateur/npm-registry-fetch": "^4.0.0", + "aproba": "^2.0.0", + "figgy-pudding": "^3.5.1", + "get-stream": "^4.0.0", + "lodash.clonedeep": "^4.5.0", + "normalize-package-data": "^2.4.0", + "npm-package-arg": "^6.1.0", + "semver": "^5.5.1", + "ssri": "^6.0.1" + }, + "dependencies": { + "aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "dev": true }, - "resolve": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", - "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "@evocateur/npm-registry-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@evocateur/npm-registry-fetch/-/npm-registry-fetch-4.0.0.tgz", + "integrity": "sha512-k1WGfKRQyhJpIr+P17O5vLIo2ko1PFLKwoetatdduUSt/aQ4J2sJrJwwatdI5Z3SiYk/mRH9S3JpdmMFd/IK4g==", + "dev": true, + "requires": { + "JSONStream": "^1.3.4", + "bluebird": "^3.5.1", + "figgy-pudding": "^3.4.1", + "lru-cache": "^5.1.1", + "make-fetch-happen": "^5.0.0", + "npm-package-arg": "^6.1.0", + "safe-buffer": "^5.1.2" + } + }, + "@evocateur/pacote": { + "version": "9.6.5", + "resolved": "https://registry.npmjs.org/@evocateur/pacote/-/pacote-9.6.5.tgz", + "integrity": "sha512-EI552lf0aG2nOV8NnZpTxNo2PcXKPmDbF9K8eCBFQdIZwHNGN/mi815fxtmUMa2wTa1yndotICIDt/V0vpEx2w==", + "dev": true, + "requires": { + "@evocateur/npm-registry-fetch": "^4.0.0", + "bluebird": "^3.5.3", + "cacache": "^12.0.3", + "chownr": "^1.1.2", + "figgy-pudding": "^3.5.1", + "get-stream": "^4.1.0", + "glob": "^7.1.4", + "infer-owner": "^1.0.4", + "lru-cache": "^5.1.1", + "make-fetch-happen": "^5.0.0", + "minimatch": "^3.0.4", + "minipass": "^2.3.5", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "normalize-package-data": "^2.5.0", + "npm-package-arg": "^6.1.0", + "npm-packlist": "^1.4.4", + "npm-pick-manifest": "^3.0.0", + "osenv": "^0.1.5", + "promise-inflight": "^1.0.1", + "promise-retry": "^1.1.1", + "protoduck": "^5.0.1", + "rimraf": "^2.6.3", + "safe-buffer": "^5.2.0", + "semver": "^5.7.0", + "ssri": "^6.0.1", + "tar": "^4.4.10", + "unique-filename": "^1.1.1", + "which": "^1.3.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true } } }, @@ -350,11 +383,35 @@ "path-exists": "^4.0.0" } }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true } } }, @@ -364,237 +421,6120 @@ "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", "dev": true }, - "@tootallnate/once": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.0.0.tgz", - "integrity": "sha512-KYyTT/T6ALPkIRd2Ge080X/BsXvy9O0hcWTtMWkPvwAwF99+vn6Dv4GzrFT/Nn1LePr+FFDbRXXlqmsy9lw2zA==", - "dev": true - }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", - "dev": true + "@lerna/add": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@lerna/add/-/add-3.20.0.tgz", + "integrity": "sha512-AnH1oRIEEg/VDa3SjYq4x1/UglEAvrZuV0WssHUMN81RTZgQk3we+Mv3qZNddrZ/fBcZu2IAdN/EQ3+ie2JxKQ==", + "dev": true, + "requires": { + "@evocateur/pacote": "^9.6.3", + "@lerna/bootstrap": "3.20.0", + "@lerna/command": "3.18.5", + "@lerna/filter-options": "3.20.0", + "@lerna/npm-conf": "3.16.0", + "@lerna/validation-error": "3.13.0", + "dedent": "^0.7.0", + "npm-package-arg": "^6.1.0", + "p-map": "^2.1.0", + "semver": "^6.2.0" + } }, - "@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 + "@lerna/bootstrap": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@lerna/bootstrap/-/bootstrap-3.20.0.tgz", + "integrity": "sha512-Wylullx3uthKE7r4izo09qeRGL20Y5yONlQEjPCfnbxCC2Elu+QcPu4RC6kqKQ7b+g7pdC3OOgcHZjngrwr5XQ==", + "dev": true, + "requires": { + "@lerna/command": "3.18.5", + "@lerna/filter-options": "3.20.0", + "@lerna/has-npm-version": "3.16.5", + "@lerna/npm-install": "3.16.5", + "@lerna/package-graph": "3.18.5", + "@lerna/pulse-till-done": "3.13.0", + "@lerna/rimraf-dir": "3.16.5", + "@lerna/run-lifecycle": "3.16.2", + "@lerna/run-topologically": "3.18.5", + "@lerna/symlink-binary": "3.17.0", + "@lerna/symlink-dependencies": "3.17.0", + "@lerna/validation-error": "3.13.0", + "dedent": "^0.7.0", + "get-port": "^4.2.0", + "multimatch": "^3.0.0", + "npm-package-arg": "^6.1.0", + "npmlog": "^4.1.2", + "p-finally": "^1.0.0", + "p-map": "^2.1.0", + "p-map-series": "^1.0.0", + "p-waterfall": "^1.0.0", + "read-package-tree": "^5.1.6", + "semver": "^6.2.0" + } }, - "@types/mocha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.0.tgz", - "integrity": "sha512-YeDiSEzznwZwwp766SJ6QlrTyBYUGPSIwmREHVTmktUYiT/WADdWtpt9iH0KuUSf8lZLdI4lP0X6PBzPo5//JQ==", - "dev": true + "@lerna/changed": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@lerna/changed/-/changed-3.20.0.tgz", + "integrity": "sha512-+hzMFSldbRPulZ0vbKk6RD9f36gaH3Osjx34wrrZ62VB4pKmjyuS/rxVYkCA3viPLHoiIw2F8zHM5BdYoDSbjw==", + "dev": true, + "requires": { + "@lerna/collect-updates": "3.20.0", + "@lerna/command": "3.18.5", + "@lerna/listable": "3.18.5", + "@lerna/output": "3.13.0" + } }, - "@types/node": { - "version": "10.12.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.10.tgz", - "integrity": "sha512-8xZEYckCbUVgK8Eg7lf5Iy4COKJ5uXlnIOnePN0WUwSQggy9tolM+tDJf7wMOnT/JT/W9xDYIaYggt3mRV2O5w==", - "dev": true + "@lerna/check-working-tree": { + "version": "3.16.5", + "resolved": "https://registry.npmjs.org/@lerna/check-working-tree/-/check-working-tree-3.16.5.tgz", + "integrity": "sha512-xWjVBcuhvB8+UmCSb5tKVLB5OuzSpw96WEhS2uz6hkWVa/Euh1A0/HJwn2cemyK47wUrCQXtczBUiqnq9yX5VQ==", + "dev": true, + "requires": { + "@lerna/collect-uncommitted": "3.16.5", + "@lerna/describe-ref": "3.16.5", + "@lerna/validation-error": "3.13.0" + } }, - "@types/source-map-support": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@types/source-map-support/-/source-map-support-0.4.0.tgz", - "integrity": "sha512-9oVAi1Jlr274pbMGPEe0S3IPImV9knVNafa6E4MookD/fjOZAE6EmLkFX5ZjtZ9OXNPi2FCIZzUSMvwAUUKeSg==", + "@lerna/child-process": { + "version": "3.16.5", + "resolved": "https://registry.npmjs.org/@lerna/child-process/-/child-process-3.16.5.tgz", + "integrity": "sha512-vdcI7mzei9ERRV4oO8Y1LHBZ3A5+ampRKg1wq5nutLsUA4mEBN6H7JqjWOMY9xZemv6+kATm2ofjJ3lW5TszQg==", "dev": true, "requires": { - "@types/node": "*" + "chalk": "^2.3.1", + "execa": "^1.0.0", + "strong-log-transformer": "^2.0.0" } }, - "@types/std-mocks": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/std-mocks/-/std-mocks-1.0.0.tgz", - "integrity": "sha512-0PDd05AK/u41wFxr0ytOYhQz15uAhkmwe8fOp33UN506zGARdLVx/Yc/WSeGs+8zKjMMTp1vlB+OXGwD7HmImg==", - "dev": true + "@lerna/clean": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@lerna/clean/-/clean-3.20.0.tgz", + "integrity": "sha512-9ZdYrrjQvR5wNXmHfDsfjWjp0foOkCwKe3hrckTzkAeQA1ibyz5llGwz5e1AeFrV12e2/OLajVqYfe+qdkZUgg==", + "dev": true, + "requires": { + "@lerna/command": "3.18.5", + "@lerna/filter-options": "3.20.0", + "@lerna/prompt": "3.18.5", + "@lerna/pulse-till-done": "3.13.0", + "@lerna/rimraf-dir": "3.16.5", + "p-map": "^2.1.0", + "p-map-series": "^1.0.0", + "p-waterfall": "^1.0.0" + } }, - "agent-base": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.0.tgz", - "integrity": "sha512-j1Q7cSCqN+AwrmDd+pzgqc0/NpC655x2bUf5ZjRIO77DcNBFmh+OgRNzF6OKdCC9RSCb19fGd99+bhXFdkRNqw==", + "@lerna/cli": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/cli/-/cli-3.18.5.tgz", + "integrity": "sha512-erkbxkj9jfc89vVs/jBLY/fM0I80oLmJkFUV3Q3wk9J3miYhP14zgVEBsPZY68IZlEjT6T3Xlq2xO1AVaatHsA==", "dev": true, "requires": { - "debug": "4" - }, - "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 - } + "@lerna/global-options": "3.13.0", + "dedent": "^0.7.0", + "npmlog": "^4.1.2", + "yargs": "^14.2.2" } }, - "aggregate-error": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", - "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", + "@lerna/collect-uncommitted": { + "version": "3.16.5", + "resolved": "https://registry.npmjs.org/@lerna/collect-uncommitted/-/collect-uncommitted-3.16.5.tgz", + "integrity": "sha512-ZgqnGwpDZiWyzIQVZtQaj9tRizsL4dUOhuOStWgTAw1EMe47cvAY2kL709DzxFhjr6JpJSjXV5rZEAeU3VE0Hg==", "dev": true, "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" + "@lerna/child-process": "3.16.5", + "chalk": "^2.3.1", + "figgy-pudding": "^3.5.1", + "npmlog": "^4.1.2" } }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "@lerna/collect-updates": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@lerna/collect-updates/-/collect-updates-3.20.0.tgz", + "integrity": "sha512-qBTVT5g4fupVhBFuY4nI/3FSJtQVcDh7/gEPOpRxoXB/yCSnT38MFHXWl+y4einLciCjt/+0x6/4AG80fjay2Q==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "@lerna/describe-ref": "3.16.5", + "minimatch": "^3.0.4", + "npmlog": "^4.1.2", + "slash": "^2.0.0" + } }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true + "@lerna/command": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/command/-/command-3.18.5.tgz", + "integrity": "sha512-36EnqR59yaTU4HrR1C9XDFti2jRx0BgpIUBeWn129LZZB8kAB3ov1/dJNa1KcNRKp91DncoKHLY99FZ6zTNpMQ==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "@lerna/package-graph": "3.18.5", + "@lerna/project": "3.18.0", + "@lerna/validation-error": "3.13.0", + "@lerna/write-log-file": "3.13.0", + "clone-deep": "^4.0.1", + "dedent": "^0.7.0", + "execa": "^1.0.0", + "is-ci": "^2.0.0", + "npmlog": "^4.1.2" + } }, - "append-transform": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", - "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", + "@lerna/conventional-commits": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/conventional-commits/-/conventional-commits-3.18.5.tgz", + "integrity": "sha512-qcvXIEJ3qSgalxXnQ7Yxp5H9Ta5TVyai6vEor6AAEHc20WiO7UIdbLDCxBtiiHMdGdpH85dTYlsoYUwsCJu3HQ==", "dev": true, "requires": { - "default-require-extensions": "^3.0.0" + "@lerna/validation-error": "3.13.0", + "conventional-changelog-angular": "^5.0.3", + "conventional-changelog-core": "^3.1.6", + "conventional-recommended-bump": "^5.0.0", + "fs-extra": "^8.1.0", + "get-stream": "^4.0.0", + "lodash.template": "^4.5.0", + "npm-package-arg": "^6.1.0", + "npmlog": "^4.1.2", + "pify": "^4.0.1", + "semver": "^6.2.0" } }, - "archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true + "@lerna/create": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/create/-/create-3.18.5.tgz", + "integrity": "sha512-cHpjocbpKmLopCuZFI7cKEM3E/QY8y+yC7VtZ4FQRSaLU8D8i2xXtXmYaP1GOlVNavji0iwoXjuNpnRMInIr2g==", + "dev": true, + "requires": { + "@evocateur/pacote": "^9.6.3", + "@lerna/child-process": "3.16.5", + "@lerna/command": "3.18.5", + "@lerna/npm-conf": "3.16.0", + "@lerna/validation-error": "3.13.0", + "camelcase": "^5.0.0", + "dedent": "^0.7.0", + "fs-extra": "^8.1.0", + "globby": "^9.2.0", + "init-package-json": "^1.10.3", + "npm-package-arg": "^6.1.0", + "p-reduce": "^1.0.0", + "pify": "^4.0.1", + "semver": "^6.2.0", + "slash": "^2.0.0", + "validate-npm-package-license": "^3.0.3", + "validate-npm-package-name": "^3.0.0", + "whatwg-url": "^7.0.0" + } }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "@lerna/create-symlink": { + "version": "3.16.2", + "resolved": "https://registry.npmjs.org/@lerna/create-symlink/-/create-symlink-3.16.2.tgz", + "integrity": "sha512-pzXIJp6av15P325sgiIRpsPXLFmkisLhMBCy4764d+7yjf2bzrJ4gkWVMhsv4AdF0NN3OyZ5jjzzTtLNqfR+Jw==", "dev": true, "requires": { - "sprintf-js": "~1.0.2" + "@zkochan/cmd-shim": "^3.1.0", + "fs-extra": "^8.1.0", + "npmlog": "^4.1.2" } }, - "argv": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/argv/-/argv-0.0.2.tgz", - "integrity": "sha1-7L0W+JSbFXGDcRsb2jNPN4QBhas=", - "dev": true + "@lerna/describe-ref": { + "version": "3.16.5", + "resolved": "https://registry.npmjs.org/@lerna/describe-ref/-/describe-ref-3.16.5.tgz", + "integrity": "sha512-c01+4gUF0saOOtDBzbLMFOTJDHTKbDFNErEY6q6i9QaXuzy9LNN62z+Hw4acAAZuJQhrVWncVathcmkkjvSVGw==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "npmlog": "^4.1.2" + } }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "@lerna/diff": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/diff/-/diff-3.18.5.tgz", + "integrity": "sha512-u90lGs+B8DRA9Z/2xX4YaS3h9X6GbypmGV6ITzx9+1Ga12UWGTVlKaCXBgONMBjzJDzAQOK8qPTwLA57SeBLgA==", "dev": true, "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" + "@lerna/child-process": "3.16.5", + "@lerna/command": "3.18.5", + "@lerna/validation-error": "3.13.0", + "npmlog": "^4.1.2" } }, - "backbone": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/backbone/-/backbone-1.4.0.tgz", - "integrity": "sha512-RLmDrRXkVdouTg38jcgHhyQ/2zjg7a8E6sz2zxfz21Hh17xDJYUHBZimVIt5fUyS8vbfpeSmTL3gUjTEvUV3qQ==", + "@lerna/exec": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@lerna/exec/-/exec-3.20.0.tgz", + "integrity": "sha512-pS1mmC7kzV668rHLWuv31ClngqeXjeHC8kJuM+W2D6IpUVMGQHLcCTYLudFgQsuKGVpl0DGNYG+sjLhAPiiu6A==", "dev": true, "requires": { - "underscore": ">=1.8.3" + "@lerna/child-process": "3.16.5", + "@lerna/command": "3.18.5", + "@lerna/filter-options": "3.20.0", + "@lerna/profiler": "3.20.0", + "@lerna/run-topologically": "3.18.5", + "@lerna/validation-error": "3.13.0", + "p-map": "^2.1.0" } }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "@lerna/filter-options": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@lerna/filter-options/-/filter-options-3.20.0.tgz", + "integrity": "sha512-bmcHtvxn7SIl/R9gpiNMVG7yjx7WyT0HSGw34YVZ9B+3xF/83N3r5Rgtjh4hheLZ+Q91Or0Jyu5O3Nr+AwZe2g==", + "dev": true, + "requires": { + "@lerna/collect-updates": "3.20.0", + "@lerna/filter-packages": "3.18.0", + "dedent": "^0.7.0", + "figgy-pudding": "^3.5.1", + "npmlog": "^4.1.2" + } }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "@lerna/filter-packages": { + "version": "3.18.0", + "resolved": "https://registry.npmjs.org/@lerna/filter-packages/-/filter-packages-3.18.0.tgz", + "integrity": "sha512-6/0pMM04bCHNATIOkouuYmPg6KH3VkPCIgTfQmdkPJTullERyEQfNUKikrefjxo1vHOoCACDpy65JYyKiAbdwQ==", "dev": true, "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "@lerna/validation-error": "3.13.0", + "multimatch": "^3.0.0", + "npmlog": "^4.1.2" } }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true + "@lerna/get-npm-exec-opts": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-3.13.0.tgz", + "integrity": "sha512-Y0xWL0rg3boVyJk6An/vurKzubyJKtrxYv2sj4bB8Mc5zZ3tqtv0ccbOkmkXKqbzvNNF7VeUt1OJ3DRgtC/QZw==", + "dev": true, + "requires": { + "npmlog": "^4.1.2" + } }, - "buffer-from": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", - "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==", - "dev": true + "@lerna/get-packed": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/@lerna/get-packed/-/get-packed-3.16.0.tgz", + "integrity": "sha512-AjsFiaJzo1GCPnJUJZiTW6J1EihrPkc2y3nMu6m3uWFxoleklsSCyImumzVZJssxMi3CPpztj8LmADLedl9kXw==", + "dev": true, + "requires": { + "fs-extra": "^8.1.0", + "ssri": "^6.0.1", + "tar": "^4.4.8" + } }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true + "@lerna/github-client": { + "version": "3.16.5", + "resolved": "https://registry.npmjs.org/@lerna/github-client/-/github-client-3.16.5.tgz", + "integrity": "sha512-rHQdn8Dv/CJrO3VouOP66zAcJzrHsm+wFuZ4uGAai2At2NkgKH+tpNhQy2H1PSC0Ezj9LxvdaHYrUzULqVK5Hw==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "@octokit/plugin-enterprise-rest": "^3.6.1", + "@octokit/rest": "^16.28.4", + "git-url-parse": "^11.1.2", + "npmlog": "^4.1.2" + } }, - "caching-transform": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", - "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", + "@lerna/gitlab-client": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/@lerna/gitlab-client/-/gitlab-client-3.15.0.tgz", + "integrity": "sha512-OsBvRSejHXUBMgwWQqNoioB8sgzL/Pf1pOUhHKtkiMl6aAWjklaaq5HPMvTIsZPfS6DJ9L5OK2GGZuooP/5c8Q==", "dev": true, "requires": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" + "node-fetch": "^2.5.0", + "npmlog": "^4.1.2", + "whatwg-url": "^7.0.0" } }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "@lerna/global-options": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@lerna/global-options/-/global-options-3.13.0.tgz", + "integrity": "sha512-SlZvh1gVRRzYLVluz9fryY1nJpZ0FHDGB66U9tFfvnnxmueckRQxLopn3tXj3NU1kc3QANT2I5BsQkOqZ4TEFQ==", "dev": true }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "@lerna/has-npm-version": { + "version": "3.16.5", + "resolved": "https://registry.npmjs.org/@lerna/has-npm-version/-/has-npm-version-3.16.5.tgz", + "integrity": "sha512-WL7LycR9bkftyqbYop5rEGJ9sRFIV55tSGmbN1HLrF9idwOCD7CLrT64t235t3t4O5gehDnwKI5h2U3oxTrF8Q==", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "dependencies": { - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } + "@lerna/child-process": "3.16.5", + "semver": "^6.2.0" } }, - "clean-stack": { + "@lerna/import": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/import/-/import-3.18.5.tgz", + "integrity": "sha512-PH0WVLEgp+ORyNKbGGwUcrueW89K3Iuk/DDCz8mFyG2IG09l/jOF0vzckEyGyz6PO5CMcz4TI1al/qnp3FrahQ==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "@lerna/command": "3.18.5", + "@lerna/prompt": "3.18.5", + "@lerna/pulse-till-done": "3.13.0", + "@lerna/validation-error": "3.13.0", + "dedent": "^0.7.0", + "fs-extra": "^8.1.0", + "p-map-series": "^1.0.0" + } + }, + "@lerna/info": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@lerna/info/-/info-3.20.0.tgz", + "integrity": "sha512-Rsz+KQF9mczbGUbPTrtOed1N0C+cA08Qz0eX/oI+NNjvsryZIju/o7uedG4I3P55MBiAioNrJI88fHH3eTgYug==", + "dev": true, + "requires": { + "@lerna/command": "3.18.5", + "@lerna/output": "3.13.0", + "envinfo": "^7.3.1" + } + }, + "@lerna/init": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/init/-/init-3.18.5.tgz", + "integrity": "sha512-oCwipWrha98EcJAHm8AGd2YFFLNI7AW9AWi0/LbClj1+XY9ah+uifXIgYGfTk63LbgophDd8936ZEpHMxBsbAg==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "@lerna/command": "3.18.5", + "fs-extra": "^8.1.0", + "p-map": "^2.1.0", + "write-json-file": "^3.2.0" + } + }, + "@lerna/link": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/link/-/link-3.18.5.tgz", + "integrity": "sha512-xTN3vktJpkT7Nqc3QkZRtHO4bT5NvuLMtKNIBDkks0HpGxC9PRyyqwOoCoh1yOGbrWIuDezhfMg3Qow+6I69IQ==", + "dev": true, + "requires": { + "@lerna/command": "3.18.5", + "@lerna/package-graph": "3.18.5", + "@lerna/symlink-dependencies": "3.17.0", + "p-map": "^2.1.0", + "slash": "^2.0.0" + } + }, + "@lerna/list": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@lerna/list/-/list-3.20.0.tgz", + "integrity": "sha512-fXTicPrfioVnRzknyPawmYIVkzDRBaQqk9spejS1S3O1DOidkihK0xxNkr8HCVC0L22w6f92g83qWDp2BYRUbg==", + "dev": true, + "requires": { + "@lerna/command": "3.18.5", + "@lerna/filter-options": "3.20.0", + "@lerna/listable": "3.18.5", + "@lerna/output": "3.13.0" + } + }, + "@lerna/listable": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/listable/-/listable-3.18.5.tgz", + "integrity": "sha512-Sdr3pVyaEv5A7ZkGGYR7zN+tTl2iDcinryBPvtuv20VJrXBE8wYcOks1edBTcOWsPjCE/rMP4bo1pseyk3UTsg==", + "dev": true, + "requires": { + "@lerna/query-graph": "3.18.5", + "chalk": "^2.3.1", + "columnify": "^1.5.4" + } + }, + "@lerna/log-packed": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/@lerna/log-packed/-/log-packed-3.16.0.tgz", + "integrity": "sha512-Fp+McSNBV/P2mnLUYTaSlG8GSmpXM7krKWcllqElGxvAqv6chk2K3c2k80MeVB4WvJ9tRjUUf+i7HUTiQ9/ckQ==", + "dev": true, + "requires": { + "byte-size": "^5.0.1", + "columnify": "^1.5.4", + "has-unicode": "^2.0.1", + "npmlog": "^4.1.2" + } + }, + "@lerna/npm-conf": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/@lerna/npm-conf/-/npm-conf-3.16.0.tgz", + "integrity": "sha512-HbO3DUrTkCAn2iQ9+FF/eisDpWY5POQAOF1m7q//CZjdC2HSW3UYbKEGsSisFxSfaF9Z4jtrV+F/wX6qWs3CuA==", + "dev": true, + "requires": { + "config-chain": "^1.1.11", + "pify": "^4.0.1" + } + }, + "@lerna/npm-dist-tag": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/npm-dist-tag/-/npm-dist-tag-3.18.5.tgz", + "integrity": "sha512-xw0HDoIG6HreVsJND9/dGls1c+lf6vhu7yJoo56Sz5bvncTloYGLUppIfDHQr4ZvmPCK8rsh0euCVh2giPxzKQ==", + "dev": true, + "requires": { + "@evocateur/npm-registry-fetch": "^4.0.0", + "@lerna/otplease": "3.18.5", + "figgy-pudding": "^3.5.1", + "npm-package-arg": "^6.1.0", + "npmlog": "^4.1.2" + } + }, + "@lerna/npm-install": { + "version": "3.16.5", + "resolved": "https://registry.npmjs.org/@lerna/npm-install/-/npm-install-3.16.5.tgz", + "integrity": "sha512-hfiKk8Eku6rB9uApqsalHHTHY+mOrrHeWEs+gtg7+meQZMTS3kzv4oVp5cBZigndQr3knTLjwthT/FX4KvseFg==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "@lerna/get-npm-exec-opts": "3.13.0", + "fs-extra": "^8.1.0", + "npm-package-arg": "^6.1.0", + "npmlog": "^4.1.2", + "signal-exit": "^3.0.2", + "write-pkg": "^3.1.0" + } + }, + "@lerna/npm-publish": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/npm-publish/-/npm-publish-3.18.5.tgz", + "integrity": "sha512-3etLT9+2L8JAx5F8uf7qp6iAtOLSMj+ZYWY6oUgozPi/uLqU0/gsMsEXh3F0+YVW33q0M61RpduBoAlOOZnaTg==", + "dev": true, + "requires": { + "@evocateur/libnpmpublish": "^1.2.2", + "@lerna/otplease": "3.18.5", + "@lerna/run-lifecycle": "3.16.2", + "figgy-pudding": "^3.5.1", + "fs-extra": "^8.1.0", + "npm-package-arg": "^6.1.0", + "npmlog": "^4.1.2", + "pify": "^4.0.1", + "read-package-json": "^2.0.13" + } + }, + "@lerna/npm-run-script": { + "version": "3.16.5", + "resolved": "https://registry.npmjs.org/@lerna/npm-run-script/-/npm-run-script-3.16.5.tgz", + "integrity": "sha512-1asRi+LjmVn3pMjEdpqKJZFT/3ZNpb+VVeJMwrJaV/3DivdNg7XlPK9LTrORuKU4PSvhdEZvJmSlxCKyDpiXsQ==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "@lerna/get-npm-exec-opts": "3.13.0", + "npmlog": "^4.1.2" + } + }, + "@lerna/otplease": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/otplease/-/otplease-3.18.5.tgz", + "integrity": "sha512-S+SldXAbcXTEDhzdxYLU0ZBKuYyURP/ND2/dK6IpKgLxQYh/z4ScljPDMyKymmEvgiEJmBsPZAAPfmNPEzxjog==", + "dev": true, + "requires": { + "@lerna/prompt": "3.18.5", + "figgy-pudding": "^3.5.1" + } + }, + "@lerna/output": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@lerna/output/-/output-3.13.0.tgz", + "integrity": "sha512-7ZnQ9nvUDu/WD+bNsypmPG5MwZBwu86iRoiW6C1WBuXXDxM5cnIAC1m2WxHeFnjyMrYlRXM9PzOQ9VDD+C15Rg==", + "dev": true, + "requires": { + "npmlog": "^4.1.2" + } + }, + "@lerna/pack-directory": { + "version": "3.16.4", + "resolved": "https://registry.npmjs.org/@lerna/pack-directory/-/pack-directory-3.16.4.tgz", + "integrity": "sha512-uxSF0HZeGyKaaVHz5FroDY9A5NDDiCibrbYR6+khmrhZtY0Bgn6hWq8Gswl9iIlymA+VzCbshWIMX4o2O8C8ng==", + "dev": true, + "requires": { + "@lerna/get-packed": "3.16.0", + "@lerna/package": "3.16.0", + "@lerna/run-lifecycle": "3.16.2", + "figgy-pudding": "^3.5.1", + "npm-packlist": "^1.4.4", + "npmlog": "^4.1.2", + "tar": "^4.4.10", + "temp-write": "^3.4.0" + } + }, + "@lerna/package": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/@lerna/package/-/package-3.16.0.tgz", + "integrity": "sha512-2lHBWpaxcBoiNVbtyLtPUuTYEaB/Z+eEqRS9duxpZs6D+mTTZMNy6/5vpEVSCBmzvdYpyqhqaYjjSLvjjr5Riw==", + "dev": true, + "requires": { + "load-json-file": "^5.3.0", + "npm-package-arg": "^6.1.0", + "write-pkg": "^3.1.0" + } + }, + "@lerna/package-graph": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/package-graph/-/package-graph-3.18.5.tgz", + "integrity": "sha512-8QDrR9T+dBegjeLr+n9WZTVxUYUhIUjUgZ0gvNxUBN8S1WB9r6H5Yk56/MVaB64tA3oGAN9IIxX6w0WvTfFudA==", + "dev": true, + "requires": { + "@lerna/prerelease-id-from-version": "3.16.0", + "@lerna/validation-error": "3.13.0", + "npm-package-arg": "^6.1.0", + "npmlog": "^4.1.2", + "semver": "^6.2.0" + } + }, + "@lerna/prerelease-id-from-version": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-3.16.0.tgz", + "integrity": "sha512-qZyeUyrE59uOK8rKdGn7jQz+9uOpAaF/3hbslJVFL1NqF9ELDTqjCPXivuejMX/lN4OgD6BugTO4cR7UTq/sZA==", + "dev": true, + "requires": { + "semver": "^6.2.0" + } + }, + "@lerna/profiler": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@lerna/profiler/-/profiler-3.20.0.tgz", + "integrity": "sha512-bh8hKxAlm6yu8WEOvbLENm42i2v9SsR4WbrCWSbsmOElx3foRnMlYk7NkGECa+U5c3K4C6GeBbwgqs54PP7Ljg==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1", + "fs-extra": "^8.1.0", + "npmlog": "^4.1.2", + "upath": "^1.2.0" + } + }, + "@lerna/project": { + "version": "3.18.0", + "resolved": "https://registry.npmjs.org/@lerna/project/-/project-3.18.0.tgz", + "integrity": "sha512-+LDwvdAp0BurOAWmeHE3uuticsq9hNxBI0+FMHiIai8jrygpJGahaQrBYWpwbshbQyVLeQgx3+YJdW2TbEdFWA==", + "dev": true, + "requires": { + "@lerna/package": "3.16.0", + "@lerna/validation-error": "3.13.0", + "cosmiconfig": "^5.1.0", + "dedent": "^0.7.0", + "dot-prop": "^4.2.0", + "glob-parent": "^5.0.0", + "globby": "^9.2.0", + "load-json-file": "^5.3.0", + "npmlog": "^4.1.2", + "p-map": "^2.1.0", + "resolve-from": "^4.0.0", + "write-json-file": "^3.2.0" + } + }, + "@lerna/prompt": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/prompt/-/prompt-3.18.5.tgz", + "integrity": "sha512-rkKj4nm1twSbBEb69+Em/2jAERK8htUuV8/xSjN0NPC+6UjzAwY52/x9n5cfmpa9lyKf/uItp7chCI7eDmNTKQ==", + "dev": true, + "requires": { + "inquirer": "^6.2.0", + "npmlog": "^4.1.2" + } + }, + "@lerna/publish": { + "version": "3.20.2", + "resolved": "https://registry.npmjs.org/@lerna/publish/-/publish-3.20.2.tgz", + "integrity": "sha512-N7Y6PdhJ+tYQPdI1tZum8W25cDlTp4D6brvRacKZusweWexxaopbV8RprBaKexkEX/KIbncuADq7qjDBdQHzaA==", + "dev": true, + "requires": { + "@evocateur/libnpmaccess": "^3.1.2", + "@evocateur/npm-registry-fetch": "^4.0.0", + "@evocateur/pacote": "^9.6.3", + "@lerna/check-working-tree": "3.16.5", + "@lerna/child-process": "3.16.5", + "@lerna/collect-updates": "3.20.0", + "@lerna/command": "3.18.5", + "@lerna/describe-ref": "3.16.5", + "@lerna/log-packed": "3.16.0", + "@lerna/npm-conf": "3.16.0", + "@lerna/npm-dist-tag": "3.18.5", + "@lerna/npm-publish": "3.18.5", + "@lerna/otplease": "3.18.5", + "@lerna/output": "3.13.0", + "@lerna/pack-directory": "3.16.4", + "@lerna/prerelease-id-from-version": "3.16.0", + "@lerna/prompt": "3.18.5", + "@lerna/pulse-till-done": "3.13.0", + "@lerna/run-lifecycle": "3.16.2", + "@lerna/run-topologically": "3.18.5", + "@lerna/validation-error": "3.13.0", + "@lerna/version": "3.20.2", + "figgy-pudding": "^3.5.1", + "fs-extra": "^8.1.0", + "npm-package-arg": "^6.1.0", + "npmlog": "^4.1.2", + "p-finally": "^1.0.0", + "p-map": "^2.1.0", + "p-pipe": "^1.2.0", + "semver": "^6.2.0" + } + }, + "@lerna/pulse-till-done": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@lerna/pulse-till-done/-/pulse-till-done-3.13.0.tgz", + "integrity": "sha512-1SOHpy7ZNTPulzIbargrgaJX387csN7cF1cLOGZiJQA6VqnS5eWs2CIrG8i8wmaUavj2QlQ5oEbRMVVXSsGrzA==", + "dev": true, + "requires": { + "npmlog": "^4.1.2" + } + }, + "@lerna/query-graph": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/query-graph/-/query-graph-3.18.5.tgz", + "integrity": "sha512-50Lf4uuMpMWvJ306be3oQDHrWV42nai9gbIVByPBYJuVW8dT8O8pA3EzitNYBUdLL9/qEVbrR0ry1HD7EXwtRA==", + "dev": true, + "requires": { + "@lerna/package-graph": "3.18.5", + "figgy-pudding": "^3.5.1" + } + }, + "@lerna/resolve-symlink": { + "version": "3.16.0", + "resolved": "https://registry.npmjs.org/@lerna/resolve-symlink/-/resolve-symlink-3.16.0.tgz", + "integrity": "sha512-Ibj5e7njVHNJ/NOqT4HlEgPFPtPLWsO7iu59AM5bJDcAJcR96mLZ7KGVIsS2tvaO7akMEJvt2P+ErwCdloG3jQ==", + "dev": true, + "requires": { + "fs-extra": "^8.1.0", + "npmlog": "^4.1.2", + "read-cmd-shim": "^1.0.1" + } + }, + "@lerna/rimraf-dir": { + "version": "3.16.5", + "resolved": "https://registry.npmjs.org/@lerna/rimraf-dir/-/rimraf-dir-3.16.5.tgz", + "integrity": "sha512-bQlKmO0pXUsXoF8lOLknhyQjOZsCc0bosQDoX4lujBXSWxHVTg1VxURtWf2lUjz/ACsJVDfvHZbDm8kyBk5okA==", + "dev": true, + "requires": { + "@lerna/child-process": "3.16.5", + "npmlog": "^4.1.2", + "path-exists": "^3.0.0", + "rimraf": "^2.6.2" + } + }, + "@lerna/run": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@lerna/run/-/run-3.20.0.tgz", + "integrity": "sha512-9U3AqeaCeB7KsGS9oyKNp62s9vYoULg/B4cqXTKZkc+OKL6QOEjYHYVSBcMK9lUXrMjCjDIuDSX3PnTCPxQ2Dw==", + "dev": true, + "requires": { + "@lerna/command": "3.18.5", + "@lerna/filter-options": "3.20.0", + "@lerna/npm-run-script": "3.16.5", + "@lerna/output": "3.13.0", + "@lerna/profiler": "3.20.0", + "@lerna/run-topologically": "3.18.5", + "@lerna/timer": "3.13.0", + "@lerna/validation-error": "3.13.0", + "p-map": "^2.1.0" + } + }, + "@lerna/run-lifecycle": { + "version": "3.16.2", + "resolved": "https://registry.npmjs.org/@lerna/run-lifecycle/-/run-lifecycle-3.16.2.tgz", + "integrity": "sha512-RqFoznE8rDpyyF0rOJy3+KjZCeTkO8y/OB9orPauR7G2xQ7PTdCpgo7EO6ZNdz3Al+k1BydClZz/j78gNCmL2A==", + "dev": true, + "requires": { + "@lerna/npm-conf": "3.16.0", + "figgy-pudding": "^3.5.1", + "npm-lifecycle": "^3.1.2", + "npmlog": "^4.1.2" + } + }, + "@lerna/run-topologically": { + "version": "3.18.5", + "resolved": "https://registry.npmjs.org/@lerna/run-topologically/-/run-topologically-3.18.5.tgz", + "integrity": "sha512-6N1I+6wf4hLOnPW+XDZqwufyIQ6gqoPfHZFkfWlvTQ+Ue7CuF8qIVQ1Eddw5HKQMkxqN10thKOFfq/9NQZ4NUg==", + "dev": true, + "requires": { + "@lerna/query-graph": "3.18.5", + "figgy-pudding": "^3.5.1", + "p-queue": "^4.0.0" + } + }, + "@lerna/symlink-binary": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/@lerna/symlink-binary/-/symlink-binary-3.17.0.tgz", + "integrity": "sha512-RLpy9UY6+3nT5J+5jkM5MZyMmjNHxZIZvXLV+Q3MXrf7Eaa1hNqyynyj4RO95fxbS+EZc4XVSk25DGFQbcRNSQ==", + "dev": true, + "requires": { + "@lerna/create-symlink": "3.16.2", + "@lerna/package": "3.16.0", + "fs-extra": "^8.1.0", + "p-map": "^2.1.0" + } + }, + "@lerna/symlink-dependencies": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/@lerna/symlink-dependencies/-/symlink-dependencies-3.17.0.tgz", + "integrity": "sha512-KmjU5YT1bpt6coOmdFueTJ7DFJL4H1w5eF8yAQ2zsGNTtZ+i5SGFBWpb9AQaw168dydc3s4eu0W0Sirda+F59Q==", + "dev": true, + "requires": { + "@lerna/create-symlink": "3.16.2", + "@lerna/resolve-symlink": "3.16.0", + "@lerna/symlink-binary": "3.17.0", + "fs-extra": "^8.1.0", + "p-finally": "^1.0.0", + "p-map": "^2.1.0", + "p-map-series": "^1.0.0" + } + }, + "@lerna/timer": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@lerna/timer/-/timer-3.13.0.tgz", + "integrity": "sha512-RHWrDl8U4XNPqY5MQHkToWS9jHPnkLZEt5VD+uunCKTfzlxGnRCr3/zVr8VGy/uENMYpVP3wJa4RKGY6M0vkRw==", + "dev": true + }, + "@lerna/validation-error": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@lerna/validation-error/-/validation-error-3.13.0.tgz", + "integrity": "sha512-SiJP75nwB8GhgwLKQfdkSnDufAaCbkZWJqEDlKOUPUvVOplRGnfL+BPQZH5nvq2BYSRXsksXWZ4UHVnQZI/HYA==", + "dev": true, + "requires": { + "npmlog": "^4.1.2" + } + }, + "@lerna/version": { + "version": "3.20.2", + "resolved": "https://registry.npmjs.org/@lerna/version/-/version-3.20.2.tgz", + "integrity": "sha512-ckBJMaBWc+xJen0cMyCE7W67QXLLrc0ELvigPIn8p609qkfNM0L0CF803MKxjVOldJAjw84b8ucNWZLvJagP/Q==", + "dev": true, + "requires": { + "@lerna/check-working-tree": "3.16.5", + "@lerna/child-process": "3.16.5", + "@lerna/collect-updates": "3.20.0", + "@lerna/command": "3.18.5", + "@lerna/conventional-commits": "3.18.5", + "@lerna/github-client": "3.16.5", + "@lerna/gitlab-client": "3.15.0", + "@lerna/output": "3.13.0", + "@lerna/prerelease-id-from-version": "3.16.0", + "@lerna/prompt": "3.18.5", + "@lerna/run-lifecycle": "3.16.2", + "@lerna/run-topologically": "3.18.5", + "@lerna/validation-error": "3.13.0", + "chalk": "^2.3.1", + "dedent": "^0.7.0", + "load-json-file": "^5.3.0", + "minimatch": "^3.0.4", + "npmlog": "^4.1.2", + "p-map": "^2.1.0", + "p-pipe": "^1.2.0", + "p-reduce": "^1.0.0", + "p-waterfall": "^1.0.0", + "semver": "^6.2.0", + "slash": "^2.0.0", + "temp-write": "^3.4.0", + "write-json-file": "^3.2.0" + } + }, + "@lerna/write-log-file": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/@lerna/write-log-file/-/write-log-file-3.13.0.tgz", + "integrity": "sha512-RibeMnDPvlL8bFYW5C8cs4mbI3AHfQef73tnJCQ/SgrXZHehmHnsyWUiE7qDQCAo+B1RfTapvSyFF69iPj326A==", + "dev": true, + "requires": { + "npmlog": "^4.1.2", + "write-file-atomic": "^2.3.0" + } + }, + "@mrmlnc/readdir-enhanced": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", + "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "dev": true, + "requires": { + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" + } + }, + "@nodelib/fs.stat": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", + "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", + "dev": true + }, + "@octokit/auth-token": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.0.tgz", + "integrity": "sha512-eoOVMjILna7FVQf96iWc3+ZtE/ZT6y8ob8ZzcqKY1ibSQCnu4O/B7pJvzMx5cyZ/RjAff6DAdEb0O0Cjcxidkg==", + "dev": true, + "requires": { + "@octokit/types": "^2.0.0" + } + }, + "@octokit/endpoint": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.0.tgz", + "integrity": "sha512-3nx+MEYoZeD0uJ+7F/gvELLvQJzLXhep2Az0bBSXagbApDvDW0LWwpnAIY/hb0Jwe17A0fJdz0O12dPh05cj7A==", + "dev": true, + "requires": { + "@octokit/types": "^2.0.0", + "is-plain-object": "^3.0.0", + "universal-user-agent": "^5.0.0" + }, + "dependencies": { + "is-plain-object": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz", + "integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==", + "dev": true, + "requires": { + "isobject": "^4.0.0" + } + }, + "isobject": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", + "integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==", + "dev": true + }, + "universal-user-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-5.0.0.tgz", + "integrity": "sha512-B5TPtzZleXyPrUMKCpEHFmVhMN6EhmJYjG5PQna9s7mXeSqGTLap4OpqLl5FCEFUI3UBmllkETwKf/db66Y54Q==", + "dev": true, + "requires": { + "os-name": "^3.1.0" + } + } + } + }, + "@octokit/plugin-enterprise-rest": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-3.6.2.tgz", + "integrity": "sha512-3wF5eueS5OHQYuAEudkpN+xVeUsg8vYEMMenEzLphUZ7PRZ8OJtDcsreL3ad9zxXmBbaFWzLmFcdob5CLyZftA==", + "dev": true + }, + "@octokit/plugin-paginate-rest": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz", + "integrity": "sha512-jbsSoi5Q1pj63sC16XIUboklNw+8tL9VOnJsWycWYR78TKss5PVpIPb1TUUcMQ+bBh7cY579cVAWmf5qG+dw+Q==", + "dev": true, + "requires": { + "@octokit/types": "^2.0.1" + } + }, + "@octokit/plugin-request-log": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz", + "integrity": "sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw==", + "dev": true + }, + "@octokit/plugin-rest-endpoint-methods": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-2.4.0.tgz", + "integrity": "sha512-EZi/AWhtkdfAYi01obpX0DF7U6b1VRr30QNQ5xSFPITMdLSfhcBqjamE3F+sKcxPbD7eZuMHu3Qkk2V+JGxBDQ==", + "dev": true, + "requires": { + "@octokit/types": "^2.0.1", + "deprecation": "^2.3.1" + } + }, + "@octokit/request": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.0.tgz", + "integrity": "sha512-uAJO6GI8z8VHBqtY7VTL9iFy1Y+UTp5ShpI97tY5z0qBfYKE9rZCRsCm23VmF00x+IoNJ7a0nuVITs/+wS9/mg==", + "dev": true, + "requires": { + "@octokit/endpoint": "^6.0.0", + "@octokit/request-error": "^2.0.0", + "@octokit/types": "^2.8.2", + "deprecation": "^2.0.0", + "is-plain-object": "^3.0.0", + "node-fetch": "^2.3.0", + "once": "^1.4.0", + "universal-user-agent": "^5.0.0" + }, + "dependencies": { + "@octokit/request-error": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.0.tgz", + "integrity": "sha512-rtYicB4Absc60rUv74Rjpzek84UbVHGHJRu4fNVlZ1mCcyUPPuzFfG9Rn6sjHrd95DEsmjSt1Axlc699ZlbDkw==", + "dev": true, + "requires": { + "@octokit/types": "^2.0.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" + } + }, + "is-plain-object": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz", + "integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==", + "dev": true, + "requires": { + "isobject": "^4.0.0" + } + }, + "isobject": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", + "integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==", + "dev": true + }, + "universal-user-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-5.0.0.tgz", + "integrity": "sha512-B5TPtzZleXyPrUMKCpEHFmVhMN6EhmJYjG5PQna9s7mXeSqGTLap4OpqLl5FCEFUI3UBmllkETwKf/db66Y54Q==", + "dev": true, + "requires": { + "os-name": "^3.1.0" + } + } + } + }, + "@octokit/request-error": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.2.1.tgz", + "integrity": "sha512-+6yDyk1EES6WK+l3viRDElw96MvwfJxCt45GvmjDUKWjYIb3PJZQkq3i46TwGwoPD4h8NmTrENmtyA1FwbmhRA==", + "dev": true, + "requires": { + "@octokit/types": "^2.0.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" + } + }, + "@octokit/rest": { + "version": "16.43.1", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.43.1.tgz", + "integrity": "sha512-gfFKwRT/wFxq5qlNjnW2dh+qh74XgTQ2B179UX5K1HYCluioWj8Ndbgqw2PVqa1NnVJkGHp2ovMpVn/DImlmkw==", + "dev": true, + "requires": { + "@octokit/auth-token": "^2.4.0", + "@octokit/plugin-paginate-rest": "^1.1.1", + "@octokit/plugin-request-log": "^1.0.0", + "@octokit/plugin-rest-endpoint-methods": "2.4.0", + "@octokit/request": "^5.2.0", + "@octokit/request-error": "^1.0.2", + "atob-lite": "^2.0.0", + "before-after-hook": "^2.0.0", + "btoa-lite": "^1.0.0", + "deprecation": "^2.0.0", + "lodash.get": "^4.4.2", + "lodash.set": "^4.3.2", + "lodash.uniq": "^4.5.0", + "octokit-pagination-methods": "^1.1.0", + "once": "^1.4.0", + "universal-user-agent": "^4.0.0" + } + }, + "@octokit/types": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.9.0.tgz", + "integrity": "sha512-IzptUpoDsFlXF+AOys+KnfItIVY3EK+eH9Akv+lJYELnMSGkJnIcClt6Cm0QRR4ecsUTsmFJWn10iFgJ9BQqIQ==", + "dev": true, + "requires": { + "@types/node": ">= 8" + } + }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true + }, + "@types/eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", + "dev": true + }, + "@types/events": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", + "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", + "dev": true + }, + "@types/glob": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", + "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", + "dev": true, + "requires": { + "@types/events": "*", + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "@types/json-schema": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz", + "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==", + "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": "13.11.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.11.1.tgz", + "integrity": "sha512-eWQGP3qtxwL8FGneRrC5DwrJLGN4/dH1clNTuLfN81HCrxVtxRjygDTUoZJ5ASlDEeo0ppYFQjQIlXhtXpOn6g==", + "dev": true + }, + "@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "dev": true + }, + "@types/source-map-support": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@types/source-map-support/-/source-map-support-0.5.1.tgz", + "integrity": "sha512-VDqnZe9D2zR19qbeRvwYyHSp7AtUtCkTaRVFQ8wzwH9TXw9kKKq/vBhfEnFEXVupO2M0lBMA9mr/XyQ6gEkUOA==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/std-mocks": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/std-mocks/-/std-mocks-1.0.0.tgz", + "integrity": "sha512-0PDd05AK/u41wFxr0ytOYhQz15uAhkmwe8fOp33UN506zGARdLVx/Yc/WSeGs+8zKjMMTp1vlB+OXGwD7HmImg==", + "dev": true + }, + "@typescript-eslint/eslint-plugin": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.28.0.tgz", + "integrity": "sha512-w0Ugcq2iatloEabQP56BRWJowliXUP5Wv6f9fKzjJmDW81hOTBxRoJ4LoEOxRpz9gcY51Libytd2ba3yLmSOfg==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "2.28.0", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^3.0.0", + "tsutils": "^3.17.1" + }, + "dependencies": { + "tsutils": { + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", + "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/eslint-plugin-tslint": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin-tslint/-/eslint-plugin-tslint-2.28.0.tgz", + "integrity": "sha512-a6cU6aJZa10sK6DybAtOdCV/tU1rWTTurBgYtyJb2DsG3BJwF6vYob9qOKw9n3MjV/F757LGqXz3RNmrvrimww==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "2.28.0", + "lodash": "^4.17.15" + } + }, + "@typescript-eslint/experimental-utils": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.28.0.tgz", + "integrity": "sha512-4SL9OWjvFbHumM/Zh/ZeEjUFxrYKtdCi7At4GyKTbQlrj1HcphIDXlje4Uu4cY+qzszR5NdVin4CCm6AXCjd6w==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/typescript-estree": "2.28.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + } + }, + "@typescript-eslint/parser": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.28.0.tgz", + "integrity": "sha512-RqPybRDquui9d+K86lL7iPqH6Dfp9461oyqvlXMNtap+PyqYbkY5dB7LawQjDzot99fqzvS0ZLZdfe+1Bt3Jgw==", + "dev": true, + "requires": { + "@types/eslint-visitor-keys": "^1.0.0", + "@typescript-eslint/experimental-utils": "2.28.0", + "@typescript-eslint/typescript-estree": "2.28.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.28.0.tgz", + "integrity": "sha512-HDr8MP9wfwkiuqzRVkuM3BeDrOC4cKbO5a6BymZBHUt5y/2pL0BXD6I/C/ceq2IZoHWhcASk+5/zo+dwgu9V8Q==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "eslint-visitor-keys": "^1.1.0", + "glob": "^7.1.6", + "is-glob": "^4.0.1", + "lodash": "^4.17.15", + "semver": "^6.3.0", + "tsutils": "^3.17.1" + }, + "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" + } + }, + "tsutils": { + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", + "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@zkochan/cmd-shim": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@zkochan/cmd-shim/-/cmd-shim-3.1.0.tgz", + "integrity": "sha512-o8l0+x7C7sMZU3v9GuJIAU10qQLtwR1dtRQIOmlNMtyaqhmpXOzx1HWiYoWfmmf9HHZoAkXpc9TM9PQYF9d4Jg==", + "dev": true, + "requires": { + "is-windows": "^1.0.0", + "mkdirp-promise": "^5.0.1", + "mz": "^2.5.0" + } + }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "acorn": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "dev": true + }, + "acorn-jsx": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", + "dev": true + }, + "agent-base": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", + "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", + "dev": true, + "requires": { + "es6-promisify": "^5.0.0" + } + }, + "agentkeepalive": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.2.tgz", + "integrity": "sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==", + "dev": true, + "requires": { + "humanize-ms": "^1.2.1" + } + }, + "aggregate-error": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", + "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "dependencies": { + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + } + } + }, + "ajv": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", + "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true + }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", + "dev": true + }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "append-transform": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", + "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", + "dev": true, + "requires": { + "default-require-extensions": "^3.0.0" + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "dev": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "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 + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-differ": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-2.1.0.tgz", + "integrity": "sha512-KbUpJgx909ZscOc/7CLATBFam7P1Z1QRQInvgT0UztM9Q72aGKCunKASAl7WNW0tnPmPyEMeMhdsfWhfmW037w==", + "dev": true + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-ify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", + "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "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 + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "atob-lite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz", + "integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY=", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", + "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.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" + } + }, + "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" + } + } + } + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "before-after-hook": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz", + "integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==", + "dev": true + }, + "binary-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "dev": true + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "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" + } + } + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "btoa-lite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz", + "integrity": "sha1-M3dm2hWAEhD92VbCLpxokaudAzc=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" + }, + "builtins": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", + "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", + "dev": true + }, + "byline": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/byline/-/byline-5.0.0.tgz", + "integrity": "sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE=", + "dev": true + }, + "byte-size": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/byte-size/-/byte-size-5.0.1.tgz", + "integrity": "sha512-/XuKeqWocKsYa/cBY1YbSJSWWqTi4cFgr9S6OyM7PBaPbr9zvNGwWP33vt0uqGhwDdN+y3yhbXVILEUpnwEWGw==", + "dev": true + }, + "cacache": { + "version": "12.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", + "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", + "dev": true, + "requires": { + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "caching-transform": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", + "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", + "dev": true, + "requires": { + "hasha": "^5.0.0", + "make-dir": "^3.0.0", + "package-hash": "^4.0.0", + "write-file-atomic": "^3.0.0" + }, + "dependencies": { + "make-dir": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz", + "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + } + } + }, + "call-me-maybe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", + "dev": true + }, + "caller-callsite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", + "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", + "dev": true, + "requires": { + "callsites": "^2.0.0" + } + }, + "caller-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", + "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", + "dev": true, + "requires": { + "caller-callsite": "^2.0.0" + } + }, + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "camelcase-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", + "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", + "dev": true, + "requires": { + "camelcase": "^4.1.0", + "map-obj": "^2.0.0", + "quick-lru": "^1.0.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 + } + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + }, + "dependencies": { + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.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" + } + } + } + }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "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 + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "dev": true + }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, + "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", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "columnify": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz", + "integrity": "sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs=", + "dev": true, + "requires": { + "strip-ansi": "^3.0.0", + "wcwidth": "^1.0.0" + } + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "compare-func": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz", + "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=", + "dev": true, + "requires": { + "array-ify": "^1.0.0", + "dot-prop": "^3.0.0" + }, + "dependencies": { + "dot-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz", + "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } + } + } + }, + "compare-versions": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz", + "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==", + "dev": true + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "config-chain": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz", + "integrity": "sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==", + "dev": true, + "requires": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true + }, + "conventional-changelog-angular": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.6.tgz", + "integrity": "sha512-QDEmLa+7qdhVIv8sFZfVxU1VSyVvnXPsxq8Vam49mKUcO1Z8VTLEJk9uI21uiJUsnmm0I4Hrsdc9TgkOQo9WSA==", + "dev": true, + "requires": { + "compare-func": "^1.3.1", + "q": "^1.5.1" + } + }, + "conventional-changelog-core": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-3.2.3.tgz", + "integrity": "sha512-LMMX1JlxPIq/Ez5aYAYS5CpuwbOk6QFp8O4HLAcZxe3vxoCtABkhfjetk8IYdRB9CDQGwJFLR3Dr55Za6XKgUQ==", + "dev": true, + "requires": { + "conventional-changelog-writer": "^4.0.6", + "conventional-commits-parser": "^3.0.3", + "dateformat": "^3.0.0", + "get-pkg-repo": "^1.0.0", + "git-raw-commits": "2.0.0", + "git-remote-origin-url": "^2.0.0", + "git-semver-tags": "^2.0.3", + "lodash": "^4.2.1", + "normalize-package-data": "^2.3.5", + "q": "^1.5.1", + "read-pkg": "^3.0.0", + "read-pkg-up": "^3.0.0", + "through2": "^3.0.0" + }, + "dependencies": { + "through2": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", + "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", + "dev": true, + "requires": { + "readable-stream": "2 || 3" + } + } + } + }, + "conventional-changelog-preset-loader": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.0.tgz", + "integrity": "sha512-/rHb32J2EJnEXeK4NpDgMaAVTFZS3o1ExmjKMtYVgIC4MQn0vkNSbYpdGRotkfGGRWiqk3Ri3FBkiZGbAfIfOQ==", + "dev": true + }, + "conventional-changelog-writer": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.11.tgz", + "integrity": "sha512-g81GQOR392I+57Cw3IyP1f+f42ME6aEkbR+L7v1FBBWolB0xkjKTeCWVguzRrp6UiT1O6gBpJbEy2eq7AnV1rw==", + "dev": true, + "requires": { + "compare-func": "^1.3.1", + "conventional-commits-filter": "^2.0.2", + "dateformat": "^3.0.0", + "handlebars": "^4.4.0", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.17.15", + "meow": "^5.0.0", + "semver": "^6.0.0", + "split": "^1.0.0", + "through2": "^3.0.0" + }, + "dependencies": { + "through2": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", + "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", + "dev": true, + "requires": { + "readable-stream": "2 || 3" + } + } + } + }, + "conventional-commits-filter": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.2.tgz", + "integrity": "sha512-WpGKsMeXfs21m1zIw4s9H5sys2+9JccTzpN6toXtxhpw2VNF2JUXwIakthKBy+LN4DvJm+TzWhxOMWOs1OFCFQ==", + "dev": true, + "requires": { + "lodash.ismatch": "^4.4.0", + "modify-values": "^1.0.0" + } + }, + "conventional-commits-parser": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.8.tgz", + "integrity": "sha512-YcBSGkZbYp7d+Cr3NWUeXbPDFUN6g3SaSIzOybi8bjHL5IJ5225OSCxJJ4LgziyEJ7AaJtE9L2/EU6H7Nt/DDQ==", + "dev": true, + "requires": { + "JSONStream": "^1.0.4", + "is-text-path": "^1.0.1", + "lodash": "^4.17.15", + "meow": "^5.0.0", + "split2": "^2.0.0", + "through2": "^3.0.0", + "trim-off-newlines": "^1.0.0" + }, + "dependencies": { + "through2": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", + "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", + "dev": true, + "requires": { + "readable-stream": "2 || 3" + } + } + } + }, + "conventional-recommended-bump": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-5.0.1.tgz", + "integrity": "sha512-RVdt0elRcCxL90IrNP0fYCpq1uGt2MALko0eyeQ+zQuDVWtMGAy9ng6yYn3kax42lCj9+XBxQ8ZN6S9bdKxDhQ==", + "dev": true, + "requires": { + "concat-stream": "^2.0.0", + "conventional-changelog-preset-loader": "^2.1.1", + "conventional-commits-filter": "^2.0.2", + "conventional-commits-parser": "^3.0.3", + "git-raw-commits": "2.0.0", + "git-semver-tags": "^2.0.3", + "meow": "^4.0.0", + "q": "^1.5.1" + }, + "dependencies": { + "concat-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" + } + }, + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" + } + }, + "readable-stream": { + "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", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cosmiconfig": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "dev": true, + "requires": { + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "cyclist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", + "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=", + "dev": true + }, + "dargs": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-4.1.0.tgz", + "integrity": "sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "dev": true + }, + "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" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "debuglog": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", + "integrity": "sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=", + "dev": true + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decamelize-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", + "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "dev": true, + "requires": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + } + } + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "default-require-extensions": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", + "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", + "dev": true, + "requires": { + "strip-bom": "^4.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true + } + } + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dev": true, + "requires": { + "clone": "^1.0.2" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "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" + } + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true + }, + "deprecation": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", + "dev": true + }, + "detect-indent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", + "dev": true + }, + "dezalgo": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", + "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=", + "dev": true, + "requires": { + "asap": "^2.0.0", + "wrappy": "1" + } + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "dir-glob": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", + "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", + "dev": true, + "requires": { + "path-type": "^3.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "dot-prop": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", + "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", + "dev": true, + "requires": { + "is-obj": "^1.0.0" + } + }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", + "dev": true + }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "dev": true, + "requires": { + "iconv-lite": "~0.4.13" + } + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "env-paths": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz", + "integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==", + "dev": true + }, + "envinfo": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.5.0.tgz", + "integrity": "sha512-jDgnJaF/Btomk+m3PZDTTCb5XIIIX3zYItnCRfF73zVgvinLoRomuhi75Y4su0PtQxWz4v66XnLLckyvyJTOIQ==", + "dev": true + }, + "err-code": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", + "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=", + "dev": true + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.17.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", + "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + }, + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "dev": true + }, + "es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "dev": true, + "requires": { + "es6-promise": "^4.0.3" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "eslint": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.3", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.2", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^7.0.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.3", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "ansi-escapes": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "dev": true, + "requires": { + "type-fest": "^0.11.0" + }, + "dependencies": { + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + } + } + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "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" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "inquirer": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz", + "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^3.0.0", + "cli-cursor": "^3.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.15", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.5.3", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "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==", + "dev": true + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, + "onetime": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + } + } + }, + "strip-json-comments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", + "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, + "eslint-plugin-prettier": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.3.tgz", + "integrity": "sha512-+HG5jmu/dN3ZV3T6eCD7a4BlAySdN7mLIbJYo0z1cFQuI+r2DiTJEFeF68ots93PsnrMxbzIZ2S/ieX+mkrBeQ==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-scope": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", + "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", + "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "dev": true + }, + "espree": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "esquery": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", + "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", + "dev": true + }, + "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" + } + }, + "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" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "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" + } + }, + "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" + } + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "dev": true + }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, + "fast-glob": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", + "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", + "dev": true, + "requires": { + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.1.2", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.3", + "micromatch": "^3.1.10" + }, + "dependencies": { + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + } + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figgy-pudding": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", + "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "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" + } + } + } + }, + "find-cache-dir": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "make-dir": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz", + "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + } + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "find-versions": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", + "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==", + "dev": true, + "requires": { + "semver-regex": "^2.0.0" + } + }, + "flat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", + "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "dev": true, + "requires": { + "is-buffer": "~2.0.3" + }, + "dependencies": { + "is-buffer": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "dev": true + } + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + }, + "dependencies": { + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true + }, + "flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz", + "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fromentries": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.2.0.tgz", + "integrity": "sha512-33X7H/wdfO99GdRLLgkjUrD4geAFdq/Uv0kl3HD4da6HDixd2GUg8Mw7dahLCV9r/EARkmtYBB6Tch4EEokFTQ==", + "dev": true + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "dev": true, + "requires": { + "minipass": "^2.6.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", + "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "genfun": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/genfun/-/genfun-5.0.0.tgz", + "integrity": "sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==", + "dev": true + }, + "gensync": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", + "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-pkg-repo": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz", + "integrity": "sha1-xztInAbYDMVTbCyFP54FIyBWly0=", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "meow": "^3.3.0", + "normalize-package-data": "^2.3.0", + "parse-github-repo-url": "^1.3.0", + "through2": "^2.0.0" + }, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true + }, + "camelcase-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, + "requires": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "indent-string": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", + "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, + "requires": { + "repeating": "^2.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "meow": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", + "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, + "requires": { + "camelcase-keys": "^2.0.0", + "decamelize": "^1.1.2", + "loud-rejection": "^1.0.0", + "map-obj": "^1.0.1", + "minimist": "^1.1.3", + "normalize-package-data": "^2.3.4", + "object-assign": "^4.0.1", + "read-pkg-up": "^1.0.1", + "redent": "^1.0.0", + "trim-newlines": "^1.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "redent": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", + "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, + "requires": { + "indent-string": "^2.1.0", + "strip-indent": "^1.0.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", + "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, + "requires": { + "get-stdin": "^4.0.1" + } + }, + "trim-newlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true + } + } + }, + "get-port": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-4.2.0.tgz", + "integrity": "sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw==", + "dev": true + }, + "get-stdin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "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" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "git-raw-commits": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.0.tgz", + "integrity": "sha512-w4jFEJFgKXMQJ0H0ikBk2S+4KP2VEjhCvLCNqbNRQC8BgGWgLKNCO7a9K9LI+TVT7Gfoloje502sEnctibffgg==", + "dev": true, + "requires": { + "dargs": "^4.0.1", + "lodash.template": "^4.0.2", + "meow": "^4.0.0", + "split2": "^2.0.0", + "through2": "^2.0.0" + }, + "dependencies": { + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" + } + } + } + }, + "git-remote-origin-url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", + "integrity": "sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=", + "dev": true, + "requires": { + "gitconfiglocal": "^1.0.0", + "pify": "^2.3.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "git-semver-tags": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-2.0.3.tgz", + "integrity": "sha512-tj4FD4ww2RX2ae//jSrXZzrocla9db5h0V7ikPl1P/WwoZar9epdUhwR7XHXSgc+ZkNq72BEEerqQuicoEQfzA==", + "dev": true, + "requires": { + "meow": "^4.0.0", + "semver": "^6.0.0" + }, + "dependencies": { + "meow": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", + "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist": "^1.1.3", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0" + } + } + } + }, + "git-up": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/git-up/-/git-up-4.0.1.tgz", + "integrity": "sha512-LFTZZrBlrCrGCG07/dm1aCjjpL1z9L3+5aEeI9SBhAqSc+kiA9Or1bgZhQFNppJX6h/f5McrvJt1mQXTFm6Qrw==", + "dev": true, + "requires": { + "is-ssh": "^1.3.0", + "parse-url": "^5.0.0" + } + }, + "git-url-parse": { + "version": "11.1.2", + "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-11.1.2.tgz", + "integrity": "sha512-gZeLVGY8QVKMIkckncX+iCq2/L8PlwncvDFKiWkBn9EtCfYDbliRTTp6qzyQ1VMdITUfq7293zDzfpjdiGASSQ==", + "dev": true, + "requires": { + "git-up": "^4.0.0" + } + }, + "gitconfiglocal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", + "integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=", + "dev": true, + "requires": { + "ini": "^1.3.2" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "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" + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "glob-to-regexp": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", + "dev": true + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "globby": { + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", + "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==", + "dev": true, + "requires": { + "@types/glob": "^7.1.1", + "array-union": "^1.0.2", + "dir-glob": "^2.2.2", + "fast-glob": "^2.2.6", + "glob": "^7.1.3", + "ignore": "^4.0.3", + "pify": "^4.0.1", + "slash": "^2.0.0" + } + }, + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "dev": true + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "handlebars": { + "version": "4.7.6", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", + "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", + "dev": true, + "requires": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "dev": true, + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + } + }, + "has": { + "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.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hasha": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.0.tgz", + "integrity": "sha512-2W+jKdQbAdSIrggA8Q35Br8qKadTrqCTC8+XZvBWepKDK6m9XkX6Iz1a2yh2KP01kzAR/dpuMeUnocoLYDcskw==", + "dev": true, + "requires": { + "is-stream": "^2.0.0", + "type-fest": "^0.8.0" + }, + "dependencies": { + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "hosted-git-info": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "dev": true + }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "http-cache-semantics": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz", + "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==", + "dev": true + }, + "http-proxy-agent": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", + "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", + "dev": true, + "requires": { + "agent-base": "4", + "debug": "3.1.0" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "https-proxy-agent": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", + "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", + "dev": true, + "requires": { + "agent-base": "^4.3.0", + "debug": "^3.1.0" + } + }, + "humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", + "dev": true, + "requires": { + "ms": "^2.0.0" + } + }, + "husky": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/husky/-/husky-4.2.5.tgz", + "integrity": "sha512-SYZ95AjKcX7goYVZtVZF2i6XiZcHknw50iXvY7b0MiGoj5RwdgRQNEHdb+gPDPCXKlzwrybjFjkL6FOj8uRhZQ==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "ci-info": "^2.0.0", + "compare-versions": "^3.6.0", + "cosmiconfig": "^6.0.0", + "find-versions": "^3.2.0", + "opencollective-postinstall": "^2.0.2", + "pkg-dir": "^4.2.0", + "please-upgrade-node": "^3.2.0", + "slash": "^3.0.0", + "which-pm-runs": "^1.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", + "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "cosmiconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", + "dev": true, + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "parse-json": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", + "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1", + "lines-and-columns": "^1.1.6" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "ignore-walk": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz", + "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", + "dev": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "import-fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "dev": true, + "requires": { + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + } + } + }, + "import-local": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", + "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "dev": true, + "requires": { + "pkg-dir": "^3.0.0", + "resolve-cwd": "^2.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, + "infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "init-package-json": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.10.3.tgz", + "integrity": "sha512-zKSiXKhQveNteyhcj1CoOP8tqp1QuxPIPBl8Bid99DGLFqA1p87M6lNgfjJHSBoWJJlidGOv5rWjyYKEB3g2Jw==", + "dev": true, + "requires": { + "glob": "^7.1.1", + "npm-package-arg": "^4.0.0 || ^5.0.0 || ^6.0.0", + "promzard": "^0.3.0", + "read": "~1.0.1", + "read-package-json": "1 || 2", + "semver": "2.x || 3.x || 4 || 5", + "validate-npm-package-license": "^3.0.1", + "validate-npm-package-name": "^3.0.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "inquirer": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", + "dev": true, + "requires": { + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^2.0.0", + "lodash": "^4.17.12", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" + }, + "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 + }, + "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 + }, + "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" + } + } + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + } + } + } + } + }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", + "dev": true + }, + "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-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true + }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "requires": { + "ci-info": "^2.0.0" + } + }, + "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-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "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" + }, + "dependencies": { + "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 + } + } + }, + "is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", + "dev": true + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "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-finite": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", + "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-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" + } + } + } + }, + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "dev": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-ssh": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.3.1.tgz", + "integrity": "sha512-0eRIASHZt1E68/ixClI8bp2YK2wmBPVWEismTs6M+M099jKgrzl/3E976zIbImSIob48N2/XGe9y7ZiYdImSlg==", + "dev": true, + "requires": { + "protocols": "^1.1.0" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-text-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", + "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", + "dev": true, + "requires": { + "text-extensions": "^1.0.0" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true + }, + "istanbul-lib-hook": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", + "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", + "dev": true, + "requires": { + "append-transform": "^2.0.0" + } + }, + "istanbul-lib-instrument": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.1.tgz", + "integrity": "sha512-imIchxnodll7pvQBYOqUu88EufLCU56LMeFPZZM/fJZ1irYcYdqroaV+ACK1Ila8ls09iEYArp+nqyC6lW1Vfg==", + "dev": true, + "requires": { + "@babel/core": "^7.7.5", + "@babel/parser": "^7.7.5", + "@babel/template": "^7.7.4", + "@babel/traverse": "^7.7.4", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + } + }, + "istanbul-lib-processinfo": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", + "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", + "dev": true, + "requires": { + "archy": "^1.0.0", + "cross-spawn": "^7.0.0", + "istanbul-lib-coverage": "^3.0.0-alpha.1", + "make-dir": "^3.0.0", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "uuid": "^3.3.3" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz", + "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "make-dir": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz", + "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "make-dir": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz", + "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "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" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "istanbul-reports": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json5": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "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==", + "dev": true + }, + "lerna": { + "version": "3.20.2", + "resolved": "https://registry.npmjs.org/lerna/-/lerna-3.20.2.tgz", + "integrity": "sha512-bjdL7hPLpU3Y8CBnw/1ys3ynQMUjiK6l9iDWnEGwFtDy48Xh5JboR9ZJwmKGCz9A/sarVVIGwf1tlRNKUG9etA==", + "dev": true, + "requires": { + "@lerna/add": "3.20.0", + "@lerna/bootstrap": "3.20.0", + "@lerna/changed": "3.20.0", + "@lerna/clean": "3.20.0", + "@lerna/cli": "3.18.5", + "@lerna/create": "3.18.5", + "@lerna/diff": "3.18.5", + "@lerna/exec": "3.20.0", + "@lerna/import": "3.18.5", + "@lerna/info": "3.20.0", + "@lerna/init": "3.18.5", + "@lerna/link": "3.18.5", + "@lerna/list": "3.20.0", + "@lerna/publish": "3.20.2", + "@lerna/run": "3.20.0", + "@lerna/version": "3.20.2", + "import-local": "^2.0.0", + "npmlog": "^4.1.2" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, + "load-json-file": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", + "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.15", + "parse-json": "^4.0.0", + "pify": "^4.0.1", + "strip-bom": "^3.0.0", + "type-fest": "^0.3.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", + "dev": true + }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "dev": true + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "lodash.ismatch": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", + "integrity": "sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=", + "dev": true + }, + "lodash.set": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", + "integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=", + "dev": true + }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", + "dev": true + }, + "lodash.template": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", + "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0", + "lodash.templatesettings": "^4.0.0" + } + }, + "lodash.templatesettings": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", + "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", + "dev": true, + "requires": { + "lodash._reinterpolate": "^3.0.0" + } + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2" + } + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "macos-release": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.3.0.tgz", + "integrity": "sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA==", + "dev": true + }, + "make-dir": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, + "requires": { + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } + } + }, + "make-fetch-happen": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-5.0.2.tgz", + "integrity": "sha512-07JHC0r1ykIoruKO8ifMXu+xEU8qOXDFETylktdug6vJDACnP+HKevOu3PXyNPzFyTSlz8vrBYlBO1JZRe8Cag==", + "dev": true, + "requires": { + "agentkeepalive": "^3.4.1", + "cacache": "^12.0.0", + "http-cache-semantics": "^3.8.1", + "http-proxy-agent": "^2.1.0", + "https-proxy-agent": "^2.2.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "node-fetch-npm": "^2.0.2", + "promise-retry": "^1.1.1", + "socks-proxy-agent": "^4.0.0", + "ssri": "^6.0.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", + "dev": true + }, + "meow": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", + "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0", + "yargs-parser": "^10.0.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 + }, + "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" + } + } + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "merge2": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz", + "integrity": "sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==", + "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" + } + }, + "mime-db": { + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", + "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==", + "dev": true + }, + "mime-types": { + "version": "2.1.26", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", + "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", + "dev": true, + "requires": { + "mime-db": "1.43.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "minimist-options": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", + "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0" + } + }, + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "dev": true, + "requires": { + "minipass": "^2.9.0" + } + }, + "mississippi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^3.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "mkdirp-promise": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", + "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", + "dev": true, + "requires": { + "mkdirp": "*" + } + }, + "mocha": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.1.tgz", + "integrity": "sha512-3qQsu3ijNS3GkWcccT5Zw0hf/rWvu1fTN9sPvEd81hlwsr30GX2GcDSSoBxo24IR8FelmrAydGC6/1J5QQP4WA==", + "dev": true, + "requires": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "chokidar": "3.3.0", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "3.0.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.3", + "ms": "2.1.1", + "node-environment-flags": "1.0.6", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "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" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "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" + } + }, + "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 + }, + "mkdirp": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz", + "integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "modify-values": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", + "integrity": "sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==", "dev": true }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, + "mri": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.5.tgz", + "integrity": "sha512-d2RKzMD4JNyHMbnbWnznPaa8vbdlq/4pNZ3IgdaGrVbBhebBsGUUE/6qorTMYNS6TwuH3ilfOlD2bf4Igh8CKg==", + "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==", + "dev": true + }, + "multimatch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-3.0.0.tgz", + "integrity": "sha512-22foS/gqQfANZ3o+W7ST2x25ueHDVNWl/b9OlGcLpy/iKxjCpvcNCM51YCenUi7Mt/jAjjqv8JwZRs8YP5sRjA==", + "dev": true, + "requires": { + "array-differ": "^2.0.3", + "array-union": "^1.0.2", + "arrify": "^1.0.1", + "minimatch": "^3.0.4" + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "requires": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node-environment-flags": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", + "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", + "dev": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "node-fetch": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==", + "dev": true + }, + "node-fetch-npm": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz", + "integrity": "sha512-iOuIQDWDyjhv9qSDrj9aq/klt6F9z1p2otB3AV7v3zBDcL/x+OfGsvGQZZCcMZbUf4Ujw1xGNQkjvGnVT22cKg==", + "dev": true, + "requires": { + "encoding": "^0.1.11", + "json-parse-better-errors": "^1.0.0", + "safe-buffer": "^5.1.1" + } + }, + "node-gyp": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-5.1.0.tgz", + "integrity": "sha512-OUTryc5bt/P8zVgNUmC6xdXiDJxLMAW8cF5tLQOT9E5sOQj+UeQxnnPy74K3CLCa/SOjjBlbuzDLR8ANwA+wmw==", + "dev": true, + "requires": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.2", + "mkdirp": "^0.5.1", + "nopt": "^4.0.1", + "npmlog": "^4.1.2", + "request": "^2.88.0", + "rimraf": "^2.6.3", + "semver": "^5.7.1", + "tar": "^4.4.12", + "which": "^1.3.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "node-preload": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", + "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", + "dev": true, + "requires": { + "process-on-spawn": "^1.0.0" + } + }, + "nopt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "dev": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "normalize-url": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", + "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==", + "dev": true + }, + "npm-bundled": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz", + "integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==", + "dev": true, + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-lifecycle": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/npm-lifecycle/-/npm-lifecycle-3.1.5.tgz", + "integrity": "sha512-lDLVkjfZmvmfvpvBzA4vzee9cn+Me4orq0QF8glbswJVEbIcSNWib7qGOffolysc3teCqbbPZZkzbr3GQZTL1g==", + "dev": true, + "requires": { + "byline": "^5.0.0", + "graceful-fs": "^4.1.15", + "node-gyp": "^5.0.2", + "resolve-from": "^4.0.0", + "slide": "^1.1.6", + "uid-number": "0.0.6", + "umask": "^1.1.0", + "which": "^1.3.1" + } + }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "dev": true + }, + "npm-package-arg": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", + "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", + "dev": true, + "requires": { + "hosted-git-info": "^2.7.1", + "osenv": "^0.1.5", + "semver": "^5.6.0", + "validate-npm-package-name": "^3.0.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "npm-packlist": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz", + "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", + "dev": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1", + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-pick-manifest": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-3.0.2.tgz", + "integrity": "sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1", + "npm-package-arg": "^6.0.0", + "semver": "^5.4.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~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 + }, + "nyc": { + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.0.1.tgz", + "integrity": "sha512-n0MBXYBYRqa67IVt62qW1r/d9UH/Qtr7SF1w/nQLJ9KxvWF6b2xCHImRAixHN9tnMMYHC2P14uo6KddNGwMgGg==", "dev": true, "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "caching-transform": "^4.0.0", + "convert-source-map": "^1.7.0", + "decamelize": "^1.2.0", + "find-cache-dir": "^3.2.0", + "find-up": "^4.1.0", + "foreground-child": "^2.0.0", + "glob": "^7.1.6", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-hook": "^3.0.0", + "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-processinfo": "^2.0.2", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "make-dir": "^3.0.0", + "node-preload": "^0.2.1", + "p-map": "^3.0.0", + "process-on-spawn": "^1.0.0", + "resolve-from": "^5.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "spawn-wrap": "^2.0.0", + "test-exclude": "^6.0.0", + "yargs": "^15.0.2" }, "dependencies": { "ansi-regex": { @@ -613,6 +6553,17 @@ "color-convert": "^2.0.1" } }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -622,18 +6573,91 @@ "color-name": "~1.1.4" } }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "make-dir": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz", + "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, "string-width": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", @@ -664,1728 +6688,2116 @@ "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } + }, + "yargs": { + "version": "15.3.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz", + "integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.1" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "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=", + "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 }, - "codecov": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/codecov/-/codecov-3.6.5.tgz", - "integrity": "sha512-v48WuDMUug6JXwmmfsMzhCHRnhUf8O3duqXvltaYJKrO1OekZWpB/eH6iIoaxMl8Qli0+u3OxptdsBOYiD7VAQ==", - "dev": true, - "requires": { - "argv": "0.0.2", - "ignore-walk": "3.0.3", - "js-yaml": "3.13.1", - "teeny-request": "6.0.1", - "urlgrey": "0.4.4" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "dev": true, "requires": { - "color-name": "1.1.3" + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "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" + } + }, + "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" + } + } } }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", "dev": true }, - "commander": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", - "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true }, - "commondir": { + "object-visit": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } }, - "convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "object.getownpropertydescriptors": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", + "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", "dev": true, "requires": { - "safe-buffer": "~5.1.1" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" } }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "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": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "isobject": "^3.0.1" } }, - "debounce": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.0.tgz", - "integrity": "sha512-mYtLl1xfZLi1m4RtQYlZgJUNQjl4ZxVnHzIR8nLLgi4q1YT8o/WM+MK/f8yfcc9s5Ir5zRaPZyZU6xs1Syoocg==", + "octokit-pagination-methods": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz", + "integrity": "sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ==", "dev": true }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "dev": true, "requires": { - "ms": "2.0.0" + "mimic-fn": "^1.0.0" } }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "opencollective-postinstall": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz", + "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==", "dev": true }, - "default-require-extensions": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", - "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, "requires": { - "strip-bom": "^4.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true - } + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" } }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, - "duplexer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", - "dev": true + "os-name": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz", + "integrity": "sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg==", + "dev": true, + "requires": { + "macos-release": "^2.2.0", + "windows-release": "^3.1.0" + } }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, - "error-ex": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", - "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, "requires": { - "is-arrayish": "^0.2.1" + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" } }, - "es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", "dev": true }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", "dev": true }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "p-map-series": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-map-series/-/p-map-series-1.0.0.tgz", + "integrity": "sha1-v5j+V1cFZYqeE1G++4WuTB8Hvco=", + "dev": true, + "requires": { + "p-reduce": "^1.0.0" + } + }, + "p-pipe": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-pipe/-/p-pipe-1.2.0.tgz", + "integrity": "sha1-SxoROZoRUgpneQ7loMHViB1r7+k=", "dev": true }, - "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "p-queue": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-4.0.0.tgz", + "integrity": "sha512-3cRXXn3/O0o3+eVmUroJPSj/esxoEFIm0ZOno/T+NzG/VZgPOqQ8WKmlNqubSEpZmCIngEy34unkHGg83ZIBmg==", "dev": true, "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" + "eventemitter3": "^3.1.0" } }, - "find-index": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", - "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=", + "p-reduce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz", + "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", "dev": true }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "p-waterfall": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-waterfall/-/p-waterfall-1.0.0.tgz", + "integrity": "sha1-ftlLPOszMngjU69qrhGqn8I1uwA=", "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "p-reduce": "^1.0.0" } }, - "foreground-child": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "package-hash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", + "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", "dev": true, "requires": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - }, - "dependencies": { - "cross-spawn": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz", - "integrity": "sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } + "graceful-fs": "^4.1.15", + "hasha": "^5.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" } }, - "fromentries": { + "parallel-transform": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.2.0.tgz", - "integrity": "sha512-33X7H/wdfO99GdRLLgkjUrD4geAFdq/Uv0kl3HD4da6HDixd2GUg8Mw7dahLCV9r/EARkmtYBB6Tch4EEokFTQ==", - "dev": true + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", + "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", + "dev": true, + "requires": { + "cyclist": "^1.0.1", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "callsites": "^3.0.0" }, "dependencies": { - "graceful-fs": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true } } }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "gensync": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", - "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", + "parse-github-repo-url": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz", + "integrity": "sha1-nn2LslKmy2ukJZUGC3v23z28H1A=", "dev": true }, - "get-caller-file": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", - "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", - "dev": true + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "parse-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-4.0.1.tgz", + "integrity": "sha512-d7yhga0Oc+PwNXDvQ0Jv1BuWkLVPXcAoQ/WREgd6vNNoKYaW52KI+RdOFjI63wjkmps9yUE8VS4veP+AgpQ/hA==", "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" + "is-ssh": "^1.3.0", + "protocols": "^1.4.0" } }, - "glob2base": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", - "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", + "parse-url": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-5.0.1.tgz", + "integrity": "sha512-flNUPP27r3vJpROi0/R3/2efgKkyXqnXwyP1KQ2U0SfFRgdizOdWfvrrvJg1LuOoxs7GQhmxJlq23IpQ/BkByg==", "dev": true, "requires": { - "find-index": "^0.1.1" + "is-ssh": "^1.3.0", + "normalize-url": "^3.3.0", + "parse-path": "^4.0.0", + "protocols": "^1.4.0" } }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", "dev": true }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", "dev": true }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true }, - "handlebars": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz", - "integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==", + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "dev": true, "requires": { - "neo-async": "^2.6.0", - "optimist": "^0.6.1", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4" + "pify": "^3.0.0" }, "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true } } }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true + }, + "pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "pinkie": "^2.0.0" } }, - "has-flag": { + "pkg-dir": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } }, - "hasha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.0.tgz", - "integrity": "sha512-2W+jKdQbAdSIrggA8Q35Br8qKadTrqCTC8+XZvBWepKDK6m9XkX6Iz1a2yh2KP01kzAR/dpuMeUnocoLYDcskw==", + "please-upgrade-node": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", + "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", "dev": true, "requires": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" + "semver-compare": "^1.0.0" } }, - "he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", "dev": true }, - "highlight.js": { - "version": "9.16.2", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.16.2.tgz", - "integrity": "sha512-feMUrVLZvjy0oC7FVJQcSQRqbBq9kwqnYE4+Kj9ZjbHh3g+BisiPgF49NyQbVLNdrL/qqZr3Ca9yOKwgn2i/tw==", + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, - "hosted-git-info": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", - "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", + "prettier": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.4.tgz", + "integrity": "sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w==", "dev": true }, - "html-escaper": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.1.tgz", - "integrity": "sha512-hNX23TjWwD3q56HpWjUHOKj1+4KKlnjv9PcmBUYKVpga+2cnb9nDx/B1o0yO4n+RZXZdiNxzx6B24C9aNMTkkQ==", - "dev": true + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } }, - "http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "pretty-quick": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-2.0.1.tgz", + "integrity": "sha512-y7bJt77XadjUr+P1uKqZxFWLddvj3SKY6EU4BuQtMxmmEFSMpbN132pUWdSG1g1mtUfO0noBvn7wBf0BVeomHg==", "dev": true, "requires": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" + "chalk": "^2.4.2", + "execa": "^2.1.0", + "find-up": "^4.1.0", + "ignore": "^5.1.4", + "mri": "^1.1.4", + "multimatch": "^4.0.0" }, "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "array-differ": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", + "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", + "dev": true + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "arrify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", + "dev": true + }, + "cross-spawn": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz", + "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==", "dev": true, "requires": { - "ms": "^2.1.1" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "execa": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-2.1.0.tgz", + "integrity": "sha512-Y/URAVapfbYy2Xp/gb6A0E7iR8xeqOCXsuuaoMn7A5PzrXUK84E1gyiEfq0wQd/GHA6GsoHWwhNq8anb0mleIw==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^3.0.0", + "onetime": "^5.1.0", + "p-finally": "^2.0.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "get-stream": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", + "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "ignore": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", "dev": true - } - } - }, - "https-proxy-agent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz", - "integrity": "sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==", - "dev": true, - "requires": { - "agent-base": "5", - "debug": "4" - }, - "dependencies": { - "agent-base": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-5.1.1.tgz", - "integrity": "sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g==", + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", "dev": true }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "ms": "^2.1.1" + "p-locate": "^4.1.0" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "multimatch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", + "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", + "dev": true, + "requires": { + "@types/minimatch": "^3.0.3", + "array-differ": "^3.0.0", + "array-union": "^2.1.0", + "arrify": "^2.0.1", + "minimatch": "^3.0.4" + } + }, + "npm-run-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-3.1.0.tgz", + "integrity": "sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "onetime": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "p-finally": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", + "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==", + "dev": true + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } } } }, - "ignore-walk": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz", - "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "process-on-spawn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", + "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", + "dev": true, + "requires": { + "fromentries": "^1.2.0" + } + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true + }, + "promise-retry": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-1.1.1.tgz", + "integrity": "sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0=", + "dev": true, + "requires": { + "err-code": "^1.0.0", + "retry": "^0.10.0" + } + }, + "promzard": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/promzard/-/promzard-0.3.0.tgz", + "integrity": "sha1-JqXW7ox97kyxIggwWs+5O6OCqe4=", "dev": true, "requires": { - "minimatch": "^3.0.4" + "read": "1" } }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", "dev": true }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "protocols": { + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/protocols/-/protocols-1.4.7.tgz", + "integrity": "sha512-Fx65lf9/YDn3hUX08XUc0J8rSux36rEsyiv21ZGUC1mOyeM3lTRpZLcrm8aAolzS4itwVfm7TAPyxC2E5zd6xg==", "dev": true }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "protoduck": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.1.tgz", + "integrity": "sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg==", "dev": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "genfun": "^5.0.0" } }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "interpret": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", - "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", "dev": true }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "requires": { - "builtin-modules": "^1.0.0" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, - "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=", + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } } }, - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", "dev": true }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", "dev": true }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "quick-lru": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", + "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", "dev": true }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "read": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", + "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", + "dev": true, + "requires": { + "mute-stream": "~0.0.4" + } }, - "istanbul-lib-coverage": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", - "dev": true + "read-cmd-shim": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz", + "integrity": "sha512-v5yCqQ/7okKoZZkBQUAfTsQ3sVJtXdNfbPnI5cceppoxEVLYA3k+VtV2omkeo8MS94JCy4fSiUwlRBAwCVRPUA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2" + } }, - "istanbul-lib-hook": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", - "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", + "read-package-json": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.1.1.tgz", + "integrity": "sha512-dAiqGtVc/q5doFz6096CcnXhpYk0ZN8dEKVkGLU0CsASt8SrgF6SF7OTKAYubfvFhWaqofl+Y8HK19GR8jwW+A==", "dev": true, "requires": { - "append-transform": "^2.0.0" + "glob": "^7.1.1", + "graceful-fs": "^4.1.2", + "json-parse-better-errors": "^1.0.1", + "normalize-package-data": "^2.0.0", + "npm-normalize-package-bin": "^1.0.0" } }, - "istanbul-lib-instrument": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.1.tgz", - "integrity": "sha512-imIchxnodll7pvQBYOqUu88EufLCU56LMeFPZZM/fJZ1irYcYdqroaV+ACK1Ila8ls09iEYArp+nqyC6lW1Vfg==", + "read-package-tree": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.3.1.tgz", + "integrity": "sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw==", "dev": true, "requires": { - "@babel/core": "^7.7.5", - "@babel/parser": "^7.7.5", - "@babel/template": "^7.7.4", - "@babel/traverse": "^7.7.4", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0", + "util-promisify": "^2.1.0" + } + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" }, "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true } } }, - "istanbul-lib-processinfo": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", - "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", "dev": true, "requires": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.0", - "istanbul-lib-coverage": "^3.0.0-alpha.1", - "make-dir": "^3.0.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^3.3.3" + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" }, "dependencies": { - "cross-spawn": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz", - "integrity": "sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==", + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" + "locate-path": "^2.0.0" } }, - "shebang-command": { + "locate-path": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "requires": { - "shebang-regex": "^3.0.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" } }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "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 + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { - "isexe": "^2.0.0" + "p-limit": "^1.1.0" } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true } } }, - "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "dev": true, "requires": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" }, "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } } } }, - "istanbul-lib-source-maps": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", - "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "readdir-scoped-modules": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz", + "integrity": "sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==", "dev": true, "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "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 - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "graceful-fs": "^4.1.2", + "once": "^1.3.0" + } + }, + "readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "dev": true, + "requires": { + "picomatch": "^2.0.4" + } + }, + "redent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", + "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "dev": true, + "requires": { + "indent-string": "^3.0.0", + "strip-indent": "^2.0.0" + } + }, + "regenerator-runtime": { + "version": "0.13.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", + "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", + "dev": true + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + }, + "release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "dev": true, + "requires": { + "es6-error": "^4.0.1" + } + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, + "requires": { + "is-finite": "^1.0.0" + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "resolve": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", + "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "requires": { + "path-parse": "^1.0.6" } }, - "istanbul-reports": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.0.tgz", - "integrity": "sha512-2osTcC8zcOSUkImzN2EWQta3Vdi4WjjKw99P2yWx5mLnigAM0Rd5uYFn1cf2i/Ois45GkNjaoTqc5CxgMSX80A==", + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", "dev": true, "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" + "resolve-from": "^3.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + } } }, - "jquery": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.1.tgz", - "integrity": "sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw==", + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", "dev": true }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" } }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, - "json5": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.2.tgz", - "integrity": "sha512-MoUOQ4WdiN3yxhm7NEVJSJrieAo5hNSLQ5sj05OTRHPL9HOBy8u4Bu88jsC1jvqAdN+E1bJmsUcZH+1HQxliqQ==", + "retry": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", + "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", + "dev": true + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "dev": true, "requires": { - "minimist": "^1.2.5" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - } + "glob": "^7.1.3" } }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "run-async": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", + "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==", "dev": true, "requires": { - "graceful-fs": "^4.1.6" + "is-promise": "^2.1.0" } }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", "dev": true, "requires": { - "invert-kv": "^1.0.0" + "aproba": "^1.1.1" } }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "rxjs": { + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz", + "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" + "tslib": "^1.9.0" } }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "safe-buffer": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, "requires": { - "p-locate": "^4.1.0" + "ret": "~0.1.10" } }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, - "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } + "semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", + "dev": true }, - "lunr": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.8.tgz", - "integrity": "sha512-oxMeX/Y35PNFuZoHp+jUj5OSEmLCaIH4KTFJh7a93cHBoFmpw2IoPs22VIz7vyO2YUnx2Tn9dzIwO2P/4quIRg==", + "semver-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", + "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==", "dev": true }, - "make-dir": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz", - "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==", + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", "dev": true, "requires": { - "semver": "^6.0.0" + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" }, "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true + "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" + } } } }, - "marked": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", - "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==", - "dev": true + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "shebang-regex": "^1.0.0" } }, - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "shell-quote": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", + "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", + "dev": true + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", "dev": true, "requires": { - "minimist": "0.0.8" + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" }, "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "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 } } }, - "mocha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", - "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", + "slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", + "dev": true + }, + "smart-buffer": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.1.0.tgz", + "integrity": "sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw==", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "dev": true, "requires": { - "browser-stdout": "1.3.1", - "commander": "2.15.1", - "debug": "3.1.0", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "glob": "7.1.2", - "growl": "1.10.5", - "he": "1.1.1", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "supports-color": "5.4.0" + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" }, "dependencies": { - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "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" + "ms": "2.0.0" } }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true + "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" + } }, - "supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "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": { - "has-flag": "^3.0.0" + "is-extendable": "^0.1.0" } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true } } }, - "mocha-typescript": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/mocha-typescript/-/mocha-typescript-1.1.14.tgz", - "integrity": "sha512-5wqL0Y+3BOmec/Myc4Eepn1mavI88KbFLFRb3UEveQ3Z8DovepII0S5FO+jYn7H0aQrq9PElxaCwFDO77wbwlQ==", + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "dev": true, "requires": { - "@types/mocha": "*", - "chalk": "^1.1.3", - "cross-spawn": "^5.1.0", - "yargs": "^6.5.0" + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" }, "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true + "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" + } }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "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": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "kind-of": "^6.0.0" } }, - "yargs": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", - "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", + "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": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^4.2.0" + "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" } } } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", - "dev": true - }, - "node-fetch": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", - "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==", - "dev": true - }, - "node-preload": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", - "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", - "dev": true, - "requires": { - "process-on-spawn": "^1.0.0" - } - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "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 - }, - "nyc": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.0.0.tgz", - "integrity": "sha512-qcLBlNCKMDVuKb7d1fpxjPR8sHeMVX0CHarXAVzrVWoFrigCkYR8xcrjfXSPi5HXM7EU78L6ywO7w1c5rZNCNg==", + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "dev": true, - "requires": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.0", - "js-yaml": "^3.13.1", - "make-dir": "^3.0.0", - "node-preload": "^0.2.0", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "uuid": "^3.3.3", - "yargs": "^15.0.2" + "requires": { + "kind-of": "^3.2.0" }, "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "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": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "is-buffer": "^1.1.5" } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "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 } } }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "socks": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.3.3.tgz", + "integrity": "sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA==", "dev": true, "requires": { - "wrappy": "1" + "ip": "1.1.5", + "smart-buffer": "^4.1.0" } }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "socks-proxy-agent": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz", + "integrity": "sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg==", "dev": true, "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" + "agent-base": "~4.2.1", + "socks": "~2.3.2" }, "dependencies": { - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true + "agent-base": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", + "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "dev": true, + "requires": { + "es6-promisify": "^5.0.0" + } } } }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "sort-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz", + "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=", "dev": true, "requires": { - "lcid": "^1.0.0" + "is-plain-obj": "^1.0.0" } }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", "dev": true, "requires": { - "p-limit": "^2.2.0" + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" } }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "source-map-support": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", + "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", "dev": true, "requires": { - "aggregate-error": "^3.0.0" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", "dev": true }, - "package-hash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", - "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", + "spawn-wrap": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", + "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", "dev": true, "requires": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" + "foreground-child": "^2.0.0", + "is-windows": "^1.0.2", + "make-dir": "^3.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "which": "^2.0.1" }, "dependencies": { - "graceful-fs": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", - "dev": true + "make-dir": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz", + "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } } } }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", "dev": true, "requires": { - "error-ex": "^1.2.0" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, "requires": { - "pinkie-promise": "^2.0.0" + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" } }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", "dev": true }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true + "split": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "dev": true, + "requires": { + "through": "2" + } }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "split2": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", + "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "through2": "^2.0.2" } }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "ssri": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", "dev": true, "requires": { - "pinkie": "^2.0.0" + "figgy-pudding": "^3.5.1" } }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "dev": true, "requires": { - "find-up": "^4.0.0" + "define-property": "^0.2.5", + "object-copy": "^0.1.0" }, "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "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": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "is-descriptor": "^0.1.0" } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true } } }, - "process-on-spawn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", - "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", + "std-mocks": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/std-mocks/-/std-mocks-1.0.1.tgz", + "integrity": "sha1-0ziIdte+66PHD72OK8r0brB9ef4=", "dev": true, "requires": { - "fromentries": "^1.2.0" + "lodash": "^4.11.1" } }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "stream-each": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", "dev": true }, - "pseudomap": { + "string-width": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true + "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" + } }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "string.prototype.padend": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.0.tgz", + "integrity": "sha512-3aIv8Ffdp8EZj8iLwREGpQaUZiPyrWrpzMBHvkiSW/bK/EGve9np07Vwy7IJ5waydpGXzQZu/F8Oze2/IWkBaA==", "dev": true, "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" } }, - "read-pkg-up": { + "string.prototype.trimend": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", "dev": true, "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" } }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "string.prototype.trimleft": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", + "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", "dev": true, "requires": { - "resolve": "^1.1.6" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimstart": "^1.0.0" } }, - "release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "string.prototype.trimright": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", + "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", "dev": true, "requires": { - "es6-error": "^4.0.1" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimend": "^1.0.0" } }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { + "string.prototype.trimstart": { "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 - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", "dev": true, "requires": { - "glob": "^7.1.3" + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" } }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "ansi-regex": "^2.0.0" } }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true }, - "shell-quote": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", - "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, - "shelljs": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", - "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", "dev": true }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true }, - "source-map-support": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz", - "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", + "strong-log-transformer": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz", + "integrity": "sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA==", "dev": true, "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } + "duplexer": "^0.1.1", + "minimist": "^1.2.0", + "through": "^2.3.4" } }, - "spawn-wrap": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", - "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", "dev": true, "requires": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" }, "dependencies": { - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "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 + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { - "isexe": "^2.0.0" + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" } } } }, - "spdx-correct": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", + "tar": { + "version": "4.4.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", "dev": true, "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" } }, - "spdx-exceptions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "temp-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz", + "integrity": "sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0=", "dev": true }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "temp-write": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/temp-write/-/temp-write-3.4.0.tgz", + "integrity": "sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI=", "dev": true, "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "graceful-fs": "^4.1.2", + "is-stream": "^1.1.0", + "make-dir": "^1.0.0", + "pify": "^3.0.0", + "temp-dir": "^1.0.0", + "uuid": "^3.0.1" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, - "spdx-license-ids": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", - "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + } + }, + "text-extensions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", + "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", "dev": true }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, - "std-mocks": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/std-mocks/-/std-mocks-1.0.1.tgz", - "integrity": "sha1-0ziIdte+66PHD72OK8r0brB9ef4=", + "thenify": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz", + "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=", "dev": true, "requires": { - "lodash": "^4.11.1" + "any-promise": "^1.0.0" } }, - "stream-events": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz", - "integrity": "sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg==", + "thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", "dev": true, "requires": { - "stubs": "^3.0.0" + "thenify": ">= 3.1.0 < 4" } }, - "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" - } + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" } }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "is-utf8": "^0.2.0" + "os-tmpdir": "~1.0.2" } }, - "stubs": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stubs/-/stubs-3.0.0.tgz", - "integrity": "sha1-6NK6H6nJBXAwPAMLaQD31fiavls=", + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, - "subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "dev": true, "requires": { - "minimist": "^1.1.0" + "kind-of": "^3.0.2" }, "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true + "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" + } } } }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" } }, - "teeny-request": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/teeny-request/-/teeny-request-6.0.1.tgz", - "integrity": "sha512-TAK0c9a00ELOqLrZ49cFxvPVogMUFaWY8dUsQc/0CuQPGF+BOxOQzXfE413BAk2kLomwNplvdtMpeaeGWmoc2g==", + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "dev": true, "requires": { - "http-proxy-agent": "^4.0.0", - "https-proxy-agent": "^4.0.0", - "node-fetch": "^2.2.0", - "stream-events": "^1.0.5", - "uuid": "^3.3.2" + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" } }, - "test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "dev": true, "requires": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" + "psl": "^1.1.28", + "punycode": "^2.1.1" } }, - "to-fast-properties": { + "tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "trim-newlines": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", + "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", "dev": true }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "trim-off-newlines": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz", + "integrity": "sha1-n5up2e+odkw4dpi8v+sshI8RrbM=", "dev": true }, + "tslib": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", + "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==" + }, "tslint": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.11.0.tgz", - "integrity": "sha1-mPMMAurjzecAYgHkwzywi0hYHu0=", - "dev": true, + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.1.tgz", + "integrity": "sha512-kd6AQ/IgPRpLn6g5TozqzPdGNZ0q0jtXW4//hRcj10qLYBaa3mTUU2y2MCG+RXZm8Zx+KZi0eA+YCrMyNlF4UA==", "requires": { - "babel-code-frame": "^6.22.0", + "@babel/code-frame": "^7.0.0", "builtin-modules": "^1.1.1", "chalk": "^2.3.0", "commander": "^2.12.1", - "diff": "^3.2.0", + "diff": "^4.0.1", "glob": "^7.1.1", - "js-yaml": "^3.7.0", + "js-yaml": "^3.13.1", "minimatch": "^3.0.4", + "mkdirp": "^0.5.3", "resolve": "^1.3.2", "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.27.2" + "tslib": "^1.10.0", + "tsutils": "^2.29.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "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" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", - "dev": true, - "requires": { - "path-parse": "^1.0.5" - } + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" }, - "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" - } + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" } } }, @@ -2393,288 +8805,618 @@ "version": "2.29.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "requires": { + "tslib": "^1.8.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-fest": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", + "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "typescript": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz", + "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==", + "dev": true + }, + "uglify-js": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.9.0.tgz", + "integrity": "sha512-j5wNQBWaql8gr06dOUrfaohHlscboQZ9B8sNsoK5o4sBjm7Ht9dxSbrMXyktQpA16Acaij8AcoozteaPYZON0g==", "dev": true, + "optional": true, "requires": { - "tslib": "^1.8.1" + "commander": "~2.20.3" } }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "uid-number": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", + "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=", "dev": true }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "umask": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/umask/-/umask-1.1.0.tgz", + "integrity": "sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0=", + "dev": true + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", "dev": true, "requires": { - "is-typedarray": "^1.0.0" + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" } }, - "typedoc": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.15.2.tgz", - "integrity": "sha512-K2nFEtyDQTVdXOzYtECw3TwuT3lM91Zc0dzGSLuor5R8qzZbwqBoCw7xYGVBow6+mEZAvKGznLFsl7FzG+wAgQ==", + "unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", "dev": true, "requires": { - "@types/minimatch": "3.0.3", - "fs-extra": "^8.1.0", - "handlebars": "^4.5.1", - "highlight.js": "^9.16.2", - "lodash": "^4.17.15", - "marked": "^0.7.0", - "minimatch": "^3.0.0", - "progress": "^2.0.3", - "shelljs": "^0.8.3", - "typedoc-default-themes": "^0.6.1", - "typescript": "3.7.x" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, - "typescript": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.2.tgz", - "integrity": "sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ==", - "dev": true - } + "unique-slug": "^2.0.0" } }, - "typedoc-default-themes": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.6.1.tgz", - "integrity": "sha512-z5AWKqQDz7igl9WkUuafx8cEm4MPVQGMpbWE+3lwVOaq+U4UoLKBMnpFQWh/4fqQ3bGysXpOstMxy2OOzHezyw==", + "unique-slug": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", "dev": true, "requires": { - "backbone": "^1.4.0", - "jquery": "^3.4.1", - "lunr": "^2.3.8", - "underscore": "^1.9.1" + "imurmurhash": "^0.1.4" } }, - "typescript": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.8.3.tgz", - "integrity": "sha512-K7g15Bb6Ra4lKf7Iq2l/I5/En+hLIHmxWZGq3D4DIRNFxMNV6j2SHSvDOqs2tGd4UvD/fJvrwopzQXjLrT7Itw==", + "universal-user-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.1.tgz", + "integrity": "sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg==", + "dev": true, + "requires": { + "os-name": "^3.1.0" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, - "uglify-js": { - "version": "3.6.9", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.9.tgz", - "integrity": "sha512-pcnnhaoG6RtrvHJ1dFncAe8Od6Nuy30oaJ82ts6//sGSXOP5UjBMEthiProjXmMNHOfd93sqlkztifFMcb+4yw==", + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "dev": true, - "optional": true, "requires": { - "commander": "~2.20.3", - "source-map": "~0.6.1" + "has-value": "^0.3.1", + "isobject": "^3.0.0" }, "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "dev": true, - "optional": true + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true } } }, - "underscore": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==", + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", "dev": true }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "dev": true }, - "urlgrey": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/urlgrey/-/urlgrey-0.4.4.tgz", - "integrity": "sha1-iS/pWWCAXoVRnxzUOJ8stMu3ZS8=", + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, + "util-promisify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/util-promisify/-/util-promisify-2.1.0.tgz", + "integrity": "sha1-PCI2R2xNMsX/PEcAKt18E7moKlM=", + "dev": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3" + } + }, "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "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.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", + "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", "dev": true }, "validate-npm-package-license": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", - "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "requires": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, + "validate-npm-package-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", + "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", + "dev": true, + "requires": { + "builtins": "^1.0.3" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "dev": true, + "requires": { + "defaults": "^1.0.3" + } + }, + "webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true + }, + "whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, "which": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", - "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { "isexe": "^2.0.0" } }, "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "which-pm-runs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", + "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "windows-release": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.3.0.tgz", + "integrity": "sha512-2HetyTg1Y+R+rUgrKeUEhAG/ZuOmTrI1NBb3ZyAGQMYmOJjBBPe4MTodghRkmLJZHwkuPi02anbeGP+Zf401LQ==", + "dev": true, + "requires": { + "execa": "^1.0.0" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "wordwrap": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", "dev": true }, "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "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 + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } } }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } }, "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", + "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", "dev": true, "requires": { + "graceful-fs": "^4.1.11", "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "signal-exit": "^3.0.2" + } + }, + "write-json-file": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-3.2.0.tgz", + "integrity": "sha512-3xZqT7Byc2uORAatYiP3DHUUAVEkNOswEWNs9H5KXiicRTvzYzYqKjYc4G7p+8pltvAw641lVByKVtMpf+4sYQ==", + "dev": true, + "requires": { + "detect-indent": "^5.0.0", + "graceful-fs": "^4.1.15", + "make-dir": "^2.1.0", + "pify": "^4.0.1", + "sort-keys": "^2.0.0", + "write-file-atomic": "^2.4.2" + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "write-pkg": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/write-pkg/-/write-pkg-3.2.0.tgz", + "integrity": "sha512-tX2ifZ0YqEFOF1wjRW2Pk93NLsj02+n1UP5RvO6rCs0K6R2g1padvf006cY74PQJKMGS2r42NK7FD0dG6Y6paw==", + "dev": true, + "requires": { + "sort-keys": "^2.0.0", + "write-json-file": "^2.2.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "write-json-file": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-2.3.0.tgz", + "integrity": "sha1-K2TIozAE1UuGmMdtWFp3zrYdoy8=", + "dev": true, + "requires": { + "detect-indent": "^5.0.0", + "graceful-fs": "^4.1.2", + "make-dir": "^1.0.0", + "pify": "^3.0.0", + "sort-keys": "^2.0.0", + "write-file-atomic": "^2.0.0" + } + } } }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true }, "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, + "yaml": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.9.1.tgz", + "integrity": "sha512-xbWX1ayUVoW8DPM8qxOBowac4XxSTi0mFLbiokRq880ViYglN+F3nJ4Dc2GdypXpykrknKS39d8I3lzFoHv1kA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.9.2" + } + }, "yargs": { - "version": "15.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz", - "integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==", + "version": "14.2.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz", + "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==", "dev": true, "requires": { - "cliui": "^6.0.0", + "cliui": "^5.0.0", "decamelize": "^1.2.0", - "find-up": "^4.1.0", + "find-up": "^3.0.0", "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^4.2.0", + "string-width": "^3.0.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^18.1.1" + "yargs-parser": "^15.0.1" }, "dependencies": { "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "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 + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" } }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "yargs-parser": { + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz", + "integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "dev": true, + "requires": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "require-main-filename": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" } }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^4.1.0" } }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } }, "yargs-parser": { - "version": "18.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.1.tgz", - "integrity": "sha512-KRHEsOM16IX7XuLnMOqImcPNbLVXMNHYAoFc3BKR8Ortl5gzDbtXvvEoGx9imk5E+X1VeNKNlcHr8B8vi+7ipA==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -2682,23 +9424,6 @@ } } } - }, - "yargs-parser": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", - "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", - "dev": true, - "requires": { - "camelcase": "^3.0.0" - }, - "dependencies": { - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - } - } } } } diff --git a/package.json b/package.json index ba00f826..73e83f8a 100644 --- a/package.json +++ b/package.json @@ -5,52 +5,25 @@ "private": true, "main": "index.js", "scripts": { - "prepare": "npm run buildtool && npm link antlr4ts-cli && npm run antlr4ts && npm run tsc && npm link target/src && npm run buildrts", - "unlink": "npm unlink antlr4ts && npm unlink target/src && npm unlink antlr4ts-cli && npm run unlinkruntime && npm run unlinktool", - "unlinkruntime": "cd target/src && npm unlink", - "buildtool": "cd tool && npm link -force", - "unlinktool": "cd tool && npm unlink", - "clean": "npm run unlink && git clean -idx", - "antlr4ts": "npm run antlr4ts-runtime-xpath && npm run antlr4ts-test-runtime && npm run antlr4ts-test-labels && npm run antlr4ts-test-pattern && npm run antlr4ts-test-rewriter && npm run antlr4ts-test-xpath && npm run antlr4ts-benchmark", - "antlr4ts-runtime-xpath": "cd src/tree/xpath && antlr4ts XPathLexer.g4 -DbaseImportPath=../..", - "antlr4ts-test-runtime": "cd test/runtime && antlr4ts TestGrammar.g4 -DbaseImportPath=../../../../src -o gen/typescript_only", - "antlr4ts-test-labels": "cd test/runtime/TestReferenceToListLabels && antlr4ts T.g4 -no-listener -DbaseImportPath=antlr4ts -o gen", - "antlr4ts-test-pattern": "cd test/tool && antlr4ts ParseTreeMatcherX1.g4 ParseTreeMatcherX2.g4 ParseTreeMatcherX3.g4 ParseTreeMatcherX4.g4 ParseTreeMatcherX5.g4 ParseTreeMatcherX6.g4 ParseTreeMatcherX7.g4 ParseTreeMatcherX8.g4 -no-listener -DbaseImportPath=../../../../src -o gen/matcher", - "antlr4ts-test-rewriter": "cd test/tool && antlr4ts RewriterLexer1.g4 RewriterLexer2.g4 RewriterLexer3.g4 -DbaseImportPath=../../../../src -o gen/rewriter", - "antlr4ts-test-xpath": "cd test/tool && antlr4ts TestXPath.g4 -no-listener -DbaseImportPath=../../../../src -o gen/xpath", - "antlr4ts-benchmark": "npm run antlr4ts-benchmark-graphemes && npm run antlr4ts-benchmark-std && npm run antlr4ts-benchmark-std-atn && npm run antlr4ts-benchmark-lr && npm run antlr4ts-benchmark-lr-atn", - "antlr4ts-benchmark-graphemes": "cd benchmark && antlr4ts -visitor Graphemes.g4 -DbaseImportPath=../../src -o gen", - "antlr4ts-benchmark-std": "cd benchmark && antlr4ts -visitor Java.g4 -DbaseImportPath=../../../src -o gen/std", - "antlr4ts-benchmark-std-atn": "cd benchmark && antlr4ts -visitor -Xforce-atn Java.g4 -DbaseImportPath=../../../src -o gen/std-atn", - "antlr4ts-benchmark-lr": "cd benchmark && antlr4ts -visitor JavaLR.g4 -DbaseImportPath=../../../src -o gen/lr", - "antlr4ts-benchmark-lr-atn": "cd benchmark && antlr4ts -visitor -Xforce-atn JavaLR.g4 -DbaseImportPath=../../../src -o gen/lr-atn", - "tslint": "npm run tslint-runtime && npm run tslint-tests", - "tslint-runtime": "tslint -p ./tsconfig.json", - "tslint-tests": "tslint -p ./test/runtime/tsconfig.json", - "tsc": "tsc", - "tsc-watch": "tsc -w -p .", - "buildrts": "cd test/runtime && tsc", - "test": "mocha", + "prepare": "lerna bootstrap", + "unlink": "npm uninstall -g antlr4ts antlr4ts-cli", + "antlr": "lerna run antlr --parallel", + "reinstall": "npm run unlink && git clean -idx && npm install", + "lint": "eslint . --ext .ts", + "lint-fix": "eslint . --fix --ext .ts", + "tsc": "tsc --build", + "tsc-watch": "tsc --build --watch", + "test": "run-s tsc mocha", + "mocha": "mocha", "cover": "nyc --reporter=none mocha --timeout=10000", "postcover": "nyc report --reporter=html", - "dev-test-watch": "mocha-typescript-watch", "typedoc": "typedoc --ignoreCompilerErrors --out doc src --name antlr4ts", "prepack": "npm run pack-tool && npm run pack-runtime", "pack-tool": "npm pack ./tool", "copy-runtime-extras": "cpx README.md target/src && cpx LICENSE target/src", "pack-runtime": "npm run copy-runtime-extras && npm pack ./target/src", - "prebenchmark": "npm run antlr4ts-benchmark && tsc", - "benchmark": "npm run benchmark-core", - "benchmark-core": "node target/benchmark/TestPerformance.js", - "prebenchmark-lexer": "npm run antlr4ts-benchmark-graphemes && tsc", - "benchmark-lexer": "npm run benchmark-lexer-core", - "benchmark-lexer-core": "node target/benchmark/TimeLexerSpeed.js", - "preprofile": "npm run antlr4ts-benchmark && tsc", - "profile": "npm run profile-core", - "profile-core": "node --prof target/benchmark/TestPerformance.js", - "preprofile-lexer": "npm run antlr4ts-benchmark-graphemes && tsc", - "profile-lexer": "npm run profile-lexer-core", - "profile-lexer-core": "node --prof target/benchmark/TimeLexerSpeed.js" + "benchmark": "cd benchmark & npm run benchmark", + "profile": "cd benchmark & npm run profile" }, "sideEffects": false, "repository": { @@ -68,20 +41,32 @@ }, "homepage": "https://github.com/tunnelvisionlabs/antlr4ts#readme", "devDependencies": { - "@deboxsoft/cpx": "^1.5.0", - "@types/mocha": "^5.2.0", - "@types/node": "^10.12.10", - "@types/source-map-support": "^0.4.0", + "@types/source-map-support": "^0.5.1", "@types/std-mocks": "^1.0.0", - "codecov": "^3.6.5", - "mocha": "^5.2.0", - "mocha-typescript": "^1.1.14", - "nyc": "^15.0.0", - "source-map-support": "^0.5.6", + "@typescript-eslint/eslint-plugin": "^2.28.0", + "@typescript-eslint/eslint-plugin-tslint": "^2.28.0", + "@typescript-eslint/parser": "^2.28.0", + "eslint": "^6.8.0", + "eslint-plugin-prettier": "^3.1.3", + "husky": "^4.2.5", + "lerna": "^3.20.2", + "mocha": "^7.1.1", + "npm-run-all": "^4.1.5", + "nyc": "^15.0.1", + "prettier": "2.0.4", + "pretty-quick": "^2.0.1", + "source-map-support": "^0.5.16", "std-mocks": "^1.0.1", - "tslint": "^5.11.0", - "typedoc": "^0.15.2", - "typescript": "^2.8.3" + "typescript": "^3.8.3" }, - "dependencies": {} + "dependencies": { + "tslint": "^6.1.1" + }, + "husky": { + "hooks": { + "pre-commit": "npm test", + "pre-push": "npm test", + "...": "..." + } + } } diff --git a/package.old b/package.old new file mode 100644 index 00000000..943e2de7 --- /dev/null +++ b/package.old @@ -0,0 +1,76 @@ +{ + "name": "antlr4ts-root", + "version": "0.5.0-dev", + "description": "Root project for ANTLR 4 runtime for Typescript", + "private": true, + "main": "index.js", + "scripts": { + "prepare": "lerna bootstrap", + "preparexx": "npm run unlink && npm run build-tool && npm run build-runtime && npm run build-benchmark", + "unlink": "npm uninstall -g antlr4ts antlr4ts-cli", + "build-tool": "cd tool && npm install", + "build-runtime": "cd runtime && npm install", + "build-benchmark": "cd benchmark && npm install", + "build-test": "cd test && npm install", + "build-rts": "cd test/runtime && tsc", + "reinstall": "npm run unlink && git clean -idx && npm install", + "tslint": "npm run tslint-runtime && npm run tslint-tests", + "tslint-runtime": "tslint -p ./tsconfig.json", + "tslint-tests": "tslint -p ./test/runtime/tsconfig.json", + "tsc": "echo tsc", + "tsc-watch": "tsc -w -p .", + "test": "mocha", + "cover": "nyc --reporter=none mocha --timeout=10000", + "postcover": "nyc report --reporter=html", + "typedoc": "typedoc --ignoreCompilerErrors --out doc src --name antlr4ts", + "prepack": "npm run pack-tool && npm run pack-runtime", + "pack-tool": "npm pack ./tool", + "copy-runtime-extras": "cpx README.md target/src && cpx LICENSE target/src", + "pack-runtime": "npm run copy-runtime-extras && npm pack ./target/src", + "prebenchmark": "npm run antlr4ts-benchmark && tsc", + "benchmark": "npm run benchmark-core", + "benchmark-core": "node target/benchmark/TestPerformance.js", + "prebenchmark-lexer": "npm run antlr4ts-benchmark-graphemes && tsc", + "benchmark-lexer": "npm run benchmark-lexer-core", + "benchmark-lexer-core": "node target/benchmark/TimeLexerSpeed.js", + "preprofile": "npm run antlr4ts-benchmark && tsc", + "profile": "npm run profile-core", + "profile-core": "node --prof target/benchmark/TestPerformance.js", + "preprofile-lexer": "npm run antlr4ts-benchmark-graphemes && tsc", + "profile-lexer": "npm run profile-lexer-core", + "profile-lexer-core": "node --prof target/benchmark/TimeLexerSpeed.js" + }, + "sideEffects": false, + "repository": { + "type": "git", + "url": "git+https://github.com/tunnelvisionlabs/antlr4ts.git" + }, + "keywords": [ + "ANTLR4", + "typescript" + ], + "author": "Terence Parr, Sam Harwell, and Burt Harris", + "license": "BSD-3-Clause", + "bugs": { + "url": "https://github.com/tunnelvisionlabs/antlr4ts/issues" + }, + "homepage": "https://github.com/tunnelvisionlabs/antlr4ts#readme", + "dependencies": {}, + "devDependencies": { + "@deboxsoft/cpx": "^1.5.0", + "@types/mocha": "^5.2.0", + "@types/node": "^10.12.10", + "@types/source-map-support": "^0.4.0", + "@types/std-mocks": "^1.0.0", + "codecov": "^3.6.5", + "lerna": "^3.20.2", + "mocha": "^5.2.0", + "mocha-typescript": "^1.1.14", + "nyc": "^15.0.0", + "source-map-support": "^0.5.6", + "std-mocks": "^1.0.1", + "tslint": "^5.11.0", + "typedoc": "^0.15.2", + "typescript": "2.8.3" + } +} diff --git a/target/src/.npmignore b/runtime/typescript/.npmignore similarity index 100% rename from target/src/.npmignore rename to runtime/typescript/.npmignore diff --git a/runtime/typescript/package-lock.json b/runtime/typescript/package-lock.json new file mode 100644 index 00000000..b27f143b --- /dev/null +++ b/runtime/typescript/package-lock.json @@ -0,0 +1,2078 @@ +{ + "name": "antlr4ts", + "version": "0.5.0-dev", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.8.3" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", + "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==", + "dev": true + }, + "@babel/highlight": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", + "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.0", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/runtime": { + "version": "7.9.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.2.tgz", + "integrity": "sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true + }, + "@types/eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", + "dev": true + }, + "@types/json-schema": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz", + "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==", + "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/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "dev": true + }, + "@typescript-eslint/eslint-plugin": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.28.0.tgz", + "integrity": "sha512-w0Ugcq2iatloEabQP56BRWJowliXUP5Wv6f9fKzjJmDW81hOTBxRoJ4LoEOxRpz9gcY51Libytd2ba3yLmSOfg==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "2.28.0", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^3.0.0", + "tsutils": "^3.17.1" + }, + "dependencies": { + "tsutils": { + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", + "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/eslint-plugin-tslint": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin-tslint/-/eslint-plugin-tslint-2.28.0.tgz", + "integrity": "sha512-a6cU6aJZa10sK6DybAtOdCV/tU1rWTTurBgYtyJb2DsG3BJwF6vYob9qOKw9n3MjV/F757LGqXz3RNmrvrimww==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "2.28.0", + "lodash": "^4.17.15" + } + }, + "@typescript-eslint/experimental-utils": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.28.0.tgz", + "integrity": "sha512-4SL9OWjvFbHumM/Zh/ZeEjUFxrYKtdCi7At4GyKTbQlrj1HcphIDXlje4Uu4cY+qzszR5NdVin4CCm6AXCjd6w==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/typescript-estree": "2.28.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + } + }, + "@typescript-eslint/parser": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.28.0.tgz", + "integrity": "sha512-RqPybRDquui9d+K86lL7iPqH6Dfp9461oyqvlXMNtap+PyqYbkY5dB7LawQjDzot99fqzvS0ZLZdfe+1Bt3Jgw==", + "dev": true, + "requires": { + "@types/eslint-visitor-keys": "^1.0.0", + "@typescript-eslint/experimental-utils": "2.28.0", + "@typescript-eslint/typescript-estree": "2.28.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.28.0.tgz", + "integrity": "sha512-HDr8MP9wfwkiuqzRVkuM3BeDrOC4cKbO5a6BymZBHUt5y/2pL0BXD6I/C/ceq2IZoHWhcASk+5/zo+dwgu9V8Q==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "eslint-visitor-keys": "^1.1.0", + "glob": "^7.1.6", + "is-glob": "^4.0.1", + "lodash": "^4.17.15", + "semver": "^6.3.0", + "tsutils": "^3.17.1" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "tsutils": { + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", + "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "acorn": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "dev": true + }, + "acorn-jsx": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", + "dev": true + }, + "ajv": { + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.1.tgz", + "integrity": "sha512-AUh2mDlJDAnzSRaKkMHopTD1GKwC1ApUq8oCzdjAOM5tavncgqWU+JoRu5Y3iYY0Q/euiU+1LWp0/O/QY8CcHw==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "opencollective-postinstall": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ansi-escapes": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "dev": true, + "requires": { + "type-fest": "^0.11.0" + }, + "dependencies": { + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + } + } + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "array-differ": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", + "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", + "dev": true + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "arrify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", + "dev": true + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", + "dev": true + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "compare-versions": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz", + "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "cosmiconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", + "dev": true, + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" + }, + "dependencies": { + "parse-json": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", + "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1", + "lines-and-columns": "^1.1.6" + } + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + } + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "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" + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.17.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", + "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.3", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.2", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^7.0.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.3", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "eslint-plugin-prettier": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.3.tgz", + "integrity": "sha512-+HG5jmu/dN3ZV3T6eCD7a4BlAySdN7mLIbJYo0z1cFQuI+r2DiTJEFeF68ots93PsnrMxbzIZ2S/ieX+mkrBeQ==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-scope": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", + "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", + "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "dev": true + }, + "espree": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", + "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "execa": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-2.1.0.tgz", + "integrity": "sha512-Y/URAVapfbYy2Xp/gb6A0E7iR8xeqOCXsuuaoMn7A5PzrXUK84E1gyiEfq0wQd/GHA6GsoHWwhNq8anb0mleIw==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^3.0.0", + "onetime": "^5.1.0", + "p-finally": "^2.0.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz", + "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "fast-deep-equal": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "dev": true + }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "find-versions": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz", + "integrity": "sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==", + "dev": true, + "requires": { + "semver-regex": "^2.0.0" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "get-stream": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", + "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "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" + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "dev": true + }, + "has": { + "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.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "hosted-git-info": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "dev": true + }, + "husky": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/husky/-/husky-4.2.5.tgz", + "integrity": "sha512-SYZ95AjKcX7goYVZtVZF2i6XiZcHknw50iXvY7b0MiGoj5RwdgRQNEHdb+gPDPCXKlzwrybjFjkL6FOj8uRhZQ==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "ci-info": "^2.0.0", + "compare-versions": "^3.6.0", + "cosmiconfig": "^6.0.0", + "find-versions": "^3.2.0", + "opencollective-postinstall": "^2.0.2", + "pkg-dir": "^4.2.0", + "please-upgrade-node": "^3.2.0", + "slash": "^3.0.0", + "which-pm-runs": "^1.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", + "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "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 + }, + "inquirer": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz", + "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^3.0.0", + "cli-cursor": "^3.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.15", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.5.3", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "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": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "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-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", + "dev": true + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "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==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "mkdirp": { + "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": "^1.2.5" + } + }, + "mri": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.5.tgz", + "integrity": "sha512-d2RKzMD4JNyHMbnbWnznPaa8vbdlq/4pNZ3IgdaGrVbBhebBsGUUE/6qorTMYNS6TwuH3ilfOlD2bf4Igh8CKg==", + "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==", + "dev": true + }, + "multimatch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", + "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", + "dev": true, + "requires": { + "@types/minimatch": "^3.0.3", + "array-differ": "^3.0.0", + "array-union": "^2.1.0", + "arrify": "^2.0.1", + "minimatch": "^3.0.4" + } + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + } + }, + "npm-run-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-3.1.0.tgz", + "integrity": "sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + }, + "dependencies": { + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + } + } + }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "opencollective-postinstall": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz", + "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==", + "dev": true + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-finally": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", + "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==", + "dev": true + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "please-upgrade-node": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", + "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", + "dev": true, + "requires": { + "semver-compare": "^1.0.0" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, + "pretty-quick": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-2.0.1.tgz", + "integrity": "sha512-y7bJt77XadjUr+P1uKqZxFWLddvj3SKY6EU4BuQtMxmmEFSMpbN132pUWdSG1g1mtUfO0noBvn7wBf0BVeomHg==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "execa": "^2.1.0", + "find-up": "^4.1.0", + "ignore": "^5.1.4", + "mri": "^1.1.4", + "multimatch": "^4.0.0" + }, + "dependencies": { + "ignore": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", + "dev": true + } + } + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "regenerator-runtime": { + "version": "0.13.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", + "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", + "dev": true + }, + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + }, + "resolve": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.16.0.tgz", + "integrity": "sha512-LarL/PIKJvc09k1jaeT4kQb/8/7P+qV4qSnN2K80AES+OHdfZELAKVOBjxsvtToT/uLOfFbvYvKfZmV8cee7nA==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", + "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "rxjs": { + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz", + "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", + "dev": true + }, + "semver-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", + "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shell-quote": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", + "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", + "dev": true + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + }, + "dependencies": { + "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 + } + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "source-map-support": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", + "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "string.prototype.padend": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.0.tgz", + "integrity": "sha512-3aIv8Ffdp8EZj8iLwREGpQaUZiPyrWrpzMBHvkiSW/bK/EGve9np07Vwy7IJ5waydpGXzQZu/F8Oze2/IWkBaA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string.prototype.trimleft": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", + "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimstart": "^1.0.0" + } + }, + "string.prototype.trimright": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", + "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimend": "^1.0.0" + } + }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + } + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", + "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==", + "dev": true + }, + "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" + } + }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "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 + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "tslib": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", + "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + }, + "typescript": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz", + "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "v8-compile-cache": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", + "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-pm-runs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", + "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=", + "dev": true + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, + "yaml": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.9.1.tgz", + "integrity": "sha512-xbWX1ayUVoW8DPM8qxOBowac4XxSTi0mFLbiokRq880ViYglN+F3nJ4Dc2GdypXpykrknKS39d8I3lzFoHv1kA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.9.2" + } + } + } +} diff --git a/runtime/typescript/package.json b/runtime/typescript/package.json new file mode 100644 index 00000000..14235a11 --- /dev/null +++ b/runtime/typescript/package.json @@ -0,0 +1,46 @@ +{ + "name": "antlr4ts", + "version": "0.5.0-dev", + "description": "ANTLR 4 runtime for JavaScript written in Typescript", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "src/**/*." + ], + "scripts": { + "prepare": "run-s antlr build", + "build": "tsc --build --verbose", + "antlr": "cd src/tree/xpath && antlr4ts XPathLexer.g4 -DbaseImportPath=../../internal", + "lint": "eslint --ext .ts src" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/tunnelvisionlabs/antlr4ts.git" + }, + "keywords": [ + "ANTLR4", + "typescript" + ], + "author": "Terence Parr, Sam Harwell, and Burt Harris", + "license": "BSD-3-Clause", + "bugs": { + "url": "https://github.com/tunnelvisionlabs/antlr4ts/issues" + }, + "homepage": "https://github.com/tunnelvisionlabs/antlr4ts#readme", + "devDependencies": { + "@typescript-eslint/eslint-plugin": "^2.28.0", + "@typescript-eslint/eslint-plugin-tslint": "^2.28.0", + "@typescript-eslint/parser": "^2.28.0", + "antlr4ts-cli": "^0.5.0-dev", + "eslint": "^6.8.0", + "eslint-plugin-prettier": "^3.1.3", + "husky": "^4.2.5", + "npm-run-all": "^4.1.5", + "pretty-quick": "^2.0.1", + "typescript": "^3.8.3" + }, + "dependencies": { + "source-map-support": "^0.5.16" + } +} diff --git a/src/ANTLRErrorListener.ts b/runtime/typescript/src/ANTLRErrorListener.ts similarity index 95% rename from src/ANTLRErrorListener.ts rename to runtime/typescript/src/ANTLRErrorListener.ts index 07c86875..4836c17b 100644 --- a/src/ANTLRErrorListener.ts +++ b/runtime/typescript/src/ANTLRErrorListener.ts @@ -5,9 +5,9 @@ // ConvertTo-TS run at 2016-10-04T11:26:48.7499997-07:00 +import { RecognitionException } from "./internal"; /** How to emit recognition errors. */ -import { Recognizer } from "./Recognizer"; -import { RecognitionException } from "./RecognitionException"; +import { Recognizer } from "./internal"; export interface ANTLRErrorListener { /** diff --git a/src/ANTLRErrorStrategy.ts b/runtime/typescript/src/ANTLRErrorStrategy.ts similarity index 97% rename from src/ANTLRErrorStrategy.ts rename to runtime/typescript/src/ANTLRErrorStrategy.ts index 3f90ed92..5e5a7fa7 100644 --- a/src/ANTLRErrorStrategy.ts +++ b/runtime/typescript/src/ANTLRErrorStrategy.ts @@ -5,9 +5,11 @@ // ConvertTo-TS run at 2016-10-04T11:26:48.9102174-07:00 -import { Parser } from "./Parser"; -import { Token } from "./Token"; -import { RecognitionException } from "./RecognitionException"; +import { + Parser, + RecognitionException, + Token +} from "./internal"; /** * The interface for defining strategies to deal with syntax errors encountered diff --git a/src/ANTLRFileStream.tssoon b/runtime/typescript/src/ANTLRFileStream.tssoon similarity index 100% rename from src/ANTLRFileStream.tssoon rename to runtime/typescript/src/ANTLRFileStream.tssoon diff --git a/src/ANTLRInputStream.ts b/runtime/typescript/src/ANTLRInputStream.ts similarity index 86% rename from src/ANTLRInputStream.ts rename to runtime/typescript/src/ANTLRInputStream.ts index 751483bc..2ae5064e 100644 --- a/src/ANTLRInputStream.ts +++ b/runtime/typescript/src/ANTLRInputStream.ts @@ -4,15 +4,17 @@ */ // ConvertTo-TS run at 2016-10-04T11:26:49.0828748-07:00 +import * as Arrays from "./internal"; import * as assert from "assert"; -import { CharStream } from "./CharStream"; -import { Arrays } from "./misc/Arrays"; -import { Override } from "./Decorators"; -import { IntStream } from "./IntStream"; -import { Interval } from "./misc/Interval"; -const READ_BUFFER_SIZE: number = 1024; -const INITIAL_BUFFER_SIZE: number = 1024; +import { + CharStream, + IntStream, + Interval +} from "./internal"; + +const READ_BUFFER_SIZE = 1024; +const INITIAL_BUFFER_SIZE = 1024; /** * Vacuum all input from a {@link Reader}/{@link InputStream} and then treat it @@ -31,7 +33,7 @@ export class ANTLRInputStream implements CharStream { protected n: number; /** 0..n-1 index into string of next char */ - protected p: number = 0; + protected p = 0; /** What is name or source of this char stream? */ public name?: string; @@ -50,7 +52,7 @@ export class ANTLRInputStream implements CharStream { this.p = 0; } - @Override + // @Override public consume(): void { if (this.p >= this.n) { assert(this.LA(1) === IntStream.EOF); @@ -64,7 +66,7 @@ export class ANTLRInputStream implements CharStream { } } - @Override + // @Override public LA(i: number): number { if (i === 0) { return 0; // undefined @@ -93,23 +95,23 @@ export class ANTLRInputStream implements CharStream { * last symbol has been read. The index is the index of char to * be returned from LA(1). */ - @Override + // @Override get index(): number { return this.p; } - @Override + // @Override get size(): number { return this.n; } /** mark/release do nothing; we have entire buffer */ - @Override + // @Override public mark(): number { return -1; } - @Override + // @Override public release(marker: number): void { // No default implementation since this stream buffers the entire input } @@ -117,7 +119,7 @@ export class ANTLRInputStream implements CharStream { /** consume() ahead until p==index; can't just set p=index as we must * update line and charPositionInLine. If we seek backwards, just set p */ - @Override + // @Override public seek(index: number): void { if (index <= this.p) { this.p = index; // just jump; don't update stream state (line, ...) @@ -130,14 +132,14 @@ export class ANTLRInputStream implements CharStream { } } - @Override + // @Override public getText(interval: Interval): string { - let start: number = interval.a; + const start: number = interval.a; let stop: number = interval.b; if (stop >= this.n) { stop = this.n - 1; } - let count: number = stop - start + 1; + const count: number = stop - start + 1; if (start >= this.n) { return ""; } @@ -147,7 +149,7 @@ export class ANTLRInputStream implements CharStream { return this.data.substr(start, count); } - @Override + // @Override get sourceName(): string { if (!this.name) { return IntStream.UNKNOWN_SOURCE_NAME; @@ -155,6 +157,6 @@ export class ANTLRInputStream implements CharStream { return this.name; } - @Override - public toString() { return this.data; } + // @Override + public toString(): string { return this.data; } } diff --git a/src/BailErrorStrategy.ts b/runtime/typescript/src/BailErrorStrategy.ts similarity index 82% rename from src/BailErrorStrategy.ts rename to runtime/typescript/src/BailErrorStrategy.ts index b186935c..77b3bf88 100644 --- a/src/BailErrorStrategy.ts +++ b/runtime/typescript/src/BailErrorStrategy.ts @@ -5,14 +5,15 @@ // ConvertTo-TS run at 2016-10-04T11:26:49.2855056-07:00 -import { DefaultErrorStrategy } from "./DefaultErrorStrategy"; -import { Parser } from "./Parser"; -import { InputMismatchException } from "./InputMismatchException"; -import { Override } from "./Decorators"; -import { ParseCancellationException } from "./misc/ParseCancellationException"; -import { ParserRuleContext } from "./ParserRuleContext"; -import { RecognitionException } from "./RecognitionException"; -import { Token } from "./Token"; +import { + DefaultErrorStrategy, + InputMismatchException, + ParseCancellationException, + Parser, + ParserRuleContext, + RecognitionException, + Token +} from "./internal"; /** * This implementation of {@link ANTLRErrorStrategy} responds to syntax errors @@ -46,7 +47,7 @@ export class BailErrorStrategy extends DefaultErrorStrategy { * rule function catches. Use {@link Exception#getCause()} to get the * original {@link RecognitionException}. */ - @Override + // @Override public recover(recognizer: Parser, e: RecognitionException): void { for (let context: ParserRuleContext | undefined = recognizer.context; context; context = context.parent) { context.exception = e; @@ -58,9 +59,9 @@ export class BailErrorStrategy extends DefaultErrorStrategy { /** Make sure we don't attempt to recover inline; if the parser * successfully recovers, it won't throw an exception. */ - @Override + // @Override public recoverInline(recognizer: Parser): Token { - let e = new InputMismatchException(recognizer); + const e = new InputMismatchException(recognizer); for (let context: ParserRuleContext | undefined = recognizer.context; context; context = context.parent) { context.exception = e; } @@ -69,7 +70,7 @@ export class BailErrorStrategy extends DefaultErrorStrategy { } /** Make sure we don't attempt to recover from problems in subrules. */ - @Override + // @Override public sync(recognizer: Parser): void { // intentionally empty } diff --git a/src/BufferedTokenStream.ts b/runtime/typescript/src/BufferedTokenStream.ts similarity index 86% rename from src/BufferedTokenStream.ts rename to runtime/typescript/src/BufferedTokenStream.ts index 7773e43c..d88c88d4 100644 --- a/src/BufferedTokenStream.ts +++ b/runtime/typescript/src/BufferedTokenStream.ts @@ -6,15 +6,17 @@ // ConvertTo-TS run at 2016-10-04T11:26:49.6074365-07:00 import * as assert from "assert"; -import { CommonToken } from "./CommonToken"; -import { Interval } from "./misc/Interval"; -import { Lexer } from "./Lexer"; -import { NotNull, Override } from "./Decorators"; -import { RuleContext } from "./RuleContext"; -import { Token } from "./Token"; -import { TokenSource } from "./TokenSource"; -import { TokenStream } from "./TokenStream"; -import { WritableToken } from "./WritableToken"; + +import { + CommonToken, + Interval, + Lexer, + RuleContext, + Token, + TokenSource, + TokenStream, + WritableToken +} from "./internal"; /** * This implementation of {@link TokenStream} loads tokens from a @@ -31,7 +33,7 @@ export class BufferedTokenStream implements TokenStream { /** * The {@link TokenSource} from which tokens for this stream are fetched. */ - @NotNull + private _tokenSource: TokenSource; /** @@ -52,7 +54,7 @@ export class BufferedTokenStream implements TokenStream { * see the documentation of {@link IntStream} for a description of * Initializing Methods. */ - protected p: number = -1; + protected p = -1; /** * Indicates whether the {@link Token#EOF} token has been fetched from @@ -65,9 +67,9 @@ export class BufferedTokenStream implements TokenStream { * * {@link #fetch}: The check to prevent adding multiple EOF symbols into * {@link #tokens} is trivial with this field. */ - protected fetchedEOF: boolean = false; + protected fetchedEOF = false; - constructor(@NotNull tokenSource: TokenSource) { + constructor(tokenSource: TokenSource) { if (tokenSource == null) { throw new Error("tokenSource cannot be null"); } @@ -75,7 +77,7 @@ export class BufferedTokenStream implements TokenStream { this._tokenSource = tokenSource; } - @Override + // @Override get tokenSource(): TokenSource { return this._tokenSource; } @@ -88,33 +90,33 @@ export class BufferedTokenStream implements TokenStream { this.fetchedEOF = false; } - @Override + // @Override get index(): number { return this.p; } - @Override + // @Override public mark(): number { return 0; } - @Override + // @Override public release(marker: number): void { // no resources to release } - @Override + // @Override public seek(index: number): void { this.lazyInit(); this.p = this.adjustSeekIndex(index); } - @Override + // @Override get size(): number { return this.tokens.length; } - @Override + // @Override public consume(): void { let skipEofCheck: boolean; if (this.p >= 0) { @@ -148,10 +150,10 @@ export class BufferedTokenStream implements TokenStream { */ protected sync(i: number): boolean { assert(i >= 0); - let n: number = i - this.tokens.length + 1; // how many more elements we need? + const n: number = i - this.tokens.length + 1; // how many more elements we need? //System.out.println("sync("+i+") needs "+n); if (n > 0) { - let fetched: number = this.fetch(n); + const fetched: number = this.fetch(n); return fetched >= n; } @@ -168,7 +170,7 @@ export class BufferedTokenStream implements TokenStream { } for (let i = 0; i < n; i++) { - let t: Token = this.tokenSource.nextToken(); + const t: Token = this.tokenSource.nextToken(); if (this.isWritableToken(t)) { t.tokenIndex = this.tokens.length; } @@ -183,7 +185,7 @@ export class BufferedTokenStream implements TokenStream { return n; } - @Override + // @Override public get(i: number): Token { if (i < 0 || i >= this.tokens.length) { throw new RangeError("token index " + i + " out of range 0.." + (this.tokens.length - 1)); @@ -199,13 +201,13 @@ export class BufferedTokenStream implements TokenStream { } this.lazyInit(); - let subset: Token[] = new Array(); + const subset: Token[] = new Array(); if (stop >= this.tokens.length) { stop = this.tokens.length - 1; } for (let i = start; i <= stop; i++) { - let t: Token = this.tokens[i]; + const t: Token = this.tokens[i]; if (t.type === Token.EOF) { break; } @@ -216,9 +218,9 @@ export class BufferedTokenStream implements TokenStream { return subset; } - @Override + // @Override public LA(i: number): number { - let token = this.LT(i); + const token = this.LT(i); if (!token) { return Token.INVALID_TYPE; } @@ -234,10 +236,10 @@ export class BufferedTokenStream implements TokenStream { return this.tokens[this.p - k]; } - @NotNull - @Override + + // @Override public LT(k: number): Token { - let result = this.tryLT(k); + const result = this.tryLT(k); if (result === undefined) { throw new RangeError("requested lookback index out of range"); } @@ -255,7 +257,7 @@ export class BufferedTokenStream implements TokenStream { return this.tryLB(-k); } - let i: number = this.p + k - 1; + const i: number = this.p + k - 1; this.sync(i); if (i >= this.tokens.length) { // return EOF token @@ -331,7 +333,7 @@ export class BufferedTokenStream implements TokenStream { types = new Set().add(types); } - let typesSet = types; + const typesSet = types; // list = tokens[start:stop]:{T t, t.type in types} let filteredTokens: Token[] = this.tokens.slice(start, stop + 1); @@ -383,7 +385,7 @@ export class BufferedTokenStream implements TokenStream { } while (i >= 0) { - let token: Token = this.tokens[i]; + const token: Token = this.tokens[i]; if (token.type === Token.EOF || token.channel === channel) { return i; } @@ -398,15 +400,15 @@ export class BufferedTokenStream implements TokenStream { * the current token up until we see a token on {@link Lexer#DEFAULT_TOKEN_CHANNEL} or * EOF. If `channel` is `-1`, find any non default channel token. */ - public getHiddenTokensToRight(tokenIndex: number, channel: number = -1): Token[] { + public getHiddenTokensToRight(tokenIndex: number, channel = -1): Token[] { this.lazyInit(); if (tokenIndex < 0 || tokenIndex >= this.tokens.length) { throw new RangeError(tokenIndex + " not in 0.." + (this.tokens.length - 1)); } - let nextOnChannel: number = this.nextTokenOnChannel(tokenIndex + 1, Lexer.DEFAULT_TOKEN_CHANNEL); + const nextOnChannel: number = this.nextTokenOnChannel(tokenIndex + 1, Lexer.DEFAULT_TOKEN_CHANNEL); let to: number; - let from: number = tokenIndex + 1; + const from: number = tokenIndex + 1; // if none onchannel to right, nextOnChannel=-1 so set to = last token if (nextOnChannel === -1) { to = this.size - 1; @@ -421,7 +423,7 @@ export class BufferedTokenStream implements TokenStream { * the current token up until we see a token on {@link Lexer#DEFAULT_TOKEN_CHANNEL}. * If `channel` is `-1`, find any non default channel token. */ - public getHiddenTokensToLeft(tokenIndex: number, channel: number = -1): Token[] { + public getHiddenTokensToLeft(tokenIndex: number, channel = -1): Token[] { this.lazyInit(); if (tokenIndex < 0 || tokenIndex >= this.tokens.length) { throw new RangeError(tokenIndex + " not in 0.." + (this.tokens.length - 1)); @@ -432,22 +434,22 @@ export class BufferedTokenStream implements TokenStream { return []; } - let prevOnChannel: number = this.previousTokenOnChannel(tokenIndex - 1, Lexer.DEFAULT_TOKEN_CHANNEL); + const prevOnChannel: number = this.previousTokenOnChannel(tokenIndex - 1, Lexer.DEFAULT_TOKEN_CHANNEL); if (prevOnChannel === tokenIndex - 1) { return []; } // if none onchannel to left, prevOnChannel=-1 then from=0 - let from: number = prevOnChannel + 1; - let to: number = tokenIndex - 1; + const from: number = prevOnChannel + 1; + const to: number = tokenIndex - 1; return this.filterForChannel(from, to, channel); } protected filterForChannel(from: number, to: number, channel: number): Token[] { - let hidden: Token[] = new Array(); + const hidden: Token[] = new Array(); for (let i = from; i <= to; i++) { - let t: Token = this.tokens[i]; + const t: Token = this.tokens[i]; if (channel === -1) { if (t.channel !== Lexer.DEFAULT_TOKEN_CHANNEL) { hidden.push(t); @@ -462,7 +464,7 @@ export class BufferedTokenStream implements TokenStream { return hidden; } - @Override + // @Override get sourceName(): string { return this.tokenSource.sourceName; } @@ -471,8 +473,8 @@ export class BufferedTokenStream implements TokenStream { public getText(): string; public getText(interval: Interval): string; public getText(context: RuleContext): string; - @NotNull - @Override + + // @Override public getText(interval?: Interval | RuleContext): string { if (interval === undefined) { interval = Interval.of(0, this.size - 1); @@ -481,7 +483,7 @@ export class BufferedTokenStream implements TokenStream { interval = interval.sourceInterval; } - let start: number = interval.a; + const start: number = interval.a; let stop: number = interval.b; if (start < 0 || stop < 0) { return ""; @@ -492,9 +494,9 @@ export class BufferedTokenStream implements TokenStream { stop = this.tokens.length - 1; } - let buf: string = ""; + let buf = ""; for (let i = start; i <= stop; i++) { - let t: Token = this.tokens[i]; + const t: Token = this.tokens[i]; if (t.type === Token.EOF) { break; } @@ -505,9 +507,9 @@ export class BufferedTokenStream implements TokenStream { return buf.toString(); } - @NotNull - @Override - public getTextFromRange(start: any, stop: any): string { + + // @Override + public getTextFromRange(start: Token, stop?: Token): string { if (this.isToken(start) && this.isToken(stop)) { return this.getText(Interval.of(start.tokenIndex, stop.tokenIndex)); } @@ -518,9 +520,9 @@ export class BufferedTokenStream implements TokenStream { /** Get all tokens from lexer until EOF. */ public fill(): void { this.lazyInit(); - const blockSize: number = 1000; + const blockSize = 1000; while (true) { - let fetched: number = this.fetch(blockSize); + const fetched: number = this.fetch(blockSize); if (fetched < blockSize) { return; } diff --git a/src/CharStream.ts b/runtime/typescript/src/CharStream.ts similarity index 93% rename from src/CharStream.ts rename to runtime/typescript/src/CharStream.ts index 2572ed9b..e7692697 100644 --- a/src/CharStream.ts +++ b/runtime/typescript/src/CharStream.ts @@ -5,8 +5,10 @@ // ConvertTo-TS run at 2016-10-04T11:26:50.0659297-07:00 -import { Interval } from "./misc/Interval"; -import { IntStream } from "./IntStream"; +import { + IntStream, + Interval +} from "./internal"; /** A source of characters for an ANTLR lexer. */ export interface CharStream extends IntStream { diff --git a/src/CharStreams.ts b/runtime/typescript/src/CharStreams.ts similarity index 97% rename from src/CharStreams.ts rename to runtime/typescript/src/CharStreams.ts index 27141074..59142abc 100644 --- a/src/CharStreams.ts +++ b/runtime/typescript/src/CharStreams.ts @@ -3,9 +3,11 @@ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. */ -import { CodePointBuffer } from "./CodePointBuffer"; -import { CodePointCharStream } from "./CodePointCharStream"; -import { IntStream } from "./IntStream"; +import { + CodePointBuffer, + CodePointCharStream, + IntStream +} from "./internal"; // const DEFAULT_BUFFER_SIZE: number = 4096; @@ -249,11 +251,11 @@ export namespace CharStreams { // Initial guess assumes no code points > U+FFFF: one code // point for each code unit in the string - let codePointBufferBuilder: CodePointBuffer.Builder = CodePointBuffer.builder(s.length); + const codePointBufferBuilder: CodePointBuffer.Builder = CodePointBuffer.builder(s.length); // TODO: CharBuffer.wrap(String) rightfully returns a read-only buffer // which doesn't expose its array, so we make a copy. - let cb: Uint16Array = new Uint16Array(s.length); + const cb: Uint16Array = new Uint16Array(s.length); for (let i = 0; i < s.length; i++) { cb[i] = s.charCodeAt(i); } diff --git a/src/CodePointBuffer.ts b/runtime/typescript/src/CodePointBuffer.ts similarity index 81% rename from src/CodePointBuffer.ts rename to runtime/typescript/src/CodePointBuffer.ts index ab2afc16..e9c0eabe 100644 --- a/src/CodePointBuffer.ts +++ b/runtime/typescript/src/CodePointBuffer.ts @@ -3,8 +3,8 @@ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. */ +import * as Character from "./internal"; import * as assert from "assert"; -import * as Character from "./misc/Character"; /** * Wrapper for `Uint8Array` / `Uint16Array` / `Int32Array`. @@ -78,7 +78,7 @@ export namespace CodePointBuffer { } private static roundUpToNextPowerOfTwo(i: number): number { - let nextPowerOfTwo: number = 32 - Math.clz32(i - 1); + const nextPowerOfTwo: number = 32 - Math.clz32(i - 1); return Math.pow(2, nextPowerOfTwo); } @@ -86,24 +86,24 @@ export namespace CodePointBuffer { switch (this.type) { case Type.BYTE: if (this.buffer.length - this.position < remainingNeeded) { - let newCapacity: number = Builder.roundUpToNextPowerOfTwo(this.buffer.length + remainingNeeded); - let newBuffer: Uint8Array = new Uint8Array(newCapacity); + const newCapacity: number = Builder.roundUpToNextPowerOfTwo(this.buffer.length + remainingNeeded); + const newBuffer: Uint8Array = new Uint8Array(newCapacity); newBuffer.set(this.buffer.subarray(0, this.position), 0); this.buffer = newBuffer; } break; case Type.CHAR: if (this.buffer.length - this.position < remainingNeeded) { - let newCapacity: number = Builder.roundUpToNextPowerOfTwo(this.buffer.length + remainingNeeded); - let newBuffer: Uint16Array = new Uint16Array(newCapacity); + const newCapacity: number = Builder.roundUpToNextPowerOfTwo(this.buffer.length + remainingNeeded); + const newBuffer: Uint16Array = new Uint16Array(newCapacity); newBuffer.set(this.buffer.subarray(0, this.position), 0); this.buffer = newBuffer; } break; case Type.INT: if (this.buffer.length - this.position < remainingNeeded) { - let newCapacity: number = Builder.roundUpToNextPowerOfTwo(this.buffer.length + remainingNeeded); - let newBuffer: Int32Array = new Int32Array(newCapacity); + const newCapacity: number = Builder.roundUpToNextPowerOfTwo(this.buffer.length + remainingNeeded); + const newBuffer: Int32Array = new Int32Array(newCapacity); newBuffer.set(this.buffer.subarray(0, this.position), 0); this.buffer = newBuffer; } @@ -133,15 +133,15 @@ export namespace CodePointBuffer { private appendArrayByte(utf16In: Uint16Array): void { assert(this.prevHighSurrogate === -1); - let input: Uint16Array = utf16In; - let inOffset: number = 0; - let inLimit: number = utf16In.length; + const input: Uint16Array = utf16In; + let inOffset = 0; + const inLimit: number = utf16In.length; - let outByte = this.buffer; + const outByte = this.buffer; let outOffset: number = this.position; while (inOffset < inLimit) { - let c: number = input[inOffset]; + const c: number = input[inOffset]; if (c <= 0xFF) { outByte[outOffset] = c; } else { @@ -168,15 +168,15 @@ export namespace CodePointBuffer { private appendArrayChar(utf16In: Uint16Array): void { assert(this.prevHighSurrogate === -1); - let input: Uint16Array = utf16In; - let inOffset: number = 0; - let inLimit: number = utf16In.length; + const input: Uint16Array = utf16In; + let inOffset = 0; + const inLimit: number = utf16In.length; - let outChar = this.buffer; + const outChar = this.buffer; let outOffset: number = this.position; while (inOffset < inLimit) { - let c: number = input[inOffset]; + const c: number = input[inOffset]; if (!Character.isHighSurrogate(c)) { outChar[outOffset] = c; } else { @@ -195,15 +195,15 @@ export namespace CodePointBuffer { } private appendArrayInt(utf16In: Uint16Array): void { - let input: Uint16Array = utf16In; - let inOffset: number = 0; - let inLimit: number = utf16In.length; + const input: Uint16Array = utf16In; + let inOffset = 0; + const inLimit: number = utf16In.length; - let outInt = this.buffer; + const outInt = this.buffer; let outOffset = this.position; while (inOffset < inLimit) { - let c: number = input[inOffset]; + const c: number = input[inOffset]; inOffset++; if (this.prevHighSurrogate !== -1) { if (Character.isLowSurrogate(c)) { @@ -241,7 +241,7 @@ export namespace CodePointBuffer { private byteToCharBuffer(toAppend: number): void { // CharBuffers hold twice as much per unit as ByteBuffers, so start with half the capacity. - let newBuffer: Uint16Array = new Uint16Array(Math.max(this.position + toAppend, this.buffer.length >> 1)); + const newBuffer: Uint16Array = new Uint16Array(Math.max(this.position + toAppend, this.buffer.length >> 1)); newBuffer.set(this.buffer.subarray(0, this.position), 0); this.type = Type.CHAR; @@ -250,7 +250,7 @@ export namespace CodePointBuffer { private byteToIntBuffer(toAppend: number): void { // IntBuffers hold four times as much per unit as ByteBuffers, so start with one quarter the capacity. - let newBuffer: Int32Array = new Int32Array(Math.max(this.position + toAppend, this.buffer.length >> 2)); + const newBuffer: Int32Array = new Int32Array(Math.max(this.position + toAppend, this.buffer.length >> 2)); newBuffer.set(this.buffer.subarray(0, this.position), 0); this.type = Type.INT; @@ -259,7 +259,7 @@ export namespace CodePointBuffer { private charToIntBuffer(toAppend: number): void { // IntBuffers hold two times as much per unit as ByteBuffers, so start with one half the capacity. - let newBuffer: Int32Array = new Int32Array(Math.max(this.position + toAppend, this.buffer.length >> 1)); + const newBuffer: Int32Array = new Int32Array(Math.max(this.position + toAppend, this.buffer.length >> 1)); newBuffer.set(this.buffer.subarray(0, this.position), 0); this.type = Type.INT; diff --git a/src/CodePointCharStream.ts b/runtime/typescript/src/CodePointCharStream.ts similarity index 92% rename from src/CodePointCharStream.ts rename to runtime/typescript/src/CodePointCharStream.ts index 6c357798..00caa6b5 100644 --- a/src/CodePointCharStream.ts +++ b/runtime/typescript/src/CodePointCharStream.ts @@ -4,11 +4,13 @@ */ import * as assert from "assert"; -import { CharStream } from "./CharStream"; -import { CodePointBuffer } from "./CodePointBuffer"; -import { IntStream } from "./IntStream"; -import { Interval } from "./misc/Interval"; -import { Override } from "./Decorators"; + +import { + CharStream, + CodePointBuffer, + IntStream, + Interval +} from "./internal"; /** * Alternative to {@link ANTLRInputStream} which treats the input @@ -73,7 +75,7 @@ export class CodePointCharStream implements CharStream { name); } - @Override + // @Override public consume(): void { if (this._size - this._position === 0) { assert(this.LA(1) === IntStream.EOF); @@ -83,43 +85,43 @@ export class CodePointCharStream implements CharStream { this._position++; } - @Override + // @Override public get index(): number { return this._position; } - @Override + // @Override public get size(): number { return this._size; } /** mark/release do nothing; we have entire buffer */ - @Override + // @Override public mark(): number { return -1; } - @Override + // @Override public release(marker: number): void { // No default implementation since this stream buffers the entire input } - @Override + // @Override public seek(index: number): void { this._position = index; } - @Override + // @Override public get sourceName(): string { return this._name; } - @Override + // @Override public toString(): string { return this.getText(Interval.of(0, this.size - 1)); } - @Override + // @Override public LA(i: number): number { let offset: number; switch (Math.sign(i)) { @@ -148,7 +150,7 @@ export class CodePointCharStream implements CharStream { } /** Return the UTF-16 encoded string for the given interval */ - @Override + // @Override public getText(interval: Interval): string { const startIdx: number = Math.min(interval.a, this.size); const len: number = Math.min(interval.b - interval.a + 1, this.size - startIdx); diff --git a/src/CommonToken.ts b/runtime/typescript/src/CommonToken.ts similarity index 81% rename from src/CommonToken.ts rename to runtime/typescript/src/CommonToken.ts index 99852d66..fce3a2e7 100644 --- a/src/CommonToken.ts +++ b/runtime/typescript/src/CommonToken.ts @@ -5,21 +5,22 @@ // ConvertTo-TS run at 2016-10-04T11:26:50.1614404-07:00 -import { ATNSimulator } from "./atn/ATNSimulator"; -import { CharStream } from "./CharStream"; -import { Interval } from "./misc/Interval"; -import { NotNull, Override } from "./Decorators"; -import { Recognizer } from "./Recognizer"; -import { Token } from "./Token"; -import { TokenSource } from "./TokenSource"; -import { WritableToken } from "./WritableToken"; +import { + ATNSimulator, + CharStream, + Interval, + Recognizer, + Token, + TokenSource, + WritableToken +} from "./internal"; export class CommonToken implements WritableToken { /** * An empty {@link Tuple2} which is used as the default value of * {@link #source} for tokens that do not have a source. */ - protected static readonly EMPTY_SOURCE: { source?: TokenSource, stream?: CharStream } = + protected static readonly EMPTY_SOURCE: { source?: TokenSource; stream?: CharStream } = { source: undefined, stream: undefined }; /** @@ -29,12 +30,12 @@ export class CommonToken implements WritableToken { /** * This is the backing field for {@link #getLine} and {@link #setLine}. */ - private _line: number = 0; + private _line = 0; /** * This is the backing field for {@link #getCharPositionInLine} and * {@link #setCharPositionInLine}. */ - private _charPositionInLine: number = -1; // set to invalid position + private _charPositionInLine = -1; // set to invalid position /** * This is the backing field for {@link #getChannel} and * {@link #setChannel}. @@ -49,8 +50,8 @@ export class CommonToken implements WritableToken { * the same source and input stream share a reference to the same * {@link Tuple2} containing these values. */ - @NotNull - protected source: { source?: TokenSource, stream?: CharStream }; + + protected source: { source?: TokenSource; stream?: CharStream }; /** * This is the backing field for {@link #getText} when the token text is @@ -63,7 +64,7 @@ export class CommonToken implements WritableToken { /** * This is the backing field for `tokenIndex`. */ - protected index: number = -1; + protected index = -1; /** * This is the backing field for `startIndex`. @@ -75,7 +76,7 @@ export class CommonToken implements WritableToken { */ private stop: number; - constructor(type: number, text?: string, @NotNull source: { source?: TokenSource, stream?: CharStream } = CommonToken.EMPTY_SOURCE, channel: number = Token.DEFAULT_CHANNEL, start: number = 0, stop: number = 0) { + constructor(type: number, text?: string, source: { source?: TokenSource; stream?: CharStream } = CommonToken.EMPTY_SOURCE, channel: number = Token.DEFAULT_CHANNEL, start = 0, stop = 0) { this._text = text; this._type = type; this.source = source; @@ -100,8 +101,8 @@ export class CommonToken implements WritableToken { * * @param oldToken The token to copy. */ - public static fromToken(@NotNull oldToken: Token): CommonToken { - let result: CommonToken = new CommonToken(oldToken.type, undefined, CommonToken.EMPTY_SOURCE, oldToken.channel, oldToken.startIndex, oldToken.stopIndex); + public static fromToken(oldToken: Token): CommonToken { + const result: CommonToken = new CommonToken(oldToken.type, undefined, CommonToken.EMPTY_SOURCE, oldToken.channel, oldToken.startIndex, oldToken.stopIndex); result._line = oldToken.line; result.index = oldToken.tokenIndex; result._charPositionInLine = oldToken.charPositionInLine; @@ -117,7 +118,7 @@ export class CommonToken implements WritableToken { return result; } - @Override + // @Override get type(): number { return this._type; } @@ -127,7 +128,7 @@ export class CommonToken implements WritableToken { this._type = type; } - @Override + // @Override get line(): number { return this._line; } @@ -137,18 +138,18 @@ export class CommonToken implements WritableToken { this._line = line; } - @Override + // @Override get text(): string | undefined { if (this._text != null) { return this._text; } - let input: CharStream | undefined = this.inputStream; + const input: CharStream | undefined = this.inputStream; if (input == null) { return undefined; } - let n: number = input.size; + const n: number = input.size; if (this.start < n && this.stop < n) { return input.getText(Interval.of(this.start, this.stop)); } else { @@ -170,7 +171,7 @@ export class CommonToken implements WritableToken { this._text = text; } - @Override + // @Override get charPositionInLine(): number { return this._charPositionInLine; } @@ -180,7 +181,7 @@ export class CommonToken implements WritableToken { this._charPositionInLine = charPositionInLine; } - @Override + // @Override get channel(): number { return this._channel; } @@ -190,7 +191,7 @@ export class CommonToken implements WritableToken { this._channel = channel; } - @Override + // @Override get startIndex(): number { return this.start; } @@ -199,7 +200,7 @@ export class CommonToken implements WritableToken { this.start = start; } - @Override + // @Override get stopIndex(): number { return this.stop; } @@ -208,7 +209,7 @@ export class CommonToken implements WritableToken { this.stop = stop; } - @Override + // @Override get tokenIndex(): number { return this.index; } @@ -218,12 +219,12 @@ export class CommonToken implements WritableToken { this.index = index; } - @Override + // @Override get tokenSource(): TokenSource | undefined { return this.source.source; } - @Override + // @Override get inputStream(): CharStream | undefined { return this.source.stream; } @@ -231,9 +232,9 @@ export class CommonToken implements WritableToken { public toString(): string; public toString(recognizer: Recognizer | undefined): string; - @Override + // @Override public toString(recognizer?: Recognizer): string { - let channelStr: string = ""; + let channelStr = ""; if (this._channel > 0) { channelStr = ",channel=" + this._channel; } diff --git a/src/CommonTokenFactory.ts b/runtime/typescript/src/CommonTokenFactory.ts similarity index 82% rename from src/CommonTokenFactory.ts rename to runtime/typescript/src/CommonTokenFactory.ts index 7a225349..884db150 100644 --- a/src/CommonTokenFactory.ts +++ b/runtime/typescript/src/CommonTokenFactory.ts @@ -5,12 +5,13 @@ // ConvertTo-TS run at 2016-10-04T11:26:50.3010112-07:00 -import { CharStream } from "./CharStream"; -import { CommonToken } from "./CommonToken"; -import { Interval } from "./misc/Interval"; -import { Override } from "./Decorators"; -import { TokenFactory } from "./TokenFactory"; -import { TokenSource } from "./TokenSource"; +import { + CharStream, + CommonToken, + Interval, + TokenFactory, + TokenSource +} from "./internal"; /** * This default implementation of {@link TokenFactory} creates @@ -42,13 +43,13 @@ export class CommonTokenFactory implements TokenFactory { * * @param copyText The value for {@link #copyText}. */ - constructor(copyText: boolean = false) { + constructor(copyText = false) { this.copyText = copyText; } - @Override + // @Override public create( - source: { source?: TokenSource, stream?: CharStream }, + source: { source?: TokenSource; stream?: CharStream }, type: number, text: string | undefined, channel: number, @@ -57,7 +58,7 @@ export class CommonTokenFactory implements TokenFactory { line: number, charPositionInLine: number): CommonToken { - let t: CommonToken = new CommonToken(type, text, source, channel, start, stop); + const t: CommonToken = new CommonToken(type, text, source, channel, start, stop); t.line = line; t.charPositionInLine = charPositionInLine; if (text == null && this.copyText && source.stream != null) { @@ -67,7 +68,7 @@ export class CommonTokenFactory implements TokenFactory { return t; } - @Override + // @Override public createSimple(type: number, text: string): CommonToken { return new CommonToken(type, text); } diff --git a/src/CommonTokenStream.ts b/runtime/typescript/src/CommonTokenStream.ts similarity index 87% rename from src/CommonTokenStream.ts rename to runtime/typescript/src/CommonTokenStream.ts index dc48c5fc..3ec25b63 100644 --- a/src/CommonTokenStream.ts +++ b/runtime/typescript/src/CommonTokenStream.ts @@ -5,10 +5,11 @@ // ConvertTo-TS run at 2016-10-04T11:26:50.3953157-07:00 -import { BufferedTokenStream } from "./BufferedTokenStream"; -import { NotNull, Override } from "./Decorators"; -import { Token } from "./Token"; -import { TokenSource } from "./TokenSource"; +import { + BufferedTokenStream, + Token, + TokenSource +} from "./internal"; /** * This class extends {@link BufferedTokenStream} with functionality to filter @@ -49,24 +50,24 @@ export class CommonTokenStream extends BufferedTokenStream { * @param tokenSource The token source. * @param channel The channel to use for filtering tokens. */ - constructor(@NotNull tokenSource: TokenSource, channel: number = Token.DEFAULT_CHANNEL) { + constructor(tokenSource: TokenSource, channel: number = Token.DEFAULT_CHANNEL) { super(tokenSource); this.channel = channel; } - @Override + // @Override protected adjustSeekIndex(i: number): number { return this.nextTokenOnChannel(i, this.channel); } - @Override + // @Override protected tryLB(k: number): Token | undefined { if ((this.p - k) < 0) { return undefined; } let i: number = this.p; - let n: number = 1; + let n = 1; // find k good tokens looking backwards while (n <= k && i > 0) { // skip off-channel tokens @@ -81,7 +82,7 @@ export class CommonTokenStream extends BufferedTokenStream { return this.tokens[i]; } - @Override + // @Override public tryLT(k: number): Token | undefined { //System.out.println("enter LT("+k+")"); this.lazyInit(); @@ -94,7 +95,7 @@ export class CommonTokenStream extends BufferedTokenStream { } let i: number = this.p; - let n: number = 1; // we know tokens[p] is a good one + let n = 1; // we know tokens[p] is a good one // find k good tokens while (n < k) { // skip off-channel tokens, but make sure to not look past EOF @@ -110,9 +111,9 @@ export class CommonTokenStream extends BufferedTokenStream { /** Count EOF just once. */ public getNumberOfOnChannelTokens(): number { - let n: number = 0; + let n = 0; this.fill(); - for (let t of this.tokens) { + for (const t of this.tokens) { if (t.channel === this.channel) { n++; } diff --git a/src/ConsoleErrorListener.ts b/runtime/typescript/src/ConsoleErrorListener.ts similarity index 86% rename from src/ConsoleErrorListener.ts rename to runtime/typescript/src/ConsoleErrorListener.ts index 2a30845b..23206ab1 100644 --- a/src/ConsoleErrorListener.ts +++ b/runtime/typescript/src/ConsoleErrorListener.ts @@ -5,9 +5,11 @@ // ConvertTo-TS run at 2016-10-04T11:26:50.5479602-07:00 -import { ANTLRErrorListener } from "./ANTLRErrorListener"; -import { RecognitionException } from "./RecognitionException"; -import { Recognizer } from "./Recognizer"; +import { + ANTLRErrorListener, + RecognitionException, + Recognizer +} from "./internal"; /** * diff --git a/src/DefaultErrorStrategy.ts b/runtime/typescript/src/DefaultErrorStrategy.ts similarity index 78% rename from src/DefaultErrorStrategy.ts rename to runtime/typescript/src/DefaultErrorStrategy.ts index 32537ea1..0aee7d0c 100644 --- a/src/DefaultErrorStrategy.ts +++ b/runtime/typescript/src/DefaultErrorStrategy.ts @@ -5,26 +5,27 @@ // ConvertTo-TS run at 2016-10-04T11:26:50.8290527-07:00 -import { ANTLRErrorStrategy } from "./ANTLRErrorStrategy"; -import { ATN } from "./atn/ATN"; -import { ATNState } from "./atn/ATNState"; -import { ATNStateType } from "./atn/ATNStateType"; -import { FailedPredicateException } from "./FailedPredicateException"; -import { InputMismatchException } from "./InputMismatchException"; -import { IntervalSet } from "./misc/IntervalSet"; -import { NoViableAltException } from "./NoViableAltException"; -import { Parser } from "./Parser"; -import { ParserRuleContext } from "./ParserRuleContext"; -import { PredictionContext } from "./atn/PredictionContext"; -import { RecognitionException } from "./RecognitionException"; -import { RuleContext } from "./RuleContext"; -import { RuleTransition } from "./atn/RuleTransition"; -import { TokenStream } from "./TokenStream"; -import { Token } from "./Token"; -import { TokenFactory } from "./TokenFactory"; -import { TokenSource } from "./TokenSource"; -import { Vocabulary } from "./Vocabulary"; -import { Override, NotNull } from "./Decorators"; +import { + ANTLRErrorStrategy, + ATN, + ATNState, + ATNStateType, + FailedPredicateException, + InputMismatchException, + IntervalSet, + NoViableAltException, + Parser, + ParserRuleContext, + PredictionContext, + RecognitionException, + RuleContext, + RuleTransition, + Token, + TokenFactory, + TokenSource, + TokenStream, + Vocabulary +} from "./internal"; /** * This is the default implementation of {@link ANTLRErrorStrategy} used for @@ -38,7 +39,7 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { * * @see #inErrorRecoveryMode */ - protected errorRecoveryMode: boolean = false; + protected errorRecoveryMode = false; /** The index into the input stream where the last error occurred. * This is used to prevent infinite loops where an error is found @@ -46,7 +47,7 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { * ad nauseum. This is a failsafe mechanism to guarantee that at least * one token/tree node is consumed for two errors. */ - protected lastErrorIndex: number = -1; + protected lastErrorIndex = -1; protected lastErrorStates?: IntervalSet; @@ -71,7 +72,7 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { * The default implementation simply calls {@link #endErrorCondition} to * ensure that the handler is not in error recovery mode. */ - @Override + // @Override public reset(recognizer: Parser): void { this.endErrorCondition(recognizer); } @@ -82,14 +83,14 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { * * @param recognizer the parser instance */ - protected beginErrorCondition(@NotNull recognizer: Parser): void { + protected beginErrorCondition(recognizer: Parser): void { this.errorRecoveryMode = true; } /** * {@inheritDoc} */ - @Override + // @Override public inErrorRecoveryMode(recognizer: Parser): boolean { return this.errorRecoveryMode; } @@ -100,7 +101,7 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { * * @param recognizer */ - protected endErrorCondition(@NotNull recognizer: Parser): void { + protected endErrorCondition(recognizer: Parser): void { this.errorRecoveryMode = false; this.lastErrorStates = undefined; this.lastErrorIndex = -1; @@ -111,7 +112,7 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { * * The default implementation simply calls {@link #endErrorCondition}. */ - @Override + // @Override public reportMatch(recognizer: Parser): void { this.endErrorCondition(recognizer); } @@ -133,14 +134,14 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { * * All other types: calls {@link Parser#notifyErrorListeners} to report * the exception */ - @Override + // @Override public reportError( recognizer: Parser, e: RecognitionException): void { // if we've already reported an error and have not matched a token // yet successfully, don't report any errors. if (this.inErrorRecoveryMode(recognizer)) { -// System.err.print("[SPURIOUS] "); + // System.err.print("[SPURIOUS] "); return; // don't report spurious errors } this.beginErrorCondition(recognizer); @@ -159,7 +160,7 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { } } - protected notifyErrorListeners(@NotNull recognizer: Parser, message: string, e: RecognitionException): void { + protected notifyErrorListeners(recognizer: Parser, message: string, e: RecognitionException): void { let offendingToken: Token | null | undefined = e.getOffendingToken(recognizer); if (offendingToken === undefined) { // Pass null to notifyErrorListeners so it in turn calls the error listeners with undefined as the offending @@ -177,13 +178,13 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { * until we find one in the resynchronization set--loosely the set of tokens * that can follow the current rule. */ - @Override + // @Override public recover(recognizer: Parser, e: RecognitionException): void { -// System.out.println("recover in "+recognizer.getRuleInvocationStack()+ -// " index="+recognizer.inputStream.index+ -// ", lastErrorIndex="+ -// lastErrorIndex+ -// ", states="+lastErrorStates); + // System.out.println("recover in "+recognizer.getRuleInvocationStack()+ + // " index="+recognizer.inputStream.index+ + // ", lastErrorIndex="+ + // lastErrorIndex+ + // ", states="+lastErrorStates); if (this.lastErrorIndex === recognizer.inputStream.index && this.lastErrorStates && this.lastErrorStates.contains(recognizer.state)) { @@ -191,9 +192,9 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { // state in ATN; must be a case where LT(1) is in the recovery // token set so nothing got consumed. Consume a single token // at least to prevent an infinite loop; this is a failsafe. -// System.err.println("seen error condition before index="+ -// lastErrorIndex+", states="+lastErrorStates); -// System.err.println("FAILSAFE consumes "+recognizer.getTokenNames()[recognizer.inputStream.LA(1)]); + // System.err.println("seen error condition before index="+ + // lastErrorIndex+", states="+lastErrorStates); + // System.err.println("FAILSAFE consumes "+recognizer.getTokenNames()[recognizer.inputStream.LA(1)]); recognizer.consume(); } this.lastErrorIndex = recognizer.inputStream.index; @@ -201,7 +202,7 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { this.lastErrorStates = new IntervalSet(); } this.lastErrorStates.add(recognizer.state); - let followSet: IntervalSet = this.getErrorRecoverySet(recognizer); + const followSet: IntervalSet = this.getErrorRecoverySet(recognizer); this.consumeUntil(recognizer, followSet); } @@ -251,20 +252,20 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { * some reason speed is suffering for you, you can turn off this * functionality by simply overriding this method as a blank { }. */ - @Override + // @Override public sync(recognizer: Parser): void { - let s: ATNState = recognizer.interpreter.atn.states[recognizer.state]; -// System.err.println("sync @ "+s.stateNumber+"="+s.getClass().getSimpleName()); + const s: ATNState = recognizer.interpreter.atn.states[recognizer.state]; + // System.err.println("sync @ "+s.stateNumber+"="+s.getClass().getSimpleName()); // If already recovering, don't try to sync if (this.inErrorRecoveryMode(recognizer)) { return; } - let tokens: TokenStream = recognizer.inputStream; - let la: number = tokens.LA(1); + const tokens: TokenStream = recognizer.inputStream; + const la: number = tokens.LA(1); // try cheaper subset first; might get lucky. seems to shave a wee bit off - let nextTokens: IntervalSet = recognizer.atn.nextTokens(s); + const nextTokens: IntervalSet = recognizer.atn.nextTokens(s); if (nextTokens.contains(la)) { // We are sure the token matches this.nextTokensContext = undefined; @@ -284,30 +285,30 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { } switch (s.stateType) { - case ATNStateType.BLOCK_START: - case ATNStateType.STAR_BLOCK_START: - case ATNStateType.PLUS_BLOCK_START: - case ATNStateType.STAR_LOOP_ENTRY: - // report error and recover if possible - if (this.singleTokenDeletion(recognizer)) { - return; - } - - throw new InputMismatchException(recognizer); - - case ATNStateType.PLUS_LOOP_BACK: - case ATNStateType.STAR_LOOP_BACK: -// System.err.println("at loop back: "+s.getClass().getSimpleName()); - this.reportUnwantedToken(recognizer); - let expecting: IntervalSet = recognizer.getExpectedTokens(); - let whatFollowsLoopIterationOrRule: IntervalSet = - expecting.or(this.getErrorRecoverySet(recognizer)); - this.consumeUntil(recognizer, whatFollowsLoopIterationOrRule); - break; - - default: - // do nothing if we can't identify the exact kind of ATN state - break; + case ATNStateType.BLOCK_START: + case ATNStateType.STAR_BLOCK_START: + case ATNStateType.PLUS_BLOCK_START: + case ATNStateType.STAR_LOOP_ENTRY: + // report error and recover if possible + if (this.singleTokenDeletion(recognizer)) { + return; + } + + throw new InputMismatchException(recognizer); + + case ATNStateType.PLUS_LOOP_BACK: + case ATNStateType.STAR_LOOP_BACK: + // System.err.println("at loop back: "+s.getClass().getSimpleName()); + this.reportUnwantedToken(recognizer); + const expecting: IntervalSet = recognizer.getExpectedTokens(); + const whatFollowsLoopIterationOrRule: IntervalSet = + expecting.or(this.getErrorRecoverySet(recognizer)); + this.consumeUntil(recognizer, whatFollowsLoopIterationOrRule); + break; + + default: + // do nothing if we can't identify the exact kind of ATN state + break; } } @@ -321,9 +322,9 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { * @param e the recognition exception */ protected reportNoViableAlternative( - @NotNull recognizer: Parser, - @NotNull e: NoViableAltException): void { - let tokens: TokenStream = recognizer.inputStream; + recognizer: Parser, + e: NoViableAltException): void { + const tokens: TokenStream = recognizer.inputStream; let input: string; if (tokens) { if (e.startToken.type === Token.EOF) { @@ -335,7 +336,7 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { else { input = ""; } - let msg: string = "no viable alternative at input " + this.escapeWSAndQuote(input); + const msg: string = "no viable alternative at input " + this.escapeWSAndQuote(input); this.notifyErrorListeners(recognizer, msg, e); } @@ -349,11 +350,11 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { * @param e the recognition exception */ protected reportInputMismatch( - @NotNull recognizer: Parser, - @NotNull e: InputMismatchException): void { - let expected = e.expectedTokens; - let expectedString = expected ? expected.toStringVocabulary(recognizer.vocabulary) : ""; - let msg: string = "mismatched input " + this.getTokenErrorDisplay(e.getOffendingToken(recognizer)) + + recognizer: Parser, + e: InputMismatchException): void { + const expected = e.expectedTokens; + const expectedString = expected ? expected.toStringVocabulary(recognizer.vocabulary) : ""; + const msg: string = "mismatched input " + this.getTokenErrorDisplay(e.getOffendingToken(recognizer)) + " expecting " + expectedString; this.notifyErrorListeners(recognizer, msg, e); } @@ -368,10 +369,10 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { * @param e the recognition exception */ protected reportFailedPredicate( - @NotNull recognizer: Parser, - @NotNull e: FailedPredicateException): void { - let ruleName: string = recognizer.ruleNames[recognizer.context.ruleIndex]; - let msg: string = "rule " + ruleName + " " + e.message; + recognizer: Parser, + e: FailedPredicateException): void { + const ruleName: string = recognizer.ruleNames[recognizer.context.ruleIndex]; + const msg: string = "rule " + ruleName + " " + e.message; this.notifyErrorListeners(recognizer, msg, e); } @@ -393,17 +394,17 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { * * @param recognizer the parser instance */ - protected reportUnwantedToken(@NotNull recognizer: Parser): void { + protected reportUnwantedToken(recognizer: Parser): void { if (this.inErrorRecoveryMode(recognizer)) { return; } this.beginErrorCondition(recognizer); - let t: Token = recognizer.currentToken; - let tokenName: string = this.getTokenErrorDisplay(t); - let expecting: IntervalSet = this.getExpectedTokens(recognizer); - let msg: string = "extraneous input " + tokenName + " expecting " + + const t: Token = recognizer.currentToken; + const tokenName: string = this.getTokenErrorDisplay(t); + const expecting: IntervalSet = this.getExpectedTokens(recognizer); + const msg: string = "extraneous input " + tokenName + " expecting " + expecting.toStringVocabulary(recognizer.vocabulary); recognizer.notifyErrorListeners(msg, t, undefined); } @@ -425,16 +426,16 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { * * @param recognizer the parser instance */ - protected reportMissingToken(@NotNull recognizer: Parser): void { + protected reportMissingToken(recognizer: Parser): void { if (this.inErrorRecoveryMode(recognizer)) { return; } this.beginErrorCondition(recognizer); - let t: Token = recognizer.currentToken; - let expecting: IntervalSet = this.getExpectedTokens(recognizer); - let msg: string = "missing " + expecting.toStringVocabulary(recognizer.vocabulary) + + const t: Token = recognizer.currentToken; + const expecting: IntervalSet = this.getExpectedTokens(recognizer); + const msg: string = "missing " + expecting.toStringVocabulary(recognizer.vocabulary) + " at " + this.getTokenErrorDisplay(t); recognizer.notifyErrorListeners(msg, t, undefined); @@ -490,10 +491,10 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { * is in the set of tokens that can follow the `')'` token reference * in rule `atom`. It can assume that you forgot the `')'`. */ - @Override + // @Override public recoverInline(recognizer: Parser): Token { // SINGLE TOKEN DELETION - let matchedSymbol = this.singleTokenDeletion(recognizer); + const matchedSymbol = this.singleTokenDeletion(recognizer); if (matchedSymbol) { // we have deleted the extra token. // now, move past ttype token as if all were ok @@ -531,16 +532,16 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { * @returns `true` if single-token insertion is a viable recovery * strategy for the current mismatched input, otherwise `false` */ - protected singleTokenInsertion(@NotNull recognizer: Parser): boolean { - let currentSymbolType: number = recognizer.inputStream.LA(1); + protected singleTokenInsertion(recognizer: Parser): boolean { + const currentSymbolType: number = recognizer.inputStream.LA(1); // if current token is consistent with what could come after current // ATN state, then we know we're missing a token; error recovery // is free to conjure up and insert the missing token - let currentState = recognizer.interpreter.atn.states[recognizer.state]; - let next: ATNState = currentState.transition(0).target; - let atn: ATN = recognizer.interpreter.atn; - let expectingAtLL2: IntervalSet = atn.nextTokens(next, PredictionContext.fromRuleContext(atn, recognizer.context)); -// console.warn("LT(2) set="+expectingAtLL2.toString(recognizer.getTokenNames())); + const currentState = recognizer.interpreter.atn.states[recognizer.state]; + const next: ATNState = currentState.transition(0).target; + const atn: ATN = recognizer.interpreter.atn; + const expectingAtLL2: IntervalSet = atn.nextTokens(next, PredictionContext.fromRuleContext(atn, recognizer.context)); + // console.warn("LT(2) set="+expectingAtLL2.toString(recognizer.getTokenNames())); if (expectingAtLL2.contains(currentSymbolType)) { this.reportMissingToken(recognizer); return true; @@ -567,9 +568,9 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { * deletion successfully recovers from the mismatched input, otherwise * `undefined` */ - protected singleTokenDeletion(@NotNull recognizer: Parser): Token | undefined { - let nextTokenType: number = recognizer.inputStream.LA(2); - let expecting: IntervalSet = this.getExpectedTokens(recognizer); + protected singleTokenDeletion(recognizer: Parser): Token | undefined { + const nextTokenType: number = recognizer.inputStream.LA(2); + const expecting: IntervalSet = this.getExpectedTokens(recognizer); if (expecting.contains(nextTokenType)) { this.reportUnwantedToken(recognizer); /* @@ -580,7 +581,7 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { */ recognizer.consume(); // simply delete extra token // we want to return the token we're actually matching - let matchedSymbol: Token = recognizer.currentToken; + const matchedSymbol: Token = recognizer.currentToken; this.reportMatch(recognizer); // we know current token is correct return matchedSymbol; } @@ -606,10 +607,10 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { * If you change what tokens must be created by the lexer, * override this method to create the appropriate tokens. */ - @NotNull - protected getMissingSymbol(@NotNull recognizer: Parser): Token { - let currentSymbol: Token = recognizer.currentToken; - let expecting: IntervalSet = this.getExpectedTokens(recognizer); + + protected getMissingSymbol(recognizer: Parser): Token { + const currentSymbol: Token = recognizer.currentToken; + const expecting: IntervalSet = this.getExpectedTokens(recognizer); let expectedTokenType: number = Token.INVALID_TYPE; if (!expecting.isNil) { // get any element @@ -623,7 +624,7 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { tokenText = ""; } let current: Token = currentSymbol; - let lookback = recognizer.inputStream.tryLT(-1); + const lookback = recognizer.inputStream.tryLT(-1); if (current.type === Token.EOF && lookback != null) { current = lookback; } @@ -636,9 +637,9 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { expectedTokenType: number, tokenText: string, current: Token): Token { - let factory: TokenFactory = tokenSource.tokenFactory; - let x = current.tokenSource; - let stream = x ? x.inputStream : undefined; + const factory: TokenFactory = tokenSource.tokenFactory; + const x = current.tokenSource; + const stream = x ? x.inputStream : undefined; return factory.create( { source: tokenSource, stream }, @@ -648,8 +649,8 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { current.line, current.charPositionInLine); } - @NotNull - protected getExpectedTokens(@NotNull recognizer: Parser): IntervalSet { + + protected getExpectedTokens(recognizer: Parser): IntervalSet { return recognizer.getExpectedTokens(); } @@ -676,17 +677,17 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { return this.escapeWSAndQuote(s); } - protected getSymbolText(@NotNull symbol: Token): string | undefined { + protected getSymbolText(symbol: Token): string | undefined { return symbol.text; } - protected getSymbolType(@NotNull symbol: Token): number { + protected getSymbolType(symbol: Token): number { return symbol.type; } - @NotNull - protected escapeWSAndQuote(@NotNull s: string): string { -// if ( s==null ) return s; + + protected escapeWSAndQuote(s: string): string { + // if ( s==null ) return s; s = s.replace("\n", "\\n"); s = s.replace("\r", "\\r"); s = s.replace("\t", "\\t"); @@ -785,31 +786,31 @@ export class DefaultErrorStrategy implements ANTLRErrorStrategy { * Like Grosch I implement context-sensitive FOLLOW sets that are combined * at run-time upon error to avoid overhead during parsing. */ - @NotNull - protected getErrorRecoverySet(@NotNull recognizer: Parser): IntervalSet { - let atn: ATN = recognizer.interpreter.atn; + + protected getErrorRecoverySet(recognizer: Parser): IntervalSet { + const atn: ATN = recognizer.interpreter.atn; let ctx: RuleContext | undefined = recognizer.context; - let recoverSet: IntervalSet = new IntervalSet(); + const recoverSet: IntervalSet = new IntervalSet(); while (ctx && ctx.invokingState >= 0) { // compute what follows who invoked us - let invokingState: ATNState = atn.states[ctx.invokingState]; - let rt = invokingState.transition(0) as RuleTransition; - let follow: IntervalSet = atn.nextTokens(rt.followState); + const invokingState: ATNState = atn.states[ctx.invokingState]; + const rt = invokingState.transition(0) as RuleTransition; + const follow: IntervalSet = atn.nextTokens(rt.followState); recoverSet.addAll(follow); ctx = ctx._parent; } recoverSet.remove(Token.EPSILON); -// System.out.println("recover set "+recoverSet.toString(recognizer.getTokenNames())); + // System.out.println("recover set "+recoverSet.toString(recognizer.getTokenNames())); return recoverSet; } /** Consume tokens until one matches the given token set. */ - protected consumeUntil(@NotNull recognizer: Parser, @NotNull set: IntervalSet): void { -// System.err.println("consumeUntil("+set.toString(recognizer.getTokenNames())+")"); + protected consumeUntil(recognizer: Parser, set: IntervalSet): void { + // System.err.println("consumeUntil("+set.toString(recognizer.getTokenNames())+")"); let ttype: number = recognizer.inputStream.LA(1); while (ttype !== Token.EOF && !set.contains(ttype)) { //System.out.println("consume during recover LA(1)="+getTokenNames()[input.LA(1)]); -// recognizer.inputStream.consume(); + // recognizer.inputStream.consume(); recognizer.consume(); ttype = recognizer.inputStream.LA(1); } diff --git a/src/Dependents.ts b/runtime/typescript/src/Dependents.ts similarity index 100% rename from src/Dependents.ts rename to runtime/typescript/src/Dependents.ts diff --git a/src/DiagnosticErrorListener.ts b/runtime/typescript/src/DiagnosticErrorListener.ts similarity index 58% rename from src/DiagnosticErrorListener.ts rename to runtime/typescript/src/DiagnosticErrorListener.ts index 79be26db..94a7cdcd 100644 --- a/src/DiagnosticErrorListener.ts +++ b/runtime/typescript/src/DiagnosticErrorListener.ts @@ -5,18 +5,19 @@ // ConvertTo-TS run at 2016-10-04T11:26:51.2133685-07:00 -import { ATNConfig } from "./atn/ATNConfig"; -import { ATNConfigSet } from "./atn/ATNConfigSet"; -import { BitSet } from "./misc/BitSet"; -import { DFA } from "./dfa/DFA"; -import { Parser } from "./Parser"; -import { ParserErrorListener } from "./ParserErrorListener"; -import { RecognitionException } from "./RecognitionException"; -import { Recognizer } from "./Recognizer"; -import { SimulatorState } from "./atn/SimulatorState"; -import { Token } from "./Token"; -import { Override, NotNull } from "./Decorators"; -import { Interval } from "./misc/Interval"; +import { + ATNConfig, + ATNConfigSet, + BitSet, + DFA, + Interval, + Parser, + ParserErrorListener, + RecognitionException, + Recognizer, + SimulatorState, + Token +} from "./internal"; /** * This implementation of {@link ANTLRErrorListener} can be used to identify @@ -50,7 +51,7 @@ export class DiagnosticErrorListener implements ParserErrorListener { this.exactOnly = exactOnly; } - @Override + // @Override public syntaxError( /*@NotNull*/ recognizer: Recognizer, @@ -59,73 +60,72 @@ export class DiagnosticErrorListener implements ParserErrorListener { charPositionInLine: number, /*@NotNull*/ msg: string, - e: RecognitionException | undefined): void - { + e: RecognitionException | undefined): void { // intentionally empty } - @Override + // @Override public reportAmbiguity( - @NotNull recognizer: Parser, - @NotNull dfa: DFA, + recognizer: Parser, + dfa: DFA, startIndex: number, stopIndex: number, exact: boolean, ambigAlts: BitSet | undefined, - @NotNull configs: ATNConfigSet): void { + configs: ATNConfigSet): void { if (this.exactOnly && !exact) { return; } - let decision: string = this.getDecisionDescription(recognizer, dfa); - let conflictingAlts: BitSet = this.getConflictingAlts(ambigAlts, configs); - let text: string = recognizer.inputStream.getText(Interval.of(startIndex, stopIndex)); - let message: string = `reportAmbiguity d=${decision}: ambigAlts=${conflictingAlts}, input='${text}'`; + const decision: string = this.getDecisionDescription(recognizer, dfa); + const conflictingAlts: BitSet = this.getConflictingAlts(ambigAlts, configs); + const text: string = recognizer.inputStream.getText(Interval.of(startIndex, stopIndex)); + const message = `reportAmbiguity d=${decision}: ambigAlts=${conflictingAlts}, input='${text}'`; recognizer.notifyErrorListeners(message); } - @Override + // @Override public reportAttemptingFullContext( - @NotNull recognizer: Parser, - @NotNull dfa: DFA, + recognizer: Parser, + dfa: DFA, startIndex: number, stopIndex: number, conflictingAlts: BitSet | undefined, - @NotNull conflictState: SimulatorState): void { - let format: string = "reportAttemptingFullContext d=%s, input='%s'"; - let decision: string = this.getDecisionDescription(recognizer, dfa); - let text: string = recognizer.inputStream.getText(Interval.of(startIndex, stopIndex)); - let message: string = `reportAttemptingFullContext d=${decision}, input='${text}'`; + conflictState: SimulatorState): void { + const format = "reportAttemptingFullContext d=%s, input='%s'"; + const decision: string = this.getDecisionDescription(recognizer, dfa); + const text: string = recognizer.inputStream.getText(Interval.of(startIndex, stopIndex)); + const message = `reportAttemptingFullContext d=${decision}, input='${text}'`; recognizer.notifyErrorListeners(message); } - @Override + // @Override public reportContextSensitivity( - @NotNull recognizer: Parser, - @NotNull dfa: DFA, + recognizer: Parser, + dfa: DFA, startIndex: number, stopIndex: number, prediction: number, - @NotNull acceptState: SimulatorState): void { - let format: string = "reportContextSensitivity d=%s, input='%s'"; - let decision: string = this.getDecisionDescription(recognizer, dfa); - let text: string = recognizer.inputStream.getText(Interval.of(startIndex, stopIndex)); - let message: string = `reportContextSensitivity d=${decision}, input='${text}'`; + acceptState: SimulatorState): void { + const format = "reportContextSensitivity d=%s, input='%s'"; + const decision: string = this.getDecisionDescription(recognizer, dfa); + const text: string = recognizer.inputStream.getText(Interval.of(startIndex, stopIndex)); + const message = `reportContextSensitivity d=${decision}, input='${text}'`; recognizer.notifyErrorListeners(message); } protected getDecisionDescription( - @NotNull recognizer: Parser, - @NotNull dfa: DFA): string { - let decision: number = dfa.decision; - let ruleIndex: number = dfa.atnStartState.ruleIndex; + recognizer: Parser, + dfa: DFA): string { + const decision: number = dfa.decision; + const ruleIndex: number = dfa.atnStartState.ruleIndex; - let ruleNames: string[] = recognizer.ruleNames; + const ruleNames: string[] = recognizer.ruleNames; if (ruleIndex < 0 || ruleIndex >= ruleNames.length) { return decision.toString(); } - let ruleName: string = ruleNames[ruleIndex]; + const ruleName: string = ruleNames[ruleIndex]; if (!ruleName) { return decision.toString(); } @@ -144,14 +144,14 @@ export class DiagnosticErrorListener implements ParserErrorListener { * @returns Returns `reportedAlts` if it is not `undefined`, otherwise * returns the set of alternatives represented in `configs`. */ - @NotNull - protected getConflictingAlts(reportedAlts: BitSet | undefined, @NotNull configs: ATNConfigSet): BitSet { + + protected getConflictingAlts(reportedAlts: BitSet | undefined, configs: ATNConfigSet): BitSet { if (reportedAlts != null) { return reportedAlts; } - let result: BitSet = new BitSet(); - for (let config of configs) { + const result: BitSet = new BitSet(); + for (const config of configs) { result.set(config.alt); } diff --git a/src/FailedPredicateException.ts b/runtime/typescript/src/FailedPredicateException.ts similarity index 70% rename from src/FailedPredicateException.ts rename to runtime/typescript/src/FailedPredicateException.ts index 2d482894..492b0baa 100644 --- a/src/FailedPredicateException.ts +++ b/runtime/typescript/src/FailedPredicateException.ts @@ -5,14 +5,15 @@ // ConvertTo-TS run at 2016-10-04T11:26:51.4099946-07:00 -import { AbstractPredicateTransition } from "./atn/AbstractPredicateTransition"; -import { ATN } from "./atn/ATN"; -import { ATNState } from "./atn/ATNState"; -import { Parser } from "./Parser"; -import { RecognitionException } from "./RecognitionException"; -import { Recognizer } from "./Recognizer"; -import { NotNull } from "./Decorators"; -import { PredicateTransition } from "./atn/PredicateTransition"; +import { + ATN, + ATNState, + AbstractPredicateTransition, + Parser, + PredicateTransition, + RecognitionException, + Recognizer +} from "./internal"; /** A semantic predicate failed during validation. Validation of predicates * occurs when normally parsing the alternative just like matching a token. @@ -26,15 +27,15 @@ export class FailedPredicateException extends RecognitionException { private _predicateIndex: number; private _predicate?: string; - constructor(@NotNull recognizer: Parser, predicate?: string, message?: string) { + constructor(recognizer: Parser, predicate?: string, message?: string) { super( recognizer, recognizer.inputStream, recognizer.context, FailedPredicateException.formatMessage(predicate, message)); - let s: ATNState = recognizer.interpreter.atn.states[recognizer.state]; + const s: ATNState = recognizer.interpreter.atn.states[recognizer.state]; - let trans = s.transition(0) as AbstractPredicateTransition; + const trans = s.transition(0) as AbstractPredicateTransition; if (trans instanceof PredicateTransition) { this._ruleIndex = trans.ruleIndex; this._predicateIndex = trans.predIndex; @@ -60,7 +61,7 @@ export class FailedPredicateException extends RecognitionException { return this._predicate; } - @NotNull + private static formatMessage(predicate: string | undefined, message: string | undefined): string { if (message) { return message; diff --git a/src/InputMismatchException.ts b/runtime/typescript/src/InputMismatchException.ts similarity index 75% rename from src/InputMismatchException.ts rename to runtime/typescript/src/InputMismatchException.ts index 7c04d410..a52a2b53 100644 --- a/src/InputMismatchException.ts +++ b/runtime/typescript/src/InputMismatchException.ts @@ -5,10 +5,11 @@ // ConvertTo-TS run at 2016-10-04T11:26:51.5187682-07:00 -import { RecognitionException } from "./RecognitionException"; -import { NotNull } from "./Decorators"; -import { Parser } from "./Parser"; -import { ParserRuleContext } from "./ParserRuleContext"; +import { + Parser, + ParserRuleContext, + RecognitionException +} from "./internal"; /** This signifies any kind of mismatched input exceptions such as * when the current input does not match the expected token. @@ -18,7 +19,7 @@ export class InputMismatchException extends RecognitionException { constructor(/*@NotNull*/ recognizer: Parser); constructor(/*@NotNull*/ recognizer: Parser, state: number, context: ParserRuleContext); - constructor(@NotNull recognizer: Parser, state?: number, context?: ParserRuleContext) { + constructor(recognizer: Parser, state?: number, context?: ParserRuleContext) { if (context === undefined) { context = recognizer.context; } diff --git a/src/IntStream.ts b/runtime/typescript/src/IntStream.ts similarity index 98% rename from src/IntStream.ts rename to runtime/typescript/src/IntStream.ts index c8e719d1..c1df15c9 100644 --- a/src/IntStream.ts +++ b/runtime/typescript/src/IntStream.ts @@ -10,13 +10,13 @@ export namespace IntStream { * The value returned by {@link #LA LA()} when the end of the stream is * reached. */ - export const EOF: number = -1; + export const EOF = -1; /** * The value returned by {@link #getSourceName} when the actual name of the * underlying source is not known. */ - export const UNKNOWN_SOURCE_NAME: string = ""; + export const UNKNOWN_SOURCE_NAME = ""; } /** diff --git a/src/InterpreterRuleContext.ts b/runtime/typescript/src/InterpreterRuleContext.ts similarity index 93% rename from src/InterpreterRuleContext.ts rename to runtime/typescript/src/InterpreterRuleContext.ts index d24a9092..3d680849 100644 --- a/src/InterpreterRuleContext.ts +++ b/runtime/typescript/src/InterpreterRuleContext.ts @@ -5,8 +5,7 @@ // ConvertTo-TS run at 2016-10-04T11:26:51.5898546-07:00 -import { Override } from "./Decorators"; -import { ParserRuleContext } from "./ParserRuleContext"; +import { ParserRuleContext } from "./internal"; /** * This class extends {@link ParserRuleContext} by allowing the value of @@ -47,7 +46,7 @@ export class InterpreterRuleContext extends ParserRuleContext { this._ruleIndex = ruleIndex; } - @Override + // @Override get ruleIndex(): number { return this._ruleIndex; } diff --git a/src/Lexer.ts b/runtime/typescript/src/Lexer.ts similarity index 85% rename from src/Lexer.ts rename to runtime/typescript/src/Lexer.ts index e30aecd7..ae8e1c71 100644 --- a/src/Lexer.ts +++ b/runtime/typescript/src/Lexer.ts @@ -5,20 +5,21 @@ // ConvertTo-TS run at 2016-10-04T11:26:51.7913318-07:00 -import { ANTLRErrorListener } from "./ANTLRErrorListener"; -import { CharStream } from "./CharStream"; -import { CommonTokenFactory } from "./CommonTokenFactory"; -import { IntegerStack } from "./misc/IntegerStack"; -import { Interval } from "./misc/Interval"; -import { IntStream } from "./IntStream"; -import { LexerATNSimulator } from "./atn/LexerATNSimulator"; -import { LexerNoViableAltException } from "./LexerNoViableAltException"; -import { Override } from "./Decorators"; -import { RecognitionException } from "./RecognitionException"; -import { Recognizer } from "./Recognizer"; -import { Token } from "./Token"; -import { TokenFactory } from "./TokenFactory"; -import { TokenSource } from "./TokenSource"; +import { + ANTLRErrorListener, + CharStream, + CommonTokenFactory, + IntStream, + IntegerStack, + Interval, + LexerATNSimulator, + LexerNoViableAltException, + RecognitionException, + Recognizer, + Token, + TokenFactory, + TokenSource +} from "./internal"; /** A lexer is recognizer that draws input symbols from a character stream. * lexer grammars result in a subclass of this object. A Lexer object @@ -44,7 +45,7 @@ export abstract class Lexer extends Recognizer public _input: CharStream; - protected _tokenFactorySourcePair: { source: TokenSource, stream: CharStream }; + protected _tokenFactorySourcePair: { source: TokenSource; stream: CharStream }; /** How to create token objects */ protected _factory: TokenFactory = CommonTokenFactory.DEFAULT; @@ -63,24 +64,24 @@ export abstract class Lexer extends Recognizer * Needed, for example, to get the text for current token. Set at * the start of nextToken. */ - public _tokenStartCharIndex: number = -1; + public _tokenStartCharIndex = -1; /** The line on which the first character of the token resides */ - public _tokenStartLine: number = 0; + public _tokenStartLine = 0; /** The character position of first character within the line */ - public _tokenStartCharPositionInLine: number = 0; + public _tokenStartCharPositionInLine = 0; /** Once we see EOF on char stream, next token will be EOF. * If you have DONE : EOF ; then you see DONE EOF. */ - public _hitEOF: boolean = false; + public _hitEOF = false; /** The channel number for the current token */ - public _channel: number = 0; + public _channel = 0; /** The token type for the current token */ - public _type: number = 0; + public _type = 0; public readonly _modeStack: IntegerStack = new IntegerStack(); public _mode: number = Lexer.DEFAULT_MODE; @@ -122,7 +123,7 @@ export abstract class Lexer extends Recognizer /** Return a token from this source; i.e., match a token on the char * stream. */ - @Override + // @Override public nextToken(): Token { if (this._input == null) { throw new Error("nextToken requires a non-null input stream."); @@ -130,7 +131,7 @@ export abstract class Lexer extends Recognizer // Mark start location in char stream so unbuffered streams are // guaranteed at least have text of current token - let tokenStartMarker: number = this._input.mark(); + const tokenStartMarker: number = this._input.mark(); try { outer: while (true) { @@ -146,9 +147,9 @@ export abstract class Lexer extends Recognizer this._text = undefined; do { this._type = Token.INVALID_TYPE; -// System.out.println("nextToken line "+tokenStartLine+" at "+((char)input.LA(1))+ -// " in mode "+mode+ -// " at index "+input.index); + // System.out.println("nextToken line "+tokenStartLine+" at "+((char)input.LA(1))+ + // " in mode "+mode+ + // " at index "+input.index); let ttype: number; try { ttype = this.interpreter.match(this._input, this._mode); @@ -222,7 +223,7 @@ export abstract class Lexer extends Recognizer return this._mode; } - @Override + // @Override get tokenFactory(): TokenFactory { return this._factory; } @@ -232,7 +233,7 @@ export abstract class Lexer extends Recognizer this._factory = factory; } - @Override + // @Override get inputStream(): CharStream { return this._input; } @@ -244,7 +245,7 @@ export abstract class Lexer extends Recognizer this._tokenFactorySourcePair = { source: this, stream: this._input }; } - @Override + // @Override get sourceName(): string { return this._input.sourceName; } @@ -277,9 +278,9 @@ export abstract class Lexer extends Recognizer } public emitEOF(): Token { - let cpos: number = this.charPositionInLine; - let line: number = this.line; - let eof: Token = this._factory.create( + const cpos: number = this.charPositionInLine; + const line: number = this.line; + const eof: Token = this._factory.create( this._tokenFactorySourcePair, Token.EOF, undefined, Token.DEFAULT_CHANNEL, this._input.index, this._input.index - 1, line, cpos); @@ -287,7 +288,7 @@ export abstract class Lexer extends Recognizer return eof; } - @Override + // @Override get line(): number { return this.interpreter.line; } @@ -296,7 +297,7 @@ export abstract class Lexer extends Recognizer this.interpreter.line = line; } - @Override + // @Override get charPositionInLine(): number { return this.interpreter.charPositionInLine; } @@ -358,7 +359,7 @@ export abstract class Lexer extends Recognizer * Forces load of all tokens. Does not include EOF token. */ public getAllTokens(): Token[] { - let tokens: Token[] = []; + const tokens: Token[] = []; let t: Token = this.nextToken(); while (t.type !== Token.EOF) { tokens.push(t); @@ -368,12 +369,12 @@ export abstract class Lexer extends Recognizer } public notifyListeners(e: LexerNoViableAltException): void { - let text: string = this._input.getText( + const text: string = this._input.getText( Interval.of(this._tokenStartCharIndex, this._input.index)); - let msg: string = "token recognition error at: '" + + const msg: string = "token recognition error at: '" + this.getErrorDisplay(text) + "'"; - let listener: ANTLRErrorListener = this.getErrorListenerDispatch(); + const listener: ANTLRErrorListener = this.getErrorListenerDispatch(); if (listener.syntaxError) { listener.syntaxError(this, undefined, this._tokenStartLine, this._tokenStartCharPositionInLine, msg, e); } @@ -382,14 +383,14 @@ export abstract class Lexer extends Recognizer public getErrorDisplay(s: string | number): string { if (typeof s === "number") { switch (s) { - case Token.EOF: - return ""; - case 0x0a: - return "\\n"; - case 0x09: - return "\\t"; - case 0x0d: - return "\\r"; + case Token.EOF: + return ""; + case 0x0a: + return "\\n"; + case 0x09: + return "\\t"; + case 0x0d: + return "\\r"; } return String.fromCharCode(s); } @@ -399,7 +400,7 @@ export abstract class Lexer extends Recognizer } public getCharErrorDisplay(c: number): string { - let s: string = this.getErrorDisplay(c); + const s: string = this.getErrorDisplay(c); return "'" + s + "'"; } diff --git a/src/LexerInterpreter.ts b/runtime/typescript/src/LexerInterpreter.ts similarity index 68% rename from src/LexerInterpreter.ts rename to runtime/typescript/src/LexerInterpreter.ts index be9e79bf..71c92659 100644 --- a/src/LexerInterpreter.ts +++ b/runtime/typescript/src/LexerInterpreter.ts @@ -5,14 +5,14 @@ // ConvertTo-TS run at 2016-10-04T11:26:51.9954566-07:00 -import { ATN } from "./atn/ATN"; -import { ATNType } from "./atn/ATNType"; -import { CharStream } from "./CharStream"; -import { Lexer } from "./Lexer"; -import { LexerATNSimulator } from "./atn/LexerATNSimulator"; -import { NotNull } from "./Decorators"; -import { Override } from "./Decorators"; -import { Vocabulary } from "./Vocabulary"; +import { + ATN, + ATNType, + CharStream, + Lexer, + LexerATNSimulator, + Vocabulary +} from "./internal"; export class LexerInterpreter extends Lexer { protected _grammarFileName: string; @@ -21,10 +21,10 @@ export class LexerInterpreter extends Lexer { protected _ruleNames: string[]; protected _channelNames: string[]; protected _modeNames: string[]; - @NotNull + private _vocabulary: Vocabulary; - constructor(grammarFileName: string, @NotNull vocabulary: Vocabulary, ruleNames: string[], channelNames: string[], modeNames: string[], atn: ATN, input: CharStream) { + constructor(grammarFileName: string, vocabulary: Vocabulary, ruleNames: string[], channelNames: string[], modeNames: string[], atn: ATN, input: CharStream) { super(input); if (atn.grammarType !== ATNType.LEXER) { @@ -41,32 +41,32 @@ export class LexerInterpreter extends Lexer { this._interp = new LexerATNSimulator(atn, this); } - @Override + // @Override get atn(): ATN { return this._atn; } - @Override + // @Override get grammarFileName(): string { return this._grammarFileName; } - @Override + // @Override get ruleNames(): string[] { return this._ruleNames; } - @Override + // @Override get channelNames(): string[] { return this._channelNames; } - @Override + // @Override get modeNames(): string[] { return this._modeNames; } - @Override + // @Override get vocabulary(): Vocabulary { return this._vocabulary; } diff --git a/src/LexerNoViableAltException.ts b/runtime/typescript/src/LexerNoViableAltException.ts similarity index 79% rename from src/LexerNoViableAltException.ts rename to runtime/typescript/src/LexerNoViableAltException.ts index 738e681f..4878cf82 100644 --- a/src/LexerNoViableAltException.ts +++ b/runtime/typescript/src/LexerNoViableAltException.ts @@ -5,13 +5,15 @@ // ConvertTo-TS run at 2016-10-04T11:26:52.0961136-07:00 -import { ATNConfigSet } from "./atn/ATNConfigSet"; -import { RecognitionException } from "./RecognitionException"; -import { NotNull, Override } from "./Decorators"; -import { Lexer } from "./Lexer"; -import { CharStream } from "./CharStream"; -import { Interval } from "./misc/Interval"; -import * as Utils from "./misc/Utils"; +import * as Utils from "./internal"; + +import { + ATNConfigSet, + CharStream, + Interval, + Lexer, + RecognitionException +} from "./internal"; export class LexerNoViableAltException extends RecognitionException { //private static serialVersionUID: number = -730999203913001726L; @@ -24,7 +26,7 @@ export class LexerNoViableAltException extends RecognitionException { constructor( lexer: Lexer | undefined, - @NotNull input: CharStream, + input: CharStream, startIndex: number, deadEndConfigs: ATNConfigSet | undefined) { super(lexer, input); @@ -40,12 +42,12 @@ export class LexerNoViableAltException extends RecognitionException { return this._deadEndConfigs; } - @Override + // @Override get inputStream(): CharStream { return super.inputStream as CharStream; } - @Override + // @Override public toString(): string { let symbol = ""; if (this._startIndex >= 0 && this._startIndex < this.inputStream.size) { diff --git a/src/ListTokenSource.ts b/runtime/typescript/src/ListTokenSource.ts similarity index 82% rename from src/ListTokenSource.ts rename to runtime/typescript/src/ListTokenSource.ts index 6aaeba0f..c826cd2b 100644 --- a/src/ListTokenSource.ts +++ b/runtime/typescript/src/ListTokenSource.ts @@ -5,12 +5,13 @@ // ConvertTo-TS run at 2016-10-04T11:26:52.1916955-07:00 -import { CharStream } from "./CharStream"; -import { CommonTokenFactory } from "./CommonTokenFactory"; -import { NotNull, Override } from "./Decorators"; -import { Token } from "./Token"; -import { TokenFactory } from "./TokenFactory"; -import { TokenSource } from "./TokenSource"; +import { + CharStream, + CommonTokenFactory, + Token, + TokenFactory, + TokenSource +} from "./internal"; /** * Provides an implementation of {@link TokenSource} as a wrapper around a list @@ -39,7 +40,7 @@ export class ListTokenSource implements TokenSource { * {@link #nextToken}. The end of the input is indicated by this value * being greater than or equal to the number of items in {@link #tokens}. */ - protected i: number = 0; + protected i = 0; /** * This field caches the EOF token for the token source. @@ -65,7 +66,7 @@ export class ListTokenSource implements TokenSource { * * @exception NullPointerException if `tokens` is `undefined` */ - constructor(@NotNull tokens: Token[], sourceName?: string) { + constructor(tokens: Token[], sourceName?: string) { if (tokens == null) { throw new Error("tokens cannot be null"); } @@ -77,7 +78,7 @@ export class ListTokenSource implements TokenSource { /** * {@inheritDoc} */ - @Override + // @Override get charPositionInLine(): number { if (this.i < this.tokens.length) { return this.tokens[this.i].charPositionInLine; @@ -86,10 +87,10 @@ export class ListTokenSource implements TokenSource { } else if (this.tokens.length > 0) { // have to calculate the result from the line/column of the previous // token, along with the text of the token. - let lastToken: Token = this.tokens[this.tokens.length - 1]; - let tokenText: string | undefined = lastToken.text; + const lastToken: Token = this.tokens[this.tokens.length - 1]; + const tokenText: string | undefined = lastToken.text; if (tokenText != null) { - let lastNewLine: number = tokenText.lastIndexOf("\n"); + const lastNewLine: number = tokenText.lastIndexOf("\n"); if (lastNewLine >= 0) { return tokenText.length - lastNewLine - 1; } @@ -106,26 +107,26 @@ export class ListTokenSource implements TokenSource { /** * {@inheritDoc} */ - @Override + // @Override public nextToken(): Token { if (this.i >= this.tokens.length) { if (this.eofToken == null) { - let start: number = -1; + let start = -1; if (this.tokens.length > 0) { - let previousStop: number = this.tokens[this.tokens.length - 1].stopIndex; + const previousStop: number = this.tokens[this.tokens.length - 1].stopIndex; if (previousStop !== -1) { start = previousStop + 1; } } - let stop: number = Math.max(-1, start - 1); + const stop: number = Math.max(-1, start - 1); this.eofToken = this._factory.create({ source: this, stream: this.inputStream }, Token.EOF, "EOF", Token.DEFAULT_CHANNEL, start, stop, this.line, this.charPositionInLine); } return this.eofToken; } - let t: Token = this.tokens[this.i]; + const t: Token = this.tokens[this.i]; if (this.i === this.tokens.length - 1 && t.type === Token.EOF) { this.eofToken = t; } @@ -137,7 +138,7 @@ export class ListTokenSource implements TokenSource { /** * {@inheritDoc} */ - @Override + // @Override get line(): number { if (this.i < this.tokens.length) { return this.tokens[this.i].line; @@ -146,10 +147,10 @@ export class ListTokenSource implements TokenSource { } else if (this.tokens.length > 0) { // have to calculate the result from the line/column of the previous // token, along with the text of the token. - let lastToken: Token = this.tokens[this.tokens.length - 1]; + const lastToken: Token = this.tokens[this.tokens.length - 1]; let line: number = lastToken.line; - let tokenText: string | undefined = lastToken.text; + const tokenText: string | undefined = lastToken.text; if (tokenText != null) { for (let i = 0; i < tokenText.length; i++) { if (tokenText.charAt(i) === "\n") { @@ -170,7 +171,7 @@ export class ListTokenSource implements TokenSource { /** * {@inheritDoc} */ - @Override + // @Override get inputStream(): CharStream | undefined { if (this.i < this.tokens.length) { return this.tokens[this.i].inputStream; @@ -187,13 +188,13 @@ export class ListTokenSource implements TokenSource { /** * {@inheritDoc} */ - @Override + // @Override get sourceName(): string { if (this._sourceName) { return this._sourceName; } - let inputStream: CharStream | undefined = this.inputStream; + const inputStream: CharStream | undefined = this.inputStream; if (inputStream != null) { return inputStream.sourceName; } @@ -205,15 +206,15 @@ export class ListTokenSource implements TokenSource { * {@inheritDoc} */ // @Override - set tokenFactory(@NotNull factory: TokenFactory) { + set tokenFactory(factory: TokenFactory) { this._factory = factory; } /** * {@inheritDoc} */ - @Override - @NotNull + // @Override + get tokenFactory(): TokenFactory { return this._factory; } diff --git a/src/NoViableAltException.ts b/runtime/typescript/src/NoViableAltException.ts similarity index 84% rename from src/NoViableAltException.ts rename to runtime/typescript/src/NoViableAltException.ts index 5fcb7b99..330151f9 100644 --- a/src/NoViableAltException.ts +++ b/runtime/typescript/src/NoViableAltException.ts @@ -5,15 +5,16 @@ // ConvertTo-TS run at 2016-10-04T11:26:52.3255548-07:00 -import { ATNConfigSet } from "./atn/ATNConfigSet"; -import { Parser } from "./Parser"; -import { ParserRuleContext } from "./ParserRuleContext"; -import { RecognitionException } from "./RecognitionException"; -import { Recognizer } from "./Recognizer"; -import { Token } from "./Token"; -import { TokenStream } from "./TokenStream"; -import { IntStream } from "./IntStream"; -import { NotNull } from "./Decorators"; +import { + ATNConfigSet, + IntStream, + Parser, + ParserRuleContext, + RecognitionException, + Recognizer, + Token, + TokenStream +} from "./internal"; /** Indicates that the parser could not decide which of two or more paths * to take based upon the remaining input. It tracks the starting token @@ -31,7 +32,7 @@ export class NoViableAltException extends RecognitionException { * time the error occurred, of course the stream needs to keep a * buffer all of the tokens but later we might not have access to those.) */ - @NotNull + private _startToken: Token; constructor(/*@NotNull*/ recognizer: Parser); diff --git a/src/Parser.ts b/runtime/typescript/src/Parser.ts similarity index 81% rename from src/Parser.ts rename to runtime/typescript/src/Parser.ts index fdf8dea8..6b242238 100644 --- a/src/Parser.ts +++ b/runtime/typescript/src/Parser.ts @@ -5,66 +5,69 @@ // ConvertTo-TS run at 2016-10-04T11:26:52.4399193-07:00 +import * as Utils from "./internal"; import * as assert from "assert"; -import * as Utils from "./misc/Utils"; - -import { ANTLRErrorListener } from "./ANTLRErrorListener"; -import { ANTLRErrorStrategy } from "./ANTLRErrorStrategy"; -import { ATN } from "./atn/ATN"; -import { ATNDeserializationOptions } from "./atn/ATNDeserializationOptions"; -import { ATNDeserializer } from "./atn/ATNDeserializer"; -import { ATNSimulator } from "./atn/ATNSimulator"; -import { ATNState } from "./atn/ATNState"; -import { DefaultErrorStrategy } from "./DefaultErrorStrategy"; -import { DFA } from "./dfa/DFA"; -import { ErrorNode } from "./tree/ErrorNode"; -import { IntegerStack } from "./misc/IntegerStack"; -import { IntervalSet } from "./misc/IntervalSet"; -import { IntStream } from "./IntStream"; -import { Lexer } from "./Lexer"; -import { Override, NotNull, Nullable } from "./Decorators"; -import { ParseInfo } from "./atn/ParseInfo"; -import { ParserATNSimulator } from "./atn/ParserATNSimulator"; -import { ParserErrorListener } from "./ParserErrorListener"; -import { ParserRuleContext } from "./ParserRuleContext"; -import { ParseTreeListener } from "./tree/ParseTreeListener"; -import { ParseTreePattern } from "./tree/pattern/ParseTreePattern"; -import { ProxyParserErrorListener } from "./ProxyParserErrorListener"; -import { RecognitionException } from "./RecognitionException"; -import { Recognizer } from "./Recognizer"; -import { RuleContext } from "./RuleContext"; -import { RuleTransition } from "./atn/RuleTransition"; -import { TerminalNode } from "./tree/TerminalNode"; -import { Token } from "./Token"; -import { TokenFactory } from "./TokenFactory"; -import { TokenSource } from "./TokenSource"; -import { TokenStream } from "./TokenStream"; + +import { + ANTLRErrorListener, + ANTLRErrorStrategy, + ATN, + ATNDeserializationOptions, + ATNDeserializer, + ATNSimulator, + ATNState, + DFA, + DefaultErrorStrategy, + ErrorNode, + IntStream, + IntegerStack, + IntervalSet, + Lexer, + ParseInfo, + ParseTreeListener, + ParseTreePattern, + ParseTreePatternMatcher, + ParserATNSimulator, + ParserErrorListener, + ParserRuleContext, + ProfilingATNSimulator, + ProxyParserErrorListener, + RecognitionException, + Recognizer, + RuleContext, + RuleTransition, + TerminalNode, + Token, + TokenFactory, + TokenSource, + TokenStream +} from "./internal"; class TraceListener implements ParseTreeListener { constructor(private ruleNames: string[], private tokenStream: TokenStream) { } - @Override + // @Override public enterEveryRule(ctx: ParserRuleContext): void { console.log("enter " + this.ruleNames[ctx.ruleIndex] + ", LT(1)=" + this.tokenStream.LT(1).text); } - @Override + // @Override public exitEveryRule(ctx: ParserRuleContext): void { console.log("exit " + this.ruleNames[ctx.ruleIndex] + ", LT(1)=" + this.tokenStream.LT(1).text); } - @Override + // @Override public visitErrorNode(node: ErrorNode): void { // intentionally empty } - @Override + // @Override public visitTerminal(node: TerminalNode): void { - let parent = node.parent!.ruleContext; - let token: Token = node.symbol; + const parent = node.parent!.ruleContext; + const token: Token = node.symbol; console.log("consume " + token + " rule " + this.ruleNames[parent.ruleIndex]); } } @@ -86,7 +89,7 @@ export abstract class Parser extends Recognizer { * @see #getErrorHandler * @see #setErrorHandler */ - @NotNull + protected _errHandler: ANTLRErrorStrategy = new DefaultErrorStrategy(); /** @@ -112,7 +115,7 @@ export abstract class Parser extends Recognizer { * * @see `buildParseTree` */ - private _buildParseTrees: boolean = true; + private _buildParseTrees = true; /** * When {@link #setTrace}`(true)` is called, a reference to the @@ -135,10 +138,10 @@ export abstract class Parser extends Recognizer { * The number of syntax errors reported during parsing. This value is * incremented each time {@link #notifyErrorListeners} is called. */ - protected _syntaxErrors: number = 0; + protected _syntaxErrors = 0; /** Indicates parser has match()ed EOF token. See {@link #exitRule()}. */ - protected matchedEOF: boolean = false; + protected matchedEOF = false; constructor(input: TokenStream) { super(); @@ -162,7 +165,7 @@ export abstract class Parser extends Recognizer { this.isTrace = false; this._precedenceStack.clear(); this._precedenceStack.push(0); - let interpreter: ATNSimulator = this.interpreter; + const interpreter: ATNSimulator = this.interpreter; if (interpreter != null) { interpreter.reset(); } @@ -187,7 +190,7 @@ export abstract class Parser extends Recognizer { * `ttype` and the error strategy could not recover from the * mismatched symbol */ - @NotNull + public match(ttype: number): Token { let t: Token = this.currentToken; if (t.type === ttype) { @@ -226,7 +229,7 @@ export abstract class Parser extends Recognizer { * a wildcard and the error strategy could not recover from the mismatched * symbol */ - @NotNull + public matchWildcard(): Token { let t: Token = this.currentToken; if (t.type > 0) { @@ -275,7 +278,7 @@ export abstract class Parser extends Recognizer { return this._buildParseTrees; } - @NotNull + public getParseListeners(): ParseTreeListener[] { return this._parseListeners; } @@ -307,7 +310,7 @@ export abstract class Parser extends Recognizer { * * @throws {@link TypeError} if `listener` is `undefined` */ - public addParseListener(@NotNull listener: ParseTreeListener): void { + public addParseListener(listener: ParseTreeListener): void { if (listener == null) { throw new TypeError("listener cannot be null"); } @@ -326,13 +329,12 @@ export abstract class Parser extends Recognizer { * @param listener the listener to remove */ public removeParseListener(listener: ParseTreeListener): void { - let index = this._parseListeners.findIndex((l) => l === listener); + const index = this._parseListeners.findIndex((l) => l === listener); if (index !== -1) { this._parseListeners.splice(index, 1); } } - /** * Remove all parse listeners. * @@ -348,7 +350,7 @@ export abstract class Parser extends Recognizer { * @see #addParseListener */ protected triggerEnterRuleEvent(): void { - for (let listener of this._parseListeners) { + for (const listener of this._parseListeners) { if (listener.enterEveryRule) { listener.enterEveryRule(this._ctx); } @@ -365,7 +367,7 @@ export abstract class Parser extends Recognizer { protected triggerExitRuleEvent(): void { // reverse order walk of listeners for (let i = this._parseListeners.length - 1; i >= 0; i--) { - let listener: ParseTreeListener = this._parseListeners[i]; + const listener: ParseTreeListener = this._parseListeners[i]; this._ctx.exitRule(listener); if (listener.exitEveryRule) { listener.exitEveryRule(this._ctx); @@ -394,16 +396,16 @@ export abstract class Parser extends Recognizer { * @ if the current parser does not * implement the `serializedATN` property. */ - @NotNull + public getATNWithBypassAlts(): ATN { - let serializedAtn: string = this.serializedATN; + const serializedAtn: string = this.serializedATN; if (serializedAtn == null) { throw new Error("The current parser does not support an ATN with bypass alternatives."); } let result = Parser.bypassAltsAtnCache.get(serializedAtn); if (result == null) { - let deserializationOptions: ATNDeserializationOptions = new ATNDeserializationOptions(); + const deserializationOptions: ATNDeserializationOptions = new ATNDeserializationOptions(); deserializationOptions.isGenerateRuleBypassTransitions = true; result = new ATNDeserializer(deserializationOptions).deserialize(Utils.toCharArray(serializedAtn)); Parser.bypassAltsAtnCache.set(serializedAtn, result); @@ -423,18 +425,18 @@ export abstract class Parser extends Recognizer { * let id: string = m.get("ID"); * ``` */ - public compileParseTreePattern(pattern: string, patternRuleIndex: number): Promise; + public compileParseTreePattern(pattern: string, patternRuleIndex: number): ParseTreePattern; /** * The same as {@link #compileParseTreePattern(String, int)} but specify a * {@link Lexer} rather than trying to deduce it from this parser. */ - public compileParseTreePattern(pattern: string, patternRuleIndex: number, lexer?: Lexer): Promise; + public compileParseTreePattern(pattern: string, patternRuleIndex: number, lexer?: Lexer): ParseTreePattern; - public async compileParseTreePattern(pattern: string, patternRuleIndex: number, lexer?: Lexer): Promise { + public compileParseTreePattern(pattern: string, patternRuleIndex: number, lexer?: Lexer): ParseTreePattern { if (!lexer) { if (this.inputStream) { - let tokenSource = this.inputStream.tokenSource; + const tokenSource = this.inputStream.tokenSource; if (tokenSource instanceof Lexer) { lexer = tokenSource; } @@ -445,22 +447,21 @@ export abstract class Parser extends Recognizer { } } - let currentLexer = lexer; - let m = await import("./tree/pattern/ParseTreePatternMatcher"); - let matcher = new m.ParseTreePatternMatcher(currentLexer, this); + const currentLexer = lexer; + const matcher = new ParseTreePatternMatcher(currentLexer, this); return matcher.compile(pattern, patternRuleIndex); } - @NotNull + get errorHandler(): ANTLRErrorStrategy { return this._errHandler; } - set errorHandler(@NotNull handler: ANTLRErrorStrategy) { + set errorHandler(handler: ANTLRErrorStrategy) { this._errHandler = handler; } - @Override + // @Override get inputStream(): TokenStream { return this._input; } @@ -474,7 +475,7 @@ export abstract class Parser extends Recognizer { /** Match needs to return the current input symbol, which gets put * into the label for the associated token ref; e.g., x=ID. */ - @NotNull + get currentToken(): Token { return this._input.LT(1); } @@ -490,14 +491,14 @@ export abstract class Parser extends Recognizer { } this._syntaxErrors++; - let line: number = -1; - let charPositionInLine: number = -1; + let line = -1; + let charPositionInLine = -1; if (offendingToken != null) { line = offendingToken.line; charPositionInLine = offendingToken.charPositionInLine; } - let listener = this.getErrorListenerDispatch(); + const listener = this.getErrorListenerDispatch(); if (listener.syntaxError) { listener.syntaxError(this, offendingToken, line, charPositionInLine, msg, e); } @@ -525,16 +526,16 @@ export abstract class Parser extends Recognizer { * listeners. */ public consume(): Token { - let o: Token = this.currentToken; + const o: Token = this.currentToken; if (o.type !== Parser.EOF) { this.inputStream.consume(); } - let hasListener: boolean = this._parseListeners.length !== 0; + const hasListener: boolean = this._parseListeners.length !== 0; if (this._buildParseTrees || hasListener) { if (this._errHandler.inErrorRecoveryMode(this)) { - let node: ErrorNode = this._ctx.addErrorNode(this.createErrorNode(this._ctx, o)); + const node: ErrorNode = this._ctx.addErrorNode(this.createErrorNode(this._ctx, o)); if (hasListener) { - for (let listener of this._parseListeners) { + for (const listener of this._parseListeners) { if (listener.visitErrorNode) { listener.visitErrorNode(node); } @@ -542,10 +543,10 @@ export abstract class Parser extends Recognizer { } } else { - let node: TerminalNode = this.createTerminalNode(this._ctx, o); + const node: TerminalNode = this.createTerminalNode(this._ctx, o); this._ctx.addChild(node); if (hasListener) { - for (let listener of this._parseListeners) { + for (const listener of this._parseListeners) { if (listener.visitTerminal) { listener.visitTerminal(node); } @@ -577,7 +578,7 @@ export abstract class Parser extends Recognizer { } protected addContextToParseTree(): void { - let parent = this._ctx._parent as ParserRuleContext | undefined; + const parent = this._ctx._parent as ParserRuleContext | undefined; // add current context to parent if we have a parent if (parent != null) { parent.addChild(this._ctx); @@ -588,7 +589,7 @@ export abstract class Parser extends Recognizer { * Always called by generated parsers upon entry to a rule. Access field * {@link #_ctx} get the current context. */ - public enterRule(@NotNull localctx: ParserRuleContext, state: number, ruleIndex: number): void { + public enterRule(localctx: ParserRuleContext, state: number, ruleIndex: number): void { this.state = state; this._ctx = localctx; this._ctx._start = this._input.LT(1); @@ -601,7 +602,7 @@ export abstract class Parser extends Recognizer { public enterLeftFactoredRule(localctx: ParserRuleContext, state: number, ruleIndex: number): void { this.state = state; if (this._buildParseTrees) { - let factoredContext = this._ctx.getChild(this._ctx.childCount - 1) as ParserRuleContext; + const factoredContext = this._ctx.getChild(this._ctx.childCount - 1) as ParserRuleContext; this._ctx.removeLastChild(); factoredContext._parent = localctx; localctx.addChild(factoredContext); @@ -635,7 +636,7 @@ export abstract class Parser extends Recognizer { // if we have new localctx, make sure we replace existing ctx // that is previous child of parse tree if (this._buildParseTrees && this._ctx !== localctx) { - let parent = this._ctx._parent as ParserRuleContext | undefined; + const parent = this._ctx._parent as ParserRuleContext | undefined; if (parent != null) { parent.removeLastChild(); parent.addChild(localctx); @@ -670,7 +671,7 @@ export abstract class Parser extends Recognizer { * Make the current context the child of the incoming localctx. */ public pushNewRecursionContext(localctx: ParserRuleContext, state: number, ruleIndex: number): void { - let previous: ParserRuleContext = this._ctx; + const previous: ParserRuleContext = this._ctx; previous._parent = localctx; previous.invokingState = state; previous._stop = this._input.tryLT(-1); @@ -687,7 +688,7 @@ export abstract class Parser extends Recognizer { public unrollRecursionContexts(_parentctx: ParserRuleContext): void { this._precedenceStack.pop(); this._ctx._stop = this._input.tryLT(-1); - let retctx: ParserRuleContext = this._ctx; // save current ctx (return value) + const retctx: ParserRuleContext = this._ctx; // save current ctx (return value) // unroll so _ctx is as it was before call to recursive method if (this._parseListeners.length > 0) { @@ -725,12 +726,12 @@ export abstract class Parser extends Recognizer { this._ctx = ctx; } - @Override - public precpred(@Nullable localctx: RuleContext, precedence: number): boolean { + // @Override + public precpred(localctx: RuleContext, precedence: number): boolean { return precedence >= this._precedenceStack.peek(); } - @Override + // @Override public getErrorListenerDispatch(): ParserErrorListener { return new ProxyParserErrorListener(this.getErrorListeners()); } @@ -755,22 +756,22 @@ export abstract class Parser extends Recognizer { * the ATN, otherwise `false`. */ public isExpectedToken(symbol: number): boolean { -// return interpreter.atn.nextTokens(_ctx); - let atn: ATN = this.interpreter.atn; + // return interpreter.atn.nextTokens(_ctx); + const atn: ATN = this.interpreter.atn; let ctx: ParserRuleContext = this._ctx; - let s: ATNState = atn.states[this.state]; + const s: ATNState = atn.states[this.state]; let following: IntervalSet = atn.nextTokens(s); if (following.contains(symbol)) { return true; } -// System.out.println("following "+s+"="+following); + // System.out.println("following "+s+"="+following); if (!following.contains(Token.EPSILON)) { return false; } while (ctx != null && ctx.invokingState >= 0 && following.contains(Token.EPSILON)) { - let invokingState: ATNState = atn.states[ctx.invokingState]; - let rt = invokingState.transition(0) as RuleTransition; + const invokingState: ATNState = atn.states[ctx.invokingState]; + const rt = invokingState.transition(0) as RuleTransition; following = atn.nextTokens(rt.followState); if (following.contains(symbol)) { return true; @@ -797,21 +798,21 @@ export abstract class Parser extends Recognizer { * * @see ATN#getExpectedTokens(int, RuleContext) */ - @NotNull + public getExpectedTokens(): IntervalSet { return this.atn.getExpectedTokens(this.state, this.context); } - @NotNull + public getExpectedTokensWithinCurrentRule(): IntervalSet { - let atn: ATN = this.interpreter.atn; - let s: ATNState = atn.states[this.state]; + const atn: ATN = this.interpreter.atn; + const s: ATNState = atn.states[this.state]; return atn.nextTokens(s); } /** Get a rule's index (i.e., `RULE_ruleName` field) or -1 if not found. */ public getRuleIndex(ruleName: string): number { - let ruleIndex = this.getRuleIndexMap().get(ruleName); + const ruleIndex = this.getRuleIndexMap().get(ruleName); if (ruleIndex != null) { return ruleIndex; } @@ -830,11 +831,11 @@ export abstract class Parser extends Recognizer { public getRuleInvocationStack(ctx: RuleContext = this._ctx): string[] { let p: RuleContext | undefined = ctx; // Workaround for Microsoft/TypeScript#14487 - let ruleNames: string[] = this.ruleNames; - let stack: string[] = []; + const ruleNames: string[] = this.ruleNames; + const stack: string[] = []; while (p != null) { // compute what follows who invoked us - let ruleIndex: number = p.ruleIndex; + const ruleIndex: number = p.ruleIndex; if (ruleIndex < 0) { stack.push("n/a"); } else { @@ -847,8 +848,8 @@ export abstract class Parser extends Recognizer { /** For debugging and other purposes. */ public getDFAStrings(): string[] { - let s: string[] = []; - for (let dfa of this._interp.atn.decisionToDFA) { + const s: string[] = []; + for (const dfa of this._interp.atn.decisionToDFA) { s.push(dfa.toString(this.vocabulary, this.ruleNames)); } return s; @@ -856,8 +857,8 @@ export abstract class Parser extends Recognizer { /** For debugging and other purposes. */ public dumpDFA(): void { - let seenOne: boolean = false; - for (let dfa of this._interp.atn.decisionToDFA) { + let seenOne = false; + for (const dfa of this._interp.atn.decisionToDFA) { if (!dfa.isEmpty) { if (seenOne) { console.log(); @@ -873,29 +874,26 @@ export abstract class Parser extends Recognizer { return this._input.sourceName; } - @Override - get parseInfo(): Promise { - return import("./atn/ProfilingATNSimulator").then((m) => { - let interp: ParserATNSimulator = this.interpreter; - if (interp instanceof m.ProfilingATNSimulator) { - return new ParseInfo(interp); - } + // @Override + get parseInfo(): ParseInfo | undefined { + const interp: ParserATNSimulator = this.interpreter; + if (interp instanceof ProfilingATNSimulator) { + return new ParseInfo(interp); + } - return undefined; - }); + return undefined; } /** * @since 4.3 */ - public async setProfile(profile: boolean): Promise { - let m = await import("./atn/ProfilingATNSimulator"); - let interp: ParserATNSimulator = this.interpreter; + public setProfile(profile: boolean): void { + const interp: ParserATNSimulator = this.interpreter; if (profile) { - if (!(interp instanceof m.ProfilingATNSimulator)) { - this.interpreter = new m.ProfilingATNSimulator(this); + if (!(interp instanceof ProfilingATNSimulator)) { + this.interpreter = new ProfilingATNSimulator(this); } - } else if (interp instanceof m.ProfilingATNSimulator) { + } else if (interp instanceof ProfilingATNSimulator) { this.interpreter = new ParserATNSimulator(this.atn, this); } diff --git a/src/ParserErrorListener.ts b/runtime/typescript/src/ParserErrorListener.ts similarity index 93% rename from src/ParserErrorListener.ts rename to runtime/typescript/src/ParserErrorListener.ts index 9ba88e41..b1470479 100644 --- a/src/ParserErrorListener.ts +++ b/runtime/typescript/src/ParserErrorListener.ts @@ -3,16 +3,19 @@ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. */ +import * as Exception from "./internal"; +import * as Stubs from "./internal"; + // ConvertTo-TS run at 2016-10-04T11:26:52.9471863-07:00 -import { ANTLRErrorListener } from "./ANTLRErrorListener"; -import { ATNConfigSet } from "./atn/ATNConfigSet"; -import { BitSet } from "./misc/BitSet"; -import { DFA } from "./dfa/DFA"; -import { Parser } from "./Parser"; -import { SimulatorState } from "./atn/SimulatorState"; -import { Token } from "./Token"; -import * as Stubs from "./misc/Stubs"; -import * as Exception from "./RecognitionException"; +import { + ANTLRErrorListener, + ATNConfigSet, + BitSet, + DFA, + Parser, + SimulatorState, + Token +} from "./internal"; /** How to emit recognition errors for parsers. */ diff --git a/src/ParserInterpreter.ts b/runtime/typescript/src/ParserInterpreter.ts similarity index 64% rename from src/ParserInterpreter.ts rename to runtime/typescript/src/ParserInterpreter.ts index c22aff17..4d244e29 100644 --- a/src/ParserInterpreter.ts +++ b/runtime/typescript/src/ParserInterpreter.ts @@ -5,33 +5,33 @@ // ConvertTo-TS run at 2016-10-04T11:26:53.1043451-07:00 -import { ActionTransition } from "./atn/ActionTransition"; -import { ATN } from "./atn/ATN"; -import { ATNState } from "./atn/ATNState"; -import { ATNStateType } from "./atn/ATNStateType"; -import { AtomTransition } from "./atn/AtomTransition"; -import { BitSet } from "./misc/BitSet"; -import { DecisionState } from "./atn/DecisionState"; -import { FailedPredicateException } from "./FailedPredicateException"; -import { InputMismatchException } from "./InputMismatchException"; -import { InterpreterRuleContext } from "./InterpreterRuleContext"; -import { LoopEndState } from "./atn/LoopEndState"; -import { NotNull } from "./Decorators"; -import { Override } from "./Decorators"; -import { Parser } from "./Parser"; -import { ParserATNSimulator } from "./atn/ParserATNSimulator"; -import { ParserRuleContext } from "./ParserRuleContext"; -import { PrecedencePredicateTransition } from "./atn/PrecedencePredicateTransition"; -import { PredicateTransition } from "./atn/PredicateTransition"; -import { RecognitionException } from "./RecognitionException"; -import { RuleStartState } from "./atn/RuleStartState"; -import { RuleTransition } from "./atn/RuleTransition"; -import { StarLoopEntryState } from "./atn/StarLoopEntryState"; -import { Token } from "./Token"; -import { TokenStream } from "./TokenStream"; -import { Transition } from "./atn/Transition"; -import { TransitionType } from "./atn/TransitionType"; -import { Vocabulary } from "./Vocabulary"; +import { + ATN, + ATNState, + ATNStateType, + ActionTransition, + AtomTransition, + BitSet, + DecisionState, + FailedPredicateException, + InputMismatchException, + InterpreterRuleContext, + LoopEndState, + Parser, + ParserATNSimulator, + ParserRuleContext, + PrecedencePredicateTransition, + PredicateTransition, + RecognitionException, + RuleStartState, + RuleTransition, + StarLoopEntryState, + Token, + TokenStream, + Transition, + TransitionType, + Vocabulary +} from "./internal"; /** A parser simulator that mimics what ANTLR's generated * parser code does. A ParserATNSimulator is used to make @@ -55,7 +55,7 @@ export class ParserInterpreter extends Parser { protected pushRecursionContextStates: BitSet; protected _ruleNames: string[]; - @NotNull + private _vocabulary: Vocabulary; /** This stack corresponds to the _parentctx, _parentState pair of locals @@ -71,15 +71,15 @@ export class ParserInterpreter extends Parser { * Those values are used to create new recursive rule invocation contexts * associated with left operand of an alt like "expr '*' expr". */ - protected readonly _parentContextStack: Array<[ParserRuleContext, number]> = []; + protected readonly _parentContextStack: [ParserRuleContext, number][] = []; /** We need a map from (decision,inputIndex)->forced alt for computing ambiguous * parse trees. For now, we allow exactly one override. */ - protected overrideDecision: number = -1; - protected overrideDecisionInputIndex: number = -1; - protected overrideDecisionAlt: number = -1; - protected overrideDecisionReached: boolean = false; // latch and only override once; error might trigger infinite loop + protected overrideDecision = -1; + protected overrideDecisionInputIndex = -1; + protected overrideDecisionAlt = -1; + protected overrideDecisionReached = false; // latch and only override once; error might trigger infinite loop /** What is the current context when we override a decisions? This tells * us what the root of the parse tree is when using override @@ -101,11 +101,11 @@ export class ParserInterpreter extends Parser { grammarFileName: string, /*@NotNull*/ vocabulary: Vocabulary, ruleNames: string[], atn: ATN, input: TokenStream); constructor( - grammarFileName: ParserInterpreter | string, @NotNull vocabulary?: Vocabulary, + grammarFileName: ParserInterpreter | string, vocabulary?: Vocabulary, ruleNames?: string[], atn?: ATN, input?: TokenStream) { super(grammarFileName instanceof ParserInterpreter ? grammarFileName.inputStream : input!); if (grammarFileName instanceof ParserInterpreter) { - let old: ParserInterpreter = grammarFileName; + const old: ParserInterpreter = grammarFileName; this._grammarFileName = old._grammarFileName; this._atn = old._atn; this.pushRecursionContextStates = old.pushRecursionContextStates; @@ -125,7 +125,7 @@ export class ParserInterpreter extends Parser { // identify the ATN states where pushNewRecursionContext() must be called this.pushRecursionContextStates = new BitSet(atn.states.length); - for (let state of atn.states) { + for (const state of atn.states) { if (!(state instanceof StarLoopEntryState)) { continue; } @@ -140,7 +140,7 @@ export class ParserInterpreter extends Parser { } } - @Override + // @Override public reset(resetInput?: boolean): void { if (resetInput === undefined) { super.reset(); @@ -152,29 +152,29 @@ export class ParserInterpreter extends Parser { this._overrideDecisionRoot = undefined; } - @Override + // @Override get atn(): ATN { return this._atn; } - @Override + // @Override get vocabulary(): Vocabulary { return this._vocabulary; } - @Override + // @Override get ruleNames(): string[] { return this._ruleNames; } - @Override + // @Override get grammarFileName(): string { return this._grammarFileName; } /** Begin parsing at startRuleIndex */ public parse(startRuleIndex: number): ParserRuleContext { - let startRuleStartState: RuleStartState = this._atn.ruleToStartState[startRuleIndex]; + const startRuleStartState: RuleStartState = this._atn.ruleToStartState[startRuleIndex]; this._rootContext = this.createInterpreterRuleContext(undefined, ATNState.INVALID_STATE_NUMBER, startRuleIndex); if (startRuleStartState.isPrecedenceRule) { @@ -185,47 +185,47 @@ export class ParserInterpreter extends Parser { } while (true) { - let p: ATNState = this.atnState; + const p: ATNState = this.atnState; switch (p.stateType) { - case ATNStateType.RULE_STOP: - // pop; return from rule - if (this._ctx.isEmpty) { - if (startRuleStartState.isPrecedenceRule) { - let result: ParserRuleContext = this._ctx; - let parentContext: [ParserRuleContext, number] = this._parentContextStack.pop() !; - this.unrollRecursionContexts(parentContext[0]); - return result; - } - else { - this.exitRule(); - return this._rootContext; + case ATNStateType.RULE_STOP: + // pop; return from rule + if (this._ctx.isEmpty) { + if (startRuleStartState.isPrecedenceRule) { + const result: ParserRuleContext = this._ctx; + const parentContext: [ParserRuleContext, number] = this._parentContextStack.pop()!; + this.unrollRecursionContexts(parentContext[0]); + return result; + } + else { + this.exitRule(); + return this._rootContext; + } } - } - this.visitRuleStopState(p); - break; + this.visitRuleStopState(p); + break; - default: - try { - this.visitState(p); - } - catch (e) { - if (e instanceof RecognitionException) { - this.state = this._atn.ruleToStopState[p.ruleIndex].stateNumber; - this.context.exception = e; - this.errorHandler.reportError(this, e); - this.recover(e); - } else { - throw e; + default: + try { + this.visitState(p); + } + catch (e) { + if (e instanceof RecognitionException) { + this.state = this._atn.ruleToStopState[p.ruleIndex].stateNumber; + this.context.exception = e; + this.errorHandler.reportError(this, e); + this.recover(e); + } else { + throw e; + } } - } - break; + break; } } } - @Override + // @Override public enterRecursionRule(localctx: ParserRuleContext, state: number, ruleIndex: number, precedence: number): void { this._parentContextStack.push([this._ctx, localctx.invokingState]); super.enterRecursionRule(localctx, state, ruleIndex, precedence); @@ -236,78 +236,81 @@ export class ParserInterpreter extends Parser { } protected visitState(p: ATNState): void { - let predictedAlt: number = 1; + let predictedAlt = 1; if (p.numberOfTransitions > 1) { predictedAlt = this.visitDecisionState(p as DecisionState); } - let transition: Transition = p.transition(predictedAlt - 1); + const transition: Transition = p.transition(predictedAlt - 1); switch (transition.serializationType) { - case TransitionType.EPSILON: - if (this.pushRecursionContextStates.get(p.stateNumber) && - !(transition.target instanceof LoopEndState)) { - // We are at the start of a left recursive rule's (...)* loop - // and we're not taking the exit branch of loop. - let parentContext = this._parentContextStack[this._parentContextStack.length - 1]; - let localctx: InterpreterRuleContext = - this.createInterpreterRuleContext(parentContext[0], parentContext[1], this._ctx.ruleIndex); - this.pushNewRecursionContext(localctx, - this._atn.ruleToStartState[p.ruleIndex].stateNumber, - this._ctx.ruleIndex); - } - break; + case TransitionType.EPSILON: + if (this.pushRecursionContextStates.get(p.stateNumber) && + !(transition.target instanceof LoopEndState)) { + // We are at the start of a left recursive rule's (...)* loop + // and we're not taking the exit branch of loop. + const parentContext = this._parentContextStack[this._parentContextStack.length - 1]; + const localctx: InterpreterRuleContext = + this.createInterpreterRuleContext(parentContext[0], parentContext[1], this._ctx.ruleIndex); + this.pushNewRecursionContext(localctx, + this._atn.ruleToStartState[p.ruleIndex].stateNumber, + this._ctx.ruleIndex); + } + break; - case TransitionType.ATOM: - this.match((transition as AtomTransition)._label); - break; + case TransitionType.ATOM: + this.match((transition as AtomTransition)._label); + break; - case TransitionType.RANGE: - case TransitionType.SET: - case TransitionType.NOT_SET: - if (!transition.matches(this._input.LA(1), Token.MIN_USER_TOKEN_TYPE, 65535)) { - this.recoverInline(); - } - this.matchWildcard(); - break; - - case TransitionType.WILDCARD: - this.matchWildcard(); - break; - - case TransitionType.RULE: - let ruleStartState: RuleStartState = transition.target as RuleStartState; - let ruleIndex: number = ruleStartState.ruleIndex; - let newctx: InterpreterRuleContext = this.createInterpreterRuleContext(this._ctx, p.stateNumber, ruleIndex); - if (ruleStartState.isPrecedenceRule) { - this.enterRecursionRule(newctx, ruleStartState.stateNumber, ruleIndex, (transition as RuleTransition).precedence); - } - else { - this.enterRule(newctx, transition.target.stateNumber, ruleIndex); - } - break; + case TransitionType.RANGE: + case TransitionType.SET: + case TransitionType.NOT_SET: + if (!transition.matches(this._input.LA(1), Token.MIN_USER_TOKEN_TYPE, 65535)) { + this.recoverInline(); + } + this.matchWildcard(); + break; + + case TransitionType.WILDCARD: + this.matchWildcard(); + break; - case TransitionType.PREDICATE: - let predicateTransition: PredicateTransition = transition as PredicateTransition; - if (!this.sempred(this._ctx, predicateTransition.ruleIndex, predicateTransition.predIndex)) { - throw new FailedPredicateException(this); + case TransitionType.RULE: { + const ruleStartState: RuleStartState = transition.target as RuleStartState; + const ruleIndex: number = ruleStartState.ruleIndex; + const newctx: InterpreterRuleContext = this.createInterpreterRuleContext(this._ctx, p.stateNumber, ruleIndex); + if (ruleStartState.isPrecedenceRule) { + this.enterRecursionRule(newctx, ruleStartState.stateNumber, ruleIndex, (transition as RuleTransition).precedence); + } + else { + this.enterRule(newctx, transition.target.stateNumber, ruleIndex); + } + break; } - break; + case TransitionType.PREDICATE: { + const predicateTransition: PredicateTransition = transition as PredicateTransition; + if (!this.sempred(this._ctx, predicateTransition.ruleIndex, predicateTransition.predIndex)) { + throw new FailedPredicateException(this); + } - case TransitionType.ACTION: - let actionTransition: ActionTransition = transition as ActionTransition; - this.action(this._ctx, actionTransition.ruleIndex, actionTransition.actionIndex); - break; + break; + } - case TransitionType.PRECEDENCE: - if (!this.precpred(this._ctx, (transition as PrecedencePredicateTransition).precedence)) { - let precedence = (transition as PrecedencePredicateTransition).precedence; - throw new FailedPredicateException(this, `precpred(_ctx, ${precedence})`); + case TransitionType.ACTION: { + const actionTransition: ActionTransition = transition as ActionTransition; + this.action(this._ctx, actionTransition.ruleIndex, actionTransition.actionIndex); + break; } - break; - default: - throw new Error("UnsupportedOperationException: Unrecognized ATN transition type."); + case TransitionType.PRECEDENCE: + if (!this.precpred(this._ctx, (transition as PrecedencePredicateTransition).precedence)) { + const precedence = (transition as PrecedencePredicateTransition).precedence; + throw new FailedPredicateException(this, `precpred(_ctx, ${precedence})`); + } + break; + + default: + throw new Error("UnsupportedOperationException: Unrecognized ATN transition type."); } this.state = transition.target.stateNumber; @@ -320,7 +323,7 @@ export class ParserInterpreter extends Parser { protected visitDecisionState(p: DecisionState): number { let predictedAlt: number; this.errorHandler.sync(this); - let decision: number = p.decision; + const decision: number = p.decision; if (decision === this.overrideDecision && this._input.index === this.overrideDecisionInputIndex && !this.overrideDecisionReached) { predictedAlt = this.overrideDecisionAlt; this.overrideDecisionReached = true; @@ -342,9 +345,9 @@ export class ParserInterpreter extends Parser { } protected visitRuleStopState(p: ATNState): void { - let ruleStartState: RuleStartState = this._atn.ruleToStartState[p.ruleIndex]; + const ruleStartState: RuleStartState = this._atn.ruleToStartState[p.ruleIndex]; if (ruleStartState.isPrecedenceRule) { - let parentContext: [ParserRuleContext, number] = this._parentContextStack.pop()!; + const parentContext: [ParserRuleContext, number] = this._parentContextStack.pop()!; this.unrollRecursionContexts(parentContext[0]); this.state = parentContext[1]; } @@ -352,7 +355,7 @@ export class ParserInterpreter extends Parser { this.exitRule(); } - let ruleTransition: RuleTransition = this._atn.states[this.state].transition(0) as RuleTransition; + const ruleTransition: RuleTransition = this._atn.states[this.state].transition(0) as RuleTransition; this.state = ruleTransition.followState.stateNumber; } @@ -411,21 +414,21 @@ export class ParserInterpreter extends Parser { * tree. */ protected recover(e: RecognitionException): void { - let i: number = this._input.index; + const i: number = this._input.index; this.errorHandler.recover(this, e); if (this._input.index === i) { // no input consumed, better add an error node - let tok: Token | undefined = e.getOffendingToken(); + const tok: Token | undefined = e.getOffendingToken(); if (!tok) { throw new Error("Expected exception to have an offending token"); } - let source = tok.tokenSource; - let stream = source !== undefined ? source.inputStream : undefined; - let sourcePair = { source, stream }; + const source = tok.tokenSource; + const stream = source !== undefined ? source.inputStream : undefined; + const sourcePair = { source, stream }; if (e instanceof InputMismatchException) { - let expectedTokens = e.expectedTokens; + const expectedTokens = e.expectedTokens; if (expectedTokens === undefined) { throw new Error("Expected the exception to provide expected tokens"); } @@ -436,7 +439,7 @@ export class ParserInterpreter extends Parser { expectedTokenType = expectedTokens.minElement; } - let errToken: Token = + const errToken: Token = this.tokenFactory.create(sourcePair, expectedTokenType, tok.text, Token.DEFAULT_CHANNEL, @@ -445,8 +448,8 @@ export class ParserInterpreter extends Parser { this._ctx.addErrorNode(this.createErrorNode(this._ctx, errToken)); } else { // NoViableAlt - let source = tok.tokenSource; - let errToken: Token = + const source = tok.tokenSource; + const errToken: Token = this.tokenFactory.create(sourcePair, Token.INVALID_TYPE, tok.text, Token.DEFAULT_CHANNEL, diff --git a/src/ParserRuleContext.ts b/runtime/typescript/src/ParserRuleContext.ts similarity index 85% rename from src/ParserRuleContext.ts rename to runtime/typescript/src/ParserRuleContext.ts index ec2826eb..affa1908 100644 --- a/src/ParserRuleContext.ts +++ b/runtime/typescript/src/ParserRuleContext.ts @@ -4,16 +4,17 @@ */ // ConvertTo-TS run at 2016-10-04T11:26:56.6285494-07:00 -import { ErrorNode } from "./tree/ErrorNode"; -import { Interval } from "./misc/Interval"; -import { Override } from "./Decorators"; -import { Parser } from "./Parser"; -import { ParseTree } from "./tree/ParseTree"; -import { ParseTreeListener } from "./tree/ParseTreeListener"; -import { RecognitionException } from "./RecognitionException"; -import { RuleContext } from "./RuleContext"; -import { TerminalNode } from "./tree/TerminalNode"; -import { Token } from "./Token"; +import { + ErrorNode, + Interval, + ParseTree, + ParseTreeListener, + Parser, + RecognitionException, + RuleContext, + TerminalNode, + Token +} from "./internal"; /** A rule invocation record for parsing. * @@ -66,7 +67,7 @@ export class ParserRuleContext extends RuleContext { * * This does not trace states visited during prediction. */ -// public Array states; + // public Array states; public _start: Token; public _stop: Token | undefined; @@ -115,7 +116,7 @@ export class ParserRuleContext extends RuleContext { if (ctx.children) { this.children = []; // reset parent pointer for any error nodes - for (let child of ctx.children) { + for (const child of ctx.children) { if (child instanceof ErrorNode) { this.addChild(child); } @@ -207,17 +208,17 @@ export class ParserRuleContext extends RuleContext { } else { // deprecated path const badToken: Token = node; - let t = new ErrorNode(badToken); + const t = new ErrorNode(badToken); this.addAnyChild(t); t.setParent(this); return t; } } -// public void trace(int s) { -// if ( states==null ) states = new ArrayList(); -// states.add(s); -// } + // public void trace(int s) { + // if ( states==null ) states = new ArrayList(); + // states.add(s); + // } /** Used by enterOuterAlt to toss out a RuleContext previously added as * we entered a rule. If we have # label, we will need to remove @@ -229,10 +230,10 @@ export class ParserRuleContext extends RuleContext { } } - @Override + // @Override /** Override to make type more specific */ get parent(): ParserRuleContext | undefined { - let parent = super.parent; + const parent = super.parent; if (parent === undefined || parent instanceof ParserRuleContext) { return parent; } @@ -241,9 +242,9 @@ export class ParserRuleContext extends RuleContext { } public getChild(i: number): ParseTree; - public getChild(i: number, ctxType: { new (...args: any[]): T; }): T; + public getChild(i: number, ctxType: new (...args: any[]) => T): T; // Note: in TypeScript, order or arguments reversed - public getChild(i: number, ctxType?: { new (...args: any[]): T; }): ParseTree { + public getChild(i: number, ctxType?: new (...args: any[]) => T): ParseTree { if (!this.children || i < 0 || i >= this.children.length) { throw new RangeError("index parameter must be between >= 0 and <= number of children."); } @@ -252,7 +253,7 @@ export class ParserRuleContext extends RuleContext { return this.children[i]; } - let result = this.tryGetChild(i, ctxType); + const result = this.tryGetChild(i, ctxType); if (result === undefined) { throw new Error("The specified node does not exist"); } @@ -260,13 +261,13 @@ export class ParserRuleContext extends RuleContext { return result; } - public tryGetChild(i: number, ctxType: { new (...args: any[]): T; }): T | undefined { + public tryGetChild(i: number, ctxType: new (...args: any[]) => T): T | undefined { if (!this.children || i < 0 || i >= this.children.length) { return undefined; } - let j: number = -1; // what node with ctxType have we found? - for (let o of this.children) { + let j = -1; // what node with ctxType have we found? + for (const o of this.children) { if (o instanceof ctxType) { j++; if (j === i) { @@ -279,7 +280,7 @@ export class ParserRuleContext extends RuleContext { } public getToken(ttype: number, i: number): TerminalNode { - let result = this.tryGetToken(ttype, i); + const result = this.tryGetToken(ttype, i); if (result === undefined) { throw new Error("The specified token does not exist"); } @@ -292,10 +293,10 @@ export class ParserRuleContext extends RuleContext { return undefined; } - let j: number = -1; // what token with ttype have we found? - for (let o of this.children) { + let j = -1; // what token with ttype have we found? + for (const o of this.children) { if (o instanceof TerminalNode) { - let symbol: Token = o.symbol; + const symbol: Token = o.symbol; if (symbol.type === ttype) { j++; if (j === i) { @@ -309,15 +310,15 @@ export class ParserRuleContext extends RuleContext { } public getTokens(ttype: number): TerminalNode[] { - let tokens: TerminalNode[] = []; + const tokens: TerminalNode[] = []; if (!this.children) { return tokens; } - for (let o of this.children) { + for (const o of this.children) { if (o instanceof TerminalNode) { - let symbol = o.symbol; + const symbol = o.symbol; if (symbol.type === ttype) { tokens.push(o); } @@ -332,21 +333,21 @@ export class ParserRuleContext extends RuleContext { } // NOTE: argument order change from Java version - public getRuleContext(i: number, ctxType: { new (...args: any[]): T; }): T { + public getRuleContext(i: number, ctxType: new (...args: any[]) => T): T { return this.getChild(i, ctxType); } - public tryGetRuleContext(i: number, ctxType: { new (...args: any[]): T; }): T | undefined { + public tryGetRuleContext(i: number, ctxType: new (...args: any[]) => T): T | undefined { return this.tryGetChild(i, ctxType); } - public getRuleContexts(ctxType: { new (...args: any[]): T; }): T[] { - let contexts: T[] = []; + public getRuleContexts(ctxType: new (...args: any[]) => T): T[] { + const contexts: T[] = []; if (!this.children) { return contexts; } - for (let o of this.children) { + for (const o of this.children) { if (o instanceof ctxType) { contexts.push(o); } @@ -355,12 +356,12 @@ export class ParserRuleContext extends RuleContext { return contexts; } - @Override - get childCount() { + // @Override + get childCount(): number { return this.children ? this.children.length : 0; } - @Override + // @Override get sourceInterval(): Interval { if (!this._start) { return Interval.INVALID; @@ -386,7 +387,7 @@ export class ParserRuleContext extends RuleContext { /** Used for rule context info debugging during parse-time, not so much for ATN debugging */ public toInfoString(recognizer: Parser): string { - let rules: string[] = + const rules: string[] = recognizer.getRuleInvocationStack(this).reverse(); return "ParserRuleContext" + rules + "{" + "start=" + this._start + diff --git a/src/ProxyErrorListener.ts b/runtime/typescript/src/ProxyErrorListener.ts similarity index 79% rename from src/ProxyErrorListener.ts rename to runtime/typescript/src/ProxyErrorListener.ts index 860cebf4..0ee5ab27 100644 --- a/src/ProxyErrorListener.ts +++ b/runtime/typescript/src/ProxyErrorListener.ts @@ -4,10 +4,11 @@ */ // ConvertTo-TS run at 2016-10-04T11:26:56.8126690-07:00 -import { ANTLRErrorListener } from "./ANTLRErrorListener"; -import { RecognitionException } from "./RecognitionException"; -import { Recognizer } from "./Recognizer"; -import { Override, NotNull } from "./Decorators"; +import { + ANTLRErrorListener, + RecognitionException, + Recognizer +} from "./internal"; /** * This implementation of {@link ANTLRErrorListener} dispatches all calls to a @@ -28,13 +29,13 @@ export class ProxyErrorListener( - @NotNull recognizer: Recognizer, + recognizer: Recognizer, offendingSymbol: T | undefined, line: number, charPositionInLine: number, - @NotNull msg: string, + msg: string, e: RecognitionException | undefined): void { this.delegates.forEach((listener) => { if (listener.syntaxError) { diff --git a/src/ProxyParserErrorListener.ts b/runtime/typescript/src/ProxyParserErrorListener.ts similarity index 74% rename from src/ProxyParserErrorListener.ts rename to runtime/typescript/src/ProxyParserErrorListener.ts index 37088890..e99f1c2d 100644 --- a/src/ProxyParserErrorListener.ts +++ b/runtime/typescript/src/ProxyParserErrorListener.ts @@ -4,18 +4,19 @@ */ // ConvertTo-TS run at 2016-10-04T11:26:56.9812284-07:00 -import { ANTLRErrorListener } from "./ANTLRErrorListener"; -import { ATNConfigSet } from "./atn/ATNConfigSet"; -import { BitSet } from "./misc/BitSet"; -import { DFA } from "./dfa/DFA"; -import { Parser } from "./Parser"; -import { RecognitionException } from "./RecognitionException"; -import { Recognizer } from "./Recognizer"; -import { ProxyErrorListener } from "./ProxyErrorListener"; -import { ParserErrorListener } from "./ParserErrorListener"; -import { SimulatorState } from "./atn/SimulatorState"; -import { Token } from "./Token"; -import { Override } from "./Decorators"; +import { + ANTLRErrorListener, + ATNConfigSet, + BitSet, + DFA, + Parser, + ParserErrorListener, + ProxyErrorListener, + RecognitionException, + Recognizer, + SimulatorState, + Token +} from "./internal"; /** * @author Sam Harwell @@ -27,7 +28,7 @@ export class ProxyParserErrorListener extends ProxyErrorListener { public static readonly EOF: number = -1; @@ -28,9 +28,7 @@ export abstract class Recognizer { private static ruleIndexMapCache = new WeakMap>(); - @SuppressWarnings("serial") - @NotNull - private readonly _listeners: Array> = [ConsoleErrorListener.INSTANCE]; + private readonly _listeners: ANTLRErrorListener[] = [ConsoleErrorListener.INSTANCE]; protected _interp: ATNInterpreter; @@ -51,19 +49,19 @@ export abstract class Recognizer { * * Used for XPath and tree pattern compilation. */ - @NotNull + public getTokenTypeMap(): ReadonlyMap { - let vocabulary: Vocabulary = this.vocabulary; + const vocabulary: Vocabulary = this.vocabulary; let result = Recognizer.tokenTypeMapCache.get(vocabulary); if (result == null) { - let intermediateResult = new Map(); + const intermediateResult = new Map(); for (let i = 0; i <= this.atn.maxTokenType; i++) { - let literalName = vocabulary.getLiteralName(i); + const literalName = vocabulary.getLiteralName(i); if (literalName != null) { intermediateResult.set(literalName, i); } - let symbolicName = vocabulary.getSymbolicName(i); + const symbolicName = vocabulary.getSymbolicName(i); if (symbolicName != null) { intermediateResult.set(symbolicName, i); } @@ -82,9 +80,9 @@ export abstract class Recognizer { * * Used for XPath and tree pattern compilation. */ - @NotNull + public getRuleIndexMap(): ReadonlyMap { - let ruleNames: string[] = this.ruleNames; + const ruleNames: string[] = this.ruleNames; if (ruleNames == null) { throw new Error("The current recognizer does not provide a list of rule names."); } @@ -99,7 +97,7 @@ export abstract class Recognizer { } public getTokenType(tokenName: string): number { - let ttype = this.getTokenTypeMap().get(tokenName); + const ttype = this.getTokenTypeMap().get(tokenName); if (ttype != null) { return ttype; } @@ -113,7 +111,7 @@ export abstract class Recognizer { * For interpreters, we don't know their serialized ATN despite having * created the interpreter from it. */ - @NotNull + get serializedATN(): string { throw new Error("there is no serialized ATN"); } @@ -128,7 +126,7 @@ export abstract class Recognizer { * * @returns The {@link ATN} used by the recognizer for prediction. */ - @NotNull + get atn(): ATN { return this._interp.atn; } @@ -138,7 +136,7 @@ export abstract class Recognizer { * * @returns The ATN interpreter used by the recognizer for prediction. */ - @NotNull + get interpreter(): ATNInterpreter { return this._interp; } @@ -149,7 +147,7 @@ export abstract class Recognizer { * @param interpreter The ATN interpreter used by the recognizer for * prediction. */ - set interpreter(@NotNull interpreter: ATNInterpreter) { + set interpreter(interpreter: ATNInterpreter) { this._interp = interpreter; } @@ -158,34 +156,34 @@ export abstract class Recognizer { * * @since 4.3 */ - get parseInfo(): Promise { - return Promise.resolve(undefined); + get parseInfo(): ParseInfo | undefined { + return undefined; } /** What is the error header, normally line/character position information? */ - @NotNull - public getErrorHeader(@NotNull e: RecognitionException): string { - let token = e.getOffendingToken(); + + public getErrorHeader(e: RecognitionException): string { + const token = e.getOffendingToken(); if (!token) { return ""; } - let line = token.line; - let charPositionInLine: number = token.charPositionInLine; + const line = token.line; + const charPositionInLine: number = token.charPositionInLine; return "line " + line + ":" + charPositionInLine; } /** * @exception NullPointerException if `listener` is `undefined`. */ - public addErrorListener(@NotNull listener: ANTLRErrorListener): void { + public addErrorListener(listener: ANTLRErrorListener): void { if (!listener) { throw new TypeError("listener must not be null"); } this._listeners.push(listener); } - public removeErrorListener(@NotNull listener: ANTLRErrorListener): void { - let position = this._listeners.indexOf(listener); + public removeErrorListener(listener: ANTLRErrorListener): void { + const position = this._listeners.indexOf(listener); if (position !== -1) { this._listeners.splice(position, 1); } @@ -195,8 +193,8 @@ export abstract class Recognizer { this._listeners.length = 0; } - @NotNull - public getErrorListeners(): Array> { + + public getErrorListeners(): ANTLRErrorListener[] { return this._listeners.slice(0); } @@ -238,9 +236,9 @@ export abstract class Recognizer { * configuration information. */ set state(atnState: number) { -// System.err.println("setState "+atnState); + // System.err.println("setState "+atnState); this._stateNumber = atnState; -// if ( traceATNStates ) _ctx.trace(atnState); + // if ( traceATNStates ) _ctx.trace(atnState); } public abstract readonly inputStream: IntStream | undefined; diff --git a/src/RuleContext.ts b/runtime/typescript/src/RuleContext.ts similarity index 89% rename from src/RuleContext.ts rename to runtime/typescript/src/RuleContext.ts index 9a333d0e..324f6996 100644 --- a/src/RuleContext.ts +++ b/runtime/typescript/src/RuleContext.ts @@ -5,16 +5,17 @@ // ConvertTo-TS run at 2016-10-04T11:26:57.3490837-07:00 -import { ATN } from "./atn/ATN"; -import { Parser } from "./Parser"; -import { Recognizer } from "./Recognizer"; -import { RuleNode } from "./tree/RuleNode"; -import { ParseTree } from "./tree/ParseTree"; -import { Interval } from "./misc/Interval"; -import { Override } from "./Decorators"; -import { Trees } from "./tree/Trees"; -import { ParseTreeVisitor } from "./tree/ParseTreeVisitor"; -import { ParserRuleContext } from "./ParserRuleContext"; +import { + ATN, + Interval, + ParseTree, + ParseTreeVisitor, + Parser, + ParserRuleContext, + Recognizer, + RuleNode, + Trees +} from "./internal"; /** A rule context is a record of a single rule invocation. * @@ -84,6 +85,7 @@ export class RuleContext extends RuleNode { public depth(): number { let n = 0; + // eslint-disable-next-line @typescript-eslint/no-this-alias let p: RuleContext | undefined = this; while (p) { p = p._parent; @@ -101,24 +103,24 @@ export class RuleContext extends RuleNode { // satisfy the ParseTree / SyntaxTree interface - @Override + // @Override get sourceInterval(): Interval { return Interval.INVALID; } - @Override + // @Override get ruleContext(): RuleContext { return this; } - @Override + // @Override get parent(): RuleContext | undefined { return this._parent; } /** @since 4.7. {@see ParseTree#setParent} comment */ - @Override + // @Override public setParent(parent: RuleContext): void { this._parent = parent; } - @Override + // @Override get payload(): RuleContext { return this; } /** Return the combined text of all child nodes. This method only considers @@ -128,7 +130,7 @@ export class RuleContext extends RuleNode { * added to the parse trees, they will not appear in the output of this * method. */ - @Override + // @Override get text(): string { if (this.childCount === 0) { return ""; @@ -167,17 +169,17 @@ export class RuleContext extends RuleNode { // intentionally ignored by the base implementation } - @Override + // @Override public getChild(i: number): ParseTree { throw new RangeError("i must be greater than or equal to 0 and less than childCount"); } - @Override + // @Override get childCount(): number { return 0; } - @Override + // @Override public accept(visitor: ParseTreeVisitor): T { return visitor.visitChildren(this); } @@ -195,7 +197,7 @@ export class RuleContext extends RuleNode { public toStringTree(): string; - @Override + // @Override public toStringTree(recog?: Parser | string[]): string { return Trees.toStringTree(this, recog); } @@ -204,19 +206,19 @@ export class RuleContext extends RuleNode { public toString(recog: Recognizer | undefined): string; public toString(ruleNames: string[] | undefined): string; - // // recog undefined unless ParserRuleContext, in which case we use subclass toString(...) + // recog undefined unless ParserRuleContext, in which case we use subclass toString(...) public toString(recog: Recognizer | undefined, stop: RuleContext | undefined): string; public toString(ruleNames: string[] | undefined, stop: RuleContext | undefined): string; public toString( arg1?: Recognizer | string[], - stop?: RuleContext) - : string { + stop?: RuleContext): string { const ruleNames = (arg1 instanceof Recognizer) ? arg1.ruleNames : arg1; stop = stop || ParserRuleContext.emptyContext(); let buf = ""; + // eslint-disable-next-line @typescript-eslint/no-this-alias let p: RuleContext | undefined = this; buf += ("["); while (p && p !== stop) { @@ -225,8 +227,8 @@ export class RuleContext extends RuleNode { buf += (p.invokingState); } } else { - let ruleIndex: number = p.ruleIndex; - let ruleName: string = (ruleIndex >= 0 && ruleIndex < ruleNames.length) + const ruleIndex: number = p.ruleIndex; + const ruleName: string = (ruleIndex >= 0 && ruleIndex < ruleNames.length) ? ruleNames[ruleIndex] : ruleIndex.toString(); buf += (ruleName); } diff --git a/src/RuleContextWithAltNum.ts b/runtime/typescript/src/RuleContextWithAltNum.ts similarity index 88% rename from src/RuleContextWithAltNum.ts rename to runtime/typescript/src/RuleContextWithAltNum.ts index 9732d835..51241ccd 100644 --- a/src/RuleContextWithAltNum.ts +++ b/runtime/typescript/src/RuleContextWithAltNum.ts @@ -5,9 +5,10 @@ // ConvertTo-TS run at 2016-10-04T11:26:57.4741196-07:00 -import { ATN } from "./atn/ATN"; -import { Override } from "./Decorators"; -import { ParserRuleContext } from "./ParserRuleContext"; +import { + ATN, + ParserRuleContext +} from "./internal"; /** A handy class for use with * @@ -34,7 +35,7 @@ export class RuleContextWithAltNum extends ParserRuleContext { this._altNumber = ATN.INVALID_ALT_NUMBER; } - @Override + // @Override get altNumber(): number { return this._altNumber; } diff --git a/src/RuleDependency.ts b/runtime/typescript/src/RuleDependency.ts similarity index 88% rename from src/RuleDependency.ts rename to runtime/typescript/src/RuleDependency.ts index bf778132..4dc4cc1e 100644 --- a/src/RuleDependency.ts +++ b/runtime/typescript/src/RuleDependency.ts @@ -5,8 +5,10 @@ // ConvertTo-TS run at 2016-10-04T11:26:57.6271221-07:00 -import { Dependents } from "./Dependents"; -import { Parser } from "./Parser"; +import { + Dependents, + Parser +} from "./internal"; /** * Declares a dependency upon a grammar rule, along with a set of zero or more dependent rules. @@ -17,13 +19,14 @@ import { Parser } from "./Parser"; * @author Sam Harwell */ export function RuleDependency(dependency: DependencySpecification) { + // eslint-disable-next-line @typescript-eslint/explicit-function-return-type return (target: object, propertyKey: PropertyKey, propertyDescriptor: PropertyDescriptor) => { // intentionally empty }; } export interface DependencySpecification { - readonly recognizer: { new (...args: any[]): Parser; }; + readonly recognizer: new (...args: any[]) => Parser; readonly rule: number; diff --git a/src/RuleVersion.ts b/runtime/typescript/src/RuleVersion.ts similarity index 78% rename from src/RuleVersion.ts rename to runtime/typescript/src/RuleVersion.ts index da59feaf..3476cf85 100644 --- a/src/RuleVersion.ts +++ b/runtime/typescript/src/RuleVersion.ts @@ -5,8 +5,10 @@ // ConvertTo-TS run at 2016-10-04T11:26:57.7170027-07:00 -import { Parser } from "./Parser"; -import { ParserRuleContext } from "./ParserRuleContext"; +import { + Parser, + ParserRuleContext +} from "./internal"; /** * @@ -14,6 +16,7 @@ import { ParserRuleContext } from "./ParserRuleContext"; */ export function RuleVersion(version: number) { + // eslint-disable-next-line @typescript-eslint/explicit-function-return-type return (target: Parser, propertyKey: PropertyKey, propertyDescriptor: TypedPropertyDescriptor<(...args: any[]) => T>) => { // intentionally empty }; diff --git a/src/Token.ts b/runtime/typescript/src/Token.ts similarity index 86% rename from src/Token.ts rename to runtime/typescript/src/Token.ts index 12d7dadc..b0860094 100644 --- a/src/Token.ts +++ b/runtime/typescript/src/Token.ts @@ -5,10 +5,11 @@ // ConvertTo-TS run at 2016-10-04T11:26:57.7862802-07:00 -import { CharStream } from "./CharStream"; -import { IntStream } from "./IntStream"; -import { TokenSource } from "./TokenSource"; -import { TokenStream } from "./TokenStream"; +import { + CharStream, + IntStream, + TokenSource +} from "./internal"; /** A token has properties: text, type, line, character position in the line * (so we can ignore tabs), token channel, index, and source from which @@ -68,15 +69,16 @@ export interface Token { readonly inputStream: CharStream | undefined; } +// eslint-disable-next-line @typescript-eslint/no-namespace export namespace Token { - export const INVALID_TYPE: number = 0; + export const INVALID_TYPE = 0; /** During lookahead operations, this "token" signifies we hit rule end ATN state * and did not follow it despite needing to. */ - export const EPSILON: number = -2; + export const EPSILON = -2; - export const MIN_USER_TOKEN_TYPE: number = 1; + export const MIN_USER_TOKEN_TYPE = 1; export const EOF: number = IntStream.EOF; @@ -84,12 +86,12 @@ export namespace Token { * on a particular "channel". The parser tunes to a particular channel * so that whitespace etc... can go to the parser on a "hidden" channel. */ - export const DEFAULT_CHANNEL: number = 0; + export const DEFAULT_CHANNEL = 0; /** Anything on different channel than DEFAULT_CHANNEL is not parsed * by parser. */ - export const HIDDEN_CHANNEL: number = 1; + export const HIDDEN_CHANNEL = 1; /** * This is the minimum constant value which can be assigned to a @@ -101,5 +103,5 @@ export namespace Token { * * @see `Token.channel` */ - export const MIN_USER_CHANNEL_VALUE: number = 2; + export const MIN_USER_CHANNEL_VALUE = 2; } diff --git a/src/TokenFactory.ts b/runtime/typescript/src/TokenFactory.ts similarity index 85% rename from src/TokenFactory.ts rename to runtime/typescript/src/TokenFactory.ts index 9c4602ad..50e7fcf9 100644 --- a/src/TokenFactory.ts +++ b/runtime/typescript/src/TokenFactory.ts @@ -5,9 +5,11 @@ // ConvertTo-TS run at 2016-10-04T11:26:57.8783640-07:00 -import { CharStream } from "./CharStream"; -import { Token } from "./Token"; -import { TokenSource } from "./TokenSource"; +import { + CharStream, + Token, + TokenSource +} from "./internal"; /** The default mechanism for creating tokens. It's used by default in Lexer and * the error handling strategy (to create missing tokens). Notifying the parser @@ -21,7 +23,7 @@ export interface TokenFactory { //@NotNull create( /*@NotNull*/ - source: { source?: TokenSource, stream?: CharStream }, + source: { source?: TokenSource; stream?: CharStream }, type: number, text: string | undefined, channel: number, diff --git a/src/TokenSource.ts b/runtime/typescript/src/TokenSource.ts similarity index 95% rename from src/TokenSource.ts rename to runtime/typescript/src/TokenSource.ts index 2201bc56..dd76e13f 100644 --- a/src/TokenSource.ts +++ b/runtime/typescript/src/TokenSource.ts @@ -5,9 +5,11 @@ // ConvertTo-TS run at 2016-10-04T11:26:57.9604200-07:00 -import { CharStream } from "./CharStream"; -import { Token } from "./Token"; -import { TokenFactory } from "./TokenFactory"; +import { + CharStream, + Token, + TokenFactory +} from "./internal"; /** * A source of tokens must provide a sequence of tokens via {@link #nextToken()} diff --git a/src/TokenStream.ts b/runtime/typescript/src/TokenStream.ts similarity index 95% rename from src/TokenStream.ts rename to runtime/typescript/src/TokenStream.ts index 31f602a8..0b12d7a2 100644 --- a/src/TokenStream.ts +++ b/runtime/typescript/src/TokenStream.ts @@ -5,11 +5,13 @@ // ConvertTo-TS run at 2016-10-04T11:26:58.0433998-07:00 -import { Interval } from "./misc/Interval"; -import { IntStream } from "./IntStream"; -import { RuleContext } from "./RuleContext"; -import { Token } from "./Token"; -import { TokenSource } from "./TokenSource"; +import { + IntStream, + Interval, + RuleContext, + Token, + TokenSource +} from "./internal"; /** * An {@link IntStream} whose symbols are {@link Token} instances. @@ -158,5 +160,5 @@ export interface TokenStream extends IntStream { * this method for the specified tokens */ //@NotNull - getTextFromRange(start: any, stop: any): string; + getTextFromRange(start: Token, stop?: Token): string; } diff --git a/src/TokenStreamRewriter.ts b/runtime/typescript/src/TokenStreamRewriter.ts similarity index 81% rename from src/TokenStreamRewriter.ts rename to runtime/typescript/src/TokenStreamRewriter.ts index eae932b2..9b9e13bf 100644 --- a/src/TokenStreamRewriter.ts +++ b/runtime/typescript/src/TokenStreamRewriter.ts @@ -5,12 +5,13 @@ // ConvertTo-TS run at 2016-10-04T11:26:58.1768850-07:00 -import { Interval } from "./misc/Interval"; -import { Override } from "./Decorators"; -import { Token } from "./Token"; -import { TokenStream } from "./TokenStream"; +import * as Utils from "./internal"; -import * as Utils from "./misc/Utils"; +import { + Interval, + Token, + TokenStream +} from "./internal"; /** * Useful for rewriting out a buffered input token stream after doing some @@ -81,9 +82,9 @@ import * as Utils from "./misc/Utils"; * first example shows. */ export class TokenStreamRewriter { - public static readonly DEFAULT_PROGRAM_NAME: string = "default"; - public static readonly PROGRAM_INIT_SIZE: number = 100; - public static readonly MIN_TOKEN_INDEX: number = 0; + public static readonly DEFAULT_PROGRAM_NAME: string = "default"; + public static readonly PROGRAM_INIT_SIZE: number = 100; + public static readonly MIN_TOKEN_INDEX: number = 0; /** Our source stream */ protected tokens: TokenStream; @@ -97,7 +98,7 @@ export class TokenStreamRewriter { /** Map String (program name) → Integer index */ protected lastRewriteTokenIndexes: Map; - constructor(tokens: TokenStream) { + constructor(tokens: TokenStream) { this.tokens = tokens; this.programs = new Map(); this.programs.set(TokenStreamRewriter.DEFAULT_PROGRAM_NAME, []); @@ -115,8 +116,8 @@ export class TokenStreamRewriter { */ public rollback(instructionIndex: number, programName: string): void; public rollback(instructionIndex: number, programName: string = TokenStreamRewriter.DEFAULT_PROGRAM_NAME): void { - let is: RewriteOperation[] | undefined = this.programs.get(programName); - if ( is != null ) { + const is: RewriteOperation[] | undefined = this.programs.get(programName); + if (is != null) { this.programs.set(programName, is.slice(TokenStreamRewriter.MIN_TOKEN_INDEX, instructionIndex)); } } @@ -142,8 +143,8 @@ export class TokenStreamRewriter { } // to insert after, just insert before next index (even if past end) - let op = new InsertAfterOp(this.tokens, index, text); - let rewrites: RewriteOperation[] = this.getProgram(programName); + const op = new InsertAfterOp(this.tokens, index, text); + const rewrites: RewriteOperation[] = this.getProgram(programName); op.instructionIndex = rewrites.length; rewrites.push(op); } @@ -160,8 +161,8 @@ export class TokenStreamRewriter { index = tokenOrIndex.tokenIndex; } - let op: RewriteOperation = new InsertBeforeOp(this.tokens, index, text); - let rewrites: RewriteOperation[] = this.getProgram(programName); + const op: RewriteOperation = new InsertBeforeOp(this.tokens, index, text); + const rewrites: RewriteOperation[] = this.getProgram(programName); op.instructionIndex = rewrites.length; rewrites.push(op); } @@ -193,12 +194,12 @@ export class TokenStreamRewriter { to = to.tokenIndex; } - if ( from > to || from < 0 || to < 0 || to >= this.tokens.size ) { + if (from > to || from < 0 || to < 0 || to >= this.tokens.size) { throw new RangeError(`replace: range invalid: ${from}..${to}(size=${this.tokens.size})`); } - let op: RewriteOperation = new ReplaceOp(this.tokens, from, to, text); - let rewrites: RewriteOperation[] = this.getProgram(programName); + const op: RewriteOperation = new ReplaceOp(this.tokens, from, to, text); + const rewrites: RewriteOperation[] = this.getProgram(programName); op.instructionIndex = rewrites.length; rewrites.push(op); } @@ -232,8 +233,8 @@ export class TokenStreamRewriter { protected getLastRewriteTokenIndex(programName: string): number; protected getLastRewriteTokenIndex(programName: string = TokenStreamRewriter.DEFAULT_PROGRAM_NAME): number { - let I: number | undefined = this.lastRewriteTokenIndexes.get(programName); - if ( I == null ) { + const I: number | undefined = this.lastRewriteTokenIndexes.get(programName); + if (I == null) { return -1; } @@ -246,7 +247,7 @@ export class TokenStreamRewriter { protected getProgram(name: string): RewriteOperation[] { let is: RewriteOperation[] | undefined = this.programs.get(name); - if ( is == null ) { + if (is == null) { is = this.initializeProgram(name); } @@ -254,7 +255,7 @@ export class TokenStreamRewriter { } private initializeProgram(name: string): RewriteOperation[] { - let is: RewriteOperation[] = []; + const is: RewriteOperation[] = []; this.programs.set(name, is); return is; } @@ -296,36 +297,36 @@ export class TokenStreamRewriter { programName = intervalOrProgram; } - let rewrites: RewriteOperation[] | undefined = this.programs.get(programName); - let start: number = interval.a; - let stop: number = interval.b; + const rewrites: RewriteOperation[] | undefined = this.programs.get(programName); + let start: number = interval.a; + let stop: number = interval.b; // ensure start/end are in range - if ( stop > this.tokens.size - 1 ) { + if (stop > this.tokens.size - 1) { stop = this.tokens.size - 1; } - if ( start < 0 ) { + if (start < 0) { start = 0; } - if ( rewrites == null || rewrites.length === 0 ) { + if (rewrites == null || rewrites.length === 0) { return this.tokens.getText(interval); // no instructions to execute } - let buf: string[] = []; + const buf: string[] = []; // First, optimize instruction stream - let indexToOp: Map = this.reduceToSingleOperationPerIndex(rewrites); + const indexToOp: Map = this.reduceToSingleOperationPerIndex(rewrites); // Walk buffer, executing instructions and emitting tokens - let i: number = start; - while ( i <= stop && i < this.tokens.size ) { - let op: RewriteOperation | undefined = indexToOp.get(i); + let i: number = start; + while (i <= stop && i < this.tokens.size) { + const op: RewriteOperation | undefined = indexToOp.get(i); indexToOp.delete(i); // remove so any left have index size-1 - let t: Token = this.tokens.get(i); - if ( op == null ) { + const t: Token = this.tokens.get(i); + if (op == null) { // no operation at that index, just dump token - if ( t.type !== Token.EOF ) { + if (t.type !== Token.EOF) { buf.push(String(t.text)); } i++; // move to next token @@ -338,11 +339,11 @@ export class TokenStreamRewriter { // include stuff after end if it's last index in buffer // So, if they did an insertAfter(lastValidIndex, "foo"), include // foo if end==lastValidIndex. - if ( stop === this.tokens.size - 1 ) { + if (stop === this.tokens.size - 1) { // Scan any remaining operations after last token // should be included (they will be inserts). - for (let op of indexToOp.values()) { - if ( op.index >= this.tokens.size - 1 ) { + for (const op of indexToOp.values()) { + if (op.index >= this.tokens.size - 1) { buf.push(op.text.toString()); } } @@ -400,54 +401,54 @@ export class TokenStreamRewriter { * * Return a map from token index to operation. */ - protected reduceToSingleOperationPerIndex(rewrites: Array): Map { + protected reduceToSingleOperationPerIndex(rewrites: (RewriteOperation | undefined)[]): Map { // console.log(`rewrites=[${Utils.join(rewrites, ", ")}]`); // WALK REPLACES for (let i = 0; i < rewrites.length; i++) { - let op: RewriteOperation | undefined = rewrites[i]; - if ( op == null ) { + const op: RewriteOperation | undefined = rewrites[i]; + if (op == null) { continue; } - if ( !(op instanceof ReplaceOp) ) { + if (!(op instanceof ReplaceOp)) { continue; } - let rop: ReplaceOp = op; + const rop: ReplaceOp = op; // Wipe prior inserts within range - let inserts: InsertBeforeOp[] = this.getKindOfOps(rewrites, InsertBeforeOp, i); - for (let iop of inserts) { - if ( iop.index === rop.index ) { + const inserts: InsertBeforeOp[] = this.getKindOfOps(rewrites, InsertBeforeOp, i); + for (const iop of inserts) { + if (iop.index === rop.index) { // E.g., insert before 2, delete 2..2; update replace // text to include insert before, kill insert rewrites[iop.instructionIndex] = undefined; rop.text = iop.text.toString() + (rop.text != null ? rop.text.toString() : ""); } - else if ( iop.index > rop.index && iop.index <= rop.lastIndex ) { + else if (iop.index > rop.index && iop.index <= rop.lastIndex) { // delete insert as it's a no-op. rewrites[iop.instructionIndex] = undefined; } } // Drop any prior replaces contained within - let prevReplaces: ReplaceOp[] = this.getKindOfOps(rewrites, ReplaceOp, i); - for (let prevRop of prevReplaces) { - if ( prevRop.index >= rop.index && prevRop.lastIndex <= rop.lastIndex ) { + const prevReplaces: ReplaceOp[] = this.getKindOfOps(rewrites, ReplaceOp, i); + for (const prevRop of prevReplaces) { + if (prevRop.index >= rop.index && prevRop.lastIndex <= rop.lastIndex) { // delete replace as it's a no-op. rewrites[prevRop.instructionIndex] = undefined; continue; } // throw exception unless disjoint or identical - let disjoint: boolean = + const disjoint: boolean = prevRop.lastIndex < rop.index || prevRop.index > rop.lastIndex; // Delete special case of replace (text==null): // D.i-j.u D.x-y.v | boundaries overlap combine to max(min)..max(right) - if ( prevRop.text == null && rop.text == null && !disjoint ) { + if (prevRop.text == null && rop.text == null && !disjoint) { // console.log(`overlapping deletes: ${prevRop}, ${rop}`); rewrites[prevRop.instructionIndex] = undefined; // kill first delete rop.index = Math.min(prevRop.index, rop.index); rop.lastIndex = Math.max(prevRop.lastIndex, rop.lastIndex); // console.log(`new rop ${rop}`); } - else if ( !disjoint ) { + else if (!disjoint) { throw new Error(`replace op boundaries of ${rop} overlap with previous ${prevRop}`); } } @@ -455,18 +456,18 @@ export class TokenStreamRewriter { // WALK INSERTS for (let i = 0; i < rewrites.length; i++) { - let op: RewriteOperation | undefined = rewrites[i]; - if ( op == null ) { + const op: RewriteOperation | undefined = rewrites[i]; + if (op == null) { continue; } - if ( !(op instanceof InsertBeforeOp) ) { + if (!(op instanceof InsertBeforeOp)) { continue; } - let iop: InsertBeforeOp = op; + const iop: InsertBeforeOp = op; // combine current insert with prior if any at same index - let prevInserts: InsertBeforeOp[] = this.getKindOfOps(rewrites, InsertBeforeOp, i); - for (let prevIop of prevInserts) { - if ( prevIop.index === iop.index ) { + const prevInserts: InsertBeforeOp[] = this.getKindOfOps(rewrites, InsertBeforeOp, i); + for (const prevIop of prevInserts) { + if (prevIop.index === iop.index) { if (prevIop instanceof InsertAfterOp) { iop.text = this.catOpText(prevIop.text, iop.text); rewrites[prevIop.instructionIndex] = undefined; @@ -481,26 +482,26 @@ export class TokenStreamRewriter { } } // look for replaces where iop.index is in range; error - let prevReplaces: ReplaceOp[] = this.getKindOfOps(rewrites, ReplaceOp, i); - for (let rop of prevReplaces) { - if ( iop.index === rop.index ) { + const prevReplaces: ReplaceOp[] = this.getKindOfOps(rewrites, ReplaceOp, i); + for (const rop of prevReplaces) { + if (iop.index === rop.index) { rop.text = this.catOpText(iop.text, rop.text); rewrites[i] = undefined; // delete current insert continue; } - if ( iop.index >= rop.index && iop.index <= rop.lastIndex ) { + if (iop.index >= rop.index && iop.index <= rop.lastIndex) { throw new Error(`insert op ${iop} within boundaries of previous ${rop}`); } } } // console.log(`rewrites after=[${Utils.join(rewrites, ", ")}]`); - let m: Map = new Map(); - for (let op of rewrites) { - if ( op == null ) { + const m: Map = new Map(); + for (const op of rewrites) { + if (op == null) { // ignore deleted ops continue; } - if ( m.get(op.index) != null ) { + if (m.get(op.index) != null) { throw new Error("should only be one op per index"); } m.set(op.index, op); @@ -510,27 +511,27 @@ export class TokenStreamRewriter { } protected catOpText(a: {}, b: {}): string { - let x: string = ""; - let y: string = ""; - if ( a != null ) { + let x = ""; + let y = ""; + if (a != null) { x = a.toString(); } - if ( b != null ) { + if (b != null) { y = b.toString(); } return x + y; } /** Get all operations before an index of a particular kind */ - protected getKindOfOps(rewrites: Array, kind: {new(...args: any[]): T}, before: number): T[] { - let ops: T[] = []; + protected getKindOfOps(rewrites: (RewriteOperation | undefined)[], kind: new (...args: any[]) => T, before: number): T[] { + const ops: T[] = []; for (let i = 0; i < before && i < rewrites.length; i++) { - let op: RewriteOperation | undefined = rewrites[i]; - if ( op == null ) { + const op: RewriteOperation | undefined = rewrites[i]; + if (op == null) { // ignore deleted continue; } - if ( op instanceof kind ) { + if (op instanceof kind) { ops.push(op); } } @@ -563,13 +564,13 @@ export class RewriteOperation { return this.index; } - @Override + // @Override public toString(): string { let opName: string = this.constructor.name; - let $index = opName.indexOf("$"); + const $index = opName.indexOf("$"); opName = opName.substring($index + 1, opName.length); return "<" + opName + "@" + this.tokens.get(this.index) + - ":\"" + this.text + "\">"; + ":\"" + this.text + "\">"; } } @@ -578,10 +579,10 @@ class InsertBeforeOp extends RewriteOperation { super(tokens, index, text); } - @Override + // @Override public execute(buf: string[]): number { buf.push(this.text.toString()); - if ( this.tokens.get(this.index).type !== Token.EOF ) { + if (this.tokens.get(this.index).type !== Token.EOF) { buf.push(String(this.tokens.get(this.index).text)); } return this.index + 1; @@ -608,21 +609,21 @@ class ReplaceOp extends RewriteOperation { this.lastIndex = to; } - @Override + // @Override public execute(buf: string[]): number { - if ( this.text != null ) { + if (this.text != null) { buf.push(this.text.toString()); } return this.lastIndex + 1; } - @Override + // @Override public toString(): string { - if ( this.text == null ) { + if (this.text == null) { return ""; + ".." + this.tokens.get(this.lastIndex) + ">"; } return ""; + ".." + this.tokens.get(this.lastIndex) + ":\"" + this.text + "\">"; } } diff --git a/src/UnbufferedCharStream.tssoon b/runtime/typescript/src/UnbufferedCharStream.tssoon similarity index 100% rename from src/UnbufferedCharStream.tssoon rename to runtime/typescript/src/UnbufferedCharStream.tssoon diff --git a/src/UnbufferedTokenStream.tssoon b/runtime/typescript/src/UnbufferedTokenStream.tssoon similarity index 100% rename from src/UnbufferedTokenStream.tssoon rename to runtime/typescript/src/UnbufferedTokenStream.tssoon diff --git a/src/Vocabulary.ts b/runtime/typescript/src/Vocabulary.ts similarity index 100% rename from src/Vocabulary.ts rename to runtime/typescript/src/Vocabulary.ts diff --git a/src/VocabularyImpl.ts b/runtime/typescript/src/VocabularyImpl.ts similarity index 78% rename from src/VocabularyImpl.ts rename to runtime/typescript/src/VocabularyImpl.ts index 1478340d..a5bf5b1b 100644 --- a/src/VocabularyImpl.ts +++ b/runtime/typescript/src/VocabularyImpl.ts @@ -5,9 +5,10 @@ // ConvertTo-TS run at 2016-10-04T11:26:59.5829654-07:00 -import { NotNull, Override } from "./Decorators"; -import { Token } from "./Token"; -import { Vocabulary } from "./Vocabulary"; +import { + Token, + Vocabulary +} from "./internal"; /** * This class provides a default implementation of the {@link Vocabulary} @@ -23,15 +24,15 @@ export class VocabularyImpl implements Vocabulary { * {@link #getDisplayName(int)} returns the numeric value for all tokens * except {@link Token#EOF}. */ - @NotNull + public static readonly EMPTY_VOCABULARY: VocabularyImpl = new VocabularyImpl([], [], []); - @NotNull - private readonly literalNames: Array; - @NotNull - private readonly symbolicNames: Array; - @NotNull - private readonly displayNames: Array; + + private readonly literalNames: (string | undefined)[]; + + private readonly symbolicNames: (string | undefined)[]; + + private readonly displayNames: (string | undefined)[]; private _maxTokenType: number; @@ -52,7 +53,7 @@ export class VocabularyImpl implements Vocabulary { * @see #getSymbolicName(int) * @see #getDisplayName(int) */ - constructor(literalNames: Array, symbolicNames: Array, displayNames: Array) { + constructor(literalNames: (string | undefined)[], symbolicNames: (string | undefined)[], displayNames: (string | undefined)[]) { this.literalNames = literalNames; this.symbolicNames = symbolicNames; this.displayNames = displayNames; @@ -62,12 +63,12 @@ export class VocabularyImpl implements Vocabulary { Math.max(this.literalNames.length, this.symbolicNames.length)) - 1; } - @Override + // @Override get maxTokenType(): number { return this._maxTokenType; } - @Override + // @Override public getLiteralName(tokenType: number): string | undefined { if (tokenType >= 0 && tokenType < this.literalNames.length) { return this.literalNames[tokenType]; @@ -76,7 +77,7 @@ export class VocabularyImpl implements Vocabulary { return undefined; } - @Override + // @Override public getSymbolicName(tokenType: number): string | undefined { if (tokenType >= 0 && tokenType < this.symbolicNames.length) { return this.symbolicNames[tokenType]; @@ -89,22 +90,22 @@ export class VocabularyImpl implements Vocabulary { return undefined; } - @Override - @NotNull + // @Override + public getDisplayName(tokenType: number): string { if (tokenType >= 0 && tokenType < this.displayNames.length) { - let displayName = this.displayNames[tokenType]; + const displayName = this.displayNames[tokenType]; if (displayName) { return displayName; } } - let literalName = this.getLiteralName(tokenType); + const literalName = this.getLiteralName(tokenType); if (literalName) { return literalName; } - let symbolicName = this.getSymbolicName(tokenType); + const symbolicName = this.getSymbolicName(tokenType); if (symbolicName) { return symbolicName; } diff --git a/src/WritableToken.ts b/runtime/typescript/src/WritableToken.ts similarity index 91% rename from src/WritableToken.ts rename to runtime/typescript/src/WritableToken.ts index 68408065..9e100721 100644 --- a/src/WritableToken.ts +++ b/runtime/typescript/src/WritableToken.ts @@ -5,7 +5,7 @@ // ConvertTo-TS run at 2016-10-04T11:26:59.7015751-07:00 -import { Token } from "./Token"; +import { Token } from "./internal"; export interface WritableToken extends Token { text: string | undefined; diff --git a/src/atn/ATN.ts b/runtime/typescript/src/atn/ATN.ts similarity index 81% rename from src/atn/ATN.ts rename to runtime/typescript/src/atn/ATN.ts index a278866a..d56f5fde 100644 --- a/src/atn/ATN.ts +++ b/runtime/typescript/src/atn/ATN.ts @@ -5,37 +5,38 @@ // ConvertTo-TS run at 2016-10-04T11:26:25.1063510-07:00 -import { Array2DHashMap } from "../misc/Array2DHashMap"; -import { ATNState } from "./ATNState"; -import { ATNType } from "./ATNType"; -import { DecisionState } from "./DecisionState"; -import { DFA } from "../dfa/DFA"; -import { IntervalSet } from "../misc/IntervalSet"; -import { InvalidState } from "./InvalidState"; -import { LexerAction } from "./LexerAction"; -import { LL1Analyzer } from "./LL1Analyzer"; -import { NotNull } from "../Decorators"; -import { ObjectEqualityComparator } from "../misc/ObjectEqualityComparator"; -import { PredictionContext } from "./PredictionContext"; -import { RuleContext } from "../RuleContext"; -import { RuleStartState } from "./RuleStartState"; -import { RuleStopState } from "./RuleStopState"; -import { RuleTransition } from "./RuleTransition"; -import { Token } from "../Token"; -import { TokensStartState } from "./TokensStartState"; - import * as assert from "assert"; +import { + ATNState, + ATNType, + Array2DHashMap, + DFA, + DecisionState, + IntervalSet, + InvalidState, + LL1Analyzer, + LexerAction, + ObjectEqualityComparator, + PredictionContext, + RuleContext, + RuleStartState, + RuleStopState, + RuleTransition, + Token, + TokensStartState +} from "../internal"; + /** */ export class ATN { - @NotNull + public readonly states: ATNState[] = []; /** Each subrule/rule is a decision point and we must track them so we * can go back later and build DFA predictors for them. This includes * all the rules, subrules, optional blocks, ()+, ()* etc... */ - @NotNull + public decisionToState: DecisionState[] = []; /** @@ -48,7 +49,7 @@ export class ATN { */ public ruleToStopState: RuleStopState[]; - @NotNull + public modeNameToStartState: Map = new Map(); @@ -77,21 +78,21 @@ export class ATN { */ public lexerActions: LexerAction[]; - @NotNull + public modeToStartState: TokensStartState[] = []; private contextCache: Array2DHashMap = new Array2DHashMap(ObjectEqualityComparator.INSTANCE); - @NotNull + public decisionToDFA: DFA[] = []; - @NotNull + public modeToDFA: DFA[] = []; public LL1Table: Map = new Map(); /** Used for runtime deserialization of ATNs from strings */ - constructor(@NotNull grammarType: ATNType, maxTokenType: number) { + constructor(grammarType: ATNType, maxTokenType: number) { this.grammarType = grammarType; this.maxTokenType = maxTokenType; } @@ -140,11 +141,11 @@ export class ATN { // @NotNull public nextTokens(/*@NotNull*/ s: ATNState): IntervalSet; - @NotNull + public nextTokens(s: ATNState, ctx?: PredictionContext): IntervalSet { if (ctx) { - let anal: LL1Analyzer = new LL1Analyzer(this); - let next: IntervalSet = anal.LOOK(s, ctx); + const anal: LL1Analyzer = new LL1Analyzer(this); + const next: IntervalSet = anal.LOOK(s, ctx); return next; } else { if (s.nextTokenWithinRule) { @@ -163,22 +164,22 @@ export class ATN { this.states.push(state); } - public removeState(@NotNull state: ATNState): void { + public removeState(state: ATNState): void { // just replace the state, don't shift states in list - let invalidState = new InvalidState(); + const invalidState = new InvalidState(); invalidState.atn = this; invalidState.stateNumber = state.stateNumber; this.states[state.stateNumber] = invalidState; } - public defineMode(@NotNull name: string, @NotNull s: TokensStartState): void { + public defineMode(name: string, s: TokensStartState): void { this.modeNameToStartState.set(name, s); this.modeToStartState.push(s); this.modeToDFA.push(new DFA(s)); this.defineDecisionState(s); } - public defineDecisionState(@NotNull s: DecisionState): number { + public defineDecisionState(s: DecisionState): number { this.decisionToState.push(s); s.decision = this.decisionToState.length - 1; this.decisionToDFA.push(new DFA(s, s.decision)); @@ -232,25 +233,25 @@ export class ATN { * @ if the ATN does not contain a state with * number `stateNumber` */ - @NotNull + public getExpectedTokens(stateNumber: number, context: RuleContext | undefined): IntervalSet { if (stateNumber < 0 || stateNumber >= this.states.length) { throw new RangeError("Invalid state number."); } let ctx: RuleContext | undefined = context; - let s: ATNState = this.states[stateNumber]; + const s: ATNState = this.states[stateNumber]; let following: IntervalSet = this.nextTokens(s); if (!following.contains(Token.EPSILON)) { return following; } - let expected: IntervalSet = new IntervalSet(); + const expected: IntervalSet = new IntervalSet(); expected.addAll(following); expected.remove(Token.EPSILON); while (ctx != null && ctx.invokingState >= 0 && following.contains(Token.EPSILON)) { - let invokingState: ATNState = this.states[ctx.invokingState]; - let rt: RuleTransition = invokingState.transition(0) as RuleTransition; + const invokingState: ATNState = this.states[ctx.invokingState]; + const rt: RuleTransition = invokingState.transition(0) as RuleTransition; following = this.nextTokens(rt.followState); expected.addAll(following); expected.remove(Token.EPSILON); @@ -266,5 +267,5 @@ export class ATN { } export namespace ATN { - export const INVALID_ALT_NUMBER: number = 0; + export const INVALID_ALT_NUMBER = 0; } diff --git a/src/atn/ATNConfig.ts b/runtime/typescript/src/atn/ATNConfig.ts similarity index 86% rename from src/atn/ATNConfig.ts rename to runtime/typescript/src/atn/ATNConfig.ts index 4532f7ff..c2d7fab3 100644 --- a/src/atn/ATNConfig.ts +++ b/runtime/typescript/src/atn/ATNConfig.ts @@ -5,27 +5,28 @@ // ConvertTo-TS run at 2016-10-04T11:26:25.2796692-07:00 -import { Array2DHashMap } from "../misc/Array2DHashMap"; -import { ATNState } from "./ATNState"; -import { DecisionState } from "./DecisionState"; -import { Equatable } from "../misc/Stubs"; -import { LexerActionExecutor } from "./LexerActionExecutor"; -import { MurmurHash } from "../misc/MurmurHash"; -import { NotNull, Override } from "../Decorators"; -import { ObjectEqualityComparator } from "../misc/ObjectEqualityComparator"; -import { PredictionContext } from "./PredictionContext"; -import { PredictionContextCache } from "./PredictionContextCache"; -import { Recognizer } from "../Recognizer"; -import { SemanticContext } from "./SemanticContext"; - import * as assert from "assert"; +import { + ATNState, + Array2DHashMap, + DecisionState, + Equatable, + LexerActionExecutor, + MurmurHash, + ObjectEqualityComparator, + PredictionContext, + PredictionContextCache, + Recognizer, + SemanticContext +} from "../internal"; + /** * This field stores the bit mask for implementing the * {@link #isPrecedenceFilterSuppressed} property as a bit within the * existing {@link #altAndOuterContextDepth} field. */ -const SUPPRESS_PRECEDENCE_FILTER: number = 0x80000000; +const SUPPRESS_PRECEDENCE_FILTER = 0x80000000; /** * Represents a location with context in an ATN. The location is identified by the following values: @@ -58,7 +59,7 @@ const SUPPRESS_PRECEDENCE_FILTER: number = 0x80000000; */ export class ATNConfig implements Equatable { /** The ATN state associated with this configuration */ - @NotNull + private _state: ATNState; /** @@ -74,13 +75,13 @@ export class ATNConfig implements Equatable { * with this config. We track only those contexts pushed during * execution of the ATN simulator. */ - @NotNull + private _context: PredictionContext; constructor(/*@NotNull*/ state: ATNState, alt: number, /*@NotNull*/ context: PredictionContext); constructor(/*@NotNull*/ state: ATNState, /*@NotNull*/ c: ATNConfig, /*@NotNull*/ context: PredictionContext); - constructor(@NotNull state: ATNState, altOrConfig: number | ATNConfig, @NotNull context: PredictionContext) { + constructor(state: ATNState, altOrConfig: number | ATNConfig, context: PredictionContext) { if (typeof altOrConfig === "number") { assert((altOrConfig & 0xFFFFFF) === altOrConfig); this._state = state; @@ -99,7 +100,7 @@ export class ATNConfig implements Equatable { public static create(/*@NotNull*/ state: ATNState, alt: number, context: PredictionContext, /*@*/ semanticContext: SemanticContext, lexerActionExecutor: LexerActionExecutor | undefined): ATNConfig; - public static create(@NotNull state: ATNState, alt: number, context: PredictionContext, @NotNull semanticContext: SemanticContext = SemanticContext.NONE, lexerActionExecutor?: LexerActionExecutor): ATNConfig { + public static create(state: ATNState, alt: number, context: PredictionContext, semanticContext: SemanticContext = SemanticContext.NONE, lexerActionExecutor?: LexerActionExecutor): ATNConfig { if (semanticContext !== SemanticContext.NONE) { if (lexerActionExecutor != null) { return new ActionSemanticContextATNConfig(lexerActionExecutor, semanticContext, state, alt, context, false); @@ -117,7 +118,7 @@ export class ATNConfig implements Equatable { } /** Gets the ATN state associated with this configuration */ - @NotNull + get state(): ATNState { return this._state; } @@ -127,12 +128,12 @@ export class ATNConfig implements Equatable { return this.altAndOuterContextDepth & 0x00FFFFFF; } - @NotNull + get context(): PredictionContext { return this._context; } - set context(@NotNull context: PredictionContext) { + set context(context: PredictionContext) { this._context = context; } @@ -166,7 +167,7 @@ export class ATNConfig implements Equatable { return undefined; } - @NotNull + get semanticContext(): SemanticContext { return SemanticContext.NONE; } @@ -175,7 +176,7 @@ export class ATNConfig implements Equatable { return false; } - @Override + // @Override public clone(): ATNConfig { return this.transform(this.state, false); } @@ -196,8 +197,8 @@ export class ATNConfig implements Equatable { } } - private transformImpl(@NotNull state: ATNState, context: PredictionContext, @NotNull semanticContext: SemanticContext, checkNonGreedy: boolean, lexerActionExecutor: LexerActionExecutor | undefined): ATNConfig { - let passedThroughNonGreedy: boolean = checkNonGreedy && ATNConfig.checkNonGreedyDecision(this, state); + private transformImpl(state: ATNState, context: PredictionContext, semanticContext: SemanticContext, checkNonGreedy: boolean, lexerActionExecutor: LexerActionExecutor | undefined): ATNConfig { + const passedThroughNonGreedy: boolean = checkNonGreedy && ATNConfig.checkNonGreedyDecision(this, state); if (semanticContext !== SemanticContext.NONE) { if (lexerActionExecutor != null || passedThroughNonGreedy) { return new ActionSemanticContextATNConfig(lexerActionExecutor, semanticContext, state, this, context, passedThroughNonGreedy); @@ -223,12 +224,12 @@ export class ATNConfig implements Equatable { public appendContext(context: PredictionContext, contextCache: PredictionContextCache): ATNConfig; public appendContext(context: number | PredictionContext, contextCache: PredictionContextCache): ATNConfig { if (typeof context === "number") { - let appendedContext: PredictionContext = this.context.appendSingleContext(context, contextCache); - let result: ATNConfig = this.transform(this.state, false, appendedContext); + const appendedContext: PredictionContext = this.context.appendSingleContext(context, contextCache); + const result: ATNConfig = this.transform(this.state, false, appendedContext); return result; } else { - let appendedContext: PredictionContext = this.context.appendContext(context, contextCache); - let result: ATNConfig = this.transform(this.state, false, appendedContext); + const appendedContext: PredictionContext = this.context.appendContext(context, contextCache); + const result: ATNConfig = this.transform(this.state, false, appendedContext); return result; } } @@ -265,13 +266,13 @@ export class ATNConfig implements Equatable { return false; } - let leftWorkList: PredictionContext[] = []; - let rightWorkList: PredictionContext[] = []; + const leftWorkList: PredictionContext[] = []; + const rightWorkList: PredictionContext[] = []; leftWorkList.push(this.context); rightWorkList.push(subconfig.context); while (true) { - let left = leftWorkList.pop(); - let right = rightWorkList.pop(); + const left = leftWorkList.pop(); + const right = rightWorkList.pop(); if (!left || !right) { break; } @@ -288,7 +289,7 @@ export class ATNConfig implements Equatable { return left.hasEmpty; } else { for (let i = 0; i < right.size; i++) { - let index: number = left.findReturnState(right.getReturnState(i)); + const index: number = left.findReturnState(right.getReturnState(i)); if (index < 0) { // assumes invokingStates has no duplicate entries return false; @@ -320,7 +321,7 @@ export class ATNConfig implements Equatable { * the same state, they predict the same alternative, and * syntactic/semantic contexts are the same. */ - @Override + // @Override public equals(o: any): boolean { if (this === o) { return true; @@ -338,7 +339,7 @@ export class ATNConfig implements Equatable { && ObjectEqualityComparator.INSTANCE.equals(this.lexerActionExecutor, o.lexerActionExecutor); } - @Override + // @Override public hashCode(): number { let hashCode: number = MurmurHash.initialize(7); hashCode = MurmurHash.update(hashCode, this.state.stateNumber); @@ -365,11 +366,11 @@ export class ATNConfig implements Equatable { builder += ("digraph G {\n"); builder += ("rankdir=LR;\n"); - let visited = new Array2DHashMap(PredictionContext.IdentityEqualityComparator.INSTANCE); - let workList: PredictionContext[] = []; + const visited = new Array2DHashMap(PredictionContext.IdentityEqualityComparator.INSTANCE); + const workList: PredictionContext[] = []; function getOrAddContext(context: PredictionContext): number { - let newNumber = visited.size; - let result = visited.putIfAbsent(context, newNumber); + const newNumber = visited.size; + const result = visited.putIfAbsent(context, newNumber); if (result != null) { // Already saw this context return result; @@ -382,7 +383,7 @@ export class ATNConfig implements Equatable { workList.push(this.context); visited.put(this.context, 0); while (true) { - let current = workList.pop(); + const current = workList.pop(); if (!current) { break; } @@ -428,8 +429,8 @@ export class ATNConfig implements Equatable { contexts = ["?"]; } - let first: boolean = true; - for (let contextDesc of contexts) { + let first = true; + for (const contextDesc of contexts) { if (first) { first = false; } @@ -468,12 +469,12 @@ export class ATNConfig implements Equatable { * types. */ class SemanticContextATNConfig extends ATNConfig { - @NotNull + private _semanticContext: SemanticContext; constructor(semanticContext: SemanticContext, /*@NotNull*/ state: ATNState, alt: number, context: PredictionContext); constructor(semanticContext: SemanticContext, /*@NotNull*/ state: ATNState, /*@NotNull*/ c: ATNConfig, context: PredictionContext); - constructor(semanticContext: SemanticContext, @NotNull state: ATNState, @NotNull altOrConfig: number | ATNConfig, context: PredictionContext) { + constructor(semanticContext: SemanticContext, state: ATNState, altOrConfig: number | ATNConfig, context: PredictionContext) { if (typeof altOrConfig === "number") { super(state, altOrConfig, context); } else { @@ -483,7 +484,7 @@ class SemanticContextATNConfig extends ATNConfig { this._semanticContext = semanticContext; } - @Override + // @Override get semanticContext(): SemanticContext { return this._semanticContext; } @@ -503,7 +504,7 @@ class ActionATNConfig extends ATNConfig { constructor(lexerActionExecutor: LexerActionExecutor | undefined, /*@NotNull*/ state: ATNState, alt: number, context: PredictionContext, passedThroughNonGreedyDecision: boolean); constructor(lexerActionExecutor: LexerActionExecutor | undefined, /*@NotNull*/ state: ATNState, /*@NotNull*/ c: ATNConfig, context: PredictionContext, passedThroughNonGreedyDecision: boolean); - constructor(lexerActionExecutor: LexerActionExecutor | undefined, @NotNull state: ATNState, @NotNull altOrConfig: number | ATNConfig, context: PredictionContext, passedThroughNonGreedyDecision: boolean) { + constructor(lexerActionExecutor: LexerActionExecutor | undefined, state: ATNState, altOrConfig: number | ATNConfig, context: PredictionContext, passedThroughNonGreedyDecision: boolean) { if (typeof altOrConfig === "number") { super(state, altOrConfig, context); } else { @@ -517,12 +518,12 @@ class ActionATNConfig extends ATNConfig { this.passedThroughNonGreedyDecision = passedThroughNonGreedyDecision; } - @Override + // @Override get lexerActionExecutor(): LexerActionExecutor | undefined { return this._lexerActionExecutor; } - @Override + // @Override get hasPassedThroughNonGreedyDecision(): boolean { return this.passedThroughNonGreedyDecision; } @@ -541,7 +542,7 @@ class ActionSemanticContextATNConfig extends SemanticContextATNConfig { constructor(lexerActionExecutor: LexerActionExecutor | undefined, /*@NotNull*/ semanticContext: SemanticContext, /*@NotNull*/ state: ATNState, alt: number, context: PredictionContext, passedThroughNonGreedyDecision: boolean); constructor(lexerActionExecutor: LexerActionExecutor | undefined, /*@NotNull*/ semanticContext: SemanticContext, /*@NotNull*/ state: ATNState, /*@NotNull*/ c: ATNConfig, context: PredictionContext, passedThroughNonGreedyDecision: boolean); - constructor(lexerActionExecutor: LexerActionExecutor | undefined, @NotNull semanticContext: SemanticContext, @NotNull state: ATNState, altOrConfig: number | ATNConfig, context: PredictionContext, passedThroughNonGreedyDecision: boolean) { + constructor(lexerActionExecutor: LexerActionExecutor | undefined, semanticContext: SemanticContext, state: ATNState, altOrConfig: number | ATNConfig, context: PredictionContext, passedThroughNonGreedyDecision: boolean) { if (typeof altOrConfig === "number") { super(semanticContext, state, altOrConfig, context); } else { @@ -552,12 +553,12 @@ class ActionSemanticContextATNConfig extends SemanticContextATNConfig { this.passedThroughNonGreedyDecision = passedThroughNonGreedyDecision; } - @Override + // @Override get lexerActionExecutor(): LexerActionExecutor | undefined { return this._lexerActionExecutor; } - @Override + // @Override get hasPassedThroughNonGreedyDecision(): boolean { return this.passedThroughNonGreedyDecision; } diff --git a/src/atn/ATNConfigSet.ts b/runtime/typescript/src/atn/ATNConfigSet.ts similarity index 83% rename from src/atn/ATNConfigSet.ts rename to runtime/typescript/src/atn/ATNConfigSet.ts index 3a43ab17..58170f40 100644 --- a/src/atn/ATNConfigSet.ts +++ b/runtime/typescript/src/atn/ATNConfigSet.ts @@ -5,41 +5,42 @@ // ConvertTo-TS run at 2016-10-04T11:26:25.5488013-07:00 -import { Array2DHashMap } from "../misc/Array2DHashMap"; -import { Array2DHashSet } from "../misc/Array2DHashSet"; -import { ArrayEqualityComparator } from "../misc/ArrayEqualityComparator"; -import { ATN } from "./ATN"; -import { ATNConfig } from "./ATNConfig"; -import { ATNSimulator } from "./ATNSimulator"; -import { ATNState } from "./ATNState"; -import { BitSet } from "../misc/BitSet"; -import { ConflictInfo } from "./ConflictInfo"; -import { EqualityComparator } from "../misc/EqualityComparator"; -import { JavaSet } from "../misc/Stubs"; -import { NotNull, Override } from "../Decorators"; -import { ObjectEqualityComparator } from "../misc/ObjectEqualityComparator"; -import { PredictionContext } from "./PredictionContext"; -import { PredictionContextCache } from "./PredictionContextCache"; -import { SemanticContext } from "./SemanticContext"; - +import * as Utils from "../internal"; import * as assert from "assert"; -import * as Utils from "../misc/Utils"; -interface KeyType { state: number; alt: number; } +import { + ATN, + ATNConfig, + ATNSimulator, + ATNState, + Array2DHashMap, + Array2DHashSet, + ArrayEqualityComparator, + BitSet, + ConflictInfo, + EqualityComparator, + JavaSet, + ObjectEqualityComparator, + PredictionContext, + PredictionContextCache, + SemanticContext +} from "../internal"; + +interface KeyType { state: number; alt: number } class KeyTypeEqualityComparer implements EqualityComparator { - public hashCode(key: KeyType) { + public hashCode(key: KeyType): number { return key.state ^ key.alt; } - public equals(a: KeyType, b: KeyType) { + public equals(a: KeyType, b: KeyType): boolean { return a.state === b.state && a.alt === b.alt; } public static readonly INSTANCE = new KeyTypeEqualityComparer(); } -function NewKeyedConfigMap(map?: Array2DHashMap) { +function NewKeyedConfigMap(map?: Array2DHashMap): Array2DHashMap { if (map) { return new Array2DHashMap(map); } else { @@ -87,12 +88,12 @@ export class ATNConfigSet implements JavaSet { */ private configs: ATNConfig[]; - private _uniqueAlt: number = 0; + private _uniqueAlt = 0; private _conflictInfo?: ConflictInfo; // Used in parser and lexer. In lexer, it indicates we hit a pred // while computing a closure operation. Don't make a DFA state from this. - private _hasSemanticContext: boolean = false; - private _dipsIntoOuterContext: boolean = false; + private _hasSemanticContext = false; + private _dipsIntoOuterContext = false; /** * When `true`, this config set represents configurations where the entire * outer context has been consumed by the ATN interpreter. This prevents the @@ -102,9 +103,9 @@ export class ATNConfigSet implements JavaSet { * Note: `outermostConfigSet` and {@link #dipsIntoOuterContext} should never * be true at the same time. */ - private outermostConfigSet: boolean = false; + private outermostConfigSet = false; - private cachedHashCode: number = -1; + private cachedHashCode = -1; constructor(); constructor(set: ATNConfigSet, readonly: boolean); @@ -147,14 +148,14 @@ export class ATNConfigSet implements JavaSet { * Get the set of all alternatives represented by configurations in this * set. */ - @NotNull + public getRepresentedAlternatives(): BitSet { if (this._conflictInfo != null) { return this._conflictInfo.conflictedAlts.clone(); } - let alts: BitSet = new BitSet(); - for (let config of this) { + const alts: BitSet = new BitSet(); + for (const config of this) { alts.set(config.alt); } @@ -179,8 +180,8 @@ export class ATNConfigSet implements JavaSet { } public getStates(): Array2DHashSet { - let states = new Array2DHashSet(ObjectEqualityComparator.INSTANCE); - for (let c of this.configs) { + const states = new Array2DHashSet(ObjectEqualityComparator.INSTANCE); + for (const c of this.configs) { states.add(c.state); } @@ -192,13 +193,13 @@ export class ATNConfigSet implements JavaSet { return; } - for (let config of this.configs) { + for (const config of this.configs) { config.context = interpreter.atn.getCachedContext(config.context); } } public clone(readonly: boolean): ATNConfigSet { - let copy: ATNConfigSet = new ATNConfigSet(this, readonly); + const copy: ATNConfigSet = new ATNConfigSet(this, readonly); if (!readonly && this.isReadOnly) { copy.addAll(this.configs); } @@ -206,37 +207,37 @@ export class ATNConfigSet implements JavaSet { return copy; } - @Override + // @Override get size(): number { return this.configs.length; } - @Override + // @Override get isEmpty(): boolean { return this.configs.length === 0; } - @Override - public contains(o: any): boolean { + // @Override + public contains(o: object): boolean { if (!(o instanceof ATNConfig)) { return false; } if (this.mergedConfigs && this.unmerged) { - let config: ATNConfig = o; - let configKey = this.getKey(config); - let mergedConfig = this.mergedConfigs.get(configKey); + const config: ATNConfig = o; + const configKey = this.getKey(config); + const mergedConfig = this.mergedConfigs.get(configKey); if (mergedConfig != null && this.canMerge(config, configKey, mergedConfig)) { return mergedConfig.contains(config); } - for (let c of this.unmerged) { + for (const c of this.unmerged) { if (c.contains(o)) { return true; } } } else { - for (let c of this.configs) { + for (const c of this.configs) { if (c.contains(o)) { return true; } @@ -246,12 +247,12 @@ export class ATNConfigSet implements JavaSet { return false; } - @Override + // @Override public *[Symbol.iterator](): IterableIterator { yield* this.configs; } - @Override + // @Override public toArray(): ATNConfig[] { return this.configs; } @@ -270,17 +271,16 @@ export class ATNConfigSet implements JavaSet { contextCache = PredictionContextCache.UNCACHED; } - let addKey: boolean; - let key = this.getKey(e); - let mergedConfig = this.mergedConfigs.get(key); - addKey = (mergedConfig == null); + const key = this.getKey(e); + const mergedConfig = this.mergedConfigs.get(key); + const addKey = (mergedConfig == null); if (mergedConfig != null && this.canMerge(e, key, mergedConfig)) { mergedConfig.outerContextDepth = Math.max(mergedConfig.outerContextDepth, e.outerContextDepth); if (e.isPrecedenceFilterSuppressed) { mergedConfig.isPrecedenceFilterSuppressed = true; } - let joined: PredictionContext = PredictionContext.join(mergedConfig.context, e.context, contextCache); + const joined: PredictionContext = PredictionContext.join(mergedConfig.context, e.context, contextCache); this.updatePropertiesForMergedConfig(e); if (mergedConfig.context === joined) { return false; @@ -291,14 +291,14 @@ export class ATNConfigSet implements JavaSet { } for (let i = 0; i < this.unmerged.length; i++) { - let unmergedConfig: ATNConfig = this.unmerged[i]; + const unmergedConfig: ATNConfig = this.unmerged[i]; if (this.canMerge(e, key, unmergedConfig)) { unmergedConfig.outerContextDepth = Math.max(unmergedConfig.outerContextDepth, e.outerContextDepth); if (e.isPrecedenceFilterSuppressed) { unmergedConfig.isPrecedenceFilterSuppressed = true; } - let joined: PredictionContext = PredictionContext.join(unmergedConfig.context, e.context, contextCache); + const joined: PredictionContext = PredictionContext.join(unmergedConfig.context, e.context, contextCache); this.updatePropertiesForMergedConfig(e); if (unmergedConfig.context === joined) { return false; @@ -344,7 +344,7 @@ export class ATNConfigSet implements JavaSet { assert(!this.outermostConfigSet || !this._dipsIntoOuterContext); } - protected canMerge(left: ATNConfig, leftKey: { state: number, alt: number }, right: ATNConfig): boolean { + protected canMerge(left: ATNConfig, leftKey: { state: number; alt: number }, right: ATNConfig): boolean { if (left.state.stateNumber !== right.state.stateNumber) { return false; } @@ -356,13 +356,13 @@ export class ATNConfigSet implements JavaSet { return left.semanticContext.equals(right.semanticContext); } - protected getKey(e: ATNConfig): { state: number, alt: number } { + protected getKey(e: ATNConfig): { state: number; alt: number } { return { state: e.state.stateNumber, alt: e.alt }; } - @Override - public containsAll(c: Iterable): boolean { - for (let o of c) { + // @Override + public containsAll(c: Iterable): boolean { + for (const o of c) { if (!(o instanceof ATNConfig)) { return false; } @@ -380,8 +380,8 @@ export class ATNConfigSet implements JavaSet { public addAll(c: Iterable, contextCache?: PredictionContextCache): boolean { this.ensureWritable(); - let changed: boolean = false; - for (let group of c) { + let changed = false; + for (const group of c) { if (this.add(group, contextCache)) { changed = true; } @@ -390,7 +390,7 @@ export class ATNConfigSet implements JavaSet { return changed; } - @Override + // @Override public clear(): void { this.ensureWritable(); if (!this.mergedConfigs || !this.unmerged) { @@ -407,8 +407,8 @@ export class ATNConfigSet implements JavaSet { this._conflictInfo = undefined; } - @Override - public equals(obj: any): boolean { + // @Override + public equals(obj: object): boolean { if (this === obj) { return true; } @@ -422,13 +422,13 @@ export class ATNConfigSet implements JavaSet { && ArrayEqualityComparator.INSTANCE.equals(this.configs, obj.configs); } - @Override + // @Override public hashCode(): number { if (this.isReadOnly && this.cachedHashCode !== -1) { return this.cachedHashCode; } - let hashCode: number = 1; + let hashCode = 1; hashCode = 5 * hashCode ^ (this.outermostConfigSet ? 1 : 0); hashCode = 5 * hashCode ^ ArrayEqualityComparator.INSTANCE.hashCode(this.configs); @@ -447,7 +447,7 @@ export class ATNConfigSet implements JavaSet { } let buf = ""; - let sortedConfigs = this.configs.slice(0); + const sortedConfigs = this.configs.slice(0); sortedConfigs.sort((o1, o2) => { if (o1.alt !== o2.alt) { return o1.alt - o2.alt; diff --git a/src/atn/ATNDeserializationOptions.ts b/runtime/typescript/src/atn/ATNDeserializationOptions.ts similarity index 95% rename from src/atn/ATNDeserializationOptions.ts rename to runtime/typescript/src/atn/ATNDeserializationOptions.ts index e9953c12..7570ac2c 100644 --- a/src/atn/ATNDeserializationOptions.ts +++ b/runtime/typescript/src/atn/ATNDeserializationOptions.ts @@ -5,7 +5,7 @@ // ConvertTo-TS run at 2016-10-04T11:26:25.8187912-07:00 -import { NotNull } from "../Decorators"; + /** * @@ -14,7 +14,7 @@ import { NotNull } from "../Decorators"; export class ATNDeserializationOptions { private static _defaultOptions?: ATNDeserializationOptions; - private readOnly: boolean = false; + private readOnly = false; private verifyATN: boolean; private generateRuleBypassTransitions: boolean; private optimize: boolean; @@ -31,7 +31,7 @@ export class ATNDeserializationOptions { } } - @NotNull + static get defaultOptions(): ATNDeserializationOptions { if (ATNDeserializationOptions._defaultOptions == null) { ATNDeserializationOptions._defaultOptions = new ATNDeserializationOptions(); diff --git a/src/atn/ATNDeserializer.ts b/runtime/typescript/src/atn/ATNDeserializer.ts similarity index 68% rename from src/atn/ATNDeserializer.ts rename to runtime/typescript/src/atn/ATNDeserializer.ts index 38122b9e..fcb24ce6 100644 --- a/src/atn/ATNDeserializer.ts +++ b/runtime/typescript/src/atn/ATNDeserializer.ts @@ -5,57 +5,58 @@ // ConvertTo-TS run at 2016-10-04T11:26:25.9683447-07:00 -import { ActionTransition } from "./ActionTransition"; -import { Array2DHashSet } from "../misc/Array2DHashSet"; -import { ATN } from "./ATN"; -import { ATNDeserializationOptions } from "./ATNDeserializationOptions"; -import { ATNState } from "./ATNState"; -import { ATNStateType } from "./ATNStateType"; -import { ATNType } from "./ATNType"; -import { AtomTransition } from "./AtomTransition"; -import { BasicBlockStartState } from "./BasicBlockStartState"; -import { BasicState } from "./BasicState"; -import { BitSet } from "../misc/BitSet"; -import { BlockEndState } from "./BlockEndState"; -import { BlockStartState } from "./BlockStartState"; -import { DecisionState } from "./DecisionState"; -import { DFA } from "../dfa/DFA"; -import { EpsilonTransition } from "./EpsilonTransition"; -import { Interval } from "../misc/Interval"; -import { IntervalSet } from "../misc/IntervalSet"; -import { InvalidState } from "./InvalidState"; -import { LexerAction } from "./LexerAction"; -import { LexerActionType } from "./LexerActionType"; -import { LexerChannelAction } from "./LexerChannelAction"; -import { LexerCustomAction } from "./LexerCustomAction"; -import { LexerModeAction } from "./LexerModeAction"; -import { LexerMoreAction } from "./LexerMoreAction"; -import { LexerPopModeAction } from "./LexerPopModeAction"; -import { LexerPushModeAction } from "./LexerPushModeAction"; -import { LexerSkipAction } from "./LexerSkipAction"; -import { LexerTypeAction } from "./LexerTypeAction"; -import { LoopEndState } from "./LoopEndState"; -import { NotNull } from "../Decorators"; -import { NotSetTransition } from "./NotSetTransition"; -import { ParserATNSimulator } from "./ParserATNSimulator"; -import { PlusBlockStartState } from "./PlusBlockStartState"; -import { PlusLoopbackState } from "./PlusLoopbackState"; -import { PrecedencePredicateTransition } from "./PrecedencePredicateTransition"; -import { PredicateTransition } from "./PredicateTransition"; -import { RangeTransition } from "./RangeTransition"; -import { RuleStartState } from "./RuleStartState"; -import { RuleStopState } from "./RuleStopState"; -import { RuleTransition } from "./RuleTransition"; -import { SetTransition } from "./SetTransition"; -import { StarBlockStartState } from "./StarBlockStartState"; -import { StarLoopbackState } from "./StarLoopbackState"; -import { StarLoopEntryState } from "./StarLoopEntryState"; -import { Token } from "../Token"; -import { TokensStartState } from "./TokensStartState"; -import { Transition } from "./Transition"; -import { TransitionType } from "./TransitionType"; -import { UUID } from "../misc/UUID"; -import { WildcardTransition } from "./WildcardTransition"; +import { + ATN, + ATNDeserializationOptions, + ATNState, + ATNStateType, + ATNType, + ActionTransition, + Array2DHashSet, + AtomTransition, + BasicBlockStartState, + BasicState, + BitSet, + BlockEndState, + BlockStartState, + DFA, + DecisionState, + EpsilonTransition, + Interval, + IntervalSet, + InvalidState, + LexerAction, + LexerActionType, + LexerChannelAction, + LexerCustomAction, + LexerModeAction, + LexerMoreAction, + LexerPopModeAction, + LexerPushModeAction, + LexerSkipAction, + LexerTypeAction, + LoopEndState, + NotSetTransition, + ParserATNSimulator, + PlusBlockStartState, + PlusLoopbackState, + PrecedencePredicateTransition, + PredicateTransition, + RangeTransition, + RuleStartState, + RuleStopState, + RuleTransition, + SetTransition, + StarBlockStartState, + StarLoopEntryState, + StarLoopbackState, + Token, + TokensStartState, + Transition, + TransitionType, + UUID, + WildcardTransition +} from "../internal"; interface UnicodeDeserializer { // Wrapper for readInt() or readInt32() @@ -118,7 +119,7 @@ export class ATNDeserializer { */ private static readonly SERIALIZED_UUID: UUID = ATNDeserializer.ADDED_UNICODE_SMP; - @NotNull + private readonly deserializationOptions: ATNDeserializationOptions; constructor(deserializationOptions?: ATNDeserializationOptions) { @@ -143,7 +144,7 @@ export class ATNDeserializer { * introduced; otherwise, `false`. */ protected static isFeatureSupported(feature: UUID, actualUuid: UUID): boolean { - let featureIndex: number = ATNDeserializer.SUPPORTED_UUIDS.findIndex((e) => e.equals(feature)); + const featureIndex: number = ATNDeserializer.SUPPORTED_UUIDS.findIndex((e) => e.equals(feature)); if (featureIndex < 0) { return false; } @@ -169,7 +170,7 @@ export class ATNDeserializer { } } - public deserialize(@NotNull data: Uint16Array): ATN { + public deserialize(data: Uint16Array): ATN { data = data.slice(0); // Each Uint16 value in data is shifted by +2 at the entry to this method. This is an encoding optimization @@ -185,34 +186,34 @@ export class ATNDeserializer { data[i] = (data[i] - 2) & 0xFFFF; } - let p: number = 0; - let version: number = ATNDeserializer.toInt(data[p++]); + let p = 0; + const version: number = ATNDeserializer.toInt(data[p++]); if (version !== ATNDeserializer.SERIALIZED_VERSION) { - let reason = `Could not deserialize ATN with version ${version} (expected ${ATNDeserializer.SERIALIZED_VERSION}).`; + const reason = `Could not deserialize ATN with version ${version} (expected ${ATNDeserializer.SERIALIZED_VERSION}).`; throw new Error(reason); } - let uuid: UUID = ATNDeserializer.toUUID(data, p); + const uuid: UUID = ATNDeserializer.toUUID(data, p); p += 8; if (ATNDeserializer.SUPPORTED_UUIDS.findIndex((e) => e.equals(uuid)) < 0) { - let reason = `Could not deserialize ATN with UUID ${uuid} (expected ${ATNDeserializer.SERIALIZED_UUID} or a legacy UUID).`; + const reason = `Could not deserialize ATN with UUID ${uuid} (expected ${ATNDeserializer.SERIALIZED_UUID} or a legacy UUID).`; throw new Error(reason); } - let supportsLexerActions: boolean = ATNDeserializer.isFeatureSupported(ATNDeserializer.ADDED_LEXER_ACTIONS, uuid); + const supportsLexerActions: boolean = ATNDeserializer.isFeatureSupported(ATNDeserializer.ADDED_LEXER_ACTIONS, uuid); - let grammarType: ATNType = ATNDeserializer.toInt(data[p++]); - let maxTokenType: number = ATNDeserializer.toInt(data[p++]); - let atn: ATN = new ATN(grammarType, maxTokenType); + const grammarType: ATNType = ATNDeserializer.toInt(data[p++]); + const maxTokenType: number = ATNDeserializer.toInt(data[p++]); + const atn: ATN = new ATN(grammarType, maxTokenType); // // STATES // - let loopBackStateNumbers: Array<[LoopEndState, number]> = []; - let endStateNumbers: Array<[BlockStartState, number]> = []; - let nstates: number = ATNDeserializer.toInt(data[p++]); + const loopBackStateNumbers: [LoopEndState, number][] = []; + const endStateNumbers: [BlockStartState, number][] = []; + const nstates: number = ATNDeserializer.toInt(data[p++]); for (let i = 0; i < nstates; i++) { - let stype: ATNStateType = ATNDeserializer.toInt(data[p++]); + const stype: ATNStateType = ATNDeserializer.toInt(data[p++]); // ignore bad type of states if (stype === ATNStateType.INVALID_TYPE) { atn.addState(new InvalidState()); @@ -224,57 +225,57 @@ export class ATNDeserializer { ruleIndex = -1; } - let s: ATNState = this.stateFactory(stype, ruleIndex); + const s: ATNState = this.stateFactory(stype, ruleIndex); if (stype === ATNStateType.LOOP_END) { // special case - let loopBackStateNumber: number = ATNDeserializer.toInt(data[p++]); + const loopBackStateNumber: number = ATNDeserializer.toInt(data[p++]); loopBackStateNumbers.push([s as LoopEndState, loopBackStateNumber]); } else if (s instanceof BlockStartState) { - let endStateNumber: number = ATNDeserializer.toInt(data[p++]); + const endStateNumber: number = ATNDeserializer.toInt(data[p++]); endStateNumbers.push([s, endStateNumber]); } atn.addState(s); } // delay the assignment of loop back and end states until we know all the state instances have been initialized - for (let pair of loopBackStateNumbers) { + for (const pair of loopBackStateNumbers) { pair[0].loopBackState = atn.states[pair[1]]; } - for (let pair of endStateNumbers) { + for (const pair of endStateNumbers) { pair[0].endState = atn.states[pair[1]] as BlockEndState; } - let numNonGreedyStates: number = ATNDeserializer.toInt(data[p++]); + const numNonGreedyStates: number = ATNDeserializer.toInt(data[p++]); for (let i = 0; i < numNonGreedyStates; i++) { - let stateNumber: number = ATNDeserializer.toInt(data[p++]); + const stateNumber: number = ATNDeserializer.toInt(data[p++]); (atn.states[stateNumber] as DecisionState).nonGreedy = true; } - let numSllDecisions: number = ATNDeserializer.toInt(data[p++]); + const numSllDecisions: number = ATNDeserializer.toInt(data[p++]); for (let i = 0; i < numSllDecisions; i++) { - let stateNumber: number = ATNDeserializer.toInt(data[p++]); + const stateNumber: number = ATNDeserializer.toInt(data[p++]); (atn.states[stateNumber] as DecisionState).sll = true; } - let numPrecedenceStates: number = ATNDeserializer.toInt(data[p++]); + const numPrecedenceStates: number = ATNDeserializer.toInt(data[p++]); for (let i = 0; i < numPrecedenceStates; i++) { - let stateNumber: number = ATNDeserializer.toInt(data[p++]); + const stateNumber: number = ATNDeserializer.toInt(data[p++]); (atn.states[stateNumber] as RuleStartState).isPrecedenceRule = true; } // // RULES // - let nrules: number = ATNDeserializer.toInt(data[p++]); + const nrules: number = ATNDeserializer.toInt(data[p++]); if (atn.grammarType === ATNType.LEXER) { atn.ruleToTokenType = new Int32Array(nrules); } atn.ruleToStartState = new Array(nrules); for (let i = 0; i < nrules; i++) { - let s: number = ATNDeserializer.toInt(data[p++]); - let startState: RuleStartState = atn.states[s] as RuleStartState; + const s: number = ATNDeserializer.toInt(data[p++]); + const startState: RuleStartState = atn.states[s] as RuleStartState; startState.leftFactored = ATNDeserializer.toInt(data[p++]) !== 0; atn.ruleToStartState[i] = startState; if (atn.grammarType === ATNType.LEXER) { @@ -297,7 +298,7 @@ export class ATNDeserializer { } atn.ruleToStopState = new Array(nrules); - for (let state of atn.states) { + for (const state of atn.states) { if (!(state instanceof RuleStopState)) { continue; } @@ -309,9 +310,9 @@ export class ATNDeserializer { // // MODES // - let nmodes: number = ATNDeserializer.toInt(data[p++]); + const nmodes: number = ATNDeserializer.toInt(data[p++]); for (let i = 0; i < nmodes; i++) { - let s: number = ATNDeserializer.toInt(data[p++]); + const s: number = ATNDeserializer.toInt(data[p++]); atn.modeToStartState.push(atn.states[s] as TokensStartState); } @@ -323,7 +324,7 @@ export class ATNDeserializer { // // SETS // - let sets: IntervalSet[] = []; + const sets: IntervalSet[] = []; // First, read all sets with 16-bit Unicode code points <= U+FFFF. p = this.deserializeSets(data, p, sets, ATNDeserializer.getUnicodeDeserializer(UnicodeDeserializingMode.UNICODE_BMP)); @@ -337,25 +338,25 @@ export class ATNDeserializer { // // EDGES // - let nedges: number = ATNDeserializer.toInt(data[p++]); + const nedges: number = ATNDeserializer.toInt(data[p++]); for (let i = 0; i < nedges; i++) { - let src: number = ATNDeserializer.toInt(data[p]); - let trg: number = ATNDeserializer.toInt(data[p + 1]); - let ttype: number = ATNDeserializer.toInt(data[p + 2]); - let arg1: number = ATNDeserializer.toInt(data[p + 3]); - let arg2: number = ATNDeserializer.toInt(data[p + 4]); - let arg3: number = ATNDeserializer.toInt(data[p + 5]); - let trans: Transition = this.edgeFactory(atn, ttype, src, trg, arg1, arg2, arg3, sets); + const src: number = ATNDeserializer.toInt(data[p]); + const trg: number = ATNDeserializer.toInt(data[p + 1]); + const ttype: number = ATNDeserializer.toInt(data[p + 2]); + const arg1: number = ATNDeserializer.toInt(data[p + 3]); + const arg2: number = ATNDeserializer.toInt(data[p + 4]); + const arg3: number = ATNDeserializer.toInt(data[p + 5]); + const trans: Transition = this.edgeFactory(atn, ttype, src, trg, arg1, arg2, arg3, sets); // console.log(`EDGE ${trans.constructor.name} ${src}->${trg} ${Transition.serializationNames[ttype]} ${arg1},${arg2},${arg3}`); - let srcState: ATNState = atn.states[src]; + const srcState: ATNState = atn.states[src]; srcState.addTransition(trans); p += 6; } // edges for rule stop states can be derived, so they aren't serialized - interface T { stopState: number; returnState: number; outermostPrecedenceReturn: number; } - let returnTransitionsSet = new Array2DHashSet({ - hashCode: (o: T) => o.stopState ^ o.returnState ^ o.outermostPrecedenceReturn, + interface T { stopState: number; returnState: number; outermostPrecedenceReturn: number } + const returnTransitionsSet = new Array2DHashSet({ + hashCode: (o: T): number => o.stopState ^ o.returnState ^ o.outermostPrecedenceReturn, equals: (a: T, b: T): boolean => { return a.stopState === b.stopState @@ -363,29 +364,29 @@ export class ATNDeserializer { && a.outermostPrecedenceReturn === b.outermostPrecedenceReturn; }, }); - let returnTransitions: T[] = []; - for (let state of atn.states) { - let returningToLeftFactored: boolean = state.ruleIndex >= 0 && atn.ruleToStartState[state.ruleIndex].leftFactored; + const returnTransitions: T[] = []; + for (const state of atn.states) { + const returningToLeftFactored: boolean = state.ruleIndex >= 0 && atn.ruleToStartState[state.ruleIndex].leftFactored; for (let i = 0; i < state.numberOfTransitions; i++) { - let t: Transition = state.transition(i); + const t: Transition = state.transition(i); if (!(t instanceof RuleTransition)) { continue; } - let ruleTransition: RuleTransition = t; - let returningFromLeftFactored: boolean = atn.ruleToStartState[ruleTransition.target.ruleIndex].leftFactored; + const ruleTransition: RuleTransition = t; + const returningFromLeftFactored: boolean = atn.ruleToStartState[ruleTransition.target.ruleIndex].leftFactored; if (!returningFromLeftFactored && returningToLeftFactored) { continue; } - let outermostPrecedenceReturn: number = -1; + let outermostPrecedenceReturn = -1; if (atn.ruleToStartState[ruleTransition.target.ruleIndex].isPrecedenceRule) { if (ruleTransition.precedence === 0) { outermostPrecedenceReturn = ruleTransition.target.ruleIndex; } } - let current = { stopState: ruleTransition.target.ruleIndex, returnState: ruleTransition.followState.stateNumber, outermostPrecedenceReturn }; + const current = { stopState: ruleTransition.target.ruleIndex, returnState: ruleTransition.followState.stateNumber, outermostPrecedenceReturn }; if (returnTransitionsSet.add(current)) { returnTransitions.push(current); } @@ -393,12 +394,12 @@ export class ATNDeserializer { } // Add all elements from returnTransitions to the ATN - for (let returnTransition of returnTransitions) { - let transition = new EpsilonTransition(atn.states[returnTransition.returnState], returnTransition.outermostPrecedenceReturn); + for (const returnTransition of returnTransitions) { + const transition = new EpsilonTransition(atn.states[returnTransition.returnState], returnTransition.outermostPrecedenceReturn); atn.ruleToStopState[returnTransition.stopState].addTransition(transition); } - for (let state of atn.states) { + for (const state of atn.states) { if (state instanceof BlockStartState) { // we need to know the end state to set its start state if (state.endState == null) { @@ -414,18 +415,18 @@ export class ATNDeserializer { } if (state instanceof PlusLoopbackState) { - let loopbackState: PlusLoopbackState = state; + const loopbackState: PlusLoopbackState = state; for (let i = 0; i < loopbackState.numberOfTransitions; i++) { - let target: ATNState = loopbackState.transition(i).target; + const target: ATNState = loopbackState.transition(i).target; if (target instanceof PlusBlockStartState) { target.loopBackState = loopbackState; } } } else if (state instanceof StarLoopbackState) { - let loopbackState: StarLoopbackState = state; + const loopbackState: StarLoopbackState = state; for (let i = 0; i < loopbackState.numberOfTransitions; i++) { - let target: ATNState = loopbackState.transition(i).target; + const target: ATNState = loopbackState.transition(i).target; if (target instanceof StarLoopEntryState) { target.loopBackState = loopbackState; } @@ -436,10 +437,10 @@ export class ATNDeserializer { // // DECISIONS // - let ndecisions: number = ATNDeserializer.toInt(data[p++]); + const ndecisions: number = ATNDeserializer.toInt(data[p++]); for (let i = 1; i <= ndecisions; i++) { - let s: number = ATNDeserializer.toInt(data[p++]); - let decState: DecisionState = atn.states[s] as DecisionState; + const s: number = ATNDeserializer.toInt(data[p++]); + const decState: DecisionState = atn.states[s] as DecisionState; atn.decisionToState.push(decState); decState.decision = i - 1; } @@ -451,7 +452,7 @@ export class ATNDeserializer { if (supportsLexerActions) { atn.lexerActions = new Array(ATNDeserializer.toInt(data[p++])); for (let i = 0; i < atn.lexerActions.length; i++) { - let actionType: LexerActionType = ATNDeserializer.toInt(data[p++]); + const actionType: LexerActionType = ATNDeserializer.toInt(data[p++]); let data1: number = ATNDeserializer.toInt(data[p++]); if (data1 === 0xFFFF) { data1 = -1; @@ -462,7 +463,7 @@ export class ATNDeserializer { data2 = -1; } - let lexerAction: LexerAction = this.lexerActionFactory(actionType, data1, data2); + const lexerAction: LexerAction = this.lexerActionFactory(actionType, data1, data2); atn.lexerActions[i] = lexerAction; } @@ -471,17 +472,17 @@ export class ATNDeserializer { // for compatibility with older serialized ATNs, convert the old // serialized action index for action transitions to the new // form, which is the index of a LexerCustomAction - let legacyLexerActions: LexerAction[] = []; - for (let state of atn.states) { + const legacyLexerActions: LexerAction[] = []; + for (const state of atn.states) { for (let i = 0; i < state.numberOfTransitions; i++) { - let transition: Transition = state.transition(i); + const transition: Transition = state.transition(i); if (!(transition instanceof ActionTransition)) { continue; } - let ruleIndex: number = transition.ruleIndex; - let actionIndex: number = transition.actionIndex; - let lexerAction: LexerCustomAction = new LexerCustomAction(ruleIndex, actionIndex); + const ruleIndex: number = transition.ruleIndex; + const actionIndex: number = transition.actionIndex; + const lexerAction: LexerCustomAction = new LexerCustomAction(ruleIndex, actionIndex); state.setTransition(i, new ActionTransition(transition.target, ruleIndex, legacyLexerActions.length, false)); legacyLexerActions.push(lexerAction); } @@ -509,11 +510,11 @@ export class ATNDeserializer { } for (let i = 0; i < atn.ruleToStartState.length; i++) { - let bypassStart: BasicBlockStartState = new BasicBlockStartState(); + const bypassStart: BasicBlockStartState = new BasicBlockStartState(); bypassStart.ruleIndex = i; atn.addState(bypassStart); - let bypassStop: BlockEndState = new BlockEndState(); + const bypassStop: BlockEndState = new BlockEndState(); bypassStop.ruleIndex = i; atn.addState(bypassStop); @@ -527,7 +528,7 @@ export class ATNDeserializer { if (atn.ruleToStartState[i].isPrecedenceRule) { // wrap from the beginning of the rule to the StarLoopEntryState endState = undefined; - for (let state of atn.states) { + for (const state of atn.states) { if (state.ruleIndex !== i) { continue; } @@ -536,7 +537,7 @@ export class ATNDeserializer { continue; } - let maybeLoopEndState: ATNState = state.transition(state.numberOfTransitions - 1).target; + const maybeLoopEndState: ATNState = state.transition(state.numberOfTransitions - 1).target; if (!(maybeLoopEndState instanceof LoopEndState)) { continue; } @@ -558,9 +559,9 @@ export class ATNDeserializer { } // all non-excluded transitions that currently target end state need to target blockEnd instead - for (let state of atn.states) { + for (const state of atn.states) { for (let i = 0; i < state.numberOfTransitions; i++) { - let transition = state.transition(i); + const transition = state.transition(i); if (transition === excludeTransition) { continue; } @@ -573,7 +574,7 @@ export class ATNDeserializer { // all transitions leaving the rule start state need to leave blockStart instead while (atn.ruleToStartState[i].numberOfTransitions > 0) { - let transition: Transition = atn.ruleToStartState[i].removeTransition(atn.ruleToStartState[i].numberOfTransitions - 1); + const transition: Transition = atn.ruleToStartState[i].removeTransition(atn.ruleToStartState[i].numberOfTransitions - 1); bypassStart.addTransition(transition); } @@ -581,7 +582,7 @@ export class ATNDeserializer { atn.ruleToStartState[i].addTransition(new EpsilonTransition(bypassStart)); bypassStop.addTransition(new EpsilonTransition(endState)); - let matchState: ATNState = new BasicState(); + const matchState: ATNState = new BasicState(); atn.addState(matchState); matchState.addTransition(new AtomTransition(bypassStop, atn.ruleToTokenType[i])); bypassStart.addTransition(new EpsilonTransition(matchState)); @@ -595,10 +596,10 @@ export class ATNDeserializer { if (this.deserializationOptions.isOptimize) { while (true) { - let optimizationCount: number = 0; + let optimizationCount = 0; optimizationCount += ATNDeserializer.inlineSetRules(atn); optimizationCount += ATNDeserializer.combineChainedEpsilons(atn); - let preserveOrder: boolean = atn.grammarType === ATNType.LEXER; + const preserveOrder: boolean = atn.grammarType === ATNType.LEXER; optimizationCount += ATNDeserializer.optimizeSets(atn, preserveOrder); if (optimizationCount === 0) { break; @@ -617,22 +618,22 @@ export class ATNDeserializer { } private deserializeSets(data: Uint16Array, p: number, sets: IntervalSet[], unicodeDeserializer: UnicodeDeserializer): number { - let nsets: number = ATNDeserializer.toInt(data[p++]); + const nsets: number = ATNDeserializer.toInt(data[p++]); for (let i = 0; i < nsets; i++) { - let nintervals: number = ATNDeserializer.toInt(data[p]); + const nintervals: number = ATNDeserializer.toInt(data[p]); p++; - let set: IntervalSet = new IntervalSet(); + const set: IntervalSet = new IntervalSet(); sets.push(set); - let containsEof: boolean = ATNDeserializer.toInt(data[p++]) !== 0; + const containsEof: boolean = ATNDeserializer.toInt(data[p++]) !== 0; if (containsEof) { set.add(-1); } - for (let j: number = 0; j < nintervals; j++) { - let a: number = unicodeDeserializer.readUnicode(data, p); + for (let j = 0; j < nintervals; j++) { + const a: number = unicodeDeserializer.readUnicode(data, p); p += unicodeDeserializer.size; - let b: number = unicodeDeserializer.readUnicode(data, p); + const b: number = unicodeDeserializer.readUnicode(data, p); p += unicodeDeserializer.size; set.add(a, b); } @@ -648,11 +649,11 @@ export class ATNDeserializer { * * @param atn The ATN. */ - protected markPrecedenceDecisions(@NotNull atn: ATN): void { + protected markPrecedenceDecisions(atn: ATN): void { // Map rule index -> precedence decision for that rule - let rulePrecedenceDecisions = new Map(); + const rulePrecedenceDecisions = new Map(); - for (let state of atn.states) { + for (const state of atn.states) { if (!(state instanceof StarLoopEntryState)) { continue; } @@ -662,7 +663,7 @@ export class ATNDeserializer { * precedence rule should continue or complete. */ if (atn.ruleToStartState[state.ruleIndex].isPrecedenceRule) { - let maybeLoopEndState: ATNState = state.transition(state.numberOfTransitions - 1).target; + const maybeLoopEndState: ATNState = state.transition(state.numberOfTransitions - 1).target; if (maybeLoopEndState instanceof LoopEndState) { if (maybeLoopEndState.epsilonOnlyTransitions && maybeLoopEndState.transition(0).target instanceof RuleStopState) { rulePrecedenceDecisions.set(state.ruleIndex, state); @@ -675,13 +676,13 @@ export class ATNDeserializer { // After marking precedence decisions, we go back through and fill in // StarLoopEntryState.precedenceLoopbackStates. - for (let precedenceDecision of rulePrecedenceDecisions) { - for (let transition of atn.ruleToStopState[precedenceDecision[0]].getTransitions()) { + for (const precedenceDecision of rulePrecedenceDecisions) { + for (const transition of atn.ruleToStopState[precedenceDecision[0]].getTransitions()) { if (transition.serializationType !== TransitionType.EPSILON) { continue; } - let epsilonTransition = transition as EpsilonTransition; + const epsilonTransition = transition as EpsilonTransition; if (epsilonTransition.outermostPrecedenceReturn !== -1) { continue; } @@ -693,7 +694,7 @@ export class ATNDeserializer { protected verifyATN(atn: ATN): void { // verify assumptions - for (let state of atn.states) { + for (const state of atn.states) { this.checkCondition(state != null, "ATN states should not be null."); if (state.stateType === ATNStateType.INVALID_TYPE) { continue; @@ -706,7 +707,7 @@ export class ATNDeserializer { } if (state instanceof StarLoopEntryState) { - let starLoopEntryState: StarLoopEntryState = state; + const starLoopEntryState: StarLoopEntryState = state; this.checkCondition(starLoopEntryState.loopBackState != null); this.checkCondition(starLoopEntryState.numberOfTransitions === 2); @@ -745,7 +746,7 @@ export class ATNDeserializer { } if (state instanceof DecisionState) { - let decisionState: DecisionState = state; + const decisionState: DecisionState = state; this.checkCondition(decisionState.numberOfTransitions <= 1 || decisionState.decision >= 0); } else { @@ -761,11 +762,11 @@ export class ATNDeserializer { } private static inlineSetRules(atn: ATN): number { - let inlinedCalls: number = 0; + let inlinedCalls = 0; - let ruleToInlineTransition: Transition[] = new Array(atn.ruleToStartState.length); + const ruleToInlineTransition: Transition[] = new Array(atn.ruleToStartState.length); for (let i = 0; i < atn.ruleToStartState.length; i++) { - let startState: RuleStartState = atn.ruleToStartState[i]; + const startState: RuleStartState = atn.ruleToStartState[i]; let middleState: ATNState = startState; while (middleState.onlyHasEpsilonTransitions && middleState.numberOfOptimizedTransitions === 1 @@ -777,8 +778,8 @@ export class ATNDeserializer { continue; } - let matchTransition: Transition = middleState.getOptimizedTransition(0); - let matchTarget: ATNState = matchTransition.target; + const matchTransition: Transition = middleState.getOptimizedTransition(0); + const matchTarget: ATNState = matchTransition.target; if (matchTransition.isEpsilon || !matchTarget.onlyHasEpsilonTransitions || matchTarget.numberOfOptimizedTransitions !== 1 @@ -787,30 +788,30 @@ export class ATNDeserializer { } switch (matchTransition.serializationType) { - case TransitionType.ATOM: - case TransitionType.RANGE: - case TransitionType.SET: - ruleToInlineTransition[i] = matchTransition; - break; + case TransitionType.ATOM: + case TransitionType.RANGE: + case TransitionType.SET: + ruleToInlineTransition[i] = matchTransition; + break; - case TransitionType.NOT_SET: - case TransitionType.WILDCARD: - // not implemented yet - continue; + case TransitionType.NOT_SET: + case TransitionType.WILDCARD: + // not implemented yet + continue; - default: - continue; + default: + continue; } } - for (let state of atn.states) { + for (const state of atn.states) { if (state.ruleIndex < 0) { continue; } let optimizedTransitions: Transition[] | undefined; for (let i = 0; i < state.numberOfOptimizedTransitions; i++) { - let transition: Transition = state.getOptimizedTransition(i); + const transition: Transition = state.getOptimizedTransition(i); if (!(transition instanceof RuleTransition)) { if (optimizedTransitions != null) { optimizedTransitions.push(transition); @@ -819,8 +820,8 @@ export class ATNDeserializer { continue; } - let ruleTransition: RuleTransition = transition; - let effective: Transition = ruleToInlineTransition[ruleTransition.target.ruleIndex]; + const ruleTransition: RuleTransition = transition; + const effective: Transition = ruleToInlineTransition[ruleTransition.target.ruleIndex]; if (effective == null) { if (optimizedTransitions != null) { optimizedTransitions.push(transition); @@ -837,27 +838,27 @@ export class ATNDeserializer { } inlinedCalls++; - let target: ATNState = ruleTransition.followState; - let intermediateState: ATNState = new BasicState(); + const target: ATNState = ruleTransition.followState; + const intermediateState: ATNState = new BasicState(); intermediateState.setRuleIndex(target.ruleIndex); atn.addState(intermediateState); optimizedTransitions.push(new EpsilonTransition(intermediateState)); switch (effective.serializationType) { - case TransitionType.ATOM: - intermediateState.addTransition(new AtomTransition(target, (effective as AtomTransition)._label)); - break; + case TransitionType.ATOM: + intermediateState.addTransition(new AtomTransition(target, (effective as AtomTransition)._label)); + break; - case TransitionType.RANGE: - intermediateState.addTransition(new RangeTransition(target, (effective as RangeTransition).from, (effective as RangeTransition).to)); - break; + case TransitionType.RANGE: + intermediateState.addTransition(new RangeTransition(target, (effective as RangeTransition).from, (effective as RangeTransition).to)); + break; - case TransitionType.SET: - intermediateState.addTransition(new SetTransition(target, (effective as SetTransition).label)); - break; + case TransitionType.SET: + intermediateState.addTransition(new SetTransition(target, (effective as SetTransition).label)); + break; - default: - throw new Error("UnsupportedOperationException"); + default: + throw new Error("UnsupportedOperationException"); } } @@ -868,7 +869,7 @@ export class ATNDeserializer { } } - for (let transition of optimizedTransitions) { + for (const transition of optimizedTransitions) { state.addOptimizedTransition(transition); } } @@ -882,9 +883,9 @@ export class ATNDeserializer { } private static combineChainedEpsilons(atn: ATN): number { - let removedEdges: number = 0; + let removedEdges = 0; - for (let state of atn.states) { + for (const state of atn.states) { if (!state.onlyHasEpsilonTransitions || state instanceof RuleStopState) { continue; } @@ -892,8 +893,8 @@ export class ATNDeserializer { let optimizedTransitions: Transition[] | undefined; nextTransition: for (let i = 0; i < state.numberOfOptimizedTransitions; i++) { - let transition: Transition = state.getOptimizedTransition(i); - let intermediate: ATNState = transition.target; + const transition: Transition = state.getOptimizedTransition(i); + const intermediate: ATNState = transition.target; if (transition.serializationType !== TransitionType.EPSILON || (transition as EpsilonTransition).outermostPrecedenceReturn !== -1 || intermediate.stateType !== ATNStateType.BASIC @@ -925,7 +926,7 @@ export class ATNDeserializer { } for (let j = 0; j < intermediate.numberOfOptimizedTransitions; j++) { - let target: ATNState = intermediate.getOptimizedTransition(j).target; + const target: ATNState = intermediate.getOptimizedTransition(j).target; optimizedTransitions.push(new EpsilonTransition(target)); } } @@ -937,7 +938,7 @@ export class ATNDeserializer { } } - for (let transition of optimizedTransitions) { + for (const transition of optimizedTransitions) { state.addOptimizedTransition(transition); } } @@ -956,12 +957,12 @@ export class ATNDeserializer { return 0; } - let removedPaths: number = 0; - let decisions: DecisionState[] = atn.decisionToState; - for (let decision of decisions) { - let setTransitions: IntervalSet = new IntervalSet(); + let removedPaths = 0; + const decisions: DecisionState[] = atn.decisionToState; + for (const decision of decisions) { + const setTransitions: IntervalSet = new IntervalSet(); for (let i = 0; i < decision.numberOfOptimizedTransitions; i++) { - let epsTransition: Transition = decision.getOptimizedTransition(i); + const epsTransition: Transition = decision.getOptimizedTransition(i); if (!(epsTransition instanceof EpsilonTransition)) { continue; } @@ -970,7 +971,7 @@ export class ATNDeserializer { continue; } - let transition: Transition = epsTransition.target.getOptimizedTransition(0); + const transition: Transition = epsTransition.target.getOptimizedTransition(0); if (!(transition.target instanceof BlockEndState)) { continue; } @@ -991,18 +992,18 @@ export class ATNDeserializer { continue; } - let optimizedTransitions: Transition[] = []; + const optimizedTransitions: Transition[] = []; for (let i = 0; i < decision.numberOfOptimizedTransitions; i++) { if (!setTransitions.contains(i)) { optimizedTransitions.push(decision.getOptimizedTransition(i)); } } - let blockEndState: ATNState = decision.getOptimizedTransition(setTransitions.minElement).target.getOptimizedTransition(0).target; - let matchSet: IntervalSet = new IntervalSet(); - for (let interval of setTransitions.intervals) { + const blockEndState: ATNState = decision.getOptimizedTransition(setTransitions.minElement).target.getOptimizedTransition(0).target; + const matchSet: IntervalSet = new IntervalSet(); + for (const interval of setTransitions.intervals) { for (let j = interval.a; j <= interval.b; j++) { - let matchTransition: Transition = decision.getOptimizedTransition(j).target.getOptimizedTransition(0); + const matchTransition: Transition = decision.getOptimizedTransition(j).target.getOptimizedTransition(0); if (matchTransition instanceof NotSetTransition) { throw new Error("Not yet implemented."); } else { @@ -1016,14 +1017,14 @@ export class ATNDeserializer { if (matchSet.size === 1) { newTransition = new AtomTransition(blockEndState, matchSet.minElement); } else { - let matchInterval: Interval = matchSet.intervals[0]; + const matchInterval: Interval = matchSet.intervals[0]; newTransition = new RangeTransition(blockEndState, matchInterval.a, matchInterval.b); } } else { newTransition = new SetTransition(blockEndState, matchSet); } - let setOptimizedState: ATNState = new BasicState(); + const setOptimizedState: ATNState = new BasicState(); setOptimizedState.setRuleIndex(decision.ruleIndex); atn.addState(setOptimizedState); @@ -1038,7 +1039,7 @@ export class ATNDeserializer { } } - for (let transition of optimizedTransitions) { + for (const transition of optimizedTransitions) { decision.addOptimizedTransition(transition); } } @@ -1051,9 +1052,9 @@ export class ATNDeserializer { } private static identifyTailCalls(atn: ATN): void { - for (let state of atn.states) { + for (const state of atn.states) { for (let i = 0; i < state.numberOfTransitions; i++) { - let transition = state.transition(i); + const transition = state.transition(i); if (!(transition instanceof RuleTransition)) { continue; } @@ -1067,7 +1068,7 @@ export class ATNDeserializer { } for (let i = 0; i < state.numberOfOptimizedTransitions; i++) { - let transition = state.getOptimizedTransition(i); + const transition = state.getOptimizedTransition(i); if (!(transition instanceof RuleTransition)) { continue; } @@ -1086,11 +1087,11 @@ export class ATNDeserializer { return true; } - let reachable: BitSet = new BitSet(atn.states.length); - let worklist: ATNState[] = []; + const reachable: BitSet = new BitSet(atn.states.length); + const worklist: ATNState[] = []; worklist.push(transition.followState); while (true) { - let state = worklist.pop(); + const state = worklist.pop(); if (!state) { break; } @@ -1107,9 +1108,9 @@ export class ATNDeserializer { return false; } - let transitionCount = optimizedPath ? state.numberOfOptimizedTransitions : state.numberOfTransitions; + const transitionCount = optimizedPath ? state.numberOfOptimizedTransitions : state.numberOfTransitions; for (let i = 0; i < transitionCount; i++) { - let t = optimizedPath ? state.getOptimizedTransition(i) : state.transition(i); + const t = optimizedPath ? state.getOptimizedTransition(i) : state.transition(i); if (t.serializationType !== TransitionType.EPSILON) { return false; } @@ -1130,20 +1131,20 @@ export class ATNDeserializer { } protected static toUUID(data: Uint16Array, offset: number): UUID { - let leastSigBits: number = ATNDeserializer.toInt32(data, offset); - let lessSigBits: number = ATNDeserializer.toInt32(data, offset + 2); - let moreSigBits: number = ATNDeserializer.toInt32(data, offset + 4); - let mostSigBits: number = ATNDeserializer.toInt32(data, offset + 6); + const leastSigBits: number = ATNDeserializer.toInt32(data, offset); + const lessSigBits: number = ATNDeserializer.toInt32(data, offset + 2); + const moreSigBits: number = ATNDeserializer.toInt32(data, offset + 4); + const mostSigBits: number = ATNDeserializer.toInt32(data, offset + 6); return new UUID(mostSigBits, moreSigBits, lessSigBits, leastSigBits); } - @NotNull + protected edgeFactory( - @NotNull atn: ATN, + atn: ATN, type: TransitionType, src: number, trg: number, arg1: number, arg2: number, arg3: number, sets: IntervalSet[]): Transition { - let target: ATNState = atn.states[trg]; + const target: ATNState = atn.states[trg]; switch (type) { case TransitionType.EPSILON: return new EpsilonTransition(target); case TransitionType.RANGE: @@ -1153,12 +1154,14 @@ export class ATNDeserializer { else { return new RangeTransition(target, arg1, arg2); } - case TransitionType.RULE: - let rt: RuleTransition = new RuleTransition(atn.states[arg1] as RuleStartState, arg2, arg3, target); + case TransitionType.RULE: { + const rt: RuleTransition = new RuleTransition(atn.states[arg1] as RuleStartState, arg2, arg3, target); return rt; - case TransitionType.PREDICATE: - let pt: PredicateTransition = new PredicateTransition(target, arg1, arg2, arg3 !== 0); + } + case TransitionType.PREDICATE: { + const pt: PredicateTransition = new PredicateTransition(target, arg1, arg2, arg3 !== 0); return pt; + } case TransitionType.PRECEDENCE: return new PrecedencePredicateTransition(target, arg1); case TransitionType.ATOM: @@ -1168,9 +1171,10 @@ export class ATNDeserializer { else { return new AtomTransition(target, arg1); } - case TransitionType.ACTION: - let a: ActionTransition = new ActionTransition(target, arg1, arg2, arg3 !== 0); + case TransitionType.ACTION: { + const a: ActionTransition = new ActionTransition(target, arg1, arg2, arg3 !== 0); return a; + } case TransitionType.SET: return new SetTransition(target, sets[arg1]); case TransitionType.NOT_SET: return new NotSetTransition(target, sets[arg1]); case TransitionType.WILDCARD: return new WildcardTransition(target); @@ -1195,9 +1199,10 @@ export class ATNDeserializer { case ATNStateType.STAR_LOOP_ENTRY: s = new StarLoopEntryState(); break; case ATNStateType.PLUS_LOOP_BACK: s = new PlusLoopbackState(); break; case ATNStateType.LOOP_END: s = new LoopEndState(); break; - default: - let message: string = `The specified state type ${type} is not valid.`; + default: { + const message = `The specified state type ${type} is not valid.`; throw new Error(message); + } } s.ruleIndex = ruleIndex; @@ -1206,33 +1211,34 @@ export class ATNDeserializer { protected lexerActionFactory(type: LexerActionType, data1: number, data2: number): LexerAction { switch (type) { - case LexerActionType.CHANNEL: - return new LexerChannelAction(data1); + case LexerActionType.CHANNEL: + return new LexerChannelAction(data1); - case LexerActionType.CUSTOM: - return new LexerCustomAction(data1, data2); + case LexerActionType.CUSTOM: + return new LexerCustomAction(data1, data2); - case LexerActionType.MODE: - return new LexerModeAction(data1); + case LexerActionType.MODE: + return new LexerModeAction(data1); - case LexerActionType.MORE: - return LexerMoreAction.INSTANCE; + case LexerActionType.MORE: + return LexerMoreAction.INSTANCE; - case LexerActionType.POP_MODE: - return LexerPopModeAction.INSTANCE; + case LexerActionType.POP_MODE: + return LexerPopModeAction.INSTANCE; - case LexerActionType.PUSH_MODE: - return new LexerPushModeAction(data1); + case LexerActionType.PUSH_MODE: + return new LexerPushModeAction(data1); - case LexerActionType.SKIP: - return LexerSkipAction.INSTANCE; + case LexerActionType.SKIP: + return LexerSkipAction.INSTANCE; - case LexerActionType.TYPE: - return new LexerTypeAction(data1); + case LexerActionType.TYPE: + return new LexerTypeAction(data1); - default: - let message: string = `The specified lexer action type ${type} is not valid.`; - throw new Error(message); + default: { + const message = `The specified lexer action type ${type} is not valid.`; + throw new Error(message); + } } } } diff --git a/src/atn/ATNSerializer.tssoon b/runtime/typescript/src/atn/ATNSerializer.tssoon similarity index 100% rename from src/atn/ATNSerializer.tssoon rename to runtime/typescript/src/atn/ATNSerializer.tssoon diff --git a/src/atn/ATNSimulator.ts b/runtime/typescript/src/atn/ATNSimulator.ts similarity index 72% rename from src/atn/ATNSimulator.ts rename to runtime/typescript/src/atn/ATNSimulator.ts index 21a48f27..bb5b6f7d 100644 --- a/src/atn/ATNSimulator.ts +++ b/runtime/typescript/src/atn/ATNSimulator.ts @@ -5,16 +5,17 @@ // ConvertTo-TS run at 2016-10-04T11:26:27.3184311-07:00 -import { ATN } from "./ATN"; -import { ATNConfigSet } from "./ATNConfigSet"; -import { DFAState } from "../dfa/DFAState"; -import { NotNull } from "../Decorators"; -import { PredictionContext } from "./PredictionContext"; +import { + ATN, + ATNConfigSet, + DFAState, + PredictionContext +} from "../internal"; export abstract class ATNSimulator { /** Must distinguish between missing edge and edge we know leads nowhere */ private static _ERROR: DFAState; - @NotNull + static get ERROR(): DFAState { if (!ATNSimulator._ERROR) { ATNSimulator._ERROR = new DFAState(new ATNConfigSet()); @@ -24,10 +25,10 @@ export abstract class ATNSimulator { return ATNSimulator._ERROR; } - @NotNull + public atn: ATN; - constructor(@NotNull atn: ATN) { + constructor(atn: ATN) { this.atn = atn; } @@ -50,7 +51,7 @@ export abstract class ATNSimulator { } export namespace ATNSimulator { - const RULE_VARIANT_DELIMITER: string = "$"; - const RULE_LF_VARIANT_MARKER: string = "$lf$"; - const RULE_NOLF_VARIANT_MARKER: string = "$nolf$"; + const RULE_VARIANT_DELIMITER = "$"; + const RULE_LF_VARIANT_MARKER = "$lf$"; + const RULE_NOLF_VARIANT_MARKER = "$nolf$"; } diff --git a/src/atn/ATNState.ts b/runtime/typescript/src/atn/ATNState.ts similarity index 91% rename from src/atn/ATNState.ts rename to runtime/typescript/src/atn/ATNState.ts index f0aa9380..5fe7285f 100644 --- a/src/atn/ATNState.ts +++ b/runtime/typescript/src/atn/ATNState.ts @@ -5,13 +5,14 @@ // ConvertTo-TS run at 2016-10-04T11:26:27.4734328-07:00 -import { ATN } from "./ATN"; -import { ATNStateType } from "./ATNStateType"; -import { IntervalSet } from "../misc/IntervalSet"; -import { Override } from "../Decorators"; -import { Transition } from "./Transition"; +import { + ATN, + ATNStateType, + IntervalSet, + Transition +} from "../internal"; -const INITIAL_NUM_TRANSITIONS: number = 4; +const INITIAL_NUM_TRANSITIONS = 4; /** * The following images show the relation of states and @@ -76,9 +77,9 @@ export abstract class ATNState { public stateNumber: number = ATNState.INVALID_STATE_NUMBER; - public ruleIndex: number = 0; // at runtime, we don't have Rule objects + public ruleIndex = 0; // at runtime, we don't have Rule objects - public epsilonOnlyTransitions: boolean = false; + public epsilonOnlyTransitions = false; /** Track the transitions emanating from this ATN state. */ protected transitions: Transition[] = []; @@ -107,12 +108,12 @@ export abstract class ATNState { return this.getStateNumber(); } - @Override + // @Override public hashCode(): number { return this.stateNumber; } - @Override + // @Override public equals(o: any): boolean { // are these states same object? if (o instanceof ATNState) { @@ -126,7 +127,7 @@ export abstract class ATNState { return false; } - @Override + // @Override public toString(): string { return String(this.stateNumber); } @@ -211,5 +212,5 @@ export abstract class ATNState { } export namespace ATNState { - export const INVALID_STATE_NUMBER: number = -1; + export const INVALID_STATE_NUMBER = -1; } diff --git a/src/atn/ATNStateType.ts b/runtime/typescript/src/atn/ATNStateType.ts similarity index 100% rename from src/atn/ATNStateType.ts rename to runtime/typescript/src/atn/ATNStateType.ts diff --git a/src/atn/ATNType.ts b/runtime/typescript/src/atn/ATNType.ts similarity index 100% rename from src/atn/ATNType.ts rename to runtime/typescript/src/atn/ATNType.ts diff --git a/src/atn/AbstractPredicateTransition.ts b/runtime/typescript/src/atn/AbstractPredicateTransition.ts similarity index 82% rename from src/atn/AbstractPredicateTransition.ts rename to runtime/typescript/src/atn/AbstractPredicateTransition.ts index a757e7d8..39aefdb8 100644 --- a/src/atn/AbstractPredicateTransition.ts +++ b/runtime/typescript/src/atn/AbstractPredicateTransition.ts @@ -5,8 +5,10 @@ // ConvertTo-TS run at 2016-10-04T11:26:24.6596177-07:00 -import { ATNState } from "./ATNState"; -import { Transition } from "./Transition"; +import { + ATNState, + Transition +} from "../internal"; /** * diff --git a/src/atn/ActionTransition.ts b/runtime/typescript/src/atn/ActionTransition.ts similarity index 72% rename from src/atn/ActionTransition.ts rename to runtime/typescript/src/atn/ActionTransition.ts index edef967e..406ef790 100644 --- a/src/atn/ActionTransition.ts +++ b/runtime/typescript/src/atn/ActionTransition.ts @@ -5,39 +5,41 @@ // ConvertTo-TS run at 2016-10-04T11:26:24.7363448-07:00 -import { ATNState } from "./ATNState"; -import { Override, NotNull } from "../Decorators"; -import { Transition } from "./Transition"; -import { TransitionType } from "./TransitionType"; +import { + ATNState, + Transition +} from "../internal"; + +import { TransitionType } from "../internal"; export class ActionTransition extends Transition { public ruleIndex: number; public actionIndex: number; public isCtxDependent: boolean; // e.g., $i ref in action - constructor(@NotNull target: ATNState, ruleIndex: number, actionIndex: number = -1, isCtxDependent: boolean = false) { + constructor(target: ATNState, ruleIndex: number, actionIndex = -1, isCtxDependent = false) { super(target); this.ruleIndex = ruleIndex; this.actionIndex = actionIndex; this.isCtxDependent = isCtxDependent; } - @Override + // @Override get serializationType(): TransitionType { return TransitionType.ACTION; } - @Override + // @Override get isEpsilon(): boolean { return true; // we are to be ignored by analysis 'cept for predicates } - @Override + // @Override public matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean { return false; } - @Override + // @Override public toString(): string { return "action_" + this.ruleIndex + ":" + this.actionIndex; } diff --git a/src/atn/AmbiguityInfo.ts b/runtime/typescript/src/atn/AmbiguityInfo.ts similarity index 88% rename from src/atn/AmbiguityInfo.ts rename to runtime/typescript/src/atn/AmbiguityInfo.ts index a8c5dacd..860dfda4 100644 --- a/src/atn/AmbiguityInfo.ts +++ b/runtime/typescript/src/atn/AmbiguityInfo.ts @@ -5,11 +5,12 @@ // ConvertTo-TS run at 2016-10-04T11:26:24.8229279-07:00 -import { BitSet } from "../misc/BitSet"; -import { DecisionEventInfo } from "./DecisionEventInfo"; -import { NotNull } from "../Decorators"; -import { SimulatorState } from "./SimulatorState"; -import { TokenStream } from "../TokenStream"; +import { + BitSet, + DecisionEventInfo, + SimulatorState, + TokenStream +} from "../internal"; /** * This class represents profiling event information for an ambiguity. @@ -40,7 +41,7 @@ import { TokenStream } from "../TokenStream"; */ export class AmbiguityInfo extends DecisionEventInfo { /** The set of alternative numbers for this decision event that lead to a valid parse. */ - @NotNull + private ambigAlts: BitSet; /** @@ -59,9 +60,9 @@ export class AmbiguityInfo extends DecisionEventInfo { */ constructor( decision: number, - @NotNull state: SimulatorState, - @NotNull ambigAlts: BitSet, - @NotNull input: TokenStream, + state: SimulatorState, + ambigAlts: BitSet, + input: TokenStream, startIndex: number, stopIndex: number) { super(decision, state, input, startIndex, stopIndex, state.useContext); @@ -73,7 +74,7 @@ export class AmbiguityInfo extends DecisionEventInfo { * * @since 4.5 */ - @NotNull + get ambiguousAlternatives(): BitSet { return this.ambigAlts; } diff --git a/src/atn/AtomTransition.ts b/runtime/typescript/src/atn/AtomTransition.ts similarity index 69% rename from src/atn/AtomTransition.ts rename to runtime/typescript/src/atn/AtomTransition.ts index 6193c411..155b1b31 100644 --- a/src/atn/AtomTransition.ts +++ b/runtime/typescript/src/atn/AtomTransition.ts @@ -5,40 +5,41 @@ // ConvertTo-TS run at 2016-10-04T11:26:27.6769122-07:00 -import { ATNState } from "./ATNState"; -import { IntervalSet } from "../misc/IntervalSet"; -import { Override, NotNull } from "../Decorators"; -import { Transition } from "./Transition"; -import { TransitionType } from "./TransitionType"; +import { + ATNState, + IntervalSet, + Transition, + TransitionType +} from "../internal"; /** TODO: make all transitions sets? no, should remove set edges */ export class AtomTransition extends Transition { /** The token type or character value; or, signifies special label. */ public _label: number; - constructor(@NotNull target: ATNState, label: number) { + constructor(target: ATNState, label: number) { super(target); this._label = label; } - @Override + // @Override get serializationType(): TransitionType { return TransitionType.ATOM; } - @Override - @NotNull + // @Override + get label(): IntervalSet { return IntervalSet.of(this._label); } - @Override + // @Override public matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean { return this._label === symbol; } - @Override - @NotNull + // @Override + public toString(): string { return String(this.label); } diff --git a/src/atn/BasicBlockStartState.ts b/runtime/typescript/src/atn/BasicBlockStartState.ts similarity index 72% rename from src/atn/BasicBlockStartState.ts rename to runtime/typescript/src/atn/BasicBlockStartState.ts index eb1f823b..f7a508c3 100644 --- a/src/atn/BasicBlockStartState.ts +++ b/runtime/typescript/src/atn/BasicBlockStartState.ts @@ -5,9 +5,10 @@ // ConvertTo-TS run at 2016-10-04T11:26:27.7669801-07:00 -import { ATNStateType } from "./ATNStateType"; -import { BlockStartState } from "./BlockStartState"; -import { Override } from "../Decorators"; +import { + ATNStateType, + BlockStartState +} from "../internal"; /** * @@ -15,7 +16,7 @@ import { Override } from "../Decorators"; */ export class BasicBlockStartState extends BlockStartState { - @Override + // @Override get stateType(): ATNStateType { return ATNStateType.BLOCK_START; } diff --git a/src/atn/BasicState.ts b/runtime/typescript/src/atn/BasicState.ts similarity index 73% rename from src/atn/BasicState.ts rename to runtime/typescript/src/atn/BasicState.ts index b0d8cdde..348ef46a 100644 --- a/src/atn/BasicState.ts +++ b/runtime/typescript/src/atn/BasicState.ts @@ -5,9 +5,10 @@ // ConvertTo-TS run at 2016-10-04T11:26:27.8389930-07:00 -import { ATNState } from "./ATNState"; -import { ATNStateType } from "./ATNStateType"; -import { Override } from "../Decorators"; +import { + ATNState, + ATNStateType +} from "../internal"; /** * @@ -15,7 +16,7 @@ import { Override } from "../Decorators"; */ export class BasicState extends ATNState { - @Override + // @Override get stateType(): ATNStateType { return ATNStateType.BASIC; } diff --git a/src/atn/BlockEndState.ts b/runtime/typescript/src/atn/BlockEndState.ts similarity index 69% rename from src/atn/BlockEndState.ts rename to runtime/typescript/src/atn/BlockEndState.ts index 555e4c47..d20eb9e4 100644 --- a/src/atn/BlockEndState.ts +++ b/runtime/typescript/src/atn/BlockEndState.ts @@ -5,16 +5,17 @@ // ConvertTo-TS run at 2016-10-04T11:26:27.9125304-07:00 -import { ATNState } from "./ATNState"; -import { ATNStateType } from "./ATNStateType"; -import { BlockStartState } from "./BlockStartState"; -import { Override } from "../Decorators"; +import { + ATNState, + ATNStateType, + BlockStartState +} from "../internal"; /** Terminal node of a simple `(a|b|c)` block. */ export class BlockEndState extends ATNState { public startState: BlockStartState; - @Override + // @Override get stateType(): ATNStateType { return ATNStateType.BLOCK_END; } diff --git a/src/atn/BlockStartState.ts b/runtime/typescript/src/atn/BlockStartState.ts similarity index 72% rename from src/atn/BlockStartState.ts rename to runtime/typescript/src/atn/BlockStartState.ts index f1965349..0550d4ff 100644 --- a/src/atn/BlockStartState.ts +++ b/runtime/typescript/src/atn/BlockStartState.ts @@ -5,9 +5,10 @@ // ConvertTo-TS run at 2016-10-04T11:26:27.9930394-07:00 -import { BlockEndState } from "./BlockEndState"; -import { DecisionState } from "./DecisionState"; -import { Override } from "../Decorators"; +import { + BlockEndState, + DecisionState +} from "../internal"; /** The start of a regular `(...)` block. */ export abstract class BlockStartState extends DecisionState { diff --git a/src/atn/CodePointTransitions.ts b/runtime/typescript/src/atn/CodePointTransitions.ts similarity index 82% rename from src/atn/CodePointTransitions.ts rename to runtime/typescript/src/atn/CodePointTransitions.ts index f3fa7fe4..8fc89685 100644 --- a/src/atn/CodePointTransitions.ts +++ b/runtime/typescript/src/atn/CodePointTransitions.ts @@ -3,13 +3,16 @@ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. */ -import * as Character from "../misc/Character"; -import { ATNState } from "./ATNState"; -import { AtomTransition } from "./AtomTransition"; -import { IntervalSet } from "../misc/IntervalSet"; -import { RangeTransition } from "./RangeTransition"; -import { SetTransition } from "./SetTransition"; -import { Transition } from "./Transition"; +import * as Character from "../internal"; + +import { + ATNState, + AtomTransition, + IntervalSet, + RangeTransition, + SetTransition, + Transition +} from "../internal"; /** * Utility functions to create {@link AtomTransition}, {@link RangeTransition}, diff --git a/src/atn/ConflictInfo.ts b/runtime/typescript/src/atn/ConflictInfo.ts similarity index 90% rename from src/atn/ConflictInfo.ts rename to runtime/typescript/src/atn/ConflictInfo.ts index 92a5f6ab..fe918d38 100644 --- a/src/atn/ConflictInfo.ts +++ b/runtime/typescript/src/atn/ConflictInfo.ts @@ -5,9 +5,9 @@ // ConvertTo-TS run at 2016-10-04T11:26:28.0710131-07:00 -import { BitSet } from "../misc/BitSet"; -import { Override } from "../Decorators"; -import * as Utils from "../misc/Utils"; +import * as Utils from "../internal"; + +import { BitSet } from "../internal"; /** * This class stores information about a configuration conflict. @@ -48,8 +48,8 @@ export class ConflictInfo { return this.exact; } - @Override - public equals(obj: any): boolean { + // @Override + public equals(obj: object): boolean { if (obj === this) { return true; } else if (!(obj instanceof ConflictInfo)) { @@ -60,7 +60,7 @@ export class ConflictInfo { && Utils.equals(this.conflictedAlts, obj.conflictedAlts); } - @Override + // @Override public hashCode(): number { return this.conflictedAlts.hashCode(); } diff --git a/src/atn/ContextSensitivityInfo.ts b/runtime/typescript/src/atn/ContextSensitivityInfo.ts similarity index 86% rename from src/atn/ContextSensitivityInfo.ts rename to runtime/typescript/src/atn/ContextSensitivityInfo.ts index f32c173e..7bfc59e9 100644 --- a/src/atn/ContextSensitivityInfo.ts +++ b/runtime/typescript/src/atn/ContextSensitivityInfo.ts @@ -5,10 +5,11 @@ // ConvertTo-TS run at 2016-10-04T11:26:28.1575933-07:00 -import { DecisionEventInfo } from "./DecisionEventInfo"; -import { NotNull } from "../Decorators"; -import { SimulatorState } from "./SimulatorState"; -import { TokenStream } from "../TokenStream"; +import { + DecisionEventInfo, + SimulatorState, + TokenStream +} from "../internal"; /** * This class represents profiling event information for a context sensitivity. @@ -42,8 +43,8 @@ export class ContextSensitivityInfo extends DecisionEventInfo { */ constructor( decision: number, - @NotNull state: SimulatorState, - @NotNull input: TokenStream, + state: SimulatorState, + input: TokenStream, startIndex: number, stopIndex: number) { diff --git a/src/atn/DecisionEventInfo.ts b/runtime/typescript/src/atn/DecisionEventInfo.ts similarity index 92% rename from src/atn/DecisionEventInfo.ts rename to runtime/typescript/src/atn/DecisionEventInfo.ts index 7ec4e078..c37fc4cd 100644 --- a/src/atn/DecisionEventInfo.ts +++ b/runtime/typescript/src/atn/DecisionEventInfo.ts @@ -5,9 +5,10 @@ // ConvertTo-TS run at 2016-10-04T11:26:28.2401032-07:00 -import { NotNull } from "../Decorators"; -import { SimulatorState } from "./SimulatorState"; -import { TokenStream } from "../TokenStream"; +import { + SimulatorState, + TokenStream +} from "../internal"; /** * This is the base class for gathering detailed information about prediction @@ -42,7 +43,7 @@ export class DecisionEventInfo { /** * The input token stream which is being parsed. */ - @NotNull + public input: TokenStream; /** @@ -65,7 +66,7 @@ export class DecisionEventInfo { constructor( decision: number, state: SimulatorState | undefined, - @NotNull input: TokenStream, + input: TokenStream, startIndex: number, stopIndex: number, fullCtx: boolean) { diff --git a/src/atn/DecisionInfo.ts b/runtime/typescript/src/atn/DecisionInfo.ts similarity index 90% rename from src/atn/DecisionInfo.ts rename to runtime/typescript/src/atn/DecisionInfo.ts index 9c3dd43a..82568f54 100644 --- a/src/atn/DecisionInfo.ts +++ b/runtime/typescript/src/atn/DecisionInfo.ts @@ -5,12 +5,13 @@ // ConvertTo-TS run at 2016-10-04T11:26:28.3330673-07:00 -import { AmbiguityInfo } from "./AmbiguityInfo"; -import { ContextSensitivityInfo } from "./ContextSensitivityInfo"; -import { ErrorInfo } from "./ErrorInfo"; -import { LookaheadEventInfo } from "./LookaheadEventInfo"; -import { Override } from "../Decorators"; -import { PredicateEvalInfo } from "./PredicateEvalInfo"; +import { + AmbiguityInfo, + ContextSensitivityInfo, + ErrorInfo, + LookaheadEventInfo, + PredicateEvalInfo +} from "../internal"; /** * This class contains profiling gathered for a particular decision. @@ -34,7 +35,7 @@ export class DecisionInfo { * The total number of times {@link ParserATNSimulator#adaptivePredict} was * invoked for this decision. */ - public invocations: number = 0; + public invocations = 0; /** * The total time spent in {@link ParserATNSimulator#adaptivePredict} for @@ -49,7 +50,7 @@ export class DecisionInfo { * call {@link ATNSimulator#clearDFA} to reset the DFA cache to its initial * state before starting the profiling measurement pass. */ - public timeInPrediction: number = 0; + public timeInPrediction = 0; /** * The sum of the lookahead required for SLL prediction for this decision. @@ -57,21 +58,21 @@ export class DecisionInfo { * reasons even when {@link PredictionMode#LL} or * {@link PredictionMode#LL_EXACT_AMBIG_DETECTION} is used. */ - public SLL_TotalLook: number = 0; + public SLL_TotalLook = 0; /** * Gets the minimum lookahead required for any single SLL prediction to * complete for this decision, by reaching a unique prediction, reaching an * SLL conflict state, or encountering a syntax error. */ - public SLL_MinLook: number = 0; + public SLL_MinLook = 0; /** * Gets the maximum lookahead required for any single SLL prediction to * complete for this decision, by reaching a unique prediction, reaching an * SLL conflict state, or encountering a syntax error. */ - public SLL_MaxLook: number = 0; + public SLL_MaxLook = 0; /** * Gets the {@link LookaheadEventInfo} associated with the event where the @@ -84,7 +85,7 @@ export class DecisionInfo { * Note that LL prediction is only used when SLL prediction reaches a * conflict state. */ - public LL_TotalLook: number = 0; + public LL_TotalLook = 0; /** * Gets the minimum lookahead required for any single LL prediction to @@ -93,7 +94,7 @@ export class DecisionInfo { * {@link PredictionMode#LL}, an ambiguity state (for * {@link PredictionMode#LL_EXACT_AMBIG_DETECTION}, or a syntax error. */ - public LL_MinLook: number = 0; + public LL_MinLook = 0; /** * Gets the maximum lookahead required for any single LL prediction to @@ -102,7 +103,7 @@ export class DecisionInfo { * {@link PredictionMode#LL}, an ambiguity state (for * {@link PredictionMode#LL_EXACT_AMBIG_DETECTION}, or a syntax error. */ - public LL_MaxLook: number = 0; + public LL_MaxLook = 0; /** * Gets the {@link LookaheadEventInfo} associated with the event where the @@ -159,7 +160,7 @@ export class DecisionInfo { * @see ParserATNSimulator#computeTargetState * @see LexerATNSimulator#computeTargetState */ - public SLL_ATNTransitions: number = 0; + public SLL_ATNTransitions = 0; /** * The total number of DFA transitions required during SLL prediction for @@ -171,7 +172,7 @@ export class DecisionInfo { * @see ParserATNSimulator#getExistingTargetState * @see LexerATNSimulator#getExistingTargetState */ - public SLL_DFATransitions: number = 0; + public SLL_DFATransitions = 0; /** * Gets the total number of times SLL prediction completed in a conflict @@ -184,7 +185,7 @@ export class DecisionInfo { * this decision, {@link PredictionMode#SLL} would produce the same overall * parsing result as {@link PredictionMode#LL}. */ - public LL_Fallback: number = 0; + public LL_Fallback = 0; /** * The total number of ATN transitions required during LL prediction for @@ -201,7 +202,7 @@ export class DecisionInfo { * @see ParserATNSimulator#computeTargetState * @see LexerATNSimulator#computeTargetState */ - public LL_ATNTransitions: number = 0; + public LL_ATNTransitions = 0; /** * The total number of DFA transitions required during LL prediction for @@ -213,7 +214,7 @@ export class DecisionInfo { * @see ParserATNSimulator#getExistingTargetState * @see LexerATNSimulator#getExistingTargetState */ - public LL_DFATransitions: number = 0; + public LL_DFATransitions = 0; /** * Constructs a new instance of the {@link DecisionInfo} class to contain @@ -225,7 +226,7 @@ export class DecisionInfo { this.decision = decision; } - @Override + // @Override public toString(): string { return "{" + "decision=" + this.decision + diff --git a/src/atn/DecisionState.ts b/runtime/typescript/src/atn/DecisionState.ts similarity index 68% rename from src/atn/DecisionState.ts rename to runtime/typescript/src/atn/DecisionState.ts index 0fc66ff3..5a0670e8 100644 --- a/src/atn/DecisionState.ts +++ b/runtime/typescript/src/atn/DecisionState.ts @@ -5,10 +5,10 @@ // ConvertTo-TS run at 2016-10-04T11:26:28.4381103-07:00 -import { ATNState } from "./ATNState"; +import { ATNState } from "../internal"; export abstract class DecisionState extends ATNState { - public decision: number = -1; - public nonGreedy: boolean = false; - public sll: boolean = false; + public decision = -1; + public nonGreedy = false; + public sll = false; } diff --git a/src/atn/EpsilonTransition.ts b/runtime/typescript/src/atn/EpsilonTransition.ts similarity index 77% rename from src/atn/EpsilonTransition.ts rename to runtime/typescript/src/atn/EpsilonTransition.ts index 57b941f5..c519d8ed 100644 --- a/src/atn/EpsilonTransition.ts +++ b/runtime/typescript/src/atn/EpsilonTransition.ts @@ -5,16 +5,17 @@ // ConvertTo-TS run at 2016-10-04T11:26:28.6283213-07:00 -import { ATNState } from "./ATNState"; -import { Override, NotNull } from "../Decorators"; -import { Transition } from "./Transition"; -import { TransitionType } from "./TransitionType"; +import { + ATNState, + Transition, + TransitionType +} from "../internal"; export class EpsilonTransition extends Transition { private _outermostPrecedenceReturn: number; - constructor(@NotNull target: ATNState, outermostPrecedenceReturn: number = -1) { + constructor(target: ATNState, outermostPrecedenceReturn = -1) { super(target); this._outermostPrecedenceReturn = outermostPrecedenceReturn; } @@ -31,23 +32,23 @@ export class EpsilonTransition extends Transition { return this._outermostPrecedenceReturn; } - @Override + // @Override get serializationType(): TransitionType { return TransitionType.EPSILON; } - @Override + // @Override get isEpsilon(): boolean { return true; } - @Override + // @Override public matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean { return false; } - @Override - @NotNull + // @Override + public toString(): string { return "epsilon"; } diff --git a/src/atn/ErrorInfo.ts b/runtime/typescript/src/atn/ErrorInfo.ts similarity index 83% rename from src/atn/ErrorInfo.ts rename to runtime/typescript/src/atn/ErrorInfo.ts index 37b06f9c..de7465a2 100644 --- a/src/atn/ErrorInfo.ts +++ b/runtime/typescript/src/atn/ErrorInfo.ts @@ -5,10 +5,11 @@ // ConvertTo-TS run at 2016-10-04T11:26:28.7213647-07:00 -import { DecisionEventInfo } from "./DecisionEventInfo"; -import { NotNull } from "../Decorators"; -import { SimulatorState } from "./SimulatorState"; -import { TokenStream } from "../TokenStream"; +import { + DecisionEventInfo, + SimulatorState, + TokenStream +} from "../internal"; /** * This class represents profiling event information for a syntax error @@ -35,8 +36,8 @@ export class ErrorInfo extends DecisionEventInfo { */ constructor( decision: number, - @NotNull state: SimulatorState, - @NotNull input: TokenStream, + state: SimulatorState, + input: TokenStream, startIndex: number, stopIndex: number) { diff --git a/src/atn/InvalidState.ts b/runtime/typescript/src/atn/InvalidState.ts similarity index 64% rename from src/atn/InvalidState.ts rename to runtime/typescript/src/atn/InvalidState.ts index 46bf58a5..101eccee 100644 --- a/src/atn/InvalidState.ts +++ b/runtime/typescript/src/atn/InvalidState.ts @@ -3,10 +3,11 @@ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. */ -import { ATNState } from "./ATNState"; -import { ATNStateType } from "./ATNStateType"; -import { BasicState } from "./BasicState"; -import { Override } from "../Decorators"; +import { + ATNState, + ATNStateType, + BasicState +} from "../internal"; /** * @@ -14,7 +15,7 @@ import { Override } from "../Decorators"; */ export class InvalidState extends BasicState { - @Override + // @Override get stateType(): ATNStateType { return ATNStateType.INVALID_TYPE; } diff --git a/src/atn/LL1Analyzer.ts b/runtime/typescript/src/atn/LL1Analyzer.ts similarity index 76% rename from src/atn/LL1Analyzer.ts rename to runtime/typescript/src/atn/LL1Analyzer.ts index 92aeb8fb..11c9bd77 100644 --- a/src/atn/LL1Analyzer.ts +++ b/runtime/typescript/src/atn/LL1Analyzer.ts @@ -5,23 +5,24 @@ // ConvertTo-TS run at 2016-10-04T11:26:30.4445360-07:00 -import { AbstractPredicateTransition } from "./AbstractPredicateTransition"; -import { Array2DHashSet } from "../misc/Array2DHashSet"; -import { ATN } from "./ATN"; -import { ATNConfig } from "./ATNConfig"; -import { ATNState } from "./ATNState"; -import { BitSet } from "../misc/BitSet"; -import { IntervalSet } from "../misc/IntervalSet"; -import { NotNull } from "../Decorators"; -import { NotSetTransition } from "./NotSetTransition"; -import { ObjectEqualityComparator } from "../misc/ObjectEqualityComparator"; -import { PredictionContext } from "./PredictionContext"; -import { RuleStopState } from "./RuleStopState"; -import { RuleTransition } from "./RuleTransition"; -import { SetTransition } from "./SetTransition"; -import { Token } from "../Token"; -import { Transition } from "./Transition"; -import { WildcardTransition } from "./WildcardTransition"; +import { + ATN, + ATNConfig, + ATNState, + AbstractPredicateTransition, + Array2DHashSet, + BitSet, + IntervalSet, + NotSetTransition, + ObjectEqualityComparator, + PredictionContext, + RuleStopState, + RuleTransition, + SetTransition, + Token, + Transition, + WildcardTransition +} from "../internal"; export class LL1Analyzer { /** Special value added to the lookahead sets to indicate that we hit @@ -29,10 +30,10 @@ export class LL1Analyzer { */ public static readonly HIT_PRED: number = Token.INVALID_TYPE; - @NotNull + public atn: ATN; - constructor(@NotNull atn: ATN) { this.atn = atn; } + constructor(atn: ATN) { this.atn = atn; } /** * Calculates the SLL(1) expected lookahead set for each outgoing transition @@ -44,18 +45,18 @@ export class LL1Analyzer { * @param s the ATN state * @returns the expected symbols for each outgoing transition of `s`. */ - public getDecisionLookahead(s: ATNState | undefined): Array | undefined { -// System.out.println("LOOK("+s.stateNumber+")"); + public getDecisionLookahead(s: ATNState | undefined): (IntervalSet | undefined)[] | undefined { + // System.out.println("LOOK("+s.stateNumber+")"); if (s == null) { return undefined; } - let look: Array = new Array(s.numberOfTransitions); + const look: (IntervalSet | undefined)[] = new Array(s.numberOfTransitions); for (let alt = 0; alt < s.numberOfTransitions; alt++) { let current: IntervalSet | undefined = new IntervalSet(); look[alt] = current; - let lookBusy: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE); - let seeThruPreds: boolean = false; // fail to get lookahead upon pred + const lookBusy: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE); + const seeThruPreds = false; // fail to get lookahead upon pred this._LOOK(s.transition(alt).target, undefined, PredictionContext.EMPTY_LOCAL, current, lookBusy, new BitSet(), seeThruPreds, false); // Wipe out lookahead for this alternative if we found nothing @@ -108,8 +109,8 @@ export class LL1Analyzer { // @NotNull public LOOK(/*@NotNull*/ s: ATNState, /*@NotNull*/ ctx: PredictionContext, stopState: ATNState | null): IntervalSet; - @NotNull - public LOOK(@NotNull s: ATNState, @NotNull ctx: PredictionContext, stopState?: ATNState | null): IntervalSet { + + public LOOK(s: ATNState, ctx: PredictionContext, stopState?: ATNState | null): IntervalSet { if (stopState === undefined) { if (s.atn == null) { throw new Error("Illegal state"); @@ -122,9 +123,9 @@ export class LL1Analyzer { stopState = undefined; } - let r: IntervalSet = new IntervalSet(); - let seeThruPreds: boolean = true; // ignore preds; get all lookahead - let addEOF: boolean = true; + const r: IntervalSet = new IntervalSet(); + const seeThruPreds = true; // ignore preds; get all lookahead + const addEOF = true; this._LOOK(s, stopState, ctx, r, new Array2DHashSet(), new BitSet(), seeThruPreds, addEOF); return r; } @@ -161,16 +162,16 @@ export class LL1Analyzer { * is {@link PredictionContext#EMPTY_LOCAL}. */ protected _LOOK( - @NotNull s: ATNState, + s: ATNState, stopState: ATNState | undefined, - @NotNull ctx: PredictionContext, - @NotNull look: IntervalSet, - @NotNull lookBusy: Array2DHashSet, - @NotNull calledRuleStack: BitSet, + ctx: PredictionContext, + look: IntervalSet, + lookBusy: Array2DHashSet, + calledRuleStack: BitSet, seeThruPreds: boolean, addEOF: boolean): void { -// System.out.println("_LOOK("+s.stateNumber+", ctx="+ctx); - let c: ATNConfig = ATNConfig.create(s, 0, ctx); + // System.out.println("_LOOK("+s.stateNumber+", ctx="+ctx); + const c: ATNConfig = ATNConfig.create(s, 0, ctx); if (!lookBusy.add(c)) { return; } @@ -197,7 +198,7 @@ export class LL1Analyzer { return; } - let removed: boolean = calledRuleStack.get(s.ruleIndex); + const removed: boolean = calledRuleStack.get(s.ruleIndex); try { calledRuleStack.clear(s.ruleIndex); for (let i = 0; i < ctx.size; i++) { @@ -205,8 +206,8 @@ export class LL1Analyzer { continue; } - let returnState: ATNState = this.atn.states[ctx.getReturnState(i)]; -// System.out.println("popping back to "+retState); + const returnState: ATNState = this.atn.states[ctx.getReturnState(i)]; + // System.out.println("popping back to "+retState); this._LOOK(returnState, stopState, ctx.getParent(i), look, lookBusy, calledRuleStack, seeThruPreds, addEOF); } } @@ -217,15 +218,15 @@ export class LL1Analyzer { } } - let n: number = s.numberOfTransitions; + const n: number = s.numberOfTransitions; for (let i = 0; i < n; i++) { - let t: Transition = s.transition(i); + const t: Transition = s.transition(i); if (t instanceof RuleTransition) { if (calledRuleStack.get(t.ruleIndex)) { continue; } - let newContext: PredictionContext = ctx.getChild(t.followState.stateNumber); + const newContext: PredictionContext = ctx.getChild(t.followState.stateNumber); try { calledRuleStack.set(t.ruleIndex); @@ -250,7 +251,7 @@ export class LL1Analyzer { look.addAll(IntervalSet.of(Token.MIN_USER_TOKEN_TYPE, this.atn.maxTokenType)); } else { -// System.out.println("adding "+ t); + // System.out.println("adding "+ t); let set: IntervalSet | undefined = t.label; if (set != null) { if (t instanceof NotSetTransition) { diff --git a/src/atn/LexerATNSimulator.ts b/runtime/typescript/src/atn/LexerATNSimulator.ts similarity index 65% rename from src/atn/LexerATNSimulator.ts rename to runtime/typescript/src/atn/LexerATNSimulator.ts index 09b654d4..b16ff282 100644 --- a/src/atn/LexerATNSimulator.ts +++ b/runtime/typescript/src/atn/LexerATNSimulator.ts @@ -5,35 +5,37 @@ // ConvertTo-TS run at 2016-10-04T11:26:29.1083066-07:00 -import { AcceptStateInfo } from "../dfa/AcceptStateInfo"; -import { ActionTransition } from "./ActionTransition"; -import { ATN } from "./ATN"; -import { ATNConfig } from "./ATNConfig"; -import { ATNConfigSet } from "./ATNConfigSet"; -import { ATNSimulator } from "./ATNSimulator"; -import { ATNState } from "./ATNState"; -import { CharStream } from "../CharStream"; -import { DFA } from "../dfa/DFA"; -import { DFAState } from "../dfa/DFAState"; -import { Interval } from "../misc/Interval"; -import { IntStream } from "../IntStream"; -import { Lexer } from "../Lexer"; -import { LexerActionExecutor } from "./LexerActionExecutor"; -import { LexerNoViableAltException } from "../LexerNoViableAltException"; -import { NotNull, Override } from "../Decorators"; -import { OrderedATNConfigSet } from "./OrderedATNConfigSet"; -import { PredictionContext } from "./PredictionContext"; -import { PredicateTransition } from "./PredicateTransition"; -import { RuleStopState } from "./RuleStopState"; -import { RuleTransition } from "./RuleTransition"; -import { Token } from "../Token"; -import { Transition } from "./Transition"; -import { TransitionType } from "./TransitionType"; import * as assert from "assert"; +import { + ATN, + ATNConfig, + ATNConfigSet, + ATNSimulator, + ATNState, + AcceptStateInfo, + ActionTransition, + CharStream, + DFA, + DFAState, + IntStream, + Interval, + Lexer, + LexerActionExecutor, + LexerNoViableAltException, + OrderedATNConfigSet, + PredicateTransition, + PredictionContext, + RuleStopState, + RuleTransition, + Token, + Transition, + TransitionType +} from "../internal"; + /** "dup" of ParserInterpreter */ export class LexerATNSimulator extends ATNSimulator { - public optimize_tail_calls: boolean = true; + public optimize_tail_calls = true; protected recog: Lexer | undefined; @@ -42,44 +44,42 @@ export class LexerATNSimulator extends ATNSimulator { * DFA did not have a previous accept state. In this case, we use the * ATN-generated exception object. */ - protected startIndex: number = -1; + protected startIndex = -1; /** line number 1..n within the input */ - private _line: number = 1; + private _line = 1; /** The index of the character relative to the beginning of the line 0..n-1 */ - private _charPositionInLine: number = 0; + private _charPositionInLine = 0; protected mode: number = Lexer.DEFAULT_MODE; /** Used during DFA/ATN exec to record the most recent accept configuration info */ - @NotNull + protected prevAccept: LexerATNSimulator.SimState = new LexerATNSimulator.SimState(); - public static match_calls: number = 0; + public static match_calls = 0; - constructor(/*@NotNull*/ atn: ATN); - constructor(/*@NotNull*/ atn: ATN, recog: Lexer | undefined); - constructor(@NotNull atn: ATN, recog?: Lexer) { + constructor(atn: ATN, recog?: Lexer) { super(atn); this.recog = recog; } - public copyState(@NotNull simulator: LexerATNSimulator): void { + public copyState(simulator: LexerATNSimulator): void { this._charPositionInLine = simulator.charPositionInLine; this._line = simulator._line; this.mode = simulator.mode; this.startIndex = simulator.startIndex; } - public match(@NotNull input: CharStream, mode: number): number { + public match(input: CharStream, mode: number): number { LexerATNSimulator.match_calls++; this.mode = mode; - let mark: number = input.mark(); + const mark: number = input.mark(); try { this.startIndex = input.index; this.prevAccept.reset(); - let s0: DFAState | undefined = this.atn.modeToDFA[mode].s0; + const s0: DFAState | undefined = this.atn.modeToDFA[mode].s0; if (s0 == null) { return this.matchATN(input); } @@ -92,7 +92,7 @@ export class LexerATNSimulator extends ATNSimulator { } } - @Override + // @Override public reset(): void { this.prevAccept.reset(); this.startIndex = -1; @@ -101,24 +101,24 @@ export class LexerATNSimulator extends ATNSimulator { this.mode = Lexer.DEFAULT_MODE; } - protected matchATN(@NotNull input: CharStream): number { - let startState: ATNState = this.atn.modeToStartState[this.mode]; + protected matchATN(input: CharStream): number { + const startState: ATNState = this.atn.modeToStartState[this.mode]; if (LexerATNSimulator.debug) { console.log(`matchATN mode ${this.mode} start: ${startState}`); } - let old_mode: number = this.mode; + const old_mode: number = this.mode; - let s0_closure: ATNConfigSet = this.computeStartState(input, startState); - let suppressEdge: boolean = s0_closure.hasSemanticContext; + const s0_closure: ATNConfigSet = this.computeStartState(input, startState); + const suppressEdge: boolean = s0_closure.hasSemanticContext; if (suppressEdge) { s0_closure.hasSemanticContext = false; } let next: DFAState = this.addDFAState(s0_closure); if (!suppressEdge) { - let dfa = this.atn.modeToDFA[this.mode]; + const dfa = this.atn.modeToDFA[this.mode]; if (!dfa.s0) { dfa.s0 = next; } else { @@ -126,7 +126,7 @@ export class LexerATNSimulator extends ATNSimulator { } } - let predict: number = this.execATN(input, next); + const predict: number = this.execATN(input, next); if (LexerATNSimulator.debug) { console.log(`DFA after matchATN: ${this.atn.modeToDFA[old_mode].toLexerString()}`); @@ -135,7 +135,7 @@ export class LexerATNSimulator extends ATNSimulator { return predict; } - protected execATN(@NotNull input: CharStream, @NotNull ds0: DFAState): number { + protected execATN(input: CharStream, ds0: DFAState): number { // console.log("enter exec index "+input.index+" from "+ds0.configs); if (LexerATNSimulator.debug) { console.log(`start state closure=${ds0.configs}`); @@ -150,6 +150,7 @@ export class LexerATNSimulator extends ATNSimulator { // @NotNull let s: DFAState = ds0; // s is current/from DFA state + // eslint-disable-next-line no-constant-condition while (true) { // while more work if (LexerATNSimulator.debug) { console.log(`execATN loop starting closure: ${s.configs}`); @@ -214,8 +215,8 @@ export class LexerATNSimulator extends ATNSimulator { * `t`, or `undefined` if the target state for this edge is not * already cached */ - protected getExistingTargetState(@NotNull s: DFAState, t: number): DFAState | undefined { - let target: DFAState | undefined = s.getTarget(t); + protected getExistingTargetState(s: DFAState, t: number): DFAState | undefined { + const target: DFAState | undefined = s.getTarget(t); if (LexerATNSimulator.debug && target != null) { console.log("reuse state " + s.stateNumber + " edge to " + target.stateNumber); @@ -236,9 +237,9 @@ export class LexerATNSimulator extends ATNSimulator { * `t`. If `t` does not lead to a valid DFA state, this method * returns {@link #ERROR}. */ - @NotNull - protected computeTargetState(@NotNull input: CharStream, @NotNull s: DFAState, t: number): DFAState { - let reach: ATNConfigSet = new OrderedATNConfigSet(); + + protected computeTargetState(input: CharStream, s: DFAState, t: number): DFAState { + const reach: ATNConfigSet = new OrderedATNConfigSet(); // if we don't find an existing DFA state // Fill reach starting from closure, following t transitions @@ -263,7 +264,7 @@ export class LexerATNSimulator extends ATNSimulator { prevAccept: LexerATNSimulator.SimState, input: CharStream, reach: ATNConfigSet, t: number): number { if (prevAccept.dfaState != null) { - let lexerActionExecutor: LexerActionExecutor | undefined = prevAccept.dfaState.lexerActionExecutor; + const lexerActionExecutor: LexerActionExecutor | undefined = prevAccept.dfaState.lexerActionExecutor; this.accept(input, lexerActionExecutor, this.startIndex, prevAccept.index, prevAccept.line, prevAccept.charPos); return prevAccept.dfaState.prediction; @@ -282,12 +283,12 @@ export class LexerATNSimulator extends ATNSimulator { * we can reach upon input `t`. Parameter `reach` is a return * parameter. */ - protected getReachableConfigSet(@NotNull input: CharStream, @NotNull closure: ATNConfigSet, @NotNull reach: ATNConfigSet, t: number): void { + protected getReachableConfigSet(input: CharStream, closure: ATNConfigSet, reach: ATNConfigSet, t: number): void { // this is used to skip processing for configs which have a lower priority // than a config that already reached an accept state for the same rule let skipAlt: number = ATN.INVALID_ALT_NUMBER; - for (let c of closure) { - let currentAltReachedAcceptState: boolean = c.alt === skipAlt; + for (const c of closure) { + const currentAltReachedAcceptState: boolean = c.alt === skipAlt; if (currentAltReachedAcceptState && c.hasPassedThroughNonGreedyDecision) { continue; } @@ -296,10 +297,10 @@ export class LexerATNSimulator extends ATNSimulator { console.log(`testing ${this.getTokenName(t)} at ${c.toString(this.recog, true)}`); } - let n: number = c.state.numberOfOptimizedTransitions; + const n: number = c.state.numberOfOptimizedTransitions; for (let ti = 0; ti < n; ti++) { // for each optimized transition - let trans: Transition = c.state.getOptimizedTransition(ti); - let target: ATNState | undefined = this.getReachableTarget(trans, t); + const trans: Transition = c.state.getOptimizedTransition(ti); + const target: ATNState | undefined = this.getReachableTarget(trans, t); if (target != null) { let lexerActionExecutor: LexerActionExecutor | undefined = c.lexerActionExecutor; let config: ATNConfig; @@ -311,7 +312,7 @@ export class LexerATNSimulator extends ATNSimulator { config = c.transform(target, true); } - let treatEofAsEpsilon: boolean = t === IntStream.EOF; + const treatEofAsEpsilon: boolean = t === IntStream.EOF; if (this.closure(input, config, reach, currentAltReachedAcceptState, true, treatEofAsEpsilon)) { // any remaining configs for this alt have a lower priority than // the one that just reached an accept state. @@ -324,7 +325,7 @@ export class LexerATNSimulator extends ATNSimulator { } protected accept( - @NotNull input: CharStream, lexerActionExecutor: LexerActionExecutor | undefined, + input: CharStream, lexerActionExecutor: LexerActionExecutor | undefined, startIndex: number, index: number, line: number, charPos: number): void { if (LexerATNSimulator.debug) { console.log(`ACTION ${lexerActionExecutor}`); @@ -348,15 +349,15 @@ export class LexerATNSimulator extends ATNSimulator { return undefined; } - @NotNull + protected computeStartState( - @NotNull input: CharStream, - @NotNull p: ATNState): ATNConfigSet { - let initialContext: PredictionContext = PredictionContext.EMPTY_FULL; - let configs: ATNConfigSet = new OrderedATNConfigSet(); + input: CharStream, + p: ATNState): ATNConfigSet { + const initialContext: PredictionContext = PredictionContext.EMPTY_FULL; + const configs: ATNConfigSet = new OrderedATNConfigSet(); for (let i = 0; i < p.numberOfTransitions; i++) { - let target: ATNState = p.transition(i).target; - let c: ATNConfig = ATNConfig.create(target, i + 1, initialContext); + const target: ATNState = p.transition(i).target; + const c: ATNConfig = ATNConfig.create(target, i + 1, initialContext); this.closure(input, c, configs, false, false, false); } return configs; @@ -372,7 +373,7 @@ export class LexerATNSimulator extends ATNSimulator { * @returns `true` if an accept state is reached, otherwise * `false`. */ - protected closure(@NotNull input: CharStream, @NotNull config: ATNConfig, @NotNull configs: ATNConfigSet, currentAltReachedAcceptState: boolean, speculative: boolean, treatEofAsEpsilon: boolean): boolean { + protected closure(input: CharStream, config: ATNConfig, configs: ATNConfigSet, currentAltReachedAcceptState: boolean, speculative: boolean, treatEofAsEpsilon: boolean): boolean { if (LexerATNSimulator.debug) { console.log("closure(" + config.toString(this.recog, true) + ")"); } @@ -387,7 +388,7 @@ export class LexerATNSimulator extends ATNSimulator { } } - let context: PredictionContext = config.context; + const context: PredictionContext = config.context; if (context.isEmpty) { configs.add(config); return true; @@ -398,14 +399,14 @@ export class LexerATNSimulator extends ATNSimulator { } for (let i = 0; i < context.size; i++) { - let returnStateNumber: number = context.getReturnState(i); + const returnStateNumber: number = context.getReturnState(i); if (returnStateNumber === PredictionContext.EMPTY_FULL_STATE_KEY) { continue; } - let newContext: PredictionContext = context.getParent(i); // "pop" return state - let returnState: ATNState = this.atn.states[returnStateNumber]; - let c: ATNConfig = config.transform(returnState, false, newContext); + const newContext: PredictionContext = context.getParent(i); // "pop" return state + const returnState: ATNState = this.atn.states[returnStateNumber]; + const c: ATNConfig = config.transform(returnState, false, newContext); currentAltReachedAcceptState = this.closure(input, c, configs, currentAltReachedAcceptState, speculative, treatEofAsEpsilon); } @@ -419,10 +420,10 @@ export class LexerATNSimulator extends ATNSimulator { } } - let p: ATNState = config.state; + const p: ATNState = config.state; for (let i = 0; i < p.numberOfOptimizedTransitions; i++) { - let t: Transition = p.getOptimizedTransition(i); - let c: ATNConfig | undefined = this.getEpsilonTarget(input, config, t, configs, speculative, treatEofAsEpsilon); + const t: Transition = p.getOptimizedTransition(i); + const c: ATNConfig | undefined = this.getEpsilonTarget(input, config, t, configs, speculative, treatEofAsEpsilon); if (c != null) { currentAltReachedAcceptState = this.closure(input, c, configs, currentAltReachedAcceptState, speculative, treatEofAsEpsilon); } @@ -433,107 +434,108 @@ export class LexerATNSimulator extends ATNSimulator { // side-effect: can alter configs.hasSemanticContext protected getEpsilonTarget( - @NotNull input: CharStream, - @NotNull config: ATNConfig, - @NotNull t: Transition, - @NotNull configs: ATNConfigSet, + input: CharStream, + config: ATNConfig, + t: Transition, + configs: ATNConfigSet, speculative: boolean, treatEofAsEpsilon: boolean): ATNConfig | undefined { let c: ATNConfig | undefined; switch (t.serializationType) { - case TransitionType.RULE: - let ruleTransition: RuleTransition = t as RuleTransition; - if (this.optimize_tail_calls && ruleTransition.optimizedTailCall && !config.context.hasEmpty) { - c = config.transform(t.target, true); - } - else { - let newContext: PredictionContext = config.context.getChild(ruleTransition.followState.stateNumber); - c = config.transform(t.target, true, newContext); - } + case TransitionType.RULE: { + const ruleTransition: RuleTransition = t as RuleTransition; + if (this.optimize_tail_calls && ruleTransition.optimizedTailCall && !config.context.hasEmpty) { + c = config.transform(t.target, true); + } + else { + const newContext: PredictionContext = config.context.getChild(ruleTransition.followState.stateNumber); + c = config.transform(t.target, true, newContext); + } - break; - - case TransitionType.PRECEDENCE: - throw new Error("Precedence predicates are not supported in lexers."); - - case TransitionType.PREDICATE: - /* Track traversing semantic predicates. If we traverse, - we cannot add a DFA state for this "reach" computation - because the DFA would not test the predicate again in the - future. Rather than creating collections of semantic predicates - like v3 and testing them on prediction, v4 will test them on the - fly all the time using the ATN not the DFA. This is slower but - semantically it's not used that often. One of the key elements to - this predicate mechanism is not adding DFA states that see - predicates immediately afterwards in the ATN. For example, - - a : ID {p1}? | ID {p2}? ; - - should create the start state for rule 'a' (to save start state - competition), but should not create target of ID state. The - collection of ATN states the following ID references includes - states reached by traversing predicates. Since this is when we - test them, we cannot cash the DFA state target of ID. - */ - let pt: PredicateTransition = t as PredicateTransition; - if (LexerATNSimulator.debug) { - console.log("EVAL rule " + pt.ruleIndex + ":" + pt.predIndex); - } - configs.hasSemanticContext = true; - if (this.evaluatePredicate(input, pt.ruleIndex, pt.predIndex, speculative)) { - c = config.transform(t.target, true); - } - else { - c = undefined; + break; } + case TransitionType.PRECEDENCE: + throw new Error("Precedence predicates are not supported in lexers."); + + case TransitionType.PREDICATE: { + /* Track traversing semantic predicates. If we traverse, + we cannot add a DFA state for this "reach" computation + because the DFA would not test the predicate again in the + future. Rather than creating collections of semantic predicates + like v3 and testing them on prediction, v4 will test them on the + fly all the time using the ATN not the DFA. This is slower but + semantically it's not used that often. One of the key elements to + this predicate mechanism is not adding DFA states that see + predicates immediately afterwards in the ATN. For example, + + a : ID {p1}? | ID {p2}? ; + + should create the start state for rule 'a' (to save start state + competition), but should not create target of ID state. The + collection of ATN states the following ID references includes + states reached by traversing predicates. Since this is when we + test them, we cannot cash the DFA state target of ID. + */ + const pt: PredicateTransition = t as PredicateTransition; + if (LexerATNSimulator.debug) { + console.log("EVAL rule " + pt.ruleIndex + ":" + pt.predIndex); + } + configs.hasSemanticContext = true; + if (this.evaluatePredicate(input, pt.ruleIndex, pt.predIndex, speculative)) { + c = config.transform(t.target, true); + } + else { + c = undefined; + } - break; - - case TransitionType.ACTION: - if (config.context.hasEmpty) { - // execute actions anywhere in the start rule for a token. - // - // TODO: if the entry rule is invoked recursively, some - // actions may be executed during the recursive call. The - // problem can appear when hasEmpty is true but - // isEmpty is false. In this case, the config needs to be - // split into two contexts - one with just the empty path - // and another with everything but the empty path. - // Unfortunately, the current algorithm does not allow - // getEpsilonTarget to return two configurations, so - // additional modifications are needed before we can support - // the split operation. - let lexerActionExecutor: LexerActionExecutor = LexerActionExecutor.append(config.lexerActionExecutor, this.atn.lexerActions[(t as ActionTransition).actionIndex]); - c = config.transform(t.target, true, lexerActionExecutor); break; } - else { - // ignore actions in referenced rules + + case TransitionType.ACTION: + if (config.context.hasEmpty) { + // execute actions anywhere in the start rule for a token. + // + // TODO: if the entry rule is invoked recursively, some + // actions may be executed during the recursive call. The + // problem can appear when hasEmpty is true but + // isEmpty is false. In this case, the config needs to be + // split into two contexts - one with just the empty path + // and another with everything but the empty path. + // Unfortunately, the current algorithm does not allow + // getEpsilonTarget to return two configurations, so + // additional modifications are needed before we can support + // the split operation. + const lexerActionExecutor: LexerActionExecutor = LexerActionExecutor.append(config.lexerActionExecutor, this.atn.lexerActions[(t as ActionTransition).actionIndex]); + c = config.transform(t.target, true, lexerActionExecutor); + break; + } + else { + // ignore actions in referenced rules + c = config.transform(t.target, true); + break; + } + + case TransitionType.EPSILON: c = config.transform(t.target, true); break; - } - case TransitionType.EPSILON: - c = config.transform(t.target, true); - break; - - case TransitionType.ATOM: - case TransitionType.RANGE: - case TransitionType.SET: - if (treatEofAsEpsilon) { - if (t.matches(IntStream.EOF, Lexer.MIN_CHAR_VALUE, Lexer.MAX_CHAR_VALUE)) { - c = config.transform(t.target, false); - break; + case TransitionType.ATOM: + case TransitionType.RANGE: + case TransitionType.SET: + if (treatEofAsEpsilon) { + if (t.matches(IntStream.EOF, Lexer.MIN_CHAR_VALUE, Lexer.MAX_CHAR_VALUE)) { + c = config.transform(t.target, false); + break; + } } - } - c = undefined; - break; + c = undefined; + break; - default: - c = undefined; - break; + default: + c = undefined; + break; } return c; @@ -560,7 +562,7 @@ export class LexerATNSimulator extends ATNSimulator { * @returns `true` if the specified predicate evaluates to * `true`. */ - protected evaluatePredicate(@NotNull input: CharStream, ruleIndex: number, predIndex: number, speculative: boolean): boolean { + protected evaluatePredicate(input: CharStream, ruleIndex: number, predIndex: number, speculative: boolean): boolean { // assume true if no recognizer was provided if (this.recog == null) { return true; @@ -570,10 +572,10 @@ export class LexerATNSimulator extends ATNSimulator { return this.recog.sempred(undefined, ruleIndex, predIndex); } - let savedCharPositionInLine: number = this._charPositionInLine; - let savedLine: number = this._line; - let index: number = input.index; - let marker: number = input.mark(); + const savedCharPositionInLine: number = this._charPositionInLine; + const savedLine: number = this._line; + const index: number = input.index; + const marker: number = input.mark(); try { this.consume(input); return this.recog.sempred(undefined, ruleIndex, predIndex); @@ -587,9 +589,9 @@ export class LexerATNSimulator extends ATNSimulator { } protected captureSimState( - @NotNull settings: LexerATNSimulator.SimState, - @NotNull input: CharStream, - @NotNull dfaState: DFAState): void { + settings: LexerATNSimulator.SimState, + input: CharStream, + dfaState: DFAState): void { settings.index = input.index; settings.line = this._line; settings.charPos = this._charPositionInLine; @@ -612,13 +614,13 @@ export class LexerATNSimulator extends ATNSimulator { * If that gets us to a previously created (but dangling) DFA * state, we can continue in pure DFA mode from there. */ - let suppressEdge: boolean = q.hasSemanticContext; + const suppressEdge: boolean = q.hasSemanticContext; if (suppressEdge) { q.hasSemanticContext = false; } // @NotNull - let to: DFAState = this.addDFAState(q); + const to: DFAState = this.addDFAState(q); if (suppressEdge) { return to; @@ -642,24 +644,24 @@ export class LexerATNSimulator extends ATNSimulator { * configuration containing an ATN rule stop state. Later, when * traversing the DFA, we will know which rule to accept. */ - @NotNull - protected addDFAState(@NotNull configs: ATNConfigSet): DFAState { + + protected addDFAState(configs: ATNConfigSet): DFAState { /* the lexer evaluates predicates on-the-fly; by this point configs * should not contain any configurations with unevaluated predicates. */ assert(!configs.hasSemanticContext); - let proposed: DFAState = new DFAState(configs); - let existing: DFAState | undefined = this.atn.modeToDFA[this.mode].states.get(proposed); + const proposed: DFAState = new DFAState(configs); + const existing: DFAState | undefined = this.atn.modeToDFA[this.mode].states.get(proposed); if (existing != null) { return existing; } configs.optimizeConfigs(this); - let newState: DFAState = new DFAState(configs.clone(true)); + const newState: DFAState = new DFAState(configs.clone(true)); let firstConfigWithRuleStopState: ATNConfig | undefined; - for (let c of configs) { + for (const c of configs) { if (c.state instanceof RuleStopState) { firstConfigWithRuleStopState = c; break; @@ -667,23 +669,23 @@ export class LexerATNSimulator extends ATNSimulator { } if (firstConfigWithRuleStopState != null) { - let prediction: number = this.atn.ruleToTokenType[firstConfigWithRuleStopState.state.ruleIndex]; - let lexerActionExecutor: LexerActionExecutor | undefined = firstConfigWithRuleStopState.lexerActionExecutor; + const prediction: number = this.atn.ruleToTokenType[firstConfigWithRuleStopState.state.ruleIndex]; + const lexerActionExecutor: LexerActionExecutor | undefined = firstConfigWithRuleStopState.lexerActionExecutor; newState.acceptStateInfo = new AcceptStateInfo(prediction, lexerActionExecutor); } return this.atn.modeToDFA[this.mode].addState(newState); } - @NotNull + public getDFA(mode: number): DFA { return this.atn.modeToDFA[mode]; } /** Get the text matched so far for the current token. */ - @NotNull - public getText(@NotNull input: CharStream): string { + + public getText(input: CharStream): string { // index is first lookahead char, don't include. return input.getText(Interval.of(this.startIndex, input.index - 1)); } @@ -704,8 +706,8 @@ export class LexerATNSimulator extends ATNSimulator { this._charPositionInLine = charPositionInLine; } - public consume(@NotNull input: CharStream): void { - let curChar: number = input.LA(1); + public consume(input: CharStream): void { + const curChar: number = input.LA(1); if (curChar === "\n".charCodeAt(0)) { this._line++; this._charPositionInLine = 0; @@ -715,7 +717,7 @@ export class LexerATNSimulator extends ATNSimulator { input.consume(); } - @NotNull + public getTokenName(t: number): string { if (t === -1) { return "EOF"; @@ -726,8 +728,8 @@ export class LexerATNSimulator extends ATNSimulator { } export namespace LexerATNSimulator { - export const debug: boolean = false; - export const dfa_debug: boolean = false; + export const debug = false; + export const dfa_debug = false; /** When we hit an accept state in either the DFA or the ATN, we * have to notify the character stream to start buffering characters @@ -745,9 +747,9 @@ export namespace LexerATNSimulator { * can simply return the predicted token type. */ export class SimState { - public index: number = -1; - public line: number = 0; - public charPos: number = -1; + public index = -1; + public line = 0; + public charPos = -1; public dfaState?: DFAState; public reset(): void { diff --git a/src/atn/LexerAction.ts b/runtime/typescript/src/atn/LexerAction.ts similarity index 92% rename from src/atn/LexerAction.ts rename to runtime/typescript/src/atn/LexerAction.ts index 8d2bc26c..f2fe3c72 100644 --- a/src/atn/LexerAction.ts +++ b/runtime/typescript/src/atn/LexerAction.ts @@ -5,9 +5,11 @@ // ConvertTo-TS run at 2016-10-04T11:26:28.7973969-07:00 -import { Equatable } from "../misc/Stubs"; -import { Lexer } from "../Lexer"; -import { LexerActionType } from "./LexerActionType"; +import { + Equatable, + Lexer, + LexerActionType +} from "../internal"; /** * Represents a single action which can be executed following the successful diff --git a/src/atn/LexerActionExecutor.ts b/runtime/typescript/src/atn/LexerActionExecutor.ts similarity index 87% rename from src/atn/LexerActionExecutor.ts rename to runtime/typescript/src/atn/LexerActionExecutor.ts index 033bbdf1..b768c4c8 100644 --- a/src/atn/LexerActionExecutor.ts +++ b/runtime/typescript/src/atn/LexerActionExecutor.ts @@ -5,13 +5,14 @@ // ConvertTo-TS run at 2016-10-04T11:26:28.8810453-07:00 -import { ArrayEqualityComparator } from "../misc/ArrayEqualityComparator"; -import { CharStream } from "../CharStream"; -import { Lexer } from "../Lexer"; -import { LexerAction } from "./LexerAction"; -import { LexerIndexedCustomAction } from "./LexerIndexedCustomAction"; -import { MurmurHash } from "../misc/MurmurHash"; -import { NotNull, Override } from "../Decorators"; +import { + ArrayEqualityComparator, + CharStream, + Lexer, + LexerAction, + LexerIndexedCustomAction, + MurmurHash +} from "../internal"; /** * Represents an executor for a sequence of lexer actions which traversed during @@ -25,7 +26,7 @@ import { NotNull, Override } from "../Decorators"; * @since 4.2 */ export class LexerActionExecutor { - @NotNull + private _lexerActions: LexerAction[]; /** @@ -38,11 +39,11 @@ export class LexerActionExecutor { * Constructs an executor for a sequence of {@link LexerAction} actions. * @param lexerActions The lexer actions to execute. */ - constructor(@NotNull lexerActions: LexerAction[]) { + constructor(lexerActions: LexerAction[]) { this._lexerActions = lexerActions; let hash: number = MurmurHash.initialize(); - for (let lexerAction of lexerActions) { + for (const lexerAction of lexerActions) { hash = MurmurHash.update(hash, lexerAction); } @@ -64,13 +65,13 @@ export class LexerActionExecutor { * @returns A {@link LexerActionExecutor} for executing the combine actions * of `lexerActionExecutor` and `lexerAction`. */ - @NotNull - public static append(lexerActionExecutor: LexerActionExecutor | undefined, @NotNull lexerAction: LexerAction): LexerActionExecutor { + + public static append(lexerActionExecutor: LexerActionExecutor | undefined, lexerAction: LexerAction): LexerActionExecutor { if (!lexerActionExecutor) { return new LexerActionExecutor([lexerAction]); } - let lexerActions = lexerActionExecutor._lexerActions.slice(0); + const lexerActions = lexerActionExecutor._lexerActions.slice(0); lexerActions.push(lexerAction); return new LexerActionExecutor(lexerActions); } @@ -127,7 +128,7 @@ export class LexerActionExecutor { * Gets the lexer actions to be executed by this executor. * @returns The lexer actions to be executed by this executor. */ - @NotNull + get lexerActions(): LexerAction[] { return this._lexerActions; } @@ -151,13 +152,13 @@ export class LexerActionExecutor { * {@link IntStream#seek} to set the `input` position to the beginning * of the token. */ - public execute(@NotNull lexer: Lexer, input: CharStream, startIndex: number): void { - let requiresSeek: boolean = false; - let stopIndex: number = input.index; + public execute(lexer: Lexer, input: CharStream, startIndex: number): void { + let requiresSeek = false; + const stopIndex: number = input.index; try { for (let lexerAction of this._lexerActions) { if (lexerAction instanceof LexerIndexedCustomAction) { - let offset: number = lexerAction.offset; + const offset: number = lexerAction.offset; input.seek(startIndex + offset); lexerAction = lexerAction.action; requiresSeek = (startIndex + offset) !== stopIndex; @@ -175,13 +176,13 @@ export class LexerActionExecutor { } } - @Override + // @Override public hashCode(): number { return this.cachedHashCode; } - @Override - public equals(obj: any): boolean { + // @Override + public equals(obj: object): boolean { if (obj === this) { return true; } else if (!(obj instanceof LexerActionExecutor)) { diff --git a/src/atn/LexerActionType.ts b/runtime/typescript/src/atn/LexerActionType.ts similarity index 100% rename from src/atn/LexerActionType.ts rename to runtime/typescript/src/atn/LexerActionType.ts diff --git a/src/atn/LexerChannelAction.ts b/runtime/typescript/src/atn/LexerChannelAction.ts similarity index 82% rename from src/atn/LexerChannelAction.ts rename to runtime/typescript/src/atn/LexerChannelAction.ts index e2df05e0..ef09ab17 100644 --- a/src/atn/LexerChannelAction.ts +++ b/runtime/typescript/src/atn/LexerChannelAction.ts @@ -5,11 +5,12 @@ // ConvertTo-TS run at 2016-10-04T11:26:29.5634388-07:00 -import { Lexer } from "../Lexer"; -import { LexerAction } from "./LexerAction"; -import { LexerActionType } from "./LexerActionType"; -import { MurmurHash } from "../misc/MurmurHash"; -import { NotNull, Override } from "../Decorators"; +import { + Lexer, + LexerAction, + LexerActionType, + MurmurHash +} from "../internal"; /** * Implements the `channel` lexer action by calling @@ -42,7 +43,7 @@ export class LexerChannelAction implements LexerAction { * {@inheritDoc} * @returns This method returns {@link LexerActionType#CHANNEL}. */ - @Override + // @Override get actionType(): LexerActionType { return LexerActionType.CHANNEL; } @@ -51,7 +52,7 @@ export class LexerChannelAction implements LexerAction { * {@inheritDoc} * @returns This method returns `false`. */ - @Override + // @Override get isPositionDependent(): boolean { return false; } @@ -62,12 +63,12 @@ export class LexerChannelAction implements LexerAction { * This action is implemented by calling {@link Lexer#setChannel} with the * value provided by {@link #getChannel}. */ - @Override - public execute(@NotNull lexer: Lexer): void { + // @Override + public execute(lexer: Lexer): void { lexer.channel = this._channel; } - @Override + // @Override public hashCode(): number { let hash: number = MurmurHash.initialize(); hash = MurmurHash.update(hash, this.actionType); @@ -75,8 +76,8 @@ export class LexerChannelAction implements LexerAction { return MurmurHash.finish(hash, 2); } - @Override - public equals(obj: any): boolean { + // @Override + public equals(obj: object): boolean { if (obj === this) { return true; } else if (!(obj instanceof LexerChannelAction)) { @@ -86,7 +87,7 @@ export class LexerChannelAction implements LexerAction { return this._channel === obj._channel; } - @Override + // @Override public toString(): string { return `channel(${this._channel})`; } diff --git a/src/atn/LexerCustomAction.ts b/runtime/typescript/src/atn/LexerCustomAction.ts similarity index 89% rename from src/atn/LexerCustomAction.ts rename to runtime/typescript/src/atn/LexerCustomAction.ts index 02578690..40575a13 100644 --- a/src/atn/LexerCustomAction.ts +++ b/runtime/typescript/src/atn/LexerCustomAction.ts @@ -5,11 +5,12 @@ // ConvertTo-TS run at 2016-10-04T11:26:29.6567992-07:00 -import { Lexer } from "../Lexer"; -import { LexerAction } from "./LexerAction"; -import { LexerActionType } from "./LexerActionType"; -import { MurmurHash } from "../misc/MurmurHash"; -import { NotNull, Override } from "../Decorators"; +import { + Lexer, + LexerAction, + LexerActionType, + MurmurHash +} from "../internal"; /** * Executes a custom lexer action by calling {@link Recognizer#action} with the @@ -65,7 +66,7 @@ export class LexerCustomAction implements LexerAction { * * @returns This method returns {@link LexerActionType#CUSTOM}. */ - @Override + // @Override get actionType(): LexerActionType { return LexerActionType.CUSTOM; } @@ -81,7 +82,7 @@ export class LexerCustomAction implements LexerAction { * * @returns This method returns `true`. */ - @Override + // @Override get isPositionDependent(): boolean { return true; } @@ -92,12 +93,12 @@ export class LexerCustomAction implements LexerAction { * Custom actions are implemented by calling {@link Lexer#action} with the * appropriate rule and action indexes. */ - @Override - public execute(@NotNull lexer: Lexer): void { + // @Override + public execute(lexer: Lexer): void { lexer.action(undefined, this._ruleIndex, this._actionIndex); } - @Override + // @Override public hashCode(): number { let hash: number = MurmurHash.initialize(); hash = MurmurHash.update(hash, this.actionType); @@ -106,8 +107,8 @@ export class LexerCustomAction implements LexerAction { return MurmurHash.finish(hash, 3); } - @Override - public equals(obj: any): boolean { + // @Override + public equals(obj: object): boolean { if (obj === this) { return true; } else if (!(obj instanceof LexerCustomAction)) { diff --git a/src/atn/LexerIndexedCustomAction.ts b/runtime/typescript/src/atn/LexerIndexedCustomAction.ts similarity index 88% rename from src/atn/LexerIndexedCustomAction.ts rename to runtime/typescript/src/atn/LexerIndexedCustomAction.ts index 3afac1ac..3fd89d08 100644 --- a/src/atn/LexerIndexedCustomAction.ts +++ b/runtime/typescript/src/atn/LexerIndexedCustomAction.ts @@ -5,11 +5,12 @@ // ConvertTo-TS run at 2016-10-04T11:26:29.7613038-07:00 -import { Lexer } from "../Lexer"; -import { LexerAction } from "./LexerAction"; -import { LexerActionType } from "./LexerActionType"; -import { MurmurHash } from "../misc/MurmurHash"; -import { NotNull, Override } from "../Decorators"; +import { + Lexer, + LexerAction, + LexerActionType, + MurmurHash +} from "../internal"; /** * This implementation of {@link LexerAction} is used for tracking input offsets @@ -41,7 +42,7 @@ export class LexerIndexedCustomAction implements LexerAction { * @param action The lexer action to execute at a particular offset in the * input {@link CharStream}. */ - constructor(offset: number, @NotNull action: LexerAction) { + constructor(offset: number, action: LexerAction) { this._offset = offset; this._action = action; } @@ -63,7 +64,7 @@ export class LexerIndexedCustomAction implements LexerAction { * * @returns A {@link LexerAction} object which executes the lexer action. */ - @NotNull + get action(): LexerAction { return this._action; } @@ -74,7 +75,7 @@ export class LexerIndexedCustomAction implements LexerAction { * @returns This method returns the result of calling {@link #getActionType} * on the {@link LexerAction} returned by {@link #getAction}. */ - @Override + // @Override get actionType(): LexerActionType { return this._action.actionType; } @@ -83,7 +84,7 @@ export class LexerIndexedCustomAction implements LexerAction { * {@inheritDoc} * @returns This method returns `true`. */ - @Override + // @Override get isPositionDependent(): boolean { return true; } @@ -94,13 +95,13 @@ export class LexerIndexedCustomAction implements LexerAction { * This method calls {@link #execute} on the result of {@link #getAction} * using the provided `lexer`. */ - @Override + // @Override public execute(lexer: Lexer): void { // assume the input stream position was properly set by the calling code this._action.execute(lexer); } - @Override + // @Override public hashCode(): number { let hash: number = MurmurHash.initialize(); hash = MurmurHash.update(hash, this._offset); @@ -108,8 +109,8 @@ export class LexerIndexedCustomAction implements LexerAction { return MurmurHash.finish(hash, 2); } - @Override - public equals(obj: any): boolean { + // @Override + public equals(obj: object): boolean { if (obj === this) { return true; } else if (!(obj instanceof LexerIndexedCustomAction)) { diff --git a/src/atn/LexerModeAction.ts b/runtime/typescript/src/atn/LexerModeAction.ts similarity index 81% rename from src/atn/LexerModeAction.ts rename to runtime/typescript/src/atn/LexerModeAction.ts index 2ead8acd..86a4f4f6 100644 --- a/src/atn/LexerModeAction.ts +++ b/runtime/typescript/src/atn/LexerModeAction.ts @@ -5,11 +5,12 @@ // ConvertTo-TS run at 2016-10-04T11:26:29.8653427-07:00 -import { Lexer } from "../Lexer"; -import { LexerAction } from "./LexerAction"; -import { LexerActionType } from "./LexerActionType"; -import { MurmurHash } from "../misc/MurmurHash"; -import { NotNull, Override } from "../Decorators"; +import { + Lexer, + LexerAction, + LexerActionType, + MurmurHash +} from "../internal"; /** * Implements the `mode` lexer action by calling {@link Lexer#mode} with @@ -42,7 +43,7 @@ export class LexerModeAction implements LexerAction { * {@inheritDoc} * @returns This method returns {@link LexerActionType#MODE}. */ - @Override + // @Override get actionType(): LexerActionType { return LexerActionType.MODE; } @@ -51,7 +52,7 @@ export class LexerModeAction implements LexerAction { * {@inheritDoc} * @returns This method returns `false`. */ - @Override + // @Override get isPositionDependent(): boolean { return false; } @@ -62,12 +63,12 @@ export class LexerModeAction implements LexerAction { * This action is implemented by calling {@link Lexer#mode} with the * value provided by {@link #getMode}. */ - @Override - public execute(@NotNull lexer: Lexer): void { + // @Override + public execute(lexer: Lexer): void { lexer.mode(this._mode); } - @Override + // @Override public hashCode(): number { let hash: number = MurmurHash.initialize(); hash = MurmurHash.update(hash, this.actionType); @@ -75,8 +76,8 @@ export class LexerModeAction implements LexerAction { return MurmurHash.finish(hash, 2); } - @Override - public equals(obj: any): boolean { + // @Override + public equals(obj: object): boolean { if (obj === this) { return true; } else if (!(obj instanceof LexerModeAction)) { @@ -86,7 +87,7 @@ export class LexerModeAction implements LexerAction { return this._mode === obj._mode; } - @Override + // @Override public toString(): string { return `mode(${this._mode})`; } diff --git a/src/atn/LexerMoreAction.ts b/runtime/typescript/src/atn/LexerMoreAction.ts similarity index 70% rename from src/atn/LexerMoreAction.ts rename to runtime/typescript/src/atn/LexerMoreAction.ts index ffd55093..f2dfbb5d 100644 --- a/src/atn/LexerMoreAction.ts +++ b/runtime/typescript/src/atn/LexerMoreAction.ts @@ -5,11 +5,12 @@ // ConvertTo-TS run at 2016-10-04T11:26:29.9613221-07:00 -import { Lexer } from "../Lexer"; -import { LexerAction } from "./LexerAction"; -import { LexerActionType } from "./LexerActionType"; -import { MurmurHash } from "../misc/MurmurHash"; -import { NotNull, Override } from "../Decorators"; +import { + Lexer, + LexerAction, + LexerActionType, + MurmurHash +} from "../internal"; /** * Implements the `more` lexer action by calling {@link Lexer#more}. @@ -22,6 +23,11 @@ import { NotNull, Override } from "../Decorators"; */ export class LexerMoreAction implements LexerAction { /** + * Provides a singleton instance of this parameterless lexer action. + */ + public static readonly INSTANCE: LexerMoreAction = new LexerMoreAction(); + + /** * Constructs the singleton instance of the lexer `more` command. */ constructor() { @@ -32,7 +38,7 @@ export class LexerMoreAction implements LexerAction { * {@inheritDoc} * @returns This method returns {@link LexerActionType#MORE}. */ - @Override + // @Override get actionType(): LexerActionType { return LexerActionType.MORE; } @@ -41,7 +47,7 @@ export class LexerMoreAction implements LexerAction { * {@inheritDoc} * @returns This method returns `false`. */ - @Override + // @Override get isPositionDependent(): boolean { return false; } @@ -51,32 +57,25 @@ export class LexerMoreAction implements LexerAction { * * This action is implemented by calling {@link Lexer#more}. */ - @Override - public execute(@NotNull lexer: Lexer): void { + // @Override + public execute(lexer: Lexer): void { lexer.more(); } - @Override + // @Override public hashCode(): number { let hash: number = MurmurHash.initialize(); hash = MurmurHash.update(hash, this.actionType); return MurmurHash.finish(hash, 1); } - @Override - public equals(obj: any): boolean { + // @Override + public equals(obj: object): boolean { return obj === this; } - @Override + // @Override public toString(): string { return "more"; } } - -export namespace LexerMoreAction { - /** - * Provides a singleton instance of this parameterless lexer action. - */ - export const INSTANCE: LexerMoreAction = new LexerMoreAction(); -} diff --git a/src/atn/LexerPopModeAction.ts b/runtime/typescript/src/atn/LexerPopModeAction.ts similarity index 70% rename from src/atn/LexerPopModeAction.ts rename to runtime/typescript/src/atn/LexerPopModeAction.ts index 942c9410..a5d59906 100644 --- a/src/atn/LexerPopModeAction.ts +++ b/runtime/typescript/src/atn/LexerPopModeAction.ts @@ -5,11 +5,12 @@ // ConvertTo-TS run at 2016-10-04T11:26:30.0449220-07:00 -import { Lexer } from "../Lexer"; -import { LexerAction } from "./LexerAction"; -import { LexerActionType } from "./LexerActionType"; -import { MurmurHash } from "../misc/MurmurHash"; -import { NotNull, Override } from "../Decorators"; +import { + Lexer, + LexerAction, + LexerActionType, + MurmurHash +} from "../internal"; /** * Implements the `popMode` lexer action by calling {@link Lexer#popMode}. @@ -21,6 +22,8 @@ import { NotNull, Override } from "../Decorators"; * @since 4.2 */ export class LexerPopModeAction implements LexerAction { + public static readonly INSTANCE: LexerPopModeAction = new LexerPopModeAction(); + /** * Constructs the singleton instance of the lexer `popMode` command. */ @@ -32,7 +35,7 @@ export class LexerPopModeAction implements LexerAction { * {@inheritDoc} * @returns This method returns {@link LexerActionType#POP_MODE}. */ - @Override + // @Override get actionType(): LexerActionType { return LexerActionType.POP_MODE; } @@ -41,7 +44,7 @@ export class LexerPopModeAction implements LexerAction { * {@inheritDoc} * @returns This method returns `false`. */ - @Override + // @Override get isPositionDependent(): boolean { return false; } @@ -51,32 +54,27 @@ export class LexerPopModeAction implements LexerAction { * * This action is implemented by calling {@link Lexer#popMode}. */ - @Override - public execute(@NotNull lexer: Lexer): void { + // @Override + public execute(lexer: Lexer): void { lexer.popMode(); } - @Override + // @Override public hashCode(): number { let hash: number = MurmurHash.initialize(); hash = MurmurHash.update(hash, this.actionType); return MurmurHash.finish(hash, 1); } - @Override - public equals(obj: any): boolean { + // @Override + public equals(obj: object): boolean { return obj === this; } - @Override + // @Override public toString(): string { return "popMode"; } } -export namespace LexerPopModeAction { - /** - * Provides a singleton instance of this parameterless lexer action. - */ - export const INSTANCE: LexerPopModeAction = new LexerPopModeAction(); -} + diff --git a/src/atn/LexerPushModeAction.ts b/runtime/typescript/src/atn/LexerPushModeAction.ts similarity index 82% rename from src/atn/LexerPushModeAction.ts rename to runtime/typescript/src/atn/LexerPushModeAction.ts index 90b0b287..c5d0a3cd 100644 --- a/src/atn/LexerPushModeAction.ts +++ b/runtime/typescript/src/atn/LexerPushModeAction.ts @@ -5,11 +5,12 @@ // ConvertTo-TS run at 2016-10-04T11:26:30.1378801-07:00 -import { Lexer } from "../Lexer"; -import { LexerAction } from "./LexerAction"; -import { LexerActionType } from "./LexerActionType"; -import { MurmurHash } from "../misc/MurmurHash"; -import { NotNull, Override } from "../Decorators"; +import { + Lexer, + LexerAction, + LexerActionType, + MurmurHash +} from "../internal"; /** * Implements the `pushMode` lexer action by calling @@ -42,7 +43,7 @@ export class LexerPushModeAction implements LexerAction { * {@inheritDoc} * @returns This method returns {@link LexerActionType#PUSH_MODE}. */ - @Override + // @Override get actionType(): LexerActionType { return LexerActionType.PUSH_MODE; } @@ -51,7 +52,7 @@ export class LexerPushModeAction implements LexerAction { * {@inheritDoc} * @returns This method returns `false`. */ - @Override + // @Override get isPositionDependent(): boolean { return false; } @@ -62,12 +63,12 @@ export class LexerPushModeAction implements LexerAction { * This action is implemented by calling {@link Lexer#pushMode} with the * value provided by {@link #getMode}. */ - @Override - public execute(@NotNull lexer: Lexer): void { + // @Override + public execute(lexer: Lexer): void { lexer.pushMode(this._mode); } - @Override + // @Override public hashCode(): number { let hash: number = MurmurHash.initialize(); hash = MurmurHash.update(hash, this.actionType); @@ -75,8 +76,8 @@ export class LexerPushModeAction implements LexerAction { return MurmurHash.finish(hash, 2); } - @Override - public equals(obj: any): boolean { + // @Override + public equals(obj: object): boolean { if (obj === this) { return true; } else if (!(obj instanceof LexerPushModeAction)) { @@ -86,7 +87,7 @@ export class LexerPushModeAction implements LexerAction { return this._mode === obj._mode; } - @Override + // @Override public toString(): string { return `pushMode(${this._mode})`; } diff --git a/src/atn/LexerSkipAction.ts b/runtime/typescript/src/atn/LexerSkipAction.ts similarity index 79% rename from src/atn/LexerSkipAction.ts rename to runtime/typescript/src/atn/LexerSkipAction.ts index f21a6962..8acdd89e 100644 --- a/src/atn/LexerSkipAction.ts +++ b/runtime/typescript/src/atn/LexerSkipAction.ts @@ -5,11 +5,12 @@ // ConvertTo-TS run at 2016-10-04T11:26:30.2324460-07:00 -import { Lexer } from "../Lexer"; -import { LexerAction } from "./LexerAction"; -import { LexerActionType } from "./LexerActionType"; -import { MurmurHash } from "../misc/MurmurHash"; -import { NotNull, Override } from "../Decorators"; +import { + Lexer, + LexerAction, + LexerActionType, + MurmurHash +} from "../internal"; /** * Implements the `skip` lexer action by calling {@link Lexer#skip}. @@ -32,7 +33,7 @@ export class LexerSkipAction implements LexerAction { * {@inheritDoc} * @returns This method returns {@link LexerActionType#SKIP}. */ - @Override + // @Override get actionType(): LexerActionType { return LexerActionType.SKIP; } @@ -41,7 +42,7 @@ export class LexerSkipAction implements LexerAction { * {@inheritDoc} * @returns This method returns `false`. */ - @Override + // @Override get isPositionDependent(): boolean { return false; } @@ -51,24 +52,24 @@ export class LexerSkipAction implements LexerAction { * * This action is implemented by calling {@link Lexer#skip}. */ - @Override - public execute(@NotNull lexer: Lexer): void { + // @Override + public execute(lexer: Lexer): void { lexer.skip(); } - @Override + // @Override public hashCode(): number { let hash: number = MurmurHash.initialize(); hash = MurmurHash.update(hash, this.actionType); return MurmurHash.finish(hash, 1); } - @Override - public equals(obj: any): boolean { + // @Override + public equals(obj: object): boolean { return obj === this; } - @Override + // @Override public toString(): string { return "skip"; } diff --git a/src/atn/LexerTypeAction.ts b/runtime/typescript/src/atn/LexerTypeAction.ts similarity index 81% rename from src/atn/LexerTypeAction.ts rename to runtime/typescript/src/atn/LexerTypeAction.ts index 881b0ad2..d36ab84d 100644 --- a/src/atn/LexerTypeAction.ts +++ b/runtime/typescript/src/atn/LexerTypeAction.ts @@ -5,11 +5,12 @@ // ConvertTo-TS run at 2016-10-04T11:26:30.3204839-07:00 -import { Lexer } from "../Lexer"; -import { LexerAction } from "./LexerAction"; -import { LexerActionType } from "./LexerActionType"; -import { MurmurHash } from "../misc/MurmurHash"; -import { NotNull, Override } from "../Decorators"; +import { + Lexer, + LexerAction, + LexerActionType, + MurmurHash +} from "../internal"; /** * Implements the `type` lexer action by setting `Lexer.type` @@ -41,7 +42,7 @@ export class LexerTypeAction implements LexerAction { * {@inheritDoc} * @returns This method returns {@link LexerActionType#TYPE}. */ - @Override + // @Override get actionType(): LexerActionType { return LexerActionType.TYPE; } @@ -50,7 +51,7 @@ export class LexerTypeAction implements LexerAction { * {@inheritDoc} * @returns This method returns `false`. */ - @Override + // @Override get isPositionDependent(): boolean { return false; } @@ -61,12 +62,12 @@ export class LexerTypeAction implements LexerAction { * This action is implemented by setting `Lexer.type` with the * value provided by `type`. */ - @Override - public execute(@NotNull lexer: Lexer): void { + // @Override + public execute(lexer: Lexer): void { lexer.type = this._type; } - @Override + // @Override public hashCode(): number { let hash: number = MurmurHash.initialize(); hash = MurmurHash.update(hash, this.actionType); @@ -74,8 +75,8 @@ export class LexerTypeAction implements LexerAction { return MurmurHash.finish(hash, 2); } - @Override - public equals(obj: any): boolean { + // @Override + public equals(obj: object): boolean { if (obj === this) { return true; } else if (!(obj instanceof LexerTypeAction)) { @@ -85,7 +86,7 @@ export class LexerTypeAction implements LexerAction { return this._type === obj._type; } - @Override + // @Override public toString(): string { return `type(${this._type})`; } diff --git a/src/atn/LookaheadEventInfo.ts b/runtime/typescript/src/atn/LookaheadEventInfo.ts similarity index 88% rename from src/atn/LookaheadEventInfo.ts rename to runtime/typescript/src/atn/LookaheadEventInfo.ts index 86d323d2..c9240fc1 100644 --- a/src/atn/LookaheadEventInfo.ts +++ b/runtime/typescript/src/atn/LookaheadEventInfo.ts @@ -5,10 +5,11 @@ // ConvertTo-TS run at 2016-10-04T11:26:30.6852565-07:00 -import { DecisionEventInfo } from "./DecisionEventInfo"; -import { NotNull } from "../Decorators"; -import { SimulatorState } from "./SimulatorState"; -import { TokenStream } from "../TokenStream"; +import { + DecisionEventInfo, + SimulatorState, + TokenStream +} from "../internal"; /** * This class represents profiling event information for tracking the lookahead @@ -43,7 +44,7 @@ export class LookaheadEventInfo extends DecisionEventInfo { decision: number, state: SimulatorState | undefined, predictedAlt: number, - @NotNull input: TokenStream, + input: TokenStream, startIndex: number, stopIndex: number, fullCtx: boolean) { diff --git a/src/atn/LoopEndState.ts b/runtime/typescript/src/atn/LoopEndState.ts similarity index 75% rename from src/atn/LoopEndState.ts rename to runtime/typescript/src/atn/LoopEndState.ts index 8cdd815a..c669b909 100644 --- a/src/atn/LoopEndState.ts +++ b/runtime/typescript/src/atn/LoopEndState.ts @@ -5,15 +5,16 @@ // ConvertTo-TS run at 2016-10-04T11:26:30.7737978-07:00 -import { ATNState } from "./ATNState"; -import { ATNStateType } from "./ATNStateType"; -import { Override } from "../Decorators"; +import { + ATNState, + ATNStateType +} from "../internal"; /** Mark the end of a * or + loop. */ export class LoopEndState extends ATNState { public loopBackState: ATNState; - @Override + // @Override get stateType(): ATNStateType { return ATNStateType.LOOP_END; } diff --git a/src/atn/NotSetTransition.ts b/runtime/typescript/src/atn/NotSetTransition.ts similarity index 63% rename from src/atn/NotSetTransition.ts rename to runtime/typescript/src/atn/NotSetTransition.ts index 2449af66..90c1bd69 100644 --- a/src/atn/NotSetTransition.ts +++ b/runtime/typescript/src/atn/NotSetTransition.ts @@ -5,31 +5,32 @@ // ConvertTo-TS run at 2016-10-04T11:26:30.8483617-07:00 -import { ATNState } from "./ATNState"; -import { IntervalSet } from "../misc/IntervalSet"; -import { Override, NotNull, Nullable } from "../Decorators"; -import { SetTransition } from "./SetTransition"; -import { Transition } from "./Transition"; -import { TransitionType } from "./TransitionType"; +import { + ATNState, + IntervalSet, + SetTransition, + Transition, + TransitionType +} from "../internal"; export class NotSetTransition extends SetTransition { - constructor(@NotNull target: ATNState, @Nullable set: IntervalSet) { + constructor(target: ATNState, set: IntervalSet | undefined) { super(target, set); } - @Override + // @Override get serializationType(): TransitionType { return TransitionType.NOT_SET; } - @Override + // @Override public matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean { return symbol >= minVocabSymbol && symbol <= maxVocabSymbol && !super.matches(symbol, minVocabSymbol, maxVocabSymbol); } - @Override + // @Override public toString(): string { return "~" + super.toString(); } diff --git a/src/atn/OrderedATNConfigSet.ts b/runtime/typescript/src/atn/OrderedATNConfigSet.ts similarity index 71% rename from src/atn/OrderedATNConfigSet.ts rename to runtime/typescript/src/atn/OrderedATNConfigSet.ts index 1d4b7611..41043438 100644 --- a/src/atn/OrderedATNConfigSet.ts +++ b/runtime/typescript/src/atn/OrderedATNConfigSet.ts @@ -5,9 +5,10 @@ // ConvertTo-TS run at 2016-10-04T11:26:30.9444556-07:00 -import { ATNConfig } from "./ATNConfig"; -import { ATNConfigSet } from "./ATNConfigSet"; -import { Override } from "../Decorators"; +import { + ATNConfig, + ATNConfigSet +} from "../internal"; /** * @@ -25,9 +26,9 @@ export class OrderedATNConfigSet extends ATNConfigSet { } } - @Override + // @Override public clone(readonly: boolean): ATNConfigSet { - let copy: OrderedATNConfigSet = new OrderedATNConfigSet(this, readonly); + const copy: OrderedATNConfigSet = new OrderedATNConfigSet(this, readonly); if (!readonly && this.isReadOnly) { copy.addAll(this); } @@ -35,14 +36,14 @@ export class OrderedATNConfigSet extends ATNConfigSet { return copy; } - @Override - protected getKey(e: ATNConfig): { state: number, alt: number } { + // @Override + protected getKey(e: ATNConfig): { state: number; alt: number } { // This is a specially crafted key to ensure configurations are only merged if they are equal return { state: 0, alt: e.hashCode() }; } - @Override - protected canMerge(left: ATNConfig, leftKey: { state: number, alt: number }, right: ATNConfig): boolean { + // @Override + protected canMerge(left: ATNConfig, leftKey: { state: number; alt: number }, right: ATNConfig): boolean { return left.equals(right); } diff --git a/src/atn/ParseInfo.ts b/runtime/typescript/src/atn/ParseInfo.ts similarity index 72% rename from src/atn/ParseInfo.ts rename to runtime/typescript/src/atn/ParseInfo.ts index 9dd48df4..2fb93a8f 100644 --- a/src/atn/ParseInfo.ts +++ b/runtime/typescript/src/atn/ParseInfo.ts @@ -5,10 +5,11 @@ // ConvertTo-TS run at 2016-10-04T11:26:31.0349605-07:00 -import { DecisionInfo } from "./DecisionInfo"; -import { DFA } from "../dfa/DFA"; -import { NotNull } from "../Decorators"; -import { ProfilingATNSimulator } from "./ProfilingATNSimulator"; +import { + DFA, + DecisionInfo, + ProfilingATNSimulator +} from "../internal"; /** * This class provides access to specific and aggregate statistics gathered @@ -19,7 +20,7 @@ import { ProfilingATNSimulator } from "./ProfilingATNSimulator"; export class ParseInfo { protected atnSimulator: ProfilingATNSimulator; - constructor(@NotNull atnSimulator: ProfilingATNSimulator) { + constructor(atnSimulator: ProfilingATNSimulator) { this.atnSimulator = atnSimulator; } @@ -30,7 +31,7 @@ export class ParseInfo { * @returns An array of {@link DecisionInfo} instances, indexed by decision * number. */ - @NotNull + public getDecisionInfo(): DecisionInfo[] { return this.atnSimulator.getDecisionInfo(); } @@ -43,12 +44,12 @@ export class ParseInfo { * @returns A list of decision numbers which required one or more * full-context predictions during parsing. */ - @NotNull + public getLLDecisions(): number[] { - let decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo(); - let LL: number[] = []; + const decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo(); + const LL: number[] = []; for (let i = 0; i < decisions.length; i++) { - let fallBack: number = decisions[i].LL_Fallback; + const fallBack: number = decisions[i].LL_Fallback; if (fallBack > 0) { LL.push(i); } @@ -63,9 +64,9 @@ export class ParseInfo { * {@link DecisionInfo#timeInPrediction} for all decisions. */ public getTotalTimeInPrediction(): number { - let decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo(); - let t: number = 0; - for (let decision of decisions) { + const decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo(); + let t = 0; + for (const decision of decisions) { t += decision.timeInPrediction; } @@ -78,9 +79,9 @@ export class ParseInfo { * {@link DecisionInfo#SLL_TotalLook} for all decisions. */ public getTotalSLLLookaheadOps(): number { - let decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo(); - let k: number = 0; - for (let decision of decisions) { + const decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo(); + let k = 0; + for (const decision of decisions) { k += decision.SLL_TotalLook; } @@ -93,9 +94,9 @@ export class ParseInfo { * {@link DecisionInfo#LL_TotalLook} for all decisions. */ public getTotalLLLookaheadOps(): number { - let decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo(); - let k: number = 0; - for (let decision of decisions) { + const decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo(); + let k = 0; + for (const decision of decisions) { k += decision.LL_TotalLook; } @@ -107,9 +108,9 @@ export class ParseInfo { * across all decisions made during parsing. */ public getTotalSLLATNLookaheadOps(): number { - let decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo(); - let k: number = 0; - for (let decision of decisions) { + const decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo(); + let k = 0; + for (const decision of decisions) { k += decision.SLL_ATNTransitions; } @@ -121,9 +122,9 @@ export class ParseInfo { * across all decisions made during parsing. */ public getTotalLLATNLookaheadOps(): number { - let decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo(); - let k: number = 0; - for (let decision of decisions) { + const decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo(); + let k = 0; + for (const decision of decisions) { k += decision.LL_ATNTransitions; } @@ -138,9 +139,9 @@ export class ParseInfo { * {@link #getTotalLLATNLookaheadOps}. */ public getTotalATNLookaheadOps(): number { - let decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo(); - let k: number = 0; - for (let decision of decisions) { + const decisions: DecisionInfo[] = this.atnSimulator.getDecisionInfo(); + let k = 0; + for (const decision of decisions) { k += decision.SLL_ATNTransitions; k += decision.LL_ATNTransitions; } @@ -162,11 +163,11 @@ export class ParseInfo { public getDFASize(decision?: number): number { if (decision) { - let decisionToDFA: DFA = this.atnSimulator.atn.decisionToDFA[decision]; + const decisionToDFA: DFA = this.atnSimulator.atn.decisionToDFA[decision]; return decisionToDFA.states.size; } else { - let n: number = 0; - let decisionToDFA: DFA[] = this.atnSimulator.atn.decisionToDFA; + let n = 0; + const decisionToDFA: DFA[] = this.atnSimulator.atn.decisionToDFA; for (let i = 0; i < decisionToDFA.length; i++) { n += this.getDFASize(i); } diff --git a/src/atn/ParserATNSimulator.ts b/runtime/typescript/src/atn/ParserATNSimulator.ts similarity index 78% rename from src/atn/ParserATNSimulator.ts rename to runtime/typescript/src/atn/ParserATNSimulator.ts index 8bf7f41a..0b072a3d 100644 --- a/src/atn/ParserATNSimulator.ts +++ b/runtime/typescript/src/atn/ParserATNSimulator.ts @@ -5,53 +5,54 @@ // ConvertTo-TS run at 2016-10-04T11:26:31.1989835-07:00 -import { AcceptStateInfo } from "../dfa/AcceptStateInfo"; -import { ActionTransition } from "./ActionTransition"; -import { Array2DHashSet } from "../misc/Array2DHashSet"; -import { Arrays } from "../misc/Arrays"; -import { ATN } from "./ATN"; -import { ATNConfig } from "./ATNConfig"; -import { ATNConfigSet } from "./ATNConfigSet"; -import { ATNSimulator } from "./ATNSimulator"; -import { ATNState } from "./ATNState"; -import { ATNStateType } from "./ATNStateType"; -import { AtomTransition } from "./AtomTransition"; -import { BitSet } from "../misc/BitSet"; -import { ConflictInfo } from "./ConflictInfo"; -import { DecisionState } from "./DecisionState"; -import { DFA } from "../dfa/DFA"; -import { DFAState } from "../dfa/DFAState"; -import { EpsilonTransition } from "./EpsilonTransition"; -import { IntegerList } from "../misc/IntegerList"; -import { Interval } from "../misc/Interval"; -import { IntStream } from "../IntStream"; -import { NotNull, Nullable, Override } from "../Decorators"; -import { NotSetTransition } from "./NotSetTransition"; -import { NoViableAltException } from "../NoViableAltException"; -import { ObjectEqualityComparator } from "../misc/ObjectEqualityComparator"; -import { Parser } from "../Parser"; -import { ParserRuleContext } from "../ParserRuleContext"; -import { PrecedencePredicateTransition } from "./PrecedencePredicateTransition"; -import { PredicateTransition } from "./PredicateTransition"; -import { PredictionContext } from "./PredictionContext"; -import { PredictionContextCache } from "./PredictionContextCache"; -import { PredictionMode } from "./PredictionMode"; -import { RuleContext } from "../RuleContext"; -import { RuleStopState } from "./RuleStopState"; -import { RuleTransition } from "./RuleTransition"; -import { SemanticContext } from "./SemanticContext"; -import { SetTransition } from "./SetTransition"; -import { SimulatorState } from "./SimulatorState"; -import { StarLoopEntryState } from "./StarLoopEntryState"; -import { Token } from "../Token"; -import { TokenStream } from "../TokenStream"; -import { Transition } from "./Transition"; -import { TransitionType } from "./TransitionType"; -import { Vocabulary } from "../Vocabulary"; -import { VocabularyImpl } from "../VocabularyImpl"; - +import * as Arrays from "../internal"; import * as assert from "assert"; +import { + ATN, + ATNConfig, + ATNConfigSet, + ATNSimulator, + ATNState, + ATNStateType, + AcceptStateInfo, + ActionTransition, + Array2DHashSet, + AtomTransition, + BitSet, + ConflictInfo, + DFA, + DFAState, + DecisionState, + EpsilonTransition, + IntStream, + IntegerList, + Interval, + NoViableAltException, + NotSetTransition, + ObjectEqualityComparator, + Parser, + ParserRuleContext, + PrecedencePredicateTransition, + PredicateTransition, + PredictionContext, + PredictionContextCache, + PredictionMode, + RuleContext, + RuleStopState, + RuleTransition, + SemanticContext, + SetTransition, + SimulatorState, + StarLoopEntryState, + Token, + TokenStream, + Transition, + TransitionType, + Vocabulary, + VocabularyImpl +} from "../internal"; + const MAX_SHORT_VALUE = 0xFFFF; const MIN_INTEGER_VALUE = -((1 << 31) >>> 0); @@ -255,14 +256,14 @@ const MIN_INTEGER_VALUE = -((1 << 31) >>> 0); * the input. */ export class ParserATNSimulator extends ATNSimulator { - public static debug: boolean = false; - public static dfa_debug: boolean = false; - public static retry_debug: boolean = false; + public static debug = false; + public static dfa_debug = false; + public static retry_debug = false; + - @NotNull private predictionMode: PredictionMode = PredictionMode.LL; - public force_global_context: boolean = false; - public always_try_local_context: boolean = true; + public force_global_context = false; + public always_try_local_context = true; /** * Determines whether the DFA is used for full-context predictions. When @@ -277,12 +278,12 @@ export class ParserATNSimulator extends ATNSimulator { * * The default value is `false`. */ - public enable_global_context_dfa: boolean = false; - public optimize_unique_closure: boolean = true; - public optimize_ll1: boolean = true; - public optimize_tail_calls: boolean = true; - public tail_call_preserves_sll: boolean = true; - public treat_sllk1_conflict_as_ambiguity: boolean = false; + public enable_global_context_dfa = false; + public optimize_unique_closure = true; + public optimize_ll1 = true; + public optimize_tail_calls = true; + public tail_call_preserves_sll = true; + public treat_sllk1_conflict_as_ambiguity = false; protected _parser: Parser; @@ -295,7 +296,7 @@ export class ParserATNSimulator extends ATNSimulator { * to `false` enables additional internal optimizations which may lose * this information. */ - public reportAmbiguities: boolean = false; + public reportAmbiguities = false; /** By default we do full context-sensitive LL(*) parsing not * Strong LL(*) parsing. If we fail with Strong LL(*) we @@ -303,25 +304,25 @@ export class ParserATNSimulator extends ATNSimulator { * when closure operations fall off the end of the rule that * holds the decision were evaluating. */ - protected userWantsCtxSensitive: boolean = true; + protected userWantsCtxSensitive = true; private dfa?: DFA; - constructor(@NotNull atn: ATN, parser: Parser) { + constructor(atn: ATN, parser: Parser) { super(atn); this._parser = parser; } - @NotNull + public getPredictionMode(): PredictionMode { return this.predictionMode; } - public setPredictionMode(@NotNull predictionMode: PredictionMode): void { + public setPredictionMode(predictionMode: PredictionMode): void { this.predictionMode = predictionMode; } - @Override + // @Override public reset(): void { // intentionally empty } @@ -329,7 +330,7 @@ export class ParserATNSimulator extends ATNSimulator { public adaptivePredict(/*@NotNull*/ input: TokenStream, decision: number, outerContext: ParserRuleContext | undefined): number; public adaptivePredict(/*@NotNull*/ input: TokenStream, decision: number, outerContext: ParserRuleContext | undefined, useContext: boolean): number; public adaptivePredict( - @NotNull input: TokenStream, + input: TokenStream, decision: number, outerContext: ParserRuleContext | undefined, useContext?: boolean): number { @@ -337,13 +338,13 @@ export class ParserATNSimulator extends ATNSimulator { useContext = false; } - let dfa: DFA = this.atn.decisionToDFA[decision]; + const dfa: DFA = this.atn.decisionToDFA[decision]; assert(dfa != null); if (this.optimize_ll1 && !dfa.isPrecedenceDfa && !dfa.isEmpty) { - let ll_1: number = input.LA(1); + const ll_1: number = input.LA(1); if (ll_1 >= 0 && ll_1 <= 0xFFFF) { - let key: number = ((decision << 16) >>> 0) + ll_1; - let alt: number | undefined = this.atn.LL1Table.get(key); + const key: number = ((decision << 16) >>> 0) + ll_1; + const alt: number | undefined = this.atn.LL1Table.get(key); if (alt != null) { return alt; } @@ -382,10 +383,10 @@ export class ParserATNSimulator extends ATNSimulator { state = this.computeStartState(dfa, outerContext, useContext); } - let m: number = input.mark(); - let index: number = input.index; + const m: number = input.mark(); + const index: number = input.index; try { - let alt: number = this.execDFA(dfa, input, index, state); + const alt: number = this.execDFA(dfa, input, index, state); if (ParserATNSimulator.debug) { console.log("DFA after predictATN: " + dfa.toString(this._parser.vocabulary, this._parser.ruleNames)); } @@ -399,16 +400,16 @@ export class ParserATNSimulator extends ATNSimulator { } protected getStartState( - @NotNull dfa: DFA, - @NotNull input: TokenStream, - @NotNull outerContext: ParserRuleContext, + dfa: DFA, + input: TokenStream, + outerContext: ParserRuleContext, useContext: boolean): SimulatorState | undefined { if (!useContext) { if (dfa.isPrecedenceDfa) { // the start state for a precedence DFA depends on the current // parser precedence, and is provided by a DFA method. - let state: DFAState | undefined = dfa.getPrecedenceStartState(this._parser.precedence, false); + const state: DFAState | undefined = dfa.getPrecedenceStartState(this._parser.precedence, false); if (state == null) { return undefined; } @@ -457,10 +458,10 @@ export class ParserATNSimulator extends ATNSimulator { } protected execDFA( - @NotNull dfa: DFA, - @NotNull input: TokenStream, startIndex: number, - @NotNull state: SimulatorState): number { - let outerContext: ParserRuleContext = state.outerContext; + dfa: DFA, + input: TokenStream, startIndex: number, + state: SimulatorState): number { + const outerContext: ParserRuleContext = state.outerContext; if (ParserATNSimulator.dfa_debug) { console.log("DFA decision " + dfa.decision + " exec LA(1)==" + this.getLookaheadName(input) + @@ -488,7 +489,7 @@ export class ParserATNSimulator extends ATNSimulator { if (next == null) { // fail over to ATN - let initialState: SimulatorState = new SimulatorState(state.outerContext, s, state.useContext, remainingOuterContext); + const initialState: SimulatorState = new SimulatorState(state.outerContext, s, state.useContext, remainingOuterContext); return this.execATN(dfa, input, startIndex, initialState); } @@ -521,20 +522,21 @@ export class ParserATNSimulator extends ATNSimulator { assert(!this.isAcceptState(s, state.useContext)); // if no edge, pop over to ATN interpreter, update DFA and return - let target: DFAState | undefined = this.getExistingTargetState(s, t); + const target: DFAState | undefined = this.getExistingTargetState(s, t); if (target == null) { if (ParserATNSimulator.dfa_debug && t >= 0) { console.log("no edge for " + this._parser.vocabulary.getDisplayName(t)); } let alt: number; if (ParserATNSimulator.dfa_debug) { - let interval: Interval = Interval.of(startIndex, this._parser.inputStream.index); + const interval: Interval = Interval.of(startIndex, this._parser.inputStream.index); console.log("ATN exec upon " + this._parser.inputStream.getText(interval) + " at DFA state " + s.stateNumber); } - let initialState: SimulatorState = new SimulatorState(outerContext, s, state.useContext, remainingOuterContext); + const initialState: SimulatorState = new SimulatorState(outerContext, s, state.useContext, remainingOuterContext); + // eslint-disable-next-line prefer-const alt = this.execATN(dfa, input, startIndex, initialState); if (ParserATNSimulator.dfa_debug) { console.log("back from DFA update, alt=" + alt + ", dfa=\n" + dfa.toString(this._parser.vocabulary, this._parser.ruleNames)); @@ -548,7 +550,7 @@ export class ParserATNSimulator extends ATNSimulator { return alt; // we've updated DFA, exec'd action, and have our deepest answer } else if (target === ATNSimulator.ERROR) { - let errorState: SimulatorState = new SimulatorState(outerContext, s, state.useContext, remainingOuterContext); + const errorState: SimulatorState = new SimulatorState(outerContext, s, state.useContext, remainingOuterContext); return this.handleNoViableAlt(input, startIndex, errorState); } s = target; @@ -557,10 +559,10 @@ export class ParserATNSimulator extends ATNSimulator { t = input.LA(1); } } -// if ( acceptState==null ) { -// if ( debug ) System.out.println("!!! no viable alt in dfa"); -// return -1; -// } + // if ( acceptState==null ) { + // if ( debug ) System.out.println("!!! no viable alt in dfa"); + // return -1; + // } if (!state.useContext && s.configs.conflictInfo != null) { if (dfa.atnStartState instanceof DecisionState) { @@ -579,9 +581,9 @@ export class ParserATNSimulator extends ATNSimulator { // disambiguating or validating predicates to evaluate which allow an // immediate decision let conflictingAlts: BitSet | undefined; - let predicates: DFAState.PredPrediction[] | undefined = s.predicates; + const predicates: DFAState.PredPrediction[] | undefined = s.predicates; if (predicates != null) { - let conflictIndex: number = input.index; + const conflictIndex: number = input.index; if (conflictIndex !== startIndex) { input.seek(startIndex); } @@ -599,7 +601,7 @@ export class ParserATNSimulator extends ATNSimulator { } if (this.reportAmbiguities) { - let conflictState: SimulatorState = new SimulatorState(outerContext, s, state.useContext, remainingOuterContext); + const conflictState: SimulatorState = new SimulatorState(outerContext, s, state.useContext, remainingOuterContext); this.reportAttemptingFullContext(dfa, conflictingAlts, conflictState, startIndex, input.index); } @@ -611,30 +613,30 @@ export class ParserATNSimulator extends ATNSimulator { // Before jumping to prediction, check to see if there are // disambiguating or validating predicates to evaluate - let predicates: DFAState.PredPrediction[] | undefined = s.predicates; + const predicates: DFAState.PredPrediction[] | undefined = s.predicates; if (predicates != null) { - let stopIndex: number = input.index; + const stopIndex: number = input.index; if (startIndex !== stopIndex) { input.seek(startIndex); } - let alts: BitSet = this.evalSemanticContext(predicates, outerContext, this.reportAmbiguities && this.predictionMode === PredictionMode.LL_EXACT_AMBIG_DETECTION); + const alts: BitSet = this.evalSemanticContext(predicates, outerContext, this.reportAmbiguities && this.predictionMode === PredictionMode.LL_EXACT_AMBIG_DETECTION); switch (alts.cardinality()) { - case 0: - throw this.noViableAlt(input, outerContext, s.configs, startIndex); + case 0: + throw this.noViableAlt(input, outerContext, s.configs, startIndex); - case 1: - return alts.nextSetBit(0); + case 1: + return alts.nextSetBit(0); - default: - // report ambiguity after predicate evaluation to make sure the correct - // set of ambig alts is reported. - if (startIndex !== stopIndex) { - input.seek(stopIndex); - } + default: + // report ambiguity after predicate evaluation to make sure the correct + // set of ambig alts is reported. + if (startIndex !== stopIndex) { + input.seek(stopIndex); + } - this.reportAmbiguity(dfa, s, startIndex, stopIndex, s.configs.isExactConflict, alts, s.configs); - return alts.nextSetBit(0); + this.reportAmbiguity(dfa, s, startIndex, stopIndex, s.configs.isExactConflict, alts, s.configs); + return alts.nextSetBit(0); } } @@ -729,29 +731,29 @@ export class ParserATNSimulator extends ATNSimulator { * TODO: greedy + those */ protected execATN( - @NotNull dfa: DFA, - @NotNull input: TokenStream, startIndex: number, - @NotNull initialState: SimulatorState): number { + dfa: DFA, + input: TokenStream, startIndex: number, + initialState: SimulatorState): number { if (ParserATNSimulator.debug) { console.log("execATN decision " + dfa.decision + " exec LA(1)==" + this.getLookaheadName(input)); } - let outerContext: ParserRuleContext = initialState.outerContext; - let useContext: boolean = initialState.useContext; + const outerContext: ParserRuleContext = initialState.outerContext; + const useContext: boolean = initialState.useContext; let t: number = input.LA(1); let previous: SimulatorState = initialState; - let contextCache: PredictionContextCache = new PredictionContextCache(); + const contextCache: PredictionContextCache = new PredictionContextCache(); while (true) { // while more work - let nextState: SimulatorState | undefined = this.computeReachSet(dfa, previous, t, contextCache); + const nextState: SimulatorState | undefined = this.computeReachSet(dfa, previous, t, contextCache); if (nextState == null) { this.setDFAEdge(previous.s0, input.LA(1), ATNSimulator.ERROR); return this.handleNoViableAlt(input, startIndex, previous); } - let D: DFAState = nextState.s0; + const D: DFAState = nextState.s0; // predicted alt => accept state assert(D.isAcceptState || D.prediction === ATN.INVALID_ALT_NUMBER); @@ -769,7 +771,7 @@ export class ParserATNSimulator extends ATNSimulator { && dfa.decision >= 0 && !D.configs.hasSemanticContext) { if (t >= 0 && t <= MAX_SHORT_VALUE) { - let key: number = ((dfa.decision << 16) >>> 0) + t; + const key: number = ((dfa.decision << 16) >>> 0) + t; this.atn.LL1Table.set(key, predictedAlt); } } @@ -780,8 +782,8 @@ export class ParserATNSimulator extends ATNSimulator { } predictedAlt = D.prediction; -// int k = input.index - startIndex + 1; // how much input we used -// System.out.println("used k="+k); + // int k = input.index - startIndex + 1; // how much input we used + // System.out.println("used k="+k); let attemptFullContext: boolean = conflictingAlts != null && this.userWantsCtxSensitive; if (attemptFullContext) { // Only exact conflicts are known to be ambiguous when local @@ -792,9 +794,9 @@ export class ParserATNSimulator extends ATNSimulator { } if (D.configs.hasSemanticContext) { - let predPredictions: DFAState.PredPrediction[] | undefined = D.predicates; + const predPredictions: DFAState.PredPrediction[] | undefined = D.predicates; if (predPredictions != null) { - let conflictIndex: number = input.index; + const conflictIndex: number = input.index; if (conflictIndex !== startIndex) { input.seek(startIndex); } @@ -802,14 +804,14 @@ export class ParserATNSimulator extends ATNSimulator { // use complete evaluation here if we'll want to retry with full context if still ambiguous conflictingAlts = this.evalSemanticContext(predPredictions, outerContext, attemptFullContext || this.reportAmbiguities); switch (conflictingAlts.cardinality()) { - case 0: - throw this.noViableAlt(input, outerContext, D.configs, startIndex); + case 0: + throw this.noViableAlt(input, outerContext, D.configs, startIndex); - case 1: - return conflictingAlts.nextSetBit(0); + case 1: + return conflictingAlts.nextSetBit(0); - default: - break; + default: + break; } if (conflictIndex !== startIndex) { @@ -838,7 +840,7 @@ export class ParserATNSimulator extends ATNSimulator { if (ParserATNSimulator.debug) { console.log("RETRY with outerContext=" + outerContext); } - let fullContextState: SimulatorState = this.computeStartState(dfa, outerContext, true); + const fullContextState: SimulatorState = this.computeStartState(dfa, outerContext, true); if (this.reportAmbiguities) { this.reportAttemptingFullContext(dfa, conflictingAlts, nextState, startIndex, input.index); } @@ -908,11 +910,11 @@ export class ParserATNSimulator extends ATNSimulator { * {@link ATN#INVALID_ALT_NUMBER} if a suitable alternative was not * identified and {@link #adaptivePredict} should report an error instead. */ - protected handleNoViableAlt(@NotNull input: TokenStream, startIndex: number, @NotNull previous: SimulatorState): number { + protected handleNoViableAlt(input: TokenStream, startIndex: number, previous: SimulatorState): number { if (previous.s0 != null) { - let alts: BitSet = new BitSet(); - let maxAlt: number = 0; - for (let config of previous.s0.configs) { + const alts: BitSet = new BitSet(); + let maxAlt = 0; + for (const config of previous.s0.configs) { if (config.reachesIntoOuterContext || config.state instanceof RuleStopState) { alts.set(config.alt); maxAlt = Math.max(maxAlt, config.alt); @@ -920,57 +922,57 @@ export class ParserATNSimulator extends ATNSimulator { } switch (alts.cardinality()) { - case 0: - break; - - case 1: - return alts.nextSetBit(0); + case 0: + break; - default: - if (!previous.s0.configs.hasSemanticContext) { - // configs doesn't contain any predicates, so the predicate - // filtering code below would be pointless + case 1: return alts.nextSetBit(0); - } - /* - * Try to find a configuration set that not only dipped into the outer - * context, but also isn't eliminated by a predicate. - */ - let filteredConfigs: ATNConfigSet = new ATNConfigSet(); - for (let config of previous.s0.configs) { - if (config.reachesIntoOuterContext || config.state instanceof RuleStopState) { - filteredConfigs.add(config); + default: + if (!previous.s0.configs.hasSemanticContext) { + // configs doesn't contain any predicates, so the predicate + // filtering code below would be pointless + return alts.nextSetBit(0); } - } - /* The following code blocks are adapted from predicateDFAState with - * the following key changes. - * - * 1. The code operates on an ATNConfigSet rather than a DFAState. - * 2. Predicates are collected for all alternatives represented in - * filteredConfigs, rather than restricting the evaluation to - * conflicting and/or unique configurations. - */ - let altToPred: SemanticContext[] | undefined = this.getPredsForAmbigAlts(alts, filteredConfigs, maxAlt); - if (altToPred != null) { - let predicates: DFAState.PredPrediction[] | undefined = this.getPredicatePredictions(alts, altToPred); - if (predicates != null) { - let stopIndex: number = input.index; - try { - input.seek(startIndex); - let filteredAlts: BitSet = this.evalSemanticContext(predicates, previous.outerContext, false); - if (!filteredAlts.isEmpty) { - return filteredAlts.nextSetBit(0); - } + /* + * Try to find a configuration set that not only dipped into the outer + * context, but also isn't eliminated by a predicate. + */ + const filteredConfigs: ATNConfigSet = new ATNConfigSet(); + for (const config of previous.s0.configs) { + if (config.reachesIntoOuterContext || config.state instanceof RuleStopState) { + filteredConfigs.add(config); } - finally { - input.seek(stopIndex); + } + + /* The following code blocks are adapted from predicateDFAState with + * the following key changes. + * + * 1. The code operates on an ATNConfigSet rather than a DFAState. + * 2. Predicates are collected for all alternatives represented in + * filteredConfigs, rather than restricting the evaluation to + * conflicting and/or unique configurations. + */ + const altToPred: SemanticContext[] | undefined = this.getPredsForAmbigAlts(alts, filteredConfigs, maxAlt); + if (altToPred != null) { + const predicates: DFAState.PredPrediction[] | undefined = this.getPredicatePredictions(alts, altToPred); + if (predicates != null) { + const stopIndex: number = input.index; + try { + input.seek(startIndex); + const filteredAlts: BitSet = this.evalSemanticContext(predicates, previous.outerContext, false); + if (!filteredAlts.isEmpty) { + return filteredAlts.nextSetBit(0); + } + } + finally { + input.seek(stopIndex); + } } } - } - return alts.nextSetBit(0); + return alts.nextSetBit(0); } } @@ -978,7 +980,7 @@ export class ParserATNSimulator extends ATNSimulator { } protected computeReachSet(dfa: DFA, previous: SimulatorState, t: number, contextCache: PredictionContextCache): SimulatorState | undefined { - let useContext: boolean = previous.useContext; + const useContext: boolean = previous.useContext; let remainingGlobalContext: ParserRuleContext | undefined = previous.remainingOuterContext; let s: DFAState = previous.s0; @@ -1005,11 +1007,11 @@ export class ParserATNSimulator extends ATNSimulator { return new SimulatorState(previous.outerContext, s, useContext, remainingGlobalContext); } - let s0: DFAState = s; + const s0: DFAState = s; let target: DFAState | undefined = this.getExistingTargetState(s0, t); if (target == null) { - let result: [DFAState, ParserRuleContext | undefined] = this.computeTargetState(dfa, s0, remainingGlobalContext, t, useContext, contextCache); + const result: [DFAState, ParserRuleContext | undefined] = this.computeTargetState(dfa, s0, remainingGlobalContext, t, useContext, contextCache); target = result[0]; remainingGlobalContext = result[1]; } @@ -1033,7 +1035,7 @@ export class ParserATNSimulator extends ATNSimulator { * `t`, or `undefined` if the target state for this edge is not * already cached */ - protected getExistingTargetState(@NotNull s: DFAState, t: number): DFAState | undefined { + protected getExistingTargetState(s: DFAState, t: number): DFAState | undefined { return s.getTarget(t); } @@ -1052,19 +1054,19 @@ export class ParserATNSimulator extends ATNSimulator { * `t`. If `t` does not lead to a valid DFA state, this method * returns {@link #ERROR}. */ - @NotNull - protected computeTargetState(@NotNull dfa: DFA, @NotNull s: DFAState, remainingGlobalContext: ParserRuleContext | undefined, t: number, useContext: boolean, contextCache: PredictionContextCache): [DFAState, ParserRuleContext | undefined] { - let closureConfigs: ATNConfig[] = s.configs.toArray(); + + protected computeTargetState(dfa: DFA, s: DFAState, remainingGlobalContext: ParserRuleContext | undefined, t: number, useContext: boolean, contextCache: PredictionContextCache): [DFAState, ParserRuleContext | undefined] { + const closureConfigs: ATNConfig[] = s.configs.toArray(); let contextElements: IntegerList | undefined; let reach: ATNConfigSet = new ATNConfigSet(); let stepIntoGlobal: boolean; do { - let hasMoreContext: boolean = !useContext || remainingGlobalContext != null; + const hasMoreContext: boolean = !useContext || remainingGlobalContext != null; if (!hasMoreContext) { reach.isOutermostConfigSet = true; } - let reachIntermediate: ATNConfigSet = new ATNConfigSet(); + const reachIntermediate: ATNConfigSet = new ATNConfigSet(); /* Configurations already in a rule stop state indicate reaching the end * of the decision rule (local context) or end of the start rule (full @@ -1078,7 +1080,7 @@ export class ParserATNSimulator extends ATNSimulator { */ let skippedStopStates: ATNConfig[] | undefined; - for (let c of closureConfigs) { + for (const c of closureConfigs) { if (ParserATNSimulator.debug) { console.log("testing " + this.getTokenName(t) + " at " + c.toString()); } @@ -1096,10 +1098,10 @@ export class ParserATNSimulator extends ATNSimulator { continue; } - let n: number = c.state.numberOfOptimizedTransitions; + const n: number = c.state.numberOfOptimizedTransitions; for (let ti = 0; ti < n; ti++) { // for each optimized transition - let trans: Transition = c.state.getOptimizedTransition(ti); - let target: ATNState | undefined = this.getReachableTarget(c, trans, t); + const trans: Transition = c.state.getOptimizedTransition(ti); + const target: ATNState | undefined = this.getReachableTarget(c, trans, t); if (target != null) { reachIntermediate.add(c.transform(target, false), contextCache); } @@ -1124,8 +1126,8 @@ export class ParserATNSimulator extends ATNSimulator { /* If the reach set could not be trivially determined, perform a closure * operation on the intermediate set to compute its initial value. */ - let collectPredicates: boolean = false; - let treatEofAsEpsilon: boolean = t === Token.EOF; + const collectPredicates = false; + const treatEofAsEpsilon: boolean = t === Token.EOF; this.closure(reachIntermediate, reach, collectPredicates, hasMoreContext, contextCache, treatEofAsEpsilon); stepIntoGlobal = reach.dipsIntoOuterContext; @@ -1155,7 +1157,7 @@ export class ParserATNSimulator extends ATNSimulator { */ if (skippedStopStates != null && (!useContext || !PredictionMode.hasConfigInRuleStopState(reach))) { assert(skippedStopStates.length > 0); - for (let c of skippedStopStates) { + for (const c of skippedStopStates) { reach.add(c, contextCache); } } @@ -1167,7 +1169,7 @@ export class ParserATNSimulator extends ATNSimulator { remainingGlobalContext = remainingGlobalContext as ParserRuleContext; remainingGlobalContext = this.skipTailCalls(remainingGlobalContext); - let nextContextElement: number = this.getReturnState(remainingGlobalContext); + const nextContextElement: number = this.getReturnState(remainingGlobalContext); if (contextElements == null) { contextElements = new IntegerList(); } @@ -1192,7 +1194,7 @@ export class ParserATNSimulator extends ATNSimulator { return [ATNSimulator.ERROR, remainingGlobalContext]; } - let result: DFAState = this.addDFAEdge(dfa, s, t, contextElements, reach, contextCache); + const result: DFAState = this.addDFAEdge(dfa, s, t, contextElements, reach, contextCache); return [result, remainingGlobalContext]; } @@ -1209,14 +1211,14 @@ export class ParserATNSimulator extends ATNSimulator { * rule stop state, otherwise return a new configuration set containing only * the configurations from `configs` which are in a rule stop state */ - @NotNull - protected removeAllConfigsNotInRuleStopState(@NotNull configs: ATNConfigSet, contextCache: PredictionContextCache): ATNConfigSet { + + protected removeAllConfigsNotInRuleStopState(configs: ATNConfigSet, contextCache: PredictionContextCache): ATNConfigSet { if (PredictionMode.allConfigsInRuleStopStates(configs)) { return configs; } - let result: ATNConfigSet = new ATNConfigSet(); - for (let config of configs) { + const result: ATNConfigSet = new ATNConfigSet(); + for (const config of configs) { if (!(config.state instanceof RuleStopState)) { continue; } @@ -1227,7 +1229,7 @@ export class ParserATNSimulator extends ATNSimulator { return result; } - @NotNull + protected computeStartState( dfa: DFA, globalContext: ParserRuleContext, @@ -1245,14 +1247,14 @@ export class ParserATNSimulator extends ATNSimulator { s0.setContextSensitive(this.atn); } - let decision: number = dfa.decision; + const decision: number = dfa.decision; // @NotNull - let p: ATNState = dfa.atnStartState; + const p: ATNState = dfa.atnStartState; - let previousContext: number = 0; + let previousContext = 0; let remainingGlobalContext: ParserRuleContext | undefined = globalContext; let initialContext: PredictionContext = useContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL; // always at least the implicit call to start rule - let contextCache: PredictionContextCache = new PredictionContextCache(); + const contextCache: PredictionContextCache = new PredictionContextCache(); if (useContext) { if (!this.enable_global_context_dfa) { while (remainingGlobalContext != null) { @@ -1297,22 +1299,22 @@ export class ParserATNSimulator extends ATNSimulator { let configs: ATNConfigSet = new ATNConfigSet(); while (true) { - let reachIntermediate: ATNConfigSet = new ATNConfigSet(); - let n: number = p.numberOfTransitions; + const reachIntermediate: ATNConfigSet = new ATNConfigSet(); + const n: number = p.numberOfTransitions; for (let ti = 0; ti < n; ti++) { // for each transition - let target: ATNState = p.transition(ti).target; + const target: ATNState = p.transition(ti).target; reachIntermediate.add(ATNConfig.create(target, ti + 1, initialContext)); } - let hasMoreContext: boolean = remainingGlobalContext != null; + const hasMoreContext: boolean = remainingGlobalContext != null; if (!hasMoreContext) { configs.isOutermostConfigSet = true; } - let collectPredicates: boolean = true; + const collectPredicates = true; this.closure(reachIntermediate, configs, collectPredicates, hasMoreContext, contextCache, false); - let stepIntoGlobal: boolean = configs.dipsIntoOuterContext; + const stepIntoGlobal: boolean = configs.dipsIntoOuterContext; let next: DFAState; if (useContext && !this.enable_global_context_dfa) { @@ -1371,7 +1373,7 @@ export class ParserATNSimulator extends ATNSimulator { configs.clear(); remainingGlobalContext = this.skipTailCalls(remainingGlobalContext); - let nextContextElement: number = this.getReturnState(remainingGlobalContext); + const nextContextElement: number = this.getReturnState(remainingGlobalContext); if (remainingGlobalContext.isEmpty) { remainingGlobalContext = undefined; @@ -1441,17 +1443,17 @@ export class ParserATNSimulator extends ATNSimulator { * for a precedence DFA at a particular precedence level (determined by * calling {@link Parser#getPrecedence}). */ - @NotNull - protected applyPrecedenceFilter(@NotNull configs: ATNConfigSet, globalContext: ParserRuleContext, contextCache: PredictionContextCache): ATNConfigSet { - let statesFromAlt1: Map = new Map(); - let configSet: ATNConfigSet = new ATNConfigSet(); - for (let config of configs) { + + protected applyPrecedenceFilter(configs: ATNConfigSet, globalContext: ParserRuleContext, contextCache: PredictionContextCache): ATNConfigSet { + const statesFromAlt1: Map = new Map(); + const configSet: ATNConfigSet = new ATNConfigSet(); + for (const config of configs) { // handle alt 1 first if (config.alt !== 1) { continue; } - let updatedContext: SemanticContext | undefined = config.semanticContext.evalPrecedence(this._parser, globalContext); + const updatedContext: SemanticContext | undefined = config.semanticContext.evalPrecedence(this._parser, globalContext); if (updatedContext == null) { // the configuration was eliminated continue; @@ -1466,7 +1468,7 @@ export class ParserATNSimulator extends ATNSimulator { } } - for (let config of configs) { + for (const config of configs) { if (config.alt === 1) { // already handled continue; @@ -1477,7 +1479,7 @@ export class ParserATNSimulator extends ATNSimulator { * filter the prediction context for alternatives predicting alt>1 * (basically a graph subtraction algorithm). */ - let context: PredictionContext | undefined = statesFromAlt1.get(config.state.stateNumber); + const context: PredictionContext | undefined = statesFromAlt1.get(config.state.stateNumber); if (context != null && context.equals(config.context)) { // eliminated continue; @@ -1490,7 +1492,7 @@ export class ParserATNSimulator extends ATNSimulator { return configSet; } - protected getReachableTarget(@NotNull source: ATNConfig, @NotNull trans: Transition, ttype: number): ATNState | undefined { + protected getReachableTarget(source: ATNConfig, trans: Transition, ttype: number): ATNState | undefined { if (trans.matches(ttype, 0, this.atn.maxTokenType)) { return trans.target; } @@ -1503,7 +1505,7 @@ export class ParserATNSimulator extends ATNSimulator { D: DFAState, configs: ATNConfigSet, nalts: number): DFAState.PredPrediction[] | undefined { - let conflictingAlts: BitSet | undefined = this.getConflictingAltsFromConfigSet(configs); + const conflictingAlts: BitSet | undefined = this.getConflictingAltsFromConfigSet(configs); if (!conflictingAlts) { throw new Error("This unhandled scenario is intended to be unreachable, but I'm currently not sure of why we know that's the case."); } @@ -1511,7 +1513,7 @@ export class ParserATNSimulator extends ATNSimulator { if (ParserATNSimulator.debug) { console.log("predicateDFAState " + D); } - let altToPred: SemanticContext[] | undefined = this.getPredsForAmbigAlts(conflictingAlts, configs, nalts); + const altToPred: SemanticContext[] | undefined = this.getPredsForAmbigAlts(conflictingAlts, configs, nalts); // altToPred[uniqueAlt] is now our validating predicate (if any) let predPredictions: DFAState.PredPrediction[] | undefined; if (altToPred != null) { @@ -1524,8 +1526,8 @@ export class ParserATNSimulator extends ATNSimulator { } protected getPredsForAmbigAlts( - @NotNull ambigAlts: BitSet, - @NotNull configs: ATNConfigSet, + ambigAlts: BitSet, + configs: ATNConfigSet, nalts: number): SemanticContext[] | undefined { // REACH=[1|1|[]|0:0, 1|2|[]|0:1] @@ -1540,15 +1542,15 @@ export class ParserATNSimulator extends ATNSimulator { * * From this, it is clear that NONE||anything==NONE. */ - let altToPred: Array | undefined = new Array(nalts + 1); - let n: number = altToPred.length; - for (let c of configs) { + const altToPred: (SemanticContext | undefined)[] | undefined = new Array(nalts + 1); + const n: number = altToPred.length; + for (const c of configs) { if (ambigAlts.get(c.alt)) { altToPred[c.alt] = SemanticContext.or(altToPred[c.alt], c.semanticContext); } } - let nPredAlts: number = 0; + let nPredAlts = 0; for (let i = 0; i < n; i++) { if (altToPred[i] == null) { altToPred[i] = SemanticContext.NONE; @@ -1572,10 +1574,10 @@ export class ParserATNSimulator extends ATNSimulator { } protected getPredicatePredictions(ambigAlts: BitSet | undefined, altToPred: SemanticContext[]): DFAState.PredPrediction[] | undefined { - let pairs: DFAState.PredPrediction[] = []; - let containsPredicate: boolean = false; + const pairs: DFAState.PredPrediction[] = []; + let containsPredicate = false; for (let i = 1; i < altToPred.length; i++) { - let pred: SemanticContext = altToPred[i]; + const pred: SemanticContext = altToPred[i]; // unpredicated is indicated by SemanticContext.NONE assert(pred != null); @@ -1598,7 +1600,7 @@ export class ParserATNSimulator extends ATNSimulator { return undefined; } -// System.out.println(Arrays.toString(altToPred)+"->"+pairs); + // System.out.println(Arrays.toString(altToPred)+"->"+pairs); return pairs; } @@ -1607,11 +1609,11 @@ export class ParserATNSimulator extends ATNSimulator { * unpredicated config which behaves as "always true." */ protected evalSemanticContext( - @NotNull predPredictions: DFAState.PredPrediction[], + predPredictions: DFAState.PredPrediction[], outerContext: ParserRuleContext, complete: boolean): BitSet { - let predictions: BitSet = new BitSet(); - for (let pair of predPredictions) { + const predictions: BitSet = new BitSet(); + for (const pair of predPredictions) { if (pair.pred === SemanticContext.NONE) { predictions.set(pair.alt); if (!complete) { @@ -1621,7 +1623,7 @@ export class ParserATNSimulator extends ATNSimulator { continue; } - let evaluatedResult: boolean = this.evalSemanticContextImpl(pair.pred, outerContext, pair.alt); + const evaluatedResult: boolean = this.evalSemanticContextImpl(pair.pred, outerContext, pair.alt); if (ParserATNSimulator.debug || ParserATNSimulator.dfa_debug) { console.log("eval pred " + pair + "=" + evaluatedResult); } @@ -1664,7 +1666,7 @@ export class ParserATNSimulator extends ATNSimulator { * * @since 4.3 */ - protected evalSemanticContextImpl(@NotNull pred: SemanticContext, parserCallStack: ParserRuleContext, alt: number): boolean { + protected evalSemanticContextImpl(pred: SemanticContext, parserCallStack: ParserRuleContext, alt: number): boolean { return pred.eval(this._parser, parserCallStack); } @@ -1677,20 +1679,20 @@ export class ParserATNSimulator extends ATNSimulator { protected closure( sourceConfigs: ATNConfigSet, - @NotNull configs: ATNConfigSet, + configs: ATNConfigSet, collectPredicates: boolean, hasMoreContext: boolean, - @Nullable contextCache: PredictionContextCache, + contextCache: PredictionContextCache | undefined, treatEofAsEpsilon: boolean): void { if (contextCache == null) { contextCache = PredictionContextCache.UNCACHED; } let currentConfigs: ATNConfigSet = sourceConfigs; - let closureBusy: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE); + const closureBusy: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE); while (currentConfigs.size > 0) { - let intermediate: ATNConfigSet = new ATNConfigSet(); - for (let config of currentConfigs) { + const intermediate: ATNConfigSet = new ATNConfigSet(); + for (const config of currentConfigs) { this.closureImpl(config, configs, intermediate, closureBusy, collectPredicates, hasMoreContext, contextCache, 0, treatEofAsEpsilon); } @@ -1699,13 +1701,13 @@ export class ParserATNSimulator extends ATNSimulator { } protected closureImpl( - @NotNull config: ATNConfig, - @NotNull configs: ATNConfigSet, - @Nullable intermediate: ATNConfigSet, - @NotNull closureBusy: Array2DHashSet, + config: ATNConfig, + configs: ATNConfigSet, + intermediate: ATNConfigSet | undefined, + closureBusy: Array2DHashSet, collectPredicates: boolean, hasMoreContexts: boolean, - @NotNull contextCache: PredictionContextCache, + contextCache: PredictionContextCache, depth: number, treatEofAsEpsilon: boolean): void { if (ParserATNSimulator.debug) { @@ -1715,12 +1717,12 @@ export class ParserATNSimulator extends ATNSimulator { if (config.state instanceof RuleStopState) { // We hit rule end. If we have context info, use it if (!config.context.isEmpty) { - let hasEmpty: boolean = config.context.hasEmpty; - let nonEmptySize: number = config.context.size - (hasEmpty ? 1 : 0); + const hasEmpty: boolean = config.context.hasEmpty; + const nonEmptySize: number = config.context.size - (hasEmpty ? 1 : 0); for (let i = 0; i < nonEmptySize; i++) { - let newContext: PredictionContext = config.context.getParent(i); // "pop" return state - let returnState: ATNState = this.atn.states[config.context.getReturnState(i)]; - let c: ATNConfig = ATNConfig.create(returnState, config.alt, newContext, config.semanticContext); + const newContext: PredictionContext = config.context.getParent(i); // "pop" return state + const returnState: ATNState = this.atn.states[config.context.getReturnState(i)]; + const c: ATNConfig = ATNConfig.create(returnState, config.alt, newContext, config.semanticContext); // While we have context to pop back from, we may have // gotten that context AFTER having fallen off a rule. // Make sure we track that we are now out of context. @@ -1758,7 +1760,7 @@ export class ParserATNSimulator extends ATNSimulator { } } - let p: ATNState = config.state; + const p: ATNState = config.state; // optimization if (!p.onlyHasEpsilonTransitions) { configs.add(config, contextCache); @@ -1778,14 +1780,14 @@ export class ParserATNSimulator extends ATNSimulator { && (p as StarLoopEntryState).precedenceRuleDecision && !config.context.hasEmpty) { - let precedenceDecision = p as StarLoopEntryState; + const precedenceDecision = p as StarLoopEntryState; // When suppress is true, it means the outgoing edge i==0 is // ambiguous with the outgoing edge i==1, and thus the closure // operation can dynamically disambiguate by suppressing this // edge during the closure operation. - let suppress: boolean = true; - for (let j: number = 0; j < config.context.size; j++) { + let suppress = true; + for (let j = 0; j < config.context.size; j++) { if (!precedenceDecision.precedenceLoopbackStates.get(config.context.getReturnState(j))) { suppress = false; break; @@ -1797,10 +1799,10 @@ export class ParserATNSimulator extends ATNSimulator { } } - let t: Transition = p.getOptimizedTransition(i); - let continueCollecting: boolean = + const t: Transition = p.getOptimizedTransition(i); + const continueCollecting: boolean = !(t instanceof ActionTransition) && collectPredicates; - let c: ATNConfig | undefined = this.getEpsilonTarget(config, t, continueCollecting, depth === 0, contextCache, treatEofAsEpsilon); + const c: ATNConfig | undefined = this.getEpsilonTarget(config, t, continueCollecting, depth === 0, contextCache, treatEofAsEpsilon); if (c != null) { if (t instanceof RuleTransition) { if (intermediate != null && !collectPredicates) { @@ -1818,7 +1820,7 @@ export class ParserATNSimulator extends ATNSimulator { // preds if this is > 0. if (this.dfa != null && this.dfa.isPrecedenceDfa) { - let outermostPrecedenceReturn: number = (t as EpsilonTransition).outermostPrecedenceReturn; + const outermostPrecedenceReturn: number = (t as EpsilonTransition).outermostPrecedenceReturn; if (outermostPrecedenceReturn === this.dfa.atnStartState.ruleIndex) { c.isPrecedenceFilterSuppressed = true; } @@ -1869,7 +1871,7 @@ export class ParserATNSimulator extends ATNSimulator { } } - @NotNull + public getRuleName(index: number): string { if (this._parser != null && index >= 0) { return this._parser.ruleNames[index]; @@ -1877,55 +1879,54 @@ export class ParserATNSimulator extends ATNSimulator { return ""; } - protected getEpsilonTarget(@NotNull config: ATNConfig, @NotNull t: Transition, collectPredicates: boolean, inContext: boolean, contextCache: PredictionContextCache, treatEofAsEpsilon: boolean): ATNConfig | undefined { + protected getEpsilonTarget(config: ATNConfig, t: Transition, collectPredicates: boolean, inContext: boolean, contextCache: PredictionContextCache, treatEofAsEpsilon: boolean): ATNConfig | undefined { switch (t.serializationType) { - case TransitionType.RULE: - return this.ruleTransition(config, t as RuleTransition, contextCache); + case TransitionType.RULE: + return this.ruleTransition(config, t as RuleTransition, contextCache); - case TransitionType.PRECEDENCE: - return this.precedenceTransition(config, t as PrecedencePredicateTransition, collectPredicates, inContext); + case TransitionType.PRECEDENCE: + return this.precedenceTransition(config, t as PrecedencePredicateTransition, collectPredicates, inContext); - case TransitionType.PREDICATE: - return this.predTransition(config, t as PredicateTransition, collectPredicates, inContext); + case TransitionType.PREDICATE: + return this.predTransition(config, t as PredicateTransition, collectPredicates, inContext); - case TransitionType.ACTION: - return this.actionTransition(config, t as ActionTransition); + case TransitionType.ACTION: + return this.actionTransition(config, t as ActionTransition); - case TransitionType.EPSILON: - return config.transform(t.target, false); + case TransitionType.EPSILON: + return config.transform(t.target, false); - case TransitionType.ATOM: - case TransitionType.RANGE: - case TransitionType.SET: - // EOF transitions act like epsilon transitions after the first EOF - // transition is traversed - if (treatEofAsEpsilon) { - if (t.matches(Token.EOF, 0, 1)) { - return config.transform(t.target, false); + case TransitionType.ATOM: + case TransitionType.RANGE: + case TransitionType.SET: + // EOF transitions act like epsilon transitions after the first EOF + // transition is traversed + if (treatEofAsEpsilon) { + if (t.matches(Token.EOF, 0, 1)) { + return config.transform(t.target, false); + } } - } - return undefined; + return undefined; - default: - return undefined; + default: + return undefined; } } - @NotNull - protected actionTransition(@NotNull config: ATNConfig, @NotNull t: ActionTransition): ATNConfig { + + protected actionTransition(config: ATNConfig, t: ActionTransition): ATNConfig { if (ParserATNSimulator.debug) { console.log("ACTION edge " + t.ruleIndex + ":" + t.actionIndex); } return config.transform(t.target, false); } - @Nullable protected precedenceTransition( - @NotNull config: ATNConfig, - @NotNull pt: PrecedencePredicateTransition, + config: ATNConfig, + pt: PrecedencePredicateTransition, collectPredicates: boolean, - inContext: boolean): ATNConfig { + inContext: boolean): ATNConfig | undefined { if (ParserATNSimulator.debug) { console.log("PRED (collectPredicates=" + collectPredicates + ") " + pt.precedence + ">=_p" + @@ -1938,7 +1939,7 @@ export class ParserATNSimulator extends ATNSimulator { let c: ATNConfig; if (collectPredicates && inContext) { - let newSemCtx: SemanticContext = SemanticContext.and(config.semanticContext, pt.predicate); + const newSemCtx: SemanticContext = SemanticContext.and(config.semanticContext, pt.predicate); c = config.transform(pt.target, false, newSemCtx); } else { @@ -1951,12 +1952,11 @@ export class ParserATNSimulator extends ATNSimulator { return c; } - @Nullable protected predTransition( - @NotNull config: ATNConfig, - @NotNull pt: PredicateTransition, + config: ATNConfig, + pt: PredicateTransition, collectPredicates: boolean, - inContext: boolean): ATNConfig { + inContext: boolean): ATNConfig | undefined { if (ParserATNSimulator.debug) { console.log("PRED (collectPredicates=" + collectPredicates + ") " + pt.ruleIndex + ":" + pt.predIndex + @@ -1970,7 +1970,7 @@ export class ParserATNSimulator extends ATNSimulator { let c: ATNConfig; if (collectPredicates && (!pt.isCtxDependent || (pt.isCtxDependent && inContext))) { - let newSemCtx: SemanticContext = SemanticContext.and(config.semanticContext, pt.predicate); + const newSemCtx: SemanticContext = SemanticContext.and(config.semanticContext, pt.predicate); c = config.transform(pt.target, false, newSemCtx); } else { @@ -1983,14 +1983,14 @@ export class ParserATNSimulator extends ATNSimulator { return c; } - @NotNull - protected ruleTransition(@NotNull config: ATNConfig, @NotNull t: RuleTransition, @Nullable contextCache: PredictionContextCache): ATNConfig { + + protected ruleTransition(config: ATNConfig, t: RuleTransition, contextCache: PredictionContextCache | undefined): ATNConfig { if (ParserATNSimulator.debug) { console.log("CALL rule " + this.getRuleName(t.target.ruleIndex) + ", ctx=" + config.context); } - let returnState: ATNState = t.followState; + const returnState: ATNState = t.followState; let newContext: PredictionContext; if (this.optimize_tail_calls && t.optimizedTailCall && (!this.tail_call_preserves_sll || !PredictionContext.isEmptyLocal(config.context))) { @@ -2021,17 +2021,17 @@ export class ParserATNSimulator extends ATNSimulator { return 0; } - private isConflicted(@NotNull configset: ATNConfigSet, contextCache: PredictionContextCache): ConflictInfo | undefined { + private isConflicted(configset: ATNConfigSet, contextCache: PredictionContextCache): ConflictInfo | undefined { if (configset.uniqueAlt !== ATN.INVALID_ALT_NUMBER || configset.size <= 1) { return undefined; } - let configs: ATNConfig[] = configset.toArray(); + const configs: ATNConfig[] = configset.toArray(); configs.sort(ParserATNSimulator.STATE_ALT_SORT_COMPARATOR); - let exact: boolean = !configset.dipsIntoOuterContext; - let alts: BitSet = new BitSet(); - let minAlt: number = configs[0].alt; + let exact = !configset.dipsIntoOuterContext; + const alts: BitSet = new BitSet(); + const minAlt: number = configs[0].alt; alts.set(minAlt); /* Quick checks come first (single pass, no context joining): @@ -2047,8 +2047,8 @@ export class ParserATNSimulator extends ATNSimulator { // minAlt from the first state, #2 will fail if the assumption was // incorrect let currentState: number = configs[0].state.nonStopStateNumber; - for (let config of configs) { - let stateNumber: number = config.state.nonStopStateNumber; + for (const config of configs) { + const stateNumber: number = config.state.nonStopStateNumber; if (stateNumber !== currentState) { if (config.alt !== minAlt) { return undefined; @@ -2065,12 +2065,12 @@ export class ParserATNSimulator extends ATNSimulator { // get the represented alternatives of the first state representedAlts = new BitSet(); let maxAlt: number = minAlt; - for (let config of configs) { + for (const config of configs) { if (config.state.nonStopStateNumber !== currentState) { break; } - let alt: number = config.alt; + const alt: number = config.alt; representedAlts.set(alt); maxAlt = alt; } @@ -2078,9 +2078,9 @@ export class ParserATNSimulator extends ATNSimulator { // quick check #3: currentState = configs[0].state.nonStopStateNumber; let currentAlt: number = minAlt; - for (let config of configs) { - let stateNumber: number = config.state.nonStopStateNumber; - let alt: number = config.alt; + for (const config of configs) { + const stateNumber: number = config.state.nonStopStateNumber; + const alt: number = config.alt; if (stateNumber !== currentState) { if (currentAlt !== maxAlt) { exact = false; @@ -2102,11 +2102,11 @@ export class ParserATNSimulator extends ATNSimulator { } currentState = configs[0].state.nonStopStateNumber; - let firstIndexCurrentState: number = 0; - let lastIndexCurrentStateMinAlt: number = 0; + let firstIndexCurrentState = 0; + let lastIndexCurrentStateMinAlt = 0; let joinedCheckContext: PredictionContext = configs[0].context; for (let i = 1; i < configs.length; i++) { - let config: ATNConfig = configs[i]; + const config: ATNConfig = configs[i]; if (config.alt !== minAlt) { break; } @@ -2120,8 +2120,8 @@ export class ParserATNSimulator extends ATNSimulator { } for (let i = lastIndexCurrentStateMinAlt + 1; i < configs.length; i++) { - let config: ATNConfig = configs[i]; - let state: ATNState = config.state; + const config: ATNConfig = configs[i]; + const state: ATNState = config.state; alts.set(config.alt); if (state.nonStopStateNumber !== currentState) { currentState = state.nonStopStateNumber; @@ -2129,7 +2129,7 @@ export class ParserATNSimulator extends ATNSimulator { lastIndexCurrentStateMinAlt = i; joinedCheckContext = config.context; for (let j = firstIndexCurrentState + 1; j < configs.length; j++) { - let config2: ATNConfig = configs[j]; + const config2: ATNConfig = configs[j]; if (config2.alt !== minAlt) { break; } @@ -2147,10 +2147,10 @@ export class ParserATNSimulator extends ATNSimulator { } let joinedCheckContext2: PredictionContext = config.context; - let currentAlt: number = config.alt; + const currentAlt: number = config.alt; let lastIndexCurrentStateCurrentAlt: number = i; for (let j = lastIndexCurrentStateCurrentAlt + 1; j < configs.length; j++) { - let config2: ATNConfig = configs[j]; + const config2: ATNConfig = configs[j]; if (config2.alt !== currentAlt) { break; } @@ -2165,7 +2165,7 @@ export class ParserATNSimulator extends ATNSimulator { i = lastIndexCurrentStateCurrentAlt; - let check: PredictionContext = contextCache.join(joinedCheckContext, joinedCheckContext2); + const check: PredictionContext = contextCache.join(joinedCheckContext, joinedCheckContext2); if (!joinedCheckContext.equals(check)) { return undefined; } @@ -2187,14 +2187,14 @@ export class ParserATNSimulator extends ATNSimulator { return conflictingAlts; } - @NotNull + public getTokenName(t: number): string { if (t === Token.EOF) { return "EOF"; } - let vocabulary: Vocabulary = this._parser != null ? this._parser.vocabulary : VocabularyImpl.EMPTY_VOCABULARY; - let displayName: string = vocabulary.getDisplayName(t); + const vocabulary: Vocabulary = this._parser != null ? this._parser.vocabulary : VocabularyImpl.EMPTY_VOCABULARY; + const displayName: string = vocabulary.getDisplayName(t); if (displayName === String(t)) { return displayName; } @@ -2206,22 +2206,22 @@ export class ParserATNSimulator extends ATNSimulator { return this.getTokenName(input.LA(1)); } - public dumpDeadEndConfigs(@NotNull nvae: NoViableAltException): void { + public dumpDeadEndConfigs(nvae: NoViableAltException): void { console.log("dead end configs: "); - let deadEndConfigs = nvae.deadEndConfigs; + const deadEndConfigs = nvae.deadEndConfigs; if (!deadEndConfigs) { return; } - for (let c of deadEndConfigs) { - let trans: string = "no edges"; + for (const c of deadEndConfigs) { + let trans = "no edges"; if (c.state.numberOfOptimizedTransitions > 0) { - let t: Transition = c.state.getOptimizedTransition(0); + const t: Transition = c.state.getOptimizedTransition(0); if (t instanceof AtomTransition) { trans = "Atom " + this.getTokenName(t._label); } else if (t instanceof SetTransition) { - let not: boolean = t instanceof NotSetTransition; + const not: boolean = t instanceof NotSetTransition; trans = (not ? "~" : "") + "Set " + t.set.toString(); } } @@ -2229,11 +2229,11 @@ export class ParserATNSimulator extends ATNSimulator { } } - @NotNull + protected noViableAlt( - @NotNull input: TokenStream, - @NotNull outerContext: ParserRuleContext, - @NotNull configs: ATNConfigSet, + input: TokenStream, + outerContext: ParserRuleContext, + configs: ATNConfigSet, startIndex: number): NoViableAltException { return new NoViableAltException(this._parser, input, input.get(startIndex), @@ -2241,9 +2241,9 @@ export class ParserATNSimulator extends ATNSimulator { configs, outerContext); } - protected getUniqueAlt(@NotNull configs: Iterable): number { + protected getUniqueAlt(configs: Iterable): number { let alt: number = ATN.INVALID_ALT_NUMBER; - for (let c of configs) { + for (const c of configs) { if (alt === ATN.INVALID_ALT_NUMBER) { alt = c.alt; // found first alt } @@ -2254,8 +2254,8 @@ export class ParserATNSimulator extends ATNSimulator { return alt; } - protected configWithAltAtStopState(@NotNull configs: Iterable, alt: number): boolean { - for (let c of configs) { + protected configWithAltAtStopState(configs: Iterable, alt: number): boolean { + for (const c of configs) { if (c.alt === alt) { if (c.state instanceof RuleStopState) { return true; @@ -2265,21 +2265,21 @@ export class ParserATNSimulator extends ATNSimulator { return false; } - @NotNull + protected addDFAEdge( - @NotNull dfa: DFA, - @NotNull fromState: DFAState, + dfa: DFA, + fromState: DFAState, t: number, contextTransitions: IntegerList | undefined, - @NotNull toConfigs: ATNConfigSet, + toConfigs: ATNConfigSet, contextCache: PredictionContextCache): DFAState { assert(contextTransitions == null || contextTransitions.isEmpty || dfa.isContextSensitive); let from: DFAState = fromState; - let to: DFAState = this.addDFAState(dfa, toConfigs, contextCache); + const to: DFAState = this.addDFAState(dfa, toConfigs, contextCache); if (contextTransitions != null) { - for (let context of contextTransitions.toArray()) { + for (const context of contextTransitions.toArray()) { if (context === PredictionContext.EMPTY_FULL_STATE_KEY) { if (from.configs.isOutermostConfigSet) { continue; @@ -2311,18 +2311,18 @@ export class ParserATNSimulator extends ATNSimulator { return to; } - protected setDFAEdge(@Nullable p: DFAState, t: number, @Nullable q: DFAState): void { - if (p != null) { + protected setDFAEdge(p: DFAState | undefined, t: number, q: DFAState): void { + if (p != undefined) { p.setTarget(t, q); } } /** See comment on LexerInterpreter.addDFAState. */ - @NotNull - protected addDFAContextState(@NotNull dfa: DFA, @NotNull configs: ATNConfigSet, returnContext: number, contextCache: PredictionContextCache): DFAState { + + protected addDFAContextState(dfa: DFA, configs: ATNConfigSet, returnContext: number, contextCache: PredictionContextCache): DFAState { if (returnContext !== PredictionContext.EMPTY_FULL_STATE_KEY) { - let contextConfigs: ATNConfigSet = new ATNConfigSet(); - for (let config of configs) { + const contextConfigs: ATNConfigSet = new ATNConfigSet(); + for (const config of configs) { contextConfigs.add(config.appendContext(returnContext, contextCache)); } @@ -2337,16 +2337,16 @@ export class ParserATNSimulator extends ATNSimulator { } /** See comment on LexerInterpreter.addDFAState. */ - @NotNull - protected addDFAState(@NotNull dfa: DFA, @NotNull configs: ATNConfigSet, contextCache: PredictionContextCache): DFAState { - let enableDfa: boolean = this.enable_global_context_dfa || !configs.isOutermostConfigSet; + + protected addDFAState(dfa: DFA, configs: ATNConfigSet, contextCache: PredictionContextCache): DFAState { + const enableDfa: boolean = this.enable_global_context_dfa || !configs.isOutermostConfigSet; if (enableDfa) { if (!configs.isReadOnly) { configs.optimizeConfigs(this); } - let proposed: DFAState = this.createDFAState(dfa, configs); - let existing: DFAState | undefined = dfa.states.get(proposed); + const proposed: DFAState = this.createDFAState(dfa, configs); + const existing: DFAState | undefined = dfa.states.get(proposed); if (existing != null) { return existing; } @@ -2358,14 +2358,14 @@ export class ParserATNSimulator extends ATNSimulator { } } - let newState: DFAState = this.createDFAState(dfa, configs.clone(true)); + const newState: DFAState = this.createDFAState(dfa, configs.clone(true)); // getDecisionState won't return undefined when we request a known valid decision - let decisionState: DecisionState = this.atn.getDecisionState(dfa.decision) as DecisionState; - let predictedAlt: number = this.getUniqueAlt(configs); + const decisionState: DecisionState = this.atn.getDecisionState(dfa.decision) as DecisionState; + const predictedAlt: number = this.getUniqueAlt(configs); if (predictedAlt !== ATN.INVALID_ALT_NUMBER) { newState.acceptStateInfo = new AcceptStateInfo(predictedAlt); } else if (configs.conflictingAlts != null) { - let conflictingAlts = configs.conflictingAlts; + const conflictingAlts = configs.conflictingAlts; if (conflictingAlts) { newState.acceptStateInfo = new AcceptStateInfo(conflictingAlts.nextSetBit(0)); } @@ -2379,40 +2379,40 @@ export class ParserATNSimulator extends ATNSimulator { return newState; } - let added: DFAState = dfa.addState(newState); + const added: DFAState = dfa.addState(newState); if (ParserATNSimulator.debug && added === newState) { console.log("adding new DFA state: " + newState); } return added; } - @NotNull - protected createDFAState(@NotNull dfa: DFA, @NotNull configs: ATNConfigSet): DFAState { + + protected createDFAState(dfa: DFA, configs: ATNConfigSet): DFAState { return new DFAState(configs); } - protected reportAttemptingFullContext(@NotNull dfa: DFA, conflictingAlts: BitSet | undefined, @NotNull conflictState: SimulatorState, startIndex: number, stopIndex: number): void { + protected reportAttemptingFullContext(dfa: DFA, conflictingAlts: BitSet | undefined, conflictState: SimulatorState, startIndex: number, stopIndex: number): void { if (ParserATNSimulator.debug || ParserATNSimulator.retry_debug) { - let interval: Interval = Interval.of(startIndex, stopIndex); + const interval: Interval = Interval.of(startIndex, stopIndex); console.log("reportAttemptingFullContext decision=" + dfa.decision + ":" + conflictState.s0.configs + ", input=" + this._parser.inputStream.getText(interval)); } if (this._parser != null) { - let listener = this._parser.getErrorListenerDispatch(); + const listener = this._parser.getErrorListenerDispatch(); if (listener.reportAttemptingFullContext) { listener.reportAttemptingFullContext(this._parser, dfa, startIndex, stopIndex, conflictingAlts, conflictState); } } } - protected reportContextSensitivity(@NotNull dfa: DFA, prediction: number, @NotNull acceptState: SimulatorState, startIndex: number, stopIndex: number): void { + protected reportContextSensitivity(dfa: DFA, prediction: number, acceptState: SimulatorState, startIndex: number, stopIndex: number): void { if (ParserATNSimulator.debug || ParserATNSimulator.retry_debug) { - let interval: Interval = Interval.of(startIndex, stopIndex); + const interval: Interval = Interval.of(startIndex, stopIndex); console.log("reportContextSensitivity decision=" + dfa.decision + ":" + acceptState.s0.configs + ", input=" + this._parser.inputStream.getText(interval)); } if (this._parser != null) { - let listener = this._parser.getErrorListenerDispatch(); + const listener = this._parser.getErrorListenerDispatch(); if (listener.reportContextSensitivity) { listener.reportContextSensitivity(this._parser, dfa, startIndex, stopIndex, prediction, acceptState); } @@ -2421,22 +2421,22 @@ export class ParserATNSimulator extends ATNSimulator { /** If context sensitive parsing, we know it's ambiguity not conflict */ protected reportAmbiguity( - @NotNull dfa: DFA, + dfa: DFA, D: DFAState, // the DFA state from execATN(): void that had SLL conflicts startIndex: number, stopIndex: number, exact: boolean, - @NotNull ambigAlts: BitSet, - @NotNull configs: ATNConfigSet) // configs that LL not SLL considered conflicting + ambigAlts: BitSet, + configs: ATNConfigSet): void // configs that LL not SLL considered conflicting { if (ParserATNSimulator.debug || ParserATNSimulator.retry_debug) { - let interval: Interval = Interval.of(startIndex, stopIndex); + const interval: Interval = Interval.of(startIndex, stopIndex); console.log("reportAmbiguity " + ambigAlts + ":" + configs + ", input=" + this._parser.inputStream.getText(interval)); } if (this._parser != null) { - let listener = this._parser.getErrorListenerDispatch(); + const listener = this._parser.getErrorListenerDispatch(); if (listener.reportAmbiguity) { listener.reportAmbiguity(this._parser, dfa, startIndex, stopIndex, exact, ambigAlts, configs); } @@ -2448,8 +2448,8 @@ export class ParserATNSimulator extends ATNSimulator { return PredictionContext.EMPTY_FULL_STATE_KEY; } - let state: ATNState = this.atn.states[context.invokingState]; - let transition: RuleTransition = state.transition(0) as RuleTransition; + const state: ATNState = this.atn.states[context.invokingState]; + const transition: RuleTransition = state.transition(0) as RuleTransition; return transition.followState.stateNumber; } @@ -2459,9 +2459,9 @@ export class ParserATNSimulator extends ATNSimulator { } while (!context.isEmpty) { - let state: ATNState = this.atn.states[context.invokingState]; + const state: ATNState = this.atn.states[context.invokingState]; assert(state.numberOfTransitions === 1 && state.transition(0).serializationType === TransitionType.RULE); - let transition: RuleTransition = state.transition(0) as RuleTransition; + const transition: RuleTransition = state.transition(0) as RuleTransition; if (!transition.tailCall) { break; } diff --git a/src/atn/PlusBlockStartState.ts b/runtime/typescript/src/atn/PlusBlockStartState.ts similarity index 76% rename from src/atn/PlusBlockStartState.ts rename to runtime/typescript/src/atn/PlusBlockStartState.ts index 9e390735..68165a90 100644 --- a/src/atn/PlusBlockStartState.ts +++ b/runtime/typescript/src/atn/PlusBlockStartState.ts @@ -5,10 +5,11 @@ // ConvertTo-TS run at 2016-10-04T11:26:34.9572142-07:00 -import { ATNStateType } from "./ATNStateType"; -import { BlockStartState } from "./BlockStartState"; -import { Override } from "../Decorators"; -import { PlusLoopbackState } from "./PlusLoopbackState"; +import { + ATNStateType, + BlockStartState, + PlusLoopbackState +} from "../internal"; /** Start of `(A|B|...)+` loop. Technically a decision state, but * we don't use for code generation; somebody might need it, so I'm defining @@ -18,7 +19,7 @@ import { PlusLoopbackState } from "./PlusLoopbackState"; export class PlusBlockStartState extends BlockStartState { public loopBackState: PlusLoopbackState; - @Override + // @Override get stateType(): ATNStateType { return ATNStateType.PLUS_BLOCK_START; } diff --git a/src/atn/PlusLoopbackState.ts b/runtime/typescript/src/atn/PlusLoopbackState.ts similarity index 77% rename from src/atn/PlusLoopbackState.ts rename to runtime/typescript/src/atn/PlusLoopbackState.ts index b2747128..49198924 100644 --- a/src/atn/PlusLoopbackState.ts +++ b/runtime/typescript/src/atn/PlusLoopbackState.ts @@ -5,16 +5,17 @@ // ConvertTo-TS run at 2016-10-04T11:26:35.0257730-07:00 -import { ATNStateType } from "./ATNStateType"; -import { DecisionState } from "./DecisionState"; -import { Override } from "../Decorators"; +import { + ATNStateType, + DecisionState +} from "../internal"; /** Decision state for `A+` and `(A|B)+`. It has two transitions: * one to the loop back to start of the block and one to exit. */ export class PlusLoopbackState extends DecisionState { - @Override + // @Override get stateType(): ATNStateType { return ATNStateType.PLUS_LOOP_BACK; } diff --git a/src/atn/PrecedencePredicateTransition.ts b/runtime/typescript/src/atn/PrecedencePredicateTransition.ts similarity index 69% rename from src/atn/PrecedencePredicateTransition.ts rename to runtime/typescript/src/atn/PrecedencePredicateTransition.ts index 4615cf2e..dcc17045 100644 --- a/src/atn/PrecedencePredicateTransition.ts +++ b/runtime/typescript/src/atn/PrecedencePredicateTransition.ts @@ -5,11 +5,12 @@ // ConvertTo-TS run at 2016-10-04T11:26:35.0994191-07:00 -import { AbstractPredicateTransition } from "./AbstractPredicateTransition"; -import { ATNState } from "./ATNState"; -import { NotNull, Override } from "../Decorators"; -import { SemanticContext } from "./SemanticContext"; -import { TransitionType } from "./TransitionType"; +import { + ATNState, + AbstractPredicateTransition, + SemanticContext, + TransitionType +} from "../internal"; /** * @@ -18,22 +19,22 @@ import { TransitionType } from "./TransitionType"; export class PrecedencePredicateTransition extends AbstractPredicateTransition { public precedence: number; - constructor( @NotNull target: ATNState, precedence: number) { + constructor(target: ATNState, precedence: number) { super(target); this.precedence = precedence; } - @Override + // @Override get serializationType(): TransitionType { return TransitionType.PRECEDENCE; } - @Override + // @Override get isEpsilon(): boolean { return true; } - @Override + // @Override public matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean { return false; } @@ -42,7 +43,7 @@ export class PrecedencePredicateTransition extends AbstractPredicateTransition { return new SemanticContext.PrecedencePredicate(this.precedence); } - @Override + // @Override public toString(): string { return this.precedence + " >= _p"; } diff --git a/src/atn/PredicateEvalInfo.ts b/runtime/typescript/src/atn/PredicateEvalInfo.ts similarity index 86% rename from src/atn/PredicateEvalInfo.ts rename to runtime/typescript/src/atn/PredicateEvalInfo.ts index 98da2e49..457fa91c 100644 --- a/src/atn/PredicateEvalInfo.ts +++ b/runtime/typescript/src/atn/PredicateEvalInfo.ts @@ -5,11 +5,12 @@ // ConvertTo-TS run at 2016-10-04T11:26:35.1914305-07:00 -import { DecisionEventInfo } from "./DecisionEventInfo"; -import { NotNull } from "../Decorators"; -import { SemanticContext } from "./SemanticContext"; -import { SimulatorState } from "./SimulatorState"; -import { TokenStream } from "../TokenStream"; +import { + DecisionEventInfo, + SemanticContext, + SimulatorState, + TokenStream +} from "../internal"; /** * This class represents profiling event information for semantic predicate @@ -57,12 +58,12 @@ export class PredicateEvalInfo extends DecisionEventInfo { * @see SemanticContext#eval(Recognizer, RuleContext) */ constructor( - @NotNull state: SimulatorState, + state: SimulatorState, decision: number, - @NotNull input: TokenStream, + input: TokenStream, startIndex: number, stopIndex: number, - @NotNull semctx: SemanticContext, + semctx: SemanticContext, evalResult: boolean, predictedAlt: number) { diff --git a/src/atn/PredicateTransition.ts b/runtime/typescript/src/atn/PredicateTransition.ts similarity index 75% rename from src/atn/PredicateTransition.ts rename to runtime/typescript/src/atn/PredicateTransition.ts index 8a066f88..25ba625d 100644 --- a/src/atn/PredicateTransition.ts +++ b/runtime/typescript/src/atn/PredicateTransition.ts @@ -5,11 +5,12 @@ // ConvertTo-TS run at 2016-10-04T11:26:35.2826960-07:00 -import { AbstractPredicateTransition } from "./AbstractPredicateTransition"; -import { ATNState } from "./ATNState"; -import { NotNull, Override } from "../Decorators"; -import { SemanticContext } from "./SemanticContext"; -import { TransitionType } from "./TransitionType"; +import { + ATNState, + AbstractPredicateTransition, + SemanticContext, + TransitionType +} from "../internal"; /** TODO: this is old comment: * A tree of semantic predicates from the grammar AST if label==SEMPRED. @@ -22,22 +23,22 @@ export class PredicateTransition extends AbstractPredicateTransition { public predIndex: number; public isCtxDependent: boolean; // e.g., $i ref in pred - constructor(@NotNull target: ATNState, ruleIndex: number, predIndex: number, isCtxDependent: boolean) { + constructor(target: ATNState, ruleIndex: number, predIndex: number, isCtxDependent: boolean) { super(target); this.ruleIndex = ruleIndex; this.predIndex = predIndex; this.isCtxDependent = isCtxDependent; } - @Override + // @Override get serializationType(): TransitionType { return TransitionType.PREDICATE; } - @Override + // @Override get isEpsilon(): boolean { return true; } - @Override + // @Override public matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean { return false; } @@ -46,8 +47,8 @@ export class PredicateTransition extends AbstractPredicateTransition { return new SemanticContext.Predicate(this.ruleIndex, this.predIndex, this.isCtxDependent); } - @Override - @NotNull + // @Override + public toString(): string { return "pred_" + this.ruleIndex + ":" + this.predIndex; } diff --git a/src/atn/PredictionContext.ts b/runtime/typescript/src/atn/PredictionContext.ts similarity index 81% rename from src/atn/PredictionContext.ts rename to runtime/typescript/src/atn/PredictionContext.ts index deed68c0..4ecd198e 100644 --- a/src/atn/PredictionContext.ts +++ b/runtime/typescript/src/atn/PredictionContext.ts @@ -5,24 +5,24 @@ // ConvertTo-TS run at 2016-10-04T11:26:35.3812636-07:00 - -import { Array2DHashMap } from "../misc/Array2DHashMap"; -import { Array2DHashSet } from "../misc/Array2DHashSet"; -import { Arrays } from "../misc/Arrays"; -import { ATN } from "./ATN"; -import { ATNState } from "./ATNState"; -import { EqualityComparator } from "../misc/EqualityComparator"; -import { MurmurHash } from "../misc/MurmurHash"; -import { NotNull, Override } from "../Decorators"; -import { Equatable, JavaSet } from "../misc/Stubs"; -import { PredictionContextCache } from "./PredictionContextCache"; -import { Recognizer } from "../Recognizer"; -import { RuleContext } from "../RuleContext"; -import { RuleTransition } from "./RuleTransition"; - +import * as Arrays from "../internal"; import * as assert from "assert"; -const INITIAL_HASH: number = 1; +import { + ATN, + ATNState, + Array2DHashMap, + Array2DHashSet, + EqualityComparator, + MurmurHash, + PredictionContextCache, + Recognizer, + RuleContext, + RuleTransition +} from "../internal"; +import { Equatable, JavaSet } from "../internal"; + +const INITIAL_HASH = 1; export abstract class PredictionContext implements Equatable { /** @@ -69,11 +69,11 @@ export abstract class PredictionContext implements Equatable { protected static calculateHashCode(parents: PredictionContext[], returnStates: number[]): number { let hash: number = MurmurHash.initialize(INITIAL_HASH); - for (let parent of parents) { + for (const parent of parents) { hash = MurmurHash.update(hash, parent); } - for (let returnState of returnStates) { + for (const returnState of returnStates) { hash = MurmurHash.update(hash, returnState); } @@ -94,7 +94,7 @@ export abstract class PredictionContext implements Equatable { protected abstract removeEmptyContext(): PredictionContext; - public static fromRuleContext(atn: ATN, outerContext: RuleContext, fullContext: boolean = true): PredictionContext { + public static fromRuleContext(atn: ATN, outerContext: RuleContext, fullContext = true): PredictionContext { if (outerContext.isEmpty) { return fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL; } @@ -106,8 +106,8 @@ export abstract class PredictionContext implements Equatable { parent = fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL; } - let state: ATNState = atn.states[outerContext.invokingState]; - let transition: RuleTransition = state.transition(0) as RuleTransition; + const state: ATNState = atn.states[outerContext.invokingState]; + const transition: RuleTransition = state.transition(0) as RuleTransition; return parent.getChild(transition.followState.stateNumber); } @@ -119,7 +119,7 @@ export abstract class PredictionContext implements Equatable { return context.removeEmptyContext(); } - public static join(@NotNull context0: PredictionContext, @NotNull context1: PredictionContext, @NotNull contextCache: PredictionContextCache = PredictionContextCache.UNCACHED): PredictionContext { + public static join(context0: PredictionContext, context1: PredictionContext, contextCache: PredictionContextCache = PredictionContextCache.UNCACHED): PredictionContext { if (context0 === context1) { return context0; } @@ -130,10 +130,10 @@ export abstract class PredictionContext implements Equatable { return PredictionContext.isEmptyLocal(context1) ? context1 : PredictionContext.addEmptyContext(context0); } - let context0size: number = context0.size; - let context1size: number = context1.size; + const context0size: number = context0.size; + const context1size: number = context1.size; if (context0size === 1 && context1size === 1 && context0.getReturnState(0) === context1.getReturnState(0)) { - let merged: PredictionContext = contextCache.join(context0.getParent(0), context1.getParent(0)); + const merged: PredictionContext = contextCache.join(context0.getParent(0), context1.getParent(0)); if (merged === context0.getParent(0)) { return context0; } else if (merged === context1.getParent(0)) { @@ -143,13 +143,13 @@ export abstract class PredictionContext implements Equatable { } } - let count: number = 0; + let count = 0; let parentsList: PredictionContext[] = new Array(context0size + context1size); let returnStatesList: number[] = new Array(parentsList.length); - let leftIndex: number = 0; - let rightIndex: number = 0; - let canReturnLeft: boolean = true; - let canReturnRight: boolean = true; + let leftIndex = 0; + let rightIndex = 0; + let canReturnLeft = true; + let canReturnRight = true; while (leftIndex < context0size && rightIndex < context1size) { if (context0.getReturnState(leftIndex) === context1.getReturnState(rightIndex)) { parentsList[count] = contextCache.join(context0.getParent(leftIndex), context1.getParent(rightIndex)); @@ -216,9 +216,9 @@ export abstract class PredictionContext implements Equatable { } public static getCachedContext( - @NotNull context: PredictionContext, - @NotNull contextCache: Array2DHashMap, - @NotNull visited: PredictionContext.IdentityHashMap): PredictionContext { + context: PredictionContext, + contextCache: Array2DHashMap, + visited: PredictionContext.IdentityHashMap): PredictionContext { if (context.isEmpty) { return context; } @@ -234,10 +234,10 @@ export abstract class PredictionContext implements Equatable { return existing; } - let changed: boolean = false; + let changed = false; let parents: PredictionContext[] = new Array(context.size); for (let i = 0; i < parents.length; i++) { - let parent: PredictionContext = PredictionContext.getCachedContext(context.getParent(i), contextCache, visited); + const parent: PredictionContext = PredictionContext.getCachedContext(context.getParent(i), contextCache, visited); if (changed || parent !== context.getParent(i)) { if (!changed) { parents = new Array(context.size); @@ -263,7 +263,7 @@ export abstract class PredictionContext implements Equatable { if (parents.length === 1) { updated = new SingletonPredictionContext(parents[0], context.getReturnState(0)); } else { - let returnStates: number[] = new Array(context.size); + const returnStates: number[] = new Array(context.size); for (let i = 0; i < context.size; i++) { returnStates[i] = context.getReturnState(i); } @@ -292,7 +292,7 @@ export abstract class PredictionContext implements Equatable { public abstract readonly hasEmpty: boolean; - @Override + // @Override public hashCode(): number { return this.cachedHashCode; } @@ -301,25 +301,26 @@ export abstract class PredictionContext implements Equatable { public abstract equals(o: any): boolean; public toStrings(recognizer: Recognizer | undefined, currentState: number, stop: PredictionContext = PredictionContext.EMPTY_FULL): string[] { - let result: string[] = []; + const result: string[] = []; outer: for (let perm = 0; ; perm++) { - let offset: number = 0; - let last: boolean = true; + let offset = 0; + let last = true; + // eslint-disable-next-line @typescript-eslint/no-this-alias let p: PredictionContext = this; let stateNumber: number = currentState; - let localBuffer: string = ""; + let localBuffer = ""; localBuffer += "["; while (!p.isEmpty && p !== stop) { - let index: number = 0; + let index = 0; if (p.size > 0) { - let bits: number = 1; + let bits = 1; while (((1 << bits) >>> 0) < p.size) { bits++; } - let mask: number = ((1 << bits) >>> 0) - 1; + const mask: number = ((1 << bits) >>> 0) - 1; index = (perm >> offset) & mask; last = last && index >= p.size - 1; if (index >= p.size) { @@ -335,9 +336,9 @@ export abstract class PredictionContext implements Equatable { localBuffer += " "; } - let atn: ATN = recognizer.atn; - let s: ATNState = atn.states[stateNumber]; - let ruleName: string = recognizer.ruleNames[s.ruleIndex]; + const atn: ATN = recognizer.atn; + const s: ATNState = atn.states[stateNumber]; + const ruleName: string = recognizer.ruleNames[s.ruleIndex]; localBuffer += ruleName; } else if (p.getReturnState(index) !== PredictionContext.EMPTY_FULL_STATE_KEY) { if (!p.isEmpty) { @@ -378,62 +379,62 @@ class EmptyPredictionContext extends PredictionContext { return this.fullContext; } - @Override + // @Override protected addEmptyContext(): PredictionContext { return this; } - @Override + // @Override protected removeEmptyContext(): PredictionContext { throw new Error("Cannot remove the empty context from itself."); } - @Override + // @Override public getParent(index: number): PredictionContext { throw new Error("index out of bounds"); } - @Override + // @Override public getReturnState(index: number): number { throw new Error("index out of bounds"); } - @Override + // @Override public findReturnState(returnState: number): number { return -1; } - @Override + // @Override get size(): number { return 0; } - @Override + // @Override public appendSingleContext(returnContext: number, contextCache: PredictionContextCache): PredictionContext { return contextCache.getChild(this, returnContext); } - @Override + // @Override public appendContext(suffix: PredictionContext, contextCache: PredictionContextCache): PredictionContext { return suffix; } - @Override + // @Override get isEmpty(): boolean { return true; } - @Override + // @Override get hasEmpty(): boolean { return true; } - @Override + // @Override public equals(o: any): boolean { return this === o; } - @Override + // @Override public toStrings(recognizer: any, currentState: number, stop?: PredictionContext): string[] { return ["[]"]; } @@ -441,13 +442,13 @@ class EmptyPredictionContext extends PredictionContext { } class ArrayPredictionContext extends PredictionContext { - @NotNull + public parents: PredictionContext[]; - @NotNull + public returnStates: number[]; - constructor( @NotNull parents: PredictionContext[], returnStates: number[], hashCode?: number) { + constructor(parents: PredictionContext[], returnStates: number[], hashCode?: number) { super(hashCode || PredictionContext.calculateHashCode(parents, returnStates)); assert(parents.length === returnStates.length); assert(returnStates.length > 1 || returnStates[0] !== PredictionContext.EMPTY_FULL_STATE_KEY, "Should be using PredictionContext.EMPTY instead."); @@ -456,50 +457,50 @@ class ArrayPredictionContext extends PredictionContext { this.returnStates = returnStates; } - @Override + // @Override public getParent(index: number): PredictionContext { return this.parents[index]; } - @Override + // @Override public getReturnState(index: number): number { return this.returnStates[index]; } - @Override + // @Override public findReturnState(returnState: number): number { return Arrays.binarySearch(this.returnStates, returnState); } - @Override + // @Override get size(): number { return this.returnStates.length; } - @Override + // @Override get isEmpty(): boolean { return false; } - @Override + // @Override get hasEmpty(): boolean { return this.returnStates[this.returnStates.length - 1] === PredictionContext.EMPTY_FULL_STATE_KEY; } - @Override + // @Override protected addEmptyContext(): PredictionContext { if (this.hasEmpty) { return this; } - let parents2: PredictionContext[] = this.parents.slice(0); - let returnStates2: number[] = this.returnStates.slice(0); + const parents2: PredictionContext[] = this.parents.slice(0); + const returnStates2: number[] = this.returnStates.slice(0); parents2.push(PredictionContext.EMPTY_FULL); returnStates2.push(PredictionContext.EMPTY_FULL_STATE_KEY); return new ArrayPredictionContext(parents2, returnStates2); } - @Override + // @Override protected removeEmptyContext(): PredictionContext { if (!this.hasEmpty) { return this; @@ -508,13 +509,13 @@ class ArrayPredictionContext extends PredictionContext { if (this.returnStates.length === 2) { return new SingletonPredictionContext(this.parents[0], this.returnStates[0]); } else { - let parents2: PredictionContext[] = this.parents.slice(0, this.parents.length - 1); - let returnStates2: number[] = this.returnStates.slice(0, this.returnStates.length - 1); + const parents2: PredictionContext[] = this.parents.slice(0, this.parents.length - 1); + const returnStates2: number[] = this.returnStates.slice(0, this.returnStates.length - 1); return new ArrayPredictionContext(parents2, returnStates2); } } - @Override + // @Override public appendContext(suffix: PredictionContext, contextCache: PredictionContextCache): PredictionContext { return ArrayPredictionContext.appendContextImpl(this, suffix, new PredictionContext.IdentityHashMap()); } @@ -546,8 +547,8 @@ class ArrayPredictionContext extends PredictionContext { parentCount--; } - let updatedParents: PredictionContext[] = new Array(parentCount); - let updatedReturnStates: number[] = new Array(parentCount); + const updatedParents: PredictionContext[] = new Array(parentCount); + const updatedReturnStates: number[] = new Array(parentCount); for (let i = 0; i < parentCount; i++) { updatedReturnStates[i] = context.getReturnState(i); } @@ -574,7 +575,7 @@ class ArrayPredictionContext extends PredictionContext { return result; } - @Override + // @Override public equals(o: any): boolean { if (this === o) { return true; @@ -587,28 +588,28 @@ class ArrayPredictionContext extends PredictionContext { return false; } - let other: ArrayPredictionContext = o; + const other: ArrayPredictionContext = o; return this.equalsImpl(other, new Array2DHashSet()); } private equalsImpl(other: ArrayPredictionContext, visited: JavaSet): boolean { - let selfWorkList: PredictionContext[] = []; - let otherWorkList: PredictionContext[] = []; + const selfWorkList: PredictionContext[] = []; + const otherWorkList: PredictionContext[] = []; selfWorkList.push(this); otherWorkList.push(other); while (true) { - let currentSelf = selfWorkList.pop(); - let currentOther = otherWorkList.pop(); + const currentSelf = selfWorkList.pop(); + const currentOther = otherWorkList.pop(); if (!currentSelf || !currentOther) { break; } - let operands: PredictionContextCache.IdentityCommutativePredictionContextOperands = new PredictionContextCache.IdentityCommutativePredictionContextOperands(currentSelf, currentOther); + const operands: PredictionContextCache.IdentityCommutativePredictionContextOperands = new PredictionContextCache.IdentityCommutativePredictionContextOperands(currentSelf, currentOther); if (!visited.add(operands)) { continue; } - let selfSize: number = operands.x.size; + const selfSize: number = operands.x.size; if (selfSize === 0) { if (!operands.x.equals(operands.y)) { return false; @@ -617,7 +618,7 @@ class ArrayPredictionContext extends PredictionContext { continue; } - let otherSize: number = operands.y.size; + const otherSize: number = operands.y.size; if (selfSize !== otherSize) { return false; } @@ -627,8 +628,8 @@ class ArrayPredictionContext extends PredictionContext { return false; } - let selfParent: PredictionContext = operands.x.getParent(i); - let otherParent: PredictionContext = operands.y.getParent(i); + const selfParent: PredictionContext = operands.x.getParent(i); + const otherParent: PredictionContext = operands.y.getParent(i); if (selfParent.hashCode() !== otherParent.hashCode()) { return false; } @@ -646,67 +647,67 @@ class ArrayPredictionContext extends PredictionContext { export class SingletonPredictionContext extends PredictionContext { - @NotNull + public parent: PredictionContext; public returnState: number; - constructor(@NotNull parent: PredictionContext, returnState: number) { + constructor(parent: PredictionContext, returnState: number) { super(PredictionContext.calculateSingleHashCode(parent, returnState)); // assert(returnState != PredictionContext.EMPTY_FULL_STATE_KEY && returnState != PredictionContext.EMPTY_LOCAL_STATE_KEY); this.parent = parent; this.returnState = returnState; } - @Override + // @Override public getParent(index: number): PredictionContext { // assert(index == 0); return this.parent; } - @Override + // @Override public getReturnState(index: number): number { // assert(index == 0); return this.returnState; } - @Override + // @Override public findReturnState(returnState: number): number { return this.returnState === returnState ? 0 : -1; } - @Override + // @Override get size(): number { return 1; } - @Override + // @Override get isEmpty(): boolean { return false; } - @Override + // @Override get hasEmpty(): boolean { return false; } - @Override + // @Override public appendContext(suffix: PredictionContext, contextCache: PredictionContextCache): PredictionContext { return contextCache.getChild(this.parent.appendContext(suffix, contextCache), this.returnState); } - @Override + // @Override protected addEmptyContext(): PredictionContext { - let parents: PredictionContext[] = [this.parent, PredictionContext.EMPTY_FULL]; - let returnStates: number[] = [this.returnState, PredictionContext.EMPTY_FULL_STATE_KEY]; + const parents: PredictionContext[] = [this.parent, PredictionContext.EMPTY_FULL]; + const returnStates: number[] = [this.returnState, PredictionContext.EMPTY_FULL_STATE_KEY]; return new ArrayPredictionContext(parents, returnStates); } - @Override + // @Override protected removeEmptyContext(): PredictionContext { return this; } - @Override + // @Override public equals(o: any): boolean { if (o === this) { return true; @@ -714,7 +715,7 @@ export class SingletonPredictionContext extends PredictionContext { return false; } - let other: SingletonPredictionContext = o; + const other: SingletonPredictionContext = o; if (this.hashCode() !== other.hashCode()) { return false; } @@ -739,16 +740,16 @@ export namespace PredictionContext { export class IdentityEqualityComparator implements EqualityComparator { public static readonly INSTANCE: IdentityEqualityComparator = new IdentityEqualityComparator(); - private IdentityEqualityComparator() { + private IdentityEqualityComparator(): void { // intentionally empty } - @Override + // @Override public hashCode(obj: PredictionContext): number { return obj.hashCode(); } - @Override + // @Override public equals(a: PredictionContext, b: PredictionContext): boolean { return a === b; } diff --git a/src/atn/PredictionContextCache.ts b/runtime/typescript/src/atn/PredictionContextCache.ts similarity index 81% rename from src/atn/PredictionContextCache.ts rename to runtime/typescript/src/atn/PredictionContextCache.ts index 87760cd7..b3ec3c09 100644 --- a/src/atn/PredictionContextCache.ts +++ b/runtime/typescript/src/atn/PredictionContextCache.ts @@ -5,13 +5,15 @@ // ConvertTo-TS run at 2016-10-04T11:26:35.6390614-07:00 -import { Array2DHashMap } from "../misc/Array2DHashMap"; -import { Override } from "../Decorators"; -import { JavaMap } from "../misc/Stubs"; -import { ObjectEqualityComparator } from "../misc/ObjectEqualityComparator"; -import { PredictionContext } from "./PredictionContext"; import * as assert from "assert"; +import { + Array2DHashMap, + JavaMap, + ObjectEqualityComparator, + PredictionContext +} from "../internal"; + /** Used to cache {@link PredictionContext} objects. Its used for the shared * context cash associated with contexts in DFA states. This cache * can be used for both lexers and parsers. @@ -30,7 +32,7 @@ export class PredictionContextCache { private enableCache: boolean; - constructor(enableCache: boolean = true) { + constructor(enableCache = true) { this.enableCache = enableCache; } @@ -53,7 +55,7 @@ export class PredictionContextCache { return context.getChild(invokingState); } - let operands: PredictionContextCache.PredictionContextAndInt = new PredictionContextCache.PredictionContextAndInt(context, invokingState); + const operands: PredictionContextCache.PredictionContextAndInt = new PredictionContextCache.PredictionContextAndInt(context, invokingState); let result = this.childContexts.get(operands); if (!result) { result = context.getChild(invokingState); @@ -69,7 +71,7 @@ export class PredictionContextCache { return PredictionContext.join(x, y, this); } - let operands: PredictionContextCache.IdentityCommutativePredictionContextOperands = new PredictionContextCache.IdentityCommutativePredictionContextOperands(x, y); + const operands: PredictionContextCache.IdentityCommutativePredictionContextOperands = new PredictionContextCache.IdentityCommutativePredictionContextOperands(x, y); let result = this.joinContexts.get(operands); if (result) { return result; @@ -92,22 +94,22 @@ export namespace PredictionContextCache { this.value = value; } - @Override - public equals(obj: any): boolean { + // @Override + public equals(obj: object): boolean { if (!(obj instanceof PredictionContextAndInt)) { return false; } else if (obj === this) { return true; } - let other: PredictionContextAndInt = obj; + const other: PredictionContextAndInt = obj; return this.value === other.value && (this.obj === other.obj || (this.obj != null && this.obj.equals(other.obj))); } - @Override + // @Override public hashCode(): number { - let hashCode: number = 5; + let hashCode = 5; hashCode = 7 * hashCode + (this.obj != null ? this.obj.hashCode() : 0); hashCode = 7 * hashCode + this.value; return hashCode; @@ -133,19 +135,19 @@ export namespace PredictionContextCache { return this._y; } - @Override - public equals(o: any): boolean { + // @Override + public equals(o: object): boolean { if (!(o instanceof IdentityCommutativePredictionContextOperands)) { return false; } else if (this === o) { return true; } - let other: IdentityCommutativePredictionContextOperands = o; + const other: IdentityCommutativePredictionContextOperands = o; return (this._x === other._x && this._y === other._y) || (this._x === other._y && this._y === other._x); } - @Override + // @Override public hashCode(): number { return this._x.hashCode() ^ this._y.hashCode(); } diff --git a/src/atn/PredictionMode.ts b/runtime/typescript/src/atn/PredictionMode.ts similarity index 88% rename from src/atn/PredictionMode.ts rename to runtime/typescript/src/atn/PredictionMode.ts index 9149f7d2..cd552545 100644 --- a/src/atn/PredictionMode.ts +++ b/runtime/typescript/src/atn/PredictionMode.ts @@ -5,18 +5,19 @@ // ConvertTo-TS run at 2016-10-04T11:26:36.2673893-07:00 -import { Array2DHashMap } from "../misc/Array2DHashMap"; -import { ATN } from "./ATN"; -import { ATNConfig } from "./ATNConfig"; -import { ATNConfigSet } from "./ATNConfigSet"; -import { ATNState } from "./ATNState"; -import { BitSet } from "../misc/BitSet"; -import { EqualityComparator } from "../misc/EqualityComparator"; -import { MurmurHash } from "../misc/MurmurHash"; -import { ObjectEqualityComparator } from "../misc/ObjectEqualityComparator"; -import { Override } from "../Decorators"; -import { RuleStopState } from "./RuleStopState"; -import { SemanticContext } from "./SemanticContext"; +import { + ATN, + ATNConfig, + ATNConfigSet, + ATNState, + Array2DHashMap, + BitSet, + EqualityComparator, + MurmurHash, + ObjectEqualityComparator, + RuleStopState, + SemanticContext +} from "../internal"; /** * This enumeration defines the prediction modes available in ANTLR 4 along with @@ -91,7 +92,7 @@ export namespace PredictionMode { class AltAndContextConfigEqualityComparator implements EqualityComparator { public static readonly INSTANCE: AltAndContextConfigEqualityComparator = new AltAndContextConfigEqualityComparator(); - private AltAndContextConfigEqualityComparator() { + private AltAndContextConfigEqualityComparator(): void { // intentionally empty } @@ -99,7 +100,7 @@ export namespace PredictionMode { * The hash code is only a function of the {@link ATNState#stateNumber} * and {@link ATNConfig#context}. */ - @Override + // @Override public hashCode(o: ATNConfig): number { let hashCode: number = MurmurHash.initialize(7); hashCode = MurmurHash.update(hashCode, o.state.stateNumber); @@ -108,7 +109,7 @@ export namespace PredictionMode { return hashCode; } - @Override + // @Override public equals(a: ATNConfig, b: ATNConfig): boolean { if (a === b) { return true; @@ -132,7 +133,7 @@ export namespace PredictionMode { * {@link RuleStopState}, otherwise `false` */ export function hasConfigInRuleStopState(configs: ATNConfigSet): boolean { - for (let c of configs) { + for (const c of configs) { if (c.state instanceof RuleStopState) { return true; } @@ -152,7 +153,7 @@ export namespace PredictionMode { * {@link RuleStopState}, otherwise `false` */ export function allConfigsInRuleStopStates(/*@NotNull*/ configs: ATNConfigSet): boolean { - for (let config of configs) { + for (const config of configs) { if (!(config.state instanceof RuleStopState)) { return false; } diff --git a/src/atn/ProfilingATNSimulator.ts b/runtime/typescript/src/atn/ProfilingATNSimulator.ts similarity index 77% rename from src/atn/ProfilingATNSimulator.ts rename to runtime/typescript/src/atn/ProfilingATNSimulator.ts index 6a453aba..bb4a9620 100644 --- a/src/atn/ProfilingATNSimulator.ts +++ b/runtime/typescript/src/atn/ProfilingATNSimulator.ts @@ -5,26 +5,27 @@ // ConvertTo-TS run at 2016-10-04T11:26:36.4188352-07:00 -import { AmbiguityInfo } from "./AmbiguityInfo"; -import { ATN } from "./ATN"; -import { ATNConfigSet } from "./ATNConfigSet"; -import { ATNSimulator } from "./ATNSimulator"; -import { BitSet } from "../misc/BitSet"; -import { ContextSensitivityInfo } from "./ContextSensitivityInfo"; -import { DecisionInfo } from "./DecisionInfo"; -import { DFA } from "../dfa/DFA"; -import { DFAState } from "../dfa/DFAState"; -import { ErrorInfo } from "./ErrorInfo"; -import { NotNull, Override } from "../Decorators"; -import { LookaheadEventInfo } from "./LookaheadEventInfo"; -import { Parser } from "../Parser"; -import { ParserATNSimulator } from "./ParserATNSimulator"; -import { ParserRuleContext } from "../ParserRuleContext"; -import { PredicateEvalInfo } from "./PredicateEvalInfo"; -import { PredictionContextCache } from "./PredictionContextCache"; -import { SemanticContext } from "./SemanticContext"; -import { SimulatorState } from "./SimulatorState"; -import { TokenStream } from "../TokenStream"; +import { + ATN, + ATNConfigSet, + ATNSimulator, + AmbiguityInfo, + BitSet, + ContextSensitivityInfo, + DFA, + DFAState, + DecisionInfo, + ErrorInfo, + LookaheadEventInfo, + Parser, + ParserATNSimulator, + ParserRuleContext, + PredicateEvalInfo, + PredictionContextCache, + SemanticContext, + SimulatorState, + TokenStream +} from "../internal"; /** * @since 4.3 @@ -34,11 +35,11 @@ export class ProfilingATNSimulator extends ParserATNSimulator { protected numDecisions: number; protected _input: TokenStream | undefined; - protected _startIndex: number = 0; - protected _sllStopIndex: number = 0; - protected _llStopIndex: number = 0; + protected _startIndex = 0; + protected _sllStopIndex = 0; + protected _llStopIndex = 0; - protected currentDecision: number = 0; + protected currentDecision = 0; protected currentState: SimulatorState | undefined; /** At the point of LL failover, we record how SLL would resolve the conflict so that @@ -52,7 +53,7 @@ export class ProfilingATNSimulator extends ParserATNSimulator { * It may in fact still be a context sensitivity but we don't know by looking at the * minimum alternatives for the current input. */ - protected conflictingAltResolvedBySLL: number = 0; + protected conflictingAltResolvedBySLL = 0; constructor(parser: Parser) { super(parser.interpreter.atn, parser); @@ -67,9 +68,9 @@ export class ProfilingATNSimulator extends ParserATNSimulator { public adaptivePredict(/*@NotNull*/ input: TokenStream, decision: number, outerContext: ParserRuleContext | undefined): number; public adaptivePredict(/*@NotNull*/ input: TokenStream, decision: number, outerContext: ParserRuleContext | undefined, useContext: boolean): number; - @Override + // @Override public adaptivePredict( - @NotNull input: TokenStream, + input: TokenStream, decision: number, outerContext: ParserRuleContext | undefined, useContext?: boolean): number { @@ -86,9 +87,9 @@ export class ProfilingATNSimulator extends ParserATNSimulator { this.currentDecision = decision; this.currentState = undefined; this.conflictingAltResolvedBySLL = ATN.INVALID_ALT_NUMBER; - let start: number[] = process.hrtime(); - let alt: number = super.adaptivePredict(input, decision, outerContext); - let stop: number[] = process.hrtime(); + const start: number[] = process.hrtime(); + const alt: number = super.adaptivePredict(input, decision, outerContext); + const stop: number[] = process.hrtime(); let nanoseconds: number = (stop[0] - start[0]) * 1000000000; if (nanoseconds === 0) { @@ -101,7 +102,7 @@ export class ProfilingATNSimulator extends ParserATNSimulator { this.decisions[decision].timeInPrediction += nanoseconds; this.decisions[decision].invocations++; - let SLL_k: number = this._sllStopIndex - this._startIndex + 1; + const SLL_k: number = this._sllStopIndex - this._startIndex + 1; this.decisions[decision].SLL_TotalLook += SLL_k; this.decisions[decision].SLL_MinLook = this.decisions[decision].SLL_MinLook === 0 ? SLL_k : Math.min(this.decisions[decision].SLL_MinLook, SLL_k); if (SLL_k > this.decisions[decision].SLL_MaxLook) { @@ -111,7 +112,7 @@ export class ProfilingATNSimulator extends ParserATNSimulator { } if (this._llStopIndex >= 0) { - let LL_k: number = this._llStopIndex - this._startIndex + 1; + const LL_k: number = this._llStopIndex - this._startIndex + 1; this.decisions[decision].LL_TotalLook += LL_k; this.decisions[decision].LL_MinLook = this.decisions[decision].LL_MinLook === 0 ? LL_k : Math.min(this.decisions[decision].LL_MinLook, LL_k); if (LL_k > this.decisions[decision].LL_MaxLook) { @@ -129,27 +130,27 @@ export class ProfilingATNSimulator extends ParserATNSimulator { } } - @Override + // @Override protected getStartState(dfa: DFA, input: TokenStream, outerContext: ParserRuleContext, useContext: boolean): SimulatorState | undefined { - let state: SimulatorState | undefined = super.getStartState(dfa, input, outerContext, useContext); + const state: SimulatorState | undefined = super.getStartState(dfa, input, outerContext, useContext); this.currentState = state; return state; } - @Override + // @Override protected computeStartState(dfa: DFA, globalContext: ParserRuleContext, useContext: boolean): SimulatorState { - let state: SimulatorState = super.computeStartState(dfa, globalContext, useContext); + const state: SimulatorState = super.computeStartState(dfa, globalContext, useContext); this.currentState = state; return state; } - @Override + // @Override protected computeReachSet(dfa: DFA, previous: SimulatorState, t: number, contextCache: PredictionContextCache): SimulatorState | undefined { if (this._input === undefined) { throw new Error("Invalid state"); } - let reachState: SimulatorState | undefined = super.computeReachSet(dfa, previous, t, contextCache); + const reachState: SimulatorState | undefined = super.computeReachSet(dfa, previous, t, contextCache); if (reachState == null) { // no reach on current lookahead symbol. ERROR. this.decisions[this.currentDecision].errors.push( @@ -161,7 +162,7 @@ export class ProfilingATNSimulator extends ParserATNSimulator { return reachState; } - @Override + // @Override protected getExistingTargetState(previousD: DFAState, t: number): DFAState | undefined { if (this.currentState === undefined || this._input === undefined) { throw new Error("Invalid state"); @@ -175,7 +176,7 @@ export class ProfilingATNSimulator extends ParserATNSimulator { this._sllStopIndex = this._input.index; } - let existingTargetState: DFAState | undefined = super.getExistingTargetState(previousD, t); + const existingTargetState: DFAState | undefined = super.getExistingTargetState(previousD, t); if (existingTargetState != null) { // this method is directly called by execDFA; must construct a SimulatorState // to represent the current state for this case @@ -189,7 +190,7 @@ export class ProfilingATNSimulator extends ParserATNSimulator { } if (existingTargetState === ATNSimulator.ERROR) { - let state: SimulatorState = new SimulatorState(this.currentState.outerContext, previousD, this.currentState.useContext, this.currentState.remainingOuterContext); + const state: SimulatorState = new SimulatorState(this.currentState.outerContext, previousD, this.currentState.useContext, this.currentState.remainingOuterContext); this.decisions[this.currentDecision].errors.push( new ErrorInfo(this.currentDecision, state, this._input, this._startIndex, this._input.index), ); @@ -199,9 +200,9 @@ export class ProfilingATNSimulator extends ParserATNSimulator { return existingTargetState; } - @Override + // @Override protected computeTargetState(dfa: DFA, s: DFAState, remainingGlobalContext: ParserRuleContext, t: number, useContext: boolean, contextCache: PredictionContextCache): [DFAState, ParserRuleContext | undefined] { - let targetState: [DFAState, ParserRuleContext | undefined] = super.computeTargetState(dfa, s, remainingGlobalContext, t, useContext, contextCache); + const targetState: [DFAState, ParserRuleContext | undefined] = super.computeTargetState(dfa, s, remainingGlobalContext, t, useContext, contextCache); if (useContext) { this.decisions[this.currentDecision].LL_ATNTransitions++; @@ -213,16 +214,16 @@ export class ProfilingATNSimulator extends ParserATNSimulator { return targetState; } - @Override + // @Override protected evalSemanticContextImpl(pred: SemanticContext, parserCallStack: ParserRuleContext, alt: number): boolean { if (this.currentState === undefined || this._input === undefined) { throw new Error("Invalid state"); } - let result: boolean = super.evalSemanticContextImpl(pred, parserCallStack, alt); + const result: boolean = super.evalSemanticContextImpl(pred, parserCallStack, alt); if (!(pred instanceof SemanticContext.PrecedencePredicate)) { - let fullContext: boolean = this._llStopIndex >= 0; - let stopIndex: number = fullContext ? this._llStopIndex : this._sllStopIndex; + const fullContext: boolean = this._llStopIndex >= 0; + const stopIndex: number = fullContext ? this._llStopIndex : this._sllStopIndex; this.decisions[this.currentDecision].predicateEvals.push( new PredicateEvalInfo(this.currentState, this.currentDecision, this._input, this._startIndex, stopIndex, pred, result, alt), ); @@ -231,7 +232,7 @@ export class ProfilingATNSimulator extends ParserATNSimulator { return result; } - @Override + // @Override protected reportContextSensitivity(dfa: DFA, prediction: number, acceptState: SimulatorState, startIndex: number, stopIndex: number): void { if (this._input === undefined) { throw new Error("Invalid state"); @@ -245,7 +246,7 @@ export class ProfilingATNSimulator extends ParserATNSimulator { super.reportContextSensitivity(dfa, prediction, acceptState, startIndex, stopIndex); } - @Override + // @Override protected reportAttemptingFullContext(dfa: DFA, conflictingAlts: BitSet, conflictState: SimulatorState, startIndex: number, stopIndex: number): void { if (conflictingAlts != null) { this.conflictingAltResolvedBySLL = conflictingAlts.nextSetBit(0); @@ -257,8 +258,8 @@ export class ProfilingATNSimulator extends ParserATNSimulator { super.reportAttemptingFullContext(dfa, conflictingAlts, conflictState, startIndex, stopIndex); } - @Override - protected reportAmbiguity(@NotNull dfa: DFA, D: DFAState, startIndex: number, stopIndex: number, exact: boolean, @NotNull ambigAlts: BitSet, @NotNull configs: ATNConfigSet): void { + // @Override + protected reportAmbiguity(dfa: DFA, D: DFAState, startIndex: number, stopIndex: number, exact: boolean, ambigAlts: BitSet, configs: ATNConfigSet): void { if (this.currentState === undefined || this._input === undefined) { throw new Error("Invalid state"); } diff --git a/src/atn/RangeTransition.ts b/runtime/typescript/src/atn/RangeTransition.ts similarity index 68% rename from src/atn/RangeTransition.ts rename to runtime/typescript/src/atn/RangeTransition.ts index 05dd9904..c3958f1e 100644 --- a/src/atn/RangeTransition.ts +++ b/runtime/typescript/src/atn/RangeTransition.ts @@ -5,40 +5,41 @@ // ConvertTo-TS run at 2016-10-04T11:26:36.5959980-07:00 -import { ATNState } from "./ATNState"; -import { IntervalSet } from "../misc/IntervalSet"; -import { Override, NotNull } from "../Decorators"; -import { Transition } from "./Transition"; -import { TransitionType } from "./TransitionType"; +import { + ATNState, + IntervalSet, + Transition, + TransitionType +} from "../internal"; export class RangeTransition extends Transition { public from: number; public to: number; - constructor(@NotNull target: ATNState, from: number, to: number) { + constructor(target: ATNState, from: number, to: number) { super(target); this.from = from; this.to = to; } - @Override + // @Override get serializationType(): TransitionType { return TransitionType.RANGE; } - @Override - @NotNull + // @Override + get label(): IntervalSet { return IntervalSet.of(this.from, this.to); } - @Override + // @Override public matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean { return symbol >= this.from && symbol <= this.to; } - @Override - @NotNull + // @Override + public toString(): string { return "'" + String.fromCodePoint(this.from) + "'..'" + String.fromCodePoint(this.to) + "'"; } diff --git a/src/atn/RuleStartState.ts b/runtime/typescript/src/atn/RuleStartState.ts similarity index 58% rename from src/atn/RuleStartState.ts rename to runtime/typescript/src/atn/RuleStartState.ts index 9e6647ba..995ae3fb 100644 --- a/src/atn/RuleStartState.ts +++ b/runtime/typescript/src/atn/RuleStartState.ts @@ -5,17 +5,18 @@ // ConvertTo-TS run at 2016-10-04T11:26:36.6806851-07:00 -import { ATNState } from "./ATNState"; -import { ATNStateType } from "./ATNStateType"; -import { Override } from "../Decorators"; -import { RuleStopState } from "./RuleStopState"; +import { + ATNState, + ATNStateType, + RuleStopState +} from "../internal"; export class RuleStartState extends ATNState { public stopState: RuleStopState; - public isPrecedenceRule: boolean = false; - public leftFactored: boolean = false; + public isPrecedenceRule = false; + public leftFactored = false; - @Override + // @Override get stateType(): ATNStateType { return ATNStateType.RULE_START; } diff --git a/src/atn/RuleStopState.ts b/runtime/typescript/src/atn/RuleStopState.ts similarity index 81% rename from src/atn/RuleStopState.ts rename to runtime/typescript/src/atn/RuleStopState.ts index 4de652c5..0adfa3cc 100644 --- a/src/atn/RuleStopState.ts +++ b/runtime/typescript/src/atn/RuleStopState.ts @@ -5,9 +5,10 @@ // ConvertTo-TS run at 2016-10-04T11:26:36.7513856-07:00 -import { ATNState } from "./ATNState"; -import { ATNStateType } from "./ATNStateType"; -import { Override } from "../Decorators"; +import { + ATNState, + ATNStateType +} from "../internal"; /** The last node in the ATN for a rule, unless that rule is the start symbol. * In that case, there is one transition to EOF. Later, we might encode @@ -16,12 +17,12 @@ import { Override } from "../Decorators"; */ export class RuleStopState extends ATNState { - @Override + // @Override get nonStopStateNumber(): number { return -1; } - @Override + // @Override get stateType(): ATNStateType { return ATNStateType.RULE_STOP; } diff --git a/src/atn/RuleTransition.ts b/runtime/typescript/src/atn/RuleTransition.ts similarity index 65% rename from src/atn/RuleTransition.ts rename to runtime/typescript/src/atn/RuleTransition.ts index 55d602f8..bd8161fb 100644 --- a/src/atn/RuleTransition.ts +++ b/runtime/typescript/src/atn/RuleTransition.ts @@ -5,11 +5,12 @@ // ConvertTo-TS run at 2016-10-04T11:26:36.8294453-07:00 -import { ATNState } from "./ATNState"; -import { Override, NotNull } from "../Decorators"; -import { RuleStartState } from "./RuleStartState"; -import { Transition } from "./Transition"; -import { TransitionType } from "./TransitionType"; +import { + ATNState, + RuleStartState, + Transition, + TransitionType +} from "../internal"; /** */ export class RuleTransition extends Transition { @@ -19,30 +20,30 @@ export class RuleTransition extends Transition { public precedence: number; /** What node to begin computations following ref to rule */ - @NotNull + public followState: ATNState; - public tailCall: boolean = false; - public optimizedTailCall: boolean = false; + public tailCall = false; + public optimizedTailCall = false; - constructor(@NotNull ruleStart: RuleStartState, ruleIndex: number, precedence: number, @NotNull followState: ATNState) { + constructor(ruleStart: RuleStartState, ruleIndex: number, precedence: number, followState: ATNState) { super(ruleStart); this.ruleIndex = ruleIndex; this.precedence = precedence; this.followState = followState; } - @Override + // @Override get serializationType(): TransitionType { return TransitionType.RULE; } - @Override + // @Override get isEpsilon(): boolean { return true; } - @Override + // @Override public matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean { return false; } diff --git a/src/atn/SemanticContext.ts b/runtime/typescript/src/atn/SemanticContext.ts similarity index 80% rename from src/atn/SemanticContext.ts rename to runtime/typescript/src/atn/SemanticContext.ts index 5075a490..04445c32 100644 --- a/src/atn/SemanticContext.ts +++ b/runtime/typescript/src/atn/SemanticContext.ts @@ -5,26 +5,28 @@ // ConvertTo-TS run at 2016-10-04T11:26:36.9521478-07:00 -import { Array2DHashSet } from "../misc/Array2DHashSet"; -import { ArrayEqualityComparator } from "../misc/ArrayEqualityComparator"; -import { Comparable } from "../misc/Stubs"; -import { Equatable } from "../misc/Stubs"; -import { MurmurHash } from "../misc/MurmurHash"; -import { NotNull, Override } from "../Decorators"; -import { ObjectEqualityComparator } from "../misc/ObjectEqualityComparator"; -import { Recognizer } from "../Recognizer"; -import { RuleContext } from "../RuleContext"; -import * as Utils from "../misc/Utils"; +import * as Utils from "../internal"; + +import { + Array2DHashSet, + ArrayEqualityComparator, + Comparable, + Equatable, + MurmurHash, + ObjectEqualityComparator, + Recognizer, + RuleContext +} from "../internal"; function max>(items: Iterable): T | undefined { let result: T | undefined; - for (let current of items) { + for (const current of items) { if (result === undefined) { result = current; continue; } - let comparison = result.compareTo(current); + const comparison = result.compareTo(current); if (comparison < 0) { result = current; } @@ -35,13 +37,13 @@ function max>(items: Iterable): T | undefined { function min>(items: Iterable): T | undefined { let result: T | undefined; - for (let current of items) { + for (const current of items) { if (result === undefined) { result = current; continue; } - let comparison = result.compareTo(current); + const comparison = result.compareTo(current); if (comparison > 0) { result = current; } @@ -110,7 +112,7 @@ export abstract class SemanticContext implements Equatable { public abstract hashCode(): number; - public abstract equals(obj: any): boolean; + public abstract equals(obj: object): boolean; public static and(a: SemanticContext | undefined, b: SemanticContext): SemanticContext { if (!a || a === SemanticContext.NONE) { @@ -119,7 +121,7 @@ export abstract class SemanticContext implements Equatable { if (b === SemanticContext.NONE) { return a; } - let result: SemanticContext.AND = new SemanticContext.AND(a, b); + const result: SemanticContext.AND = new SemanticContext.AND(a, b); if (result.opnds.length === 1) { return result.opnds[0]; } @@ -139,7 +141,7 @@ export abstract class SemanticContext implements Equatable { if (a === SemanticContext.NONE || b === SemanticContext.NONE) { return SemanticContext.NONE; } - let result: SemanticContext.OR = new SemanticContext.OR(a, b); + const result: SemanticContext.OR = new SemanticContext.OR(a, b); if (result.opnds.length === 1) { return result.opnds[0]; } @@ -159,9 +161,9 @@ export namespace SemanticContext { const OR_HASHCODE = 486279973; function filterPrecedencePredicates(collection: SemanticContext[]): SemanticContext.PrecedencePredicate[] { - let result: SemanticContext.PrecedencePredicate[] = []; + const result: SemanticContext.PrecedencePredicate[] = []; for (let i = 0; i < collection.length; i++) { - let context: SemanticContext = collection[i]; + const context: SemanticContext = collection[i]; if (context instanceof SemanticContext.PrecedencePredicate) { result.push(context); @@ -182,20 +184,20 @@ export namespace SemanticContext { constructor(); constructor(ruleIndex: number, predIndex: number, isCtxDependent: boolean); - constructor(ruleIndex: number = -1, predIndex: number = -1, isCtxDependent: boolean = false) { + constructor(ruleIndex = -1, predIndex = -1, isCtxDependent = false) { super(); this.ruleIndex = ruleIndex; this.predIndex = predIndex; this.isCtxDependent = isCtxDependent; } - @Override + // @Override public eval(parser: Recognizer, parserCallStack: RuleContext): boolean { - let localctx: RuleContext | undefined = this.isCtxDependent ? parserCallStack : undefined; + const localctx: RuleContext | undefined = this.isCtxDependent ? parserCallStack : undefined; return parser.sempred(localctx, this.ruleIndex, this.predIndex); } - @Override + // @Override public hashCode(): number { let hashCode: number = MurmurHash.initialize(); hashCode = MurmurHash.update(hashCode, this.ruleIndex); @@ -205,8 +207,8 @@ export namespace SemanticContext { return hashCode; } - @Override - public equals(obj: any): boolean { + // @Override + public equals(obj: object): boolean { if (!(obj instanceof Predicate)) { return false; } @@ -218,7 +220,7 @@ export namespace SemanticContext { this.isCtxDependent === obj.isCtxDependent; } - @Override + // @Override public toString(): string { return "{" + this.ruleIndex + ":" + this.predIndex + "}?"; } @@ -232,12 +234,12 @@ export namespace SemanticContext { this.precedence = precedence; } - @Override + // @Override public eval(parser: Recognizer, parserCallStack: RuleContext): boolean { return parser.precpred(parserCallStack, this.precedence); } - @Override + // @Override public evalPrecedence(parser: Recognizer, parserCallStack: RuleContext): SemanticContext | undefined { if (parser.precpred(parserCallStack, this.precedence)) { return SemanticContext.NONE; @@ -247,20 +249,20 @@ export namespace SemanticContext { } } - @Override + // @Override public compareTo(o: PrecedencePredicate): number { return this.precedence - o.precedence; } - @Override + // @Override public hashCode(): number { - let hashCode: number = 1; + let hashCode = 1; hashCode = 31 * hashCode + this.precedence; return hashCode; } - @Override - public equals(obj: any): boolean { + // @Override + public equals(obj: object): boolean { if (!(obj instanceof PrecedencePredicate)) { return false; } @@ -272,7 +274,7 @@ export namespace SemanticContext { return this.precedence === obj.precedence; } - @Override + // @Override // precedence >= _precedenceStack.peek() public toString(): string { return "{" + this.precedence + ">=prec}?"; @@ -305,10 +307,10 @@ export namespace SemanticContext { export class AND extends Operator { public opnds: SemanticContext[]; - constructor(@NotNull a: SemanticContext, @NotNull b: SemanticContext) { + constructor(a: SemanticContext, b: SemanticContext) { super(); - let operands: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE); + const operands: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE); if (a instanceof AND) { operands.addAll(a.opnds); } else { @@ -322,22 +324,22 @@ export namespace SemanticContext { } this.opnds = operands.toArray(); - let precedencePredicates: PrecedencePredicate[] = filterPrecedencePredicates(this.opnds); + const precedencePredicates: PrecedencePredicate[] = filterPrecedencePredicates(this.opnds); // interested in the transition with the lowest precedence - let reduced = min(precedencePredicates); + const reduced = min(precedencePredicates); if (reduced) { this.opnds.push(reduced); } } - @Override + // @Override get operands(): Iterable { return this.opnds; } - @Override - public equals(obj: any): boolean { + // @Override + public equals(obj: object): boolean { if (this === obj) { return true; } @@ -347,7 +349,7 @@ export namespace SemanticContext { return ArrayEqualityComparator.INSTANCE.equals(this.opnds, obj.opnds); } - @Override + // @Override public hashCode(): number { return MurmurHash.hashCode(this.opnds, AND_HASHCODE); } @@ -358,9 +360,9 @@ export namespace SemanticContext { * The evaluation of predicates by this context is short-circuiting, but * unordered. */ - @Override + // @Override public eval(parser: Recognizer, parserCallStack: RuleContext): boolean { - for (let opnd of this.opnds) { + for (const opnd of this.opnds) { if (!opnd.eval(parser, parserCallStack)) { return false; } @@ -369,12 +371,12 @@ export namespace SemanticContext { return true; } - @Override + // @Override public evalPrecedence(parser: Recognizer, parserCallStack: RuleContext): SemanticContext | undefined { - let differs: boolean = false; - let operands: SemanticContext[] = []; - for (let context of this.opnds) { - let evaluated: SemanticContext | undefined = context.evalPrecedence(parser, parserCallStack); + let differs = false; + const operands: SemanticContext[] = []; + for (const context of this.opnds) { + const evaluated: SemanticContext | undefined = context.evalPrecedence(parser, parserCallStack); differs = differs || (evaluated !== context); if (evaluated == null) { // The AND context is false if any element is false @@ -403,7 +405,7 @@ export namespace SemanticContext { return result; } - @Override + // @Override public toString(): string { return Utils.join(this.opnds, "&&"); } @@ -416,10 +418,10 @@ export namespace SemanticContext { export class OR extends Operator { public opnds: SemanticContext[]; - constructor(@NotNull a: SemanticContext, @NotNull b: SemanticContext) { + constructor(a: SemanticContext, b: SemanticContext) { super(); - let operands: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE); + const operands: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE); if (a instanceof OR) { operands.addAll(a.opnds); } else { @@ -433,22 +435,22 @@ export namespace SemanticContext { } this.opnds = operands.toArray(); - let precedencePredicates: PrecedencePredicate[] = filterPrecedencePredicates(this.opnds); + const precedencePredicates: PrecedencePredicate[] = filterPrecedencePredicates(this.opnds); // interested in the transition with the highest precedence - let reduced = max(precedencePredicates); + const reduced = max(precedencePredicates); if (reduced) { this.opnds.push(reduced); } } - @Override + // @Override get operands(): Iterable { return this.opnds; } - @Override - public equals(obj: any): boolean { + // @Override + public equals(obj: object): boolean { if (this === obj) { return true; } @@ -458,7 +460,7 @@ export namespace SemanticContext { return ArrayEqualityComparator.INSTANCE.equals(this.opnds, obj.opnds); } - @Override + // @Override public hashCode(): number { return MurmurHash.hashCode(this.opnds, OR_HASHCODE); } @@ -469,9 +471,9 @@ export namespace SemanticContext { * The evaluation of predicates by this context is short-circuiting, but * unordered. */ - @Override + // @Override public eval(parser: Recognizer, parserCallStack: RuleContext): boolean { - for (let opnd of this.opnds) { + for (const opnd of this.opnds) { if (opnd.eval(parser, parserCallStack)) { return true; } @@ -480,12 +482,12 @@ export namespace SemanticContext { return false; } - @Override + // @Override public evalPrecedence(parser: Recognizer, parserCallStack: RuleContext): SemanticContext | undefined { - let differs: boolean = false; - let operands: SemanticContext[] = []; - for (let context of this.opnds) { - let evaluated: SemanticContext | undefined = context.evalPrecedence(parser, parserCallStack); + let differs = false; + const operands: SemanticContext[] = []; + for (const context of this.opnds) { + const evaluated: SemanticContext | undefined = context.evalPrecedence(parser, parserCallStack); differs = differs || (evaluated !== context); if (evaluated === SemanticContext.NONE) { // The OR context is true if any element is true @@ -513,7 +515,7 @@ export namespace SemanticContext { return result; } - @Override + // @Override public toString(): string { return Utils.join(this.opnds, "||"); } diff --git a/src/atn/SetTransition.ts b/runtime/typescript/src/atn/SetTransition.ts similarity index 66% rename from src/atn/SetTransition.ts rename to runtime/typescript/src/atn/SetTransition.ts index 170553b3..3e7b29c4 100644 --- a/src/atn/SetTransition.ts +++ b/runtime/typescript/src/atn/SetTransition.ts @@ -5,20 +5,21 @@ // ConvertTo-TS run at 2016-10-04T11:26:37.3060135-07:00 -import { ATNState } from "./ATNState"; -import { IntervalSet } from "../misc/IntervalSet"; -import { Override, NotNull, Nullable } from "../Decorators"; -import { Token } from "../Token"; -import { Transition } from "./Transition"; -import { TransitionType } from "./TransitionType"; +import { + ATNState, + IntervalSet, + Token, + Transition, + TransitionType +} from "../internal"; /** A transition containing a set of values. */ export class SetTransition extends Transition { - @NotNull + public set: IntervalSet; // TODO (sam): should we really allow undefined here? - constructor(@NotNull target: ATNState, @Nullable set: IntervalSet) { + constructor(target: ATNState, set?: IntervalSet) { super(target); if (set == null) { set = IntervalSet.of(Token.INVALID_TYPE); @@ -27,24 +28,24 @@ export class SetTransition extends Transition { this.set = set; } - @Override + // @Override get serializationType(): TransitionType { return TransitionType.SET; } - @Override - @NotNull + // @Override + get label(): IntervalSet { return this.set; } - @Override + // @Override public matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean { return this.set.contains(symbol); } - @Override - @NotNull + // @Override + public toString(): string { return this.set.toString(); } diff --git a/src/atn/SimulatorState.ts b/runtime/typescript/src/atn/SimulatorState.ts similarity index 69% rename from src/atn/SimulatorState.ts rename to runtime/typescript/src/atn/SimulatorState.ts index 0a89368c..8601547e 100644 --- a/src/atn/SimulatorState.ts +++ b/runtime/typescript/src/atn/SimulatorState.ts @@ -5,9 +5,10 @@ // ConvertTo-TS run at 2016-10-04T11:26:37.3871984-07:00 -import { DFAState } from "../dfa/DFAState"; -import { NotNull } from "../Decorators"; -import { ParserRuleContext } from "../ParserRuleContext"; +import { + DFAState, + ParserRuleContext +} from "../internal"; /** * @@ -21,7 +22,7 @@ export class SimulatorState { public useContext: boolean; public remainingOuterContext: ParserRuleContext | undefined; - constructor(outerContext: ParserRuleContext, @NotNull s0: DFAState, useContext: boolean, remainingOuterContext: ParserRuleContext | undefined) { + constructor(outerContext: ParserRuleContext, s0: DFAState, useContext: boolean, remainingOuterContext: ParserRuleContext | undefined) { this.outerContext = outerContext != null ? outerContext : ParserRuleContext.emptyContext(); this.s0 = s0; this.useContext = useContext; diff --git a/src/atn/StarBlockStartState.ts b/runtime/typescript/src/atn/StarBlockStartState.ts similarity index 68% rename from src/atn/StarBlockStartState.ts rename to runtime/typescript/src/atn/StarBlockStartState.ts index 9b39c33f..a7ad9b08 100644 --- a/src/atn/StarBlockStartState.ts +++ b/runtime/typescript/src/atn/StarBlockStartState.ts @@ -5,15 +5,16 @@ // ConvertTo-TS run at 2016-10-04T11:26:37.5657409-07:00 -import { ATNState } from "./ATNState"; -import { ATNStateType } from "./ATNStateType"; -import { BlockStartState } from "./BlockStartState"; -import { Override } from "../Decorators"; +import { + ATNState, + ATNStateType, + BlockStartState +} from "../internal"; /** The block that begins a closure loop. */ export class StarBlockStartState extends BlockStartState { - @Override + // @Override get stateType(): ATNStateType { return ATNStateType.STAR_BLOCK_START; } diff --git a/src/atn/StarLoopEntryState.ts b/runtime/typescript/src/atn/StarLoopEntryState.ts similarity index 80% rename from src/atn/StarLoopEntryState.ts rename to runtime/typescript/src/atn/StarLoopEntryState.ts index fa1b141c..f8f4be9c 100644 --- a/src/atn/StarLoopEntryState.ts +++ b/runtime/typescript/src/atn/StarLoopEntryState.ts @@ -5,11 +5,12 @@ // ConvertTo-TS run at 2016-10-04T11:26:37.7099201-07:00 -import { ATNStateType } from "./ATNStateType"; -import { BitSet } from "../misc/BitSet"; -import { DecisionState } from "./DecisionState"; -import { Override } from "../Decorators"; -import { StarLoopbackState } from "./StarLoopbackState"; +import { + ATNStateType, + BitSet, + DecisionState, + StarLoopbackState +} from "../internal"; export class StarLoopEntryState extends DecisionState { public loopBackState: StarLoopbackState; @@ -24,7 +25,7 @@ export class StarLoopEntryState extends DecisionState { * * @see `DFA.isPrecedenceDfa` */ - public precedenceRuleDecision: boolean = false; + public precedenceRuleDecision = false; /** * For precedence decisions, this set marks states *S* which have all @@ -41,7 +42,7 @@ export class StarLoopEntryState extends DecisionState { */ public precedenceLoopbackStates: BitSet = new BitSet(); - @Override + // @Override get stateType(): ATNStateType { return ATNStateType.STAR_LOOP_ENTRY; } diff --git a/src/atn/StarLoopbackState.ts b/runtime/typescript/src/atn/StarLoopbackState.ts similarity index 70% rename from src/atn/StarLoopbackState.ts rename to runtime/typescript/src/atn/StarLoopbackState.ts index ad672b46..dfefe665 100644 --- a/src/atn/StarLoopbackState.ts +++ b/runtime/typescript/src/atn/StarLoopbackState.ts @@ -5,17 +5,18 @@ // ConvertTo-TS run at 2016-10-04T11:26:37.6368726-07:00 -import { ATNState } from "./ATNState"; -import { ATNStateType } from "./ATNStateType"; -import { Override } from "../Decorators"; -import { StarLoopEntryState } from "./StarLoopEntryState"; +import { + ATNState, + ATNStateType, + StarLoopEntryState +} from "../internal"; export class StarLoopbackState extends ATNState { get loopEntryState(): StarLoopEntryState { return this.transition(0).target as StarLoopEntryState; } - @Override + // @Override get stateType(): ATNStateType { return ATNStateType.STAR_LOOP_BACK; } diff --git a/src/atn/TokensStartState.ts b/runtime/typescript/src/atn/TokensStartState.ts similarity index 74% rename from src/atn/TokensStartState.ts rename to runtime/typescript/src/atn/TokensStartState.ts index a507506b..eea73527 100644 --- a/src/atn/TokensStartState.ts +++ b/runtime/typescript/src/atn/TokensStartState.ts @@ -5,14 +5,15 @@ // ConvertTo-TS run at 2016-10-04T11:26:37.7814046-07:00 -import { ATNStateType } from "./ATNStateType"; -import { DecisionState } from "./DecisionState"; -import { Override } from "../Decorators"; +import { + ATNStateType, + DecisionState +} from "../internal"; /** The Tokens rule start state linking to each lexer rule start state */ export class TokensStartState extends DecisionState { - @Override + // @Override get stateType(): ATNStateType { return ATNStateType.TOKEN_START; } diff --git a/src/atn/Transition.ts b/runtime/typescript/src/atn/Transition.ts similarity index 91% rename from src/atn/Transition.ts rename to runtime/typescript/src/atn/Transition.ts index 02d79a39..d50d32c9 100644 --- a/src/atn/Transition.ts +++ b/runtime/typescript/src/atn/Transition.ts @@ -5,10 +5,11 @@ // ConvertTo-TS run at 2016-10-04T11:26:37.8530496-07:00 -import { ATNState } from "./ATNState"; -import { IntervalSet } from "../misc/IntervalSet"; -import { NotNull } from "../Decorators"; -import { TransitionType } from "./TransitionType"; +import { + ATNState, + IntervalSet, + TransitionType +} from "../internal"; /** An ATN transition between any two ATN states. Subclasses define * atom, set, epsilon, action, predicate, rule transitions. @@ -53,10 +54,10 @@ export abstract class Transition { // }}); /** The target of this transition. */ - @NotNull + public target: ATNState; - constructor(@NotNull target: ATNState) { + constructor(target: ATNState) { if (target == null) { throw new Error("target cannot be null."); } diff --git a/src/atn/TransitionType.ts b/runtime/typescript/src/atn/TransitionType.ts similarity index 100% rename from src/atn/TransitionType.ts rename to runtime/typescript/src/atn/TransitionType.ts diff --git a/src/atn/WildcardTransition.ts b/runtime/typescript/src/atn/WildcardTransition.ts similarity index 68% rename from src/atn/WildcardTransition.ts rename to runtime/typescript/src/atn/WildcardTransition.ts index d6dc0acc..7c7af96f 100644 --- a/src/atn/WildcardTransition.ts +++ b/runtime/typescript/src/atn/WildcardTransition.ts @@ -5,28 +5,29 @@ // ConvertTo-TS run at 2016-10-04T11:26:37.9456839-07:00 -import { ATNState } from "./ATNState"; -import { Override, NotNull } from "../Decorators"; -import { Transition } from "./Transition"; -import { TransitionType } from "./TransitionType"; +import { + ATNState, + Transition, + TransitionType +} from "../internal"; export class WildcardTransition extends Transition { - constructor(@NotNull target: ATNState) { + constructor(target: ATNState) { super(target); } - @Override + // @Override get serializationType(): TransitionType { return TransitionType.WILDCARD; } - @Override + // @Override public matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean { return symbol >= minVocabSymbol && symbol <= maxVocabSymbol; } - @Override - @NotNull + // @Override + public toString(): string { return "."; } diff --git a/src/dfa/AcceptStateInfo.ts b/runtime/typescript/src/dfa/AcceptStateInfo.ts similarity index 88% rename from src/dfa/AcceptStateInfo.ts rename to runtime/typescript/src/dfa/AcceptStateInfo.ts index 4f188707..f05526a6 100644 --- a/src/dfa/AcceptStateInfo.ts +++ b/runtime/typescript/src/dfa/AcceptStateInfo.ts @@ -5,7 +5,7 @@ // ConvertTo-TS run at 2016-10-04T11:26:38.1172076-07:00 -import { LexerActionExecutor } from "../atn/LexerActionExecutor"; +import { LexerActionExecutor } from "../internal"; /** * Stores information about a {@link DFAState} which is an accept state under @@ -20,8 +20,6 @@ export class AcceptStateInfo { private readonly _prediction: number; private readonly _lexerActionExecutor?: LexerActionExecutor; - constructor(prediction: number); - constructor(prediction: number, lexerActionExecutor: LexerActionExecutor | undefined); constructor(prediction: number, lexerActionExecutor?: LexerActionExecutor) { this._prediction = prediction; this._lexerActionExecutor = lexerActionExecutor; diff --git a/src/dfa/DFA.ts b/runtime/typescript/src/dfa/DFA.ts similarity index 82% rename from src/dfa/DFA.ts rename to runtime/typescript/src/dfa/DFA.ts index da10513c..22694482 100644 --- a/src/dfa/DFA.ts +++ b/runtime/typescript/src/dfa/DFA.ts @@ -5,23 +5,24 @@ // ConvertTo-TS run at 2016-10-04T11:26:38.3567094-07:00 -import { Array2DHashSet } from "../misc/Array2DHashSet"; -import { ATN } from "../atn/ATN"; -import { ATNConfigSet } from "../atn/ATNConfigSet"; -import { ATNState } from "../atn/ATNState"; -import { ATNType } from "../atn/ATNType"; -import { DecisionState } from "../atn/DecisionState"; -import { DFASerializer } from "./DFASerializer"; -import { DFAState } from "./DFAState"; -import { LexerATNSimulator } from "../atn/LexerATNSimulator"; -import { LexerDFASerializer } from "./LexerDFASerializer"; -import { NotNull } from "../Decorators"; -import { ObjectEqualityComparator } from "../misc/ObjectEqualityComparator"; -import { StarLoopEntryState } from "../atn/StarLoopEntryState"; -import { Token } from "../Token"; -import { TokensStartState } from "../atn/TokensStartState"; -import { Vocabulary } from "../Vocabulary"; -import { VocabularyImpl } from "../VocabularyImpl"; +import { + ATN, + ATNConfigSet, + ATNState, + ATNType, + Array2DHashSet, + DFASerializer, + DFAState, + DecisionState, + LexerATNSimulator, + LexerDFASerializer, + ObjectEqualityComparator, + StarLoopEntryState, + Token, + TokensStartState, + Vocabulary, + VocabularyImpl +} from "../internal"; export class DFA { /** @@ -30,7 +31,7 @@ export class DFA { * Note that this collection of states holds the DFA states for both SLL and LL prediction. Only the start state * needs to be differentiated for these cases, which is tracked by the `s0` and `s0full` fields. */ - @NotNull + public readonly states: Array2DHashSet = new Array2DHashSet(ObjectEqualityComparator.INSTANCE); public s0: DFAState | undefined; @@ -40,16 +41,16 @@ export class DFA { public readonly decision: number; /** From which ATN state did we create this DFA? */ - @NotNull + public atnStartState: ATNState; /** * Note: this field is accessed as `atnStartState.atn` in other targets. The TypeScript target keeps a separate copy * to avoid a number of additional null/undefined checks each time the ATN is accessed. */ - @NotNull + public atn: ATN; - private nextStateNumber: number = 0; + private nextStateNumber = 0; /** * `true` if this DFA is for a precedence decision; otherwise, @@ -74,7 +75,7 @@ export class DFA { * @param decision The decision number. */ constructor(atnStartState: DecisionState, decision: number); - constructor(@NotNull atnStartState: ATNState, decision: number = 0) { + constructor(atnStartState: ATNState, decision = 0) { if (!atnStartState.atn) { throw new Error("The ATNState must be associated with an ATN"); } @@ -87,7 +88,7 @@ export class DFA { // evaluate their alternatives using a precedence hierarchy. When such a decision is encountered, we mark this // DFA instance as a precedence DFA and initialize the initial states s0 and s0full to special DFAState // instances which use outgoing edges to link to the actual start state used for each precedence level. - let isPrecedenceDfa: boolean = false; + let isPrecedenceDfa = false; if (atnStartState instanceof StarLoopEntryState) { if (atnStartState.precedenceRuleDecision) { isPrecedenceDfa = true; @@ -170,7 +171,7 @@ export class DFA { get isEmpty(): boolean { if (this.isPrecedenceDfa) { // s0 and s0full are never null for a precedence DFA - return this.s0!.getEdgeMap().size === 0 && this.s0full!.getEdgeMap().size === 0; + return this.s0!.getEdgeMap().length === 0 && this.s0full!.getEdgeMap().length === 0; } return this.s0 == null && this.s0full == null; @@ -179,7 +180,7 @@ export class DFA { get isContextSensitive(): boolean { if (this.isPrecedenceDfa) { // s0full is never null for a precedence DFA - return (this.s0full as DFAState).getEdgeMap().size > 0; + return (this.s0full as DFAState).getEdgeMap().length > 0; } return this.s0full != null; @@ -217,7 +218,7 @@ export class DFA { return ""; } - let serializer: DFASerializer = new LexerDFASerializer(this); + const serializer: DFASerializer = new LexerDFASerializer(this); return serializer.toString(); } } diff --git a/src/dfa/DFASerializer.ts b/runtime/typescript/src/dfa/DFASerializer.ts similarity index 71% rename from src/dfa/DFASerializer.ts rename to runtime/typescript/src/dfa/DFASerializer.ts index f1256ea2..dc00f422 100644 --- a/src/dfa/DFASerializer.ts +++ b/runtime/typescript/src/dfa/DFASerializer.ts @@ -5,22 +5,23 @@ // ConvertTo-TS run at 2016-10-04T11:26:38.5097925-07:00 -import { ATN } from "../atn/ATN"; -import { ATNSimulator } from "../atn/ATNSimulator"; -import { ATNState } from "../atn/ATNState"; -import { DFA } from "./DFA"; -import { DFAState } from "./DFAState"; -import { NotNull, Override } from "../Decorators"; -import { PredictionContext } from "../atn/PredictionContext"; -import { Recognizer } from "../Recognizer"; -import { Vocabulary } from "../Vocabulary"; -import { VocabularyImpl } from "../VocabularyImpl"; +import { + ATN, + ATNSimulator, + ATNState, + DFA, + DFAState, + PredictionContext, + Recognizer, + Vocabulary, + VocabularyImpl +} from "../internal"; /** A DFA walker that knows how to dump them to serialized strings. */ export class DFASerializer { - @NotNull + private dfa: DFA; - @NotNull + private vocabulary: Vocabulary; public ruleNames?: string[]; @@ -45,7 +46,7 @@ export class DFASerializer { this.atn = atn; } - @Override + // @Override public toString(): string { if (!this.dfa.s0) { return ""; @@ -54,28 +55,33 @@ export class DFASerializer { let buf = ""; if (this.dfa.states) { - let states: DFAState[] = new Array(...this.dfa.states.toArray()); + const states: DFAState[] = new Array(...this.dfa.states.toArray()); states.sort((o1, o2) => o1.stateNumber - o2.stateNumber); - for (let s of states) { - let edges: Map = s.getEdgeMap(); - let edgeKeys = [...edges.keys()].sort((a, b) => a - b); - let contextEdges: Map = s.getContextEdgeMap(); - let contextEdgeKeys = [...contextEdges.keys()].sort((a, b) => a - b); - for (let entry of edgeKeys) { - let value = edges.get(entry); + for (const s of states) { + const edges: Array = s.getEdgeMap(); + const edgeKeys = [...edges.keys()].sort((a, b) => a - b); + const contextEdges: Array = s.getContextEdgeMap(); + let contextEdgeKeys = new Array(); + contextEdges.forEach((value, index) => { + if (value != undefined) + contextEdgeKeys.push(index); + }); + contextEdgeKeys = contextEdgeKeys.sort((a, b) => a - b); + for (const entry of edgeKeys) { + const value = edges[entry]; if ((value == null || value === ATNSimulator.ERROR) && !s.isContextSymbol(entry)) { continue; } - let contextSymbol: boolean = false; + let contextSymbol = false; buf += (this.getStateString(s)) + ("-") + (this.getEdgeLabel(entry)) + ("->"); if (s.isContextSymbol(entry)) { buf += ("!"); contextSymbol = true; } - let t: DFAState | undefined = value; + const t: DFAState | undefined = value; if (t && t.stateNumber !== ATNSimulator.ERROR.stateNumber) { buf += (this.getStateString(t)) + ("\n"); } @@ -85,18 +91,18 @@ export class DFASerializer { } if (s.isContextSensitive) { - for (let entry of contextEdgeKeys) { + for (const entry of contextEdgeKeys) { buf += (this.getStateString(s)) + ("-") + (this.getContextLabel(entry)) + ("->") - + (this.getStateString(contextEdges.get(entry)!)) + + (this.getStateString(contextEdges[entry])) + ("\n"); } } } } - let output: string = buf; + const output: string = buf; if (output.length === 0) { return ""; } @@ -113,8 +119,8 @@ export class DFASerializer { } if (this.atn && i > 0 && i <= this.atn.states.length) { - let state: ATNState = this.atn.states[i]; - let ruleIndex: number = state.ruleIndex; + const state: ATNState = this.atn.states[i]; + const ruleIndex: number = state.ruleIndex; if (this.ruleNames && ruleIndex >= 0 && ruleIndex < this.ruleNames.length) { return "ctx:" + String(i) + "(" + this.ruleNames[ruleIndex] + ")"; } @@ -132,7 +138,7 @@ export class DFASerializer { return "ERROR"; } - let n: number = s.stateNumber; + const n: number = s.stateNumber; let stateStr: string = "s" + n; if (s.isAcceptState) { if (s.predicates) { @@ -145,7 +151,7 @@ export class DFASerializer { if (s.isContextSensitive) { stateStr += "*"; - for (let config of s.configs) { + for (const config of s.configs) { if (config.reachesIntoOuterContext) { stateStr += "*"; break; diff --git a/src/dfa/DFAState.ts b/runtime/typescript/src/dfa/DFAState.ts similarity index 78% rename from src/dfa/DFAState.ts rename to runtime/typescript/src/dfa/DFAState.ts index 066f6459..8d8af2bc 100644 --- a/src/dfa/DFAState.ts +++ b/runtime/typescript/src/dfa/DFAState.ts @@ -5,18 +5,19 @@ // ConvertTo-TS run at 2016-10-04T11:26:38.7771056-07:00 -import { AcceptStateInfo } from "./AcceptStateInfo"; -import { ATN } from "../atn/ATN"; -import { ATNConfigSet } from "../atn/ATNConfigSet"; -import { BitSet } from "../misc/BitSet"; -import { LexerActionExecutor } from "../atn/LexerActionExecutor"; -import { MurmurHash } from "../misc/MurmurHash"; -import { NotNull, Override } from "../Decorators"; -import { PredictionContext } from "../atn/PredictionContext"; -import { SemanticContext } from "../atn/SemanticContext"; - import * as assert from "assert"; +import { + ATN, + ATNConfigSet, + AcceptStateInfo, + BitSet, + LexerActionExecutor, + MurmurHash, + PredictionContext, + SemanticContext +} from "../internal"; + /** A DFA state represents a set of possible ATN configurations. * As Aho, Sethi, Ullman p. 117 says "The DFA uses its state * to keep track of all possible states the ATN can be in after @@ -42,21 +43,21 @@ import * as assert from "assert"; * meaning that state was reached via a different set of rule invocations. */ export class DFAState { - public stateNumber: number = -1; + public stateNumber = -1; + - @NotNull public configs: ATNConfigSet; - /** `edges.get(symbol)` points to target of symbol. + /** `edges[symbol]` points to target of symbol. */ - @NotNull - private readonly edges: Map; + + private readonly edges: Array; private _acceptStateInfo: AcceptStateInfo | undefined; /** These keys for these edges are the top level element of the global context. */ - @NotNull - private readonly contextEdges: Map; + + private readonly contextEdges: Array; /** Symbols in this set require a global context transition before matching an input symbol. */ private contextSymbols: BitSet | undefined; @@ -73,8 +74,8 @@ export class DFAState { */ constructor(configs: ATNConfigSet) { this.configs = configs; - this.edges = new Map(); - this.contextEdges = new Map(); + this.edges = new Array(); + this.contextEdges = new Array(); } get isContextSensitive(): boolean { @@ -134,14 +135,14 @@ export class DFAState { } public getTarget(symbol: number): DFAState | undefined { - return this.edges.get(symbol); + return this.edges[symbol]; } public setTarget(symbol: number, target: DFAState): void { - this.edges.set(symbol, target); + this.edges[symbol] = target; } - public getEdgeMap(): Map { + public getEdgeMap(): Array { return this.edges; } @@ -150,7 +151,7 @@ export class DFAState { invokingState = -1; } - return this.contextEdges.get(invokingState); + return this.contextEdges[invokingState]; } public setContextTarget(invokingState: number, target: DFAState): void { @@ -162,28 +163,32 @@ export class DFAState { invokingState = -1; } - this.contextEdges.set(invokingState, target); + this.contextEdges[invokingState] = target; } - public getContextEdgeMap(): Map { - let map = new Map(this.contextEdges); - let existing = map.get(-1); + public getContextEdgeMap(): Array { + const map = new Array(); + this.contextEdges.forEach((element, index) => { + if (element != undefined) + map[index] = element; + }) + const existing = map[-1]; if (existing !== undefined) { - if (map.size === 1) { - let result = new Map(); - result.set(PredictionContext.EMPTY_FULL_STATE_KEY, existing); + if (map.length === 1) { + const result = new Array(); + result[PredictionContext.EMPTY_FULL_STATE_KEY] = existing; return result; } else { - map.delete(-1); - map.set(PredictionContext.EMPTY_FULL_STATE_KEY, existing); + delete map[-1]; + map[PredictionContext.EMPTY_FULL_STATE_KEY] = existing; } } return map; } - @Override + // @Override public hashCode(): number { let hash: number = MurmurHash.initialize(7); hash = MurmurHash.update(hash, this.configs.hashCode()); @@ -204,7 +209,7 @@ export class DFAState { * exists that has this exact set of ATN configurations. The * {@link #stateNumber} is irrelevant. */ - @Override + // @Override public equals(o: any): boolean { // compare set of ATN configurations in this set with other if (this === o) { @@ -215,13 +220,13 @@ export class DFAState { return false; } - let other: DFAState = o; - let sameSet: boolean = this.configs.equals(other.configs); -// System.out.println("DFAState.equals: "+configs+(sameSet?"==":"!=")+other.configs); + const other: DFAState = o; + const sameSet: boolean = this.configs.equals(other.configs); + // System.out.println("DFAState.equals: "+configs+(sameSet?"==":"!=")+other.configs); return sameSet; } - @Override + // @Override public toString(): string { let buf = ""; buf += (this.stateNumber) + (":") + (this.configs); @@ -241,15 +246,15 @@ export class DFAState { export namespace DFAState { /** Map a predicate to a predicted alternative. */ export class PredPrediction { - @NotNull + public pred: SemanticContext; // never null; at least SemanticContext.NONE public alt: number; - constructor(@NotNull pred: SemanticContext, alt: number) { + constructor(pred: SemanticContext, alt: number) { this.alt = alt; this.pred = pred; } - @Override + // @Override public toString(): string { return "(" + this.pred + ", " + this.alt + ")"; } diff --git a/src/dfa/LexerDFASerializer.ts b/runtime/typescript/src/dfa/LexerDFASerializer.ts similarity index 64% rename from src/dfa/LexerDFASerializer.ts rename to runtime/typescript/src/dfa/LexerDFASerializer.ts index a17ff2ce..b9574c2c 100644 --- a/src/dfa/LexerDFASerializer.ts +++ b/runtime/typescript/src/dfa/LexerDFASerializer.ts @@ -5,18 +5,19 @@ // ConvertTo-TS run at 2016-10-04T11:26:39.2167238-07:00 -import { DFA } from "./DFA"; -import { DFASerializer } from "./DFASerializer"; -import { NotNull, Override } from "../Decorators"; -import { VocabularyImpl } from "../VocabularyImpl"; +import { + DFA, + DFASerializer, + VocabularyImpl +} from "../internal"; export class LexerDFASerializer extends DFASerializer { - constructor( @NotNull dfa: DFA) { + constructor(dfa: DFA) { super(dfa, VocabularyImpl.EMPTY_VOCABULARY); } - @Override - @NotNull + // @Override + protected getEdgeLabel(i: number): string { return "'" + String.fromCodePoint(i) + "'"; } diff --git a/src/dfa/index.ts b/runtime/typescript/src/dfa/index.ts similarity index 52% rename from src/dfa/index.ts rename to runtime/typescript/src/dfa/index.ts index 4007aab1..c7f696ed 100644 --- a/src/dfa/index.ts +++ b/runtime/typescript/src/dfa/index.ts @@ -3,8 +3,8 @@ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. */ -export * from "./AcceptStateInfo"; -export * from "./DFA"; -export * from "./DFASerializer"; -export * from "./DFAState"; -export * from "./LexerDFASerializer"; +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; diff --git a/runtime/typescript/src/index.ts b/runtime/typescript/src/index.ts new file mode 100644 index 00000000..6a1091b5 --- /dev/null +++ b/runtime/typescript/src/index.ts @@ -0,0 +1,6 @@ +/*! + * Copyright 2016 The ANTLR Project. All rights reserved. + * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. + */ + +export * from "./internal"; diff --git a/runtime/typescript/src/internal.ts b/runtime/typescript/src/internal.ts new file mode 100644 index 00000000..1d76f79c --- /dev/null +++ b/runtime/typescript/src/internal.ts @@ -0,0 +1,195 @@ +/*! + * Copyright 20202 The ANTLR Project. All rights reserved. + * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. + */ + +/** + * This file controls the load order of all modules in the antlr4ts runtime package + * + * A load order problem has the following symptom: a TypeError message of the form: + * + * ``` + * TypeError: Class extends value undefined is not a constructor or null + at Object. (C:\code\antlr4ts\runtime\typescript\src\tree\xpath\XPathLexer.ts:17:33) + at Module._compile (internal/modules/cjs/loader.js:1158:30) + ... + * ``` + * + * If you run into this problem, find the line in this file corresponding to the code in line 2 of the mssage, + * and move it to the bottom of this file. Rinse, lather repeat. + */ + +export * from "./ANTLRErrorListener"; +export * from "./ANTLRErrorStrategy"; +export * from "./ANTLRInputStream"; +export * from "./atn/ATN"; +export * from "./atn/ATNConfig"; +export * from "./atn/ATNConfigSet"; +export * from "./atn/ATNDeserializationOptions"; +export * from "./atn/ATNSimulator"; +export * from "./atn/ATNState"; +export * from "./atn/ATNStateType"; +export * from "./atn/ATNType"; +export * from "./atn/BasicState"; +export * from "./atn/BlockEndState"; +export * from "./atn/CodePointTransitions"; +export * from "./atn/ConflictInfo"; +export * from "./atn/DecisionEventInfo"; +export * from "./atn/DecisionInfo"; +export * from "./atn/DecisionState"; +export * from "./atn/ErrorInfo"; +export * from "./atn/LexerAction"; +export * from "./atn/LexerActionExecutor"; +export * from "./atn/LexerActionType"; +export * from "./atn/LexerChannelAction"; +export * from "./atn/LexerCustomAction"; +export * from "./atn/LexerIndexedCustomAction"; +export * from "./atn/LexerModeAction"; +export * from "./atn/LexerMoreAction"; +export * from "./atn/LexerPopModeAction"; +export * from "./atn/LexerPushModeAction"; +export * from "./atn/LexerSkipAction"; +export * from "./atn/LexerTypeAction"; +export * from "./atn/LookaheadEventInfo"; +export * from "./atn/LoopEndState"; +export * from "./atn/OrderedATNConfigSet"; +export * from "./atn/ParseInfo"; +export * from "./atn/ParserATNSimulator"; +export * from "./atn/PlusLoopbackState"; +export * from "./atn/PredicateEvalInfo"; +export * from "./atn/ProfilingATNSimulator"; +export * from "./atn/RuleStartState"; +export * from "./atn/RuleStopState"; +export * from "./atn/SemanticContext"; +export * from "./atn/SimulatorState"; +export * from "./atn/StarLoopbackState"; +export * from "./atn/StarLoopEntryState"; +export * from "./atn/TokensStartState"; +export * from "./atn/Transition"; +export * from "./atn/TransitionType"; +export * from "./atn/WildcardTransition"; +export * from "./BufferedTokenStream"; +export * from "./CharStream"; +export * from "./CharStreams"; +export * from "./CodePointBuffer"; +export * from "./CodePointCharStream"; +export * from "./CommonToken"; +export * from "./CommonTokenFactory"; +export * from "./CommonTokenStream"; +export * from "./ConsoleErrorListener"; +export * from "./DefaultErrorStrategy"; +export * from "./Dependents"; +export * from "./dfa/AcceptStateInfo"; +export * from "./dfa/DFA"; +export * from "./dfa/DFASerializer"; +export * from "./dfa/DFAState"; +export * from "./dfa/LexerDFASerializer"; +export * from "./DiagnosticErrorListener"; +export * from "./IntStream"; +export * from "./ListTokenSource"; +export * from "./misc/Args"; +export * from "./misc/Array2DHashMap"; +export * from "./misc/Array2DHashSet"; +export * from "./misc/ArrayEqualityComparator"; +export * from "./misc/Arrays"; +export * from "./misc/BitSet"; +export * from "./misc/Character"; +export * from "./misc/DefaultEqualityComparator"; +export * from "./misc/EqualityComparator" +export * from "./misc/IntegerList"; +export * from "./misc/IntegerStack"; +export * from "./misc/InterpreterDataReader"; +export * from "./misc/Interval"; +export * from "./misc/IntervalSet"; +export * from "./misc/IntSet"; +export * from "./misc/MultiMap"; +export * from "./misc/MurmurHash"; +export * from "./misc/ObjectEqualityComparator"; +export * from "./misc/ParseCancellationException"; +export * from "./misc/Stubs"; +export * from "./misc/Utils"; +export * from "./misc/UUID"; +export * from "./ParserErrorListener"; +export * from "./ProxyErrorListener"; +export * from "./ProxyParserErrorListener"; +export * from "./RecognitionException"; +export * from "./Recognizer"; +export * from "./RuleDependency"; +export * from "./RuleVersion"; +export * from "./Token"; +export * from "./TokenFactory"; +export * from "./TokenSource"; +export * from "./TokenStream"; +export * from "./TokenStreamRewriter"; +export * from "./tree/pattern/Chunk"; +export * from "./tree/pattern/index"; +export * from "./tree/pattern/ParseTreeMatch"; +export * from "./tree/pattern/ParseTreePattern"; +export * from "./tree/pattern/ParseTreePatternMatcher"; +export * from "./tree/pattern/RuleTagToken"; +export * from "./tree/pattern/TextChunk"; +export * from "./tree/pattern/TokenTagToken"; +export * from "./tree/xpath/XPath"; +export * from "./tree/xpath/XPathElement"; +export * from "./tree/xpath/XPathLexerErrorListener"; +export * from "./tree/xpath/XPathRuleElement"; +export * from "./tree/xpath/XPathTokenAnywhereElement"; +export * from "./tree/xpath/XPathTokenElement"; +export * from "./tree/xpath/XPathWildcardAnywhereElement"; +export * from "./tree/xpath/XPathWildcardElement"; +export * from "./Vocabulary"; +export * from "./VocabularyImpl"; +export * from "./WritableToken"; + +// Must be near end: +export * from "./BailErrorStrategy"; +export * from "./FailedPredicateException"; +export * from "./atn/AbstractPredicateTransition"; +export * from "./Lexer"; +export * from "./atn/LexerATNSimulator"; +export * from "./atn/InvalidState"; +export * from "./atn/ATNDeserializer"; +export * from "./tree/Tree"; +export * from "./tree/SyntaxTree"; +export * from "./tree/ParseTree"; +export * from "./tree/ParseTreeListener"; +export * from "./tree/ParseTreeVisitor"; +export * from "./tree/RuleNode"; +export * from "./tree/Trees"; +export * from "./tree/AbstractParseTreeVisitor"; +export * from "./tree/ParseTreeProperty"; +export * from "./tree/ParseTreeWalker"; +export * from "./tree/TerminalNode"; +export * from "./tree/ErrorNode"; +export * from "./RuleContext"; +export * from "./ParserRuleContext"; +export * from "./InterpreterRuleContext"; +export * from "./RuleContextWithAltNum"; +export * from "./atn/PrecedencePredicateTransition"; +export * from "./LexerInterpreter"; +export * from "./tree/xpath/XPathLexer"; +export * from "./tree/xpath/XPathRuleAnywhereElement"; +export * from "./tree/pattern/TagChunk"; +export * from "./atn/AmbiguityInfo"; +export * from "./atn/PredicateTransition"; +export * from "./atn/ActionTransition"; +export * from "./atn/AtomTransition"; +export * from "./atn/BlockStartState"; +export * from "./atn/ContextSensitivityInfo"; +export * from "./atn/EpsilonTransition"; +export * from "./atn/LL1Analyzer"; +export * from "./atn/PlusBlockStartState"; +export * from "./atn/PredictionContext"; +export * from "./atn/PredictionContextCache"; +export * from "./atn/PredictionMode"; +export * from "./atn/RangeTransition"; +export * from "./atn/RuleTransition"; +export * from "./atn/SetTransition"; +export * from "./atn/StarBlockStartState"; +export * from "./InputMismatchException"; +export * from "./LexerNoViableAltException"; +export * from "./NoViableAltException"; +export * from "./Parser"; +export * from "./ParserInterpreter"; +export * from "./atn/NotSetTransition"; +export * from "./atn/BasicBlockStartState"; diff --git a/src/misc/Args.ts b/runtime/typescript/src/misc/Args.ts similarity index 100% rename from src/misc/Args.ts rename to runtime/typescript/src/misc/Args.ts diff --git a/src/misc/Array2DHashMap.ts b/runtime/typescript/src/misc/Array2DHashMap.ts similarity index 84% rename from src/misc/Array2DHashMap.ts rename to runtime/typescript/src/misc/Array2DHashMap.ts index 58c50c62..1ca502fa 100644 --- a/src/misc/Array2DHashMap.ts +++ b/runtime/typescript/src/misc/Array2DHashMap.ts @@ -3,14 +3,16 @@ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. */ -import { Array2DHashSet } from "./Array2DHashSet"; -import { DefaultEqualityComparator } from "./DefaultEqualityComparator"; -import { EqualityComparator } from "./EqualityComparator"; -import { Equatable, JavaCollection, JavaMap, JavaSet } from "./Stubs"; +import { + Array2DHashSet, + DefaultEqualityComparator, + EqualityComparator +} from "../internal"; +import { Equatable, JavaCollection, JavaMap, JavaSet } from "../internal"; // Since `Array2DHashMap` is implemented on top of `Array2DHashSet`, we defined a bucket type which can store a // key-value pair. The value is optional since looking up values in the map by a key only needs to include the key. -interface Bucket { key: K; value?: V; } +interface Bucket { key: K; value?: V } class MapKeyEqualityComparator implements EqualityComparator> { private readonly keyComparator: EqualityComparator; @@ -50,7 +52,7 @@ export class Array2DHashMap implements JavaMap { } public get(key: K): V | undefined { - let bucket = this.backingStore.get({ key }); + const bucket = this.backingStore.get({ key }); if (!bucket) { return undefined; } @@ -63,7 +65,7 @@ export class Array2DHashMap implements JavaMap { } public put(key: K, value: V): V | undefined { - let element = this.backingStore.get({ key, value }); + const element = this.backingStore.get({ key, value }); let result: V | undefined; if (!element) { this.backingStore.add({ key, value }); @@ -76,7 +78,7 @@ export class Array2DHashMap implements JavaMap { } public putIfAbsent(key: K, value: V): V | undefined { - let element = this.backingStore.get({ key, value }); + const element = this.backingStore.get({ key, value }); let result: V | undefined; if (!element) { this.backingStore.add({ key, value }); diff --git a/src/misc/Array2DHashSet.ts b/runtime/typescript/src/misc/Array2DHashSet.ts similarity index 72% rename from src/misc/Array2DHashSet.ts rename to runtime/typescript/src/misc/Array2DHashSet.ts index f7d6a55e..1a0561da 100644 --- a/src/misc/Array2DHashSet.ts +++ b/runtime/typescript/src/misc/Array2DHashSet.ts @@ -6,12 +6,13 @@ // ConvertTo-TS run at 2016-10-03T02:09:41.7434086-07:00 import * as assert from "assert"; -import { DefaultEqualityComparator } from "./DefaultEqualityComparator"; -import { EqualityComparator } from "./EqualityComparator"; -import { NotNull, Nullable, Override, SuppressWarnings } from "../Decorators"; -import { JavaCollection, JavaSet } from "./Stubs"; -import { ObjectEqualityComparator } from "./ObjectEqualityComparator"; -import { MurmurHash } from "./MurmurHash"; + +import { + DefaultEqualityComparator, + EqualityComparator, + MurmurHash +} from "../internal"; +import { JavaCollection, JavaSet } from "../internal"; /** {@link Set} implementation with closed hashing (open addressing). */ @@ -19,17 +20,17 @@ import { MurmurHash } from "./MurmurHash"; // e.g. the return type of add() differs! // For this reason I've commented tweaked the implements clause -const INITAL_CAPACITY: number = 16; // must be power of 2 -const LOAD_FACTOR: number = 0.75; +const INITAL_CAPACITY = 16; // must be power of 2 +const LOAD_FACTOR = 0.75; export class Array2DHashSet implements JavaSet { - @NotNull + protected comparator: EqualityComparator; - protected buckets: Array; + protected buckets: (T[] | undefined)[]; /** How many elements in set */ - protected n: number = 0; + protected n = 0; protected threshold: number = Math.floor(INITAL_CAPACITY * LOAD_FACTOR); // when to expand @@ -43,7 +44,7 @@ export class Array2DHashSet implements JavaSet { this.comparator = comparatorOrSet.comparator; this.buckets = comparatorOrSet.buckets.slice(0); for (let i = 0; i < this.buckets.length; i++) { - let bucket = this.buckets[i]; + const bucket = this.buckets[i]; if (bucket) { this.buckets[i] = bucket.slice(0); } @@ -70,7 +71,7 @@ export class Array2DHashSet implements JavaSet { } protected getOrAddImpl(o: T): T { - let b: number = this.getBucket(o); + const b: number = this.getBucket(o); let bucket = this.buckets[b]; // NEW BUCKET @@ -82,7 +83,7 @@ export class Array2DHashSet implements JavaSet { } // LOOK FOR IT IN BUCKET - for (let existing of bucket) { + for (const existing of bucket) { if (this.comparator.equals(existing, o)) { return existing; // found existing, quit } @@ -98,14 +99,14 @@ export class Array2DHashSet implements JavaSet { if (o == null) { return o; } - let b: number = this.getBucket(o); - let bucket = this.buckets[b]; + const b: number = this.getBucket(o); + const bucket = this.buckets[b]; if (!bucket) { // no bucket return undefined; } - for (let e of bucket) { + for (const e of bucket) { if (this.comparator.equals(e, o)) { return e; } @@ -115,19 +116,19 @@ export class Array2DHashSet implements JavaSet { } protected getBucket(o: T): number { - let hash: number = this.comparator.hashCode(o); - let b: number = hash & (this.buckets.length - 1); // assumes len is power of 2 + const hash: number = this.comparator.hashCode(o); + const b: number = hash & (this.buckets.length - 1); // assumes len is power of 2 return b; } - @Override + // @Override public hashCode(): number { let hash: number = MurmurHash.initialize(); - for (let bucket of this.buckets) { + for (const bucket of this.buckets) { if (bucket == null) { continue; } - for (let o of bucket) { + for (const o of bucket) { if (o == null) { break; } @@ -139,7 +140,7 @@ export class Array2DHashSet implements JavaSet { return hash; } - @Override + // @Override public equals(o: any): boolean { if (o === this) { return true; @@ -150,26 +151,26 @@ export class Array2DHashSet implements JavaSet { if (o.size !== this.size) { return false; } - let same: boolean = this.containsAll(o); + const same: boolean = this.containsAll(o); return same; } protected expand(): void { - let old = this.buckets; - let newCapacity: number = this.buckets.length * 2; - let newTable: Array = this.createBuckets(newCapacity); + const old = this.buckets; + const newCapacity: number = this.buckets.length * 2; + const newTable: (T[] | undefined)[] = this.createBuckets(newCapacity); this.buckets = newTable; this.threshold = Math.floor(newCapacity * LOAD_FACTOR); -// System.out.println("new size="+newCapacity+", thres="+threshold); + // System.out.println("new size="+newCapacity+", thres="+threshold); // rehash all existing entries - let oldSize: number = this.size; - for (let bucket of old) { + const oldSize: number = this.size; + for (const bucket of old) { if (!bucket) { continue; } - for (let o of bucket) { - let b: number = this.getBucket(o); + for (const o of bucket) { + const b: number = this.getBucket(o); let newBucket: T[] | undefined = this.buckets[b]; if (!newBucket) { newBucket = []; @@ -183,28 +184,28 @@ export class Array2DHashSet implements JavaSet { assert(this.n === oldSize); } - @Override + // @Override public add(t: T): boolean { - let existing: T = this.getOrAdd(t); + const existing: T = this.getOrAdd(t); return existing === t; } - @Override + // @Override get size(): number { return this.n; } - @Override + // @Override get isEmpty(): boolean { return this.n === 0; } - @Override + // @Override public contains(o: any): boolean { return this.containsFast(this.asElementType(o)); } - public containsFast(@Nullable obj: T): boolean { + public containsFast(obj?: T): boolean { if (obj == null) { return false; } @@ -212,23 +213,23 @@ export class Array2DHashSet implements JavaSet { return this.get(obj) != null; } - @Override + // @Override public *[Symbol.iterator](): IterableIterator { yield* this.toArray(); } - @Override + // @Override public toArray(): T[] { const a = new Array(this.size); // Copy elements from the nested arrays into the destination array - let i: number = 0; // Position within destination array - for (let bucket of this.buckets) { + let i = 0; // Position within destination array + for (const bucket of this.buckets) { if (bucket == null) { continue; } - for (let o of bucket) { + for (const o of bucket) { if (o == null) { break; } @@ -238,15 +239,15 @@ export class Array2DHashSet implements JavaSet { return a; } - @Override + // @Override public containsAll(collection: JavaCollection): boolean { if (collection instanceof Array2DHashSet) { - let s = collection as any as Array2DHashSet; - for (let bucket of s.buckets) { + const s = collection as any as Array2DHashSet; + for (const bucket of s.buckets) { if (bucket == null) { continue; } - for (let o of bucket) { + for (const o of bucket) { if (o == null) { break; } @@ -257,7 +258,7 @@ export class Array2DHashSet implements JavaSet { } } else { - for (let o of collection) { + for (const o of collection) { if (!this.containsFast(this.asElementType(o))) { return false; } @@ -266,12 +267,12 @@ export class Array2DHashSet implements JavaSet { return true; } - @Override + // @Override public addAll(c: Iterable): boolean { - let changed: boolean = false; + let changed = false; - for (let o of c) { - let existing: T = this.getOrAdd(o); + for (const o of c) { + const existing: T = this.getOrAdd(o); if (existing !== o) { changed = true; } @@ -279,26 +280,26 @@ export class Array2DHashSet implements JavaSet { return changed; } - @Override + // @Override public clear(): void { this.buckets = this.createBuckets(INITAL_CAPACITY); this.n = 0; this.threshold = Math.floor(INITAL_CAPACITY * LOAD_FACTOR); } - @Override + // @Override public toString(): string { if (this.size === 0) { return "{}"; } let buf = "{"; - let first: boolean = true; - for (let bucket of this.buckets) { + let first = true; + for (const bucket of this.buckets) { if (bucket == null) { continue; } - for (let o of bucket) { + for (const o of bucket) { if (o == null) { break; } @@ -307,7 +308,7 @@ export class Array2DHashSet implements JavaSet { } else { buf += ", "; } - buf += o.toString(); + buf += String(o); } } buf += "}"; @@ -316,14 +317,14 @@ export class Array2DHashSet implements JavaSet { public toTableString(): string { let buf = ""; - for (let bucket of this.buckets) { + for (const bucket of this.buckets) { if (bucket == null) { buf += "null\n"; continue; } buf += "["; - let first: boolean = true; - for (let o of bucket) { + let first = true; + for (const o of bucket) { if (first) { first = false; } else { @@ -332,7 +333,7 @@ export class Array2DHashSet implements JavaSet { if (o == null) { buf += "_"; } else { - buf += o.toString(); + buf += String(o); } } buf += "]\n"; @@ -353,7 +354,6 @@ export class Array2DHashSet implements JavaSet { * @returns `o` if it could be an instance of `T`, otherwise * `undefined`. */ - @SuppressWarnings("unchecked") protected asElementType(o: any): T { return o as T; } @@ -364,8 +364,7 @@ export class Array2DHashSet implements JavaSet { * @param capacity the length of the array to return * @returns the newly constructed array */ - @SuppressWarnings("unchecked") - protected createBuckets(capacity: number): Array { + protected createBuckets(capacity: number): (T[] | undefined)[] { return new Array(capacity); } } diff --git a/src/misc/ArrayEqualityComparator.ts b/runtime/typescript/src/misc/ArrayEqualityComparator.ts similarity index 84% rename from src/misc/ArrayEqualityComparator.ts rename to runtime/typescript/src/misc/ArrayEqualityComparator.ts index 88604a6f..75c2dbf3 100644 --- a/src/misc/ArrayEqualityComparator.ts +++ b/runtime/typescript/src/misc/ArrayEqualityComparator.ts @@ -4,11 +4,12 @@ */ // ConvertTo-TS run at 2016-10-03T02:09:42.2127260-07:00 -import { EqualityComparator } from "./EqualityComparator"; -import { Override } from "../Decorators"; -import { Equatable } from "./Stubs"; -import { MurmurHash } from "./MurmurHash"; -import { ObjectEqualityComparator } from "./ObjectEqualityComparator"; +import { + EqualityComparator, + Equatable, + MurmurHash, + ObjectEqualityComparator +} from "../internal"; /** * This default implementation of {@link EqualityComparator} uses object equality @@ -25,7 +26,7 @@ export class ArrayEqualityComparator implements EqualityComparator * This implementation returns * `obj.`{@link Object#hashCode hashCode()}. */ - @Override + // @Override public hashCode(obj: Equatable[]): number { if (obj == null) { return 0; @@ -43,7 +44,7 @@ export class ArrayEqualityComparator implements EqualityComparator * this method returns the result of * `a.`{@link Object#equals equals}`(b)`. */ - @Override + // @Override public equals(a: Equatable[], b: Equatable[]): boolean { if (a == null) { return b == null; diff --git a/runtime/typescript/src/misc/Arrays.ts b/runtime/typescript/src/misc/Arrays.ts new file mode 100644 index 00000000..fa0c055d --- /dev/null +++ b/runtime/typescript/src/misc/Arrays.ts @@ -0,0 +1,64 @@ +/*! + * Copyright 2016 The ANTLR Project. All rights reserved. + * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. + */ + +/** + * Searches the specified array of numbers for the specified value using the binary search algorithm. The array must + * be sorted prior to making this call. If it is not sorted, the results are unspecified. If the array contains + * multiple elements with the specified value, there is no guarantee which one will be found. + * + * @returns index of the search key, if it is contained in the array; otherwise, (-(insertion point) - 1). The + * insertion point is defined as the point at which the key would be inserted into the array: the index of the first + * element greater than the key, or array.length if all elements in the array are less than the specified key. Note + * that this guarantees that the return value will be >= 0 if and only if the key is found. + */ +export function binarySearch(array: ArrayLike, key: number, fromIndex?: number, toIndex?: number): number { + return binarySearch0(array, fromIndex !== undefined ? fromIndex : 0, toIndex !== undefined ? toIndex : array.length, key); +} + +function binarySearch0(array: ArrayLike, fromIndex: number, toIndex: number, key: number): number { + let low: number = fromIndex; + let high: number = toIndex - 1; + + while (low <= high) { + const mid: number = (low + high) >>> 1; + const midVal: number = array[mid]; + + if (midVal < key) { + low = mid + 1; + } else if (midVal > key) { + high = mid - 1; + } else { + // key found + return mid; + } + } + + // key not found. + return -(low + 1); +} + +export function toString(array: Iterable): string { + let result = "["; + + let first = true; + for (const element of array) { + if (first) { + first = false; + } else { + result += ", "; + } + + if (element === null) { + result += "null"; + } else if (element === undefined) { + result += "undefined"; + } else { + result += element; + } + } + + result += "]"; + return result; +} diff --git a/src/misc/BitSet.ts b/runtime/typescript/src/misc/BitSet.ts similarity index 95% rename from src/misc/BitSet.ts rename to runtime/typescript/src/misc/BitSet.ts index 25da3170..ca9918e1 100644 --- a/src/misc/BitSet.ts +++ b/runtime/typescript/src/misc/BitSet.ts @@ -5,7 +5,8 @@ import * as assert from "assert"; import * as util from "util"; -import { MurmurHash } from "./MurmurHash"; + +import { MurmurHash } from "../internal"; /** * Private empty array used to construct empty BitSets @@ -15,7 +16,7 @@ const EMPTY_DATA: Uint16Array = new Uint16Array(0); /** * Gets the word index of the `UInt16` element in `BitSet.data` containing the bit with the specified index. */ -function getIndex(bitNumber: number) { +function getIndex(bitNumber: number): number { return bitNumber >>> 4; } @@ -23,7 +24,7 @@ function getIndex(bitNumber: number) { * Convert a word index into the bit index of the LSB of that word */ -function unIndex(n: number) { +function unIndex(n: number): number { return n * 16; } @@ -31,7 +32,7 @@ function unIndex(n: number) { * Get's the bit number of the least signficant bit set LSB which is set in a word non-zero word; * Bit numbers run from LSB to MSB starting with 0. */ -function findLSBSet(word: number) { +function findLSBSet(word: number): number { let bit = 1; for (let i = 0; i < 16; i++) { if ((word & bit) !== 0) { @@ -42,7 +43,7 @@ function findLSBSet(word: number) { throw new RangeError("No specified bit found"); } -function findMSBSet(word: number) { +function findMSBSet(word: number): number { let bit = (1 << 15) >>> 0; for (let i = 15; i >= 0; i--) { if ((word & bit) !== 0) { @@ -122,13 +123,13 @@ export class BitSet implements Iterable{ this.data = arg.data.slice(0); // Clone the data } else { let max = -1; - for (let v of arg) { + for (const v of arg) { if (max < v) { max = v; } } this.data = new Uint16Array(getIndex(max - 1) + 1); - for (let v of arg) { + for (const v of arg) { this.set(v); } } @@ -148,7 +149,7 @@ export class BitSet implements Iterable{ let lastWord = -1; // Keep track of index of last non-zero word for (let i = 0; i < words; i++) { - let value = data[i] &= other[i]; + const value = data[i] &= other[i]; if (value !== 0) { lastWord = i; } @@ -174,7 +175,7 @@ export class BitSet implements Iterable{ let lastWord = -1; // Keep track of index of last non-zero word for (let i = 0; i < words; i++) { - let value = data[i] &= (other[i] ^ 0xFFFF); + const value = data[i] &= (other[i] ^ 0xFFFF); if (value !== 0) { lastWord = i; } @@ -306,7 +307,7 @@ export class BitSet implements Iterable{ return !!(this.data[getIndex(fromIndex)] & bitsFor(fromIndex, fromIndex)); } else { // return a BitSet - let result = new BitSet(toIndex + 1); + const result = new BitSet(toIndex + 1); for (let i = fromIndex; i <= toIndex; i++) { result.set(i, this.get(i)); } @@ -320,12 +321,12 @@ export class BitSet implements Iterable{ * @param set `BitSet` to intersect with */ public intersects(set: BitSet): boolean { - let smallerLength = Math.min(this.length(), set.length()); + const smallerLength = Math.min(this.length(), set.length()); if (smallerLength === 0) { return false; } - let bound = getIndex(smallerLength - 1); + const bound = getIndex(smallerLength - 1); for (let i = 0; i <= bound; i++) { if ((this.data[i] & set.data[i]) !== 0) { return true; @@ -452,7 +453,7 @@ export class BitSet implements Iterable{ // Or those words both sets have in common for (let i = 0; i < minWords; i++) { - let value = dest[i] = data[i] | other[i]; + const value = dest[i] = data[i] | other[i]; if (value !== 0) { lastWord = i; } @@ -462,7 +463,7 @@ export class BitSet implements Iterable{ const longer = data.length > other.length ? data : other; for (let i = minWords; i < words; i++) { - let value = dest[i] = longer[i]; + const value = dest[i] = longer[i]; if (value !== 0) { lastWord = i; } @@ -623,7 +624,7 @@ export class BitSet implements Iterable{ if (value && lastWord >= this.data.length) { // Grow array "just enough" for bits we need to set - let temp = new Uint16Array(lastWord + 1); + const temp = new Uint16Array(lastWord + 1); this.data.forEach((value, index) => temp[index] = value); this.data = temp; } else if (!value) { @@ -650,7 +651,7 @@ export class BitSet implements Iterable{ } } - private _setBits(word: number, value: boolean, mask: number) { + private _setBits(word: number, value: boolean, mask: number): void { if (value) { this.data[word] |= mask; } else { @@ -705,7 +706,7 @@ export class BitSet implements Iterable{ * * must be true. The current sizes of the two bit sets are not compared. */ - public equals(obj: any): boolean { + public equals(obj: object): boolean { if (obj === this) { return true; } else if (!(obj instanceof BitSet)) { @@ -722,7 +723,7 @@ export class BitSet implements Iterable{ return true; } - let bound = getIndex(len - 1); + const bound = getIndex(len - 1); for (let i = 0; i <= bound; i++) { if (this.data[i] !== obj.data[i]) { return false; @@ -797,7 +798,7 @@ export class BitSet implements Iterable{ // Xor those words both sets have in common for (let i = 0; i < minWords; i++) { - let value = dest[i] = data[i] ^ other[i]; + const value = dest[i] = data[i] ^ other[i]; if (value !== 0) { lastWord = i; } @@ -807,7 +808,7 @@ export class BitSet implements Iterable{ const longer = data.length > other.length ? data : other; for (let i = minWords; i < words; i++) { - let value = dest[i] = longer[i]; + const value = dest[i] = longer[i]; if (value !== 0) { lastWord = i; } @@ -822,7 +823,7 @@ export class BitSet implements Iterable{ } } - public clone() { + public clone(): BitSet { return new BitSet(this); } @@ -842,6 +843,7 @@ class BitSetIterator implements IterableIterator{ constructor(private data: Uint16Array) { } + // eslint-disable-next-line @typescript-eslint/explicit-function-return-type public next() { while (this.index < this.data.length) { const bits = this.data[this.index] & this.mask; diff --git a/src/misc/Character.ts b/runtime/typescript/src/misc/Character.ts similarity index 100% rename from src/misc/Character.ts rename to runtime/typescript/src/misc/Character.ts diff --git a/src/misc/DefaultEqualityComparator.ts b/runtime/typescript/src/misc/DefaultEqualityComparator.ts similarity index 84% rename from src/misc/DefaultEqualityComparator.ts rename to runtime/typescript/src/misc/DefaultEqualityComparator.ts index 2c687baa..09a72375 100644 --- a/src/misc/DefaultEqualityComparator.ts +++ b/runtime/typescript/src/misc/DefaultEqualityComparator.ts @@ -3,11 +3,12 @@ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. */ -import { EqualityComparator } from "./EqualityComparator"; -import { Override } from "../Decorators"; -import { Equatable } from "./Stubs"; -import { MurmurHash } from "./MurmurHash"; -import { ObjectEqualityComparator } from "./ObjectEqualityComparator"; +import { + EqualityComparator, + Equatable, + MurmurHash, + ObjectEqualityComparator +} from "../internal"; /** * This default implementation of {@link EqualityComparator} uses object equality @@ -24,7 +25,7 @@ export class DefaultEqualityComparator implements EqualityComparator { * This implementation returns * `obj.`{@link Object#hashCode hashCode()}. */ - @Override + // @Override public hashCode(obj: any): number { if (obj == null) { return 0; @@ -44,7 +45,7 @@ export class DefaultEqualityComparator implements EqualityComparator { * this method returns the result of * `a.`{@link Object#equals equals}`(b)`. */ - @Override + // @Override public equals(a: any, b: any): boolean { if (a == null) { return b == null; diff --git a/src/misc/DoubleKeyMap.tssoon b/runtime/typescript/src/misc/DoubleKeyMap.tssoon similarity index 100% rename from src/misc/DoubleKeyMap.tssoon rename to runtime/typescript/src/misc/DoubleKeyMap.tssoon diff --git a/src/misc/EqualityComparator.ts b/runtime/typescript/src/misc/EqualityComparator.ts similarity index 100% rename from src/misc/EqualityComparator.ts rename to runtime/typescript/src/misc/EqualityComparator.ts diff --git a/src/misc/FlexibleHashMap.tssoon b/runtime/typescript/src/misc/FlexibleHashMap.tssoon similarity index 100% rename from src/misc/FlexibleHashMap.tssoon rename to runtime/typescript/src/misc/FlexibleHashMap.tssoon diff --git a/src/misc/IntSet.ts b/runtime/typescript/src/misc/IntSet.ts similarity index 98% rename from src/misc/IntSet.ts rename to runtime/typescript/src/misc/IntSet.ts index 1888f24d..6ec03f4f 100644 --- a/src/misc/IntSet.ts +++ b/runtime/typescript/src/misc/IntSet.ts @@ -111,8 +111,8 @@ export interface IntSet { /** * {@inheritDoc} */ - //@Override - equals(obj: any): boolean; + // @Override + equals(obj: object): boolean; /** * Returns `true` if the set contains the specified element. @@ -145,6 +145,6 @@ export interface IntSet { /** * {@inheritDoc} */ - //@Override + // @Override toString(): string; } diff --git a/src/misc/IntegerList.ts b/runtime/typescript/src/misc/IntegerList.ts similarity index 92% rename from src/misc/IntegerList.ts rename to runtime/typescript/src/misc/IntegerList.ts index e254cf1b..80bbf233 100644 --- a/src/misc/IntegerList.ts +++ b/runtime/typescript/src/misc/IntegerList.ts @@ -5,13 +5,13 @@ // ConvertTo-TS run at 2016-10-04T11:26:40.5099429-07:00 -import { Arrays } from "./Arrays"; -import { NotNull, Override } from "../Decorators"; -import { JavaCollection } from "./Stubs"; +import * as Arrays from "../internal"; + +import { JavaCollection } from "../internal"; const EMPTY_DATA: Int32Array = new Int32Array(0); -const INITIAL_SIZE: number = 4; +const INITIAL_SIZE = 4; const MAX_ARRAY_SIZE: number = (((1 << 31) >>> 0) - 1) - 8; /** @@ -19,7 +19,7 @@ const MAX_ARRAY_SIZE: number = (((1 << 31) >>> 0) - 1) - 8; * @author Sam Harwell */ export class IntegerList { - @NotNull + private _data: Int32Array; private _size: number; @@ -43,7 +43,7 @@ export class IntegerList { // arg is Iterable this._data = EMPTY_DATA; this._size = 0; - for (let value of arg) { + for (const value of arg) { this.add(value); } } @@ -70,8 +70,8 @@ export class IntegerList { } else { // list is JavaCollection this.ensureCapacity(this._size + list.size); - let current: number = 0; - for (let xi of list) { + let current = 0; + for (const xi of list) { this._data[this._size + current] = xi; current++; } @@ -103,13 +103,13 @@ export class IntegerList { throw RangeError(); } - let previous: number = this._data[index]; + const previous: number = this._data[index]; this._data[index] = value; return previous; } public removeAt(index: number): number { - let value: number = this.get(index); + const value: number = this.get(index); this._data.copyWithin(index, index + 1, this._size); this._data[this._size - 1] = 0; this._size--; @@ -181,7 +181,7 @@ export class IntegerList { * @param o the object to be compared for equality with this list * @returns `true` if the specified object is equal to this list */ - @Override + // @Override public equals(o: any): boolean { if (o === this) { return true; @@ -213,9 +213,9 @@ export class IntegerList { * * @returns the hash code value for this list */ - @Override + // @Override public hashCode(): number { - let hashCode: number = 1; + let hashCode = 1; for (let i = 0; i < this._size; i++) { hashCode = 31 * hashCode + this._data[i]; } @@ -226,7 +226,7 @@ export class IntegerList { /** * Returns a string representation of this list. */ - @Override + // @Override public toString(): string { return this._data.toString(); } @@ -270,7 +270,7 @@ export class IntegerList { } } - let tmp = new Int32Array(newLength); + const tmp = new Int32Array(newLength); tmp.set(this._data); this._data = tmp; } @@ -286,7 +286,7 @@ export class IntegerList { let resultIdx = 0; let calculatedPreciseResultSize = false; for (let i = 0; i < this._size; i++) { - let codePoint = this._data[i]; + const codePoint = this._data[i]; if (codePoint >= 0 && codePoint < 0x10000) { resultArray[resultIdx] = codePoint; resultIdx++; @@ -295,14 +295,14 @@ export class IntegerList { // Calculate the precise result size if we encounter a code point > 0xFFFF if (!calculatedPreciseResultSize) { - let newResultArray = new Uint16Array(this.charArraySize()); + const newResultArray = new Uint16Array(this.charArraySize()); newResultArray.set(resultArray, 0); resultArray = newResultArray; calculatedPreciseResultSize = true; } // This will throw RangeError if the code point is not a valid Unicode code point - let pair = String.fromCodePoint(codePoint); + const pair = String.fromCodePoint(codePoint); resultArray[resultIdx] = pair.charCodeAt(0); resultArray[resultIdx + 1] = pair.charCodeAt(1); resultIdx += 2; diff --git a/src/misc/IntegerStack.ts b/runtime/typescript/src/misc/IntegerStack.ts similarity index 92% rename from src/misc/IntegerStack.ts rename to runtime/typescript/src/misc/IntegerStack.ts index 46e3ee28..055afe5e 100644 --- a/src/misc/IntegerStack.ts +++ b/runtime/typescript/src/misc/IntegerStack.ts @@ -5,7 +5,7 @@ // ConvertTo-TS run at 2016-10-04T11:26:40.6647101-07:00 -import { IntegerList } from "./IntegerList"; +import { IntegerList } from "../internal"; /** * diff --git a/src/misc/InterpreterDataReader.ts b/runtime/typescript/src/misc/InterpreterDataReader.ts similarity index 78% rename from src/misc/InterpreterDataReader.ts rename to runtime/typescript/src/misc/InterpreterDataReader.ts index 8e13defb..67494225 100644 --- a/src/misc/InterpreterDataReader.ts +++ b/runtime/typescript/src/misc/InterpreterDataReader.ts @@ -6,19 +6,21 @@ import * as fs from "fs"; import * as util from "util"; -import { ATN } from "../atn/ATN"; -import { Vocabulary } from "../Vocabulary"; -import { VocabularyImpl } from "../VocabularyImpl"; -import { ATNDeserializer } from "../atn/ATNDeserializer"; +import { + ATN, + ATNDeserializer, + Vocabulary, + VocabularyImpl +} from "../internal"; function splitToLines(buffer: Buffer): string[] { - let lines: string[] = []; + const lines: string[] = []; let index = 0; while (index < buffer.length) { - let lineStart = index; - let lineEndLF = buffer.indexOf("\n".charCodeAt(0), index); - let lineEndCR = buffer.indexOf("\r".charCodeAt(0), index); + const lineStart = index; + const lineEndLF = buffer.indexOf("\n".charCodeAt(0), index); + const lineEndCR = buffer.indexOf("\r".charCodeAt(0), index); let lineEnd: number; if (lineEndCR >= 0 && (lineEndCR < lineEndLF || lineEndLF === -1)) { lineEnd = lineEndCR; @@ -64,18 +66,18 @@ export namespace InterpreterDataReader { * * Data for a parser does not contain channel and mode names. */ - export async function parseFile(fileName: string): Promise { - let result: InterpreterDataReader.InterpreterData = new InterpreterDataReader.InterpreterData(); + export function parseFile(fileName: string): InterpreterData { + const result: InterpreterDataReader.InterpreterData = new InterpreterDataReader.InterpreterData(); result.ruleNames = []; - let input: Buffer = await util.promisify(fs.readFile)(fileName); - let lines = splitToLines(input); + const input: Buffer = fs.readFileSync(fileName); + const lines = splitToLines(input); try { let line: string; - let lineIndex: number = 0; - let literalNames: string[] = []; - let symbolicNames: string[] = []; + let lineIndex = 0; + const literalNames: string[] = []; + const symbolicNames: string[] = []; line = lines[lineIndex++]; if (line !== "token literal names:") { @@ -103,7 +105,7 @@ export namespace InterpreterDataReader { symbolicNames.push(line === "null" ? "" : line); } - let displayNames: string[] = []; + const displayNames: string[] = []; result.vocabulary = new VocabularyImpl(literalNames, symbolicNames, displayNames); line = lines[lineIndex++]; @@ -151,12 +153,12 @@ export namespace InterpreterDataReader { } line = lines[lineIndex++]; - let elements: string[] = line.split(","); - let serializedATN: Uint16Array = new Uint16Array(elements.length); + const elements: string[] = line.split(","); + const serializedATN: Uint16Array = new Uint16Array(elements.length); - for (let i: number = 0; i < elements.length; ++i) { + for (let i = 0; i < elements.length; ++i) { let value: number; - let element: string = elements[i]; + const element: string = elements[i]; if (element.startsWith("[")) { value = parseInt(element.substring(1).trim(), 10); } @@ -170,7 +172,7 @@ export namespace InterpreterDataReader { serializedATN[i] = value; } - let deserializer: ATNDeserializer = new ATNDeserializer(); + const deserializer: ATNDeserializer = new ATNDeserializer(); result.atn = deserializer.deserialize(serializedATN); } catch (e) { diff --git a/src/misc/Interval.ts b/runtime/typescript/src/misc/Interval.ts similarity index 95% rename from src/misc/Interval.ts rename to runtime/typescript/src/misc/Interval.ts index 24e4f553..9e2e2dd6 100644 --- a/src/misc/Interval.ts +++ b/runtime/typescript/src/misc/Interval.ts @@ -5,10 +5,9 @@ // ConvertTo-TS run at 2016-10-04T11:26:40.7402214-07:00 -import { Override } from "../Decorators"; -import { Equatable } from "./Stubs"; +import { Equatable } from "../internal"; -const INTERVAL_POOL_MAX_VALUE: number = 1000; +const INTERVAL_POOL_MAX_VALUE = 1000; /** An immutable inclusive interval a..b */ export class Interval implements Equatable { @@ -56,7 +55,7 @@ export class Interval implements Equatable { return this.b - this.a + 1; } - @Override + // @Override public equals(o: any): boolean { if (o === this) { return true; @@ -68,9 +67,9 @@ export class Interval implements Equatable { return this.a === o.a && this.b === o.b; } - @Override + // @Override public hashCode(): number { - let hash: number = 23; + let hash = 23; hash = hash * 31 + this.a; hash = hash * 31 + this.b; return hash; @@ -143,7 +142,7 @@ export class Interval implements Equatable { return diff; } - @Override + // @Override public toString(): string { return this.a + ".." + this.b; } diff --git a/src/misc/IntervalSet.ts b/runtime/typescript/src/misc/IntervalSet.ts similarity index 80% rename from src/misc/IntervalSet.ts rename to runtime/typescript/src/misc/IntervalSet.ts index 6f69f2da..ec31e56e 100644 --- a/src/misc/IntervalSet.ts +++ b/runtime/typescript/src/misc/IntervalSet.ts @@ -5,15 +5,16 @@ // ConvertTo-TS run at 2016-10-04T11:26:40.8683480-07:00 -import { ArrayEqualityComparator } from "./ArrayEqualityComparator"; -import { IntegerList } from "./IntegerList"; -import { Interval } from "./Interval"; -import { IntSet } from "./IntSet"; -import { Lexer } from "../Lexer"; -import { MurmurHash } from "./MurmurHash"; -import { Override, NotNull } from "../Decorators"; -import { Token } from "../Token"; -import { Vocabulary } from "../Vocabulary"; +import { + ArrayEqualityComparator, + IntSet, + IntegerList, + Interval, + Lexer, + MurmurHash, + Token, + Vocabulary +} from "../internal"; /** * This class implements the {@link IntSet} backed by a sorted array of @@ -50,7 +51,7 @@ export class IntervalSet implements IntSet { /** The list of sorted, disjoint intervals. */ private _intervals: Interval[]; - private readonly: boolean = false; + private readonly = false; constructor(intervals?: Interval[]) { if (intervals != null) { @@ -64,9 +65,9 @@ export class IntervalSet implements IntSet { * Create a set with all ints within range [a..b] (inclusive). If b is omitted, the set contains the single element * a. */ - @NotNull + public static of(a: number, b: number = a): IntervalSet { - let s: IntervalSet = new IntervalSet(); + const s: IntervalSet = new IntervalSet(); s.add(a, b); return s; } @@ -103,21 +104,21 @@ export class IntervalSet implements IntSet { // find position in list // Use iterators as we modify list in place - for (let i: number = 0; i < this._intervals.length; i++) { - let r: Interval = this._intervals[i]; + for (let i = 0; i < this._intervals.length; i++) { + const r: Interval = this._intervals[i]; if (addition.equals(r)) { return; } if (addition.adjacent(r) || !addition.disjoint(r)) { // next to each other, make a single larger interval - let bigger: Interval = addition.union(r); + const bigger: Interval = addition.union(r); this._intervals[i] = bigger; // make sure we didn't just create an interval that // should be merged with next interval in list while (i < this._intervals.length - 1) { i++; - let next: Interval = this._intervals[i]; + const next: Interval = this._intervals[i]; if (!bigger.adjacent(next) && bigger.disjoint(next)) { break; } @@ -151,31 +152,31 @@ export class IntervalSet implements IntSet { /** combine all sets in the array returned the or'd value */ public static or(sets: IntervalSet[]): IntervalSet { - let r: IntervalSet = new IntervalSet(); - for (let s of sets) { + const r: IntervalSet = new IntervalSet(); + for (const s of sets) { r.addAll(s); } return r; } - @Override + // @Override public addAll(set: IntSet): IntervalSet { if (set == null) { return this; } if (set instanceof IntervalSet) { - let other: IntervalSet = set; + const other: IntervalSet = set; // walk set and add each interval - let n: number = other._intervals.length; + const n: number = other._intervals.length; for (let i = 0; i < n; i++) { - let I: Interval = other._intervals[i]; + const I: Interval = other._intervals[i]; this.add(I.a, I.b); } } else { - for (let value of set.toArray()) { + for (const value of set.toArray()) { this.add(value); } } @@ -188,7 +189,7 @@ export class IntervalSet implements IntSet { } /** {@inheritDoc} */ - @Override + // @Override public complement(vocabulary: IntSet): IntervalSet { if (vocabulary.isNil) { // nothing in common with null set @@ -206,7 +207,7 @@ export class IntervalSet implements IntSet { return vocabularyIS.subtract(this); } - @Override + // @Override public subtract(a: IntSet): IntervalSet { if (a == null || a.isNil) { return new IntervalSet(this._intervals); @@ -216,7 +217,7 @@ export class IntervalSet implements IntSet { return IntervalSet.subtract(this, a); } - let other: IntervalSet = new IntervalSet(); + const other: IntervalSet = new IntervalSet(); other.addAll(a); return IntervalSet.subtract(this, other); } @@ -225,23 +226,23 @@ export class IntervalSet implements IntSet { * Compute the set difference between two interval sets. The specific * operation is `left - right`. */ - @NotNull + public static subtract(left: IntervalSet, right: IntervalSet): IntervalSet { if (left.isNil) { return new IntervalSet(); } - let result: IntervalSet = new IntervalSet(left._intervals); + const result: IntervalSet = new IntervalSet(left._intervals); if (right.isNil) { // right set has no elements; just return the copy of the current set return result; } - let resultI: number = 0; - let rightI: number = 0; + let resultI = 0; + let rightI = 0; while (resultI < result._intervals.length && rightI < right._intervals.length) { - let resultInterval: Interval = result._intervals[resultI]; - let rightInterval: Interval = right._intervals[rightI]; + const resultInterval: Interval = result._intervals[resultI]; + const rightInterval: Interval = right._intervals[rightI]; // operation: (resultInterval - rightInterval) and update indexes @@ -302,33 +303,33 @@ export class IntervalSet implements IntSet { return result; } - @Override + // @Override public or(a: IntSet): IntervalSet { - let o: IntervalSet = new IntervalSet(); + const o: IntervalSet = new IntervalSet(); o.addAll(this); o.addAll(a); return o; } /** {@inheritDoc} */ - @Override + // @Override public and(other: IntSet): IntervalSet { if (other.isNil) { //|| !(other instanceof IntervalSet) ) { // nothing in common with null set return new IntervalSet(); } - let myIntervals: Interval[] = this._intervals; - let theirIntervals: Interval[] = (other as IntervalSet)._intervals; + const myIntervals: Interval[] = this._intervals; + const theirIntervals: Interval[] = (other as IntervalSet)._intervals; let intersection: IntervalSet | undefined; - let mySize: number = myIntervals.length; - let theirSize: number = theirIntervals.length; - let i: number = 0; - let j: number = 0; + const mySize: number = myIntervals.length; + const theirSize: number = theirIntervals.length; + let i = 0; + let j = 0; // iterate down both interval lists looking for nondisjoint intervals while (i < mySize && j < theirSize) { - let mine: Interval = myIntervals[i]; - let theirs: Interval = theirIntervals[j]; + const mine: Interval = myIntervals[i]; + const theirs: Interval = theirIntervals[j]; //System.out.println("mine="+mine+" and theirs="+theirs); if (mine.startsBeforeDisjoint(theirs)) { // move this iterator looking for interval that might overlap @@ -387,17 +388,17 @@ export class IntervalSet implements IntSet { } /** {@inheritDoc} */ - @Override + // @Override public contains(el: number): boolean { - let n: number = this._intervals.length; - let l: number = 0; + const n: number = this._intervals.length; + let l = 0; let r: number = n - 1; // Binary search for the element in the (sorted, disjoint) array of intervals. while (l <= r) { - let m: number = (l + r) >> 1; - let I: Interval = this._intervals[m]; - let a: number = I.a; - let b: number = I.b; + const m: number = (l + r) >> 1; + const I: Interval = this._intervals[m]; + const a: number = I.a; + const b: number = I.b; if (b < el) { l = m + 1; } else if (a > el) { @@ -412,7 +413,7 @@ export class IntervalSet implements IntSet { } /** {@inheritDoc} */ - @Override + // @Override get isNil(): boolean { return this._intervals == null || this._intervals.length === 0; } @@ -428,7 +429,7 @@ export class IntervalSet implements IntSet { throw new RangeError("set is empty"); } - let last: Interval = this._intervals[this._intervals.length - 1]; + const last: Interval = this._intervals[this._intervals.length - 1]; return last.b; } @@ -451,10 +452,10 @@ export class IntervalSet implements IntSet { return this._intervals; } - @Override + // @Override public hashCode(): number { let hash: number = MurmurHash.initialize(); - for (let I of this._intervals) { + for (const I of this._intervals) { hash = MurmurHash.update(hash, I.a); hash = MurmurHash.update(hash, I.b); } @@ -468,7 +469,7 @@ export class IntervalSet implements IntSet { * to make sure they are the same. Interval.equals() is used * by the List.equals() method to check the ranges. */ - @Override + // @Override public equals(o: any): boolean { if (o == null || !(o instanceof IntervalSet)) { return false; @@ -477,8 +478,8 @@ export class IntervalSet implements IntSet { return ArrayEqualityComparator.INSTANCE.equals(this._intervals, o._intervals); } - public toString(elemAreChar: boolean = false): string { - let buf: string = ""; + public toString(elemAreChar = false): string { + let buf = ""; if (this._intervals == null || this._intervals.length === 0) { return "{}"; } @@ -487,16 +488,16 @@ export class IntervalSet implements IntSet { buf += "{"; } - let first: boolean = true; - for (let I of this._intervals) { + let first = true; + for (const I of this._intervals) { if (first) { first = false; } else { buf += ", "; } - let a: number = I.a; - let b: number = I.b; + const a: number = I.a; + const b: number = I.b; if (a === b) { if (a === Token.EOF) { buf += ""; @@ -521,26 +522,26 @@ export class IntervalSet implements IntSet { return buf; } - public toStringVocabulary( @NotNull vocabulary: Vocabulary): string { + public toStringVocabulary(vocabulary: Vocabulary): string { if (this._intervals == null || this._intervals.length === 0) { return "{}"; } - let buf: string = ""; + let buf = ""; if (this.size > 1) { buf += "{"; } - let first: boolean = true; - for (let I of this._intervals) { + let first = true; + for (const I of this._intervals) { if (first) { first = false; } else { buf += ", "; } - let a: number = I.a; - let b: number = I.b; + const a: number = I.a; + const b: number = I.b; if (a === b) { buf += this.elementName(vocabulary, a); } else { @@ -561,8 +562,8 @@ export class IntervalSet implements IntSet { return buf; } - @NotNull - protected elementName( @NotNull vocabulary: Vocabulary, a: number): string { + + protected elementName(vocabulary: Vocabulary, a: number): string { if (a === Token.EOF) { return ""; } else if (a === Token.EPSILON) { @@ -572,17 +573,17 @@ export class IntervalSet implements IntSet { } } - @Override + // @Override get size(): number { - let n: number = 0; - let numIntervals: number = this._intervals.length; + let n = 0; + const numIntervals: number = this._intervals.length; if (numIntervals === 1) { - let firstInterval: Interval = this._intervals[0]; + const firstInterval: Interval = this._intervals[0]; return firstInterval.b - firstInterval.a + 1; } for (let i = 0; i < numIntervals; i++) { - let I: Interval = this._intervals[i]; + const I: Interval = this._intervals[i]; n += (I.b - I.a + 1); } @@ -590,12 +591,12 @@ export class IntervalSet implements IntSet { } public toIntegerList(): IntegerList { - let values: IntegerList = new IntegerList(this.size); - let n: number = this._intervals.length; + const values: IntegerList = new IntegerList(this.size); + const n: number = this._intervals.length; for (let i = 0; i < n; i++) { - let I: Interval = this._intervals[i]; - let a: number = I.a; - let b: number = I.b; + const I: Interval = this._intervals[i]; + const a: number = I.a; + const b: number = I.b; for (let v = a; v <= b; v++) { values.add(v); } @@ -605,10 +606,10 @@ export class IntervalSet implements IntSet { } public toSet(): Set { - let s: Set = new Set(); - for (let I of this._intervals) { - let a: number = I.a; - let b: number = I.b; + const s: Set = new Set(); + for (const I of this._intervals) { + const a: number = I.a; + const b: number = I.b; for (let v = a; v <= b; v++) { s.add(v); } @@ -618,12 +619,12 @@ export class IntervalSet implements IntSet { } public toArray(): number[] { - let values: number[] = new Array(); - let n: number = this._intervals.length; + const values: number[] = new Array(); + const n: number = this._intervals.length; for (let i = 0; i < n; i++) { - let I: Interval = this._intervals[i]; - let a: number = I.a; - let b: number = I.b; + const I: Interval = this._intervals[i]; + const a: number = I.a; + const b: number = I.b; for (let v = a; v <= b; v++) { values.push(v); } @@ -632,17 +633,17 @@ export class IntervalSet implements IntSet { return values; } - @Override + // @Override public remove(el: number): void { if (this.readonly) { throw new Error("can't alter readonly IntervalSet"); } - let n: number = this._intervals.length; + const n: number = this._intervals.length; for (let i = 0; i < n; i++) { - let I: Interval = this._intervals[i]; - let a: number = I.a; - let b: number = I.b; + const I: Interval = this._intervals[i]; + const a: number = I.a; + const b: number = I.b; if (el < a) { break; // list is sorted and el is before this interval; not here } @@ -663,7 +664,7 @@ export class IntervalSet implements IntSet { } // if in middle a..x..b, split interval if (el > a && el < b) { // found in this interval - let oldb: number = I.b; + const oldb: number = I.b; this._intervals[i] = Interval.of(I.a, el - 1); // [a..x-1] this.add(el + 1, oldb); // add [x+1..b] } diff --git a/src/misc/LogManager.tssoon b/runtime/typescript/src/misc/LogManager.tssoon similarity index 100% rename from src/misc/LogManager.tssoon rename to runtime/typescript/src/misc/LogManager.tssoon diff --git a/src/misc/MultiMap.ts b/runtime/typescript/src/misc/MultiMap.ts similarity index 90% rename from src/misc/MultiMap.ts rename to runtime/typescript/src/misc/MultiMap.ts index 781d1dac..d39a5f65 100644 --- a/src/misc/MultiMap.ts +++ b/runtime/typescript/src/misc/MultiMap.ts @@ -19,8 +19,8 @@ export class MultiMap extends Map { elementsForKey.push(value); } - public getPairs(): Array<[K, V]> { - let pairs: Array<[K, V]> = []; + public getPairs(): [K, V][] { + const pairs: [K, V][] = []; this.forEach((values: V[], key: K) => { values.forEach((v) => { pairs.push([key, v]); diff --git a/src/misc/MurmurHash.ts b/runtime/typescript/src/misc/MurmurHash.ts similarity index 89% rename from src/misc/MurmurHash.ts rename to runtime/typescript/src/misc/MurmurHash.ts index 46ccf181..c5e97077 100644 --- a/src/misc/MurmurHash.ts +++ b/runtime/typescript/src/misc/MurmurHash.ts @@ -4,7 +4,7 @@ */ // ConvertTo-TS run at 2016-10-03T02:09:42.1239660-07:00 -import { Equatable } from "./Stubs"; +import { Equatable } from "../internal"; /** * @@ -12,7 +12,7 @@ import { Equatable } from "./Stubs"; */ export namespace MurmurHash { - const DEFAULT_SEED: number = 0; + const DEFAULT_SEED = 0; /** * Initialize the hash using the specified `seed`. @@ -32,12 +32,12 @@ export namespace MurmurHash { * @returns the updated intermediate hash value */ export function update(hash: number, value: number | string | Equatable | null | undefined): number { - const c1: number = 0xCC9E2D51; - const c2: number = 0x1B873593; - const r1: number = 15; - const r2: number = 13; - const m: number = 5; - const n: number = 0xE6546B64; + const c1 = 0xCC9E2D51; + const c2 = 0x1B873593; + const r1 = 15; + const r2 = 13; + const m = 5; + const n = 0xE6546B64; if (value == null) { value = 0; @@ -90,7 +90,7 @@ export namespace MurmurHash { export function hashCode(data: Iterable, seed: number = DEFAULT_SEED): number { let hash: number = initialize(seed); let length = 0; - for (let value of data) { + for (const value of data) { hash = update(hash, value); length++; } @@ -104,14 +104,14 @@ export namespace MurmurHash { * http://stackoverflow.com/a/7616484 */ function hashString(str: string): number { - let len = str.length; + const len = str.length; if (len === 0) { return 0; } let hash = 0; for (let i = 0; i < len; i++) { - let c = str.charCodeAt(i); + const c = str.charCodeAt(i); hash = (((hash << 5) >>> 0) - hash) + c; hash |= 0; } diff --git a/src/misc/ObjectEqualityComparator.ts b/runtime/typescript/src/misc/ObjectEqualityComparator.ts similarity index 89% rename from src/misc/ObjectEqualityComparator.ts rename to runtime/typescript/src/misc/ObjectEqualityComparator.ts index 0224dd56..dd69df01 100644 --- a/src/misc/ObjectEqualityComparator.ts +++ b/runtime/typescript/src/misc/ObjectEqualityComparator.ts @@ -4,9 +4,10 @@ */ // ConvertTo-TS run at 2016-10-03T02:09:42.2127260-07:00 -import { EqualityComparator } from "./EqualityComparator"; -import { Override } from "../Decorators"; -import { Equatable } from "./Stubs"; +import { + EqualityComparator, + Equatable +} from "../internal"; /** * This default implementation of {@link EqualityComparator} uses object equality @@ -23,7 +24,7 @@ export class ObjectEqualityComparator implements EqualityComparator extends Iterable, Equatable { toArray(): E[]; } -export interface JavaSet extends JavaCollection { - // Seems like Java's Set doesn't really seem to extend Java's Collection with anything... - - // add(e:E): boolean; - // addAll(collection:Iterable): boolean; - // clear(): void; - // contains(o:any): boolean; // Shouldn't argument be restricted to E? - // containsAll(collection: Iterable) // Shouldn't argument be restricted to E? - // readonly isEmpty: boolean; - // readonly size: number; - // toArray(): E[]; -} +export type JavaSet = JavaCollection export interface JavaMap extends Equatable { clear(): void; diff --git a/src/misc/UUID.ts b/runtime/typescript/src/misc/UUID.ts similarity index 77% rename from src/misc/UUID.ts rename to runtime/typescript/src/misc/UUID.ts index 70cdf233..52a14e90 100644 --- a/src/misc/UUID.ts +++ b/runtime/typescript/src/misc/UUID.ts @@ -3,8 +3,10 @@ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. */ -import { Equatable } from "./Stubs"; -import { MurmurHash } from "./MurmurHash"; +import { + Equatable, + MurmurHash +} from "../internal"; export class UUID implements Equatable { private readonly data: Uint32Array; @@ -22,11 +24,11 @@ export class UUID implements Equatable { throw new Error("Incorrectly formatted UUID"); } - let segments = data.split("-"); - let mostSigBits = parseInt(segments[0], 16); - let moreSigBits = ((parseInt(segments[1], 16) << 16) >>> 0) + parseInt(segments[2], 16); - let lessSigBits = ((parseInt(segments[3], 16) << 16) >>> 0) + parseInt(segments[4].substr(0, 4), 16); - let leastSigBits = parseInt(segments[4].substr(-8), 16); + const segments = data.split("-"); + const mostSigBits = parseInt(segments[0], 16); + const moreSigBits = ((parseInt(segments[1], 16) << 16) >>> 0) + parseInt(segments[2], 16); + const lessSigBits = ((parseInt(segments[3], 16) << 16) >>> 0) + parseInt(segments[4].substr(0, 4), 16); + const leastSigBits = parseInt(segments[4].substr(-8), 16); return new UUID(mostSigBits, moreSigBits, lessSigBits, leastSigBits); } @@ -34,7 +36,7 @@ export class UUID implements Equatable { return MurmurHash.hashCode([this.data[0], this.data[1], this.data[2], this.data[3]]); } - public equals(obj: any): boolean { + public equals(obj: object): boolean { if (obj === this) { return true; } else if (!(obj instanceof UUID)) { diff --git a/src/misc/Utils.ts b/runtime/typescript/src/misc/Utils.ts similarity index 80% rename from src/misc/Utils.ts rename to runtime/typescript/src/misc/Utils.ts index 375d0d29..9df7df48 100644 --- a/src/misc/Utils.ts +++ b/runtime/typescript/src/misc/Utils.ts @@ -9,9 +9,10 @@ // as much of it may be supported natively by JavaScript. Or otherwise need // substantial rethink -import { NotNull } from "../Decorators"; -import { Equatable } from "./Stubs"; -import { IntegerList } from "./IntegerList"; +import { + Equatable, + IntegerList +} from "../internal"; export function escapeWhitespace(s: string, escapeSpaces: boolean): string { return escapeSpaces ? s.replace(/ /, "\u00B7") : s @@ -24,7 +25,7 @@ export function escapeWhitespace(s: string, escapeSpaces: boolean): string { export function join(collection: Iterable, separator: string): string { let buf = ""; let first = true; - for (let current of collection) { + for (const current of collection) { if (first) { first = false; } else { @@ -63,7 +64,7 @@ export function equals(x: Equatable | undefined, y: Equatable | undefined): bool // while ( data.contains(value) ) data.remove(value); // } -// export function writeFile(@NotNull file: File, @NotNull content: Uint8Array): void { +// export function writeFile(file: File, content: Uint8Array): void { // let fos: FileOutputStream = new FileOutputStream(file); // try { // fos.write(content); @@ -72,11 +73,11 @@ export function equals(x: Equatable | undefined, y: Equatable | undefined): bool // } // } -// export function writeFile(@NotNull fileName: string, @NotNull content: string): void { +// export function writeFile(fileName: string, content: string): void { // writeFile(fileName, content, null); // } -// export function writeFile(@NotNull fileName: string, @NotNull content: string, @Nullable encoding: string): void { +// export function writeFile(fileName: string, content: string, @Nullable encoding: string): void { // let f: File = new File(fileName); // let fos: FileOutputStream = new FileOutputStream(f); // let osw: OutputStreamWriter; @@ -96,12 +97,12 @@ export function equals(x: Equatable | undefined, y: Equatable | undefined): bool // } // @NotNull -// export function readFile(@NotNull fileName: string): char[] { +// export function readFile(fileName: string): char[] { // return readFile(fileName, null); // } // @NotNull -// export function readFile(@NotNull fileName: string, @Nullable encoding: string): char[] { +// export function readFile(fileName: string, @Nullable encoding: string): char[] { // let f: File = new File(fileName); // let size: number = (int)f.length(); // let isr: InputStreamReader; @@ -126,7 +127,7 @@ export function equals(x: Equatable | undefined, y: Equatable | undefined): bool // return data; // } -// export function removeAll(@NotNull predicate: List list,@NotNull Predicate): void { +// export function removeAll(predicate: List list,Predicate): void { // let j: number = 0; // for (let i = 0; i < list.size; i++) { // let item: T = list.get(i); @@ -144,7 +145,7 @@ export function equals(x: Equatable | undefined, y: Equatable | undefined): bool // } // } -// export function removeAll(@NotNull predicate: Iterable iterable,@NotNull Predicate): void { +// export function removeAll(predicate: Iterable iterable,Predicate): void { // if (iterable instanceof List) { // removeAll((List)iterable, predicate); // return; @@ -162,7 +163,7 @@ export function equals(x: Equatable | undefined, y: Equatable | undefined): bool * converting rulenames to name→ruleindex map. */ export function toMap(keys: string[]): Map { - let m: Map = new Map(); + const m: Map = new Map(); for (let i = 0; i < keys.length; i++) { m.set(keys[i], i); } @@ -174,7 +175,7 @@ export function toCharArray(str: string): Uint16Array; export function toCharArray(data: IntegerList): Uint16Array; export function toCharArray(str: string | IntegerList): Uint16Array { if (typeof str === "string") { - let result = new Uint16Array(str.length); + const result = new Uint16Array(str.length); for (let i = 0; i < str.length; i++) { result[i] = str.charCodeAt(i); } @@ -189,7 +190,7 @@ export function toCharArray(str: string | IntegerList): Uint16Array { // * @since 4.5 // */ // @NotNull -// export function toSet(@NotNull bits: BitSet): IntervalSet { +// export function toSet(bits: BitSet): IntervalSet { // let s: IntervalSet = new IntervalSet(); // let i: number = bits.nextSetBit(0); // while ( i >= 0 ) { diff --git a/src/misc/Utils.tssoon b/runtime/typescript/src/misc/Utils.tssoon similarity index 100% rename from src/misc/Utils.tssoon rename to runtime/typescript/src/misc/Utils.tssoon diff --git a/runtime/typescript/src/misc/index.ts b/runtime/typescript/src/misc/index.ts new file mode 100644 index 00000000..8799ee2d --- /dev/null +++ b/runtime/typescript/src/misc/index.ts @@ -0,0 +1,33 @@ +/*! + * Copyright 2016 The ANTLR Project. All rights reserved. + * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. + */ + +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +// export * from "../internal"; +export * from "../internal"; +// export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +// export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +// export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +// export * from "../internal"; +// export * from "../internal"; +export * from "../internal"; +export * from "../internal"; diff --git a/src/tree/AbstractParseTreeVisitor.ts b/runtime/typescript/src/tree/AbstractParseTreeVisitor.ts similarity index 85% rename from src/tree/AbstractParseTreeVisitor.ts rename to runtime/typescript/src/tree/AbstractParseTreeVisitor.ts index 25131036..60daaf8c 100644 --- a/src/tree/AbstractParseTreeVisitor.ts +++ b/runtime/typescript/src/tree/AbstractParseTreeVisitor.ts @@ -5,12 +5,13 @@ // ConvertTo-TS run at 2016-10-04T11:26:47.3092279-07:00 -import { ErrorNode } from "./ErrorNode"; -import { NotNull, Override } from "../Decorators"; -import { ParseTree } from "./ParseTree"; -import { ParseTreeVisitor } from "./ParseTreeVisitor"; -import { RuleNode } from "./RuleNode"; -import { TerminalNode } from "./TerminalNode"; +import { + ErrorNode, + ParseTree, + ParseTreeVisitor, + RuleNode, + TerminalNode +} from "../internal"; export abstract class AbstractParseTreeVisitor implements ParseTreeVisitor { /** @@ -19,8 +20,8 @@ export abstract class AbstractParseTreeVisitor implements ParseTreeVisit * The default implementation calls {@link ParseTree#accept} on the * specified tree. */ - @Override - public visit(@NotNull tree: ParseTree): Result { + // @Override + public visit(tree: ParseTree): Result { return tree.accept(this); } @@ -39,17 +40,17 @@ export abstract class AbstractParseTreeVisitor implements ParseTreeVisit * the tree structure. Visitors that modify the tree should override this * method to behave properly in respect to the specific algorithm in use. */ - @Override - public visitChildren(@NotNull node: RuleNode): Result { + // @Override + public visitChildren(node: RuleNode): Result { let result: Result = this.defaultResult(); - let n: number = node.childCount; + const n: number = node.childCount; for (let i = 0; i < n; i++) { if (!this.shouldVisitNextChild(node, result)) { break; } - let c: ParseTree = node.getChild(i); - let childResult: Result = c.accept(this); + const c: ParseTree = node.getChild(i); + const childResult: Result = c.accept(this); result = this.aggregateResult(result, childResult); } @@ -62,8 +63,8 @@ export abstract class AbstractParseTreeVisitor implements ParseTreeVisit * The default implementation returns the result of * {@link #defaultResult defaultResult}. */ - @Override - public visitTerminal(@NotNull node: TerminalNode): Result { + // @Override + public visitTerminal(_node: TerminalNode): Result { return this.defaultResult(); } @@ -73,8 +74,8 @@ export abstract class AbstractParseTreeVisitor implements ParseTreeVisit * The default implementation returns the result of * {@link #defaultResult defaultResult}. */ - @Override - public visitErrorNode(@NotNull node: ErrorNode): Result { + // @Override + public visitErrorNode(node: ErrorNode): Result { return this.defaultResult(); } @@ -136,7 +137,7 @@ export abstract class AbstractParseTreeVisitor implements ParseTreeVisit * `false` to stop visiting children and immediately return the * current aggregate result from {@link #visitChildren}. */ - protected shouldVisitNextChild(@NotNull node: RuleNode, currentResult: Result): boolean { + protected shouldVisitNextChild(node: RuleNode, currentResult: Result): boolean { return true; } } diff --git a/src/tree/ErrorNode.ts b/runtime/typescript/src/tree/ErrorNode.ts similarity index 79% rename from src/tree/ErrorNode.ts rename to runtime/typescript/src/tree/ErrorNode.ts index e8fadec9..d3d7a20a 100644 --- a/src/tree/ErrorNode.ts +++ b/runtime/typescript/src/tree/ErrorNode.ts @@ -5,10 +5,11 @@ // ConvertTo-TS run at 2016-10-04T11:26:47.4646355-07:00 -import { Override } from "../Decorators"; -import { ParseTreeVisitor } from "./ParseTreeVisitor"; -import { TerminalNode } from "./TerminalNode"; -import { Token } from "../Token"; +import { + ParseTreeVisitor, + TerminalNode, + Token +} from "../internal"; /** Represents a token that was consumed during resynchronization * rather than during a valid match operation. For example, @@ -21,7 +22,7 @@ export class ErrorNode extends TerminalNode { super(token); } - @Override + // @Override public accept(visitor: ParseTreeVisitor): T { return visitor.visitErrorNode(this); } diff --git a/src/tree/ParseTree.ts b/runtime/typescript/src/tree/ParseTree.ts similarity index 86% rename from src/tree/ParseTree.ts rename to runtime/typescript/src/tree/ParseTree.ts index d97bf892..baf6d82d 100644 --- a/src/tree/ParseTree.ts +++ b/runtime/typescript/src/tree/ParseTree.ts @@ -5,10 +5,12 @@ // ConvertTo-TS run at 2016-10-04T11:26:47.5349010-07:00 -import { Parser } from "../Parser"; -import { ParseTreeVisitor } from "./ParseTreeVisitor"; -import { RuleContext } from "../RuleContext"; -import { SyntaxTree } from "./SyntaxTree"; +import { + ParseTreeVisitor, + Parser, + RuleContext, + SyntaxTree +} from "../internal"; /** An interface to access the tree of {@link RuleContext} objects created * during a parse that makes the data structure look like a simple parse tree. @@ -19,7 +21,7 @@ import { SyntaxTree } from "./SyntaxTree"; */ export interface ParseTree extends SyntaxTree { // the following methods narrow the return type; they are not additional methods - //@Override + // @Override readonly parent: ParseTree | undefined; /** @@ -29,7 +31,7 @@ export interface ParseTree extends SyntaxTree { */ setParent(parent: RuleContext): void; - //@Override + // @Override getChild(i: number): ParseTree; /** The {@link ParseTreeVisitor} needs a double dispatch method. */ diff --git a/src/tree/ParseTreeListener.ts b/runtime/typescript/src/tree/ParseTreeListener.ts similarity index 87% rename from src/tree/ParseTreeListener.ts rename to runtime/typescript/src/tree/ParseTreeListener.ts index a9927427..2f8487d6 100644 --- a/src/tree/ParseTreeListener.ts +++ b/runtime/typescript/src/tree/ParseTreeListener.ts @@ -5,9 +5,11 @@ // ConvertTo-TS run at 2016-10-04T11:26:47.6109431-07:00 -import { ErrorNode } from "./ErrorNode"; -import { ParserRuleContext } from "../ParserRuleContext"; -import { TerminalNode } from "./TerminalNode"; +import { + ErrorNode, + ParserRuleContext, + TerminalNode +} from "../internal"; /** This interface describes the minimal core of methods triggered * by {@link ParseTreeWalker}. E.g., diff --git a/src/tree/ParseTreeProperty.ts b/runtime/typescript/src/tree/ParseTreeProperty.ts similarity index 89% rename from src/tree/ParseTreeProperty.ts rename to runtime/typescript/src/tree/ParseTreeProperty.ts index f0035202..e5fb51c3 100644 --- a/src/tree/ParseTreeProperty.ts +++ b/runtime/typescript/src/tree/ParseTreeProperty.ts @@ -5,7 +5,7 @@ // ConvertTo-TS run at 2016-10-04T11:26:47.6782223-07:00 -import { ParseTree } from "./ParseTree"; +import { ParseTree } from "../internal"; /** * Associate a property with a parse tree node. Useful with parse tree listeners @@ -26,7 +26,7 @@ import { ParseTree } from "./ParseTree"; export class ParseTreeProperty { private _symbol: symbol; - constructor(name: string = "ParseTreeProperty") { + constructor(name = "ParseTreeProperty") { this._symbol = Symbol(name); } @@ -39,7 +39,7 @@ export class ParseTreeProperty { } public removeFrom(node: ParseTree): V { - let result = (node as any)[this._symbol] as V; + const result = (node as any)[this._symbol] as V; delete (node as any)[this._symbol]; return result; } diff --git a/src/tree/ParseTreeVisitor.ts b/runtime/typescript/src/tree/ParseTreeVisitor.ts similarity index 90% rename from src/tree/ParseTreeVisitor.ts rename to runtime/typescript/src/tree/ParseTreeVisitor.ts index c8248eab..5b09ea8f 100644 --- a/src/tree/ParseTreeVisitor.ts +++ b/runtime/typescript/src/tree/ParseTreeVisitor.ts @@ -5,10 +5,12 @@ // ConvertTo-TS run at 2016-10-04T11:26:47.7512217-07:00 -import { ErrorNode } from "./ErrorNode"; -import { ParseTree } from "./ParseTree"; -import { RuleNode } from "./RuleNode"; -import { TerminalNode } from "./TerminalNode"; +import { + ErrorNode, + ParseTree, + RuleNode, + TerminalNode +} from "../internal"; /** * This interface defines the basic notion of a parse tree visitor. Generated diff --git a/src/tree/ParseTreeWalker.ts b/runtime/typescript/src/tree/ParseTreeWalker.ts similarity index 81% rename from src/tree/ParseTreeWalker.ts rename to runtime/typescript/src/tree/ParseTreeWalker.ts index 0d4f5926..870a3731 100644 --- a/src/tree/ParseTreeWalker.ts +++ b/runtime/typescript/src/tree/ParseTreeWalker.ts @@ -4,20 +4,23 @@ */ // ConvertTo-TS run at 2016-10-04T11:26:47.8252451-07:00 -import { ParseTree } from "./ParseTree"; -import { ParseTreeListener } from "./ParseTreeListener"; -import { ErrorNode } from "./ErrorNode"; -import { TerminalNode } from "./TerminalNode"; -import { RuleNode } from "./RuleNode"; -import { ParserRuleContext } from "../ParserRuleContext"; +import { + ParseTree, + ParseTreeListener, + ParserRuleContext, + RuleNode, + TerminalNode +} from "../internal"; + +import { ErrorNode } from "../internal"; export class ParseTreeWalker { public walk(listener: T, t: ParseTree): void { - let nodeStack: ParseTree[] = []; - let indexStack: number[] = []; + const nodeStack: ParseTree[] = []; + const indexStack: number[] = []; let currentNode: ParseTree | undefined = t; - let currentIndex: number = 0; + let currentIndex = 0; while (currentNode) { // pre-order visit @@ -57,7 +60,7 @@ export class ParseTreeWalker { } // Move to next sibling if possible - let last = nodeStack[nodeStack.length - 1]; + const last = nodeStack[nodeStack.length - 1]; currentIndex++; currentNode = currentIndex < last.childCount ? last.getChild(currentIndex) : undefined; if (currentNode) { @@ -78,7 +81,7 @@ export class ParseTreeWalker { * the rule specific. We to them in reverse order upon finishing the node. */ protected enterRule(listener: ParseTreeListener, r: RuleNode): void { - let ctx = r.ruleContext as ParserRuleContext; + const ctx = r.ruleContext as ParserRuleContext; if (listener.enterEveryRule) { listener.enterEveryRule(ctx); } @@ -87,7 +90,7 @@ export class ParseTreeWalker { } protected exitRule(listener: ParseTreeListener, r: RuleNode): void { - let ctx = r.ruleContext as ParserRuleContext; + const ctx = r.ruleContext as ParserRuleContext; ctx.exitRule(listener); if (listener.exitEveryRule) { listener.exitEveryRule(ctx); diff --git a/src/tree/RuleNode.ts b/runtime/typescript/src/tree/RuleNode.ts similarity index 77% rename from src/tree/RuleNode.ts rename to runtime/typescript/src/tree/RuleNode.ts index 887eeb1a..cee43e1c 100644 --- a/src/tree/RuleNode.ts +++ b/runtime/typescript/src/tree/RuleNode.ts @@ -5,16 +5,18 @@ // ConvertTo-TS run at 2016-10-04T11:26:47.9232756-07:00 -import { RuleContext } from "../RuleContext"; -import { ParseTree } from "./ParseTree"; -import { ParseTreeVisitor } from "./ParseTreeVisitor"; -import { Parser } from "../Parser"; -import { Interval } from "../misc/Interval"; +import { + Interval, + ParseTree, + ParseTreeVisitor, + Parser, + RuleContext +} from "../internal"; export abstract class RuleNode implements ParseTree { public abstract readonly ruleContext: RuleContext; - //@Override + // @Override public abstract readonly parent: RuleNode | undefined; public abstract setParent(parent: RuleContext): void; diff --git a/src/tree/SyntaxTree.ts b/runtime/typescript/src/tree/SyntaxTree.ts similarity index 94% rename from src/tree/SyntaxTree.ts rename to runtime/typescript/src/tree/SyntaxTree.ts index b33ed00f..42c16978 100644 --- a/src/tree/SyntaxTree.ts +++ b/runtime/typescript/src/tree/SyntaxTree.ts @@ -5,8 +5,10 @@ // ConvertTo-TS run at 2016-10-04T11:26:47.9953174-07:00 -import { Tree } from "./Tree"; -import { Interval } from "../misc/Interval"; +import { + Interval, + Tree +} from "../internal"; /** A tree that knows about an interval in a token stream * is some kind of syntax tree. Subinterfaces distinguish diff --git a/src/tree/TerminalNode.ts b/runtime/typescript/src/tree/TerminalNode.ts similarity index 71% rename from src/tree/TerminalNode.ts rename to runtime/typescript/src/tree/TerminalNode.ts index 98dc13e4..ec587fb9 100644 --- a/src/tree/TerminalNode.ts +++ b/runtime/typescript/src/tree/TerminalNode.ts @@ -5,14 +5,15 @@ // ConvertTo-TS run at 2016-10-04T11:26:48.1433686-07:00 -import { Interval } from "../misc/Interval"; -import { Override } from "../Decorators"; -import { Parser } from "../Parser"; -import { ParseTree } from "./ParseTree"; -import { ParseTreeVisitor } from "./ParseTreeVisitor"; -import { RuleContext } from "../RuleContext"; -import { RuleNode } from "./RuleNode"; -import { Token } from "../Token"; +import { + Interval, + ParseTree, + ParseTreeVisitor, + Parser, + RuleContext, + RuleNode, + Token +} from "../internal"; export class TerminalNode implements ParseTree { public _symbol: Token; @@ -22,7 +23,7 @@ export class TerminalNode implements ParseTree { this._symbol = symbol; } - @Override + // @Override public getChild(i: number): never { throw new RangeError("Terminal Node has no children."); } @@ -31,48 +32,48 @@ export class TerminalNode implements ParseTree { return this._symbol; } - @Override + // @Override get parent(): RuleNode | undefined { return this._parent; } - @Override + // @Override public setParent(parent: RuleContext): void { this._parent = parent; } - @Override + // @Override get payload(): Token { return this._symbol; } - @Override + // @Override get sourceInterval(): Interval { - let tokenIndex: number = this._symbol.tokenIndex; + const tokenIndex: number = this._symbol.tokenIndex; return new Interval(tokenIndex, tokenIndex); } - @Override + // @Override get childCount(): number { return 0; } - @Override + // @Override public accept(visitor: ParseTreeVisitor): T { return visitor.visitTerminal(this); } - @Override + // @Override get text(): string { return this._symbol.text || ""; } - @Override + // @Override public toStringTree(parser?: Parser): string { return this.toString(); } - @Override + // @Override public toString(): string { if (this._symbol.type === Token.EOF) { return ""; diff --git a/src/tree/Tree.ts b/runtime/typescript/src/tree/Tree.ts similarity index 100% rename from src/tree/Tree.ts rename to runtime/typescript/src/tree/Tree.ts diff --git a/src/tree/Trees.ts b/runtime/typescript/src/tree/Trees.ts similarity index 80% rename from src/tree/Trees.ts rename to runtime/typescript/src/tree/Trees.ts index 690d0368..f7e40c26 100644 --- a/src/tree/Trees.ts +++ b/runtime/typescript/src/tree/Trees.ts @@ -5,21 +5,22 @@ // ConvertTo-TS run at 2016-10-04T11:26:48.3187865-07:00 -import { Arrays } from "../misc/Arrays"; -import { ATN } from "../atn/ATN"; -import { CommonToken } from "../CommonToken"; -import { ErrorNode } from "./ErrorNode"; -import { Interval } from "../misc/Interval"; -import { NotNull } from "../Decorators"; -import { Parser } from "../Parser"; -import { ParserRuleContext } from "../ParserRuleContext"; -import { ParseTree } from "./ParseTree"; -import { RuleContext } from "../RuleContext"; -import { RuleNode } from "./RuleNode"; -import { TerminalNode } from "./TerminalNode"; -import { Token } from "../Token"; -import { Tree } from "./Tree"; -import * as Utils from "../misc/Utils"; +import * as Utils from "../internal"; + +import { + ATN, + CommonToken, + ErrorNode, + Interval, + ParseTree, + Parser, + ParserRuleContext, + RuleContext, + RuleNode, + TerminalNode, + Token, + Tree +} from "../internal"; /** A set of utility routines useful for all kinds of ANTLR trees. */ export class Trees { @@ -41,7 +42,7 @@ export class Trees { public static toStringTree(/*@NotNull*/ t: Tree, /*@Nullable*/ ruleNames: string[] | undefined): string; public static toStringTree(/*@NotNull*/ t: Tree, arg2?: Parser | string[]): string; - public static toStringTree(@NotNull t: Tree, arg2?: Parser | string[]): string { + public static toStringTree(t: Tree, arg2?: Parser | string[]): string { let ruleNames: string[] | undefined; if (arg2 instanceof Parser) { ruleNames = arg2.ruleNames; @@ -78,7 +79,7 @@ export class Trees { ruleNames = arg2; } else { // no recog or rule names - let payload = t.payload; + const payload = t.payload; if (typeof payload.text === "string") { return payload.text; } @@ -86,10 +87,10 @@ export class Trees { } if (t instanceof RuleNode) { - let ruleContext: RuleContext = t.ruleContext; - let ruleIndex: number = ruleContext.ruleIndex; - let ruleName: string = ruleNames[ruleIndex]; - let altNumber: number = ruleContext.altNumber; + const ruleContext: RuleContext = t.ruleContext; + const ruleIndex: number = ruleContext.ruleIndex; + const ruleName: string = ruleNames[ruleIndex]; + const altNumber: number = ruleContext.altNumber; if (altNumber !== ATN.INVALID_ALT_NUMBER) { return ruleName + ":" + altNumber; } @@ -99,7 +100,7 @@ export class Trees { return t.toString(); } else if (t instanceof TerminalNode) { - let symbol = t.symbol; + const symbol = t.symbol; return symbol.text || ""; } throw new TypeError("Unexpected node type"); @@ -109,7 +110,7 @@ export class Trees { public static getChildren(t: ParseTree): ParseTree[]; public static getChildren(t: Tree): Tree[]; public static getChildren(t: Tree): Tree[] { - let kids: Tree[] = []; + const kids: Tree[] = []; for (let i = 0; i < t.childCount; i++) { kids.push(t.getChild(i)); } @@ -123,9 +124,9 @@ export class Trees { */ public static getAncestors(t: ParseTree): ParseTree[]; public static getAncestors(t: Tree): Tree[]; - @NotNull - public static getAncestors(@NotNull t: Tree): Tree[] { - let ancestors: Tree[] = []; + + public static getAncestors(t: Tree): Tree[] { + const ancestors: Tree[] = []; let p = t.parent; while (p) { ancestors.unshift(p); // insert at start @@ -162,7 +163,7 @@ export class Trees { } public static findAllNodes(t: ParseTree, index: number, findTokens: boolean): ParseTree[] { - let nodes: ParseTree[] = []; + const nodes: ParseTree[] = []; Trees._findAllNodes(t, index, findTokens, nodes); return nodes; } @@ -190,7 +191,7 @@ export class Trees { * @since 4.5.1 */ public static getDescendants(t: ParseTree): ParseTree[] { - let nodes: ParseTree[] = []; + const nodes: ParseTree[] = []; function recurse(e: ParseTree): void { nodes.push(e); @@ -210,20 +211,20 @@ export class Trees { * @since 4.5 */ public static getRootOfSubtreeEnclosingRegion( - @NotNull t: ParseTree, + t: ParseTree, startTokenIndex: number, // inclusive stopTokenIndex: number, // inclusive ): ParserRuleContext | undefined { - let n: number = t.childCount; + const n: number = t.childCount; for (let i = 0; i < n; i++) { - let child: ParseTree = t.getChild(i); - let r = Trees.getRootOfSubtreeEnclosingRegion(child, startTokenIndex, stopTokenIndex); + const child: ParseTree = t.getChild(i); + const r = Trees.getRootOfSubtreeEnclosingRegion(child, startTokenIndex, stopTokenIndex); if (r) { return r; } } if (t instanceof ParserRuleContext) { - let stopToken = t.stop; + const stopToken = t.stop; if (startTokenIndex >= t.start.tokenIndex && // is range fully contained in t? (stopToken == null || stopTokenIndex <= stopToken.tokenIndex)) { // note: r.stop==null likely implies that we bailed out of parser and there's nothing to the right @@ -249,13 +250,13 @@ export class Trees { if (!t) { return; } - let count = t.childCount; + const count = t.childCount; for (let i = 0; i < count; i++) { - let child = t.getChild(i); - let range: Interval = child.sourceInterval; + const child = t.getChild(i); + const range: Interval = child.sourceInterval; if (child instanceof ParserRuleContext && (range.b < startIndex || range.a > stopIndex)) { if (Trees.isAncestorOf(child, root)) { // replace only if subtree doesn't have displayed root - let abbrev: CommonToken = new CommonToken(Token.INVALID_TYPE, "..."); + const abbrev: CommonToken = new CommonToken(Token.INVALID_TYPE, "..."); t.children![i] = new TerminalNode(abbrev); // HACK access to private } } @@ -274,9 +275,9 @@ export class Trees { return t; } - let n: number = t.childCount; - for (let i = 0 ; i < n ; i++){ - let u = Trees.findNodeSuchThat(t.getChild(i), pred as (tree: Tree) => boolean); + const n: number = t.childCount; + for (let i = 0; i < n; i++) { + const u = Trees.findNodeSuchThat(t.getChild(i), pred as (tree: Tree) => boolean); if (u !== undefined) { return u; } diff --git a/runtime/typescript/src/tree/index.ts b/runtime/typescript/src/tree/index.ts new file mode 100644 index 00000000..5528fc7c --- /dev/null +++ b/runtime/typescript/src/tree/index.ts @@ -0,0 +1,25 @@ +/*! + * Copyright 2016 The ANTLR Project. All rights reserved. + * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. + */ + + +export * from "../internal"; +export * from "../internal"; + +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; +export * from "../internal"; + +export * from "../internal"; + +// Keep these last +export * from "../internal"; +export * from "../internal"; +export * from "../internal" diff --git a/src/tree/pattern/Chunk.ts b/runtime/typescript/src/tree/pattern/Chunk.ts similarity index 100% rename from src/tree/pattern/Chunk.ts rename to runtime/typescript/src/tree/pattern/Chunk.ts diff --git a/src/tree/pattern/ParseTreeMatch.ts b/runtime/typescript/src/tree/pattern/ParseTreeMatch.ts similarity index 91% rename from src/tree/pattern/ParseTreeMatch.ts rename to runtime/typescript/src/tree/pattern/ParseTreeMatch.ts index 03a0aa8e..e9b02314 100644 --- a/src/tree/pattern/ParseTreeMatch.ts +++ b/runtime/typescript/src/tree/pattern/ParseTreeMatch.ts @@ -4,10 +4,11 @@ */ // CONVERSTION complete, Burt Harris 10/14/2016 -import { MultiMap } from "../../misc/MultiMap"; -import { NotNull, Override } from "../../Decorators"; -import { ParseTree } from "../ParseTree"; -import { ParseTreePattern } from "./ParseTreePattern"; +import { + MultiMap, + ParseTree, + ParseTreePattern +} from "../../internal"; /** * Represents the result of matching a {@link ParseTree} against a tree pattern. @@ -49,9 +50,9 @@ export class ParseTreeMatch { * @throws {@link Error} if `labels` is not defined */ constructor( - @NotNull tree: ParseTree, - @NotNull pattern: ParseTreePattern, - @NotNull labels: MultiMap, + tree: ParseTree, + pattern: ParseTreePattern, + labels: MultiMap, mismatchedNode: ParseTree | undefined) { if (!tree) { throw new Error("tree cannot be null"); @@ -88,7 +89,7 @@ export class ParseTreeMatch { * label, or `undefined` if no parse tree matched a tag with the label. */ public get(label: string): ParseTree | undefined { - let parseTrees = this._labels.get(label); + const parseTrees = this._labels.get(label); if (!parseTrees || parseTrees.length === 0) { return undefined; } @@ -117,8 +118,8 @@ export class ParseTreeMatch { * the specified `label`. If no nodes matched the label, an empty list * is returned. */ - @NotNull - public getAll(@NotNull label: string): ParseTree[] { + + public getAll(label: string): ParseTree[] { const nodes = this._labels.get(label); if (!nodes) { return []; @@ -136,7 +137,7 @@ export class ParseTreeMatch { * @returns A mapping from labels to parse tree nodes. If the parse tree * pattern did not contain any rule or token tags, this map will be empty. */ - @NotNull + get labels(): MultiMap { return this._labels; } @@ -166,7 +167,7 @@ export class ParseTreeMatch { * * @returns The tree pattern we are matching against. */ - @NotNull + get pattern(): ParseTreePattern { return this._pattern; } @@ -176,7 +177,7 @@ export class ParseTreeMatch { * * @returns The {@link ParseTree} we are trying to match to a pattern. */ - @NotNull + get tree(): ParseTree { return this._tree; } @@ -184,7 +185,7 @@ export class ParseTreeMatch { /** * {@inheritDoc} */ - @Override + // @Override public toString(): string { return `Match ${ this.succeeded ? "succeeded" : "failed"}; found ${ diff --git a/src/tree/pattern/ParseTreePattern.ts b/runtime/typescript/src/tree/pattern/ParseTreePattern.ts similarity index 81% rename from src/tree/pattern/ParseTreePattern.ts rename to runtime/typescript/src/tree/pattern/ParseTreePattern.ts index b486c17a..7ec8c346 100644 --- a/src/tree/pattern/ParseTreePattern.ts +++ b/runtime/typescript/src/tree/pattern/ParseTreePattern.ts @@ -4,11 +4,13 @@ */ // CONVERSTION complete, Burt Harris 10/14/2016 -import { NotNull } from "../../Decorators"; -import { ParseTree } from "../ParseTree"; -import { ParseTreeMatch } from "./ParseTreeMatch"; -import { ParseTreePatternMatcher } from "./ParseTreePatternMatcher"; -import { XPath } from "../xpath/XPath"; + +import { + ParseTree, + ParseTreeMatch, + ParseTreePatternMatcher, + XPath +} from "../../internal"; /** * A pattern like ` = ;` converted to a {@link ParseTree} by @@ -23,19 +25,19 @@ export class ParseTreePattern { /** * This is the backing field for `pattern`. */ - @NotNull + private _pattern: string; /** * This is the backing field for `patternTree`. */ - @NotNull + private _patternTree: ParseTree; /** * This is the backing field for `matcher`. */ - @NotNull + private _matcher: ParseTreePatternMatcher; /** @@ -49,10 +51,10 @@ export class ParseTreePattern { * @param patternTree The tree pattern in {@link ParseTree} form. */ constructor( - @NotNull matcher: ParseTreePatternMatcher, - @NotNull pattern: string, + matcher: ParseTreePatternMatcher, + pattern: string, patternRuleIndex: number, - @NotNull patternTree: ParseTree) { + patternTree: ParseTree) { this._matcher = matcher; this._patternRuleIndex = patternRuleIndex; this._pattern = pattern; @@ -67,8 +69,8 @@ export class ParseTreePattern { * match operation. The `ParseTreeMatch.succeeded` method can be * used to determine whether or not the match was successful. */ - @NotNull - public match(@NotNull tree: ParseTree): ParseTreeMatch { + + public match(tree: ParseTree): ParseTreeMatch { return this._matcher.match(tree, this); } @@ -79,7 +81,7 @@ export class ParseTreePattern { * @returns `true` if `tree` is a match for the current tree * pattern; otherwise, `false`. */ - public matches(@NotNull tree: ParseTree): boolean { + public matches(tree: ParseTree): boolean { return this._matcher.match(tree, this).succeeded; } @@ -94,12 +96,12 @@ export class ParseTreePattern { * successful matches. Unsuccessful matches are omitted from the result, * regardless of the reason for the failure. */ - @NotNull - public findAll(@NotNull tree: ParseTree, @NotNull xpath: string): ParseTreeMatch[] { - let subtrees: Set = XPath.findAll(tree, xpath, this._matcher.parser); - let matches: ParseTreeMatch[] = []; - for (let t of subtrees) { - let match: ParseTreeMatch = this.match(t); + + public findAll(tree: ParseTree, xpath: string): ParseTreeMatch[] { + const subtrees: Set = XPath.findAll(tree, xpath, this._matcher.parser); + const matches: ParseTreeMatch[] = []; + for (const t of subtrees) { + const match: ParseTreeMatch = this.match(t); if (match.succeeded) { matches.push(match); } @@ -113,7 +115,7 @@ export class ParseTreePattern { * @returns The {@link ParseTreePatternMatcher} which created this tree * pattern. */ - @NotNull + get matcher(): ParseTreePatternMatcher { return this._matcher; } @@ -123,7 +125,7 @@ export class ParseTreePattern { * * @returns The tree pattern in concrete syntax form. */ - @NotNull + get pattern(): string { return this._pattern; } @@ -146,7 +148,7 @@ export class ParseTreePattern { * * @returns The tree pattern as a {@link ParseTree}. */ - @NotNull + get patternTree(): ParseTree { return this._patternTree; } diff --git a/src/tree/pattern/ParseTreePatternMatcher.ts b/runtime/typescript/src/tree/pattern/ParseTreePatternMatcher.ts similarity index 78% rename from src/tree/pattern/ParseTreePatternMatcher.ts rename to runtime/typescript/src/tree/pattern/ParseTreePatternMatcher.ts index 948296d9..d2daa41c 100644 --- a/src/tree/pattern/ParseTreePatternMatcher.ts +++ b/runtime/typescript/src/tree/pattern/ParseTreePatternMatcher.ts @@ -5,29 +5,30 @@ // CONVERSTION complete, Burt Harris 10/14/2016 -import { BailErrorStrategy } from "../../BailErrorStrategy"; -import { CharStreams } from "../../CharStreams"; -import { Chunk } from "./Chunk"; -import { CommonTokenStream } from "../../CommonTokenStream"; -import { Lexer } from "../../Lexer"; -import { ListTokenSource } from "../../ListTokenSource"; -import { MultiMap } from "../../misc/MultiMap"; -import { NotNull } from "../../Decorators"; -import { ParseCancellationException } from "../../misc/ParseCancellationException"; -import { Parser } from "../../Parser"; -import { ParserInterpreter } from "../../ParserInterpreter"; -import { ParserRuleContext } from "../../ParserRuleContext"; -import { ParseTree } from "../ParseTree"; -import { ParseTreeMatch } from "./ParseTreeMatch"; -import { ParseTreePattern } from "./ParseTreePattern"; -import { RecognitionException } from "../../RecognitionException"; -import { RuleNode } from "../RuleNode"; -import { RuleTagToken } from "./RuleTagToken"; -import { TagChunk } from "./TagChunk"; -import { TerminalNode } from "../TerminalNode"; -import { TextChunk } from "./TextChunk"; -import { Token } from "../../Token"; -import { TokenTagToken } from "./TokenTagToken"; +import { + BailErrorStrategy, + CharStreams, + Chunk, + CommonTokenStream, + Lexer, + ListTokenSource, + MultiMap, + ParseCancellationException, + ParseTree, + ParseTreeMatch, + ParseTreePattern, + Parser, + ParserInterpreter, + ParserRuleContext, + RecognitionException, + RuleNode, + RuleTagToken, + TagChunk, + TerminalNode, + TextChunk, + Token, + TokenTagToken +} from "../../internal"; /** * A tree pattern matching mechanism for ANTLR {@link ParseTree}s. @@ -153,13 +154,13 @@ export class ParseTreePatternMatcher { */ public matches(tree: ParseTree, pattern: ParseTreePattern): boolean; - public matches(tree: ParseTree, pattern: string | ParseTreePattern, patternRuleIndex: number = 0): boolean { + public matches(tree: ParseTree, pattern: string | ParseTreePattern, patternRuleIndex = 0): boolean { if (typeof pattern === "string") { - let p: ParseTreePattern = this.compile(pattern, patternRuleIndex); + const p: ParseTreePattern = this.compile(pattern, patternRuleIndex); return this.matches(tree, p); } else { - let labels = new MultiMap(); - let mismatchedNode = this.matchImpl(tree, pattern.patternTree, labels); + const labels = new MultiMap(); + const mismatchedNode = this.matchImpl(tree, pattern.patternTree, labels); return !mismatchedNode; } } @@ -180,14 +181,14 @@ export class ParseTreePatternMatcher { public match(tree: ParseTree, pattern: ParseTreePattern): ParseTreeMatch; // Implementation of match - @NotNull - public match(tree: ParseTree, @NotNull pattern: string | ParseTreePattern, patternRuleIndex: number = 0): ParseTreeMatch { + + public match(tree: ParseTree, pattern: string | ParseTreePattern, patternRuleIndex = 0): ParseTreeMatch { if (typeof pattern === "string") { - let p: ParseTreePattern = this.compile(pattern, patternRuleIndex); + const p: ParseTreePattern = this.compile(pattern, patternRuleIndex); return this.match(tree, p); } else { - let labels = new MultiMap(); - let mismatchedNode = this.matchImpl(tree, pattern.patternTree, labels); + const labels = new MultiMap(); + const mismatchedNode = this.matchImpl(tree, pattern.patternTree, labels); return new ParseTreeMatch(tree, pattern, labels, mismatchedNode); } } @@ -197,12 +198,12 @@ export class ParseTreePatternMatcher { * {@link ParseTreePattern} using this method. */ public compile(pattern: string, patternRuleIndex: number): ParseTreePattern { - let tokenList = this.tokenize(pattern); - let tokenSrc = new ListTokenSource(tokenList); - let tokens = new CommonTokenStream(tokenSrc); + const tokenList = this.tokenize(pattern); + const tokenSrc = new ListTokenSource(tokenList); + const tokens = new CommonTokenStream(tokenSrc); const parser = this._parser; - let parserInterp = new ParserInterpreter( + const parserInterp = new ParserInterpreter( parser.grammarFileName, parser.vocabulary, parser.ruleNames, @@ -213,7 +214,7 @@ export class ParseTreePatternMatcher { try { parserInterp.errorHandler = new BailErrorStrategy(); tree = parserInterp.parse(patternRuleIndex); -// System.out.println("pattern tree = "+tree.toStringTree(parserInterp)); + // System.out.println("pattern tree = "+tree.toStringTree(parserInterp)); } catch (e) { if (e instanceof ParseCancellationException) { throw e.getCause(); @@ -238,7 +239,7 @@ export class ParseTreePatternMatcher { * Used to convert the tree pattern string into a series of tokens. The * input stream is reset. */ - @NotNull + get lexer(): Lexer { return this._lexer; } @@ -247,7 +248,7 @@ export class ParseTreePatternMatcher { * Used to collect to the grammar file name, token names, rule names for * used to parse the pattern into a parse tree. */ - @NotNull + get parser(): Parser { return this._parser; } @@ -264,9 +265,9 @@ export class ParseTreePatternMatcher { * algorithm used by the implementation, and may be overridden. */ protected matchImpl( - @NotNull tree: ParseTree, - @NotNull patternTree: ParseTree, - @NotNull labels: MultiMap): ParseTree | undefined { + tree: ParseTree, + patternTree: ParseTree, + labels: MultiMap): ParseTree | undefined { if (!tree) { throw new TypeError("tree cannot be null"); } @@ -281,7 +282,7 @@ export class ParseTreePatternMatcher { // both are tokens and they have same type if (tree.symbol.type === patternTree.symbol.type) { if (patternTree.symbol instanceof TokenTagToken) { // x and - let tokenTagToken = patternTree.symbol; + const tokenTagToken = patternTree.symbol; // track label->list-of-nodes for both token name and label (if any) labels.map(tokenTagToken.tokenName, tree); const l = tokenTagToken.label; @@ -312,7 +313,7 @@ export class ParseTreePatternMatcher { && patternTree instanceof ParserRuleContext) { let mismatchedNode: ParseTree | undefined; // (expr ...) and - let ruleTagToken = this.getRuleTagToken(patternTree); + const ruleTagToken = this.getRuleTagToken(patternTree); if (ruleTagToken) { let m: ParseTreeMatch; if (tree.ruleContext.ruleIndex === patternTree.ruleContext.ruleIndex) { @@ -341,9 +342,9 @@ export class ParseTreePatternMatcher { return mismatchedNode; } - let n: number = tree.childCount; + const n: number = tree.childCount; for (let i = 0; i < n; i++) { - let childMatch = this.matchImpl(tree.getChild(i), patternTree.getChild(i), labels); + const childMatch = this.matchImpl(tree.getChild(i), patternTree.getChild(i), labels); if (childMatch) { return childMatch; } @@ -360,9 +361,9 @@ export class ParseTreePatternMatcher { protected getRuleTagToken(t: ParseTree): RuleTagToken | undefined { if (t instanceof RuleNode) { if (t.childCount === 1 && t.getChild(0) instanceof TerminalNode) { - let c = t.getChild(0) as TerminalNode; + const c = t.getChild(0) as TerminalNode; if (c.symbol instanceof RuleTagToken) { -// System.out.println("rule tag subtree "+t.toStringTree(parser)); + // System.out.println("rule tag subtree "+t.toStringTree(parser)); return c.symbol; } } @@ -372,30 +373,30 @@ export class ParseTreePatternMatcher { public tokenize(pattern: string): Token[] { // split pattern into chunks: sea (raw input) and islands (, ) - let chunks = this.split(pattern); + const chunks = this.split(pattern); // create token stream from text and tags - let tokens: Token[] = []; + const tokens: Token[] = []; - for (let chunk of chunks) { + for (const chunk of chunks) { if (chunk instanceof TagChunk) { - let tagChunk = chunk; + const tagChunk = chunk; const firstChar = tagChunk.tag.substr(0, 1); // add special rule token or conjure up new token from name if (firstChar === firstChar.toUpperCase()) { - let ttype: number = this._parser.getTokenType(tagChunk.tag); + const ttype: number = this._parser.getTokenType(tagChunk.tag); if (ttype === Token.INVALID_TYPE) { throw new Error("Unknown token " + tagChunk.tag + " in pattern: " + pattern); } - let t: TokenTagToken = new TokenTagToken(tagChunk.tag, ttype, tagChunk.label); + const t: TokenTagToken = new TokenTagToken(tagChunk.tag, ttype, tagChunk.label); tokens.push(t); } else if (firstChar === firstChar.toLowerCase()) { - let ruleIndex: number = this._parser.getRuleIndex(tagChunk.tag); + const ruleIndex: number = this._parser.getRuleIndex(tagChunk.tag); if (ruleIndex === -1) { throw new Error("Unknown rule " + tagChunk.tag + " in pattern: " + pattern); } - let ruleImaginaryTokenType: number = this._parser.getATNWithBypassAlts().ruleToTokenType[ruleIndex]; + const ruleImaginaryTokenType: number = this._parser.getATNWithBypassAlts().ruleToTokenType[ruleIndex]; tokens.push(new RuleTagToken(tagChunk.tag, ruleImaginaryTokenType, tagChunk.label)); } else { @@ -403,7 +404,7 @@ export class ParseTreePatternMatcher { } } else { - let textChunk = chunk as TextChunk; + const textChunk = chunk as TextChunk; this._lexer.inputStream = CharStreams.fromString(textChunk.text); let t: Token = this._lexer.nextToken(); while (t.type !== Token.EOF) { @@ -413,19 +414,19 @@ export class ParseTreePatternMatcher { } } -// System.out.println("tokens="+tokens); + // System.out.println("tokens="+tokens); return tokens; } /** Split ` = ;` into 4 chunks for tokenizing by {@link #tokenize}. */ public split(pattern: string): Chunk[] { - let p: number = 0; - let n: number = pattern.length; - let chunks: Chunk[] = []; + let p = 0; + const n: number = pattern.length; + const chunks: Chunk[] = []; let buf: ""; // find all start and stop indexes first, then collect - let starts: number[] = []; - let stops: number[] = []; + const starts: number[] = []; + const stops: number[] = []; while (p < n) { if (p === pattern.indexOf(this.escape + this.start, p)) { p += this.escape.length + this.start.length; @@ -446,9 +447,9 @@ export class ParseTreePatternMatcher { } } -// System.out.println(""); -// System.out.println(starts); -// System.out.println(stops); + // System.out.println(""); + // System.out.println(starts); + // System.out.println(stops); if (starts.length > stops.length) { throw new Error("unterminated tag in pattern: " + pattern); } @@ -457,7 +458,7 @@ export class ParseTreePatternMatcher { throw new Error("missing start tag in pattern: " + pattern); } - let ntags: number = starts.length; + const ntags: number = starts.length; for (let i = 0; i < ntags; i++) { if (starts[i] >= stops[i]) { throw new Error("tag delimiters out of order in pattern: " + pattern); @@ -466,20 +467,20 @@ export class ParseTreePatternMatcher { // collect into chunks now if (ntags === 0) { - let text: string = pattern.substring(0, n); + const text: string = pattern.substring(0, n); chunks.push(new TextChunk(text)); } if (ntags > 0 && starts[0] > 0) { // copy text up to first tag into chunks - let text: string = pattern.substring(0, starts[0]); + const text: string = pattern.substring(0, starts[0]); chunks.push(new TextChunk(text)); } for (let i = 0; i < ntags; i++) { // copy inside of - let tag: string = pattern.substring(starts[i] + this.start.length, stops[i]); + const tag: string = pattern.substring(starts[i] + this.start.length, stops[i]); let ruleOrToken: string = tag; let label: string | undefined; - let colon: number = tag.indexOf(":"); + const colon: number = tag.indexOf(":"); if (colon >= 0) { label = tag.substring(0, colon); ruleOrToken = tag.substring(colon + 1, tag.length); @@ -487,23 +488,23 @@ export class ParseTreePatternMatcher { chunks.push(new TagChunk(ruleOrToken, label)); if (i + 1 < ntags) { // copy from end of to start of next - let text: string = pattern.substring(stops[i] + this.stop.length, starts[i + 1]); + const text: string = pattern.substring(stops[i] + this.stop.length, starts[i + 1]); chunks.push(new TextChunk(text)); } } if (ntags > 0) { - let afterLastTag: number = stops[ntags - 1] + this.stop.length; + const afterLastTag: number = stops[ntags - 1] + this.stop.length; if (afterLastTag < n) { // copy text from end of last tag to end - let text: string = pattern.substring(afterLastTag, n); + const text: string = pattern.substring(afterLastTag, n); chunks.push(new TextChunk(text)); } } // strip out the escape sequences from text chunks but not tags for (let i = 0; i < chunks.length; i++) { - let c: Chunk = chunks[i]; + const c: Chunk = chunks[i]; if (c instanceof TextChunk) { - let unescaped: string = c.text.replace(this.escapeRE, ""); + const unescaped: string = c.text.replace(this.escapeRE, ""); if (unescaped.length < c.text.length) { chunks[i] = new TextChunk(unescaped); } diff --git a/src/tree/pattern/RuleTagToken.ts b/runtime/typescript/src/tree/pattern/RuleTagToken.ts similarity index 90% rename from src/tree/pattern/RuleTagToken.ts rename to runtime/typescript/src/tree/pattern/RuleTagToken.ts index 3901cc59..1274c0d3 100644 --- a/src/tree/pattern/RuleTagToken.ts +++ b/runtime/typescript/src/tree/pattern/RuleTagToken.ts @@ -5,10 +5,11 @@ // ConvertTo-TS run at 2016-10-04T11:26:46.0343500-07:00 -import { CharStream } from "../../CharStream"; -import { NotNull, Override } from "../../Decorators"; -import { Token } from "../../Token"; -import { TokenSource } from "../../TokenSource"; +import { + CharStream, + Token, + TokenSource +} from "../../internal"; /** * A {@link Token} object representing an entire subtree matched by a parser @@ -42,7 +43,7 @@ export class RuleTagToken implements Token { * @exception IllegalArgumentException if `ruleName` is not defined * or empty. */ - constructor(@NotNull ruleName: string, bypassTokenType: number, label?: string) { + constructor(ruleName: string, bypassTokenType: number, label?: string) { if (ruleName == null || ruleName.length === 0) { throw new Error("ruleName cannot be null or empty."); } @@ -57,7 +58,7 @@ export class RuleTagToken implements Token { * * @returns The name of the parser rule associated with this rule tag. */ - @NotNull + get ruleName(): string { return this._ruleName; } @@ -77,7 +78,7 @@ export class RuleTagToken implements Token { * * Rule tag tokens are always placed on the {@link #DEFAULT_CHANNEL}. */ - @Override + // @Override get channel(): number { return Token.DEFAULT_CHANNEL; } @@ -88,7 +89,7 @@ export class RuleTagToken implements Token { * This method returns the rule tag formatted with `<` and `>` * delimiters. */ - @Override + // @Override get text(): string { if (this._label != null) { return "<" + this._label + ":" + this._ruleName + ">"; @@ -103,7 +104,7 @@ export class RuleTagToken implements Token { * Rule tag tokens have types assigned according to the rule bypass * transitions created during ATN deserialization. */ - @Override + // @Override get type(): number { return this.bypassTokenType; } @@ -113,7 +114,7 @@ export class RuleTagToken implements Token { * * The implementation for {@link RuleTagToken} always returns 0. */ - @Override + // @Override get line(): number { return 0; } @@ -123,7 +124,7 @@ export class RuleTagToken implements Token { * * The implementation for {@link RuleTagToken} always returns -1. */ - @Override + // @Override get charPositionInLine(): number { return -1; } @@ -133,7 +134,7 @@ export class RuleTagToken implements Token { * * The implementation for {@link RuleTagToken} always returns -1. */ - @Override + // @Override get tokenIndex(): number { return -1; } @@ -143,7 +144,7 @@ export class RuleTagToken implements Token { * * The implementation for {@link RuleTagToken} always returns -1. */ - @Override + // @Override get startIndex(): number { return -1; } @@ -153,7 +154,7 @@ export class RuleTagToken implements Token { * * The implementation for {@link RuleTagToken} always returns -1. */ - @Override + // @Override get stopIndex(): number { return -1; } @@ -163,7 +164,7 @@ export class RuleTagToken implements Token { * * The implementation for {@link RuleTagToken} always returns `undefined`. */ - @Override + // @Override get tokenSource(): TokenSource | undefined { return undefined; } @@ -173,7 +174,7 @@ export class RuleTagToken implements Token { * * The implementation for {@link RuleTagToken} always returns `undefined`. */ - @Override + // @Override get inputStream(): CharStream | undefined { return undefined; } @@ -184,7 +185,7 @@ export class RuleTagToken implements Token { * The implementation for {@link RuleTagToken} returns a string of the form * `ruleName:bypassTokenType`. */ - @Override + // @Override public toString(): string { return this._ruleName + ":" + this.bypassTokenType; } diff --git a/src/tree/pattern/TagChunk.ts b/runtime/typescript/src/tree/pattern/TagChunk.ts similarity index 95% rename from src/tree/pattern/TagChunk.ts rename to runtime/typescript/src/tree/pattern/TagChunk.ts index 246b4a91..0d5ddb8d 100644 --- a/src/tree/pattern/TagChunk.ts +++ b/runtime/typescript/src/tree/pattern/TagChunk.ts @@ -5,8 +5,7 @@ // ConvertTo-TS run at 2016-10-04T11:26:46.1670669-07:00 -import { Chunk } from "./Chunk"; -import { NotNull, Override } from "../../Decorators"; +import { Chunk } from "../../internal"; /** * Represents a placeholder tag in a tree pattern. A tag can have any of the @@ -58,7 +57,7 @@ export class TagChunk extends Chunk { * * @returns The tag for the chunk. */ - @NotNull + get tag(): string { return this._tag; } @@ -78,7 +77,7 @@ export class TagChunk extends Chunk { * are returned in the form `label:tag`, and unlabeled tags are * returned as just the tag name. */ - @Override + // @Override public toString(): string { if (this._label != null) { return this._label + ":" + this._tag; diff --git a/src/tree/pattern/TextChunk.ts b/runtime/typescript/src/tree/pattern/TextChunk.ts similarity index 87% rename from src/tree/pattern/TextChunk.ts rename to runtime/typescript/src/tree/pattern/TextChunk.ts index fdb6afc9..e7cfa159 100644 --- a/src/tree/pattern/TextChunk.ts +++ b/runtime/typescript/src/tree/pattern/TextChunk.ts @@ -5,8 +5,7 @@ // ConvertTo-TS run at 2016-10-04T11:26:46.2521448-07:00 -import { Chunk } from "./Chunk"; -import { NotNull, Override } from "../../Decorators"; +import { Chunk } from "../../internal"; /** * Represents a span of raw text (concrete syntax) between tags in a tree @@ -16,7 +15,7 @@ export class TextChunk extends Chunk { /** * This is the backing field for {@link #getText}. */ - @NotNull + private _text: string; /** @@ -25,7 +24,7 @@ export class TextChunk extends Chunk { * @param text The text of this chunk. * @exception IllegalArgumentException if `text` is not defined. */ - constructor(@NotNull text: string) { + constructor(text: string) { super(); if (text == null) { @@ -40,7 +39,7 @@ export class TextChunk extends Chunk { * * @returns The text of the chunk. */ - @NotNull + get text(): string { return this._text; } @@ -51,7 +50,7 @@ export class TextChunk extends Chunk { * The implementation for {@link TextChunk} returns the result of * `text` in single quotes. */ - @Override + // @Override public toString(): string { return "'" + this._text + "'"; } diff --git a/src/tree/pattern/TokenTagToken.ts b/runtime/typescript/src/tree/pattern/TokenTagToken.ts similarity index 89% rename from src/tree/pattern/TokenTagToken.ts rename to runtime/typescript/src/tree/pattern/TokenTagToken.ts index 9367b0d7..e44959d4 100644 --- a/src/tree/pattern/TokenTagToken.ts +++ b/runtime/typescript/src/tree/pattern/TokenTagToken.ts @@ -5,8 +5,7 @@ // ConvertTo-TS run at 2016-10-04T11:26:46.3281988-07:00 -import { CommonToken } from "../../CommonToken"; -import { NotNull, Override } from "../../Decorators"; +import { CommonToken } from "../../internal"; /** * A {@link Token} object representing a token of a particular type; e.g., @@ -17,7 +16,7 @@ export class TokenTagToken extends CommonToken { /** * This is the backing field for `tokenName`. */ - @NotNull + private _tokenName: string; /** * This is the backing field for `label`. @@ -33,7 +32,7 @@ export class TokenTagToken extends CommonToken { * @param label The label associated with the token tag, or `undefined` if * the token tag is unlabeled. */ - constructor(@NotNull tokenName: string, type: number, label?: string) { + constructor(tokenName: string, type: number, label?: string) { super(type); this._tokenName = tokenName; this._label = label; @@ -43,7 +42,7 @@ export class TokenTagToken extends CommonToken { * Gets the token name. * @returns The token name. */ - @NotNull + get tokenName(): string { return this._tokenName; } @@ -64,7 +63,7 @@ export class TokenTagToken extends CommonToken { * The implementation for {@link TokenTagToken} returns the token tag * formatted with `<` and `>` delimiters. */ - @Override + // @Override get text(): string { if (this._label != null) { return "<" + this._label + ":" + this._tokenName + ">"; @@ -79,7 +78,7 @@ export class TokenTagToken extends CommonToken { * The implementation for {@link TokenTagToken} returns a string of the form * `tokenName:type`. */ - @Override + // @Override public toString(): string { return this._tokenName + ":" + this.type; } diff --git a/src/tree/pattern/index.ts b/runtime/typescript/src/tree/pattern/index.ts similarity index 54% rename from src/tree/pattern/index.ts rename to runtime/typescript/src/tree/pattern/index.ts index 3db01928..c93e1280 100644 --- a/src/tree/pattern/index.ts +++ b/runtime/typescript/src/tree/pattern/index.ts @@ -3,15 +3,15 @@ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. */ -export * from "./ParseTreeMatch"; -export * from "./ParseTreePattern"; -export * from "./ParseTreePatternMatcher"; -export * from "./RuleTagToken"; -export * from "./TokenTagToken"; +export * from "../../internal"; +export * from "../../internal"; +export * from "../../internal"; +export * from "../../internal"; +export * from "../../internal"; // The following are "package-private modules" - exported individually but don't need to be part of the public API // exposed by this file. // -// export * from "./Chunk"; -// export * from "./TagChunk"; -// export * from "./TextChunk"; +// export * from "../../internal"; +// export * from "../../internal"; +// export * from "../../internal"; diff --git a/runtime/typescript/src/tree/xpath/.antlr/XPathLexer.java b/runtime/typescript/src/tree/xpath/.antlr/XPathLexer.java new file mode 100644 index 00000000..63d0f796 --- /dev/null +++ b/runtime/typescript/src/tree/xpath/.antlr/XPathLexer.java @@ -0,0 +1,422 @@ +// Generated from c:\code\antlr4ts\runtime\typescript\src\tree\xpath\XPathLexer.g4 by ANTLR 4.7.1 +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class XPathLexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.7.1", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + TOKEN_REF=1, RULE_REF=2, ANYWHERE=3, ROOT=4, WILDCARD=5, BANG=6, ID=7, + STRING=8; + public static String[] channelNames = { + "DEFAULT_TOKEN_CHANNEL", "HIDDEN" + }; + + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + public static final String[] ruleNames = { + "ANYWHERE", "ROOT", "WILDCARD", "BANG", "ID", "NameChar", "NameStartChar", + "STRING" + }; + + private static final String[] _LITERAL_NAMES = { + null, null, null, "'//'", "'/'", "'*'", "'!'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, "TOKEN_REF", "RULE_REF", "ANYWHERE", "ROOT", "WILDCARD", "BANG", + "ID", "STRING" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + + public XPathLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "XPathLexer.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getChannelNames() { return channelNames; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + @Override + public void action(RuleContext _localctx, int ruleIndex, int actionIndex) { + switch (ruleIndex) { + case 4: + ID_action((RuleContext)_localctx, actionIndex); + break; + } + } + private void ID_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 0: + + const text = this.text; + if (text.charAt(0) === text.charAt(0).toUpperCase()) { + this.type = XPathLexer.TOKEN_REF; + } else { + this.type = XPathLexer.RULE_REF; + } + + break; + } + } + + public static final String _serializedATN = + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\n\62\b\1\4\2\t\2"+ + "\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\3\2\3\2\3\2\3"+ + "\3\3\3\3\4\3\4\3\5\3\5\3\6\3\6\7\6\37\n\6\f\6\16\6\"\13\6\3\6\3\6\3\7"+ + "\3\7\3\b\3\b\3\t\3\t\7\t,\n\t\f\t\16\t/\13\t\3\t\3\t\3-\2\n\3\5\5\6\7"+ + "\7\t\b\13\t\r\2\17\2\21\n\3\2\2\4\u02b6\2\2\2\n\2\20\2\35\2\62\2;\2C\2"+ + "\\\2a\2a\2c\2|\2\u0081\2\u00a1\2\u00ac\2\u00ac\2\u00af\2\u00af\2\u00b7"+ + "\2\u00b7\2\u00bc\2\u00bc\2\u00c2\2\u00d8\2\u00da\2\u00f8\2\u00fa\2\u02c3"+ + "\2\u02c8\2\u02d3\2\u02e2\2\u02e6\2\u02ee\2\u02ee\2\u02f0\2\u02f0\2\u0302"+ + "\2\u0376\2\u0378\2\u0379\2\u037c\2\u037f\2\u0381\2\u0381\2\u0388\2\u0388"+ + "\2\u038a\2\u038c\2\u038e\2\u038e\2\u0390\2\u03a3\2\u03a5\2\u03f7\2\u03f9"+ + "\2\u0483\2\u0485\2\u0489\2\u048c\2\u0531\2\u0533\2\u0558\2\u055b\2\u055b"+ + "\2\u0563\2\u0589\2\u0593\2\u05bf\2\u05c1\2\u05c1\2\u05c3\2\u05c4\2\u05c6"+ + "\2\u05c7\2\u05c9\2\u05c9\2\u05d2\2\u05ec\2\u05f2\2\u05f4\2\u0602\2\u0607"+ + "\2\u0612\2\u061c\2\u061e\2\u061e\2\u0622\2\u066b\2\u0670\2\u06d5\2\u06d7"+ + "\2\u06df\2\u06e1\2\u06ea\2\u06ec\2\u06fe\2\u0701\2\u0701\2\u0711\2\u074c"+ + "\2\u074f\2\u07b3\2\u07c2\2\u07f7\2\u07fc\2\u07fc\2\u0802\2\u082f\2\u0842"+ + "\2\u085d\2\u08a2\2\u08b6\2\u08b8\2\u08bf\2\u08d6\2\u0965\2\u0968\2\u0971"+ + "\2\u0973\2\u0985\2\u0987\2\u098e\2\u0991\2\u0992\2\u0995\2\u09aa\2\u09ac"+ + "\2\u09b2\2\u09b4\2\u09b4\2\u09b8\2\u09bb\2\u09be\2\u09c6\2\u09c9\2\u09ca"+ + "\2\u09cd\2\u09d0\2\u09d9\2\u09d9\2\u09de\2\u09df\2\u09e1\2\u09e5\2\u09e8"+ + "\2\u09f3\2\u0a03\2\u0a05\2\u0a07\2\u0a0c\2\u0a11\2\u0a12\2\u0a15\2\u0a2a"+ + "\2\u0a2c\2\u0a32\2\u0a34\2\u0a35\2\u0a37\2\u0a38\2\u0a3a\2\u0a3b\2\u0a3e"+ + "\2\u0a3e\2\u0a40\2\u0a44\2\u0a49\2\u0a4a\2\u0a4d\2\u0a4f\2\u0a53\2\u0a53"+ + "\2\u0a5b\2\u0a5e\2\u0a60\2\u0a60\2\u0a68\2\u0a77\2\u0a83\2\u0a85\2\u0a87"+ + "\2\u0a8f\2\u0a91\2\u0a93\2\u0a95\2\u0aaa\2\u0aac\2\u0ab2\2\u0ab4\2\u0ab5"+ + "\2\u0ab7\2\u0abb\2\u0abe\2\u0ac7\2\u0ac9\2\u0acb\2\u0acd\2\u0acf\2\u0ad2"+ + "\2\u0ad2\2\u0ae2\2\u0ae5\2\u0ae8\2\u0af1\2\u0afb\2\u0afb\2\u0b03\2\u0b05"+ + "\2\u0b07\2\u0b0e\2\u0b11\2\u0b12\2\u0b15\2\u0b2a\2\u0b2c\2\u0b32\2\u0b34"+ + "\2\u0b35\2\u0b37\2\u0b3b\2\u0b3e\2\u0b46\2\u0b49\2\u0b4a\2\u0b4d\2\u0b4f"+ + "\2\u0b58\2\u0b59\2\u0b5e\2\u0b5f\2\u0b61\2\u0b65\2\u0b68\2\u0b71\2\u0b73"+ + "\2\u0b73\2\u0b84\2\u0b85\2\u0b87\2\u0b8c\2\u0b90\2\u0b92\2\u0b94\2\u0b97"+ + "\2\u0b9b\2\u0b9c\2\u0b9e\2\u0b9e\2\u0ba0\2\u0ba1\2\u0ba5\2\u0ba6\2\u0baa"+ + "\2\u0bac\2\u0bb0\2\u0bbb\2\u0bc0\2\u0bc4\2\u0bc8\2\u0bca\2\u0bcc\2\u0bcf"+ + "\2\u0bd2\2\u0bd2\2\u0bd9\2\u0bd9\2\u0be8\2\u0bf1\2\u0c02\2\u0c05\2\u0c07"+ + "\2\u0c0e\2\u0c10\2\u0c12\2\u0c14\2\u0c2a\2\u0c2c\2\u0c3b\2\u0c3f\2\u0c46"+ + "\2\u0c48\2\u0c4a\2\u0c4c\2\u0c4f\2\u0c57\2\u0c58\2\u0c5a\2\u0c5c\2\u0c62"+ + "\2\u0c65\2\u0c68\2\u0c71\2\u0c82\2\u0c85\2\u0c87\2\u0c8e\2\u0c90\2\u0c92"+ + "\2\u0c94\2\u0caa\2\u0cac\2\u0cb5\2\u0cb7\2\u0cbb\2\u0cbe\2\u0cc6\2\u0cc8"+ + "\2\u0cca\2\u0ccc\2\u0ccf\2\u0cd7\2\u0cd8\2\u0ce0\2\u0ce0\2\u0ce2\2\u0ce5"+ + "\2\u0ce8\2\u0cf1\2\u0cf3\2\u0cf4\2\u0d03\2\u0d05\2\u0d07\2\u0d0e\2\u0d10"+ + "\2\u0d12\2\u0d14\2\u0d3c\2\u0d3f\2\u0d46\2\u0d48\2\u0d4a\2\u0d4c\2\u0d50"+ + "\2\u0d56\2\u0d59\2\u0d61\2\u0d65\2\u0d68\2\u0d71\2\u0d7c\2\u0d81\2\u0d84"+ + "\2\u0d85\2\u0d87\2\u0d98\2\u0d9c\2\u0db3\2\u0db5\2\u0dbd\2\u0dbf\2\u0dbf"+ + "\2\u0dc2\2\u0dc8\2\u0dcc\2\u0dcc\2\u0dd1\2\u0dd6\2\u0dd8\2\u0dd8\2\u0dda"+ + "\2\u0de1\2\u0de8\2\u0df1\2\u0df4\2\u0df5\2\u0e03\2\u0e3c\2\u0e42\2\u0e50"+ + "\2\u0e52\2\u0e5b\2\u0e83\2\u0e84\2\u0e86\2\u0e86\2\u0e89\2\u0e8a\2\u0e8c"+ + "\2\u0e8c\2\u0e8f\2\u0e8f\2\u0e96\2\u0e99\2\u0e9b\2\u0ea1\2\u0ea3\2\u0ea5"+ + "\2\u0ea7\2\u0ea7\2\u0ea9\2\u0ea9\2\u0eac\2\u0ead\2\u0eaf\2\u0ebb\2\u0ebd"+ + "\2\u0ebf\2\u0ec2\2\u0ec6\2\u0ec8\2\u0ec8\2\u0eca\2\u0ecf\2\u0ed2\2\u0edb"+ + "\2\u0ede\2\u0ee1\2\u0f02\2\u0f02\2\u0f1a\2\u0f1b\2\u0f22\2\u0f2b\2\u0f37"+ + "\2\u0f37\2\u0f39\2\u0f39\2\u0f3b\2\u0f3b\2\u0f40\2\u0f49\2\u0f4b\2\u0f6e"+ + "\2\u0f73\2\u0f86\2\u0f88\2\u0f99\2\u0f9b\2\u0fbe\2\u0fc8\2\u0fc8\2\u1002"+ + "\2\u104b\2\u1052\2\u109f\2\u10a2\2\u10c7\2\u10c9\2\u10c9\2\u10cf\2\u10cf"+ + "\2\u10d2\2\u10fc\2\u10fe\2\u124a\2\u124c\2\u124f\2\u1252\2\u1258\2\u125a"+ + "\2\u125a\2\u125c\2\u125f\2\u1262\2\u128a\2\u128c\2\u128f\2\u1292\2\u12b2"+ + "\2\u12b4\2\u12b7\2\u12ba\2\u12c0\2\u12c2\2\u12c2\2\u12c4\2\u12c7\2\u12ca"+ + "\2\u12d8\2\u12da\2\u1312\2\u1314\2\u1317\2\u131a\2\u135c\2\u135f\2\u1361"+ + "\2\u1382\2\u1391\2\u13a2\2\u13f7\2\u13fa\2\u13ff\2\u1403\2\u166e\2\u1671"+ + "\2\u1681\2\u1683\2\u169c\2\u16a2\2\u16ec\2\u16f0\2\u16fa\2\u1702\2\u170e"+ + "\2\u1710\2\u1716\2\u1722\2\u1736\2\u1742\2\u1755\2\u1762\2\u176e\2\u1770"+ + "\2\u1772\2\u1774\2\u1775\2\u1782\2\u17d5\2\u17d9\2\u17d9\2\u17de\2\u17df"+ + "\2\u17e2\2\u17eb\2\u180d\2\u1810\2\u1812\2\u181b\2\u1822\2\u1879\2\u1882"+ + "\2\u18ac\2\u18b2\2\u18f7\2\u1902\2\u1920\2\u1922\2\u192d\2\u1932\2\u193d"+ + "\2\u1948\2\u196f\2\u1972\2\u1976\2\u1982\2\u19ad\2\u19b2\2\u19cb\2\u19d2"+ + "\2\u19db\2\u1a02\2\u1a1d\2\u1a22\2\u1a60\2\u1a62\2\u1a7e\2\u1a81\2\u1a8b"+ + "\2\u1a92\2\u1a9b\2\u1aa9\2\u1aa9\2\u1ab2\2\u1abf\2\u1b02\2\u1b4d\2\u1b52"+ + "\2\u1b5b\2\u1b6d\2\u1b75\2\u1b82\2\u1bf5\2\u1c02\2\u1c39\2\u1c42\2\u1c4b"+ + "\2\u1c4f\2\u1c7f\2\u1c82\2\u1c8a\2\u1cd2\2\u1cd4\2\u1cd6\2\u1cf8\2\u1cfa"+ + "\2\u1cfb\2\u1d02\2\u1df7\2\u1dfd\2\u1f17\2\u1f1a\2\u1f1f\2\u1f22\2\u1f47"+ + "\2\u1f4a\2\u1f4f\2\u1f52\2\u1f59\2\u1f5b\2\u1f5b\2\u1f5d\2\u1f5d\2\u1f5f"+ + "\2\u1f5f\2\u1f61\2\u1f7f\2\u1f82\2\u1fb6\2\u1fb8\2\u1fbe\2\u1fc0\2\u1fc0"+ + "\2\u1fc4\2\u1fc6\2\u1fc8\2\u1fce\2\u1fd2\2\u1fd5\2\u1fd8\2\u1fdd\2\u1fe2"+ + "\2\u1fee\2\u1ff4\2\u1ff6\2\u1ff8\2\u1ffe\2\u200d\2\u2011\2\u202c\2\u2030"+ + "\2\u2041\2\u2042\2\u2056\2\u2056\2\u2062\2\u2066\2\u2068\2\u2071\2\u2073"+ + "\2\u2073\2\u2081\2\u2081\2\u2092\2\u209e\2\u20d2\2\u20de\2\u20e3\2\u20e3"+ + "\2\u20e7\2\u20f2\2\u2104\2\u2104\2\u2109\2\u2109\2\u210c\2\u2115\2\u2117"+ + "\2\u2117\2\u211b\2\u211f\2\u2126\2\u2126\2\u2128\2\u2128\2\u212a\2\u212a"+ + "\2\u212c\2\u212f\2\u2131\2\u213b\2\u213e\2\u2141\2\u2147\2\u214b\2\u2150"+ + "\2\u2150\2\u2162\2\u218a\2\u2c02\2\u2c30\2\u2c32\2\u2c60\2\u2c62\2\u2ce6"+ + "\2\u2ced\2\u2cf5\2\u2d02\2\u2d27\2\u2d29\2\u2d29\2\u2d2f\2\u2d2f\2\u2d32"+ + "\2\u2d69\2\u2d71\2\u2d71\2\u2d81\2\u2d98\2\u2da2\2\u2da8\2\u2daa\2\u2db0"+ + "\2\u2db2\2\u2db8\2\u2dba\2\u2dc0\2\u2dc2\2\u2dc8\2\u2dca\2\u2dd0\2\u2dd2"+ + "\2\u2dd8\2\u2dda\2\u2de0\2\u2de2\2\u2e01\2\u2e31\2\u2e31\2\u3007\2\u3009"+ + "\2\u3023\2\u3031\2\u3033\2\u3037\2\u303a\2\u303e\2\u3043\2\u3098\2\u309b"+ + "\2\u309c\2\u309f\2\u30a1\2\u30a3\2\u30fc\2\u30fe\2\u3101\2\u3107\2\u312f"+ + "\2\u3133\2\u3190\2\u31a2\2\u31bc\2\u31f2\2\u3201\2\u3402\2\u4db7\2\u4e02"+ + "\2\u9fd7\2\ua002\2\ua48e\2\ua4d2\2\ua4ff\2\ua502\2\ua60e\2\ua612\2\ua62d"+ + "\2\ua642\2\ua671\2\ua676\2\ua67f\2\ua681\2\ua6f3\2\ua719\2\ua721\2\ua724"+ + "\2\ua78a\2\ua78d\2\ua7b0\2\ua7b2\2\ua7b9\2\ua7f9\2\ua829\2\ua842\2\ua875"+ + "\2\ua882\2\ua8c7\2\ua8d2\2\ua8db\2\ua8e2\2\ua8f9\2\ua8fd\2\ua8fd\2\ua8ff"+ + "\2\ua8ff\2\ua902\2\ua92f\2\ua932\2\ua955\2\ua962\2\ua97e\2\ua982\2\ua9c2"+ + "\2\ua9d1\2\ua9db\2\ua9e2\2\uaa00\2\uaa02\2\uaa38\2\uaa42\2\uaa4f\2\uaa52"+ + "\2\uaa5b\2\uaa62\2\uaa78\2\uaa7c\2\uaac4\2\uaadd\2\uaadf\2\uaae2\2\uaaf1"+ + "\2\uaaf4\2\uaaf8\2\uab03\2\uab08\2\uab0b\2\uab10\2\uab13\2\uab18\2\uab22"+ + "\2\uab28\2\uab2a\2\uab30\2\uab32\2\uab5c\2\uab5e\2\uab67\2\uab72\2\uabec"+ + "\2\uabee\2\uabef\2\uabf2\2\uabfb\2\uac02\2\ud7a5\2\ud7b2\2\ud7c8\2\ud7cd"+ + "\2\ud7fd\2\uf902\2\ufa6f\2\ufa72\2\ufadb\2\ufb02\2\ufb08\2\ufb15\2\ufb19"+ + "\2\ufb1f\2\ufb2a\2\ufb2c\2\ufb38\2\ufb3a\2\ufb3e\2\ufb40\2\ufb40\2\ufb42"+ + "\2\ufb43\2\ufb45\2\ufb46\2\ufb48\2\ufbb3\2\ufbd5\2\ufd3f\2\ufd52\2\ufd91"+ + "\2\ufd94\2\ufdc9\2\ufdf2\2\ufdfd\2\ufe02\2\ufe11\2\ufe22\2\ufe31\2\ufe35"+ + "\2\ufe36\2\ufe4f\2\ufe51\2\ufe72\2\ufe76\2\ufe78\2\ufefe\2\uff01\2\uff01"+ + "\2\uff12\2\uff1b\2\uff23\2\uff3c\2\uff41\2\uff41\2\uff43\2\uff5c\2\uff68"+ + "\2\uffc0\2\uffc4\2\uffc9\2\uffcc\2\uffd1\2\uffd4\2\uffd9\2\uffdc\2\uffde"+ + "\2\ufffb\2\ufffd\2\2\3\r\3\17\3(\3*\3<\3>\3?\3A\3O\3R\3_\3\u0082\3\u00fc"+ + "\3\u0142\3\u0176\3\u01ff\3\u01ff\3\u0282\3\u029e\3\u02a2\3\u02d2\3\u02e2"+ + "\3\u02e2\3\u0302\3\u0321\3\u0332\3\u034c\3\u0352\3\u037c\3\u0382\3\u039f"+ + "\3\u03a2\3\u03c5\3\u03ca\3\u03d1\3\u03d3\3\u03d7\3\u0402\3\u049f\3\u04a2"+ + "\3\u04ab\3\u04b2\3\u04d5\3\u04da\3\u04fd\3\u0502\3\u0529\3\u0532\3\u0565"+ + "\3\u0602\3\u0738\3\u0742\3\u0757\3\u0762\3\u0769\3\u0802\3\u0807\3\u080a"+ + "\3\u080a\3\u080c\3\u0837\3\u0839\3\u083a\3\u083e\3\u083e\3\u0841\3\u0857"+ + "\3\u0862\3\u0878\3\u0882\3\u08a0\3\u08e2\3\u08f4\3\u08f6\3\u08f7\3\u0902"+ + "\3\u0917\3\u0922\3\u093b\3\u0982\3\u09b9\3\u09c0\3\u09c1\3\u0a02\3\u0a05"+ + "\3\u0a07\3\u0a08\3\u0a0e\3\u0a15\3\u0a17\3\u0a19\3\u0a1b\3\u0a35\3\u0a3a"+ + "\3\u0a3c\3\u0a41\3\u0a41\3\u0a62\3\u0a7e\3\u0a82\3\u0a9e\3\u0ac2\3\u0ac9"+ + "\3\u0acb\3\u0ae8\3\u0b02\3\u0b37\3\u0b42\3\u0b57\3\u0b62\3\u0b74\3\u0b82"+ + "\3\u0b93\3\u0c02\3\u0c4a\3\u0c82\3\u0cb4\3\u0cc2\3\u0cf4\3\u1002\3\u1048"+ + "\3\u1068\3\u1071\3\u1081\3\u10bc\3\u10bf\3\u10bf\3\u10d2\3\u10ea\3\u10f2"+ + "\3\u10fb\3\u1102\3\u1136\3\u1138\3\u1141\3\u1152\3\u1175\3\u1178\3\u1178"+ + "\3\u1182\3\u11c6\3\u11cc\3\u11ce\3\u11d2\3\u11dc\3\u11de\3\u11de\3\u1202"+ + "\3\u1213\3\u1215\3\u1239\3\u1240\3\u1240\3\u1282\3\u1288\3\u128a\3\u128a"+ + "\3\u128c\3\u128f\3\u1291\3\u129f\3\u12a1\3\u12aa\3\u12b2\3\u12ec\3\u12f2"+ + "\3\u12fb\3\u1302\3\u1305\3\u1307\3\u130e\3\u1311\3\u1312\3\u1315\3\u132a"+ + "\3\u132c\3\u1332\3\u1334\3\u1335\3\u1337\3\u133b\3\u133e\3\u1346\3\u1349"+ + "\3\u134a\3\u134d\3\u134f\3\u1352\3\u1352\3\u1359\3\u1359\3\u135f\3\u1365"+ + "\3\u1368\3\u136e\3\u1372\3\u1376\3\u1402\3\u144c\3\u1452\3\u145b\3\u1482"+ + "\3\u14c7\3\u14c9\3\u14c9\3\u14d2\3\u14db\3\u1582\3\u15b7\3\u15ba\3\u15c2"+ + "\3\u15da\3\u15df\3\u1602\3\u1642\3\u1646\3\u1646\3\u1652\3\u165b\3\u1682"+ + "\3\u16b9\3\u16c2\3\u16cb\3\u1702\3\u171b\3\u171f\3\u172d\3\u1732\3\u173b"+ + "\3\u18a2\3\u18eb\3\u1901\3\u1901\3\u1ac2\3\u1afa\3\u1c02\3\u1c0a\3\u1c0c"+ + "\3\u1c38\3\u1c3a\3\u1c42\3\u1c52\3\u1c5b\3\u1c74\3\u1c91\3\u1c94\3\u1ca9"+ + "\3\u1cab\3\u1cb8\3\u2002\3\u239b\3\u2402\3\u2470\3\u2482\3\u2545\3\u3002"+ + "\3\u3430\3\u4402\3\u4648\3\u6802\3\u6a3a\3\u6a42\3\u6a60\3\u6a62\3\u6a6b"+ + "\3\u6ad2\3\u6aef\3\u6af2\3\u6af6\3\u6b02\3\u6b38\3\u6b42\3\u6b45\3\u6b52"+ + "\3\u6b5b\3\u6b65\3\u6b79\3\u6b7f\3\u6b91\3\u6f02\3\u6f46\3\u6f52\3\u6f80"+ + "\3\u6f91\3\u6fa1\3\u6fe2\3\u6fe2\3\u7002\3\u87ee\3\u8802\3\u8af4\3\ub002"+ + "\3\ub003\3\ubc02\3\ubc6c\3\ubc72\3\ubc7e\3\ubc82\3\ubc8a\3\ubc92\3\ubc9b"+ + "\3\ubc9f\3\ubca0\3\ubca2\3\ubca5\3\ud167\3\ud16b\3\ud16f\3\ud184\3\ud187"+ + "\3\ud18d\3\ud1ac\3\ud1af\3\ud244\3\ud246\3\ud402\3\ud456\3\ud458\3\ud49e"+ + "\3\ud4a0\3\ud4a1\3\ud4a4\3\ud4a4\3\ud4a7\3\ud4a8\3\ud4ab\3\ud4ae\3\ud4b0"+ + "\3\ud4bb\3\ud4bd\3\ud4bd\3\ud4bf\3\ud4c5\3\ud4c7\3\ud507\3\ud509\3\ud50c"+ + "\3\ud50f\3\ud516\3\ud518\3\ud51e\3\ud520\3\ud53b\3\ud53d\3\ud540\3\ud542"+ + "\3\ud546\3\ud548\3\ud548\3\ud54c\3\ud552\3\ud554\3\ud6a7\3\ud6aa\3\ud6c2"+ + "\3\ud6c4\3\ud6dc\3\ud6de\3\ud6fc\3\ud6fe\3\ud716\3\ud718\3\ud736\3\ud738"+ + "\3\ud750\3\ud752\3\ud770\3\ud772\3\ud78a\3\ud78c\3\ud7aa\3\ud7ac\3\ud7c4"+ + "\3\ud7c6\3\ud7cd\3\ud7d0\3\ud801\3\uda02\3\uda38\3\uda3d\3\uda6e\3\uda77"+ + "\3\uda77\3\uda86\3\uda86\3\uda9d\3\udaa1\3\udaa3\3\udab1\3\ue002\3\ue008"+ + "\3\ue00a\3\ue01a\3\ue01d\3\ue023\3\ue025\3\ue026\3\ue028\3\ue02c\3\ue802"+ + "\3\ue8c6\3\ue8d2\3\ue8d8\3\ue902\3\ue94c\3\ue952\3\ue95b\3\uee02\3\uee05"+ + "\3\uee07\3\uee21\3\uee23\3\uee24\3\uee26\3\uee26\3\uee29\3\uee29\3\uee2b"+ + "\3\uee34\3\uee36\3\uee39\3\uee3b\3\uee3b\3\uee3d\3\uee3d\3\uee44\3\uee44"+ + "\3\uee49\3\uee49\3\uee4b\3\uee4b\3\uee4d\3\uee4d\3\uee4f\3\uee51\3\uee53"+ + "\3\uee54\3\uee56\3\uee56\3\uee59\3\uee59\3\uee5b\3\uee5b\3\uee5d\3\uee5d"+ + "\3\uee5f\3\uee5f\3\uee61\3\uee61\3\uee63\3\uee64\3\uee66\3\uee66\3\uee69"+ + "\3\uee6c\3\uee6e\3\uee74\3\uee76\3\uee79\3\uee7b\3\uee7e\3\uee80\3\uee80"+ + "\3\uee82\3\uee8b\3\uee8d\3\uee9d\3\ueea3\3\ueea5\3\ueea7\3\ueeab\3\ueead"+ + "\3\ueebd\3\2\4\ua6d8\4\ua702\4\ub736\4\ub742\4\ub81f\4\ub822\4\ucea3\4"+ + "\uf802\4\ufa1f\4\3\20\3\20\"\20\u0081\20\u0102\20\u01f1\20\u0240\2C\2"+ + "\\\2c\2|\2\u00ac\2\u00ac\2\u00b7\2\u00b7\2\u00bc\2\u00bc\2\u00c2\2\u00d8"+ + "\2\u00da\2\u00f8\2\u00fa\2\u02c3\2\u02c8\2\u02d3\2\u02e2\2\u02e6\2\u02ee"+ + "\2\u02ee\2\u02f0\2\u02f0\2\u0372\2\u0376\2\u0378\2\u0379\2\u037c\2\u037f"+ + "\2\u0381\2\u0381\2\u0388\2\u0388\2\u038a\2\u038c\2\u038e\2\u038e\2\u0390"+ + "\2\u03a3\2\u03a5\2\u03f7\2\u03f9\2\u0483\2\u048c\2\u0531\2\u0533\2\u0558"+ + "\2\u055b\2\u055b\2\u0563\2\u0589\2\u05d2\2\u05ec\2\u05f2\2\u05f4\2\u0622"+ + "\2\u064c\2\u0670\2\u0671\2\u0673\2\u06d5\2\u06d7\2\u06d7\2\u06e7\2\u06e8"+ + "\2\u06f0\2\u06f1\2\u06fc\2\u06fe\2\u0701\2\u0701\2\u0712\2\u0712\2\u0714"+ + "\2\u0731\2\u074f\2\u07a7\2\u07b3\2\u07b3\2\u07cc\2\u07ec\2\u07f6\2\u07f7"+ + "\2\u07fc\2\u07fc\2\u0802\2\u0817\2\u081c\2\u081c\2\u0826\2\u0826\2\u082a"+ + "\2\u082a\2\u0842\2\u085a\2\u08a2\2\u08b6\2\u08b8\2\u08bf\2\u0906\2\u093b"+ + "\2\u093f\2\u093f\2\u0952\2\u0952\2\u095a\2\u0963\2\u0973\2\u0982\2\u0987"+ + "\2\u098e\2\u0991\2\u0992\2\u0995\2\u09aa\2\u09ac\2\u09b2\2\u09b4\2\u09b4"+ + "\2\u09b8\2\u09bb\2\u09bf\2\u09bf\2\u09d0\2\u09d0\2\u09de\2\u09df\2\u09e1"+ + "\2\u09e3\2\u09f2\2\u09f3\2\u0a07\2\u0a0c\2\u0a11\2\u0a12\2\u0a15\2\u0a2a"+ + "\2\u0a2c\2\u0a32\2\u0a34\2\u0a35\2\u0a37\2\u0a38\2\u0a3a\2\u0a3b\2\u0a5b"+ + "\2\u0a5e\2\u0a60\2\u0a60\2\u0a74\2\u0a76\2\u0a87\2\u0a8f\2\u0a91\2\u0a93"+ + "\2\u0a95\2\u0aaa\2\u0aac\2\u0ab2\2\u0ab4\2\u0ab5\2\u0ab7\2\u0abb\2\u0abf"+ + "\2\u0abf\2\u0ad2\2\u0ad2\2\u0ae2\2\u0ae3\2\u0afb\2\u0afb\2\u0b07\2\u0b0e"+ + "\2\u0b11\2\u0b12\2\u0b15\2\u0b2a\2\u0b2c\2\u0b32\2\u0b34\2\u0b35\2\u0b37"+ + "\2\u0b3b\2\u0b3f\2\u0b3f\2\u0b5e\2\u0b5f\2\u0b61\2\u0b63\2\u0b73\2\u0b73"+ + "\2\u0b85\2\u0b85\2\u0b87\2\u0b8c\2\u0b90\2\u0b92\2\u0b94\2\u0b97\2\u0b9b"+ + "\2\u0b9c\2\u0b9e\2\u0b9e\2\u0ba0\2\u0ba1\2\u0ba5\2\u0ba6\2\u0baa\2\u0bac"+ + "\2\u0bb0\2\u0bbb\2\u0bd2\2\u0bd2\2\u0c07\2\u0c0e\2\u0c10\2\u0c12\2\u0c14"+ + "\2\u0c2a\2\u0c2c\2\u0c3b\2\u0c3f\2\u0c3f\2\u0c5a\2\u0c5c\2\u0c62\2\u0c63"+ + "\2\u0c82\2\u0c82\2\u0c87\2\u0c8e\2\u0c90\2\u0c92\2\u0c94\2\u0caa\2\u0cac"+ + "\2\u0cb5\2\u0cb7\2\u0cbb\2\u0cbf\2\u0cbf\2\u0ce0\2\u0ce0\2\u0ce2\2\u0ce3"+ + "\2\u0cf3\2\u0cf4\2\u0d07\2\u0d0e\2\u0d10\2\u0d12\2\u0d14\2\u0d3c\2\u0d3f"+ + "\2\u0d3f\2\u0d50\2\u0d50\2\u0d56\2\u0d58\2\u0d61\2\u0d63\2\u0d7c\2\u0d81"+ + "\2\u0d87\2\u0d98\2\u0d9c\2\u0db3\2\u0db5\2\u0dbd\2\u0dbf\2\u0dbf\2\u0dc2"+ + "\2\u0dc8\2\u0e03\2\u0e32\2\u0e34\2\u0e35\2\u0e42\2\u0e48\2\u0e83\2\u0e84"+ + "\2\u0e86\2\u0e86\2\u0e89\2\u0e8a\2\u0e8c\2\u0e8c\2\u0e8f\2\u0e8f\2\u0e96"+ + "\2\u0e99\2\u0e9b\2\u0ea1\2\u0ea3\2\u0ea5\2\u0ea7\2\u0ea7\2\u0ea9\2\u0ea9"+ + "\2\u0eac\2\u0ead\2\u0eaf\2\u0eb2\2\u0eb4\2\u0eb5\2\u0ebf\2\u0ebf\2\u0ec2"+ + "\2\u0ec6\2\u0ec8\2\u0ec8\2\u0ede\2\u0ee1\2\u0f02\2\u0f02\2\u0f42\2\u0f49"+ + "\2\u0f4b\2\u0f6e\2\u0f8a\2\u0f8e\2\u1002\2\u102c\2\u1041\2\u1041\2\u1052"+ + "\2\u1057\2\u105c\2\u105f\2\u1063\2\u1063\2\u1067\2\u1068\2\u1070\2\u1072"+ + "\2\u1077\2\u1083\2\u1090\2\u1090\2\u10a2\2\u10c7\2\u10c9\2\u10c9\2\u10cf"+ + "\2\u10cf\2\u10d2\2\u10fc\2\u10fe\2\u124a\2\u124c\2\u124f\2\u1252\2\u1258"+ + "\2\u125a\2\u125a\2\u125c\2\u125f\2\u1262\2\u128a\2\u128c\2\u128f\2\u1292"+ + "\2\u12b2\2\u12b4\2\u12b7\2\u12ba\2\u12c0\2\u12c2\2\u12c2\2\u12c4\2\u12c7"+ + "\2\u12ca\2\u12d8\2\u12da\2\u1312\2\u1314\2\u1317\2\u131a\2\u135c\2\u1382"+ + "\2\u1391\2\u13a2\2\u13f7\2\u13fa\2\u13ff\2\u1403\2\u166e\2\u1671\2\u1681"+ + "\2\u1683\2\u169c\2\u16a2\2\u16ec\2\u16f0\2\u16fa\2\u1702\2\u170e\2\u1710"+ + "\2\u1713\2\u1722\2\u1733\2\u1742\2\u1753\2\u1762\2\u176e\2\u1770\2\u1772"+ + "\2\u1782\2\u17b5\2\u17d9\2\u17d9\2\u17de\2\u17de\2\u1822\2\u1879\2\u1882"+ + "\2\u1886\2\u1889\2\u18aa\2\u18ac\2\u18ac\2\u18b2\2\u18f7\2\u1902\2\u1920"+ + "\2\u1952\2\u196f\2\u1972\2\u1976\2\u1982\2\u19ad\2\u19b2\2\u19cb\2\u1a02"+ + "\2\u1a18\2\u1a22\2\u1a56\2\u1aa9\2\u1aa9\2\u1b07\2\u1b35\2\u1b47\2\u1b4d"+ + "\2\u1b85\2\u1ba2\2\u1bb0\2\u1bb1\2\u1bbc\2\u1be7\2\u1c02\2\u1c25\2\u1c4f"+ + "\2\u1c51\2\u1c5c\2\u1c7f\2\u1c82\2\u1c8a\2\u1ceb\2\u1cee\2\u1cf0\2\u1cf3"+ + "\2\u1cf7\2\u1cf8\2\u1d02\2\u1dc1\2\u1e02\2\u1f17\2\u1f1a\2\u1f1f\2\u1f22"+ + "\2\u1f47\2\u1f4a\2\u1f4f\2\u1f52\2\u1f59\2\u1f5b\2\u1f5b\2\u1f5d\2\u1f5d"+ + "\2\u1f5f\2\u1f5f\2\u1f61\2\u1f7f\2\u1f82\2\u1fb6\2\u1fb8\2\u1fbe\2\u1fc0"+ + "\2\u1fc0\2\u1fc4\2\u1fc6\2\u1fc8\2\u1fce\2\u1fd2\2\u1fd5\2\u1fd8\2\u1fdd"+ + "\2\u1fe2\2\u1fee\2\u1ff4\2\u1ff6\2\u1ff8\2\u1ffe\2\u2073\2\u2073\2\u2081"+ + "\2\u2081\2\u2092\2\u209e\2\u2104\2\u2104\2\u2109\2\u2109\2\u210c\2\u2115"+ + "\2\u2117\2\u2117\2\u211b\2\u211f\2\u2126\2\u2126\2\u2128\2\u2128\2\u212a"+ + "\2\u212a\2\u212c\2\u212f\2\u2131\2\u213b\2\u213e\2\u2141\2\u2147\2\u214b"+ + "\2\u2150\2\u2150\2\u2162\2\u218a\2\u2c02\2\u2c30\2\u2c32\2\u2c60\2\u2c62"+ + "\2\u2ce6\2\u2ced\2\u2cf0\2\u2cf4\2\u2cf5\2\u2d02\2\u2d27\2\u2d29\2\u2d29"+ + "\2\u2d2f\2\u2d2f\2\u2d32\2\u2d69\2\u2d71\2\u2d71\2\u2d82\2\u2d98\2\u2da2"+ + "\2\u2da8\2\u2daa\2\u2db0\2\u2db2\2\u2db8\2\u2dba\2\u2dc0\2\u2dc2\2\u2dc8"+ + "\2\u2dca\2\u2dd0\2\u2dd2\2\u2dd8\2\u2dda\2\u2de0\2\u2e31\2\u2e31\2\u3007"+ + "\2\u3009\2\u3023\2\u302b\2\u3033\2\u3037\2\u303a\2\u303e\2\u3043\2\u3098"+ + "\2\u309f\2\u30a1\2\u30a3\2\u30fc\2\u30fe\2\u3101\2\u3107\2\u312f\2\u3133"+ + "\2\u3190\2\u31a2\2\u31bc\2\u31f2\2\u3201\2\u3402\2\u4db7\2\u4e02\2\u9fd7"+ + "\2\ua002\2\ua48e\2\ua4d2\2\ua4ff\2\ua502\2\ua60e\2\ua612\2\ua621\2\ua62c"+ + "\2\ua62d\2\ua642\2\ua670\2\ua681\2\ua69f\2\ua6a2\2\ua6f1\2\ua719\2\ua721"+ + "\2\ua724\2\ua78a\2\ua78d\2\ua7b0\2\ua7b2\2\ua7b9\2\ua7f9\2\ua803\2\ua805"+ + "\2\ua807\2\ua809\2\ua80c\2\ua80e\2\ua824\2\ua842\2\ua875\2\ua884\2\ua8b5"+ + "\2\ua8f4\2\ua8f9\2\ua8fd\2\ua8fd\2\ua8ff\2\ua8ff\2\ua90c\2\ua927\2\ua932"+ + "\2\ua948\2\ua962\2\ua97e\2\ua986\2\ua9b4\2\ua9d1\2\ua9d1\2\ua9e2\2\ua9e6"+ + "\2\ua9e8\2\ua9f1\2\ua9fc\2\uaa00\2\uaa02\2\uaa2a\2\uaa42\2\uaa44\2\uaa46"+ + "\2\uaa4d\2\uaa62\2\uaa78\2\uaa7c\2\uaa7c\2\uaa80\2\uaab1\2\uaab3\2\uaab3"+ + "\2\uaab7\2\uaab8\2\uaabb\2\uaabf\2\uaac2\2\uaac2\2\uaac4\2\uaac4\2\uaadd"+ + "\2\uaadf\2\uaae2\2\uaaec\2\uaaf4\2\uaaf6\2\uab03\2\uab08\2\uab0b\2\uab10"+ + "\2\uab13\2\uab18\2\uab22\2\uab28\2\uab2a\2\uab30\2\uab32\2\uab5c\2\uab5e"+ + "\2\uab67\2\uab72\2\uabe4\2\uac02\2\ud7a5\2\ud7b2\2\ud7c8\2\ud7cd\2\ud7fd"+ + "\2\uf902\2\ufa6f\2\ufa72\2\ufadb\2\ufb02\2\ufb08\2\ufb15\2\ufb19\2\ufb1f"+ + "\2\ufb1f\2\ufb21\2\ufb2a\2\ufb2c\2\ufb38\2\ufb3a\2\ufb3e\2\ufb40\2\ufb40"+ + "\2\ufb42\2\ufb43\2\ufb45\2\ufb46\2\ufb48\2\ufbb3\2\ufbd5\2\ufd3f\2\ufd52"+ + "\2\ufd91\2\ufd94\2\ufdc9\2\ufdf2\2\ufdfd\2\ufe72\2\ufe76\2\ufe78\2\ufefe"+ + "\2\uff23\2\uff3c\2\uff43\2\uff5c\2\uff68\2\uffc0\2\uffc4\2\uffc9\2\uffcc"+ + "\2\uffd1\2\uffd4\2\uffd9\2\uffdc\2\uffde\2\2\3\r\3\17\3(\3*\3<\3>\3?\3"+ + "A\3O\3R\3_\3\u0082\3\u00fc\3\u0142\3\u0176\3\u0282\3\u029e\3\u02a2\3\u02d2"+ + "\3\u0302\3\u0321\3\u0332\3\u034c\3\u0352\3\u0377\3\u0382\3\u039f\3\u03a2"+ + "\3\u03c5\3\u03ca\3\u03d1\3\u03d3\3\u03d7\3\u0402\3\u049f\3\u04b2\3\u04d5"+ + "\3\u04da\3\u04fd\3\u0502\3\u0529\3\u0532\3\u0565\3\u0602\3\u0738\3\u0742"+ + "\3\u0757\3\u0762\3\u0769\3\u0802\3\u0807\3\u080a\3\u080a\3\u080c\3\u0837"+ + "\3\u0839\3\u083a\3\u083e\3\u083e\3\u0841\3\u0857\3\u0862\3\u0878\3\u0882"+ + "\3\u08a0\3\u08e2\3\u08f4\3\u08f6\3\u08f7\3\u0902\3\u0917\3\u0922\3\u093b"+ + "\3\u0982\3\u09b9\3\u09c0\3\u09c1\3\u0a02\3\u0a02\3\u0a12\3\u0a15\3\u0a17"+ + "\3\u0a19\3\u0a1b\3\u0a35\3\u0a62\3\u0a7e\3\u0a82\3\u0a9e\3\u0ac2\3\u0ac9"+ + "\3\u0acb\3\u0ae6\3\u0b02\3\u0b37\3\u0b42\3\u0b57\3\u0b62\3\u0b74\3\u0b82"+ + "\3\u0b93\3\u0c02\3\u0c4a\3\u0c82\3\u0cb4\3\u0cc2\3\u0cf4\3\u1005\3\u1039"+ + "\3\u1085\3\u10b1\3\u10d2\3\u10ea\3\u1105\3\u1128\3\u1152\3\u1174\3\u1178"+ + "\3\u1178\3\u1185\3\u11b4\3\u11c3\3\u11c6\3\u11dc\3\u11dc\3\u11de\3\u11de"+ + "\3\u1202\3\u1213\3\u1215\3\u122d\3\u1282\3\u1288\3\u128a\3\u128a\3\u128c"+ + "\3\u128f\3\u1291\3\u129f\3\u12a1\3\u12aa\3\u12b2\3\u12e0\3\u1307\3\u130e"+ + "\3\u1311\3\u1312\3\u1315\3\u132a\3\u132c\3\u1332\3\u1334\3\u1335\3\u1337"+ + "\3\u133b\3\u133f\3\u133f\3\u1352\3\u1352\3\u135f\3\u1363\3\u1402\3\u1436"+ + "\3\u1449\3\u144c\3\u1482\3\u14b1\3\u14c6\3\u14c7\3\u14c9\3\u14c9\3\u1582"+ + "\3\u15b0\3\u15da\3\u15dd\3\u1602\3\u1631\3\u1646\3\u1646\3\u1682\3\u16ac"+ + "\3\u1702\3\u171b\3\u18a2\3\u18e1\3\u1901\3\u1901\3\u1ac2\3\u1afa\3\u1c02"+ + "\3\u1c0a\3\u1c0c\3\u1c30\3\u1c42\3\u1c42\3\u1c74\3\u1c91\3\u2002\3\u239b"+ + "\3\u2402\3\u2470\3\u2482\3\u2545\3\u3002\3\u3430\3\u4402\3\u4648\3\u6802"+ + "\3\u6a3a\3\u6a42\3\u6a60\3\u6ad2\3\u6aef\3\u6b02\3\u6b31\3\u6b42\3\u6b45"+ + "\3\u6b65\3\u6b79\3\u6b7f\3\u6b91\3\u6f02\3\u6f46\3\u6f52\3\u6f52\3\u6f95"+ + "\3\u6fa1\3\u6fe2\3\u6fe2\3\u7002\3\u87ee\3\u8802\3\u8af4\3\ub002\3\ub003"+ + "\3\ubc02\3\ubc6c\3\ubc72\3\ubc7e\3\ubc82\3\ubc8a\3\ubc92\3\ubc9b\3\ud402"+ + "\3\ud456\3\ud458\3\ud49e\3\ud4a0\3\ud4a1\3\ud4a4\3\ud4a4\3\ud4a7\3\ud4a8"+ + "\3\ud4ab\3\ud4ae\3\ud4b0\3\ud4bb\3\ud4bd\3\ud4bd\3\ud4bf\3\ud4c5\3\ud4c7"+ + "\3\ud507\3\ud509\3\ud50c\3\ud50f\3\ud516\3\ud518\3\ud51e\3\ud520\3\ud53b"+ + "\3\ud53d\3\ud540\3\ud542\3\ud546\3\ud548\3\ud548\3\ud54c\3\ud552\3\ud554"+ + "\3\ud6a7\3\ud6aa\3\ud6c2\3\ud6c4\3\ud6dc\3\ud6de\3\ud6fc\3\ud6fe\3\ud716"+ + "\3\ud718\3\ud736\3\ud738\3\ud750\3\ud752\3\ud770\3\ud772\3\ud78a\3\ud78c"+ + "\3\ud7aa\3\ud7ac\3\ud7c4\3\ud7c6\3\ud7cd\3\ue802\3\ue8c6\3\ue902\3\ue945"+ + "\3\uee02\3\uee05\3\uee07\3\uee21\3\uee23\3\uee24\3\uee26\3\uee26\3\uee29"+ + "\3\uee29\3\uee2b\3\uee34\3\uee36\3\uee39\3\uee3b\3\uee3b\3\uee3d\3\uee3d"+ + "\3\uee44\3\uee44\3\uee49\3\uee49\3\uee4b\3\uee4b\3\uee4d\3\uee4d\3\uee4f"+ + "\3\uee51\3\uee53\3\uee54\3\uee56\3\uee56\3\uee59\3\uee59\3\uee5b\3\uee5b"+ + "\3\uee5d\3\uee5d\3\uee5f\3\uee5f\3\uee61\3\uee61\3\uee63\3\uee64\3\uee66"+ + "\3\uee66\3\uee69\3\uee6c\3\uee6e\3\uee74\3\uee76\3\uee79\3\uee7b\3\uee7e"+ + "\3\uee80\3\uee80\3\uee82\3\uee8b\3\uee8d\3\uee9d\3\ueea3\3\ueea5\3\ueea7"+ + "\3\ueeab\3\ueead\3\ueebd\3\2\4\ua6d8\4\ua702\4\ub736\4\ub742\4\ub81f\4"+ + "\ub822\4\ucea3\4\uf802\4\ufa1f\4\61\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2"+ + "\2\2\t\3\2\2\2\2\13\3\2\2\2\2\21\3\2\2\2\3\23\3\2\2\2\5\26\3\2\2\2\7\30"+ + "\3\2\2\2\t\32\3\2\2\2\13\34\3\2\2\2\r%\3\2\2\2\17\'\3\2\2\2\21)\3\2\2"+ + "\2\23\24\7\61\2\2\24\25\7\61\2\2\25\4\3\2\2\2\26\27\7\61\2\2\27\6\3\2"+ + "\2\2\30\31\7,\2\2\31\b\3\2\2\2\32\33\7#\2\2\33\n\3\2\2\2\34 \5\17\b\2"+ + "\35\37\5\r\7\2\36\35\3\2\2\2\37\"\3\2\2\2 \36\3\2\2\2 !\3\2\2\2!#\3\2"+ + "\2\2\" \3\2\2\2#$\b\6\2\2$\f\3\2\2\2%&\t\2\2\2&\16\3\2\2\2\'(\t\3\2\2"+ + "(\20\3\2\2\2)-\7)\2\2*,\13\2\2\2+*\3\2\2\2,/\3\2\2\2-.\3\2\2\2-+\3\2\2"+ + "\2.\60\3\2\2\2/-\3\2\2\2\60\61\7)\2\2\61\22\3\2\2\2\5\2 -\3\3\6\2"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/src/tree/xpath/XPath.ts b/runtime/typescript/src/tree/xpath/XPath.ts similarity index 70% rename from src/tree/xpath/XPath.ts rename to runtime/typescript/src/tree/xpath/XPath.ts index 4d99468e..c74caf16 100644 --- a/src/tree/xpath/XPath.ts +++ b/runtime/typescript/src/tree/xpath/XPath.ts @@ -5,22 +5,24 @@ // ConvertTo-TS run at 2016-10-04T11:26:46.4373888-07:00 -import { CharStreams } from "../../CharStreams"; -import { CommonTokenStream } from "../../CommonTokenStream"; -import { LexerNoViableAltException } from "../../LexerNoViableAltException"; -import { Parser } from "../../Parser"; -import { ParserRuleContext } from "../../ParserRuleContext"; -import { ParseTree } from "../ParseTree"; -import { Token } from "../../Token"; -import { XPathElement } from "./XPathElement"; -import { XPathLexer } from "./XPathLexer"; -import { XPathLexerErrorListener } from "./XPathLexerErrorListener"; -import { XPathRuleAnywhereElement } from "./XPathRuleAnywhereElement"; -import { XPathRuleElement } from "./XPathRuleElement"; -import { XPathTokenAnywhereElement } from "./XPathTokenAnywhereElement"; -import { XPathTokenElement } from "./XPathTokenElement"; -import { XPathWildcardAnywhereElement } from "./XPathWildcardAnywhereElement"; -import { XPathWildcardElement } from "./XPathWildcardElement"; +import { + CharStreams, + CommonTokenStream, + LexerNoViableAltException, + ParseTree, + Parser, + ParserRuleContext, + Token, + XPathElement, + XPathLexer, + XPathLexerErrorListener, + XPathRuleAnywhereElement, + XPathRuleElement, + XPathTokenAnywhereElement, + XPathTokenElement, + XPathWildcardAnywhereElement, + XPathWildcardElement +} from "../../internal"; /** * Represent a subset of XPath XML path syntax for use in identifying nodes in @@ -77,49 +79,51 @@ export class XPath { // TODO: check for invalid token/rule names, bad syntax public split(path: string): XPathElement[] { - let lexer = new XPathLexer(CharStreams.fromString(path)); + const lexer = new XPathLexer(CharStreams.fromString(path)); + // eslint-disable-next-line @typescript-eslint/explicit-function-return-type lexer.recover = (e: LexerNoViableAltException) => { throw e; }; lexer.removeErrorListeners(); lexer.addErrorListener(new XPathLexerErrorListener()); - let tokenStream = new CommonTokenStream(lexer); + const tokenStream = new CommonTokenStream(lexer); try { tokenStream.fill(); } catch (e) { if (e instanceof LexerNoViableAltException) { - let pos: number = lexer.charPositionInLine; - let msg: string = "Invalid tokens or characters at index " + pos + " in path '" + path + "' -- " + e.message; + const pos: number = lexer.charPositionInLine; + const msg: string = "Invalid tokens or characters at index " + pos + " in path '" + path + "' -- " + e.message; throw new RangeError(msg); } throw e; } - let tokens: Token[] = tokenStream.getTokens(); + const tokens: Token[] = tokenStream.getTokens(); // console.log("path=" + path + "=>" + tokens); - let elements: XPathElement[] = []; - let n: number = tokens.length; - let i: number = 0; + const elements: XPathElement[] = []; + const n: number = tokens.length; + let i = 0; loop: while (i < n) { - let el: Token = tokens[i]; + const el: Token = tokens[i]; let next: Token | undefined; switch (el.type) { case XPathLexer.ROOT: - case XPathLexer.ANYWHERE: - let anywhere: boolean = el.type === XPathLexer.ANYWHERE; + case XPathLexer.ANYWHERE: { + const anywhere: boolean = el.type === XPathLexer.ANYWHERE; i++; next = tokens[i]; - let invert: boolean = next.type === XPathLexer.BANG; + const invert: boolean = next.type === XPathLexer.BANG; if (invert) { i++; next = tokens[i]; } - let pathElement: XPathElement = this.getXPathElement(next, anywhere); + const pathElement: XPathElement = this.getXPathElement(next, anywhere); pathElement.invert = invert; elements.push(pathElement); i++; break; + } case XPathLexer.TOKEN_REF: case XPathLexer.RULE_REF: @@ -148,13 +152,13 @@ export class XPath { throw new Error("Missing path element at end of path"); } - let word = wordToken.text; + const word = wordToken.text; if (word == null) { throw new Error("Expected wordToken to have text content."); } - let ttype: number = this.parser.getTokenType(word); - let ruleIndex: number = this.parser.getRuleIndex(word); + const ttype: number = this.parser.getTokenType(word); + const ruleIndex: number = this.parser.getRuleIndex(word); switch (wordToken.type) { case XPathLexer.WILDCARD: return anywhere ? @@ -183,7 +187,7 @@ export class XPath { } public static findAll(tree: ParseTree, xpath: string, parser: Parser): Set { - let p: XPath = new XPath(parser, xpath); + const p: XPath = new XPath(parser, xpath); return p.evaluate(tree); } @@ -192,20 +196,20 @@ export class XPath { * path. The root `/` is relative to the node passed to {@link evaluate}. */ public evaluate(t: ParseTree): Set { - let dummyRoot = new ParserRuleContext(); + const dummyRoot = new ParserRuleContext(); dummyRoot.addChild(t as ParserRuleContext); let work = new Set([dummyRoot]); - let i: number = 0; + let i = 0; while (i < this.elements.length) { - let next = new Set(); - for (let node of work) { + const next = new Set(); + for (const node of work) { if (node.childCount > 0) { // only try to match next element if it has children // e.g., //func/*/stat might have a token node for which // we can't go looking for stat nodes. - let matching = this.elements[i].evaluate(node); + const matching = this.elements[i].evaluate(node); matching.forEach(next.add, next); } } diff --git a/src/tree/xpath/XPathElement.ts b/runtime/typescript/src/tree/xpath/XPathElement.ts similarity index 78% rename from src/tree/xpath/XPathElement.ts rename to runtime/typescript/src/tree/xpath/XPathElement.ts index eec0aee2..5a3daa87 100644 --- a/src/tree/xpath/XPathElement.ts +++ b/runtime/typescript/src/tree/xpath/XPathElement.ts @@ -4,8 +4,8 @@ */ // CONVERSTION complete, Burt Harris 10/14/2016 -import { Override } from "../../Decorators"; -import { ParseTree } from "../ParseTree"; + +import { ParseTree } from "../../internal"; export abstract class XPathElement { protected nodeName: string; @@ -25,10 +25,10 @@ export abstract class XPathElement { */ public abstract evaluate(t: ParseTree): ParseTree[]; - @Override + // @Override public toString(): string { - let inv: string = this.invert ? "!" : ""; - let className: string = Object.constructor.name; + const inv: string = this.invert ? "!" : ""; + const className: string = Object.constructor.name; return className + "[" + inv + this.nodeName + "]"; } } diff --git a/runtime/typescript/src/tree/xpath/XPathLexer.g4 b/runtime/typescript/src/tree/xpath/XPathLexer.g4 new file mode 100644 index 00000000..8597dd12 --- /dev/null +++ b/runtime/typescript/src/tree/xpath/XPathLexer.g4 @@ -0,0 +1,45 @@ +/* + * Copyright 2016 The ANTLR Project. All rights reserved. Licensed under the BSD-3-Clause license. + * See LICENSE file in the project root for license information. + */ + +lexer grammar XPathLexer; + +tokens { + TOKEN_REF, + RULE_REF +} + +/* + path : separator? word (separator word)* EOF ; + + separator : '/' '!' | '//' '!' | '/' | '//' ; + + word: TOKEN_REF | RULE_REF | STRING | '*' ; + */ + +ANYWHERE: '//'; +ROOT: '/'; +WILDCARD: '*'; +BANG: '!'; + +ID: + NameStartChar NameChar* { +const text = this.text; +if (text.charAt(0) === text.charAt(0).toUpperCase()) { + this.type = XPathLexer.TOKEN_REF; +} else { + this.type = XPathLexer.RULE_REF; +} +}; + +fragment NameChar: + [\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nl}\p{Pc}\p{Nd}\p{Mc}\p{Mn}\p{Cf}\u0000-\u0008\u000E-\u001B\u007F-\u009F] + ; + +fragment NameStartChar: [\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nl}]; + +STRING: '\'' .*? '\''; + +//WS : [ \t\r\n]+ -> skip ; + diff --git a/runtime/typescript/src/tree/xpath/XPathLexer.interp b/runtime/typescript/src/tree/xpath/XPathLexer.interp new file mode 100644 index 00000000..0cdbddd8 --- /dev/null +++ b/runtime/typescript/src/tree/xpath/XPathLexer.interp @@ -0,0 +1,41 @@ +token literal names: +null +null +null +'//' +'/' +'*' +'!' +null +null + +token symbolic names: +null +TOKEN_REF +RULE_REF +ANYWHERE +ROOT +WILDCARD +BANG +ID +STRING + +rule names: +ANYWHERE +ROOT +WILDCARD +BANG +ID +NameChar +NameStartChar +STRING + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[3, 51485, 51898, 1421, 44986, 20307, 1543, 60043, 49729, 2, 10, 50, 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, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 7, 6, 31, 10, 6, 12, 6, 14, 6, 34, 11, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 7, 9, 44, 10, 9, 12, 9, 14, 9, 47, 11, 9, 3, 9, 3, 9, 3, 45, 2, 2, 10, 3, 2, 5, 5, 2, 6, 7, 2, 7, 9, 2, 8, 11, 2, 9, 13, 2, 2, 15, 2, 2, 17, 2, 10, 3, 2, 2, 4, 694, 2, 2, 2, 10, 2, 16, 2, 29, 2, 50, 2, 59, 2, 67, 2, 92, 2, 97, 2, 97, 2, 99, 2, 124, 2, 129, 2, 161, 2, 172, 2, 172, 2, 175, 2, 175, 2, 183, 2, 183, 2, 188, 2, 188, 2, 194, 2, 216, 2, 218, 2, 248, 2, 250, 2, 707, 2, 712, 2, 723, 2, 738, 2, 742, 2, 750, 2, 750, 2, 752, 2, 752, 2, 770, 2, 886, 2, 888, 2, 889, 2, 892, 2, 895, 2, 897, 2, 897, 2, 904, 2, 904, 2, 906, 2, 908, 2, 910, 2, 910, 2, 912, 2, 931, 2, 933, 2, 1015, 2, 1017, 2, 1155, 2, 1157, 2, 1161, 2, 1164, 2, 1329, 2, 1331, 2, 1368, 2, 1371, 2, 1371, 2, 1379, 2, 1417, 2, 1427, 2, 1471, 2, 1473, 2, 1473, 2, 1475, 2, 1476, 2, 1478, 2, 1479, 2, 1481, 2, 1481, 2, 1490, 2, 1516, 2, 1522, 2, 1524, 2, 1538, 2, 1543, 2, 1554, 2, 1564, 2, 1566, 2, 1566, 2, 1570, 2, 1643, 2, 1648, 2, 1749, 2, 1751, 2, 1759, 2, 1761, 2, 1770, 2, 1772, 2, 1790, 2, 1793, 2, 1793, 2, 1809, 2, 1868, 2, 1871, 2, 1971, 2, 1986, 2, 2039, 2, 2044, 2, 2044, 2, 2050, 2, 2095, 2, 2114, 2, 2141, 2, 2210, 2, 2230, 2, 2232, 2, 2239, 2, 2262, 2, 2405, 2, 2408, 2, 2417, 2, 2419, 2, 2437, 2, 2439, 2, 2446, 2, 2449, 2, 2450, 2, 2453, 2, 2474, 2, 2476, 2, 2482, 2, 2484, 2, 2484, 2, 2488, 2, 2491, 2, 2494, 2, 2502, 2, 2505, 2, 2506, 2, 2509, 2, 2512, 2, 2521, 2, 2521, 2, 2526, 2, 2527, 2, 2529, 2, 2533, 2, 2536, 2, 2547, 2, 2563, 2, 2565, 2, 2567, 2, 2572, 2, 2577, 2, 2578, 2, 2581, 2, 2602, 2, 2604, 2, 2610, 2, 2612, 2, 2613, 2, 2615, 2, 2616, 2, 2618, 2, 2619, 2, 2622, 2, 2622, 2, 2624, 2, 2628, 2, 2633, 2, 2634, 2, 2637, 2, 2639, 2, 2643, 2, 2643, 2, 2651, 2, 2654, 2, 2656, 2, 2656, 2, 2664, 2, 2679, 2, 2691, 2, 2693, 2, 2695, 2, 2703, 2, 2705, 2, 2707, 2, 2709, 2, 2730, 2, 2732, 2, 2738, 2, 2740, 2, 2741, 2, 2743, 2, 2747, 2, 2750, 2, 2759, 2, 2761, 2, 2763, 2, 2765, 2, 2767, 2, 2770, 2, 2770, 2, 2786, 2, 2789, 2, 2792, 2, 2801, 2, 2811, 2, 2811, 2, 2819, 2, 2821, 2, 2823, 2, 2830, 2, 2833, 2, 2834, 2, 2837, 2, 2858, 2, 2860, 2, 2866, 2, 2868, 2, 2869, 2, 2871, 2, 2875, 2, 2878, 2, 2886, 2, 2889, 2, 2890, 2, 2893, 2, 2895, 2, 2904, 2, 2905, 2, 2910, 2, 2911, 2, 2913, 2, 2917, 2, 2920, 2, 2929, 2, 2931, 2, 2931, 2, 2948, 2, 2949, 2, 2951, 2, 2956, 2, 2960, 2, 2962, 2, 2964, 2, 2967, 2, 2971, 2, 2972, 2, 2974, 2, 2974, 2, 2976, 2, 2977, 2, 2981, 2, 2982, 2, 2986, 2, 2988, 2, 2992, 2, 3003, 2, 3008, 2, 3012, 2, 3016, 2, 3018, 2, 3020, 2, 3023, 2, 3026, 2, 3026, 2, 3033, 2, 3033, 2, 3048, 2, 3057, 2, 3074, 2, 3077, 2, 3079, 2, 3086, 2, 3088, 2, 3090, 2, 3092, 2, 3114, 2, 3116, 2, 3131, 2, 3135, 2, 3142, 2, 3144, 2, 3146, 2, 3148, 2, 3151, 2, 3159, 2, 3160, 2, 3162, 2, 3164, 2, 3170, 2, 3173, 2, 3176, 2, 3185, 2, 3202, 2, 3205, 2, 3207, 2, 3214, 2, 3216, 2, 3218, 2, 3220, 2, 3242, 2, 3244, 2, 3253, 2, 3255, 2, 3259, 2, 3262, 2, 3270, 2, 3272, 2, 3274, 2, 3276, 2, 3279, 2, 3287, 2, 3288, 2, 3296, 2, 3296, 2, 3298, 2, 3301, 2, 3304, 2, 3313, 2, 3315, 2, 3316, 2, 3331, 2, 3333, 2, 3335, 2, 3342, 2, 3344, 2, 3346, 2, 3348, 2, 3388, 2, 3391, 2, 3398, 2, 3400, 2, 3402, 2, 3404, 2, 3408, 2, 3414, 2, 3417, 2, 3425, 2, 3429, 2, 3432, 2, 3441, 2, 3452, 2, 3457, 2, 3460, 2, 3461, 2, 3463, 2, 3480, 2, 3484, 2, 3507, 2, 3509, 2, 3517, 2, 3519, 2, 3519, 2, 3522, 2, 3528, 2, 3532, 2, 3532, 2, 3537, 2, 3542, 2, 3544, 2, 3544, 2, 3546, 2, 3553, 2, 3560, 2, 3569, 2, 3572, 2, 3573, 2, 3587, 2, 3644, 2, 3650, 2, 3664, 2, 3666, 2, 3675, 2, 3715, 2, 3716, 2, 3718, 2, 3718, 2, 3721, 2, 3722, 2, 3724, 2, 3724, 2, 3727, 2, 3727, 2, 3734, 2, 3737, 2, 3739, 2, 3745, 2, 3747, 2, 3749, 2, 3751, 2, 3751, 2, 3753, 2, 3753, 2, 3756, 2, 3757, 2, 3759, 2, 3771, 2, 3773, 2, 3775, 2, 3778, 2, 3782, 2, 3784, 2, 3784, 2, 3786, 2, 3791, 2, 3794, 2, 3803, 2, 3806, 2, 3809, 2, 3842, 2, 3842, 2, 3866, 2, 3867, 2, 3874, 2, 3883, 2, 3895, 2, 3895, 2, 3897, 2, 3897, 2, 3899, 2, 3899, 2, 3904, 2, 3913, 2, 3915, 2, 3950, 2, 3955, 2, 3974, 2, 3976, 2, 3993, 2, 3995, 2, 4030, 2, 4040, 2, 4040, 2, 4098, 2, 4171, 2, 4178, 2, 4255, 2, 4258, 2, 4295, 2, 4297, 2, 4297, 2, 4303, 2, 4303, 2, 4306, 2, 4348, 2, 4350, 2, 4682, 2, 4684, 2, 4687, 2, 4690, 2, 4696, 2, 4698, 2, 4698, 2, 4700, 2, 4703, 2, 4706, 2, 4746, 2, 4748, 2, 4751, 2, 4754, 2, 4786, 2, 4788, 2, 4791, 2, 4794, 2, 4800, 2, 4802, 2, 4802, 2, 4804, 2, 4807, 2, 4810, 2, 4824, 2, 4826, 2, 4882, 2, 4884, 2, 4887, 2, 4890, 2, 4956, 2, 4959, 2, 4961, 2, 4994, 2, 5009, 2, 5026, 2, 5111, 2, 5114, 2, 5119, 2, 5123, 2, 5742, 2, 5745, 2, 5761, 2, 5763, 2, 5788, 2, 5794, 2, 5868, 2, 5872, 2, 5882, 2, 5890, 2, 5902, 2, 5904, 2, 5910, 2, 5922, 2, 5942, 2, 5954, 2, 5973, 2, 5986, 2, 5998, 2, 6000, 2, 6002, 2, 6004, 2, 6005, 2, 6018, 2, 6101, 2, 6105, 2, 6105, 2, 6110, 2, 6111, 2, 6114, 2, 6123, 2, 6157, 2, 6160, 2, 6162, 2, 6171, 2, 6178, 2, 6265, 2, 6274, 2, 6316, 2, 6322, 2, 6391, 2, 6402, 2, 6432, 2, 6434, 2, 6445, 2, 6450, 2, 6461, 2, 6472, 2, 6511, 2, 6514, 2, 6518, 2, 6530, 2, 6573, 2, 6578, 2, 6603, 2, 6610, 2, 6619, 2, 6658, 2, 6685, 2, 6690, 2, 6752, 2, 6754, 2, 6782, 2, 6785, 2, 6795, 2, 6802, 2, 6811, 2, 6825, 2, 6825, 2, 6834, 2, 6847, 2, 6914, 2, 6989, 2, 6994, 2, 7003, 2, 7021, 2, 7029, 2, 7042, 2, 7157, 2, 7170, 2, 7225, 2, 7234, 2, 7243, 2, 7247, 2, 7295, 2, 7298, 2, 7306, 2, 7378, 2, 7380, 2, 7382, 2, 7416, 2, 7418, 2, 7419, 2, 7426, 2, 7671, 2, 7677, 2, 7959, 2, 7962, 2, 7967, 2, 7970, 2, 8007, 2, 8010, 2, 8015, 2, 8018, 2, 8025, 2, 8027, 2, 8027, 2, 8029, 2, 8029, 2, 8031, 2, 8031, 2, 8033, 2, 8063, 2, 8066, 2, 8118, 2, 8120, 2, 8126, 2, 8128, 2, 8128, 2, 8132, 2, 8134, 2, 8136, 2, 8142, 2, 8146, 2, 8149, 2, 8152, 2, 8157, 2, 8162, 2, 8174, 2, 8180, 2, 8182, 2, 8184, 2, 8190, 2, 8205, 2, 8209, 2, 8236, 2, 8240, 2, 8257, 2, 8258, 2, 8278, 2, 8278, 2, 8290, 2, 8294, 2, 8296, 2, 8305, 2, 8307, 2, 8307, 2, 8321, 2, 8321, 2, 8338, 2, 8350, 2, 8402, 2, 8414, 2, 8419, 2, 8419, 2, 8423, 2, 8434, 2, 8452, 2, 8452, 2, 8457, 2, 8457, 2, 8460, 2, 8469, 2, 8471, 2, 8471, 2, 8475, 2, 8479, 2, 8486, 2, 8486, 2, 8488, 2, 8488, 2, 8490, 2, 8490, 2, 8492, 2, 8495, 2, 8497, 2, 8507, 2, 8510, 2, 8513, 2, 8519, 2, 8523, 2, 8528, 2, 8528, 2, 8546, 2, 8586, 2, 11266, 2, 11312, 2, 11314, 2, 11360, 2, 11362, 2, 11494, 2, 11501, 2, 11509, 2, 11522, 2, 11559, 2, 11561, 2, 11561, 2, 11567, 2, 11567, 2, 11570, 2, 11625, 2, 11633, 2, 11633, 2, 11649, 2, 11672, 2, 11682, 2, 11688, 2, 11690, 2, 11696, 2, 11698, 2, 11704, 2, 11706, 2, 11712, 2, 11714, 2, 11720, 2, 11722, 2, 11728, 2, 11730, 2, 11736, 2, 11738, 2, 11744, 2, 11746, 2, 11777, 2, 11825, 2, 11825, 2, 12295, 2, 12297, 2, 12323, 2, 12337, 2, 12339, 2, 12343, 2, 12346, 2, 12350, 2, 12355, 2, 12440, 2, 12443, 2, 12444, 2, 12447, 2, 12449, 2, 12451, 2, 12540, 2, 12542, 2, 12545, 2, 12551, 2, 12591, 2, 12595, 2, 12688, 2, 12706, 2, 12732, 2, 12786, 2, 12801, 2, 13314, 2, 19895, 2, 19970, 2, 40919, 2, 40962, 2, 42126, 2, 42194, 2, 42239, 2, 42242, 2, 42510, 2, 42514, 2, 42541, 2, 42562, 2, 42609, 2, 42614, 2, 42623, 2, 42625, 2, 42739, 2, 42777, 2, 42785, 2, 42788, 2, 42890, 2, 42893, 2, 42928, 2, 42930, 2, 42937, 2, 43001, 2, 43049, 2, 43074, 2, 43125, 2, 43138, 2, 43207, 2, 43218, 2, 43227, 2, 43234, 2, 43257, 2, 43261, 2, 43261, 2, 43263, 2, 43263, 2, 43266, 2, 43311, 2, 43314, 2, 43349, 2, 43362, 2, 43390, 2, 43394, 2, 43458, 2, 43473, 2, 43483, 2, 43490, 2, 43520, 2, 43522, 2, 43576, 2, 43586, 2, 43599, 2, 43602, 2, 43611, 2, 43618, 2, 43640, 2, 43644, 2, 43716, 2, 43741, 2, 43743, 2, 43746, 2, 43761, 2, 43764, 2, 43768, 2, 43779, 2, 43784, 2, 43787, 2, 43792, 2, 43795, 2, 43800, 2, 43810, 2, 43816, 2, 43818, 2, 43824, 2, 43826, 2, 43868, 2, 43870, 2, 43879, 2, 43890, 2, 44012, 2, 44014, 2, 44015, 2, 44018, 2, 44027, 2, 44034, 2, 55205, 2, 55218, 2, 55240, 2, 55245, 2, 55293, 2, 63746, 2, 64111, 2, 64114, 2, 64219, 2, 64258, 2, 64264, 2, 64277, 2, 64281, 2, 64287, 2, 64298, 2, 64300, 2, 64312, 2, 64314, 2, 64318, 2, 64320, 2, 64320, 2, 64322, 2, 64323, 2, 64325, 2, 64326, 2, 64328, 2, 64435, 2, 64469, 2, 64831, 2, 64850, 2, 64913, 2, 64916, 2, 64969, 2, 65010, 2, 65021, 2, 65026, 2, 65041, 2, 65058, 2, 65073, 2, 65077, 2, 65078, 2, 65103, 2, 65105, 2, 65138, 2, 65142, 2, 65144, 2, 65278, 2, 65281, 2, 65281, 2, 65298, 2, 65307, 2, 65315, 2, 65340, 2, 65345, 2, 65345, 2, 65347, 2, 65372, 2, 65384, 2, 65472, 2, 65476, 2, 65481, 2, 65484, 2, 65489, 2, 65492, 2, 65497, 2, 65500, 2, 65502, 2, 65531, 2, 65533, 2, 2, 3, 13, 3, 15, 3, 40, 3, 42, 3, 60, 3, 62, 3, 63, 3, 65, 3, 79, 3, 82, 3, 95, 3, 130, 3, 252, 3, 322, 3, 374, 3, 511, 3, 511, 3, 642, 3, 670, 3, 674, 3, 722, 3, 738, 3, 738, 3, 770, 3, 801, 3, 818, 3, 844, 3, 850, 3, 892, 3, 898, 3, 927, 3, 930, 3, 965, 3, 970, 3, 977, 3, 979, 3, 983, 3, 1026, 3, 1183, 3, 1186, 3, 1195, 3, 1202, 3, 1237, 3, 1242, 3, 1277, 3, 1282, 3, 1321, 3, 1330, 3, 1381, 3, 1538, 3, 1848, 3, 1858, 3, 1879, 3, 1890, 3, 1897, 3, 2050, 3, 2055, 3, 2058, 3, 2058, 3, 2060, 3, 2103, 3, 2105, 3, 2106, 3, 2110, 3, 2110, 3, 2113, 3, 2135, 3, 2146, 3, 2168, 3, 2178, 3, 2208, 3, 2274, 3, 2292, 3, 2294, 3, 2295, 3, 2306, 3, 2327, 3, 2338, 3, 2363, 3, 2434, 3, 2489, 3, 2496, 3, 2497, 3, 2562, 3, 2565, 3, 2567, 3, 2568, 3, 2574, 3, 2581, 3, 2583, 3, 2585, 3, 2587, 3, 2613, 3, 2618, 3, 2620, 3, 2625, 3, 2625, 3, 2658, 3, 2686, 3, 2690, 3, 2718, 3, 2754, 3, 2761, 3, 2763, 3, 2792, 3, 2818, 3, 2871, 3, 2882, 3, 2903, 3, 2914, 3, 2932, 3, 2946, 3, 2963, 3, 3074, 3, 3146, 3, 3202, 3, 3252, 3, 3266, 3, 3316, 3, 4098, 3, 4168, 3, 4200, 3, 4209, 3, 4225, 3, 4284, 3, 4287, 3, 4287, 3, 4306, 3, 4330, 3, 4338, 3, 4347, 3, 4354, 3, 4406, 3, 4408, 3, 4417, 3, 4434, 3, 4469, 3, 4472, 3, 4472, 3, 4482, 3, 4550, 3, 4556, 3, 4558, 3, 4562, 3, 4572, 3, 4574, 3, 4574, 3, 4610, 3, 4627, 3, 4629, 3, 4665, 3, 4672, 3, 4672, 3, 4738, 3, 4744, 3, 4746, 3, 4746, 3, 4748, 3, 4751, 3, 4753, 3, 4767, 3, 4769, 3, 4778, 3, 4786, 3, 4844, 3, 4850, 3, 4859, 3, 4866, 3, 4869, 3, 4871, 3, 4878, 3, 4881, 3, 4882, 3, 4885, 3, 4906, 3, 4908, 3, 4914, 3, 4916, 3, 4917, 3, 4919, 3, 4923, 3, 4926, 3, 4934, 3, 4937, 3, 4938, 3, 4941, 3, 4943, 3, 4946, 3, 4946, 3, 4953, 3, 4953, 3, 4959, 3, 4965, 3, 4968, 3, 4974, 3, 4978, 3, 4982, 3, 5122, 3, 5196, 3, 5202, 3, 5211, 3, 5250, 3, 5319, 3, 5321, 3, 5321, 3, 5330, 3, 5339, 3, 5506, 3, 5559, 3, 5562, 3, 5570, 3, 5594, 3, 5599, 3, 5634, 3, 5698, 3, 5702, 3, 5702, 3, 5714, 3, 5723, 3, 5762, 3, 5817, 3, 5826, 3, 5835, 3, 5890, 3, 5915, 3, 5919, 3, 5933, 3, 5938, 3, 5947, 3, 6306, 3, 6379, 3, 6401, 3, 6401, 3, 6850, 3, 6906, 3, 7170, 3, 7178, 3, 7180, 3, 7224, 3, 7226, 3, 7234, 3, 7250, 3, 7259, 3, 7284, 3, 7313, 3, 7316, 3, 7337, 3, 7339, 3, 7352, 3, 8194, 3, 9115, 3, 9218, 3, 9328, 3, 9346, 3, 9541, 3, 12290, 3, 13360, 3, 17410, 3, 17992, 3, 26626, 3, 27194, 3, 27202, 3, 27232, 3, 27234, 3, 27243, 3, 27346, 3, 27375, 3, 27378, 3, 27382, 3, 27394, 3, 27448, 3, 27458, 3, 27461, 3, 27474, 3, 27483, 3, 27493, 3, 27513, 3, 27519, 3, 27537, 3, 28418, 3, 28486, 3, 28498, 3, 28544, 3, 28561, 3, 28577, 3, 28642, 3, 28642, 3, 28674, 3, 34798, 3, 34818, 3, 35572, 3, 45058, 3, 45059, 3, 48130, 3, 48236, 3, 48242, 3, 48254, 3, 48258, 3, 48266, 3, 48274, 3, 48283, 3, 48287, 3, 48288, 3, 48290, 3, 48293, 3, 53607, 3, 53611, 3, 53615, 3, 53636, 3, 53639, 3, 53645, 3, 53676, 3, 53679, 3, 53828, 3, 53830, 3, 54274, 3, 54358, 3, 54360, 3, 54430, 3, 54432, 3, 54433, 3, 54436, 3, 54436, 3, 54439, 3, 54440, 3, 54443, 3, 54446, 3, 54448, 3, 54459, 3, 54461, 3, 54461, 3, 54463, 3, 54469, 3, 54471, 3, 54535, 3, 54537, 3, 54540, 3, 54543, 3, 54550, 3, 54552, 3, 54558, 3, 54560, 3, 54587, 3, 54589, 3, 54592, 3, 54594, 3, 54598, 3, 54600, 3, 54600, 3, 54604, 3, 54610, 3, 54612, 3, 54951, 3, 54954, 3, 54978, 3, 54980, 3, 55004, 3, 55006, 3, 55036, 3, 55038, 3, 55062, 3, 55064, 3, 55094, 3, 55096, 3, 55120, 3, 55122, 3, 55152, 3, 55154, 3, 55178, 3, 55180, 3, 55210, 3, 55212, 3, 55236, 3, 55238, 3, 55245, 3, 55248, 3, 55297, 3, 55810, 3, 55864, 3, 55869, 3, 55918, 3, 55927, 3, 55927, 3, 55942, 3, 55942, 3, 55965, 3, 55969, 3, 55971, 3, 55985, 3, 57346, 3, 57352, 3, 57354, 3, 57370, 3, 57373, 3, 57379, 3, 57381, 3, 57382, 3, 57384, 3, 57388, 3, 59394, 3, 59590, 3, 59602, 3, 59608, 3, 59650, 3, 59724, 3, 59730, 3, 59739, 3, 60930, 3, 60933, 3, 60935, 3, 60961, 3, 60963, 3, 60964, 3, 60966, 3, 60966, 3, 60969, 3, 60969, 3, 60971, 3, 60980, 3, 60982, 3, 60985, 3, 60987, 3, 60987, 3, 60989, 3, 60989, 3, 60996, 3, 60996, 3, 61001, 3, 61001, 3, 61003, 3, 61003, 3, 61005, 3, 61005, 3, 61007, 3, 61009, 3, 61011, 3, 61012, 3, 61014, 3, 61014, 3, 61017, 3, 61017, 3, 61019, 3, 61019, 3, 61021, 3, 61021, 3, 61023, 3, 61023, 3, 61025, 3, 61025, 3, 61027, 3, 61028, 3, 61030, 3, 61030, 3, 61033, 3, 61036, 3, 61038, 3, 61044, 3, 61046, 3, 61049, 3, 61051, 3, 61054, 3, 61056, 3, 61056, 3, 61058, 3, 61067, 3, 61069, 3, 61085, 3, 61091, 3, 61093, 3, 61095, 3, 61099, 3, 61101, 3, 61117, 3, 2, 4, 42712, 4, 42754, 4, 46902, 4, 46914, 4, 47135, 4, 47138, 4, 52899, 4, 63490, 4, 64031, 4, 3, 16, 3, 16, 34, 16, 129, 16, 258, 16, 497, 16, 576, 2, 67, 2, 92, 2, 99, 2, 124, 2, 172, 2, 172, 2, 183, 2, 183, 2, 188, 2, 188, 2, 194, 2, 216, 2, 218, 2, 248, 2, 250, 2, 707, 2, 712, 2, 723, 2, 738, 2, 742, 2, 750, 2, 750, 2, 752, 2, 752, 2, 882, 2, 886, 2, 888, 2, 889, 2, 892, 2, 895, 2, 897, 2, 897, 2, 904, 2, 904, 2, 906, 2, 908, 2, 910, 2, 910, 2, 912, 2, 931, 2, 933, 2, 1015, 2, 1017, 2, 1155, 2, 1164, 2, 1329, 2, 1331, 2, 1368, 2, 1371, 2, 1371, 2, 1379, 2, 1417, 2, 1490, 2, 1516, 2, 1522, 2, 1524, 2, 1570, 2, 1612, 2, 1648, 2, 1649, 2, 1651, 2, 1749, 2, 1751, 2, 1751, 2, 1767, 2, 1768, 2, 1776, 2, 1777, 2, 1788, 2, 1790, 2, 1793, 2, 1793, 2, 1810, 2, 1810, 2, 1812, 2, 1841, 2, 1871, 2, 1959, 2, 1971, 2, 1971, 2, 1996, 2, 2028, 2, 2038, 2, 2039, 2, 2044, 2, 2044, 2, 2050, 2, 2071, 2, 2076, 2, 2076, 2, 2086, 2, 2086, 2, 2090, 2, 2090, 2, 2114, 2, 2138, 2, 2210, 2, 2230, 2, 2232, 2, 2239, 2, 2310, 2, 2363, 2, 2367, 2, 2367, 2, 2386, 2, 2386, 2, 2394, 2, 2403, 2, 2419, 2, 2434, 2, 2439, 2, 2446, 2, 2449, 2, 2450, 2, 2453, 2, 2474, 2, 2476, 2, 2482, 2, 2484, 2, 2484, 2, 2488, 2, 2491, 2, 2495, 2, 2495, 2, 2512, 2, 2512, 2, 2526, 2, 2527, 2, 2529, 2, 2531, 2, 2546, 2, 2547, 2, 2567, 2, 2572, 2, 2577, 2, 2578, 2, 2581, 2, 2602, 2, 2604, 2, 2610, 2, 2612, 2, 2613, 2, 2615, 2, 2616, 2, 2618, 2, 2619, 2, 2651, 2, 2654, 2, 2656, 2, 2656, 2, 2676, 2, 2678, 2, 2695, 2, 2703, 2, 2705, 2, 2707, 2, 2709, 2, 2730, 2, 2732, 2, 2738, 2, 2740, 2, 2741, 2, 2743, 2, 2747, 2, 2751, 2, 2751, 2, 2770, 2, 2770, 2, 2786, 2, 2787, 2, 2811, 2, 2811, 2, 2823, 2, 2830, 2, 2833, 2, 2834, 2, 2837, 2, 2858, 2, 2860, 2, 2866, 2, 2868, 2, 2869, 2, 2871, 2, 2875, 2, 2879, 2, 2879, 2, 2910, 2, 2911, 2, 2913, 2, 2915, 2, 2931, 2, 2931, 2, 2949, 2, 2949, 2, 2951, 2, 2956, 2, 2960, 2, 2962, 2, 2964, 2, 2967, 2, 2971, 2, 2972, 2, 2974, 2, 2974, 2, 2976, 2, 2977, 2, 2981, 2, 2982, 2, 2986, 2, 2988, 2, 2992, 2, 3003, 2, 3026, 2, 3026, 2, 3079, 2, 3086, 2, 3088, 2, 3090, 2, 3092, 2, 3114, 2, 3116, 2, 3131, 2, 3135, 2, 3135, 2, 3162, 2, 3164, 2, 3170, 2, 3171, 2, 3202, 2, 3202, 2, 3207, 2, 3214, 2, 3216, 2, 3218, 2, 3220, 2, 3242, 2, 3244, 2, 3253, 2, 3255, 2, 3259, 2, 3263, 2, 3263, 2, 3296, 2, 3296, 2, 3298, 2, 3299, 2, 3315, 2, 3316, 2, 3335, 2, 3342, 2, 3344, 2, 3346, 2, 3348, 2, 3388, 2, 3391, 2, 3391, 2, 3408, 2, 3408, 2, 3414, 2, 3416, 2, 3425, 2, 3427, 2, 3452, 2, 3457, 2, 3463, 2, 3480, 2, 3484, 2, 3507, 2, 3509, 2, 3517, 2, 3519, 2, 3519, 2, 3522, 2, 3528, 2, 3587, 2, 3634, 2, 3636, 2, 3637, 2, 3650, 2, 3656, 2, 3715, 2, 3716, 2, 3718, 2, 3718, 2, 3721, 2, 3722, 2, 3724, 2, 3724, 2, 3727, 2, 3727, 2, 3734, 2, 3737, 2, 3739, 2, 3745, 2, 3747, 2, 3749, 2, 3751, 2, 3751, 2, 3753, 2, 3753, 2, 3756, 2, 3757, 2, 3759, 2, 3762, 2, 3764, 2, 3765, 2, 3775, 2, 3775, 2, 3778, 2, 3782, 2, 3784, 2, 3784, 2, 3806, 2, 3809, 2, 3842, 2, 3842, 2, 3906, 2, 3913, 2, 3915, 2, 3950, 2, 3978, 2, 3982, 2, 4098, 2, 4140, 2, 4161, 2, 4161, 2, 4178, 2, 4183, 2, 4188, 2, 4191, 2, 4195, 2, 4195, 2, 4199, 2, 4200, 2, 4208, 2, 4210, 2, 4215, 2, 4227, 2, 4240, 2, 4240, 2, 4258, 2, 4295, 2, 4297, 2, 4297, 2, 4303, 2, 4303, 2, 4306, 2, 4348, 2, 4350, 2, 4682, 2, 4684, 2, 4687, 2, 4690, 2, 4696, 2, 4698, 2, 4698, 2, 4700, 2, 4703, 2, 4706, 2, 4746, 2, 4748, 2, 4751, 2, 4754, 2, 4786, 2, 4788, 2, 4791, 2, 4794, 2, 4800, 2, 4802, 2, 4802, 2, 4804, 2, 4807, 2, 4810, 2, 4824, 2, 4826, 2, 4882, 2, 4884, 2, 4887, 2, 4890, 2, 4956, 2, 4994, 2, 5009, 2, 5026, 2, 5111, 2, 5114, 2, 5119, 2, 5123, 2, 5742, 2, 5745, 2, 5761, 2, 5763, 2, 5788, 2, 5794, 2, 5868, 2, 5872, 2, 5882, 2, 5890, 2, 5902, 2, 5904, 2, 5907, 2, 5922, 2, 5939, 2, 5954, 2, 5971, 2, 5986, 2, 5998, 2, 6000, 2, 6002, 2, 6018, 2, 6069, 2, 6105, 2, 6105, 2, 6110, 2, 6110, 2, 6178, 2, 6265, 2, 6274, 2, 6278, 2, 6281, 2, 6314, 2, 6316, 2, 6316, 2, 6322, 2, 6391, 2, 6402, 2, 6432, 2, 6482, 2, 6511, 2, 6514, 2, 6518, 2, 6530, 2, 6573, 2, 6578, 2, 6603, 2, 6658, 2, 6680, 2, 6690, 2, 6742, 2, 6825, 2, 6825, 2, 6919, 2, 6965, 2, 6983, 2, 6989, 2, 7045, 2, 7074, 2, 7088, 2, 7089, 2, 7100, 2, 7143, 2, 7170, 2, 7205, 2, 7247, 2, 7249, 2, 7260, 2, 7295, 2, 7298, 2, 7306, 2, 7403, 2, 7406, 2, 7408, 2, 7411, 2, 7415, 2, 7416, 2, 7426, 2, 7617, 2, 7682, 2, 7959, 2, 7962, 2, 7967, 2, 7970, 2, 8007, 2, 8010, 2, 8015, 2, 8018, 2, 8025, 2, 8027, 2, 8027, 2, 8029, 2, 8029, 2, 8031, 2, 8031, 2, 8033, 2, 8063, 2, 8066, 2, 8118, 2, 8120, 2, 8126, 2, 8128, 2, 8128, 2, 8132, 2, 8134, 2, 8136, 2, 8142, 2, 8146, 2, 8149, 2, 8152, 2, 8157, 2, 8162, 2, 8174, 2, 8180, 2, 8182, 2, 8184, 2, 8190, 2, 8307, 2, 8307, 2, 8321, 2, 8321, 2, 8338, 2, 8350, 2, 8452, 2, 8452, 2, 8457, 2, 8457, 2, 8460, 2, 8469, 2, 8471, 2, 8471, 2, 8475, 2, 8479, 2, 8486, 2, 8486, 2, 8488, 2, 8488, 2, 8490, 2, 8490, 2, 8492, 2, 8495, 2, 8497, 2, 8507, 2, 8510, 2, 8513, 2, 8519, 2, 8523, 2, 8528, 2, 8528, 2, 8546, 2, 8586, 2, 11266, 2, 11312, 2, 11314, 2, 11360, 2, 11362, 2, 11494, 2, 11501, 2, 11504, 2, 11508, 2, 11509, 2, 11522, 2, 11559, 2, 11561, 2, 11561, 2, 11567, 2, 11567, 2, 11570, 2, 11625, 2, 11633, 2, 11633, 2, 11650, 2, 11672, 2, 11682, 2, 11688, 2, 11690, 2, 11696, 2, 11698, 2, 11704, 2, 11706, 2, 11712, 2, 11714, 2, 11720, 2, 11722, 2, 11728, 2, 11730, 2, 11736, 2, 11738, 2, 11744, 2, 11825, 2, 11825, 2, 12295, 2, 12297, 2, 12323, 2, 12331, 2, 12339, 2, 12343, 2, 12346, 2, 12350, 2, 12355, 2, 12440, 2, 12447, 2, 12449, 2, 12451, 2, 12540, 2, 12542, 2, 12545, 2, 12551, 2, 12591, 2, 12595, 2, 12688, 2, 12706, 2, 12732, 2, 12786, 2, 12801, 2, 13314, 2, 19895, 2, 19970, 2, 40919, 2, 40962, 2, 42126, 2, 42194, 2, 42239, 2, 42242, 2, 42510, 2, 42514, 2, 42529, 2, 42540, 2, 42541, 2, 42562, 2, 42608, 2, 42625, 2, 42655, 2, 42658, 2, 42737, 2, 42777, 2, 42785, 2, 42788, 2, 42890, 2, 42893, 2, 42928, 2, 42930, 2, 42937, 2, 43001, 2, 43011, 2, 43013, 2, 43015, 2, 43017, 2, 43020, 2, 43022, 2, 43044, 2, 43074, 2, 43125, 2, 43140, 2, 43189, 2, 43252, 2, 43257, 2, 43261, 2, 43261, 2, 43263, 2, 43263, 2, 43276, 2, 43303, 2, 43314, 2, 43336, 2, 43362, 2, 43390, 2, 43398, 2, 43444, 2, 43473, 2, 43473, 2, 43490, 2, 43494, 2, 43496, 2, 43505, 2, 43516, 2, 43520, 2, 43522, 2, 43562, 2, 43586, 2, 43588, 2, 43590, 2, 43597, 2, 43618, 2, 43640, 2, 43644, 2, 43644, 2, 43648, 2, 43697, 2, 43699, 2, 43699, 2, 43703, 2, 43704, 2, 43707, 2, 43711, 2, 43714, 2, 43714, 2, 43716, 2, 43716, 2, 43741, 2, 43743, 2, 43746, 2, 43756, 2, 43764, 2, 43766, 2, 43779, 2, 43784, 2, 43787, 2, 43792, 2, 43795, 2, 43800, 2, 43810, 2, 43816, 2, 43818, 2, 43824, 2, 43826, 2, 43868, 2, 43870, 2, 43879, 2, 43890, 2, 44004, 2, 44034, 2, 55205, 2, 55218, 2, 55240, 2, 55245, 2, 55293, 2, 63746, 2, 64111, 2, 64114, 2, 64219, 2, 64258, 2, 64264, 2, 64277, 2, 64281, 2, 64287, 2, 64287, 2, 64289, 2, 64298, 2, 64300, 2, 64312, 2, 64314, 2, 64318, 2, 64320, 2, 64320, 2, 64322, 2, 64323, 2, 64325, 2, 64326, 2, 64328, 2, 64435, 2, 64469, 2, 64831, 2, 64850, 2, 64913, 2, 64916, 2, 64969, 2, 65010, 2, 65021, 2, 65138, 2, 65142, 2, 65144, 2, 65278, 2, 65315, 2, 65340, 2, 65347, 2, 65372, 2, 65384, 2, 65472, 2, 65476, 2, 65481, 2, 65484, 2, 65489, 2, 65492, 2, 65497, 2, 65500, 2, 65502, 2, 2, 3, 13, 3, 15, 3, 40, 3, 42, 3, 60, 3, 62, 3, 63, 3, 65, 3, 79, 3, 82, 3, 95, 3, 130, 3, 252, 3, 322, 3, 374, 3, 642, 3, 670, 3, 674, 3, 722, 3, 770, 3, 801, 3, 818, 3, 844, 3, 850, 3, 887, 3, 898, 3, 927, 3, 930, 3, 965, 3, 970, 3, 977, 3, 979, 3, 983, 3, 1026, 3, 1183, 3, 1202, 3, 1237, 3, 1242, 3, 1277, 3, 1282, 3, 1321, 3, 1330, 3, 1381, 3, 1538, 3, 1848, 3, 1858, 3, 1879, 3, 1890, 3, 1897, 3, 2050, 3, 2055, 3, 2058, 3, 2058, 3, 2060, 3, 2103, 3, 2105, 3, 2106, 3, 2110, 3, 2110, 3, 2113, 3, 2135, 3, 2146, 3, 2168, 3, 2178, 3, 2208, 3, 2274, 3, 2292, 3, 2294, 3, 2295, 3, 2306, 3, 2327, 3, 2338, 3, 2363, 3, 2434, 3, 2489, 3, 2496, 3, 2497, 3, 2562, 3, 2562, 3, 2578, 3, 2581, 3, 2583, 3, 2585, 3, 2587, 3, 2613, 3, 2658, 3, 2686, 3, 2690, 3, 2718, 3, 2754, 3, 2761, 3, 2763, 3, 2790, 3, 2818, 3, 2871, 3, 2882, 3, 2903, 3, 2914, 3, 2932, 3, 2946, 3, 2963, 3, 3074, 3, 3146, 3, 3202, 3, 3252, 3, 3266, 3, 3316, 3, 4101, 3, 4153, 3, 4229, 3, 4273, 3, 4306, 3, 4330, 3, 4357, 3, 4392, 3, 4434, 3, 4468, 3, 4472, 3, 4472, 3, 4485, 3, 4532, 3, 4547, 3, 4550, 3, 4572, 3, 4572, 3, 4574, 3, 4574, 3, 4610, 3, 4627, 3, 4629, 3, 4653, 3, 4738, 3, 4744, 3, 4746, 3, 4746, 3, 4748, 3, 4751, 3, 4753, 3, 4767, 3, 4769, 3, 4778, 3, 4786, 3, 4832, 3, 4871, 3, 4878, 3, 4881, 3, 4882, 3, 4885, 3, 4906, 3, 4908, 3, 4914, 3, 4916, 3, 4917, 3, 4919, 3, 4923, 3, 4927, 3, 4927, 3, 4946, 3, 4946, 3, 4959, 3, 4963, 3, 5122, 3, 5174, 3, 5193, 3, 5196, 3, 5250, 3, 5297, 3, 5318, 3, 5319, 3, 5321, 3, 5321, 3, 5506, 3, 5552, 3, 5594, 3, 5597, 3, 5634, 3, 5681, 3, 5702, 3, 5702, 3, 5762, 3, 5804, 3, 5890, 3, 5915, 3, 6306, 3, 6369, 3, 6401, 3, 6401, 3, 6850, 3, 6906, 3, 7170, 3, 7178, 3, 7180, 3, 7216, 3, 7234, 3, 7234, 3, 7284, 3, 7313, 3, 8194, 3, 9115, 3, 9218, 3, 9328, 3, 9346, 3, 9541, 3, 12290, 3, 13360, 3, 17410, 3, 17992, 3, 26626, 3, 27194, 3, 27202, 3, 27232, 3, 27346, 3, 27375, 3, 27394, 3, 27441, 3, 27458, 3, 27461, 3, 27493, 3, 27513, 3, 27519, 3, 27537, 3, 28418, 3, 28486, 3, 28498, 3, 28498, 3, 28565, 3, 28577, 3, 28642, 3, 28642, 3, 28674, 3, 34798, 3, 34818, 3, 35572, 3, 45058, 3, 45059, 3, 48130, 3, 48236, 3, 48242, 3, 48254, 3, 48258, 3, 48266, 3, 48274, 3, 48283, 3, 54274, 3, 54358, 3, 54360, 3, 54430, 3, 54432, 3, 54433, 3, 54436, 3, 54436, 3, 54439, 3, 54440, 3, 54443, 3, 54446, 3, 54448, 3, 54459, 3, 54461, 3, 54461, 3, 54463, 3, 54469, 3, 54471, 3, 54535, 3, 54537, 3, 54540, 3, 54543, 3, 54550, 3, 54552, 3, 54558, 3, 54560, 3, 54587, 3, 54589, 3, 54592, 3, 54594, 3, 54598, 3, 54600, 3, 54600, 3, 54604, 3, 54610, 3, 54612, 3, 54951, 3, 54954, 3, 54978, 3, 54980, 3, 55004, 3, 55006, 3, 55036, 3, 55038, 3, 55062, 3, 55064, 3, 55094, 3, 55096, 3, 55120, 3, 55122, 3, 55152, 3, 55154, 3, 55178, 3, 55180, 3, 55210, 3, 55212, 3, 55236, 3, 55238, 3, 55245, 3, 59394, 3, 59590, 3, 59650, 3, 59717, 3, 60930, 3, 60933, 3, 60935, 3, 60961, 3, 60963, 3, 60964, 3, 60966, 3, 60966, 3, 60969, 3, 60969, 3, 60971, 3, 60980, 3, 60982, 3, 60985, 3, 60987, 3, 60987, 3, 60989, 3, 60989, 3, 60996, 3, 60996, 3, 61001, 3, 61001, 3, 61003, 3, 61003, 3, 61005, 3, 61005, 3, 61007, 3, 61009, 3, 61011, 3, 61012, 3, 61014, 3, 61014, 3, 61017, 3, 61017, 3, 61019, 3, 61019, 3, 61021, 3, 61021, 3, 61023, 3, 61023, 3, 61025, 3, 61025, 3, 61027, 3, 61028, 3, 61030, 3, 61030, 3, 61033, 3, 61036, 3, 61038, 3, 61044, 3, 61046, 3, 61049, 3, 61051, 3, 61054, 3, 61056, 3, 61056, 3, 61058, 3, 61067, 3, 61069, 3, 61085, 3, 61091, 3, 61093, 3, 61095, 3, 61099, 3, 61101, 3, 61117, 3, 2, 4, 42712, 4, 42754, 4, 46902, 4, 46914, 4, 47135, 4, 47138, 4, 52899, 4, 63490, 4, 64031, 4, 49, 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, 17, 3, 2, 2, 2, 3, 19, 3, 2, 2, 2, 5, 22, 3, 2, 2, 2, 7, 24, 3, 2, 2, 2, 9, 26, 3, 2, 2, 2, 11, 28, 3, 2, 2, 2, 13, 37, 3, 2, 2, 2, 15, 39, 3, 2, 2, 2, 17, 41, 3, 2, 2, 2, 19, 20, 7, 49, 2, 2, 20, 21, 7, 49, 2, 2, 21, 4, 3, 2, 2, 2, 22, 23, 7, 49, 2, 2, 23, 6, 3, 2, 2, 2, 24, 25, 7, 44, 2, 2, 25, 8, 3, 2, 2, 2, 26, 27, 7, 35, 2, 2, 27, 10, 3, 2, 2, 2, 28, 32, 5, 15, 8, 2, 29, 31, 5, 13, 7, 2, 30, 29, 3, 2, 2, 2, 31, 34, 3, 2, 2, 2, 32, 30, 3, 2, 2, 2, 32, 33, 3, 2, 2, 2, 33, 35, 3, 2, 2, 2, 34, 32, 3, 2, 2, 2, 35, 36, 8, 6, 2, 2, 36, 12, 3, 2, 2, 2, 37, 38, 9, 2, 2, 2, 38, 14, 3, 2, 2, 2, 39, 40, 9, 3, 2, 2, 40, 16, 3, 2, 2, 2, 41, 45, 7, 41, 2, 2, 42, 44, 11, 2, 2, 2, 43, 42, 3, 2, 2, 2, 44, 47, 3, 2, 2, 2, 45, 46, 3, 2, 2, 2, 45, 43, 3, 2, 2, 2, 46, 48, 3, 2, 2, 2, 47, 45, 3, 2, 2, 2, 48, 49, 7, 41, 2, 2, 49, 18, 3, 2, 2, 2, 5, 2, 32, 45, 3, 3, 6, 2] \ No newline at end of file diff --git a/runtime/typescript/src/tree/xpath/XPathLexer.tokens b/runtime/typescript/src/tree/xpath/XPathLexer.tokens new file mode 100644 index 00000000..5bf699ec --- /dev/null +++ b/runtime/typescript/src/tree/xpath/XPathLexer.tokens @@ -0,0 +1,12 @@ +TOKEN_REF=1 +RULE_REF=2 +ANYWHERE=3 +ROOT=4 +WILDCARD=5 +BANG=6 +ID=7 +STRING=8 +'//'=3 +'/'=4 +'*'=5 +'!'=6 diff --git a/runtime/typescript/src/tree/xpath/XPathLexer.ts b/runtime/typescript/src/tree/xpath/XPathLexer.ts new file mode 100644 index 00000000..506042af --- /dev/null +++ b/runtime/typescript/src/tree/xpath/XPathLexer.ts @@ -0,0 +1,504 @@ +// Generated from XPathLexer.g4 by ANTLR 4.7.3-SNAPSHOT + + +import { + ATN, + ATNDeserializer, + CharStream, + Lexer, + LexerATNSimulator, + RuleContext, + Vocabulary, + VocabularyImpl, + join, + toCharArray, +} from "../../internal"; + + +/* eslint-disable no-useless-escape */ +export class XPathLexer extends Lexer { + public static readonly TOKEN_REF = 1; + public static readonly RULE_REF = 2; + public static readonly ANYWHERE = 3; + public static readonly ROOT = 4; + public static readonly WILDCARD = 5; + public static readonly BANG = 6; + public static readonly ID = 7; + public static readonly STRING = 8; + + // tslint:disable:no-trailing-whitespace + public static readonly channelNames: string[] = [ + "DEFAULT_TOKEN_CHANNEL", "HIDDEN", + ]; + + // tslint:disable:no-trailing-whitespace + public static readonly modeNames: string[] = [ + "DEFAULT_MODE", + ]; + + public static readonly ruleNames: string[] = [ + "ANYWHERE", "ROOT", "WILDCARD", "BANG", "ID", "NameChar", "NameStartChar", + "STRING", + ]; + + private static readonly _LITERAL_NAMES: (string|undefined)[] = [ + undefined, undefined, undefined, "'//'", "'/'", "'*'", "'!'", + ]; + private static readonly _SYMBOLIC_NAMES: (string|undefined)[] = [ + undefined, "TOKEN_REF", "RULE_REF", "ANYWHERE", "ROOT", "WILDCARD", "BANG", + "ID", "STRING", + ]; + public static readonly VOCABULARY: Vocabulary = new VocabularyImpl(XPathLexer._LITERAL_NAMES, XPathLexer._SYMBOLIC_NAMES, []); + + // @Override + public get vocabulary(): Vocabulary { + return XPathLexer.VOCABULARY; + } + // tslint:enable:no-trailing-whitespace + + + constructor(input: CharStream) { + super(input); + this._interp = new LexerATNSimulator(XPathLexer._ATN, this); + } + + // @Override + public get grammarFileName(): string { return "XPathLexer.g4"; } + + // @Override + public get ruleNames(): string[] { return XPathLexer.ruleNames; } + + // @Override + public get serializedATN(): string { return XPathLexer._serializedATN; } + + // @Override + public get channelNames(): string[] { return XPathLexer.channelNames; } + + // @Override + public get modeNames(): string[] { return XPathLexer.modeNames; } + + // @Override + public action(_localctx: RuleContext, ruleIndex: number, actionIndex: number): void { + switch (ruleIndex) { + case 4: + this.ID_action(_localctx, actionIndex); + break; + } + } + private ID_action(_localctx: RuleContext, actionIndex: number): void { + switch (actionIndex) { + case 0: + + const text = this.text; + if (text.charAt(0) === text.charAt(0).toUpperCase()) { + this.type = XPathLexer.TOKEN_REF; + } else { + this.type = XPathLexer.RULE_REF; + } + + break; + } + } + + private static readonly _serializedATNSegments: number = 2; + private static readonly _serializedATNSegment0: string = + "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x02\n2\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\x03\x02\x03\x02\x03\x02\x03\x03\x03\x03" + + "\x03\x04\x03\x04\x03\x05\x03\x05\x03\x06\x03\x06\x07\x06\x1F\n\x06\f\x06" + + "\x0E\x06\"\v\x06\x03\x06\x03\x06\x03\x07\x03\x07\x03\b\x03\b\x03\t\x03" + + "\t\x07\t,\n\t\f\t\x0E\t/\v\t\x03\t\x03\t\x03-\x02\x02\n\x03\x02\x05\x05" + + "\x02\x06\x07\x02\x07\t\x02\b\v\x02\t\r\x02\x02\x0F\x02\x02\x11\x02\n\x03" + + "\x02\x02\x04\u02B6\x02\x02\x02\n\x02\x10\x02\x1D\x022\x02;\x02C\x02\\" + + "\x02a\x02a\x02c\x02|\x02\x81\x02\xA1\x02\xAC\x02\xAC\x02\xAF\x02\xAF\x02" + + "\xB7\x02\xB7\x02\xBC\x02\xBC\x02\xC2\x02\xD8\x02\xDA\x02\xF8\x02\xFA\x02" + + "\u02C3\x02\u02C8\x02\u02D3\x02\u02E2\x02\u02E6\x02\u02EE\x02\u02EE\x02" + + "\u02F0\x02\u02F0\x02\u0302\x02\u0376\x02\u0378\x02\u0379\x02\u037C\x02" + + "\u037F\x02\u0381\x02\u0381\x02\u0388\x02\u0388\x02\u038A\x02\u038C\x02" + + "\u038E\x02\u038E\x02\u0390\x02\u03A3\x02\u03A5\x02\u03F7\x02\u03F9\x02" + + "\u0483\x02\u0485\x02\u0489\x02\u048C\x02\u0531\x02\u0533\x02\u0558\x02" + + "\u055B\x02\u055B\x02\u0563\x02\u0589\x02\u0593\x02\u05BF\x02\u05C1\x02" + + "\u05C1\x02\u05C3\x02\u05C4\x02\u05C6\x02\u05C7\x02\u05C9\x02\u05C9\x02" + + "\u05D2\x02\u05EC\x02\u05F2\x02\u05F4\x02\u0602\x02\u0607\x02\u0612\x02" + + "\u061C\x02\u061E\x02\u061E\x02\u0622\x02\u066B\x02\u0670\x02\u06D5\x02" + + "\u06D7\x02\u06DF\x02\u06E1\x02\u06EA\x02\u06EC\x02\u06FE\x02\u0701\x02" + + "\u0701\x02\u0711\x02\u074C\x02\u074F\x02\u07B3\x02\u07C2\x02\u07F7\x02" + + "\u07FC\x02\u07FC\x02\u0802\x02\u082F\x02\u0842\x02\u085D\x02\u08A2\x02" + + "\u08B6\x02\u08B8\x02\u08BF\x02\u08D6\x02\u0965\x02\u0968\x02\u0971\x02" + + "\u0973\x02\u0985\x02\u0987\x02\u098E\x02\u0991\x02\u0992\x02\u0995\x02" + + "\u09AA\x02\u09AC\x02\u09B2\x02\u09B4\x02\u09B4\x02\u09B8\x02\u09BB\x02" + + "\u09BE\x02\u09C6\x02\u09C9\x02\u09CA\x02\u09CD\x02\u09D0\x02\u09D9\x02" + + "\u09D9\x02\u09DE\x02\u09DF\x02\u09E1\x02\u09E5\x02\u09E8\x02\u09F3\x02" + + "\u0A03\x02\u0A05\x02\u0A07\x02\u0A0C\x02\u0A11\x02\u0A12\x02\u0A15\x02" + + "\u0A2A\x02\u0A2C\x02\u0A32\x02\u0A34\x02\u0A35\x02\u0A37\x02\u0A38\x02" + + "\u0A3A\x02\u0A3B\x02\u0A3E\x02\u0A3E\x02\u0A40\x02\u0A44\x02\u0A49\x02" + + "\u0A4A\x02\u0A4D\x02\u0A4F\x02\u0A53\x02\u0A53\x02\u0A5B\x02\u0A5E\x02" + + "\u0A60\x02\u0A60\x02\u0A68\x02\u0A77\x02\u0A83\x02\u0A85\x02\u0A87\x02" + + "\u0A8F\x02\u0A91\x02\u0A93\x02\u0A95\x02\u0AAA\x02\u0AAC\x02\u0AB2\x02" + + "\u0AB4\x02\u0AB5\x02\u0AB7\x02\u0ABB\x02\u0ABE\x02\u0AC7\x02\u0AC9\x02" + + "\u0ACB\x02\u0ACD\x02\u0ACF\x02\u0AD2\x02\u0AD2\x02\u0AE2\x02\u0AE5\x02" + + "\u0AE8\x02\u0AF1\x02\u0AFB\x02\u0AFB\x02\u0B03\x02\u0B05\x02\u0B07\x02" + + "\u0B0E\x02\u0B11\x02\u0B12\x02\u0B15\x02\u0B2A\x02\u0B2C\x02\u0B32\x02" + + "\u0B34\x02\u0B35\x02\u0B37\x02\u0B3B\x02\u0B3E\x02\u0B46\x02\u0B49\x02" + + "\u0B4A\x02\u0B4D\x02\u0B4F\x02\u0B58\x02\u0B59\x02\u0B5E\x02\u0B5F\x02" + + "\u0B61\x02\u0B65\x02\u0B68\x02\u0B71\x02\u0B73\x02\u0B73\x02\u0B84\x02" + + "\u0B85\x02\u0B87\x02\u0B8C\x02\u0B90\x02\u0B92\x02\u0B94\x02\u0B97\x02" + + "\u0B9B\x02\u0B9C\x02\u0B9E\x02\u0B9E\x02\u0BA0\x02\u0BA1\x02\u0BA5\x02" + + "\u0BA6\x02\u0BAA\x02\u0BAC\x02\u0BB0\x02\u0BBB\x02\u0BC0\x02\u0BC4\x02" + + "\u0BC8\x02\u0BCA\x02\u0BCC\x02\u0BCF\x02\u0BD2\x02\u0BD2\x02\u0BD9\x02" + + "\u0BD9\x02\u0BE8\x02\u0BF1\x02\u0C02\x02\u0C05\x02\u0C07\x02\u0C0E\x02" + + "\u0C10\x02\u0C12\x02\u0C14\x02\u0C2A\x02\u0C2C\x02\u0C3B\x02\u0C3F\x02" + + "\u0C46\x02\u0C48\x02\u0C4A\x02\u0C4C\x02\u0C4F\x02\u0C57\x02\u0C58\x02" + + "\u0C5A\x02\u0C5C\x02\u0C62\x02\u0C65\x02\u0C68\x02\u0C71\x02\u0C82\x02" + + "\u0C85\x02\u0C87\x02\u0C8E\x02\u0C90\x02\u0C92\x02\u0C94\x02\u0CAA\x02" + + "\u0CAC\x02\u0CB5\x02\u0CB7\x02\u0CBB\x02\u0CBE\x02\u0CC6\x02\u0CC8\x02" + + "\u0CCA\x02\u0CCC\x02\u0CCF\x02\u0CD7\x02\u0CD8\x02\u0CE0\x02\u0CE0\x02" + + "\u0CE2\x02\u0CE5\x02\u0CE8\x02\u0CF1\x02\u0CF3\x02\u0CF4\x02\u0D03\x02" + + "\u0D05\x02\u0D07\x02\u0D0E\x02\u0D10\x02\u0D12\x02\u0D14\x02\u0D3C\x02" + + "\u0D3F\x02\u0D46\x02\u0D48\x02\u0D4A\x02\u0D4C\x02\u0D50\x02\u0D56\x02" + + "\u0D59\x02\u0D61\x02\u0D65\x02\u0D68\x02\u0D71\x02\u0D7C\x02\u0D81\x02" + + "\u0D84\x02\u0D85\x02\u0D87\x02\u0D98\x02\u0D9C\x02\u0DB3\x02\u0DB5\x02" + + "\u0DBD\x02\u0DBF\x02\u0DBF\x02\u0DC2\x02\u0DC8\x02\u0DCC\x02\u0DCC\x02" + + "\u0DD1\x02\u0DD6\x02\u0DD8\x02\u0DD8\x02\u0DDA\x02\u0DE1\x02\u0DE8\x02" + + "\u0DF1\x02\u0DF4\x02\u0DF5\x02\u0E03\x02\u0E3C\x02\u0E42\x02\u0E50\x02" + + "\u0E52\x02\u0E5B\x02\u0E83\x02\u0E84\x02\u0E86\x02\u0E86\x02\u0E89\x02" + + "\u0E8A\x02\u0E8C\x02\u0E8C\x02\u0E8F\x02\u0E8F\x02\u0E96\x02\u0E99\x02" + + "\u0E9B\x02\u0EA1\x02\u0EA3\x02\u0EA5\x02\u0EA7\x02\u0EA7\x02\u0EA9\x02" + + "\u0EA9\x02\u0EAC\x02\u0EAD\x02\u0EAF\x02\u0EBB\x02\u0EBD\x02\u0EBF\x02" + + "\u0EC2\x02\u0EC6\x02\u0EC8\x02\u0EC8\x02\u0ECA\x02\u0ECF\x02\u0ED2\x02" + + "\u0EDB\x02\u0EDE\x02\u0EE1\x02\u0F02\x02\u0F02\x02\u0F1A\x02\u0F1B\x02" + + "\u0F22\x02\u0F2B\x02\u0F37\x02\u0F37\x02\u0F39\x02\u0F39\x02\u0F3B\x02" + + "\u0F3B\x02\u0F40\x02\u0F49\x02\u0F4B\x02\u0F6E\x02\u0F73\x02\u0F86\x02" + + "\u0F88\x02\u0F99\x02\u0F9B\x02\u0FBE\x02\u0FC8\x02\u0FC8\x02\u1002\x02" + + "\u104B\x02\u1052\x02\u109F\x02\u10A2\x02\u10C7\x02\u10C9\x02\u10C9\x02" + + "\u10CF\x02\u10CF\x02\u10D2\x02\u10FC\x02\u10FE\x02\u124A\x02\u124C\x02" + + "\u124F\x02\u1252\x02\u1258\x02\u125A\x02\u125A\x02\u125C\x02\u125F\x02" + + "\u1262\x02\u128A\x02\u128C\x02\u128F\x02\u1292\x02\u12B2\x02\u12B4\x02" + + "\u12B7\x02\u12BA\x02\u12C0\x02\u12C2\x02\u12C2\x02\u12C4\x02\u12C7\x02" + + "\u12CA\x02\u12D8\x02\u12DA\x02\u1312\x02\u1314\x02\u1317\x02\u131A\x02" + + "\u135C\x02\u135F\x02\u1361\x02\u1382\x02\u1391\x02\u13A2\x02\u13F7\x02" + + "\u13FA\x02\u13FF\x02\u1403\x02\u166E\x02\u1671\x02\u1681\x02\u1683\x02" + + "\u169C\x02\u16A2\x02\u16EC\x02\u16F0\x02\u16FA\x02\u1702\x02\u170E\x02" + + "\u1710\x02\u1716\x02\u1722\x02\u1736\x02\u1742\x02\u1755\x02\u1762\x02" + + "\u176E\x02\u1770\x02\u1772\x02\u1774\x02\u1775\x02\u1782\x02\u17D5\x02" + + "\u17D9\x02\u17D9\x02\u17DE\x02\u17DF\x02\u17E2\x02\u17EB\x02\u180D\x02" + + "\u1810\x02\u1812\x02\u181B\x02\u1822\x02\u1879\x02\u1882\x02\u18AC\x02" + + "\u18B2\x02\u18F7\x02\u1902\x02\u1920\x02\u1922\x02\u192D\x02\u1932\x02" + + "\u193D\x02\u1948\x02\u196F\x02\u1972\x02\u1976\x02\u1982\x02\u19AD\x02" + + "\u19B2\x02\u19CB\x02\u19D2\x02\u19DB\x02\u1A02\x02\u1A1D\x02\u1A22\x02" + + "\u1A60\x02\u1A62\x02\u1A7E\x02\u1A81\x02\u1A8B\x02\u1A92\x02\u1A9B\x02" + + "\u1AA9\x02\u1AA9\x02\u1AB2\x02\u1ABF\x02\u1B02\x02\u1B4D\x02\u1B52\x02" + + "\u1B5B\x02\u1B6D\x02\u1B75\x02\u1B82\x02\u1BF5\x02\u1C02\x02\u1C39\x02" + + "\u1C42\x02\u1C4B\x02\u1C4F\x02\u1C7F\x02\u1C82\x02\u1C8A\x02\u1CD2\x02" + + "\u1CD4\x02\u1CD6\x02\u1CF8\x02\u1CFA\x02\u1CFB\x02\u1D02\x02\u1DF7\x02" + + "\u1DFD\x02\u1F17\x02\u1F1A\x02\u1F1F\x02\u1F22\x02\u1F47\x02\u1F4A\x02" + + "\u1F4F\x02\u1F52\x02\u1F59\x02\u1F5B\x02\u1F5B\x02\u1F5D\x02\u1F5D\x02" + + "\u1F5F\x02\u1F5F\x02\u1F61\x02\u1F7F\x02\u1F82\x02\u1FB6\x02\u1FB8\x02" + + "\u1FBE\x02\u1FC0\x02\u1FC0\x02\u1FC4\x02\u1FC6\x02\u1FC8\x02\u1FCE\x02" + + "\u1FD2\x02\u1FD5\x02\u1FD8\x02\u1FDD\x02\u1FE2\x02\u1FEE\x02\u1FF4\x02" + + "\u1FF6\x02\u1FF8\x02\u1FFE\x02\u200D\x02\u2011\x02\u202C\x02\u2030\x02" + + "\u2041\x02\u2042\x02\u2056\x02\u2056\x02\u2062\x02\u2066\x02\u2068\x02" + + "\u2071\x02\u2073\x02\u2073\x02\u2081\x02\u2081\x02\u2092\x02\u209E\x02" + + "\u20D2\x02\u20DE\x02\u20E3\x02\u20E3\x02\u20E7\x02\u20F2\x02\u2104\x02" + + "\u2104\x02\u2109\x02\u2109\x02\u210C\x02\u2115\x02\u2117\x02\u2117\x02" + + "\u211B\x02\u211F\x02\u2126\x02\u2126\x02\u2128\x02\u2128\x02\u212A\x02" + + "\u212A\x02\u212C\x02\u212F\x02\u2131\x02\u213B\x02\u213E\x02\u2141\x02" + + "\u2147\x02\u214B\x02\u2150\x02\u2150\x02\u2162\x02\u218A\x02\u2C02\x02" + + "\u2C30\x02\u2C32\x02\u2C60\x02\u2C62\x02\u2CE6\x02\u2CED\x02\u2CF5\x02" + + "\u2D02\x02\u2D27\x02\u2D29\x02\u2D29\x02\u2D2F\x02\u2D2F\x02\u2D32\x02" + + "\u2D69\x02\u2D71\x02\u2D71\x02\u2D81\x02\u2D98\x02\u2DA2\x02\u2DA8\x02" + + "\u2DAA\x02\u2DB0\x02\u2DB2\x02\u2DB8\x02\u2DBA\x02\u2DC0\x02\u2DC2\x02" + + "\u2DC8\x02\u2DCA\x02\u2DD0\x02\u2DD2\x02\u2DD8\x02\u2DDA\x02\u2DE0\x02" + + "\u2DE2\x02\u2E01\x02\u2E31\x02\u2E31\x02\u3007\x02\u3009\x02\u3023\x02" + + "\u3031\x02\u3033\x02\u3037\x02\u303A\x02\u303E\x02\u3043\x02\u3098\x02" + + "\u309B\x02\u309C\x02\u309F\x02\u30A1\x02\u30A3\x02\u30FC\x02\u30FE\x02" + + "\u3101\x02\u3107\x02\u312F\x02\u3133\x02\u3190\x02\u31A2\x02\u31BC\x02" + + "\u31F2\x02\u3201\x02\u3402\x02\u4DB7\x02\u4E02\x02\u9FD7\x02\uA002\x02" + + "\uA48E\x02\uA4D2\x02\uA4FF\x02\uA502\x02\uA60E\x02\uA612\x02\uA62D\x02" + + "\uA642\x02\uA671\x02\uA676\x02\uA67F\x02\uA681\x02\uA6F3\x02\uA719\x02" + + "\uA721\x02\uA724\x02\uA78A\x02\uA78D\x02\uA7B0\x02\uA7B2\x02\uA7B9\x02" + + "\uA7F9\x02\uA829\x02\uA842\x02\uA875\x02\uA882\x02\uA8C7\x02\uA8D2\x02" + + "\uA8DB\x02\uA8E2\x02\uA8F9\x02\uA8FD\x02\uA8FD\x02\uA8FF\x02\uA8FF\x02" + + "\uA902\x02\uA92F\x02\uA932\x02\uA955\x02\uA962\x02\uA97E\x02\uA982\x02" + + "\uA9C2\x02\uA9D1\x02\uA9DB\x02\uA9E2\x02\uAA00\x02\uAA02\x02\uAA38\x02" + + "\uAA42\x02\uAA4F\x02\uAA52\x02\uAA5B\x02\uAA62\x02\uAA78\x02\uAA7C\x02" + + "\uAAC4\x02\uAADD\x02\uAADF\x02\uAAE2\x02\uAAF1\x02\uAAF4\x02\uAAF8\x02" + + "\uAB03\x02\uAB08\x02\uAB0B\x02\uAB10\x02\uAB13\x02\uAB18\x02\uAB22\x02" + + "\uAB28\x02\uAB2A\x02\uAB30\x02\uAB32\x02\uAB5C\x02\uAB5E\x02\uAB67\x02" + + "\uAB72\x02\uABEC\x02\uABEE\x02\uABEF\x02\uABF2\x02\uABFB\x02\uAC02\x02" + + "\uD7A5\x02\uD7B2\x02\uD7C8\x02\uD7CD\x02\uD7FD\x02\uF902\x02\uFA6F\x02" + + "\uFA72\x02\uFADB\x02\uFB02\x02\uFB08\x02\uFB15\x02\uFB19\x02\uFB1F\x02" + + "\uFB2A\x02\uFB2C\x02\uFB38\x02\uFB3A\x02\uFB3E\x02\uFB40\x02\uFB40\x02" + + "\uFB42\x02\uFB43\x02\uFB45\x02\uFB46\x02\uFB48\x02\uFBB3\x02\uFBD5\x02" + + "\uFD3F\x02\uFD52\x02\uFD91\x02\uFD94\x02\uFDC9\x02\uFDF2\x02\uFDFD\x02" + + "\uFE02\x02\uFE11\x02\uFE22\x02\uFE31\x02\uFE35\x02\uFE36\x02\uFE4F\x02" + + "\uFE51\x02\uFE72\x02\uFE76\x02\uFE78\x02\uFEFE\x02\uFF01\x02\uFF01\x02" + + "\uFF12\x02\uFF1B\x02\uFF23\x02\uFF3C\x02\uFF41\x02\uFF41\x02\uFF43\x02" + + "\uFF5C\x02\uFF68\x02\uFFC0\x02\uFFC4\x02\uFFC9\x02\uFFCC\x02\uFFD1\x02" + + "\uFFD4\x02\uFFD9\x02\uFFDC\x02\uFFDE\x02\uFFFB\x02\uFFFD\x02\x02\x03\r" + + "\x03\x0F\x03(\x03*\x03<\x03>\x03?\x03A\x03O\x03R\x03_\x03\x82\x03\xFC" + + "\x03\u0142\x03\u0176\x03\u01FF\x03\u01FF\x03\u0282\x03\u029E\x03\u02A2" + + "\x03\u02D2\x03\u02E2\x03\u02E2\x03\u0302\x03\u0321\x03\u0332\x03\u034C" + + "\x03\u0352\x03\u037C\x03\u0382\x03\u039F\x03\u03A2\x03\u03C5\x03\u03CA" + + "\x03\u03D1\x03\u03D3\x03\u03D7\x03\u0402\x03\u049F\x03\u04A2\x03\u04AB" + + "\x03\u04B2\x03\u04D5\x03\u04DA\x03\u04FD\x03\u0502\x03\u0529\x03\u0532" + + "\x03\u0565\x03\u0602\x03\u0738\x03\u0742\x03\u0757\x03\u0762\x03\u0769" + + "\x03\u0802\x03\u0807\x03\u080A\x03\u080A\x03\u080C\x03\u0837\x03\u0839" + + "\x03\u083A\x03\u083E\x03\u083E\x03\u0841\x03\u0857\x03\u0862\x03\u0878" + + "\x03\u0882\x03\u08A0\x03\u08E2\x03\u08F4\x03\u08F6\x03\u08F7\x03\u0902" + + "\x03\u0917\x03\u0922\x03\u093B\x03\u0982\x03\u09B9\x03\u09C0\x03\u09C1" + + "\x03\u0A02\x03\u0A05\x03\u0A07\x03\u0A08\x03\u0A0E\x03\u0A15\x03\u0A17" + + "\x03\u0A19\x03\u0A1B\x03\u0A35\x03\u0A3A\x03\u0A3C\x03\u0A41\x03\u0A41" + + "\x03\u0A62\x03\u0A7E\x03\u0A82\x03\u0A9E\x03\u0AC2\x03\u0AC9\x03\u0ACB" + + "\x03\u0AE8\x03\u0B02\x03\u0B37\x03\u0B42\x03\u0B57\x03\u0B62\x03\u0B74" + + "\x03\u0B82\x03\u0B93\x03\u0C02\x03\u0C4A\x03\u0C82\x03\u0CB4\x03\u0CC2" + + "\x03\u0CF4\x03\u1002\x03\u1048\x03\u1068\x03\u1071\x03\u1081\x03\u10BC" + + "\x03\u10BF\x03\u10BF\x03\u10D2\x03\u10EA\x03\u10F2\x03\u10FB\x03\u1102" + + "\x03\u1136\x03\u1138\x03\u1141\x03\u1152\x03\u1175\x03\u1178\x03\u1178" + + "\x03\u1182\x03\u11C6\x03\u11CC\x03\u11CE\x03\u11D2\x03\u11DC\x03\u11DE" + + "\x03\u11DE\x03\u1202\x03\u1213\x03\u1215\x03\u1239\x03\u1240\x03\u1240" + + "\x03\u1282\x03\u1288\x03\u128A\x03\u128A\x03\u128C\x03\u128F\x03\u1291" + + "\x03\u129F\x03\u12A1\x03\u12AA\x03\u12B2\x03\u12EC\x03\u12F2\x03\u12FB" + + "\x03\u1302\x03\u1305\x03\u1307\x03\u130E\x03\u1311\x03\u1312\x03\u1315" + + "\x03\u132A\x03\u132C\x03\u1332\x03\u1334\x03\u1335\x03\u1337\x03\u133B" + + "\x03\u133E\x03\u1346\x03\u1349\x03\u134A\x03\u134D\x03\u134F\x03\u1352" + + "\x03\u1352\x03\u1359\x03\u1359\x03\u135F\x03\u1365\x03\u1368\x03\u136E" + + "\x03\u1372\x03\u1376\x03\u1402\x03\u144C\x03\u1452\x03\u145B\x03\u1482" + + "\x03\u14C7\x03\u14C9\x03\u14C9\x03\u14D2\x03\u14DB\x03\u1582\x03\u15B7" + + "\x03\u15BA\x03\u15C2\x03\u15DA\x03\u15DF\x03\u1602\x03\u1642\x03\u1646" + + "\x03\u1646\x03\u1652\x03\u165B\x03\u1682\x03\u16B9\x03\u16C2\x03\u16CB" + + "\x03\u1702\x03\u171B\x03\u171F\x03\u172D\x03\u1732\x03\u173B\x03\u18A2" + + "\x03\u18EB\x03\u1901\x03\u1901\x03\u1AC2\x03\u1AFA\x03\u1C02\x03\u1C0A" + + "\x03\u1C0C\x03\u1C38\x03\u1C3A\x03\u1C42\x03\u1C52\x03\u1C5B\x03\u1C74" + + "\x03\u1C91\x03\u1C94\x03\u1CA9\x03\u1CAB\x03\u1CB8\x03\u2002\x03\u239B" + + "\x03\u2402\x03\u2470\x03\u2482\x03\u2545\x03\u3002\x03\u3430\x03\u4402" + + "\x03\u4648\x03\u6802\x03\u6A3A\x03\u6A42\x03\u6A60\x03\u6A62\x03\u6A6B" + + "\x03\u6AD2\x03\u6AEF\x03\u6AF2\x03\u6AF6\x03\u6B02\x03\u6B38\x03\u6B42" + + "\x03\u6B45\x03\u6B52\x03\u6B5B\x03\u6B65\x03\u6B79\x03\u6B7F\x03\u6B91" + + "\x03\u6F02\x03\u6F46\x03\u6F52\x03\u6F80\x03\u6F91\x03\u6FA1\x03\u6FE2" + + "\x03\u6FE2\x03\u7002\x03\u87EE\x03\u8802\x03\u8AF4\x03\uB002\x03\uB003" + + "\x03\uBC02\x03\uBC6C\x03\uBC72\x03\uBC7E\x03\uBC82\x03\uBC8A\x03\uBC92" + + "\x03\uBC9B\x03\uBC9F\x03\uBCA0\x03\uBCA2\x03\uBCA5\x03\uD167\x03\uD16B" + + "\x03\uD16F\x03\uD184\x03\uD187\x03\uD18D\x03\uD1AC\x03\uD1AF\x03\uD244" + + "\x03\uD246\x03\uD402\x03\uD456\x03\uD458\x03\uD49E\x03\uD4A0\x03\uD4A1" + + "\x03\uD4A4\x03\uD4A4\x03\uD4A7\x03\uD4A8\x03\uD4AB\x03\uD4AE\x03\uD4B0" + + "\x03\uD4BB\x03\uD4BD\x03\uD4BD\x03\uD4BF\x03\uD4C5\x03\uD4C7\x03\uD507" + + "\x03\uD509\x03\uD50C\x03\uD50F\x03\uD516\x03\uD518\x03\uD51E\x03\uD520" + + "\x03\uD53B\x03\uD53D\x03\uD540\x03\uD542\x03\uD546\x03\uD548\x03\uD548" + + "\x03\uD54C\x03\uD552\x03\uD554\x03\uD6A7\x03\uD6AA\x03\uD6C2\x03\uD6C4" + + "\x03\uD6DC\x03\uD6DE\x03\uD6FC\x03\uD6FE\x03\uD716\x03\uD718\x03\uD736" + + "\x03\uD738\x03\uD750\x03\uD752\x03\uD770\x03\uD772\x03\uD78A\x03\uD78C" + + "\x03\uD7AA\x03\uD7AC\x03\uD7C4\x03\uD7C6\x03\uD7CD\x03\uD7D0\x03\uD801" + + "\x03\uDA02\x03\uDA38\x03\uDA3D\x03\uDA6E\x03\uDA77\x03\uDA77\x03\uDA86" + + "\x03\uDA86\x03\uDA9D\x03\uDAA1\x03\uDAA3\x03\uDAB1\x03\uE002\x03\uE008" + + "\x03\uE00A\x03\uE01A\x03\uE01D\x03\uE023\x03\uE025\x03\uE026\x03\uE028" + + "\x03\uE02C\x03\uE802\x03\uE8C6\x03\uE8D2\x03\uE8D8\x03\uE902\x03\uE94C" + + "\x03\uE952\x03\uE95B\x03\uEE02\x03\uEE05\x03\uEE07\x03\uEE21\x03\uEE23" + + "\x03\uEE24\x03\uEE26\x03\uEE26\x03\uEE29\x03\uEE29\x03\uEE2B\x03\uEE34" + + "\x03\uEE36\x03\uEE39\x03\uEE3B\x03\uEE3B\x03\uEE3D\x03\uEE3D\x03\uEE44" + + "\x03\uEE44\x03\uEE49\x03\uEE49\x03\uEE4B\x03\uEE4B\x03\uEE4D\x03\uEE4D" + + "\x03\uEE4F\x03\uEE51\x03\uEE53\x03\uEE54\x03\uEE56\x03\uEE56\x03\uEE59" + + "\x03\uEE59\x03\uEE5B\x03\uEE5B\x03\uEE5D\x03\uEE5D\x03\uEE5F\x03\uEE5F" + + "\x03\uEE61\x03\uEE61\x03\uEE63\x03\uEE64\x03\uEE66\x03\uEE66\x03\uEE69" + + "\x03\uEE6C\x03\uEE6E\x03\uEE74\x03\uEE76\x03\uEE79\x03\uEE7B\x03\uEE7E" + + "\x03\uEE80\x03\uEE80\x03\uEE82\x03\uEE8B\x03\uEE8D\x03\uEE9D\x03\uEEA3" + + "\x03\uEEA5\x03\uEEA7\x03\uEEAB\x03\uEEAD\x03\uEEBD\x03\x02\x04\uA6D8\x04" + + "\uA702\x04\uB736\x04\uB742\x04\uB81F\x04\uB822\x04\uCEA3\x04\uF802\x04" + + "\uFA1F\x04\x03\x10\x03\x10\"\x10\x81\x10\u0102\x10\u01F1\x10\u0240\x02" + + "C\x02\\\x02c\x02|\x02\xAC\x02\xAC\x02\xB7\x02\xB7\x02\xBC\x02\xBC\x02" + + "\xC2\x02\xD8\x02\xDA\x02\xF8\x02\xFA\x02\u02C3\x02\u02C8\x02\u02D3\x02" + + "\u02E2\x02\u02E6\x02\u02EE\x02\u02EE\x02\u02F0\x02\u02F0\x02\u0372\x02" + + "\u0376\x02\u0378\x02\u0379\x02\u037C\x02\u037F\x02\u0381\x02\u0381\x02" + + "\u0388\x02\u0388\x02\u038A\x02\u038C\x02\u038E\x02\u038E\x02\u0390\x02" + + "\u03A3\x02\u03A5\x02\u03F7\x02\u03F9\x02\u0483\x02\u048C\x02\u0531\x02" + + "\u0533\x02\u0558\x02\u055B\x02\u055B\x02\u0563\x02\u0589\x02\u05D2\x02" + + "\u05EC\x02\u05F2\x02\u05F4\x02\u0622\x02\u064C\x02\u0670\x02\u0671\x02" + + "\u0673\x02\u06D5\x02\u06D7\x02\u06D7\x02\u06E7\x02\u06E8\x02\u06F0\x02" + + "\u06F1\x02\u06FC\x02\u06FE\x02\u0701\x02\u0701\x02\u0712\x02\u0712\x02" + + "\u0714\x02\u0731\x02\u074F\x02\u07A7\x02\u07B3\x02\u07B3\x02\u07CC\x02" + + "\u07EC\x02\u07F6\x02\u07F7\x02\u07FC\x02\u07FC\x02\u0802\x02\u0817\x02" + + "\u081C\x02\u081C\x02\u0826\x02\u0826\x02\u082A\x02\u082A\x02\u0842\x02" + + "\u085A\x02\u08A2\x02\u08B6\x02\u08B8\x02\u08BF\x02\u0906\x02\u093B\x02" + + "\u093F\x02\u093F\x02\u0952\x02\u0952\x02\u095A\x02\u0963\x02\u0973\x02" + + "\u0982\x02\u0987\x02\u098E\x02\u0991\x02\u0992\x02\u0995\x02\u09AA\x02" + + "\u09AC\x02\u09B2\x02\u09B4\x02\u09B4\x02\u09B8\x02\u09BB\x02\u09BF\x02" + + "\u09BF\x02\u09D0\x02\u09D0\x02\u09DE\x02\u09DF\x02\u09E1\x02\u09E3\x02" + + "\u09F2\x02\u09F3\x02\u0A07\x02\u0A0C\x02\u0A11\x02\u0A12\x02\u0A15\x02" + + "\u0A2A\x02\u0A2C\x02\u0A32\x02\u0A34\x02\u0A35\x02\u0A37\x02\u0A38\x02" + + "\u0A3A\x02\u0A3B\x02\u0A5B\x02\u0A5E\x02\u0A60\x02\u0A60\x02\u0A74\x02" + + "\u0A76\x02\u0A87\x02\u0A8F\x02\u0A91\x02\u0A93\x02\u0A95\x02\u0AAA\x02" + + "\u0AAC\x02\u0AB2\x02\u0AB4\x02\u0AB5\x02\u0AB7\x02\u0ABB\x02\u0ABF\x02" + + "\u0ABF\x02\u0AD2\x02\u0AD2\x02\u0AE2\x02\u0AE3\x02\u0AFB\x02\u0AFB\x02" + + "\u0B07\x02\u0B0E\x02\u0B11\x02\u0B12\x02\u0B15\x02\u0B2A\x02\u0B2C\x02" + + "\u0B32\x02\u0B34\x02\u0B35\x02\u0B37\x02\u0B3B\x02\u0B3F\x02\u0B3F\x02" + + "\u0B5E\x02\u0B5F\x02\u0B61\x02\u0B63\x02\u0B73\x02\u0B73\x02\u0B85\x02" + + "\u0B85\x02\u0B87\x02\u0B8C\x02\u0B90\x02\u0B92\x02\u0B94\x02\u0B97\x02" + + "\u0B9B\x02\u0B9C\x02\u0B9E\x02\u0B9E\x02\u0BA0\x02\u0BA1\x02\u0BA5\x02" + + "\u0BA6\x02\u0BAA\x02\u0BAC\x02\u0BB0\x02\u0BBB\x02\u0BD2\x02\u0BD2\x02" + + "\u0C07\x02\u0C0E\x02\u0C10\x02\u0C12\x02\u0C14\x02\u0C2A\x02\u0C2C\x02" + + "\u0C3B\x02\u0C3F\x02\u0C3F\x02\u0C5A\x02\u0C5C\x02\u0C62\x02\u0C63\x02" + + "\u0C82\x02\u0C82\x02\u0C87\x02\u0C8E\x02\u0C90\x02\u0C92\x02\u0C94\x02" + + "\u0CAA\x02\u0CAC\x02\u0CB5\x02\u0CB7\x02\u0CBB\x02\u0CBF\x02\u0CBF\x02" + + "\u0CE0\x02\u0CE0\x02\u0CE2\x02\u0CE3\x02\u0CF3\x02\u0CF4\x02\u0D07\x02" + + "\u0D0E\x02\u0D10\x02\u0D12\x02\u0D14\x02\u0D3C\x02\u0D3F\x02\u0D3F\x02" + + "\u0D50\x02\u0D50\x02\u0D56\x02\u0D58\x02\u0D61\x02\u0D63\x02\u0D7C\x02" + + "\u0D81\x02\u0D87\x02\u0D98\x02\u0D9C\x02\u0DB3\x02\u0DB5\x02\u0DBD\x02" + + "\u0DBF\x02\u0DBF\x02\u0DC2\x02\u0DC8\x02\u0E03\x02\u0E32\x02\u0E34\x02" + + "\u0E35\x02\u0E42\x02\u0E48\x02\u0E83\x02\u0E84\x02\u0E86\x02\u0E86\x02" + + "\u0E89\x02\u0E8A\x02\u0E8C\x02\u0E8C\x02\u0E8F\x02\u0E8F\x02\u0E96\x02" + + "\u0E99\x02\u0E9B\x02\u0EA1\x02\u0EA3\x02\u0EA5\x02\u0EA7\x02\u0EA7\x02" + + "\u0EA9\x02\u0EA9\x02\u0EAC\x02\u0EAD\x02\u0EAF\x02\u0EB2\x02\u0EB4\x02" + + "\u0EB5\x02\u0EBF\x02\u0EBF\x02\u0EC2\x02\u0EC6\x02\u0EC8\x02\u0EC8\x02" + + "\u0EDE\x02\u0EE1\x02\u0F02\x02\u0F02\x02\u0F42\x02\u0F49\x02\u0F4B\x02" + + "\u0F6E\x02\u0F8A\x02\u0F8E\x02\u1002\x02\u102C\x02\u1041\x02\u1041\x02" + + "\u1052\x02\u1057\x02\u105C\x02\u105F\x02\u1063\x02\u1063\x02\u1067\x02" + + "\u1068\x02\u1070\x02\u1072\x02\u1077\x02\u1083\x02\u1090\x02\u1090\x02" + + "\u10A2\x02\u10C7\x02\u10C9\x02\u10C9\x02\u10CF\x02\u10CF\x02\u10D2\x02" + + "\u10FC\x02\u10FE\x02\u124A\x02\u124C\x02\u124F\x02\u1252\x02\u1258\x02" + + "\u125A\x02\u125A\x02\u125C\x02\u125F\x02\u1262\x02\u128A\x02\u128C\x02" + + "\u128F\x02\u1292\x02\u12B2\x02\u12B4\x02\u12B7\x02\u12BA\x02\u12C0\x02" + + "\u12C2\x02\u12C2\x02\u12C4\x02\u12C7\x02\u12CA\x02\u12D8\x02\u12DA\x02" + + "\u1312\x02\u1314\x02\u1317\x02\u131A\x02\u135C\x02\u1382\x02\u1391\x02" + + "\u13A2\x02\u13F7\x02\u13FA\x02\u13FF\x02\u1403\x02\u166E\x02\u1671\x02" + + "\u1681\x02\u1683\x02\u169C\x02\u16A2\x02\u16EC\x02\u16F0\x02\u16FA\x02" + + "\u1702\x02\u170E\x02\u1710\x02\u1713\x02\u1722\x02\u1733\x02\u1742\x02" + + "\u1753\x02\u1762\x02\u176E\x02\u1770\x02\u1772\x02\u1782\x02\u17B5\x02" + + "\u17D9\x02\u17D9\x02\u17DE\x02\u17DE\x02\u1822\x02\u1879\x02\u1882\x02" + + "\u1886\x02\u1889\x02\u18AA\x02\u18AC\x02\u18AC\x02\u18B2\x02\u18F7\x02" + + "\u1902\x02\u1920\x02\u1952\x02\u196F\x02\u1972\x02\u1976\x02\u1982\x02" + + "\u19AD\x02\u19B2\x02\u19CB\x02\u1A02\x02\u1A18\x02\u1A22\x02\u1A56\x02" + + "\u1AA9\x02\u1AA9\x02\u1B07\x02\u1B35\x02\u1B47\x02\u1B4D\x02\u1B85\x02" + + "\u1BA2\x02\u1BB0\x02\u1BB1\x02\u1BBC\x02\u1BE7\x02\u1C02\x02\u1C25\x02" + + "\u1C4F\x02\u1C51\x02\u1C5C\x02\u1C7F\x02\u1C82\x02\u1C8A\x02\u1CEB\x02" + + "\u1CEE\x02\u1CF0\x02\u1CF3\x02\u1CF7\x02\u1CF8\x02\u1D02\x02\u1DC1\x02" + + "\u1E02\x02\u1F17\x02\u1F1A\x02\u1F1F\x02\u1F22\x02\u1F47\x02\u1F4A\x02" + + "\u1F4F\x02\u1F52\x02\u1F59\x02\u1F5B\x02\u1F5B\x02\u1F5D\x02\u1F5D\x02" + + "\u1F5F\x02\u1F5F\x02\u1F61\x02\u1F7F\x02\u1F82\x02\u1FB6\x02\u1FB8\x02" + + "\u1FBE\x02\u1FC0\x02\u1FC0\x02\u1FC4\x02\u1FC6\x02\u1FC8\x02\u1FCE\x02" + + "\u1FD2\x02\u1FD5\x02\u1FD8\x02\u1FDD\x02\u1FE2\x02\u1FEE\x02\u1FF4\x02" + + "\u1FF6\x02\u1FF8\x02\u1FFE\x02\u2073\x02\u2073\x02\u2081\x02\u2081\x02" + + "\u2092\x02\u209E\x02\u2104\x02\u2104\x02\u2109\x02\u2109\x02\u210C\x02" + + "\u2115\x02\u2117\x02\u2117\x02\u211B\x02\u211F\x02\u2126\x02\u2126\x02" + + "\u2128\x02\u2128\x02\u212A\x02\u212A\x02\u212C\x02\u212F\x02\u2131\x02" + + "\u213B\x02\u213E\x02\u2141\x02\u2147\x02\u214B\x02\u2150\x02\u2150\x02" + + "\u2162\x02\u218A\x02\u2C02\x02\u2C30\x02\u2C32\x02\u2C60\x02\u2C62\x02" + + "\u2CE6\x02\u2CED\x02\u2CF0\x02\u2CF4\x02\u2CF5\x02\u2D02\x02\u2D27\x02" + + "\u2D29\x02\u2D29\x02\u2D2F\x02\u2D2F\x02\u2D32\x02\u2D69\x02\u2D71\x02" + + "\u2D71\x02\u2D82\x02\u2D98\x02\u2DA2\x02\u2DA8\x02\u2DAA\x02\u2DB0\x02" + + "\u2DB2\x02\u2DB8\x02\u2DBA\x02\u2DC0\x02\u2DC2\x02\u2DC8\x02\u2DCA\x02" + + "\u2DD0\x02\u2DD2\x02\u2DD8\x02\u2DDA\x02\u2DE0\x02\u2E31\x02\u2E31\x02" + + "\u3007\x02\u3009\x02\u3023\x02\u302B\x02\u3033\x02\u3037\x02\u303A\x02" + + "\u303E\x02\u3043\x02\u3098\x02\u309F\x02\u30A1\x02\u30A3\x02\u30FC\x02" + + "\u30FE\x02\u3101\x02\u3107\x02\u312F\x02\u3133\x02\u3190\x02\u31A2\x02" + + "\u31BC\x02\u31F2\x02\u3201\x02\u3402\x02\u4DB7\x02\u4E02\x02\u9FD7\x02" + + "\uA002\x02\uA48E\x02\uA4D2\x02\uA4FF\x02\uA502\x02\uA60E\x02\uA612\x02" + + "\uA621\x02\uA62C\x02\uA62D\x02\uA642\x02\uA670\x02\uA681\x02\uA69F\x02" + + "\uA6A2\x02\uA6F1\x02\uA719\x02\uA721\x02\uA724\x02\uA78A\x02\uA78D\x02" + + "\uA7B0\x02\uA7B2\x02\uA7B9\x02\uA7F9\x02\uA803\x02\uA805\x02\uA807\x02" + + "\uA809\x02\uA80C\x02\uA80E\x02\uA824\x02\uA842\x02\uA875\x02\uA884\x02" + + "\uA8B5\x02\uA8F4\x02\uA8F9\x02\uA8FD\x02\uA8FD\x02\uA8FF\x02\uA8FF\x02" + + "\uA90C\x02\uA927\x02\uA932\x02\uA948\x02\uA962\x02\uA97E\x02\uA986\x02" + + "\uA9B4\x02\uA9D1\x02\uA9D1\x02\uA9E2\x02\uA9E6\x02\uA9E8\x02\uA9F1\x02" + + "\uA9FC\x02\uAA00\x02\uAA02\x02\uAA2A\x02\uAA42\x02\uAA44\x02\uAA46\x02" + + "\uAA4D\x02\uAA62\x02\uAA78\x02\uAA7C\x02\uAA7C\x02\uAA80\x02\uAAB1\x02" + + "\uAAB3\x02\uAAB3\x02\uAAB7\x02\uAAB8\x02\uAABB\x02\uAABF\x02\uAAC2\x02" + + "\uAAC2\x02\uAAC4\x02\uAAC4\x02\uAADD\x02\uAADF\x02\uAAE2\x02\uAAEC\x02" + + "\uAAF4\x02\uAAF6\x02\uAB03\x02\uAB08\x02\uAB0B\x02\uAB10\x02\uAB13\x02" + + "\uAB18\x02\uAB22\x02\uAB28\x02\uAB2A\x02\uAB30\x02\uAB32\x02\uAB5C\x02" + + "\uAB5E\x02\uAB67\x02\uAB72\x02\uABE4\x02\uAC02\x02\uD7A5\x02\uD7B2\x02" + + "\uD7C8\x02\uD7CD\x02\uD7FD\x02\uF902\x02\uFA6F\x02\uFA72\x02\uFADB\x02" + + "\uFB02\x02\uFB08\x02\uFB15\x02\uFB19\x02\uFB1F\x02\uFB1F\x02\uFB21\x02" + + "\uFB2A\x02\uFB2C\x02\uFB38\x02\uFB3A\x02\uFB3E\x02\uFB40\x02\uFB40\x02" + + "\uFB42\x02\uFB43\x02\uFB45\x02\uFB46\x02\uFB48\x02\uFBB3\x02\uFBD5\x02" + + "\uFD3F\x02\uFD52\x02\uFD91\x02\uFD94\x02\uFDC9\x02\uFDF2\x02\uFDFD\x02" + + "\uFE72\x02\uFE76\x02\uFE78\x02\uFEFE\x02\uFF23\x02\uFF3C\x02\uFF43\x02" + + "\uFF5C\x02\uFF68\x02\uFFC0\x02\uFFC4\x02\uFFC9\x02\uFFCC\x02\uFFD1\x02" + + "\uFFD4\x02\uFFD9\x02\uFFDC\x02\uFFDE\x02\x02\x03\r\x03\x0F\x03(\x03*\x03" + + "<\x03>\x03?\x03A\x03O\x03R\x03_\x03\x82\x03\xFC\x03\u0142\x03\u0176\x03" + + "\u0282\x03\u029E\x03\u02A2\x03\u02D2\x03\u0302\x03\u0321\x03\u0332\x03" + + "\u034C\x03\u0352\x03\u0377\x03\u0382\x03\u039F\x03\u03A2\x03\u03C5\x03" + + "\u03CA\x03\u03D1\x03\u03D3\x03\u03D7\x03\u0402\x03\u049F\x03\u04B2\x03" + + "\u04D5\x03\u04DA\x03\u04FD\x03\u0502\x03\u0529\x03\u0532\x03\u0565\x03" + + "\u0602\x03\u0738\x03\u0742\x03\u0757\x03\u0762\x03\u0769\x03\u0802\x03" + + "\u0807\x03\u080A\x03\u080A\x03\u080C\x03\u0837\x03\u0839\x03\u083A\x03" + + "\u083E\x03\u083E\x03\u0841\x03\u0857\x03\u0862\x03\u0878\x03\u0882\x03" + + "\u08A0\x03\u08E2\x03\u08F4\x03\u08F6\x03\u08F7\x03\u0902\x03\u0917\x03" + + "\u0922\x03\u093B\x03\u0982\x03\u09B9\x03\u09C0\x03\u09C1\x03\u0A02\x03" + + "\u0A02\x03\u0A12\x03\u0A15\x03\u0A17\x03\u0A19\x03\u0A1B\x03\u0A35\x03" + + "\u0A62\x03\u0A7E\x03\u0A82\x03\u0A9E\x03\u0AC2\x03\u0AC9\x03\u0ACB\x03" + + "\u0AE6\x03\u0B02\x03\u0B37\x03\u0B42\x03\u0B57\x03\u0B62\x03\u0B74\x03" + + "\u0B82\x03\u0B93\x03\u0C02\x03\u0C4A\x03\u0C82\x03\u0CB4\x03\u0CC2\x03" + + "\u0CF4\x03\u1005\x03\u1039\x03\u1085\x03\u10B1\x03\u10D2\x03\u10EA\x03" + + "\u1105\x03\u1128\x03\u1152\x03\u1174\x03\u1178\x03\u1178\x03\u1185\x03" + + "\u11B4\x03\u11C3\x03\u11C6\x03\u11DC\x03\u11DC\x03\u11DE\x03\u11DE\x03" + + "\u1202\x03\u1213\x03\u1215\x03\u122D\x03\u1282\x03\u1288\x03\u128A\x03" + + "\u128A\x03\u128C\x03\u128F\x03\u1291\x03\u129F\x03\u12A1\x03\u12AA\x03" + + "\u12B2\x03\u12E0\x03\u1307\x03\u130E\x03\u1311\x03\u1312\x03\u1315\x03" + + "\u132A\x03\u132C\x03\u1332\x03\u1334\x03\u1335\x03\u1337\x03\u133B\x03" + + "\u133F\x03\u133F\x03\u1352\x03\u1352\x03\u135F\x03\u1363\x03\u1402\x03" + + "\u1436\x03\u1449\x03\u144C\x03\u1482\x03\u14B1\x03\u14C6\x03\u14C7\x03" + + "\u14C9\x03\u14C9\x03\u1582\x03\u15B0\x03\u15DA\x03\u15DD\x03\u1602\x03" + + "\u1631\x03\u1646\x03\u1646\x03\u1682\x03\u16AC\x03\u1702\x03\u171B\x03" + + "\u18A2\x03\u18E1\x03\u1901\x03\u1901\x03\u1AC2\x03\u1AFA\x03\u1C02\x03" + + "\u1C0A\x03\u1C0C\x03\u1C30\x03\u1C42\x03\u1C42\x03\u1C74\x03\u1C91\x03" + + "\u2002\x03\u239B\x03\u2402\x03\u2470\x03\u2482\x03\u2545\x03\u3002\x03" + + "\u3430\x03\u4402\x03\u4648\x03\u6802\x03\u6A3A\x03\u6A42\x03\u6A60\x03" + + "\u6AD2\x03\u6AEF\x03\u6B02\x03\u6B31\x03\u6B42\x03\u6B45\x03\u6B65\x03" + + "\u6B79\x03\u6B7F\x03\u6B91\x03\u6F02\x03\u6F46\x03\u6F52\x03\u6F52\x03" + + "\u6F95\x03\u6FA1\x03\u6FE2\x03\u6FE2\x03\u7002\x03\u87EE\x03\u8802\x03" + + "\u8AF4\x03\uB002\x03\uB003\x03\uBC02\x03\uBC6C\x03\uBC72\x03\uBC7E\x03" + + "\uBC82\x03\uBC8A\x03\uBC92\x03\uBC9B\x03\uD402\x03\uD456\x03\uD458\x03" + + "\uD49E\x03\uD4A0\x03\uD4A1\x03\uD4A4\x03\uD4A4\x03\uD4A7\x03\uD4A8\x03" + + "\uD4AB\x03\uD4AE\x03\uD4B0\x03\uD4BB\x03\uD4BD\x03\uD4BD\x03\uD4BF\x03" + + "\uD4C5\x03\uD4C7\x03\uD507\x03\uD509\x03\uD50C\x03\uD50F\x03\uD516\x03" + + "\uD518\x03\uD51E\x03\uD520\x03\uD53B\x03\uD53D\x03\uD540\x03\uD542\x03" + + "\uD546\x03\uD548\x03\uD548"; + private static readonly _serializedATNSegment1: string = + "\x03\uD54C\x03\uD552\x03\uD554\x03\uD6A7\x03\uD6AA\x03\uD6C2\x03\uD6C4" + + "\x03\uD6DC\x03\uD6DE\x03\uD6FC\x03\uD6FE\x03\uD716\x03\uD718\x03\uD736" + + "\x03\uD738\x03\uD750\x03\uD752\x03\uD770\x03\uD772\x03\uD78A\x03\uD78C" + + "\x03\uD7AA\x03\uD7AC\x03\uD7C4\x03\uD7C6\x03\uD7CD\x03\uE802\x03\uE8C6" + + "\x03\uE902\x03\uE945\x03\uEE02\x03\uEE05\x03\uEE07\x03\uEE21\x03\uEE23" + + "\x03\uEE24\x03\uEE26\x03\uEE26\x03\uEE29\x03\uEE29\x03\uEE2B\x03\uEE34" + + "\x03\uEE36\x03\uEE39\x03\uEE3B\x03\uEE3B\x03\uEE3D\x03\uEE3D\x03\uEE44" + + "\x03\uEE44\x03\uEE49\x03\uEE49\x03\uEE4B\x03\uEE4B\x03\uEE4D\x03\uEE4D" + + "\x03\uEE4F\x03\uEE51\x03\uEE53\x03\uEE54\x03\uEE56\x03\uEE56\x03\uEE59" + + "\x03\uEE59\x03\uEE5B\x03\uEE5B\x03\uEE5D\x03\uEE5D\x03\uEE5F\x03\uEE5F" + + "\x03\uEE61\x03\uEE61\x03\uEE63\x03\uEE64\x03\uEE66\x03\uEE66\x03\uEE69" + + "\x03\uEE6C\x03\uEE6E\x03\uEE74\x03\uEE76\x03\uEE79\x03\uEE7B\x03\uEE7E" + + "\x03\uEE80\x03\uEE80\x03\uEE82\x03\uEE8B\x03\uEE8D\x03\uEE9D\x03\uEEA3" + + "\x03\uEEA5\x03\uEEA7\x03\uEEAB\x03\uEEAD\x03\uEEBD\x03\x02\x04\uA6D8\x04" + + "\uA702\x04\uB736\x04\uB742\x04\uB81F\x04\uB822\x04\uCEA3\x04\uF802\x04" + + "\uFA1F\x041\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\x11\x03\x02" + + "\x02\x02\x03\x13\x03\x02\x02\x02\x05\x16\x03\x02\x02\x02\x07\x18\x03\x02" + + "\x02\x02\t\x1A\x03\x02\x02\x02\v\x1C\x03\x02\x02\x02\r%\x03\x02\x02\x02" + + "\x0F\'\x03\x02\x02\x02\x11)\x03\x02\x02\x02\x13\x14\x071\x02\x02\x14\x15" + + "\x071\x02\x02\x15\x04\x03\x02\x02\x02\x16\x17\x071\x02\x02\x17\x06\x03" + + "\x02\x02\x02\x18\x19\x07,\x02\x02\x19\b\x03\x02\x02\x02\x1A\x1B\x07#\x02" + + "\x02\x1B\n\x03\x02\x02\x02\x1C \x05\x0F\b\x02\x1D\x1F\x05\r\x07\x02\x1E" + + "\x1D\x03\x02\x02\x02\x1F\"\x03\x02\x02\x02 \x1E\x03\x02\x02\x02 !\x03" + + "\x02\x02\x02!#\x03\x02\x02\x02\" \x03\x02\x02\x02#$\b\x06\x02\x02$\f\x03" + + "\x02\x02\x02%&\t\x02\x02\x02&\x0E\x03\x02\x02\x02\'(\t\x03\x02\x02(\x10" + + "\x03\x02\x02\x02)-\x07)\x02\x02*,\v\x02\x02\x02+*\x03\x02\x02\x02,/\x03" + + "\x02\x02\x02-.\x03\x02\x02\x02-+\x03\x02\x02\x02.0\x03\x02\x02\x02/-\x03" + + "\x02\x02\x0201\x07)\x02\x021\x12\x03\x02\x02\x02\x05\x02 -\x03\x03\x06" + + "\x02"; + public static readonly _serializedATN: string = join( + [ + XPathLexer._serializedATNSegment0, + XPathLexer._serializedATNSegment1, + ], + "", + ); + public static __ATN: ATN; + public static get _ATN(): ATN { + if (!XPathLexer.__ATN) { + XPathLexer.__ATN = new ATNDeserializer().deserialize(toCharArray(XPathLexer._serializedATN)); + } + + return XPathLexer.__ATN; + } + +} + diff --git a/src/tree/xpath/XPathLexerErrorListener.ts b/runtime/typescript/src/tree/xpath/XPathLexerErrorListener.ts similarity index 69% rename from src/tree/xpath/XPathLexerErrorListener.ts rename to runtime/typescript/src/tree/xpath/XPathLexerErrorListener.ts index 95aad247..f9cad16d 100644 --- a/src/tree/xpath/XPathLexerErrorListener.ts +++ b/runtime/typescript/src/tree/xpath/XPathLexerErrorListener.ts @@ -5,13 +5,14 @@ // CONVERSTION complete, Burt Harris 10/14/2016 -import { ANTLRErrorListener } from "../../ANTLRErrorListener"; -import { Override } from "../../Decorators"; -import { Recognizer } from "../../Recognizer"; -import { RecognitionException } from "../../RecognitionException"; +import { + ANTLRErrorListener, + RecognitionException, + Recognizer +} from "../../internal"; export class XPathLexerErrorListener implements ANTLRErrorListener { - @Override + // @Override public syntaxError( recognizer: Recognizer, offendingSymbol: T | undefined, line: number, charPositionInLine: number, msg: string, diff --git a/src/tree/xpath/XPathRuleAnywhereElement.ts b/runtime/typescript/src/tree/xpath/XPathRuleAnywhereElement.ts similarity index 71% rename from src/tree/xpath/XPathRuleAnywhereElement.ts rename to runtime/typescript/src/tree/xpath/XPathRuleAnywhereElement.ts index bbc71139..d41627f7 100644 --- a/src/tree/xpath/XPathRuleAnywhereElement.ts +++ b/runtime/typescript/src/tree/xpath/XPathRuleAnywhereElement.ts @@ -4,11 +4,13 @@ */ // CONVERSTION complete, Burt Harris 10/14/2016 -import { ParserRuleContext } from "../../ParserRuleContext"; -import { Override } from "../../Decorators"; -import { ParseTree } from "../ParseTree"; -import { Trees } from "../Trees"; -import { XPathElement } from "./XPathElement"; +import { + ParserRuleContext, + Trees, + XPathElement +} from "../../internal"; + +import { ParseTree } from "../../internal"; /** * Either `ID` at start of path or `...//ID` in middle of path. @@ -20,7 +22,7 @@ export class XPathRuleAnywhereElement extends XPathElement { this.ruleIndex = ruleIndex; } - @Override + // @Override public evaluate(t: ParseTree): ParseTree[] { return Trees.findAllRuleNodes(t, this.ruleIndex); } diff --git a/src/tree/xpath/XPathRuleElement.ts b/runtime/typescript/src/tree/xpath/XPathRuleElement.ts similarity index 69% rename from src/tree/xpath/XPathRuleElement.ts rename to runtime/typescript/src/tree/xpath/XPathRuleElement.ts index ccdd3307..a1b6b8b2 100644 --- a/src/tree/xpath/XPathRuleElement.ts +++ b/runtime/typescript/src/tree/xpath/XPathRuleElement.ts @@ -4,11 +4,13 @@ */ // CONVERSTION complete, Burt Harris 10/14/2016 -import { ParserRuleContext } from "../../ParserRuleContext"; -import { Override } from "../../Decorators"; -import { ParseTree } from "../ParseTree"; -import { Trees } from "../Trees"; -import { XPathElement } from "./XPathElement"; +import { + ParserRuleContext, + Trees, + XPathElement +} from "../../internal"; + +import { ParseTree } from "../../internal"; export class XPathRuleElement extends XPathElement { protected ruleIndex: number; @@ -17,11 +19,11 @@ export class XPathRuleElement extends XPathElement { this.ruleIndex = ruleIndex; } - @Override + // @Override public evaluate(t: ParseTree): ParseTree[] { // return all children of t that match nodeName - let nodes: ParseTree[] = []; - for (let c of Trees.getChildren(t)) { + const nodes: ParseTree[] = []; + for (const c of Trees.getChildren(t)) { if (c instanceof ParserRuleContext) { if ((c.ruleIndex === this.ruleIndex && !this.invert) || (c.ruleIndex !== this.ruleIndex && this.invert)) { diff --git a/src/tree/xpath/XPathTokenAnywhereElement.ts b/runtime/typescript/src/tree/xpath/XPathTokenAnywhereElement.ts similarity index 74% rename from src/tree/xpath/XPathTokenAnywhereElement.ts rename to runtime/typescript/src/tree/xpath/XPathTokenAnywhereElement.ts index 359839bf..561b5831 100644 --- a/src/tree/xpath/XPathTokenAnywhereElement.ts +++ b/runtime/typescript/src/tree/xpath/XPathTokenAnywhereElement.ts @@ -4,10 +4,12 @@ */ // CONVERSTION complete, Burt Harris 10/14/2016 -import { Override } from "../../Decorators"; -import { ParseTree } from "../ParseTree"; -import { Trees } from "../Trees"; -import { XPathElement } from "./XPathElement"; + +import { + ParseTree, + Trees, + XPathElement +} from "../../internal"; export class XPathTokenAnywhereElement extends XPathElement { protected tokenType: number; @@ -16,7 +18,7 @@ export class XPathTokenAnywhereElement extends XPathElement { this.tokenType = tokenType; } - @Override + // @Override public evaluate(t: ParseTree): ParseTree[] { return Trees.findAllTokenNodes(t, this.tokenType); } diff --git a/src/tree/xpath/XPathTokenElement.ts b/runtime/typescript/src/tree/xpath/XPathTokenElement.ts similarity index 70% rename from src/tree/xpath/XPathTokenElement.ts rename to runtime/typescript/src/tree/xpath/XPathTokenElement.ts index 4cf7b873..c29e1519 100644 --- a/src/tree/xpath/XPathTokenElement.ts +++ b/runtime/typescript/src/tree/xpath/XPathTokenElement.ts @@ -4,11 +4,13 @@ */ // CONVERSTION complete, Burt Harris 10/14/2016 -import { Override } from "../../Decorators"; -import { ParseTree } from "../ParseTree"; -import { TerminalNode } from "../TerminalNode"; -import { Trees } from "../Trees"; -import { XPathElement } from "./XPathElement"; + +import { + ParseTree, + TerminalNode, + Trees, + XPathElement +} from "../../internal"; export class XPathTokenElement extends XPathElement { protected tokenType: number; @@ -17,11 +19,11 @@ export class XPathTokenElement extends XPathElement { this.tokenType = tokenType; } - @Override + // @Override public evaluate(t: ParseTree): ParseTree[] { // return all children of t that match nodeName - let nodes: ParseTree[] = []; - for (let c of Trees.getChildren(t)) { + const nodes: ParseTree[] = []; + for (const c of Trees.getChildren(t)) { if (c instanceof TerminalNode) { if ((c.symbol.type === this.tokenType && !this.invert) || (c.symbol.type !== this.tokenType && this.invert)) { diff --git a/src/tree/xpath/XPathWildcardAnywhereElement.ts b/runtime/typescript/src/tree/xpath/XPathWildcardAnywhereElement.ts similarity index 65% rename from src/tree/xpath/XPathWildcardAnywhereElement.ts rename to runtime/typescript/src/tree/xpath/XPathWildcardAnywhereElement.ts index e2b668bd..2defb0b5 100644 --- a/src/tree/xpath/XPathWildcardAnywhereElement.ts +++ b/runtime/typescript/src/tree/xpath/XPathWildcardAnywhereElement.ts @@ -4,19 +4,21 @@ */ // CONVERSTION complete, Burt Harris 10/14/2016 -import { Override } from "../../Decorators"; -import { ParseTree } from "../ParseTree"; -import { TerminalNode } from "../TerminalNode"; -import { Trees } from "../Trees"; -import { XPath } from "./XPath"; -import { XPathElement } from "./XPathElement"; + +import { + ParseTree, + TerminalNode, + Trees, + XPath, + XPathElement +} from "../../internal"; export class XPathWildcardAnywhereElement extends XPathElement { constructor() { super(XPath.WILDCARD); } - @Override + // @Override public evaluate(t: ParseTree): ParseTree[] { if (this.invert) { // !* is weird but valid (empty) diff --git a/src/tree/xpath/XPathWildcardElement.ts b/runtime/typescript/src/tree/xpath/XPathWildcardElement.ts similarity index 59% rename from src/tree/xpath/XPathWildcardElement.ts rename to runtime/typescript/src/tree/xpath/XPathWildcardElement.ts index 866749fe..25fdb787 100644 --- a/src/tree/xpath/XPathWildcardElement.ts +++ b/runtime/typescript/src/tree/xpath/XPathWildcardElement.ts @@ -4,26 +4,28 @@ */ // CONVERSTION complete, Burt Harris 10/14/2016 -import { Override } from "../../Decorators"; -import { ParseTree } from "../ParseTree"; -import { TerminalNode } from "../TerminalNode"; -import { Trees } from "../Trees"; -import { XPath } from "./XPath"; -import { XPathElement } from "./XPathElement"; + +import { + ParseTree, + TerminalNode, + Trees, + XPath, + XPathElement +} from "../../internal"; export class XPathWildcardElement extends XPathElement { constructor() { super(XPath.WILDCARD); } - @Override + // @Override public evaluate(t: ParseTree): ParseTree[] { - let kids: ParseTree[] = []; + const kids: ParseTree[] = []; if (this.invert) { // !* is weird but valid (empty) return kids; } - for (let c of Trees.getChildren(t)) { + for (const c of Trees.getChildren(t)) { kids.push(c); } return kids; diff --git a/runtime/typescript/src/tree/xpath/index.ts b/runtime/typescript/src/tree/xpath/index.ts new file mode 100644 index 00000000..f9fbff0a --- /dev/null +++ b/runtime/typescript/src/tree/xpath/index.ts @@ -0,0 +1,14 @@ +/*! + * Copyright 2016 The ANTLR Project. All rights reserved. + * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. + */ + +export * from "../../internal"; +export * from "../../internal"; +export * from "../../internal"; +export * from "../../internal"; +export * from "../../internal"; +export * from "../../internal"; +export * from "../../internal"; +export * from "../../internal"; +export * from "../../internal"; diff --git a/runtime/typescript/tree.d.ts b/runtime/typescript/tree.d.ts new file mode 100644 index 00000000..d8990924 --- /dev/null +++ b/runtime/typescript/tree.d.ts @@ -0,0 +1,5 @@ +/*! + * Copyright 2016 The ANTLR Project. All rights reserved. + * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. + */ +export * from "./dist/misc"; diff --git a/runtime/typescript/tree.js b/runtime/typescript/tree.js new file mode 100644 index 00000000..92cd6074 --- /dev/null +++ b/runtime/typescript/tree.js @@ -0,0 +1,10 @@ +"use strict"; +/*! + * Copyright 2016 The ANTLR Project. All rights reserved. + * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. + */ +function __export(m) { + for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; +} +Object.defineProperty(exports, "__esModule", { value: true }); +__export(require("./dist/tree")); diff --git a/runtime/typescript/tsconfig.json b/runtime/typescript/tsconfig.json new file mode 100644 index 00000000..64713a11 --- /dev/null +++ b/runtime/typescript/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["src/**/*.ts"], + "compilerOptions": { + "composite": true, + "outDir": "dist", + "rootDir": "src" + } +} diff --git a/runtime/typescript/util.js b/runtime/typescript/util.js new file mode 100644 index 00000000..6afa01ae --- /dev/null +++ b/runtime/typescript/util.js @@ -0,0 +1 @@ +export * from "./dist/util/index.jss" diff --git a/src/Decorators.ts b/src/Decorators.ts deleted file mode 100644 index 51bf2654..00000000 --- a/src/Decorators.ts +++ /dev/null @@ -1,31 +0,0 @@ -/*! - * Copyright 2016 The ANTLR Project. All rights reserved. - * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. - */ - -export function NotNull( - target: any, - propertyKey: PropertyKey, - propertyDescriptor?: PropertyDescriptor | number) { - // intentionally empty -} - -export function Nullable( - target: any, - propertyKey: PropertyKey, - propertyDescriptor?: PropertyDescriptor | number) { - // intentionally empty -} - -export function Override( - target: any, - propertyKey: PropertyKey, - propertyDescriptor?: PropertyDescriptor) { - // do something with 'target' ... -} - -export function SuppressWarnings(options: string) { - return (target: any, propertyKey: PropertyKey, descriptor?: PropertyDescriptor) => { - // intentionally empty - }; -} diff --git a/src/atn/index.ts b/src/atn/index.ts deleted file mode 100644 index f66764c3..00000000 --- a/src/atn/index.ts +++ /dev/null @@ -1,75 +0,0 @@ -/*! - * Copyright 2016 The ANTLR Project. All rights reserved. - * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. - */ - -export * from "./AbstractPredicateTransition"; -export * from "./ActionTransition"; -export * from "./AmbiguityInfo"; -export * from "./ATN"; -export * from "./ATNConfig"; -export * from "./ATNConfigSet"; -export * from "./ATNDeserializationOptions"; -export * from "./ATNDeserializer"; -// export * from "./ATNSerializer"; -export * from "./ATNSimulator"; -export * from "./ATNState"; -export * from "./ATNStateType"; -export * from "./ATNType"; -export * from "./AtomTransition"; -export * from "./BasicBlockStartState"; -export * from "./BasicState"; -export * from "./BlockEndState"; -export * from "./BlockStartState"; -export * from "./CodePointTransitions"; -export * from "./ConflictInfo"; -export * from "./ContextSensitivityInfo"; -export * from "./DecisionEventInfo"; -export * from "./DecisionInfo"; -export * from "./DecisionState"; -export * from "./EpsilonTransition"; -export * from "./ErrorInfo"; -export * from "./InvalidState"; -export * from "./LexerAction"; -export * from "./LexerActionExecutor"; -export * from "./LexerActionType"; -export * from "./LexerATNSimulator"; -export * from "./LexerChannelAction"; -export * from "./LexerCustomAction"; -export * from "./LexerIndexedCustomAction"; -export * from "./LexerModeAction"; -export * from "./LexerMoreAction"; -export * from "./LexerPopModeAction"; -export * from "./LexerPushModeAction"; -export * from "./LexerSkipAction"; -export * from "./LexerTypeAction"; -export * from "./LL1Analyzer"; -export * from "./LookaheadEventInfo"; -export * from "./LoopEndState"; -export * from "./NotSetTransition"; -export * from "./OrderedATNConfigSet"; -export * from "./ParseInfo"; -export * from "./ParserATNSimulator"; -export * from "./PlusBlockStartState"; -export * from "./PlusLoopbackState"; -export * from "./PrecedencePredicateTransition"; -export * from "./PredicateEvalInfo"; -export * from "./PredicateTransition"; -export * from "./PredictionContext"; -export * from "./PredictionContextCache"; -export * from "./PredictionMode"; -export * from "./ProfilingATNSimulator"; -export * from "./RangeTransition"; -export * from "./RuleStartState"; -export * from "./RuleStopState"; -export * from "./RuleTransition"; -export * from "./SemanticContext"; -export * from "./SetTransition"; -export * from "./SimulatorState"; -export * from "./StarBlockStartState"; -export * from "./StarLoopbackState"; -export * from "./StarLoopEntryState"; -export * from "./TokensStartState"; -export * from "./Transition"; -export * from "./TransitionType"; -export * from "./WildcardTransition"; diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index 316e8483..00000000 --- a/src/index.ts +++ /dev/null @@ -1,53 +0,0 @@ -/*! - * Copyright 2016 The ANTLR Project. All rights reserved. - * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. - */ - -export * from "./ANTLRErrorListener"; -export * from "./ANTLRErrorStrategy"; -// export * from "./ANTLRFileStream"; -export * from "./ANTLRInputStream"; -export * from "./BailErrorStrategy"; -export * from "./BufferedTokenStream"; -export * from "./CharStream"; -export * from "./CharStreams"; -export * from "./CodePointBuffer"; -export * from "./CodePointCharStream"; -export * from "./CommonToken"; -export * from "./CommonTokenFactory"; -export * from "./CommonTokenStream"; -export * from "./ConsoleErrorListener"; -export * from "./DefaultErrorStrategy"; -export * from "./Dependents"; -export * from "./DiagnosticErrorListener"; -export * from "./FailedPredicateException"; -export * from "./InputMismatchException"; -export * from "./InterpreterRuleContext"; -export * from "./IntStream"; -export * from "./Lexer"; -export * from "./LexerInterpreter"; -export * from "./LexerNoViableAltException"; -export * from "./ListTokenSource"; -export * from "./NoViableAltException"; -export * from "./Parser"; -export * from "./ParserErrorListener"; -export * from "./ParserInterpreter"; -export * from "./ParserRuleContext"; -export * from "./ProxyErrorListener"; -export * from "./ProxyParserErrorListener"; -export * from "./RecognitionException"; -export * from "./Recognizer"; -export * from "./RuleContext"; -export * from "./RuleContextWithAltNum"; -export * from "./RuleDependency"; -export * from "./RuleVersion"; -export * from "./Token"; -export * from "./TokenFactory"; -export * from "./TokenSource"; -export * from "./TokenStream"; -export * from "./TokenStreamRewriter"; -// export * from "./UnbufferedCharStream"; -// export * from "./UnbufferedTokenStream"; -export * from "./Vocabulary"; -export * from "./VocabularyImpl"; -export * from "./WritableToken"; diff --git a/src/misc/Arrays.ts b/src/misc/Arrays.ts deleted file mode 100644 index cec6fe82..00000000 --- a/src/misc/Arrays.ts +++ /dev/null @@ -1,66 +0,0 @@ -/*! - * Copyright 2016 The ANTLR Project. All rights reserved. - * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. - */ - -export namespace Arrays { - /** - * Searches the specified array of numbers for the specified value using the binary search algorithm. The array must - * be sorted prior to making this call. If it is not sorted, the results are unspecified. If the array contains - * multiple elements with the specified value, there is no guarantee which one will be found. - * - * @returns index of the search key, if it is contained in the array; otherwise, (-(insertion point) - 1). The - * insertion point is defined as the point at which the key would be inserted into the array: the index of the first - * element greater than the key, or array.length if all elements in the array are less than the specified key. Note - * that this guarantees that the return value will be >= 0 if and only if the key is found. - */ - export function binarySearch(array: ArrayLike, key: number, fromIndex?: number, toIndex?: number): number { - return binarySearch0(array, fromIndex !== undefined ? fromIndex : 0, toIndex !== undefined ? toIndex : array.length, key); - } - - function binarySearch0(array: ArrayLike, fromIndex: number, toIndex: number, key: number): number { - let low: number = fromIndex; - let high: number = toIndex - 1; - - while (low <= high) { - let mid: number = (low + high) >>> 1; - let midVal: number = array[mid]; - - if (midVal < key) { - low = mid + 1; - } else if (midVal > key) { - high = mid - 1; - } else { - // key found - return mid; - } - } - - // key not found. - return -(low + 1); - } - - export function toString(array: Iterable) { - let result = "["; - - let first = true; - for (let element of array) { - if (first) { - first = false; - } else { - result += ", "; - } - - if (element === null) { - result += "null"; - } else if (element === undefined) { - result += "undefined"; - } else { - result += element; - } - } - - result += "]"; - return result; - } -} diff --git a/src/misc/index.ts b/src/misc/index.ts deleted file mode 100644 index 2ec5695b..00000000 --- a/src/misc/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -/*! - * Copyright 2016 The ANTLR Project. All rights reserved. - * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. - */ - -export * from "./Array2DHashMap"; -export * from "./ArrayEqualityComparator"; -export * from "./Args"; -export * from "./Array2DHashSet"; -export * from "./Arrays"; -export * from "./BitSet"; -export * from "./Character"; -export * from "./DefaultEqualityComparator"; -// export * from "./DoubleKeyMap"; -export * from "./EqualityComparator"; -// export * from "./FlexibleHashMap"; -export * from "./IntegerList"; -export * from "./IntegerStack"; -export * from "./InterpreterDataReader"; -export * from "./Interval"; -export * from "./IntervalSet"; -export * from "./IntSet"; -// export * from "./LogManager"; -export * from "./MultiMap"; -export * from "./MurmurHash"; -export * from "./ObjectEqualityComparator"; -// export * from "./OrderedHashSet"; -export * from "./ParseCancellationException"; -// export * from "./RuleDependencyChecker"; -// export * from "./RuleDependencyProcessor"; -export * from "./Utils"; -export * from "./UUID"; diff --git a/src/tree/index.ts b/src/tree/index.ts deleted file mode 100644 index 90ef09c7..00000000 --- a/src/tree/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/*! - * Copyright 2016 The ANTLR Project. All rights reserved. - * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. - */ - -export * from "./AbstractParseTreeVisitor"; -export * from "./ErrorNode"; -export * from "./ParseTree"; -export * from "./ParseTreeListener"; -export * from "./ParseTreeProperty"; -export * from "./ParseTreeVisitor"; -export * from "./ParseTreeWalker"; -export * from "./RuleNode"; -export * from "./SyntaxTree"; -export * from "./TerminalNode"; -export * from "./Tree"; -export * from "./Trees"; diff --git a/src/tree/xpath/XPathLexer.g4 b/src/tree/xpath/XPathLexer.g4 deleted file mode 100644 index 95de92b4..00000000 --- a/src/tree/xpath/XPathLexer.g4 +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2016 The ANTLR Project. All rights reserved. - * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. - */ - -lexer grammar XPathLexer; - -tokens { TOKEN_REF, RULE_REF } - -/* -path : separator? word (separator word)* EOF ; - -separator - : '/' '!' - | '//' '!' - | '/' - | '//' - ; - -word: TOKEN_REF - | RULE_REF - | STRING - | '*' - ; -*/ - -ANYWHERE : '//' ; -ROOT : '/' ; -WILDCARD : '*' ; -BANG : '!' ; - -ID : NameStartChar NameChar* -{ -let text = this.text; -if (text.charAt(0) === text.charAt(0).toUpperCase()) { - this.type = XPathLexer.TOKEN_REF; -} else { - this.type = XPathLexer.RULE_REF; -} -} - ; - -fragment -NameChar : [\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nl}\p{Pc}\p{Nd}\p{Mc}\p{Mn}\p{Cf}\u0000-\u0008\u000E-\u001B\u007F-\u009F] - ; - -fragment -NameStartChar - : [\p{Ll}\p{Lm}\p{Lo}\p{Lt}\p{Lu}\p{Nl}] - ; - -STRING : '\'' .*? '\'' ; - -//WS : [ \t\r\n]+ -> skip ; - diff --git a/src/tree/xpath/index.ts b/src/tree/xpath/index.ts deleted file mode 100644 index e74c0815..00000000 --- a/src/tree/xpath/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -/*! - * Copyright 2016 The ANTLR Project. All rights reserved. - * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. - */ - -export * from "./XPath"; -export * from "./XPathElement"; -export * from "./XPathLexer"; -export * from "./XPathLexerErrorListener"; -export * from "./XPathRuleAnywhereElement"; -export * from "./XPathRuleElement"; -export * from "./XPathTokenAnywhereElement"; -export * from "./XPathTokenElement"; -export * from "./XPathWildcardAnywhereElement"; -export * from "./XPathWildcardElement"; diff --git a/target/src/package.json b/target/src/package.json deleted file mode 100644 index 5735a32f..00000000 --- a/target/src/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "antlr4ts", - "version": "0.5.0-dev", - "description": "ANTLR 4 runtime for JavaScript written in Typescript", - "main": "index.js", - "scripts": {}, - "repository": { - "type": "git", - "url": "git+https://github.com/tunnelvisionlabs/antlr4ts.git" - }, - "keywords": [ - "ANTLR4", - "typescript" - ], - "author": "Terence Parr, Sam Harwell, and Burt Harris", - "license": "BSD-3-Clause", - "bugs": { - "url": "https://github.com/tunnelvisionlabs/antlr4ts/issues" - }, - "homepage": "https://github.com/tunnelvisionlabs/antlr4ts#readme", - "devDependencies": {}, - "dependencies": {} -} diff --git a/test/TestTokenStream.ts b/test/TestTokenStream.ts deleted file mode 100644 index 199373f5..00000000 --- a/test/TestTokenStream.ts +++ /dev/null @@ -1,42 +0,0 @@ -/*! - * Copyright 2016 The ANTLR Project. All rights reserved. - * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. - */ - -import { BufferedTokenStream } from "../src/BufferedTokenStream"; -import { CharStreams } from "../src/CharStreams"; -import { Token } from "../src/Token"; -import { XPathLexer } from "../src/tree/xpath/XPathLexer"; - -import { suite, test } from "mocha-typescript"; - -import * as assert from "assert"; - -/** - * This class contains tests for specific API functionality in `TokenStream` and derived types. - */ -@suite -export class TestTokenStream { - - /** - * This is a targeted regression test for antlr/antlr4#1584 (`BufferedTokenStream` cannot be reused after EOF). - */ - @test - public testBufferedTokenStreamReuseAfterFill(): void { - let firstInput = CharStreams.fromString("A"); - let tokenStream = new BufferedTokenStream(new XPathLexer(firstInput)); - tokenStream.fill(); - assert.strictEqual(tokenStream.size, 2); - assert.strictEqual(tokenStream.get(0).type, XPathLexer.TOKEN_REF); - assert.strictEqual(tokenStream.get(1).type, Token.EOF); - - let secondInput = CharStreams.fromString("A/"); - tokenStream.tokenSource = new XPathLexer(secondInput); - tokenStream.fill(); - assert.strictEqual(tokenStream.size, 3); - assert.strictEqual(tokenStream.get(0).type, XPathLexer.TOKEN_REF); - assert.strictEqual(tokenStream.get(1).type, XPathLexer.ROOT); - assert.strictEqual(tokenStream.get(2).type, Token.EOF); - } - -} diff --git a/test/mocha.opts b/test/mocha.opts deleted file mode 100644 index f07c5b4e..00000000 --- a/test/mocha.opts +++ /dev/null @@ -1,3 +0,0 @@ ---require source-map-support/register ---recursive -target/test \ No newline at end of file diff --git a/test/package-lock.json b/test/package-lock.json new file mode 100644 index 00000000..697570ea --- /dev/null +++ b/test/package-lock.json @@ -0,0 +1,2187 @@ +{ + "name": "antlr4ts-test", + "version": "0.5.0-dev", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.8.3" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", + "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==", + "dev": true + }, + "@babel/highlight": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", + "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.0", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true + }, + "@types/eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", + "dev": true + }, + "@types/json-schema": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz", + "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==", + "dev": true + }, + "@types/mocha": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-7.0.2.tgz", + "integrity": "sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w==", + "dev": true + }, + "@types/node": { + "version": "13.11.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.11.1.tgz", + "integrity": "sha512-eWQGP3qtxwL8FGneRrC5DwrJLGN4/dH1clNTuLfN81HCrxVtxRjygDTUoZJ5ASlDEeo0ppYFQjQIlXhtXpOn6g==", + "dev": true + }, + "@types/std-mocks": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/std-mocks/-/std-mocks-1.0.0.tgz", + "integrity": "sha512-0PDd05AK/u41wFxr0ytOYhQz15uAhkmwe8fOp33UN506zGARdLVx/Yc/WSeGs+8zKjMMTp1vlB+OXGwD7HmImg==", + "dev": true + }, + "@typescript-eslint/eslint-plugin": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.28.0.tgz", + "integrity": "sha512-w0Ugcq2iatloEabQP56BRWJowliXUP5Wv6f9fKzjJmDW81hOTBxRoJ4LoEOxRpz9gcY51Libytd2ba3yLmSOfg==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "2.28.0", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^3.0.0", + "tsutils": "^3.17.1" + }, + "dependencies": { + "tsutils": { + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", + "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/eslint-plugin-tslint": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin-tslint/-/eslint-plugin-tslint-2.28.0.tgz", + "integrity": "sha512-a6cU6aJZa10sK6DybAtOdCV/tU1rWTTurBgYtyJb2DsG3BJwF6vYob9qOKw9n3MjV/F757LGqXz3RNmrvrimww==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "2.28.0", + "lodash": "^4.17.15" + } + }, + "@typescript-eslint/experimental-utils": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.28.0.tgz", + "integrity": "sha512-4SL9OWjvFbHumM/Zh/ZeEjUFxrYKtdCi7At4GyKTbQlrj1HcphIDXlje4Uu4cY+qzszR5NdVin4CCm6AXCjd6w==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/typescript-estree": "2.28.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + } + }, + "@typescript-eslint/parser": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.28.0.tgz", + "integrity": "sha512-RqPybRDquui9d+K86lL7iPqH6Dfp9461oyqvlXMNtap+PyqYbkY5dB7LawQjDzot99fqzvS0ZLZdfe+1Bt3Jgw==", + "dev": true, + "requires": { + "@types/eslint-visitor-keys": "^1.0.0", + "@typescript-eslint/experimental-utils": "2.28.0", + "@typescript-eslint/typescript-estree": "2.28.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.28.0.tgz", + "integrity": "sha512-HDr8MP9wfwkiuqzRVkuM3BeDrOC4cKbO5a6BymZBHUt5y/2pL0BXD6I/C/ceq2IZoHWhcASk+5/zo+dwgu9V8Q==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "eslint-visitor-keys": "^1.1.0", + "glob": "^7.1.6", + "is-glob": "^4.0.1", + "lodash": "^4.17.15", + "semver": "^6.3.0", + "tsutils": "^3.17.1" + }, + "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" + } + }, + "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" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "tsutils": { + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", + "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "acorn": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "dev": true + }, + "acorn-jsx": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", + "dev": true + }, + "ajv": { + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.1.tgz", + "integrity": "sha512-AUh2mDlJDAnzSRaKkMHopTD1GKwC1ApUq8oCzdjAOM5tavncgqWU+JoRu5Y3iYY0Q/euiU+1LWp0/O/QY8CcHw==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "opencollective-postinstall": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true + }, + "ansi-escapes": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "dev": true, + "requires": { + "type-fest": "^0.11.0" + }, + "dependencies": { + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + } + } + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "binary-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "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" + } + } + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + } + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "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" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.17.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", + "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.3", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.2", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^7.0.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.3", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "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" + } + }, + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "strip-json-comments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", + "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==", + "dev": true + } + } + }, + "eslint-plugin-prettier": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.3.tgz", + "integrity": "sha512-+HG5jmu/dN3ZV3T6eCD7a4BlAySdN7mLIbJYo0z1cFQuI+r2DiTJEFeF68ots93PsnrMxbzIZ2S/ieX+mkrBeQ==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-scope": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", + "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", + "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "dev": true + }, + "espree": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", + "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "fast-deep-equal": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "dev": true + }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "flat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", + "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "dev": true, + "requires": { + "is-buffer": "~2.0.3" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", + "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "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" + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "dev": true + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "has": { + "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.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "hosted-git-info": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "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 + }, + "inquirer": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz", + "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^3.0.0", + "cli-cursor": "^3.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.15", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.5.3", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-buffer": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "dev": true + }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "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": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2" + } + }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", + "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==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "mkdirp": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz", + "integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "mocha": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.1.tgz", + "integrity": "sha512-3qQsu3ijNS3GkWcccT5Zw0hf/rWvu1fTN9sPvEd81hlwsr30GX2GcDSSoBxo24IR8FelmrAydGC6/1J5QQP4WA==", + "dev": true, + "requires": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "chokidar": "3.3.0", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "3.0.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.3", + "ms": "2.1.1", + "node-environment-flags": "1.0.6", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node-environment-flags": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", + "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", + "dev": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + } + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + } + }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", + "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "opencollective-postinstall": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz", + "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==", + "dev": true + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true + }, + "pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "dev": true, + "requires": { + "picomatch": "^2.0.4" + } + }, + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "resolve": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.16.0.tgz", + "integrity": "sha512-LarL/PIKJvc09k1jaeT4kQb/8/7P+qV4qSnN2K80AES+OHdfZELAKVOBjxsvtToT/uLOfFbvYvKfZmV8cee7nA==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", + "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "rxjs": { + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz", + "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shell-quote": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", + "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", + "dev": true + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "source-map-support": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", + "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "std-mocks": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/std-mocks/-/std-mocks-1.0.1.tgz", + "integrity": "sha1-0ziIdte+66PHD72OK8r0brB9ef4=", + "dev": true, + "requires": { + "lodash": "^4.11.1" + } + }, + "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" + } + }, + "string.prototype.padend": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.0.tgz", + "integrity": "sha512-3aIv8Ffdp8EZj8iLwREGpQaUZiPyrWrpzMBHvkiSW/bK/EGve9np07Vwy7IJ5waydpGXzQZu/F8Oze2/IWkBaA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string.prototype.trimleft": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", + "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimstart": "^1.0.0" + } + }, + "string.prototype.trimright": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", + "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimend": "^1.0.0" + } + }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "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" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "tslib": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", + "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + }, + "typescript": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz", + "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "v8-compile-cache": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", + "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "dev": true, + "requires": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + } + } + } +} diff --git a/test/package.json b/test/package.json new file mode 100644 index 00000000..205b592a --- /dev/null +++ b/test/package.json @@ -0,0 +1,50 @@ +{ + "name": "antlr4ts-test", + "private": true, + "version": "0.5.0-dev", + "description": "ANTLR 4 test suite for JavaScript written in Typescript", + "scripts": { + "build": "npm run antlr && npm run tsc", + "antlr": "npm-run-all --parallel --aggregate-output antlr4ts-test-*", + "antlr4ts-test-runtime": "cd runtime && antlr4ts TestGrammar.g4 -o gen/typescript_only", + "antlr4ts-test-labels": "cd runtime/TestReferenceToListLabels && antlr4ts T.g4 -no-listener -o gen", + "antlr4ts-test-pattern": "cd tool && antlr4ts ParseTreeMatcherX1.g4 ParseTreeMatcherX2.g4 ParseTreeMatcherX3.g4 ParseTreeMatcherX4.g4 ParseTreeMatcherX5.g4 ParseTreeMatcherX6.g4 ParseTreeMatcherX7.g4 ParseTreeMatcherX8.g4 -no-listener -o gen/matcher", + "antlr4ts-test-rewriter": "cd tool && antlr4ts RewriterLexer1.g4 RewriterLexer2.g4 RewriterLexer3.g4 -o gen/rewriter", + "antlr4ts-test-xpath": "cd tool && antlr4ts TestXPath.g4 -no-listener -o gen/xpath", + "tsc": "tsc --build --verbose .", + "test": "mocha ." + }, + "repository": { + "type": "git", + "url": "git+https://github.com/tunnelvisionlabs/antlr4ts.git" + }, + "keywords": [ + "ANTLR4", + "typescript" + ], + "author": "Terence Parr, Sam Harwell, and Burt Harris", + "license": "BSD-3-Clause", + "bugs": { + "url": "https://github.com/tunnelvisionlabs/antlr4ts/issues" + }, + "homepage": "https://github.com/tunnelvisionlabs/antlr4ts#readme", + "devDependencies": { + "@types/mocha": "^7.0.2", + "@types/node": "^13.11.1", + "@types/std-mocks": "^1.0.0", + "@typescript-eslint/eslint-plugin": "^2.28.0", + "@typescript-eslint/eslint-plugin-tslint": "^2.28.0", + "@typescript-eslint/parser": "^2.28.0", + "antlr4ts-cli": "0.5.0-dev", + "eslint": "^6.8.0", + "eslint-plugin-prettier": "^3.1.3", + "mocha": "^7.1.1", + "npm-run-all": "^4.1.5", + "std-mocks": "^1.0.1", + "typescript": "^3.8.3" + }, + "dependencies": { + "antlr4ts": "0.5.0-dev", + "source-map-support": "^0.5.16" + } +} diff --git a/test/runtime/BaseTest.ts b/test/runtime/BaseTest.ts index 4867b63b..e5693187 100644 --- a/test/runtime/BaseTest.ts +++ b/test/runtime/BaseTest.ts @@ -5,19 +5,22 @@ import * as assert from "assert"; import * as stdMocks from "std-mocks"; -import { Console } from "console"; -import { CharStream } from "antlr4ts/CharStream"; -import { CharStreams } from "antlr4ts/CharStreams"; -import { CommonTokenStream } from "antlr4ts/CommonTokenStream"; -import { DiagnosticErrorListener } from "antlr4ts/DiagnosticErrorListener"; -import { Lexer } from "antlr4ts/Lexer"; -import { Parser } from "antlr4ts/Parser"; -import { ParserRuleContext } from "antlr4ts/ParserRuleContext"; -import { ParseTree } from "antlr4ts/tree/ParseTree"; -import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener"; -import { ParseTreeWalker } from "antlr4ts/tree/ParseTreeWalker"; -import { RuleNode } from "antlr4ts/tree/RuleNode"; +import { + CharStream, + CharStreams, + CommonTokenStream, + DiagnosticErrorListener, + Lexer, + ParseTree, + ParseTreeListener, + ParseTreeWalker, + Parser, + ParserRuleContext, + RuleNode +} from "antlr4ts"; + +import { Console } from "console"; function trySetConsole(valueFactory: () => Console): boolean { try { @@ -33,8 +36,8 @@ function trySetConsole(valueFactory: () => Console): boolean { } } -function expectConsole( expectedOutput: string, expectedErrors: string, testFunction: () => void ) { - let priorConsole = console; +function expectConsole(expectedOutput: string, expectedErrors: string, testFunction: () => void): void { + const priorConsole = console; try { trySetConsole(() => new Console({ stdout: process.stdout, stderr: process.stderr, colorMode: false })); stdMocks.use(); @@ -43,9 +46,9 @@ function expectConsole( expectedOutput: string, expectedErrors: string, testFunc stdMocks.restore(); trySetConsole(() => priorConsole); } - let streams = stdMocks.flush(); + const streams = stdMocks.flush(); let output = streams.stdout.join(""); - let errors = streams.stderr.join(""); + const errors = streams.stderr.join(""); // Fixup for small behavioral difference at EOF... if (output.length === expectedOutput.length - 1 && output[output.length - 1] !== "\n") { @@ -58,7 +61,7 @@ function expectConsole( expectedOutput: string, expectedErrors: string, testFunc export interface LexerTestOptions { testName: string; - lexer: new(s: CharStream) => Lexer; + lexer: new (s: CharStream) => Lexer; input: string; expectedOutput: string; expectedErrors: string; @@ -66,7 +69,7 @@ export interface LexerTestOptions { } export interface ParserTestOptions extends LexerTestOptions { - parser: new(s: CommonTokenStream) => TParser; + parser: new (s: CommonTokenStream) => TParser; parserStartRule: (parser: TParser) => ParseTree; debug: boolean; } @@ -74,7 +77,7 @@ export interface ParserTestOptions extends LexerTestOpti class TreeShapeListener implements ParseTreeListener { public enterEveryRule(ctx: ParserRuleContext): void { for (let i = 0; i < ctx.childCount; i++) { - let parent = ctx.getChild(i).parent; + const parent = ctx.getChild(i).parent; if (!(parent instanceof RuleNode) || parent.ruleContext !== ctx) { throw new Error("Invalid parse tree shape detected."); } @@ -82,11 +85,11 @@ class TreeShapeListener implements ParseTreeListener { } } -export function lexerTest(options: LexerTestOptions) { +export function lexerTest(options: LexerTestOptions): void { const inputStream: CharStream = CharStreams.fromString(options.input); const lex = new options.lexer(inputStream); const tokens = new CommonTokenStream(lex); - expectConsole( options.expectedOutput, options.expectedErrors, () => { + expectConsole(options.expectedOutput, options.expectedErrors, () => { tokens.fill(); tokens.getTokens().forEach((t) => console.log(t.toString())); if (options.showDFA) { @@ -95,7 +98,7 @@ export function lexerTest(options: LexerTestOptions) { }); } -export function parserTest(options: ParserTestOptions) { +export function parserTest(options: ParserTestOptions): void { const inputStream: CharStream = CharStreams.fromString(options.input); const lex = new options.lexer(inputStream); const tokens = new CommonTokenStream(lex); @@ -106,7 +109,7 @@ export function parserTest(options: ParserTestOptions { + expectConsole(options.expectedOutput, options.expectedErrors, () => { const tree = options.parserStartRule(parser); ParseTreeWalker.DEFAULT.walk(new TreeShapeListener(), tree); }); diff --git a/test/runtime/tsconfig.json b/test/runtime/tsconfig.json deleted file mode 100644 index f8c501f5..00000000 --- a/test/runtime/tsconfig.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "compilerOptions": { - "outDir": "../../target/test/runtime", - "sourceMap": true, - "module": "commonjs", - "target": "es2015", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "strictNullChecks": true, - "experimentalDecorators": true, - "declaration": false, - "preserveConstEnums": true, - "typeRoots": [ - "./node_modules/@types" - ], - "types": [ - "node" - ] - }, - "include": [ - "**/*.ts" - ], - "exclude": [ - "node_modules" - ] -} diff --git a/test/TestArray2DHashSet.ts b/test/src/TestArray2DHashSet.ts similarity index 66% rename from test/TestArray2DHashSet.ts rename to test/src/TestArray2DHashSet.ts index 51c92b80..086d8698 100644 --- a/test/TestArray2DHashSet.ts +++ b/test/src/TestArray2DHashSet.ts @@ -3,17 +3,15 @@ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. */ -import {Equatable} from "../src/misc/Stubs"; -import {Array2DHashSet} from "../src/misc/Array2DHashSet"; -import {MurmurHash} from "../src/misc/MurmurHash"; -import { suite, test } from "mocha-typescript"; import * as assert from "assert"; -class EquatableTest implements Equatable { +import { Array2DHashSet, MurmurHash } from "antlr4ts"; - constructor( public a: string, public b: string ){} +class EquatableTest { - public equals(o: any) { + constructor(public a: string, public b: string) { } + + public equals(o: object): boolean { if (this === o) { return true; } @@ -23,7 +21,7 @@ class EquatableTest implements Equatable { return false; } - public hashCode() { + public hashCode(): number { // this currently generates a Typescript error because strings aren't Equatable return MurmurHash.hashCode([this.a, this.b], 5280); } @@ -36,18 +34,18 @@ const beta = new EquatableTest("beta", "1"); describe("EquatableTest", () => { it("should respect identity", () => { - assert( alpha.equals(alpha)); - assert( alpha_again.equals(alpha_again)); - assert( beta.equals(beta)); + assert(alpha.equals(alpha)); + assert(alpha_again.equals(alpha_again)); + assert(beta.equals(beta)); }); it("should compare equality by value", () => { - assert( alpha.equals(alpha_again)); - assert( alpha_again.equals(alpha)); + assert(alpha.equals(alpha_again)); + assert(alpha_again.equals(alpha)); }); it("should detect difference by value", () => { - assert( !alpha.equals(beta)); + assert(!alpha.equals(beta)); }); it("should hash identical values the same", () => { @@ -65,10 +63,10 @@ describe("Array2DHashSet", () => { beforeEach(() => { set = new Array2DHashSet(); }); it("shoud count entities", () => { - assert( set.isEmpty ); - assert.strictEqual( set.size, 0 ); + assert(set.isEmpty); + assert.strictEqual(set.size, 0); set.add(alpha); - assert( !set.isEmpty); + assert(!set.isEmpty); assert.strictEqual(set.size, 1); set.add(beta); assert.strictEqual(set.size, 2); @@ -82,14 +80,3 @@ describe("Array2DHashSet", () => { assert(!set.contains(beta), "value difference ignored"); }); }); - -// -// This exercises the mocha-typescript package's ability to -// use more object-oriented test structure using decorators. -// -@suite class DecoratorDriven { - @test - public "Comparison by value"() { - assert(alpha.equals(alpha_again)); - } -} diff --git a/test/TestBitSet.ts b/test/src/TestBitSet.ts similarity index 89% rename from test/TestBitSet.ts rename to test/src/TestBitSet.ts index ab71de57..df3c67cd 100644 --- a/test/TestBitSet.ts +++ b/test/src/TestBitSet.ts @@ -4,7 +4,8 @@ */ import * as assert from "assert"; -import { BitSet } from "../src/misc/BitSet"; + +import { BitSet } from "antlr4ts"; describe("BitSet Tests", () => { const empty = new BitSet(); @@ -13,7 +14,7 @@ describe("BitSet Tests", () => { evens.set(i); } - const primes = new BitSet( [3, 2, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, + const primes = new BitSet([3, 2, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]); describe("empty", () => { @@ -50,11 +51,11 @@ describe("BitSet Tests", () => { }); it("equals itself", () => { - assert( !empty.equals([1, 3])); + assert(!empty.equals([1, 3])); }); - it("equals itself", () => { - assert( empty.equals(empty)); + it("empty equals itself", () => { + assert(empty.equals(empty)); }); it("equals oversize", () => { @@ -133,19 +134,19 @@ describe("BitSet Tests", () => { describe("evens", () => { it("has bits set", () => { for (let i = 0; i < 100; i += 2) { - assert.strictEqual( evens.get(i), true ); + assert.strictEqual(evens.get(i), true); } - }); + }); it("has bits clear", () => { for (let i = 1; i < 100; i += 2) { - assert.strictEqual( evens.get(i), false ); + assert.strictEqual(evens.get(i), false); } }); it("JavaScript style iteration works", () => { let count = 0; - for (let n of evens) { + for (const n of evens) { assert.strictEqual(n % 2, 0); count++; } @@ -164,16 +165,16 @@ describe("BitSet Tests", () => { }); it("copy constructor", () => { - const a = new BitSet( evens ); + const a = new BitSet(evens); for (let i = 0; i < 100; i += 2) { - assert.strictEqual( a.get(i), true ); + assert.strictEqual(a.get(i), true); } for (let i = 1; i < 100; i += 2) { - assert.strictEqual( a.get(i), false ); + assert.strictEqual(a.get(i), false); } }); - it ("set bits and clear bits", () => { + it("set bits and clear bits", () => { assert.strictEqual(evens.nextSetBit(60), 60); assert.strictEqual(evens.nextSetBit(61), 62); assert.strictEqual(evens.nextClearBit(60), 61); @@ -185,7 +186,7 @@ describe("BitSet Tests", () => { }); it("lengthy bit scans", () => { - let a = new BitSet([50, 70, 90]); + const a = new BitSet([50, 70, 90]); a.clear(90); assert.strictEqual(a.nextSetBit(0), 50); assert.strictEqual(a.nextSetBit(51), 70); @@ -196,7 +197,7 @@ describe("BitSet Tests", () => { it("lengthy bit scans", () => { - let a = new BitSet([50, 70, 90]); + const a = new BitSet([50, 70, 90]); a.clear(90); a.flip(0, 100); assert.strictEqual(a.nextClearBit(0), 50); @@ -211,7 +212,7 @@ describe("BitSet Tests", () => { describe("primes", () => { it("length()", () => { assert.strictEqual(primes.length(), 98); - }); + }); it("cardinality()", () => { assert.strictEqual(primes.cardinality(), 25); }); @@ -227,9 +228,9 @@ describe("BitSet Tests", () => { assert.strictEqual(a.get(2), true); assert.strictEqual(a.get(9), false); assert.strictEqual(a.toString(), "{2}"); - assert( !a.intersects(empty)); - assert( a.intersects(evens)); - assert( a.intersects(primes)); + assert(!a.intersects(empty)); + assert(a.intersects(evens)); + assert(a.intersects(primes)); }); it("or operation", () => { @@ -274,12 +275,12 @@ describe("BitSet Tests", () => { }); it("primes and composites isEmpty", () => { - let a = primes.clone(); + const a = primes.clone(); a.and(composites); assert(a.isEmpty); }); - it ("primes and composites do not intersect", () => { + it("primes and composites do not intersect", () => { assert(!primes.intersects(composites)); }); @@ -291,9 +292,9 @@ describe("BitSet Tests", () => { const ninetySeven = new BitSet(primes); ninetySeven.and(ninetys); assert.strictEqual(ninetySeven.toString(), "{97}"); - assert( ninetySeven.equals( new BitSet([97]))); - assert( !ninetySeven.equals( primes )); - assert( !ninetySeven.equals( empty )); + assert(ninetySeven.equals(new BitSet([97]))); + assert(!ninetySeven.equals(primes)); + assert(!ninetySeven.equals(empty)); }); @@ -351,7 +352,7 @@ describe("BitSet Tests", () => { describe("error cases", () => { const dummy = evens.clone(); it("constructor throws", () => { - assert.throws(() => { let a = new BitSet(-1); }); + assert.throws(() => { const a = new BitSet(-1); }); }); it("other throws", () => { diff --git a/test/TestMurmurHash.ts b/test/src/TestMurmurHash.ts similarity index 55% rename from test/TestMurmurHash.ts rename to test/src/TestMurmurHash.ts index 5bcc4951..a6df7ec8 100644 --- a/test/TestMurmurHash.ts +++ b/test/src/TestMurmurHash.ts @@ -3,38 +3,28 @@ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. */ -import { MurmurHash } from "../src/misc/MurmurHash"; - -import { suite, test } from "mocha-typescript"; - import * as assert from "assert"; -@suite -export class TestMurmurHash { +import { MurmurHash } from "antlr4ts"; - @test - public testMurmurHash_Empty(): void { +describe("MurmurHash", function () { + it("Empty", function () { assert.strictEqual(0, MurmurHash.hashCode([], 0)); - } + }) - @test - public testMurmurHash_EmptyWithSeed(): void { + it("EmptyWithSeed", function () { assert.strictEqual(1364076727, MurmurHash.hashCode([], 1)); - } + }) - @test - public testMurmurHash_Single(): void { + it("Single", function () { assert.strictEqual(593689054, MurmurHash.hashCode([0], 0)); - } + }) - @test - public testMurmurHash_SingleWithSeed(): void { + it("SingleWithSeed", function () { assert.strictEqual(2028806445, MurmurHash.hashCode([0], 1)); - } + }) - @test - public testMurmurHash_Multiple(): void { + it("Multiple", function () { assert.strictEqual(987256456, MurmurHash.hashCode([0, 1], 0)); - } - -} + }) +}) diff --git a/test/src/TestTokenStream.ts b/test/src/TestTokenStream.ts new file mode 100644 index 00000000..dc0a3bf1 --- /dev/null +++ b/test/src/TestTokenStream.ts @@ -0,0 +1,32 @@ +/*! + * Copyright 2016 The ANTLR Project. All rights reserved. + * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. + */ + +import * as assert from "assert"; + +import { BufferedTokenStream, CharStreams, Token, XPathLexer } from "antlr4ts"; + +/** + * This class contains tests for specific API functionality in `TokenStream` and derived types. + */ +/** + * This is a targeted regression test for antlr/antlr4#1584 (`BufferedTokenStream` cannot be reused after EOF). + */ + +it("testBufferedTokenStreamReuseAfterFill", function () { + const firstInput = CharStreams.fromString("A"); + const tokenStream = new BufferedTokenStream(new XPathLexer(firstInput)); + tokenStream.fill(); + assert.strictEqual(tokenStream.size, 2); + assert.strictEqual(tokenStream.get(0).type, XPathLexer.TOKEN_REF); + assert.strictEqual(tokenStream.get(1).type, Token.EOF); + + const secondInput = CharStreams.fromString("A/"); + tokenStream.tokenSource = new XPathLexer(secondInput); + tokenStream.fill(); + assert.strictEqual(tokenStream.size, 3); + assert.strictEqual(tokenStream.get(0).type, XPathLexer.TOKEN_REF); + assert.strictEqual(tokenStream.get(1).type, XPathLexer.ROOT); + assert.strictEqual(tokenStream.get(2).type, Token.EOF); +}) diff --git a/test/tool/TestCharStreams.ts b/test/tool/TestCharStreams.ts index 11543331..b78297b9 100644 --- a/test/tool/TestCharStreams.ts +++ b/test/tool/TestCharStreams.ts @@ -4,27 +4,25 @@ */ import * as assert from "assert"; -import { test, suite } from "mocha-typescript"; -import { CharStream } from "../../src/CharStream"; -import { CharStreams } from "../../src/CharStreams"; - -@suite -export class TestCharStreams { - @test - public fromBMPStringHasExpectedSize(): void { - let s: CharStream = CharStreams.fromString("hello"); + +import { CharStream } from "antlr4ts"; +import { CharStreams } from "antlr4ts"; + +describe("CharStreams", function () { + + it("fromBMPStringHasExpectedSize", function () { + const s: CharStream = CharStreams.fromString("hello"); assert.strictEqual(5, s.size); assert.strictEqual(0, s.index); assert.strictEqual("hello", s.toString()); - } + }); - @test - public fromSMPStringHasExpectedSize(): void { - let s: CharStream = CharStreams.fromString("hello 🌎"); + it("fromSMPStringHasExpectedSize", function () { + const s: CharStream = CharStreams.fromString("hello 🌎"); assert.strictEqual(7, s.size); assert.strictEqual(0, s.index); assert.strictEqual("hello 🌎", s.toString()); - } + }); // @test // public fromBMPUTF8PathHasExpectedSize(): void { @@ -226,4 +224,4 @@ export class TestCharStreams { // assert.strictEqual("hello 🌎", s.toString()); // assert.strictEqual(p.toString(), s.sourceName); // } -} +}); diff --git a/test/tool/TestCodePointCharStream.ts b/test/tool/TestCodePointCharStream.ts index 2da8f31e..1956c2d8 100644 --- a/test/tool/TestCodePointCharStream.ts +++ b/test/tool/TestCodePointCharStream.ts @@ -4,268 +4,268 @@ */ import * as assert from "assert"; -import { test, suite } from "mocha-typescript"; -import { CharStreams } from "../../src/CharStreams"; -import { CodePointCharStream } from "../../src/CodePointCharStream"; -import { Interval } from "../../src/misc/Interval"; -import { IntStream } from "../../src/IntStream"; - -@suite -export class TestCodePointCharStream { - @test - public emptyBytesHasSize0(): void { - let s: CodePointCharStream = CharStreams.fromString(""); + +import { CharStreams } from "antlr4ts"; +import { CodePointCharStream } from "antlr4ts"; +import { IntStream } from "antlr4ts"; +import { Interval } from "antlr4ts"; + +describe("TestCodePointCharStream", function () { + + it("emptyBytesHasSize0", function () { + + const s: CodePointCharStream = CharStreams.fromString(""); assert.strictEqual(0, s.size); assert.strictEqual(0, s.index); assert.strictEqual("", s.toString()); - } + }) + + it("emptyBytesLookAheadReturnsEOF", function () { - @test - public emptyBytesLookAheadReturnsEOF(): void { - let s: CodePointCharStream = CharStreams.fromString(""); + const s: CodePointCharStream = CharStreams.fromString(""); assert.strictEqual(IntStream.EOF, s.LA(1)); assert.strictEqual(0, s.index); - } + }) - @test - public consumingEmptyStreamShouldThrow(): void { - let s: CodePointCharStream = CharStreams.fromString(""); + it("consumingEmptyStreamShouldThrow", function () { + + const s: CodePointCharStream = CharStreams.fromString(""); assert.throws(() => s.consume(), RangeError, "cannot consume EOF"); - } + }) + + it("singleLatinCodePointHasSize1", function () { - @test - public singleLatinCodePointHasSize1(): void { - let s: CodePointCharStream = CharStreams.fromString("X"); + const s: CodePointCharStream = CharStreams.fromString("X"); assert.strictEqual(1, s.size); - } + }) + + it("consumingSingleLatinCodePointShouldMoveIndex", function () { - @test - public consumingSingleLatinCodePointShouldMoveIndex(): void { - let s: CodePointCharStream = CharStreams.fromString("X"); + const s: CodePointCharStream = CharStreams.fromString("X"); assert.strictEqual(0, s.index); s.consume(); assert.strictEqual(1, s.index); - } + }) - @test - public consumingPastSingleLatinCodePointShouldThrow(): void { - let s: CodePointCharStream = CharStreams.fromString("X"); + it("consumingPastSingleLatinCodePointShouldThrow", function () { + + const s: CodePointCharStream = CharStreams.fromString("X"); s.consume(); assert.throws(() => s.consume(), RangeError, "cannot consume EOF"); - } + }) + + it("singleLatinCodePointLookAheadShouldReturnCodePoint", function () { - @test - public singleLatinCodePointLookAheadShouldReturnCodePoint(): void { - let s: CodePointCharStream = CharStreams.fromString("X"); + const s: CodePointCharStream = CharStreams.fromString("X"); assert.strictEqual("X".charCodeAt(0), s.LA(1)); assert.strictEqual(0, s.index); - } + }) - @test - public multipleLatinCodePointsLookAheadShouldReturnCodePoints(): void { - let s: CodePointCharStream = CharStreams.fromString("XYZ"); + it("multipleLatinCodePointsLookAheadShouldReturnCodePoints", function () { + + const s: CodePointCharStream = CharStreams.fromString("XYZ"); assert.strictEqual("X".charCodeAt(0), s.LA(1)); assert.strictEqual(0, s.index); assert.strictEqual("Y".charCodeAt(0), s.LA(2)); assert.strictEqual(0, s.index); assert.strictEqual("Z".charCodeAt(0), s.LA(3)); assert.strictEqual(0, s.index); - } + }) + + it("singleLatinCodePointLookAheadPastEndShouldReturnEOF", function () { - @test - public singleLatinCodePointLookAheadPastEndShouldReturnEOF(): void { - let s: CodePointCharStream = CharStreams.fromString("X"); + const s: CodePointCharStream = CharStreams.fromString("X"); assert.strictEqual(IntStream.EOF, s.LA(2)); - } + }) + + it("singleCJKCodePointHasSize1", function () { - @test - public singleCJKCodePointHasSize1(): void { - let s: CodePointCharStream = CharStreams.fromString("愛"); + const s: CodePointCharStream = CharStreams.fromString("愛"); assert.strictEqual(1, s.size); assert.strictEqual(0, s.index); - } + }) - @test - public consumingSingleCJKCodePointShouldMoveIndex(): void { - let s: CodePointCharStream = CharStreams.fromString("愛"); + it("consumingSingleCJKCodePointShouldMoveIndex", function () { + + const s: CodePointCharStream = CharStreams.fromString("愛"); assert.strictEqual(0, s.index); s.consume(); assert.strictEqual(1, s.index); - } + }) + + it("consumingPastSingleCJKCodePointShouldThrow", function () { - @test - public consumingPastSingleCJKCodePointShouldThrow(): void { - let s: CodePointCharStream = CharStreams.fromString("愛"); + const s: CodePointCharStream = CharStreams.fromString("愛"); s.consume(); assert.throws(() => s.consume(), RangeError, "cannot consume EOF"); - } + }) - @test - public singleCJKCodePointLookAheadShouldReturnCodePoint(): void { - let s: CodePointCharStream = CharStreams.fromString("愛"); + it("singleCJKCodePointLookAheadShouldReturnCodePoint", function () { + + const s: CodePointCharStream = CharStreams.fromString("愛"); assert.strictEqual(0x611B, s.LA(1)); assert.strictEqual(0, s.index); - } + }) + + it("singleCJKCodePointLookAheadPastEndShouldReturnEOF", function () { - @test - public singleCJKCodePointLookAheadPastEndShouldReturnEOF(): void { - let s: CodePointCharStream = CharStreams.fromString("愛"); + const s: CodePointCharStream = CharStreams.fromString("愛"); assert.strictEqual(IntStream.EOF, s.LA(2)); assert.strictEqual(0, s.index); - } + }) + + it("singleEmojiCodePointHasSize1", function () { - @test - public singleEmojiCodePointHasSize1(): void { - let s: CodePointCharStream = CharStreams.fromString("💩"); + const s: CodePointCharStream = CharStreams.fromString("💩"); assert.strictEqual(1, s.size); assert.strictEqual(0, s.index); - } + }) - @test - public consumingSingleEmojiCodePointShouldMoveIndex(): void { - let s: CodePointCharStream = CharStreams.fromString("💩"); + it("consumingSingleEmojiCodePointShouldMoveIndex", function () { + + const s: CodePointCharStream = CharStreams.fromString("💩"); assert.strictEqual(0, s.index); s.consume(); assert.strictEqual(1, s.index); - } + }) + + it("consumingPastEndOfEmojiCodePointWithShouldThrow", function () { - @test - public consumingPastEndOfEmojiCodePointWithShouldThrow(): void { - let s: CodePointCharStream = CharStreams.fromString("💩"); + const s: CodePointCharStream = CharStreams.fromString("💩"); assert.strictEqual(0, s.index); s.consume(); assert.strictEqual(1, s.index); assert.throws(() => s.consume(), RangeError, "cannot consume EOF"); - } + }) - @test - public singleEmojiCodePointLookAheadShouldReturnCodePoint(): void { - let s: CodePointCharStream = CharStreams.fromString("💩"); + it("singleEmojiCodePointLookAheadShouldReturnCodePoint", function () { + + const s: CodePointCharStream = CharStreams.fromString("💩"); assert.strictEqual(0x1F4A9, s.LA(1)); assert.strictEqual(0, s.index); - } + }) + + it("singleEmojiCodePointLookAheadPastEndShouldReturnEOF", function () { - @test - public singleEmojiCodePointLookAheadPastEndShouldReturnEOF(): void { - let s: CodePointCharStream = CharStreams.fromString("💩"); + const s: CodePointCharStream = CharStreams.fromString("💩"); assert.strictEqual(IntStream.EOF, s.LA(2)); assert.strictEqual(0, s.index); - } + }) + + it("getTextWithLatin", function () { - @test - public getTextWithLatin(): void { - let s: CodePointCharStream = CharStreams.fromString("0123456789"); + const s: CodePointCharStream = CharStreams.fromString("0123456789"); assert.strictEqual("34567", s.getText(Interval.of(3, 7))); - } + }) - @test - public getTextWithCJK(): void { - let s: CodePointCharStream = CharStreams.fromString("01234䂔6789"); + it("getTextWithCJK", function () { + + const s: CodePointCharStream = CharStreams.fromString("01234䂔6789"); assert.strictEqual("34䂔67", s.getText(Interval.of(3, 7))); - } + }) + + it("getTextWithEmoji", function () { - @test - public getTextWithEmoji(): void { - let s: CodePointCharStream = CharStreams.fromString("01234🔢6789"); + const s: CodePointCharStream = CharStreams.fromString("01234🔢6789"); assert.strictEqual("34🔢67", s.getText(Interval.of(3, 7))); - } + }) - @test - public toStringWithLatin(): void { - let s: CodePointCharStream = CharStreams.fromString("0123456789"); + it("toStringWithLatin", function () { + + const s: CodePointCharStream = CharStreams.fromString("0123456789"); assert.strictEqual("0123456789", s.toString()); - } + }) + + it("toStringWithCJK", function () { - @test - public toStringWithCJK(): void { - let s: CodePointCharStream = CharStreams.fromString("01234䂔6789"); + const s: CodePointCharStream = CharStreams.fromString("01234䂔6789"); assert.strictEqual("01234䂔6789", s.toString()); - } + }) + + it("toStringWithEmoji", function () { - @test - public toStringWithEmoji(): void { - let s: CodePointCharStream = CharStreams.fromString("01234🔢6789"); + const s: CodePointCharStream = CharStreams.fromString("01234🔢6789"); assert.strictEqual("01234🔢6789", s.toString()); - } + }) - @test - public lookAheadWithLatin(): void { - let s: CodePointCharStream = CharStreams.fromString("0123456789"); + it("lookAheadWithLatin", function () { + + const s: CodePointCharStream = CharStreams.fromString("0123456789"); assert.strictEqual("5".charCodeAt(0), s.LA(6)); - } + }) + + it("lookAheadWithCJK", function () { - @test - public lookAheadWithCJK(): void { - let s: CodePointCharStream = CharStreams.fromString("01234䂔6789"); + const s: CodePointCharStream = CharStreams.fromString("01234䂔6789"); assert.strictEqual(0x4094, s.LA(6)); - } + }) - @test - public lookAheadWithEmoji(): void { - let s: CodePointCharStream = CharStreams.fromString("01234🔢6789"); + it("lookAheadWithEmoji", function () { + + const s: CodePointCharStream = CharStreams.fromString("01234🔢6789"); assert.strictEqual(0x1F522, s.LA(6)); - } + }) + + it("seekWithLatin", function () { - @test - public seekWithLatin(): void { - let s: CodePointCharStream = CharStreams.fromString("0123456789"); + const s: CodePointCharStream = CharStreams.fromString("0123456789"); s.seek(5); assert.strictEqual("5".charCodeAt(0), s.LA(1)); - } + }) + + it("seekWithCJK", function () { - @test - public seekWithCJK(): void { - let s: CodePointCharStream = CharStreams.fromString("01234䂔6789"); + const s: CodePointCharStream = CharStreams.fromString("01234䂔6789"); s.seek(5); assert.strictEqual(0x4094, s.LA(1)); - } + }) - @test - public seekWithEmoji(): void { - let s: CodePointCharStream = CharStreams.fromString("01234🔢6789"); + it("seekWithEmoji", function () { + + const s: CodePointCharStream = CharStreams.fromString("01234🔢6789"); s.seek(5); assert.strictEqual(0x1F522, s.LA(1)); - } + }) + + it("lookBehindWithLatin", function () { - @test - public lookBehindWithLatin(): void { - let s: CodePointCharStream = CharStreams.fromString("0123456789"); + const s: CodePointCharStream = CharStreams.fromString("0123456789"); s.seek(6); assert.strictEqual("5".charCodeAt(0), s.LA(-1)); - } + }) - @test - public lookBehindWithCJK(): void { - let s: CodePointCharStream = CharStreams.fromString("01234䂔6789"); + it("lookBehindWithCJK", function () { + + const s: CodePointCharStream = CharStreams.fromString("01234䂔6789"); s.seek(6); assert.strictEqual(0x4094, s.LA(-1)); - } + }) + + it("lookBehindWithEmoji", function () { - @test - public lookBehindWithEmoji(): void { - let s: CodePointCharStream = CharStreams.fromString("01234🔢6789"); + const s: CodePointCharStream = CharStreams.fromString("01234🔢6789"); s.seek(6); assert.strictEqual(0x1F522, s.LA(-1)); - } + }) + + it("asciiContentsShouldUse8BitBuffer", function () { - @test - public asciiContentsShouldUse8BitBuffer(): void { - let s: CodePointCharStream = CharStreams.fromString("hello"); + const s: CodePointCharStream = CharStreams.fromString("hello"); assert.strictEqual(true, s.internalStorage instanceof Uint8Array); assert.strictEqual(5, s.size); - } + }) - @test - public bmpContentsShouldUse16BitBuffer(): void { - let s: CodePointCharStream = CharStreams.fromString("hello 世界"); + it("bmpContentsShouldUse16BitBuffer", function () { + + const s: CodePointCharStream = CharStreams.fromString("hello 世界"); assert.strictEqual(true, s.internalStorage instanceof Uint16Array); assert.strictEqual(8, s.size); - } + }) + + it("smpContentsShouldUse32BitBuffer", function () { - @test - public smpContentsShouldUse32BitBuffer(): void { - let s: CodePointCharStream = CharStreams.fromString("hello 🌍"); + const s: CodePointCharStream = CharStreams.fromString("hello 🌍"); assert.strictEqual(true, s.internalStorage instanceof Int32Array); assert.strictEqual(7, s.size); - } -} + }) +}) diff --git a/test/tool/TestGraphNodes.ts b/test/tool/TestGraphNodes.ts index f018d2bc..73f4c40a 100644 --- a/test/tool/TestGraphNodes.ts +++ b/test/tool/TestGraphNodes.ts @@ -6,69 +6,143 @@ // ConvertTo-TS run at 2016-10-04T11:27:11.1463816-07:00 import * as assert from "assert"; -import assertEquals = assert.strictEqual; -import { test as Test, suite } from "mocha-typescript"; -import { PredictionContext } from "../../src/atn/PredictionContext"; -import { PredictionContextCache } from "../../src/atn/PredictionContextCache"; +import { PredictionContext, PredictionContextCache } from "antlr4ts"; + +import assertEquals = assert.strictEqual; /// Assuming that IdentityHashMap == Map; -@suite -export class TestGraphNodes { - private contextCache: PredictionContextCache = new PredictionContextCache(); +function toDOTString(context: PredictionContext): string { + let nodes = ""; + let edges = ""; + const visited = new Map(); + const contextIds = new Map(); + const workList = new Array(); + visited.set(context, context); + contextIds.set(context, contextIds.size); + workList.push(context); + for (let current = workList.pop(); current; current = workList.pop()) { + nodes += (" s") + (contextIds.get(current)) + ("["); + + if (current.size > 1) { + nodes += ("shape=record, "); + } + + nodes += ("label=\""); - public rootIsWildcard(): boolean { return true; } - public fullCtx(): boolean { return false; } + if (current.isEmpty) { + nodes += (PredictionContext.isEmptyLocal(current) ? "*" : "$"); + } else if (current.size > 1) { + for (let i = 0; i < current.size; i++) { + if (i > 0) { + nodes += ("|"); + } - @Test public test_properties(): void { + nodes += (""); + if (current.getReturnState(i) === PredictionContext.EMPTY_FULL_STATE_KEY) { + nodes += ("$"); + } + else if (current.getReturnState(i) === PredictionContext.EMPTY_LOCAL_STATE_KEY) { + nodes += ("*"); + } + } + } else { + nodes += (contextIds.get(current)); + } + + nodes += ("\"];\n"); + + for (let i = 0; i < current.size; i++) { + if (current.getReturnState(i) === PredictionContext.EMPTY_FULL_STATE_KEY + || current.getReturnState(i) === PredictionContext.EMPTY_LOCAL_STATE_KEY) { + continue; + } + + const visitedSize = visited.size; + visited.set(current.getParent(i), current.getParent(i)); + if (visited.size > visitedSize) { + contextIds.set(current.getParent(i), contextIds.size); + workList.push(current.getParent(i)); + } + + edges += (" s") + (contextIds.get(current)); + if (current.size > 1) { + edges += (":p") + (i); + } + + edges += ("->"); + edges += ("s") + (contextIds.get(current.getParent(i))); + edges += ("[label=\"") + (current.getReturnState(i)) + ("\"]"); + edges += (";\n"); + } + } + + let builder = ""; + builder += ("digraph G {\n"); + builder += ("rankdir=LR;\n"); + builder += (nodes); + builder += (edges); + builder += ("}\n"); + return builder; +} + +describe("TestGraphNodes", function () { + const contextCache: PredictionContextCache = new PredictionContextCache(); + + function rootIsWildcard(): boolean { return true; } + function fullCtx(): boolean { return false; } + + + + it("test_properties", function () { assert.notStrictEqual(PredictionContext.EMPTY_LOCAL, null); assert.notStrictEqual(PredictionContext.EMPTY_LOCAL, undefined); assert.notStrictEqual(PredictionContext.EMPTY_FULL, null); assert.notStrictEqual(PredictionContext.EMPTY_FULL, undefined); assert.notStrictEqual(PredictionContext.EMPTY_LOCAL, PredictionContext.EMPTY_FULL); assert(!PredictionContext.EMPTY_FULL.equals(PredictionContext.EMPTY_LOCAL), "by value equal"); - } + }) - @Test public test_$_$(): void { - let r: PredictionContext = this.contextCache.join(PredictionContext.EMPTY_LOCAL, - PredictionContext.EMPTY_LOCAL); + it("test_$_$", function () { + const r: PredictionContext = contextCache.join(PredictionContext.EMPTY_LOCAL, + PredictionContext.EMPTY_LOCAL); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[label=\"*\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_$_$_fullctx(): void { - let r: PredictionContext = this.contextCache.join(PredictionContext.EMPTY_FULL, - PredictionContext.EMPTY_FULL); + it("test_$_$_fullctx", function () { + const r: PredictionContext = contextCache.join(PredictionContext.EMPTY_FULL, + PredictionContext.EMPTY_FULL); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[label=\"$\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_x_$(): void { - let r: PredictionContext = this.contextCache.join(this.x(false), PredictionContext.EMPTY_LOCAL); + it("test_x_$", function () { + const r: PredictionContext = contextCache.join(x(false), PredictionContext.EMPTY_LOCAL); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[label=\"*\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_x_$_fullctx(): void { - let r: PredictionContext = this.contextCache.join(this.x(true), PredictionContext.EMPTY_FULL); + it("test_x_$_fullctx", function () { + const r: PredictionContext = contextCache.join(x(true), PredictionContext.EMPTY_FULL); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"|$\"];\n" + @@ -76,23 +150,23 @@ export class TestGraphNodes { " s0:p0->s1[label=\"9\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_$_x(): void { - let r: PredictionContext = this.contextCache.join(PredictionContext.EMPTY_LOCAL, this.x(false)); + it("test_$_x", function () { + const r: PredictionContext = contextCache.join(PredictionContext.EMPTY_LOCAL, x(false)); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[label=\"*\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_$_x_fullctx(): void { - let r: PredictionContext = this.contextCache.join(PredictionContext.EMPTY_FULL, this.x(true)); + it("test_$_x_fullctx", function () { + const r: PredictionContext = contextCache.join(PredictionContext.EMPTY_FULL, x(true)); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"|$\"];\n" + @@ -100,12 +174,12 @@ export class TestGraphNodes { " s0:p0->s1[label=\"9\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_a_a(): void { - let r: PredictionContext = this.contextCache.join(this.a(false), this.a(false)); + it("test_a_a", function () { + const r: PredictionContext = contextCache.join(a(false), a(false)); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[label=\"0\"];\n" + @@ -113,15 +187,15 @@ export class TestGraphNodes { " s0->s1[label=\"1\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_a$_ax(): void { - let a1: PredictionContext = this.a(false); - let xx: PredictionContext = this.x(false); - let a2: PredictionContext = this.createSingleton(xx, 1); - let r: PredictionContext = this.contextCache.join(a1, a2); + it("test_a$_ax", function () { + const a1: PredictionContext = a(false); + const xx: PredictionContext = x(false); + const a2: PredictionContext = createSingleton(xx, 1); + const r: PredictionContext = contextCache.join(a1, a2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[label=\"0\"];\n" + @@ -129,15 +203,15 @@ export class TestGraphNodes { " s0->s1[label=\"1\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_a$_ax_fullctx(): void { - let a1: PredictionContext = this.a(true); - let xx: PredictionContext = this.x(true); - let a2: PredictionContext = this.createSingleton(xx, 1); - let r: PredictionContext = this.contextCache.join(a1, a2); + it("test_a$_ax_fullctx", function () { + const a1: PredictionContext = a(true); + const xx: PredictionContext = x(true); + const a2: PredictionContext = createSingleton(xx, 1); + const r: PredictionContext = contextCache.join(a1, a2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[label=\"0\"];\n" + @@ -147,15 +221,15 @@ export class TestGraphNodes { " s1:p0->s2[label=\"9\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_ax$_a$(): void { - let xx: PredictionContext = this.x(false); - let a1: PredictionContext = this.createSingleton(xx, 1); - let a2: PredictionContext = this.a(false); - let r: PredictionContext = this.contextCache.join(a1, a2); + it("test_ax$_a$", function () { + const xx: PredictionContext = x(false); + const a1: PredictionContext = createSingleton(xx, 1); + const a2: PredictionContext = a(false); + const r: PredictionContext = contextCache.join(a1, a2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[label=\"0\"];\n" + @@ -163,17 +237,17 @@ export class TestGraphNodes { " s0->s1[label=\"1\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_aa$_a$_$_fullCtx(): void { - let empty: PredictionContext = PredictionContext.EMPTY_FULL; - let child1: PredictionContext = this.createSingleton(empty, 8); - let right: PredictionContext = this.contextCache.join(empty, child1); - let left: PredictionContext = this.createSingleton(right, 8); - let merged: PredictionContext = this.contextCache.join(left, right); - let actual: string = toDOTString(merged); + it("test_aa$_a$_$_fullCtx", function () { + const empty: PredictionContext = PredictionContext.EMPTY_FULL; + const child1: PredictionContext = createSingleton(empty, 8); + const right: PredictionContext = contextCache.join(empty, child1); + const left: PredictionContext = createSingleton(right, 8); + const merged: PredictionContext = contextCache.join(left, right); + const actual: string = toDOTString(merged); // console.log(actual); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"|$\"];\n" + @@ -183,15 +257,15 @@ export class TestGraphNodes { " s1:p0->s2[label=\"8\"];\n" + "}\n"; assertEquals(expecting, actual); - } + }) - @Test public test_ax$_a$_fullctx(): void { - let xx: PredictionContext = this.x(true); - let a1: PredictionContext = this.createSingleton(xx, 1); - let a2: PredictionContext = this.a(true); - let r: PredictionContext = this.contextCache.join(a1, a2); + it("test_ax$_a$_fullctx", function () { + const xx: PredictionContext = x(true); + const a1: PredictionContext = createSingleton(xx, 1); + const a2: PredictionContext = a(true); + const r: PredictionContext = contextCache.join(a1, a2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[label=\"0\"];\n" + @@ -201,12 +275,12 @@ export class TestGraphNodes { " s1:p0->s2[label=\"9\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_a_b(): void { - let r: PredictionContext = this.contextCache.join(this.a(false), this.b(false)); + it("test_a_b", function () { + const r: PredictionContext = contextCache.join(a(false), b(false)); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"|\"];\n" + @@ -215,15 +289,15 @@ export class TestGraphNodes { " s0:p1->s1[label=\"2\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_ax_ax_same(): void { - let xx: PredictionContext = this.x(false); - let a1: PredictionContext = this.createSingleton(xx, 1); - let a2: PredictionContext = this.createSingleton(xx, 1); - let r: PredictionContext = this.contextCache.join(a1, a2); + it("test_ax_ax_same", function () { + const xx: PredictionContext = x(false); + const a1: PredictionContext = createSingleton(xx, 1); + const a2: PredictionContext = createSingleton(xx, 1); + const r: PredictionContext = contextCache.join(a1, a2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[label=\"0\"];\n" + @@ -233,16 +307,16 @@ export class TestGraphNodes { " s1->s2[label=\"9\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_ax_ax(): void { - let x1: PredictionContext = this.x(false); - let x2: PredictionContext = this.x(false); - let a1: PredictionContext = this.createSingleton(x1, 1); - let a2: PredictionContext = this.createSingleton(x2, 1); - let r: PredictionContext = this.contextCache.join(a1, a2); + it("test_ax_ax", function () { + const x1: PredictionContext = x(false); + const x2: PredictionContext = x(false); + const a1: PredictionContext = createSingleton(x1, 1); + const a2: PredictionContext = createSingleton(x2, 1); + const r: PredictionContext = contextCache.join(a1, a2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[label=\"0\"];\n" + @@ -252,18 +326,18 @@ export class TestGraphNodes { " s1->s2[label=\"9\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_abx_abx(): void { - let x1: PredictionContext = this.x(false); - let x2: PredictionContext = this.x(false); - let b1: PredictionContext = this.createSingleton(x1, 2); - let b2: PredictionContext = this.createSingleton(x2, 2); - let a1: PredictionContext = this.createSingleton(b1, 1); - let a2: PredictionContext = this.createSingleton(b2, 1); - let r: PredictionContext = this.contextCache.join(a1, a2); + it("test_abx_abx", function () { + const x1: PredictionContext = x(false); + const x2: PredictionContext = x(false); + const b1: PredictionContext = createSingleton(x1, 2); + const b2: PredictionContext = createSingleton(x2, 2); + const a1: PredictionContext = createSingleton(b1, 1); + const a2: PredictionContext = createSingleton(b2, 1); + const r: PredictionContext = contextCache.join(a1, a2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[label=\"0\"];\n" + @@ -275,18 +349,18 @@ export class TestGraphNodes { " s2->s3[label=\"9\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_abx_acx(): void { - let x1: PredictionContext = this.x(false); - let x2: PredictionContext = this.x(false); - let b: PredictionContext = this.createSingleton(x1, 2); - let c: PredictionContext = this.createSingleton(x2, 3); - let a1: PredictionContext = this.createSingleton(b, 1); - let a2: PredictionContext = this.createSingleton(c, 1); - let r: PredictionContext = this.contextCache.join(a1, a2); + it("test_abx_acx", function () { + const x1: PredictionContext = x(false); + const x2: PredictionContext = x(false); + const b: PredictionContext = createSingleton(x1, 2); + const c: PredictionContext = createSingleton(x2, 3); + const a1: PredictionContext = createSingleton(b, 1); + const a2: PredictionContext = createSingleton(c, 1); + const r: PredictionContext = contextCache.join(a1, a2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[label=\"0\"];\n" + @@ -299,15 +373,15 @@ export class TestGraphNodes { " s2->s3[label=\"9\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_ax_bx_same(): void { - let xx: PredictionContext = this.x(false); - let a: PredictionContext = this.createSingleton(xx, 1); - let b: PredictionContext = this.createSingleton(xx, 2); - let r: PredictionContext = this.contextCache.join(a, b); + it("test_ax_bx_same", function () { + const xx: PredictionContext = x(false); + const a: PredictionContext = createSingleton(xx, 1); + const b: PredictionContext = createSingleton(xx, 2); + const r: PredictionContext = contextCache.join(a, b); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"|\"];\n" + @@ -318,16 +392,16 @@ export class TestGraphNodes { " s1->s2[label=\"9\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_ax_bx(): void { - let x1: PredictionContext = this.x(false); - let x2: PredictionContext = this.x(false); - let a: PredictionContext = this.createSingleton(x1, 1); - let b: PredictionContext = this.createSingleton(x2, 2); - let r: PredictionContext = this.contextCache.join(a, b); + it("test_ax_bx", function () { + const x1: PredictionContext = x(false); + const x2: PredictionContext = x(false); + const a: PredictionContext = createSingleton(x1, 1); + const b: PredictionContext = createSingleton(x2, 2); + const r: PredictionContext = contextCache.join(a, b); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"|\"];\n" + @@ -338,14 +412,14 @@ export class TestGraphNodes { " s1->s2[label=\"9\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_ax_by(): void { - let a: PredictionContext = this.createSingleton(this.x(false), 1); - let b: PredictionContext = this.createSingleton(this.y(false), 2); - let r: PredictionContext = this.contextCache.join(a, b); + it("test_ax_by", function () { + const a: PredictionContext = createSingleton(x(false), 1); + const b: PredictionContext = createSingleton(y(false), 2); + const r: PredictionContext = contextCache.join(a, b); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"|\"];\n" + @@ -358,15 +432,15 @@ export class TestGraphNodes { " s1->s3[label=\"9\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_a$_bx(): void { - let x2: PredictionContext = this.x(false); - let aa: PredictionContext = this.a(false); - let b: PredictionContext = this.createSingleton(x2, 2); - let r: PredictionContext = this.contextCache.join(aa, b); + it("test_a$_bx", function () { + const x2: PredictionContext = x(false); + const aa: PredictionContext = a(false); + const b: PredictionContext = createSingleton(x2, 2); + const r: PredictionContext = contextCache.join(aa, b); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"|\"];\n" + @@ -377,15 +451,15 @@ export class TestGraphNodes { " s2->s1[label=\"9\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_a$_bx_fullctx(): void { - let x2: PredictionContext = this.x(true); - let aa: PredictionContext = this.a(true); - let b: PredictionContext = this.createSingleton(x2, 2); - let r: PredictionContext = this.contextCache.join(aa, b); + it("test_a$_bx_fullctx", function () { + const x2: PredictionContext = x(true); + const aa: PredictionContext = a(true); + const b: PredictionContext = createSingleton(x2, 2); + const r: PredictionContext = contextCache.join(aa, b); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"|\"];\n" + @@ -396,18 +470,18 @@ export class TestGraphNodes { " s2->s1[label=\"9\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_aex_bfx(): void { - let x1: PredictionContext = this.x(false); - let x2: PredictionContext = this.x(false); - let e: PredictionContext = this.createSingleton(x1, 5); - let f: PredictionContext = this.createSingleton(x2, 6); - let a: PredictionContext = this.createSingleton(e, 1); - let b: PredictionContext = this.createSingleton(f, 2); - let r: PredictionContext = this.contextCache.join(a, b); + it("test_aex_bfx", function () { + const x1: PredictionContext = x(false); + const x2: PredictionContext = x(false); + const e: PredictionContext = createSingleton(x1, 5); + const f: PredictionContext = createSingleton(x2, 6); + const a: PredictionContext = createSingleton(e, 1); + const b: PredictionContext = createSingleton(f, 2); + const r: PredictionContext = contextCache.join(a, b); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"|\"];\n" + @@ -422,32 +496,32 @@ export class TestGraphNodes { " s1->s3[label=\"5\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) // Array merges - @Test public test_A$_A$_fullctx(): void { - let A1: PredictionContext = this.array(PredictionContext.EMPTY_FULL); - let A2: PredictionContext = this.array(PredictionContext.EMPTY_FULL); - let r: PredictionContext = this.contextCache.join(A1, A2); + it("test_A$_A$_fullctx", function () { + const A1: PredictionContext = array(PredictionContext.EMPTY_FULL); + const A2: PredictionContext = array(PredictionContext.EMPTY_FULL); + const r: PredictionContext = contextCache.join(A1, A2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[label=\"$\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_Aab_Ac(): void { // a,b + c - let aa: PredictionContext = this.a(false); - let bb: PredictionContext = this.b(false); - let cc: PredictionContext = this.c(false); - let A1: PredictionContext = this. array(aa, bb); - let A2: PredictionContext = this.array(cc); - let r: PredictionContext = this.contextCache.join(A1, A2); + it("test_Aab_Ac", function () { // a,b + c + const aa: PredictionContext = a(false); + const bb: PredictionContext = b(false); + const cc: PredictionContext = c(false); + const A1: PredictionContext = array(aa, bb); + const A2: PredictionContext = array(cc); + const r: PredictionContext = contextCache.join(A1, A2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"||\"];\n" + @@ -457,16 +531,16 @@ export class TestGraphNodes { " s0:p2->s1[label=\"3\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_Aa_Aa(): void { - let a1: PredictionContext = this.a(false); - let a2: PredictionContext = this. a(false); - let A1: PredictionContext = this.array(a1); - let A2: PredictionContext = this.array(a2); - let r: PredictionContext = this.contextCache.join(A1, A2); + it("test_Aa_Aa", function () { + const a1: PredictionContext = a(false); + const a2: PredictionContext = a(false); + const A1: PredictionContext = array(a1); + const A2: PredictionContext = array(a2); + const r: PredictionContext = contextCache.join(A1, A2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[label=\"0\"];\n" + @@ -474,17 +548,17 @@ export class TestGraphNodes { " s0->s1[label=\"1\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_Aa_Abc(): void { // a + b,c - let aa: PredictionContext = this.a(false); - let bb: PredictionContext = this.b(false); - let cc: PredictionContext = this.c(false); - let A1: PredictionContext = this.array(aa); - let A2: PredictionContext = this.array(bb, cc); - let r: PredictionContext = this.contextCache.join(A1, A2); + it("test_Aa_Abc", function () { // a + b,c + const aa: PredictionContext = a(false); + const bb: PredictionContext = b(false); + const cc: PredictionContext = c(false); + const A1: PredictionContext = array(aa); + const A2: PredictionContext = array(bb, cc); + const r: PredictionContext = contextCache.join(A1, A2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"||\"];\n" + @@ -494,17 +568,17 @@ export class TestGraphNodes { " s0:p2->s1[label=\"3\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_Aac_Ab(): void { // a,c + b - let aa: PredictionContext = this.a(false); - let bb: PredictionContext = this.b(false); - let cc: PredictionContext = this.c(false); - let A1: PredictionContext = this.array(aa, cc); - let A2: PredictionContext = this.array(bb); - let r: PredictionContext = this.contextCache.join(A1, A2); + it("test_Aac_Ab", function () { // a,c + b + const aa: PredictionContext = a(false); + const bb: PredictionContext = b(false); + const cc: PredictionContext = c(false); + const A1: PredictionContext = array(aa, cc); + const A2: PredictionContext = array(bb); + const r: PredictionContext = contextCache.join(A1, A2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"||\"];\n" + @@ -514,14 +588,14 @@ export class TestGraphNodes { " s0:p2->s1[label=\"3\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_Aab_Aa(): void { // a,b + a - let A1: PredictionContext = this. array(this.a(false), this.b(false)); - let A2: PredictionContext = this. array(this.a(false)); - let r: PredictionContext = this.contextCache.join(A1, A2); + it("test_Aab_Aa", function () { // a,b + a + const A1: PredictionContext = array(a(false), b(false)); + const A2: PredictionContext = array(a(false)); + const r: PredictionContext = contextCache.join(A1, A2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"|\"];\n" + @@ -530,14 +604,14 @@ export class TestGraphNodes { " s0:p1->s1[label=\"2\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_Aab_Ab(): void { // a,b + b - let A1: PredictionContext = this.array(this.a(false), this.b(false)); - let A2: PredictionContext = this.array(this.b(false)); - let r: PredictionContext = this.contextCache.join(A1, A2); + it("test_Aab_Ab", function () { // a,b + b + const A1: PredictionContext = array(a(false), b(false)); + const A2: PredictionContext = array(b(false)); + const r: PredictionContext = contextCache.join(A1, A2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"|\"];\n" + @@ -546,16 +620,16 @@ export class TestGraphNodes { " s0:p1->s1[label=\"2\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_Aax_Aby(): void { // ax + by but in arrays - let a: PredictionContext = this.createSingleton(this.x(false), 1); - let b: PredictionContext = this.createSingleton(this.y(false), 2); - let A1: PredictionContext = this.array(a); - let A2: PredictionContext = this.array(b); - let r: PredictionContext = this.contextCache.join(A1, A2); + it("test_Aax_Aby", function () { // ax + by but in arrays + const a: PredictionContext = createSingleton(x(false), 1); + const b: PredictionContext = createSingleton(y(false), 2); + const A1: PredictionContext = array(a); + const A2: PredictionContext = array(b); + const r: PredictionContext = contextCache.join(A1, A2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"|\"];\n" + @@ -568,16 +642,16 @@ export class TestGraphNodes { " s1->s3[label=\"9\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_Aax_Aay(): void { // ax + ay -> merged singleton a, array parent - let a1: PredictionContext = this.createSingleton(this.x(false), 1); - let a2: PredictionContext = this.createSingleton(this.y(false), 1); - let A1: PredictionContext = this.array(a1); - let A2: PredictionContext = this.array(a2); - let r: PredictionContext = this.contextCache.join(A1, A2); + it("test_Aax_Aay", function () { // ax + ay -> merged singleton a, array parent + const a1: PredictionContext = createSingleton(x(false), 1); + const a2: PredictionContext = createSingleton(y(false), 1); + const A1: PredictionContext = array(a1); + const A2: PredictionContext = array(a2); + const r: PredictionContext = contextCache.join(A1, A2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[label=\"0\"];\n" + @@ -588,16 +662,16 @@ export class TestGraphNodes { " s1:p1->s2[label=\"10\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_Aaxc_Aayd(): void { // ax,c + ay,d -> merged a, array parent - let a1: PredictionContext = this.createSingleton(this.x(false), 1); - let a2: PredictionContext = this.createSingleton(this.y(false), 1); - let A1: PredictionContext = this.array(a1, this.c(false)); - let A2: PredictionContext = this.array(a2, this.d(false)); - let r: PredictionContext = this.contextCache.join(A1, A2); + it("test_Aaxc_Aayd", function () { // ax,c + ay,d -> merged a, array parent + const a1: PredictionContext = createSingleton(x(false), 1); + const a2: PredictionContext = createSingleton(y(false), 1); + const A1: PredictionContext = array(a1, c(false)); + const A2: PredictionContext = array(a2, d(false)); + const r: PredictionContext = contextCache.join(A1, A2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"||\"];\n" + @@ -610,18 +684,18 @@ export class TestGraphNodes { " s1:p1->s2[label=\"10\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_Aaubv_Acwdx(): void { // au,bv + cw,dx -> [a,b,c,d]->[u,v,w,x] - let a: PredictionContext = this.createSingleton(this.u(false), 1); - let b: PredictionContext = this.createSingleton(this.v(false), 2); - let c: PredictionContext = this.createSingleton(this.w(false), 3); - let d: PredictionContext = this.createSingleton(this.x(false), 4); - let A1: PredictionContext = this.array(a, b); - let A2: PredictionContext = this.array(c, d); - let r: PredictionContext = this.contextCache.join(A1, A2); + it("test_Aaubv_Acwdx", function () { // au,bv + cw,dx -> [a,b,c,d]->[u,v,w,x] + const a: PredictionContext = createSingleton(u(false), 1); + const b: PredictionContext = createSingleton(v(false), 2); + const c: PredictionContext = createSingleton(w(false), 3); + const d: PredictionContext = createSingleton(x(false), 4); + const A1: PredictionContext = array(a, b); + const A2: PredictionContext = array(c, d); + const r: PredictionContext = contextCache.join(A1, A2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"|||\"];\n" + @@ -640,18 +714,18 @@ export class TestGraphNodes { " s1->s5[label=\"6\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_Aaubv_Abvdx(): void { // au,bv + bv,dx -> [a,b,d]->[u,v,x] - let a: PredictionContext = this.createSingleton(this.u(false), 1); - let b1: PredictionContext = this.createSingleton(this.v(false), 2); - let b2: PredictionContext = this.createSingleton(this.v(false), 2); - let d: PredictionContext = this.createSingleton(this.x(false), 4); - let A1: PredictionContext = this.array(a, b1); - let A2: PredictionContext = this.array(b2, d); - let r: PredictionContext = this.contextCache.join(A1, A2); + it("test_Aaubv_Abvdx", function () { // au,bv + bv,dx -> [a,b,d]->[u,v,x] + const a: PredictionContext = createSingleton(u(false), 1); + const b1: PredictionContext = createSingleton(v(false), 2); + const b2: PredictionContext = createSingleton(v(false), 2); + const d: PredictionContext = createSingleton(x(false), 4); + const A1: PredictionContext = array(a, b1); + const A2: PredictionContext = array(b2, d); + const r: PredictionContext = contextCache.join(A1, A2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"||\"];\n" + @@ -667,18 +741,18 @@ export class TestGraphNodes { " s1->s4[label=\"6\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_Aaubv_Abwdx(): void { // au,bv + bw,dx -> [a,b,d]->[u,[v,w],x] - let a: PredictionContext = this.createSingleton(this.u(false), 1); - let b1: PredictionContext = this.createSingleton(this.v(false), 2); - let b2: PredictionContext = this.createSingleton(this.w(false), 2); - let d: PredictionContext = this.createSingleton(this.x(false), 4); - let A1: PredictionContext = this.array(a, b1); - let A2: PredictionContext = this.array(b2, d); - let r: PredictionContext = this.contextCache.join(A1, A2); + it("test_Aaubv_Abwdx", function () { // au,bv + bw,dx -> [a,b,d]->[u,[v,w],x] + const a: PredictionContext = createSingleton(u(false), 1); + const b1: PredictionContext = createSingleton(v(false), 2); + const b2: PredictionContext = createSingleton(w(false), 2); + const d: PredictionContext = createSingleton(x(false), 4); + const A1: PredictionContext = array(a, b1); + const A2: PredictionContext = array(b2, d); + const r: PredictionContext = contextCache.join(A1, A2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"||\"];\n" + @@ -695,18 +769,18 @@ export class TestGraphNodes { " s1->s4[label=\"6\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_Aaubv_Abvdu(): void { // au,bv + bv,du -> [a,b,d]->[u,v,u]; u,v shared - let a: PredictionContext = this.createSingleton(this.u(false), 1); - let b1: PredictionContext = this.createSingleton(this.v(false), 2); - let b2: PredictionContext = this.createSingleton(this.v(false), 2); - let d: PredictionContext = this.createSingleton(this.u(false), 4); - let A1: PredictionContext = this.array(a, b1); - let A2: PredictionContext = this.array(b2, d); - let r: PredictionContext = this.contextCache.join(A1, A2); + it("test_Aaubv_Abvdu", function () { // au,bv + bv,du -> [a,b,d]->[u,v,u]; u,v shared + const a: PredictionContext = createSingleton(u(false), 1); + const b1: PredictionContext = createSingleton(v(false), 2); + const b2: PredictionContext = createSingleton(v(false), 2); + const d: PredictionContext = createSingleton(u(false), 4); + const A1: PredictionContext = array(a, b1); + const A2: PredictionContext = array(b2, d); + const r: PredictionContext = contextCache.join(A1, A2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"||\"];\n" + @@ -720,18 +794,18 @@ export class TestGraphNodes { " s1->s3[label=\"6\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) - @Test public test_Aaubu_Acudu(): void { // au,bu + cu,du -> [a,b,c,d]->[u,u,u,u] - let a: PredictionContext = this.createSingleton(this.u(false), 1); - let b: PredictionContext = this.createSingleton(this.u(false), 2); - let c: PredictionContext = this.createSingleton(this.u(false), 3); - let d: PredictionContext = this.createSingleton(this.u(false), 4); - let A1: PredictionContext = this.array(a, b); - let A2: PredictionContext = this.array(c, d); - let r: PredictionContext = this.contextCache.join(A1, A2); + it("test_Aaubu_Acudu", function () { // au,bu + cu,du -> [a,b,c,d]->[u,u,u,u] + const a: PredictionContext = createSingleton(u(false), 1); + const b: PredictionContext = createSingleton(u(false), 2); + const c: PredictionContext = createSingleton(u(false), 3); + const d: PredictionContext = createSingleton(u(false), 4); + const A1: PredictionContext = array(a, b); + const A2: PredictionContext = array(c, d); + const r: PredictionContext = contextCache.join(A1, A2); // console.log(toDOTString(r)); - let expecting: string = + const expecting: string = "digraph G {\n" + "rankdir=LR;\n" + " s0[shape=record, label=\"|||\"];\n" + @@ -744,131 +818,57 @@ export class TestGraphNodes { " s1->s2[label=\"6\"];\n" + "}\n"; assertEquals(expecting, toDOTString(r)); - } + }) // ------------ SUPPORT ------------------------- -public a(fullContext: boolean): PredictionContext { - return this.createSingleton(fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL, 1); -} - -public b(fullContext: boolean): PredictionContext { - return this.createSingleton(fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL, 2); -} - -public c(fullContext: boolean): PredictionContext { - return this.createSingleton(fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL, 3); -} - -public d(fullContext: boolean): PredictionContext { - return this.createSingleton(fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL, 4); -} - -public u(fullContext: boolean): PredictionContext { - return this.createSingleton(fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL, 6); -} - -public v(fullContext: boolean): PredictionContext { - return this.createSingleton(fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL, 7); -} - -public w(fullContext: boolean): PredictionContext { - return this.createSingleton(fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL, 8); -} + function a(fullContext: boolean): PredictionContext { + return createSingleton(fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL, 1); + } -public x(fullContext: boolean): PredictionContext { - return this.createSingleton(fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL, 9); -} + function b(fullContext: boolean): PredictionContext { + return createSingleton(fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL, 2); + } -public y(fullContext: boolean): PredictionContext { - return this.createSingleton(fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL, 10); -} + function c(fullContext: boolean): PredictionContext { + return createSingleton(fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL, 3); + } -public createSingleton(parent: PredictionContext, payload: number): PredictionContext { - let a: PredictionContext = this.contextCache.getChild(parent, payload); - return a; -} + function d(fullContext: boolean): PredictionContext { + return createSingleton(fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL, 4); + } -public array(...nodes: PredictionContext[]): PredictionContext { - let result: PredictionContext = nodes[0]; - for (let i = 1; i < nodes.length; i++) { - result = this.contextCache.join(result, nodes[i]); + function u(fullContext: boolean): PredictionContext { + return createSingleton(fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL, 6); } - return result; -} -} + function v(fullContext: boolean): PredictionContext { + return createSingleton(fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL, 7); + } -function toDOTString(context: PredictionContext): string { - let nodes = ""; - let edges = ""; - let visited = new Map(); - let contextIds = new Map(); - let workList = new Array(); - visited.set(context, context); - contextIds.set(context, contextIds.size); - workList.push(context); - for (let current = workList.pop(); !!current; current = workList.pop()) { - nodes += (" s") + (contextIds.get(current)) + ("["); + function w(fullContext: boolean): PredictionContext { + return createSingleton(fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL, 8); + } - if (current.size > 1) { - nodes += ("shape=record, "); - } + function x(fullContext: boolean): PredictionContext { + return createSingleton(fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL, 9); + } - nodes += ("label=\""); + function y(fullContext: boolean): PredictionContext { + return createSingleton(fullContext ? PredictionContext.EMPTY_FULL : PredictionContext.EMPTY_LOCAL, 10); + } - if (current.isEmpty) { - nodes += (PredictionContext.isEmptyLocal(current) ? "*" : "$"); - } else if (current.size > 1) { - for (let i = 0; i < current.size; i++) { - if (i > 0) { - nodes += ("|"); - } + function createSingleton(parent: PredictionContext, payload: number): PredictionContext { + const a: PredictionContext = contextCache.getChild(parent, payload); + return a; + } - nodes += (""); - if (current.getReturnState(i) === PredictionContext.EMPTY_FULL_STATE_KEY) { - nodes += ("$"); - } - else if (current.getReturnState(i) === PredictionContext.EMPTY_LOCAL_STATE_KEY) { - nodes += ("*"); - } - } - } else { - nodes += (contextIds.get(current)); + function array(...nodes: PredictionContext[]): PredictionContext { + let result: PredictionContext = nodes[0]; + for (let i = 1; i < nodes.length; i++) { + result = contextCache.join(result, nodes[i]); } - nodes += ("\"];\n"); - - for (let i = 0; i < current.size; i++) { - if (current.getReturnState(i) === PredictionContext.EMPTY_FULL_STATE_KEY - || current.getReturnState(i) === PredictionContext.EMPTY_LOCAL_STATE_KEY) { - continue; - } - - let visitedSize = visited.size; - visited.set(current.getParent(i), current.getParent(i)); - if (visited.size > visitedSize) { - contextIds.set(current.getParent(i), contextIds.size); - workList.push(current.getParent(i)); - } - - edges += (" s") + (contextIds.get(current)); - if (current.size > 1) { - edges += (":p") + (i); - } - - edges += ("->"); - edges += ("s") + (contextIds.get(current.getParent(i))); - edges += ("[label=\"") + (current.getReturnState(i)) + ("\"]"); - edges += (";\n"); - } + return result; } - - let builder = ""; - builder += ("digraph G {\n"); - builder += ("rankdir=LR;\n"); - builder += (nodes); - builder += (edges); - builder += ("}\n"); - return builder; -} +}) diff --git a/test/tool/TestIntegerList.ts b/test/tool/TestIntegerList.ts index 495f37f9..afde987f 100644 --- a/test/tool/TestIntegerList.ts +++ b/test/tool/TestIntegerList.ts @@ -3,61 +3,59 @@ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. */ -import { IntegerList } from "../../src/misc/IntegerList"; - -import { suite, test } from "mocha-typescript"; import * as assert from "assert"; -@suite -export class TestIntegerList { +import { IntegerList } from "antlr4ts"; + +describe("TestIntegerList", function () { - @test - public emptyListToEmptyCharArray(): void { - let l: IntegerList = new IntegerList(); + it("emptyListToEmptyCharArray", function () { + + const l: IntegerList = new IntegerList(); assert.deepStrictEqual(new Uint16Array(0), l.toCharArray()); - } + }) + + it("negativeIntegerToCharArrayThrows", function () { - @test - public negativeIntegerToCharArrayThrows(): void { - let l: IntegerList = new IntegerList(); + const l: IntegerList = new IntegerList(); l.add(-42); assert.throws(() => l.toCharArray(), RangeError); - } + }) - @test - public surrogateRangeIntegerToCharArray(): void { - let l: IntegerList = new IntegerList(); + it("surrogateRangeIntegerToCharArray", function () { + + const l: IntegerList = new IntegerList(); // Java allows dangling surrogates, so (currently) we do // as well. We could change this if desired. l.add(0xDC00); - let expected = new Uint16Array([0xDC00]); + const expected = new Uint16Array([0xDC00]); assert.deepStrictEqual(expected, l.toCharArray()); - } + }) + + it("tooLargeIntegerToCharArrayThrows", function () { - @test - public tooLargeIntegerToCharArrayThrows(): void { - let l: IntegerList = new IntegerList(); + const l: IntegerList = new IntegerList(); l.add(0x110000); assert.throws(() => l.toCharArray(), RangeError); - } + }) - @test - public unicodeBMPIntegerListToCharArray(): void { - let l: IntegerList = new IntegerList(); + it("unicodeBMPIntegerListToCharArray", function () { + + const l: IntegerList = new IntegerList(); l.add(0x35); l.add(0x4E94); l.add(0xFF15); - let expected = new Uint16Array([0x35, 0x4E94, 0xFF15]); + const expected = new Uint16Array([0x35, 0x4E94, 0xFF15]); assert.deepStrictEqual(expected, l.toCharArray()); - } + }) + + it("unicodeSMPIntegerListToCharArray", function () { - @test - public unicodeSMPIntegerListToCharArray(): void { - let l: IntegerList = new IntegerList(); + const l: IntegerList = new IntegerList(); l.add(0x104A5); l.add(0x116C5); l.add(0x1D7FB); - let expected = new Uint16Array([0xD801, 0xDCA5, 0xD805, 0xDEC5, 0xD835, 0xDFFB]); + const expected = new Uint16Array([0xD801, 0xDCA5, 0xD805, 0xDEC5, 0xD835, 0xDFFB]); assert.deepStrictEqual(expected, l.toCharArray()); - } -} + }) +}) diff --git a/test/tool/TestIntervalSet.ts b/test/tool/TestIntervalSet.ts index e717d400..23b7f2c8 100644 --- a/test/tool/TestIntervalSet.ts +++ b/test/tool/TestIntervalSet.ts @@ -5,13 +5,10 @@ // ConvertTo-TS run at 2016-10-04T11:27:11.6934341-07:00 -import { IntervalSet } from "../../src/misc/IntervalSet"; -import { Lexer } from "../../src/Lexer"; -import { Token } from "../../src/Token"; - -import { suite, test as Test } from "mocha-typescript"; import * as assert from "assert"; +import { IntervalSet, Lexer, Token } from "antlr4ts"; + function assertEquals(expected: T, actual: T): void { assert.strictEqual(actual, expected); } @@ -24,231 +21,230 @@ function assertTrue(value: boolean): void { assert.strictEqual(value, true); } -@suite -export class TestIntervalSet { - @Test public testSingleElement(): void { - let s: IntervalSet = IntervalSet.of(99); - let expecting: string = "99"; +describe("TestIntervalSet", function () { + it("testSingleElement", function () { + const s: IntervalSet = IntervalSet.of(99); + const expecting = "99"; assertEquals(s.toString(), expecting); - } + }) - @Test public testMin(): void { + it("testMin", function () { assertEquals(0, IntervalSet.COMPLETE_CHAR_SET.minElement); assertEquals(Token.EPSILON, IntervalSet.COMPLETE_CHAR_SET.or(IntervalSet.of(Token.EPSILON)).minElement); assertEquals(Token.EOF, IntervalSet.COMPLETE_CHAR_SET.or(IntervalSet.of(Token.EOF)).minElement); - } + }) - @Test public testIsolatedElements(): void { - let s: IntervalSet = new IntervalSet(); + it("testIsolatedElements", function () { + const s: IntervalSet = new IntervalSet(); s.add(1); s.add("z".charCodeAt(0)); s.add("\uFFF0".charCodeAt(0)); - let expecting: string = "{1, 122, 65520}"; + const expecting = "{1, 122, 65520}"; assertEquals(s.toString(), expecting); - } + }) - @Test public testMixedRangesAndElements(): void { - let s: IntervalSet = new IntervalSet(); + it("testMixedRangesAndElements", function () { + const s: IntervalSet = new IntervalSet(); s.add(1); s.add("a".charCodeAt(0), "z".charCodeAt(0)); s.add("0".charCodeAt(0), "9".charCodeAt(0)); - let expecting: string = "{1, 48..57, 97..122}"; + const expecting = "{1, 48..57, 97..122}"; assertEquals(s.toString(), expecting); - } + }) - @Test public testSimpleAnd(): void { - let s: IntervalSet = IntervalSet.of(10, 20); - let s2: IntervalSet = IntervalSet.of(13, 15); - let expecting: string = "{13..15}"; - let result: string = (s.and(s2)).toString(); + it("testSimpleAnd", function () { + const s: IntervalSet = IntervalSet.of(10, 20); + const s2: IntervalSet = IntervalSet.of(13, 15); + const expecting = "{13..15}"; + const result: string = (s.and(s2)).toString(); assertEquals(expecting, result); - } + }) - @Test public testRangeAndIsolatedElement(): void { - let s: IntervalSet = IntervalSet.of("a".charCodeAt(0), "z".charCodeAt(0)); - let s2: IntervalSet = IntervalSet.of("d".charCodeAt(0)); - let expecting: string = "100"; - let result: string = (s.and(s2)).toString(); + it("testRangeAndIsolatedElement", function () { + const s: IntervalSet = IntervalSet.of("a".charCodeAt(0), "z".charCodeAt(0)); + const s2: IntervalSet = IntervalSet.of("d".charCodeAt(0)); + const expecting = "100"; + const result: string = (s.and(s2)).toString(); assertEquals(expecting, result); - } + }) - @Test public testEmptyIntersection(): void { - let s: IntervalSet = IntervalSet.of("a".charCodeAt(0), "z".charCodeAt(0)); - let s2: IntervalSet = IntervalSet.of("0".charCodeAt(0), "9".charCodeAt(0)); - let expecting: string = "{}"; - let result: string = (s.and(s2)).toString(); + it("testEmptyIntersection", function () { + const s: IntervalSet = IntervalSet.of("a".charCodeAt(0), "z".charCodeAt(0)); + const s2: IntervalSet = IntervalSet.of("0".charCodeAt(0), "9".charCodeAt(0)); + const expecting = "{}"; + const result: string = (s.and(s2)).toString(); assertEquals(expecting, result); - } + }) - @Test public testEmptyIntersectionSingleElements(): void { - let s: IntervalSet = IntervalSet.of("a".charCodeAt(0)); - let s2: IntervalSet = IntervalSet.of("d".charCodeAt(0)); - let expecting: string = "{}"; - let result: string = (s.and(s2)).toString(); + it("testEmptyIntersectionSingleElements", function () { + const s: IntervalSet = IntervalSet.of("a".charCodeAt(0)); + const s2: IntervalSet = IntervalSet.of("d".charCodeAt(0)); + const expecting = "{}"; + const result: string = (s.and(s2)).toString(); assertEquals(expecting, result); - } + }) - @Test public testNotSingleElement(): void { - let vocabulary: IntervalSet = IntervalSet.of(1, 1000); + it("testNotSingleElement", function () { + const vocabulary: IntervalSet = IntervalSet.of(1, 1000); vocabulary.add(2000, 3000); - let s: IntervalSet = IntervalSet.of(50, 50); - let expecting: string = "{1..49, 51..1000, 2000..3000}"; - let result: string = (s.complement(vocabulary)).toString(); + const s: IntervalSet = IntervalSet.of(50, 50); + const expecting = "{1..49, 51..1000, 2000..3000}"; + const result: string = (s.complement(vocabulary)).toString(); assertEquals(expecting, result); - } + }) - @Test public testNotSet(): void { - let vocabulary: IntervalSet = IntervalSet.of(1, 1000); - let s: IntervalSet = IntervalSet.of(50, 60); + it("testNotSet", function () { + const vocabulary: IntervalSet = IntervalSet.of(1, 1000); + const s: IntervalSet = IntervalSet.of(50, 60); s.add(5); s.add(250, 300); - let expecting: string = "{1..4, 6..49, 61..249, 301..1000}"; - let result: string = (s.complement(vocabulary)).toString(); + const expecting = "{1..4, 6..49, 61..249, 301..1000}"; + const result: string = (s.complement(vocabulary)).toString(); assertEquals(expecting, result); - } + }) - @Test public testNotEqualSet(): void { - let vocabulary: IntervalSet = IntervalSet.of(1, 1000); - let s: IntervalSet = IntervalSet.of(1, 1000); - let expecting: string = "{}"; - let result: string = (s.complement(vocabulary)).toString(); + it("testNotEqualSet", function () { + const vocabulary: IntervalSet = IntervalSet.of(1, 1000); + const s: IntervalSet = IntervalSet.of(1, 1000); + const expecting = "{}"; + const result: string = (s.complement(vocabulary)).toString(); assertEquals(expecting, result); - } + }) - @Test public testNotSetEdgeElement(): void { - let vocabulary: IntervalSet = IntervalSet.of(1, 2); - let s: IntervalSet = IntervalSet.of(1); - let expecting: string = "2"; - let result: string = (s.complement(vocabulary)).toString(); + it("testNotSetEdgeElement", function () { + const vocabulary: IntervalSet = IntervalSet.of(1, 2); + const s: IntervalSet = IntervalSet.of(1); + const expecting = "2"; + const result: string = (s.complement(vocabulary)).toString(); assertEquals(expecting, result); - } + }) - @Test public testNotSetFragmentedVocabulary(): void { - let vocabulary: IntervalSet = IntervalSet.of(1, 255); + it("testNotSetFragmentedVocabulary", function () { + const vocabulary: IntervalSet = IntervalSet.of(1, 255); vocabulary.add(1000, 2000); vocabulary.add(9999); - let s: IntervalSet = IntervalSet.of(50, 60); + const s: IntervalSet = IntervalSet.of(50, 60); s.add(3); s.add(250, 300); s.add(10000); // this is outside range of vocab and should be ignored - let expecting: string = "{1..2, 4..49, 61..249, 1000..2000, 9999}"; - let result: string = (s.complement(vocabulary)).toString(); + const expecting = "{1..2, 4..49, 61..249, 1000..2000, 9999}"; + const result: string = (s.complement(vocabulary)).toString(); assertEquals(expecting, result); - } + }) - @Test public testSubtractOfCompletelyContainedRange(): void { - let s: IntervalSet = IntervalSet.of(10, 20); - let s2: IntervalSet = IntervalSet.of(12, 15); - let expecting: string = "{10..11, 16..20}"; - let result: string = (s.subtract(s2)).toString(); + it("testSubtractOfCompletelyContainedRange", function () { + const s: IntervalSet = IntervalSet.of(10, 20); + const s2: IntervalSet = IntervalSet.of(12, 15); + const expecting = "{10..11, 16..20}"; + const result: string = (s.subtract(s2)).toString(); assertEquals(expecting, result); - } + }) - @Test public testSubtractFromSetWithEOF(): void { - let s: IntervalSet = IntervalSet.of(10, 20); + it("testSubtractFromSetWithEOF", function () { + const s: IntervalSet = IntervalSet.of(10, 20); s.add(Token.EOF); - let s2: IntervalSet = IntervalSet.of(12, 15); - let expecting: string = "{, 10..11, 16..20}"; - let result: string = (s.subtract(s2)).toString(); + const s2: IntervalSet = IntervalSet.of(12, 15); + const expecting = "{, 10..11, 16..20}"; + const result: string = (s.subtract(s2)).toString(); assertEquals(expecting, result); - } + }) - @Test public testSubtractOfOverlappingRangeFromLeft(): void { - let s: IntervalSet = IntervalSet.of(10, 20); - let s2: IntervalSet = IntervalSet.of(5, 11); - let expecting: string = "{12..20}"; - let result: string = (s.subtract(s2)).toString(); + it("testSubtractOfOverlappingRangeFromLeft", function () { + const s: IntervalSet = IntervalSet.of(10, 20); + const s2: IntervalSet = IntervalSet.of(5, 11); + let expecting = "{12..20}"; + let result: string = (s.subtract(s2)).toString(); assertEquals(expecting, result); - let s3: IntervalSet = IntervalSet.of(5, 10); + const s3: IntervalSet = IntervalSet.of(5, 10); expecting = "{11..20}"; result = (s.subtract(s3)).toString(); assertEquals(expecting, result); - } + }) - @Test public testSubtractOfOverlappingRangeFromRight(): void { - let s: IntervalSet = IntervalSet.of(10, 20); - let s2: IntervalSet = IntervalSet.of(15, 25); - let expecting: string = "{10..14}"; - let result: string = (s.subtract(s2)).toString(); + it("testSubtractOfOverlappingRangeFromRight", function () { + const s: IntervalSet = IntervalSet.of(10, 20); + const s2: IntervalSet = IntervalSet.of(15, 25); + let expecting = "{10..14}"; + let result: string = (s.subtract(s2)).toString(); assertEquals(expecting, result); - let s3: IntervalSet = IntervalSet.of(20, 25); + const s3: IntervalSet = IntervalSet.of(20, 25); expecting = "{10..19}"; result = (s.subtract(s3)).toString(); assertEquals(expecting, result); - } + }) - @Test public testSubtractOfCompletelyCoveredRange(): void { - let s: IntervalSet = IntervalSet.of(10, 20); - let s2: IntervalSet = IntervalSet.of(1, 25); - let expecting: string = "{}"; - let result: string = (s.subtract(s2)).toString(); + it("testSubtractOfCompletelyCoveredRange", function () { + const s: IntervalSet = IntervalSet.of(10, 20); + const s2: IntervalSet = IntervalSet.of(1, 25); + const expecting = "{}"; + const result: string = (s.subtract(s2)).toString(); assertEquals(expecting, result); - } + }) - @Test public testSubtractOfRangeSpanningMultipleRanges(): void { - let s: IntervalSet = IntervalSet.of(10, 20); + it("testSubtractOfRangeSpanningMultipleRanges", function () { + const s: IntervalSet = IntervalSet.of(10, 20); s.add(30, 40); s.add(50, 60); // s has 3 ranges now: 10..20, 30..40, 50..60 - let s2: IntervalSet = IntervalSet.of(5, 55); // covers one and touches 2nd range - let expecting: string = "{56..60}"; - let result: string = (s.subtract(s2)).toString(); + const s2: IntervalSet = IntervalSet.of(5, 55); // covers one and touches 2nd range + let expecting = "{56..60}"; + let result: string = (s.subtract(s2)).toString(); assertEquals(expecting, result); - let s3: IntervalSet = IntervalSet.of(15, 55); // touches both + const s3: IntervalSet = IntervalSet.of(15, 55); // touches both expecting = "{10..14, 56..60}"; result = (s.subtract(s3)).toString(); assertEquals(expecting, result); - } + }) /** The following was broken: * {0..113, 115..65534}-{0..115, 117..65534}=116..65534 */ - @Test public testSubtractOfWackyRange(): void { - let s: IntervalSet = IntervalSet.of(0, 113); + it("testSubtractOfWackyRange", function () { + const s: IntervalSet = IntervalSet.of(0, 113); s.add(115, 200); - let s2: IntervalSet = IntervalSet.of(0, 115); + const s2: IntervalSet = IntervalSet.of(0, 115); s2.add(117, 200); - let expecting: string = "116"; - let result: string = (s.subtract(s2)).toString(); + const expecting = "116"; + const result: string = (s.subtract(s2)).toString(); assertEquals(expecting, result); - } + }) - @Test public testSimpleEquals(): void { - let s: IntervalSet = IntervalSet.of(10, 20); - let s2: IntervalSet = IntervalSet.of(10, 20); + it("testSimpleEquals", function () { + const s: IntervalSet = IntervalSet.of(10, 20); + const s2: IntervalSet = IntervalSet.of(10, 20); assertTrue(s.equals(s2)); - let s3: IntervalSet = IntervalSet.of(15, 55); + const s3: IntervalSet = IntervalSet.of(15, 55); assertFalse(s.equals(s3)); - } + }) - @Test public testEquals(): void { - let s: IntervalSet = IntervalSet.of(10, 20); + it("testEquals", function () { + const s: IntervalSet = IntervalSet.of(10, 20); s.add(2); s.add(499, 501); - let s2: IntervalSet = IntervalSet.of(10, 20); + const s2: IntervalSet = IntervalSet.of(10, 20); s2.add(2); s2.add(499, 501); assertTrue(s.equals(s2)); - let s3: IntervalSet = IntervalSet.of(10, 20); + const s3: IntervalSet = IntervalSet.of(10, 20); s3.add(2); assertFalse(s.equals(s3)); - } + }) - @Test public testSingleElementMinusDisjointSet(): void { - let s: IntervalSet = IntervalSet.of(15, 15); - let s2: IntervalSet = IntervalSet.of(1, 5); + it("testSingleElementMinusDisjointSet", function () { + const s: IntervalSet = IntervalSet.of(15, 15); + const s2: IntervalSet = IntervalSet.of(1, 5); s2.add(10, 20); - let expecting: string = "{}"; // 15 - {1..5, 10..20} = {} - let result: string = s.subtract(s2).toString(); + const expecting = "{}"; // 15 - {1..5, 10..20} = {}) + const result: string = s.subtract(s2).toString(); assertEquals(expecting, result); - } + }) - @Test public testMembership(): void { - let s: IntervalSet = IntervalSet.of(15, 15); + it("testMembership", function () { + const s: IntervalSet = IntervalSet.of(15, 15); s.add(50, 60); assertTrue(!s.contains(0)); assertTrue(!s.contains(20)); @@ -257,126 +253,126 @@ export class TestIntervalSet { assertTrue(s.contains(55)); assertTrue(s.contains(50)); assertTrue(s.contains(60)); - } + }) // {2,15,18} & 10..20 - @Test public testIntersectionWithTwoContainedElements(): void { - let s: IntervalSet = IntervalSet.of(10, 20); - let s2: IntervalSet = IntervalSet.of(2, 2); + it("testIntersectionWithTwoContainedElements", function () { + const s: IntervalSet = IntervalSet.of(10, 20); + const s2: IntervalSet = IntervalSet.of(2, 2); s2.add(15); s2.add(18); - let expecting: string = "{15, 18}"; - let result: string = (s.and(s2)).toString(); + const expecting = "{15, 18}"; + const result: string = (s.and(s2)).toString(); assertEquals(expecting, result); - } + }) - @Test public testIntersectionWithTwoContainedElementsReversed(): void { - let s: IntervalSet = IntervalSet.of(10, 20); - let s2: IntervalSet = IntervalSet.of(2, 2); + it("testIntersectionWithTwoContainedElementsReversed", function () { + const s: IntervalSet = IntervalSet.of(10, 20); + const s2: IntervalSet = IntervalSet.of(2, 2); s2.add(15); s2.add(18); - let expecting: string = "{15, 18}"; - let result: string = (s2.and(s)).toString(); + const expecting = "{15, 18}"; + const result: string = (s2.and(s)).toString(); assertEquals(expecting, result); - } + }) - @Test public testComplement(): void { - let s: IntervalSet = IntervalSet.of(100, 100); + it("testComplement", function () { + const s: IntervalSet = IntervalSet.of(100, 100); s.add(101, 101); - let s2: IntervalSet = IntervalSet.of(100, 102); - let expecting: string = "102"; - let result: string = (s.complement(s2)).toString(); + const s2: IntervalSet = IntervalSet.of(100, 102); + const expecting = "102"; + const result: string = (s.complement(s2)).toString(); assertEquals(expecting, result); - } + }) - @Test public testComplement2(): void { - let s: IntervalSet = IntervalSet.of(100, 101); - let s2: IntervalSet = IntervalSet.of(100, 102); - let expecting: string = "102"; - let result: string = (s.complement(s2)).toString(); + it("testComplement2", function () { + const s: IntervalSet = IntervalSet.of(100, 101); + const s2: IntervalSet = IntervalSet.of(100, 102); + const expecting = "102"; + const result: string = (s.complement(s2)).toString(); assertEquals(expecting, result); - } + }) - @Test public testComplement3(): void { - let s: IntervalSet = IntervalSet.of(1, 96); + it("testComplement3", function () { + const s: IntervalSet = IntervalSet.of(1, 96); s.add(99, Lexer.MAX_CHAR_VALUE); - let expecting: string = "{97..98}"; - let result: string = (s.complementRange(1, Lexer.MAX_CHAR_VALUE)).toString(); + const expecting = "{97..98}"; + const result: string = (s.complementRange(1, Lexer.MAX_CHAR_VALUE)).toString(); assertEquals(expecting, result); - } + }) - @Test public testMergeOfRangesAndSingleValues(): void { - // {0..41, 42, 43..65534} - let s: IntervalSet = IntervalSet.of(0, 41); + it("testMergeOfRangesAndSingleValues", function () { + // {0..41, 42, 43..65534}) + const s: IntervalSet = IntervalSet.of(0, 41); s.add(42); s.add(43, 65534); - let expecting: string = "{0..65534}"; - let result: string = s.toString(); + const expecting = "{0..65534}"; + const result: string = s.toString(); assertEquals(expecting, result); - } + }) - @Test public testMergeOfRangesAndSingleValuesReverse(): void { - let s: IntervalSet = IntervalSet.of(43, 65534); + it("testMergeOfRangesAndSingleValuesReverse", function () { + const s: IntervalSet = IntervalSet.of(43, 65534); s.add(42); s.add(0, 41); - let expecting: string = "{0..65534}"; - let result: string = s.toString(); + const expecting = "{0..65534}"; + const result: string = s.toString(); assertEquals(expecting, result); - } + }) - @Test public testMergeWhereAdditionMergesTwoExistingIntervals(): void { - // 42, 10, {0..9, 11..41, 43..65534} - let s: IntervalSet = IntervalSet.of(42); + it("testMergeWhereAdditionMergesTwoExistingIntervals", function () { + // 42, 10, {0..9, 11..41, 43..65534}) + const s: IntervalSet = IntervalSet.of(42); s.add(10); s.add(0, 9); s.add(43, 65534); s.add(11, 41); - let expecting: string = "{0..65534}"; - let result: string = s.toString(); + const expecting = "{0..65534}"; + const result: string = s.toString(); assertEquals(expecting, result); - } + }) /** * This case is responsible for antlr/antlr4#153. * https://github.com/antlr/antlr4/issues/153 */ - @Test public testMergeWhereAdditionMergesThreeExistingIntervals(): void { - let s: IntervalSet = new IntervalSet(); + it("testMergeWhereAdditionMergesThreeExistingIntervals", function () { + const s: IntervalSet = new IntervalSet(); s.add(0); s.add(3); s.add(5); s.add(0, 7); - let expecting: string = "{0..7}"; - let result: string = s.toString(); + const expecting = "{0..7}"; + const result: string = s.toString(); assertEquals(expecting, result); - } + }) - @Test public testMergeWithDoubleOverlap(): void { - let s: IntervalSet = IntervalSet.of(1, 10); + it("testMergeWithDoubleOverlap", function () { + const s: IntervalSet = IntervalSet.of(1, 10); s.add(20, 30); s.add(5, 25); // overlaps two! - let expecting: string = "{1..30}"; - let result: string = s.toString(); + const expecting = "{1..30}"; + const result: string = s.toString(); assertEquals(expecting, result); - } + }) - @Test public testSize(): void { - let s: IntervalSet = IntervalSet.of(20, 30); + it("testSize", function () { + const s: IntervalSet = IntervalSet.of(20, 30); s.add(50, 55); s.add(5, 19); - let expecting: string = "32"; - let result: string = String(s.size); + const expecting = "32"; + const result = String(s.size); assertEquals(expecting, result); - } + }) - @Test public testToArray(): void { - let s: IntervalSet = IntervalSet.of(20, 25); + it("testToArray", function () { + const s: IntervalSet = IntervalSet.of(20, 25); s.add(50, 55); s.add(5, 5); - let expecting: string = "5,20,21,22,23,24,25,50,51,52,53,54,55"; - let result: string = String(s.toArray()); + const expecting = "5,20,21,22,23,24,25,50,51,52,53,54,55"; + const result = String(s.toArray()); assertEquals(expecting, result); - } + }) /** The following was broken: * {'\u0000'..'s', 'u'..'\uFFFE'} & {'\u0000'..'q', 's'..'\uFFFE'}= @@ -384,57 +380,57 @@ export class TestIntervalSet { * 'q' is 113 ascii * 'u' is 117 */ - @Test public testNotRIntersectionNotT(): void { - let s: IntervalSet = IntervalSet.of(0, "s".charCodeAt(0)); + it("testNotRIntersectionNotT", function () { + const s: IntervalSet = IntervalSet.of(0, "s".charCodeAt(0)); s.add("u".charCodeAt(0), 200); - let s2: IntervalSet = IntervalSet.of(0, "q".charCodeAt(0)); + const s2: IntervalSet = IntervalSet.of(0, "q".charCodeAt(0)); s2.add("s".charCodeAt(0), 200); - let expecting: string = "{0..113, 115, 117..200}"; - let result: string = (s.and(s2)).toString(); + const expecting = "{0..113, 115, 117..200}"; + const result: string = (s.and(s2)).toString(); assertEquals(expecting, result); - } + }) - @Test public testRmSingleElement(): void { - let s: IntervalSet = IntervalSet.of(1, 10); + it("testRmSingleElement", function () { + const s: IntervalSet = IntervalSet.of(1, 10); s.add(-3, -3); s.remove(-3); - let expecting: string = "{1..10}"; - let result: string = s.toString(); + const expecting = "{1..10}"; + const result: string = s.toString(); assertEquals(expecting, result); - } + }) - @Test public testRmLeftSide(): void { - let s: IntervalSet = IntervalSet.of(1, 10); + it("testRmLeftSide", function () { + const s: IntervalSet = IntervalSet.of(1, 10); s.add(-3, -3); s.remove(1); - let expecting: string = "{-3, 2..10}"; - let result: string = s.toString(); + const expecting = "{-3, 2..10}"; + const result: string = s.toString(); assertEquals(expecting, result); - } + }) - @Test public testRmRightSide(): void { - let s: IntervalSet = IntervalSet.of(1, 10); + it("testRmRightSide", function () { + const s: IntervalSet = IntervalSet.of(1, 10); s.add(-3, -3); s.remove(10); - let expecting: string = "{-3, 1..9}"; - let result: string = s.toString(); + const expecting = "{-3, 1..9}"; + const result: string = s.toString(); assertEquals(expecting, result); - } + }) - @Test public testRmMiddleRange(): void { - let s: IntervalSet = IntervalSet.of(1, 10); + it("testRmMiddleRange", function () { + const s: IntervalSet = IntervalSet.of(1, 10); s.add(-3, -3); s.remove(5); - let expecting: string = "{-3, 1..4, 6..10}"; - let result: string = s.toString(); + const expecting = "{-3, 1..4, 6..10}"; + const result: string = s.toString(); assertEquals(expecting, result); - } + }) - @Test public testEmptyIsNil(): void { + it("testEmptyIsNil", function () { assertTrue(new IntervalSet().isNil); - } + }) - @Test public testNotEmptyIsNotNil(): void { + it("testNotEmptyIsNotNil", function () { assertFalse(IntervalSet.of(1).isNil); - } -} + }) +}) diff --git a/test/tool/TestParseTreeMatcher.ts b/test/tool/TestParseTreeMatcher.ts index 9507b33b..34ff5dc6 100644 --- a/test/tool/TestParseTreeMatcher.ts +++ b/test/tool/TestParseTreeMatcher.ts @@ -5,19 +5,25 @@ // ConvertTo-TS run at 2016-10-04T11:27:15.0984506-07:00 -import { CharStream } from "../../src/CharStream"; -import { CharStreams } from "../../src/CharStreams"; -import { CommonTokenStream } from "../../src/CommonTokenStream"; -import { InputMismatchException } from "../../src/InputMismatchException"; -import { Lexer } from "../../src/Lexer"; -import { NoViableAltException } from "../../src/NoViableAltException"; -import { Parser } from "../../src/Parser"; -import { ParseTree } from "../../src/tree/ParseTree"; -import { ParseTreeMatch } from "../../src/tree/pattern/ParseTreeMatch"; -import { ParseTreePattern } from "../../src/tree/pattern/ParseTreePattern"; -import { ParseTreePatternMatcher } from "../../src/tree/pattern/ParseTreePatternMatcher"; -import { Token } from "../../src/Token"; -import { TokenStream } from "../../src/TokenStream"; +import { } from "antlr4ts"; + +import * as assert from "assert"; + +import { + CharStream, + CharStreams, + CommonTokenStream, + InputMismatchException, + Lexer, + NoViableAltException, + ParseTree, + ParseTreeMatch, + ParseTreePattern, + ParseTreePatternMatcher, + Parser, + Token, + TokenStream +} from "antlr4ts"; import { ParseTreeMatcherX1Lexer } from "./gen/matcher/ParseTreeMatcherX1Lexer"; import { ParseTreeMatcherX1Parser } from "./gen/matcher/ParseTreeMatcherX1Parser"; @@ -36,105 +42,101 @@ import { ParseTreeMatcherX7Parser } from "./gen/matcher/ParseTreeMatcherX7Parser import { ParseTreeMatcherX8Lexer } from "./gen/matcher/ParseTreeMatcherX8Lexer"; import { ParseTreeMatcherX8Parser } from "./gen/matcher/ParseTreeMatcherX8Parser"; -import * as assert from "assert"; -import { suite, test as Test, skip as Ignore } from "mocha-typescript"; - -@suite -export class TestParseTreeMatcher { +describe("TestParseTreeMatcher", function () { - @Test public testChunking(): void { - let m: ParseTreePatternMatcher = this.getPatternMatcher(ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser); + it("testChunking", function () { + const m: ParseTreePatternMatcher = getPatternMatcher(ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser); assert.strictEqual(m.split(" = ;").toString(), "ID,' = ',expr,' ;'"); assert.strictEqual(m.split(" = ").toString(), "' ',ID,' = ',expr"); assert.strictEqual(m.split(" = ").toString(), "ID,' = ',expr"); assert.strictEqual(m.split("").toString(), "expr"); assert.strictEqual(m.split("\\ foo").toString(), "' foo'"); assert.strictEqual(m.split("foo \\ bar ").toString(), "'foo bar ',tag"); - } + }) - @Test public testDelimiters(): void { - let m: ParseTreePatternMatcher = this.getPatternMatcher(ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser); + it("testDelimiters", function () { + const m: ParseTreePatternMatcher = getPatternMatcher(ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser); m.setDelimiters("<<", ">>", "$"); - let result: string = m.split("<> = <> ;$<< ick $>>").toString(); + const result: string = m.split("<> = <> ;$<< ick $>>").toString(); assert.strictEqual(result, "ID,' = ',expr,' ;<< ick >>'"); - } + }) - @Test public testInvertedTags(): void { - let m: ParseTreePatternMatcher = this.getPatternMatcher(ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser); + it("testInvertedTags", function () { + const m: ParseTreePatternMatcher = getPatternMatcher(ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser); assert.throws(() => m.split(">expr<"), /^Error: tag delimiters out of order in pattern: >expr<$/); - } + }) - @Test public testUnclosedTag(): void { - let m: ParseTreePatternMatcher = this.getPatternMatcher(ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser); + it("testUnclosedTag", function () { + const m: ParseTreePatternMatcher = getPatternMatcher(ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser); assert.throws(() => m.split(" m.split(" >"), /^Error: missing start tag in pattern: >$/); - } + }) - @Test public testTokenizingPattern(): void { - let m: ParseTreePatternMatcher = this.getPatternMatcher(ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser); + it("testTokenizingPattern", function () { + const m: ParseTreePatternMatcher = getPatternMatcher(ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser); - let tokens: Token[] = m.tokenize(" = ;"); - let results: string = tokens.toString(); - let expected: string = "ID:3,[@-1,1:1='=',<1>,1:1],expr:7,[@-1,1:1=';',<2>,1:1]"; + const tokens: Token[] = m.tokenize(" = ;"); + const results: string = tokens.toString(); + const expected = "ID:3,[@-1,1:1='=',<1>,1:1],expr:7,[@-1,1:1=';',<2>,1:1]"; assert.strictEqual(results, expected); - } + }) - @Test public testCompilingPattern(): void { - let m: ParseTreePatternMatcher = this.getPatternMatcher(ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser); + it("testCompilingPattern", function () { + const m: ParseTreePatternMatcher = getPatternMatcher(ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser); - let t: ParseTreePattern = m.compile(" = ;", ParseTreeMatcherX1Parser.RULE_s); - let results: string = t.patternTree.toStringTree(m.parser); - let expected: string = "(s = (expr ) ;)"; + const t: ParseTreePattern = m.compile(" = ;", ParseTreeMatcherX1Parser.RULE_s); + const results: string = t.patternTree.toStringTree(m.parser); + const expected = "(s = (expr ) ;)"; assert.strictEqual(results, expected); - } + }) - @Test public testCompilingPatternConsumesAllTokens(): void { - let m: ParseTreePatternMatcher = this.getPatternMatcher(ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser); + it("testCompilingPatternConsumesAllTokens", function () { + const m: ParseTreePatternMatcher = getPatternMatcher(ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser); assert.throws(() => m.compile(" = ; extra", ParseTreeMatcherX1Parser.RULE_s), ParseTreePatternMatcher.StartRuleDoesNotConsumeFullPattern); - } + }) - @Test public testPatternMatchesStartRule(): void { - let m: ParseTreePatternMatcher = this.getPatternMatcher(ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser); + it("testPatternMatchesStartRule", function () { + const m: ParseTreePatternMatcher = getPatternMatcher(ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser); assert.throws(() => m.compile(" ;", ParseTreeMatcherX1Parser.RULE_s), InputMismatchException); - } + }) - @Test public testPatternMatchesStartRule2(): void { - let m: ParseTreePatternMatcher = this.getPatternMatcher(ParseTreeMatcherX3Lexer, ParseTreeMatcherX3Parser); + it("testPatternMatchesStartRule2", function () { + const m: ParseTreePatternMatcher = getPatternMatcher(ParseTreeMatcherX3Lexer, ParseTreeMatcherX3Parser); assert.throws(() => m.compile(" ;", ParseTreeMatcherX3Parser.RULE_s), NoViableAltException); - } + }) - @Test public testHiddenTokensNotSeenByTreePatternParser(): void { - let m: ParseTreePatternMatcher = this.getPatternMatcher(ParseTreeMatcherX2Lexer, ParseTreeMatcherX2Parser); + it("testHiddenTokensNotSeenByTreePatternParser", function () { + const m: ParseTreePatternMatcher = getPatternMatcher(ParseTreeMatcherX2Lexer, ParseTreeMatcherX2Parser); - let t: ParseTreePattern = m.compile(" = ;", ParseTreeMatcherX3Parser.RULE_s); - let results: string = t.patternTree.toStringTree(m.parser); - let expected: string = "(s = (expr ) ;)"; + const t: ParseTreePattern = m.compile(" = ;", ParseTreeMatcherX3Parser.RULE_s); + const results: string = t.patternTree.toStringTree(m.parser); + const expected = "(s = (expr ) ;)"; assert.strictEqual(results, expected); - } + }) - @Test public testCompilingMultipleTokens(): void { - let m: ParseTreePatternMatcher = this.getPatternMatcher(ParseTreeMatcherX4Lexer, ParseTreeMatcherX4Parser); + it("testCompilingMultipleTokens", function () { + const m: ParseTreePatternMatcher = getPatternMatcher(ParseTreeMatcherX4Lexer, ParseTreeMatcherX4Parser); - let t: ParseTreePattern = m.compile(" = ;", ParseTreeMatcherX4Parser.RULE_s); - let results: string = t.patternTree.toStringTree(m.parser); - let expected: string = "(s = ;)"; + const t: ParseTreePattern = m.compile(" = ;", ParseTreeMatcherX4Parser.RULE_s); + const results: string = t.patternTree.toStringTree(m.parser); + const expected = "(s = ;)"; assert.strictEqual(results, expected); - } - - @Test public async testIDNodeMatches(): Promise { - let input: string = "x ;"; - let pattern: string = ";"; - await this.checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX5Parser.RULE_s, input, pattern, ParseTreeMatcherX5Lexer, ParseTreeMatcherX5Parser); - } - - @Test public async testIDNodeWithLabelMatches(): Promise { - let input: string = "x ;"; - let pattern: string = ";"; - let m: ParseTreeMatch = await this.checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX5Parser.RULE_s, input, pattern, ParseTreeMatcherX5Lexer, ParseTreeMatcherX5Parser); + }) + + it("testIDNodeMatches", async function () { + const input = "x ;"; + const pattern = ";"; + await checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX5Parser.RULE_s, input, pattern, ParseTreeMatcherX5Lexer, ParseTreeMatcherX5Parser); + }) + + it("testIDNodeWithLabelMatches", async function () { + const input = "x ;"; + const pattern = ";"; + const m: ParseTreeMatch = await checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX5Parser.RULE_s, input, pattern, ParseTreeMatcherX5Lexer, ParseTreeMatcherX5Parser); assert.strictEqual([...m.labels.keys()].toString(), "ID,id"); assert.strictEqual(m.labels.get("ID")!.toString(), "x"); assert.strictEqual(m.labels.get("id")!.toString(), "x"); @@ -147,12 +149,12 @@ export class TestParseTreeMatcher { assert.strictEqual(m.get("undefined"), undefined); assert.strictEqual(m.getAll("undefined").toString(), ""); - } + }) - @Test public async testLabelGetsLastIDNode(): Promise { - let input: string = "x y;"; - let pattern: string = " ;"; - let m: ParseTreeMatch = await this.checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX6Parser.RULE_s, input, pattern, ParseTreeMatcherX6Lexer, ParseTreeMatcherX6Parser); + it("testLabelGetsLastIDNode", async function () { + const input = "x y;"; + const pattern = " ;"; + const m: ParseTreeMatch = await checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX6Parser.RULE_s, input, pattern, ParseTreeMatcherX6Lexer, ParseTreeMatcherX6Parser); assert.strictEqual([...m.labels.keys()].toString(), "ID,id"); assert.strictEqual(m.labels.get("ID")!.toString(), "x,y"); assert.strictEqual(m.labels.get("id")!.toString(), "x,y"); @@ -165,12 +167,12 @@ export class TestParseTreeMatcher { assert.strictEqual(m.get("undefined"), undefined); assert.strictEqual(m.getAll("undefined").toString(), ""); - } + }) - @Test public async testIDNodeWithMultipleLabelMatches(): Promise { - let input: string = "x y z;"; - let pattern: string = " ;"; - let m: ParseTreeMatch = await this.checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX7Parser.RULE_s, input, pattern, ParseTreeMatcherX7Lexer, ParseTreeMatcherX7Parser); + it("testIDNodeWithMultipleLabelMatches", async function () { + const input = "x y z;"; + const pattern = " ;"; + const m: ParseTreeMatch = await checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX7Parser.RULE_s, input, pattern, ParseTreeMatcherX7Lexer, ParseTreeMatcherX7Parser); assert.strictEqual([...m.labels.keys()].toString(), "ID,a,b"); assert.strictEqual(m.labels.get("ID")!.toString(), "x,y,z"); assert.strictEqual(m.labels.get("a")!.toString(), "x,z"); @@ -189,87 +191,87 @@ export class TestParseTreeMatcher { assert.strictEqual(m.get("undefined"), undefined); assert.strictEqual(m.getAll("undefined").toString(), ""); - } + }) - @Test public async testTokenAndRuleMatch(): Promise { - let input: string = "x = 99;"; - let pattern: string = " = ;"; - await this.checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX1Parser.RULE_s, input, pattern, ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser); - } + it("testTokenAndRuleMatch", async function () { + const input = "x = 99;"; + const pattern = " = ;"; + await checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX1Parser.RULE_s, input, pattern, ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser); + }) - @Test public async testTokenTextMatch(): Promise { - let input: string = "x = 0;"; - let pattern: string = " = 1;"; - let invertMatch: boolean = true; // 0!=1 - await this.checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX1Parser.RULE_s, input, pattern, ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser, invertMatch); + it("testTokenTextMatch", async function () { + let input = "x = 0;"; + let pattern = " = 1;"; + let invertMatch = true; // 0!=1 + await checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX1Parser.RULE_s, input, pattern, ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser, invertMatch); input = "x = 0;"; pattern = " = 0;"; invertMatch = false; - await this.checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX1Parser.RULE_s, input, pattern, ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser, invertMatch); + await checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX1Parser.RULE_s, input, pattern, ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser, invertMatch); input = "x = 0;"; pattern = "x = 0;"; invertMatch = false; - await this.checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX1Parser.RULE_s, input, pattern, ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser, invertMatch); + await checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX1Parser.RULE_s, input, pattern, ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser, invertMatch); input = "x = 0;"; pattern = "y = 0;"; invertMatch = true; - await this.checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX1Parser.RULE_s, input, pattern, ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser, invertMatch); - } - - @Test public async testAssign(): Promise { - let input: string = "x = 99;"; - let pattern: string = " = ;"; - await this.checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX8Parser.RULE_s, input, pattern, ParseTreeMatcherX8Lexer, ParseTreeMatcherX8Parser); - } - - @Test public async testLRecursiveExpr(): Promise { - let input: string = "3*4*5"; - let pattern: string = " * * "; - await this.checkPatternMatch((parser) => parser.expr(), ParseTreeMatcherX8Parser.RULE_expr, input, pattern, ParseTreeMatcherX8Lexer, ParseTreeMatcherX8Parser); - } - - private execParser( + await checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX1Parser.RULE_s, input, pattern, ParseTreeMatcherX1Lexer, ParseTreeMatcherX1Parser, invertMatch); + }) + + it("testAssign", async function () { + const input = "x = 99;"; + const pattern = " = ;"; + await checkPatternMatch((parser) => parser.s(), ParseTreeMatcherX8Parser.RULE_s, input, pattern, ParseTreeMatcherX8Lexer, ParseTreeMatcherX8Parser); + }) + + it("testLRecursiveExpr", async function () { + const input = "3*4*5"; + const pattern = " * * "; + await checkPatternMatch((parser) => parser.expr(), ParseTreeMatcherX8Parser.RULE_expr, input, pattern, ParseTreeMatcherX8Lexer, ParseTreeMatcherX8Parser); + }) + + function execParser( startRule: (parser: TParser) => ParseTree, input: string, - lexerCtor: {new(stream: CharStream): Lexer}, - parserCtor: {new(stream: TokenStream): TParser}): ParseTree { + lexerCtor: new (stream: CharStream) => Lexer, + parserCtor: new (stream: TokenStream) => TParser): ParseTree { - let lexer = new lexerCtor(CharStreams.fromString(input)); - let parser = new parserCtor(new CommonTokenStream(lexer)); + const lexer = new lexerCtor(CharStreams.fromString(input)); + const parser = new parserCtor(new CommonTokenStream(lexer)); return startRule(parser); } - private async checkPatternMatch( + function checkPatternMatch( startRule: (parser: TParser) => ParseTree, startRuleIndex: number, input: string, pattern: string, - lexerCtor: {new(stream: CharStream): Lexer}, - parserCtor: {new(stream: TokenStream): TParser}, - invertMatch: boolean = false): Promise { + lexerCtor: new (stream: CharStream) => Lexer, + parserCtor: new (stream: TokenStream) => TParser, + invertMatch = false): ParseTreeMatch { - let result: ParseTree = this.execParser(startRule, input, lexerCtor, parserCtor); + const result: ParseTree = execParser(startRule, input, lexerCtor, parserCtor); - let p: ParseTreePattern = await this.getPattern(lexerCtor, parserCtor, pattern, startRuleIndex); - let match: ParseTreeMatch = p.match(result); - let matched: boolean = match.succeeded; + const p: ParseTreePattern = getPattern(lexerCtor, parserCtor, pattern, startRuleIndex); + const match: ParseTreeMatch = p.match(result); + const matched: boolean = match.succeeded; assert.strictEqual(matched, !invertMatch); return match; } - private async getPattern(lexerCtor: {new(stream: CharStream): Lexer}, parserCtor: {new(stream: TokenStream): Parser}, pattern: string, ruleIndex: number): Promise { - let lexer: Lexer = new lexerCtor(CharStreams.fromString("")); - let parser: Parser = new parserCtor(new CommonTokenStream(lexer)); + function getPattern(lexerCtor: new (stream: CharStream) => Lexer, parserCtor: new (stream: TokenStream) => Parser, pattern: string, ruleIndex: number): ParseTreePattern { + const lexer: Lexer = new lexerCtor(CharStreams.fromString("")); + const parser: Parser = new parserCtor(new CommonTokenStream(lexer)); return parser.compileParseTreePattern(pattern, ruleIndex); } - private getPatternMatcher(lexerCtor: {new(stream: CharStream): Lexer}, parserCtor: {new(stream: TokenStream): Parser}): ParseTreePatternMatcher { - let lexer: Lexer = new lexerCtor(CharStreams.fromString("")); - let parser: Parser = new parserCtor(new CommonTokenStream(lexer)); + function getPatternMatcher(lexerCtor: new (stream: CharStream) => Lexer, parserCtor: new (stream: TokenStream) => Parser): ParseTreePatternMatcher { + const lexer: Lexer = new lexerCtor(CharStreams.fromString("")); + const parser: Parser = new parserCtor(new CommonTokenStream(lexer)); return new ParseTreePatternMatcher(lexer, parser); } -} +}) diff --git a/test/tool/TestTokenStreamRewriter.ts b/test/tool/TestTokenStreamRewriter.ts index 147630b0..73446e56 100644 --- a/test/tool/TestTokenStreamRewriter.ts +++ b/test/tool/TestTokenStreamRewriter.ts @@ -11,116 +11,117 @@ // import static org.junit.Assert.assertEquals; // import static org.junit.Assert.assertNotNull; -import { CharStream } from "../../src/CharStream"; -import { CharStreams } from "../../src/CharStreams"; -import { CommonTokenStream } from "../../src/CommonTokenStream"; -import { Interval } from "../../src/misc/Interval"; -import { Lexer } from "../../src/Lexer"; -import { LexerInterpreter } from "../../src/LexerInterpreter"; -import { TokenStreamRewriter } from "../../src/TokenStreamRewriter"; +import * as assert from "assert"; + +import { + CharStream, + CharStreams, + CommonTokenStream, + Interval, + Lexer, + LexerInterpreter, + TokenStreamRewriter +} from "antlr4ts"; import { RewriterLexer1 } from "./gen/rewriter/RewriterLexer1"; import { RewriterLexer2 } from "./gen/rewriter/RewriterLexer2"; import { RewriterLexer3 } from "./gen/rewriter/RewriterLexer3"; -import * as assert from "assert"; -import { suite, test as Test, skip as Ignore } from "mocha-typescript"; - -@suite -export class TestTokenStreamRewriter { +describe("TestTokenStreamRewriter", function () { - private createLexerInterpreter(input: string, lexerCtor: {new(stream: CharStream): Lexer}): LexerInterpreter { - let stream = CharStreams.fromString(input); - let lexer = new lexerCtor(stream); + // tslint:disable-next-line: callable-types + function createLexerInterpreter(input: string, lexerCtor: { new(stream: CharStream): Lexer }): LexerInterpreter { + const stream = CharStreams.fromString(input); + const lexer = new lexerCtor(stream); return new LexerInterpreter(lexer.grammarFileName, lexer.vocabulary, lexer.ruleNames, lexer.channelNames, lexer.modeNames, lexer.atn, stream); } - @Test public testInsertBeforeIndex0(): void { - let lexEngine: LexerInterpreter = this.createLexerInterpreter("abc", RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testInsertBeforeIndex0", function () { + const lexEngine: LexerInterpreter = createLexerInterpreter("abc", RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.insertBefore(0, "0"); - let result: string = tokens.getText(); - let expecting: string = "0abc"; + const result: string = tokens.getText(); + const expecting = "0abc"; assert.strictEqual(result, expecting); - } + }) - @Test public testInsertAfterLastIndex(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testInsertAfterLastIndex", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.insertAfter(2, "x"); - let result: string = tokens.getText(); - let expecting: string = "abcx"; + const result: string = tokens.getText(); + const expecting = "abcx"; assert.strictEqual(result, expecting); - } + }) - @Test public test2InsertBeforeAfterMiddleIndex(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("test2InsertBeforeAfterMiddleIndex", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.insertBefore(1, "x"); tokens.insertAfter(1, "x"); - let result: string = tokens.getText(); - let expecting: string = "axbxc"; + const result: string = tokens.getText(); + const expecting = "axbxc"; assert.strictEqual(result, expecting); - } + }) - @Test public testReplaceIndex0(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testReplaceIndex0", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replaceSingle(0, "x"); - let result: string = tokens.getText(); - let expecting: string = "xbc"; + const result: string = tokens.getText(); + const expecting = "xbc"; assert.strictEqual(result, expecting); - } + }) - @Test public testReplaceLastIndex(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testReplaceLastIndex", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replaceSingle(2, "x"); - let result: string = tokens.getText(); - let expecting: string = "abx"; + const result: string = tokens.getText(); + const expecting = "abx"; assert.strictEqual(result, expecting); - } + }) - @Test public testReplaceMiddleIndex(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testReplaceMiddleIndex", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replaceSingle(1, "x"); - let result: string = tokens.getText(); - let expecting: string = "axc"; + const result: string = tokens.getText(); + const expecting = "axc"; assert.strictEqual(result, expecting); - } + }) - @Test public testToStringStartStop(): void { + it("testToStringStartStop", function () { // Tokens: 0123456789 // Input: x = 3 * 0; - let input: string = "x = 3 * 0;"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer2); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + const input = "x = 3 * 0;"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer2); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replace(4, 8, "0"); stream.fill(); -// replace 3 * 0 with 0 + // replace 3 * 0 with 0 - let result: string = tokens.getTokenStream().getText(); - let expecting: string = "x = 3 * 0;"; + let result: string = tokens.getTokenStream().getText(); + let expecting = "x = 3 * 0;"; assert.strictEqual(result, expecting); result = tokens.getText(); @@ -134,24 +135,24 @@ export class TestTokenStreamRewriter { result = tokens.getText(Interval.of(4, 8)); expecting = "0"; assert.strictEqual(result, expecting); - } + }) - @Test public testToStringStartStop2(): void { + it("testToStringStartStop2", function () { // Tokens: 012345678901234567 // Input: x = 3 * 0 + 2 * 0; - let input: string = "x = 3 * 0 + 2 * 0;"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer3); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + const input = "x = 3 * 0 + 2 * 0;"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer3); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); - let result: string = tokens.getTokenStream().getText(); - let expecting: string = "x = 3 * 0 + 2 * 0;"; + let result: string = tokens.getTokenStream().getText(); + let expecting = "x = 3 * 0 + 2 * 0;"; assert.strictEqual(result, expecting); tokens.replace(4, 8, "0"); stream.fill(); -// replace 3 * 0 with 0 + // replace 3 * 0 with 0 result = tokens.getText(); expecting = "x = 0 + 2 * 0;"; assert.strictEqual(result, expecting); @@ -179,57 +180,57 @@ export class TestTokenStreamRewriter { result = tokens.getText(Interval.of(0, 8)); stream.fill(); -// try again after insert at end + // try again after insert at end expecting = "x = 0"; assert.strictEqual(result, expecting); - } + }) - @Test public test2ReplaceMiddleIndex(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("test2ReplaceMiddleIndex", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replaceSingle(1, "x"); tokens.replaceSingle(1, "y"); - let result: string = tokens.getText(); - let expecting: string = "ayc"; + const result: string = tokens.getText(); + const expecting = "ayc"; assert.strictEqual(result, expecting); - } + }) - @Test public test2ReplaceMiddleIndex1InsertBefore(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("test2ReplaceMiddleIndex1InsertBefore", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.insertBefore(0, "_"); tokens.replaceSingle(1, "x"); tokens.replaceSingle(1, "y"); - let result: string = tokens.getText(); - let expecting: string = "_ayc"; + const result: string = tokens.getText(); + const expecting = "_ayc"; assert.strictEqual(result, expecting); - } + }) - @Test public testReplaceThenDeleteMiddleIndex(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testReplaceThenDeleteMiddleIndex", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replaceSingle(1, "x"); tokens.delete(1); - let result: string = tokens.getText(); - let expecting: string = "ac"; + const result: string = tokens.getText(); + const expecting = "ac"; assert.strictEqual(result, expecting); - } + }) - @Test public testInsertInPriorReplace(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testInsertInPriorReplace", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replace(0, 2, "x"); tokens.insertBefore(1, "0"); let exc: Error | undefined; @@ -244,112 +245,112 @@ export class TestTokenStreamRewriter { exc = iae; } - let expecting: string = "insert op ,1:1]:\"0\"> within boundaries of previous ,1:0]..[@2,2:2='c',<3>,1:2]:\"x\">"; + const expecting = "insert op ,1:1]:\"0\"> within boundaries of previous ,1:0]..[@2,2:2='c',<3>,1:2]:\"x\">"; assert.notStrictEqual(exc, null); assert.notStrictEqual(exc, undefined); assert.strictEqual(exc!.message, expecting); - } + }) - @Test public testInsertThenReplaceSameIndex(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testInsertThenReplaceSameIndex", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.insertBefore(0, "0"); tokens.replaceSingle(0, "x"); stream.fill(); -// supercedes insert at 0 - let result: string = tokens.getText(); - let expecting: string = "0xbc"; + // supercedes insert at 0 + const result: string = tokens.getText(); + const expecting = "0xbc"; assert.strictEqual(result, expecting); - } + }) - @Test public test2InsertMiddleIndex(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("test2InsertMiddleIndex", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.insertBefore(1, "x"); tokens.insertBefore(1, "y"); - let result: string = tokens.getText(); - let expecting: string = "ayxbc"; + const result: string = tokens.getText(); + const expecting = "ayxbc"; assert.strictEqual(result, expecting); - } + }) - @Test public test2InsertThenReplaceIndex0(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("test2InsertThenReplaceIndex0", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.insertBefore(0, "x"); tokens.insertBefore(0, "y"); tokens.replaceSingle(0, "z"); - let result: string = tokens.getText(); - let expecting: string = "yxzbc"; + const result: string = tokens.getText(); + const expecting = "yxzbc"; assert.strictEqual(result, expecting); - } + }) - @Test public testReplaceThenInsertBeforeLastIndex(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testReplaceThenInsertBeforeLastIndex", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replaceSingle(2, "x"); tokens.insertBefore(2, "y"); - let result: string = tokens.getText(); - let expecting: string = "abyx"; + const result: string = tokens.getText(); + const expecting = "abyx"; assert.strictEqual(result, expecting); - } + }) - @Test public testInsertThenReplaceLastIndex(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testInsertThenReplaceLastIndex", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.insertBefore(2, "y"); tokens.replaceSingle(2, "x"); - let result: string = tokens.getText(); - let expecting: string = "abyx"; + const result: string = tokens.getText(); + const expecting = "abyx"; assert.strictEqual(result, expecting); - } + }) - @Test public testReplaceThenInsertAfterLastIndex(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testReplaceThenInsertAfterLastIndex", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replaceSingle(2, "x"); tokens.insertAfter(2, "y"); - let result: string = tokens.getText(); - let expecting: string = "abxy"; + const result: string = tokens.getText(); + const expecting = "abxy"; assert.strictEqual(result, expecting); - } + }) - @Test public testReplaceRangeThenInsertAtLeftEdge(): void { - let input: string = "abcccba"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testReplaceRangeThenInsertAtLeftEdge", function () { + const input = "abcccba"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replace(2, 4, "x"); tokens.insertBefore(2, "y"); - let result: string = tokens.getText(); - let expecting: string = "abyxba"; + const result: string = tokens.getText(); + const expecting = "abyxba"; assert.strictEqual(result, expecting); - } + }) - @Test public testReplaceRangeThenInsertAtRightEdge(): void { - let input: string = "abcccba"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testReplaceRangeThenInsertAtRightEdge", function () { + const input = "abcccba"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replace(2, 4, "x"); tokens.insertBefore(4, "y"); stream.fill(); // no effect; within range of a replace @@ -365,59 +366,59 @@ export class TestTokenStreamRewriter { exc = iae; } - let expecting: string = "insert op ,1:4]:\"y\"> within boundaries of previous ,1:2]..[@4,4:4='c',<3>,1:4]:\"x\">"; + const expecting = "insert op ,1:4]:\"y\"> within boundaries of previous ,1:2]..[@4,4:4='c',<3>,1:4]:\"x\">"; assert.notStrictEqual(exc, null); assert.notStrictEqual(exc, undefined); assert.strictEqual(exc!.message, expecting); - } + }) - @Test public testReplaceRangeThenInsertAfterRightEdge(): void { - let input: string = "abcccba"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testReplaceRangeThenInsertAfterRightEdge", function () { + const input = "abcccba"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replace(2, 4, "x"); tokens.insertAfter(4, "y"); - let result: string = tokens.getText(); - let expecting: string = "abxyba"; + const result: string = tokens.getText(); + const expecting = "abxyba"; assert.strictEqual(result, expecting); - } + }) - @Test public testReplaceAll(): void { - let input: string = "abcccba"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testReplaceAll", function () { + const input = "abcccba"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replace(0, 6, "x"); - let result: string = tokens.getText(); - let expecting: string = "x"; + const result: string = tokens.getText(); + const expecting = "x"; assert.strictEqual(result, expecting); - } + }) - @Test public testReplaceSubsetThenFetch(): void { - let input: string = "abcccba"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testReplaceSubsetThenFetch", function () { + const input = "abcccba"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replace(2, 4, "xyz"); - let result: string = tokens.getText(Interval.of(0, 6)); - let expecting: string = "abxyzba"; + const result: string = tokens.getText(Interval.of(0, 6)); + const expecting = "abxyzba"; assert.strictEqual(result, expecting); - } + }) - @Test public testReplaceThenReplaceSuperset(): void { - let input: string = "abcccba"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testReplaceThenReplaceSuperset", function () { + const input = "abcccba"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replace(2, 4, "xyz"); tokens.replace(3, 5, "foo"); stream.fill(); -// overlaps, error + // overlaps, error let exc: Error | undefined; try { tokens.getText(); @@ -430,22 +431,22 @@ export class TestTokenStreamRewriter { exc = iae; } - let expecting: string = "replace op boundaries of ,1:3]..[@5,5:5='b',<2>,1:5]:\"foo\"> overlap with previous ,1:2]..[@4,4:4='c',<3>,1:4]:\"xyz\">"; + const expecting = "replace op boundaries of ,1:3]..[@5,5:5='b',<2>,1:5]:\"foo\"> overlap with previous ,1:2]..[@4,4:4='c',<3>,1:4]:\"xyz\">"; assert.notStrictEqual(exc, null); assert.notStrictEqual(exc, undefined); assert.strictEqual(exc!.message, expecting); - } + }) - @Test public testReplaceThenReplaceLowerIndexedSuperset(): void { - let input: string = "abcccba"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testReplaceThenReplaceLowerIndexedSuperset", function () { + const input = "abcccba"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replace(2, 4, "xyz"); tokens.replace(1, 3, "foo"); stream.fill(); -// overlap, error + // overlap, error let exc: Error | undefined; try { tokens.getText(); @@ -458,123 +459,123 @@ export class TestTokenStreamRewriter { exc = iae; } - let expecting: string = "replace op boundaries of ,1:1]..[@3,3:3='c',<3>,1:3]:\"foo\"> overlap with previous ,1:2]..[@4,4:4='c',<3>,1:4]:\"xyz\">"; + const expecting = "replace op boundaries of ,1:1]..[@3,3:3='c',<3>,1:3]:\"foo\"> overlap with previous ,1:2]..[@4,4:4='c',<3>,1:4]:\"xyz\">"; assert.notStrictEqual(exc, null); assert.notStrictEqual(exc, undefined); assert.strictEqual(exc!.message, expecting); - } + }) - @Test public testReplaceSingleMiddleThenOverlappingSuperset(): void { - let input: string = "abcba"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testReplaceSingleMiddleThenOverlappingSuperset", function () { + const input = "abcba"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replace(2, 2, "xyz"); tokens.replace(0, 3, "foo"); - let result: string = tokens.getText(); - let expecting: string = "fooa"; + const result: string = tokens.getText(); + const expecting = "fooa"; assert.strictEqual(result, expecting); - } + }) - @Test public testCombineInserts(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testCombineInserts", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.insertBefore(0, "x"); tokens.insertBefore(0, "y"); - let result: string = tokens.getText(); - let expecting: string = "yxabc"; + const result: string = tokens.getText(); + const expecting = "yxabc"; assert.strictEqual(result, expecting); - } + }) - @Test public testCombine3Inserts(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testCombine3Inserts", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.insertBefore(1, "x"); tokens.insertBefore(0, "y"); tokens.insertBefore(1, "z"); - let result: string = tokens.getText(); - let expecting: string = "yazxbc"; + const result: string = tokens.getText(); + const expecting = "yazxbc"; assert.strictEqual(result, expecting); - } + }) - @Test public testCombineInsertOnLeftWithReplace(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testCombineInsertOnLeftWithReplace", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replace(0, 2, "foo"); tokens.insertBefore(0, "z"); stream.fill(); -// combine with left edge of rewrite - let result: string = tokens.getText(); - let expecting: string = "zfoo"; + // combine with left edge of rewrite + const result: string = tokens.getText(); + const expecting = "zfoo"; assert.strictEqual(result, expecting); - } + }) - @Test public testCombineInsertOnLeftWithDelete(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testCombineInsertOnLeftWithDelete", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.delete(0, 2); tokens.insertBefore(0, "z"); stream.fill(); -// combine with left edge of rewrite - let result: string = tokens.getText(); - let expecting: string = "z"; + // combine with left edge of rewrite + const result: string = tokens.getText(); + const expecting = "z"; stream.fill(); -// make sure combo is not znull + // make sure combo is not znull assert.strictEqual(result, expecting); - } + }) - @Test public testDisjointInserts(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testDisjointInserts", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.insertBefore(1, "x"); tokens.insertBefore(2, "y"); tokens.insertBefore(0, "z"); - let result: string = tokens.getText(); - let expecting: string = "zaxbyc"; + const result: string = tokens.getText(); + const expecting = "zaxbyc"; assert.strictEqual(result, expecting); - } + }) - @Test public testOverlappingReplace(): void { - let input: string = "abcc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testOverlappingReplace", function () { + const input = "abcc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replace(1, 2, "foo"); tokens.replace(0, 3, "bar"); stream.fill(); -// wipes prior nested replace - let result: string = tokens.getText(); - let expecting: string = "bar"; + // wipes prior nested replace + const result: string = tokens.getText(); + const expecting = "bar"; assert.strictEqual(result, expecting); - } + }) - @Test public testOverlappingReplace2(): void { - let input: string = "abcc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testOverlappingReplace2", function () { + const input = "abcc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replace(0, 3, "bar"); tokens.replace(1, 2, "foo"); stream.fill(); -// cannot split earlier replace + // cannot split earlier replace let exc: Error | undefined; try { tokens.getText(); @@ -587,154 +588,151 @@ export class TestTokenStreamRewriter { exc = iae; } - let expecting: string = "replace op boundaries of ,1:1]..[@2,2:2='c',<3>,1:2]:\"foo\"> overlap with previous ,1:0]..[@3,3:3='c',<3>,1:3]:\"bar\">"; + const expecting = "replace op boundaries of ,1:1]..[@2,2:2='c',<3>,1:2]:\"foo\"> overlap with previous ,1:0]..[@3,3:3='c',<3>,1:3]:\"bar\">"; assert.notStrictEqual(exc, null); assert.notStrictEqual(exc, undefined); assert.strictEqual(exc!.message, expecting); - } + }) - @Test public testOverlappingReplace3(): void { - let input: string = "abcc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testOverlappingReplace3", function () { + const input = "abcc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replace(1, 2, "foo"); tokens.replace(0, 2, "bar"); stream.fill(); -// wipes prior nested replace - let result: string = tokens.getText(); - let expecting: string = "barc"; + // wipes prior nested replace + const result: string = tokens.getText(); + const expecting = "barc"; assert.strictEqual(result, expecting); - } + }) - @Test public testOverlappingReplace4(): void { - let input: string = "abcc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testOverlappingReplace4", function () { + const input = "abcc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replace(1, 2, "foo"); tokens.replace(1, 3, "bar"); stream.fill(); -// wipes prior nested replace - let result: string = tokens.getText(); - let expecting: string = "abar"; + // wipes prior nested replace + const result: string = tokens.getText(); + const expecting = "abar"; assert.strictEqual(result, expecting); - } + }) - @Test public testDropIdenticalReplace(): void { - let input: string = "abcc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testDropIdenticalReplace", function () { + const input = "abcc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replace(1, 2, "foo"); tokens.replace(1, 2, "foo"); stream.fill(); -// drop previous, identical - let result: string = tokens.getText(); - let expecting: string = "afooc"; + // drop previous, identical + const result: string = tokens.getText(); + const expecting = "afooc"; assert.strictEqual(result, expecting); - } + }) - @Test public testDropPrevCoveredInsert(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testDropPrevCoveredInsert", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.insertBefore(1, "foo"); tokens.replace(1, 2, "foo"); stream.fill(); -// kill prev insert - let result: string = tokens.getText(); - let expecting: string = "afoofoo"; + // kill prev insert + const result: string = tokens.getText(); + const expecting = "afoofoo"; assert.strictEqual(result, expecting); - } + }) - @Test public testLeaveAloneDisjointInsert(): void { - let input: string = "abcc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testLeaveAloneDisjointInsert", function () { + const input = "abcc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.insertBefore(1, "x"); tokens.replace(2, 3, "foo"); - let result: string = tokens.getText(); - let expecting: string = "axbfoo"; + const result: string = tokens.getText(); + const expecting = "axbfoo"; assert.strictEqual(result, expecting); - } + }) - @Test public testLeaveAloneDisjointInsert2(): void { - let input: string = "abcc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testLeaveAloneDisjointInsert2", function () { + const input = "abcc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.replace(2, 3, "foo"); tokens.insertBefore(1, "x"); - let result: string = tokens.getText(); - let expecting: string = "axbfoo"; + const result: string = tokens.getText(); + const expecting = "axbfoo"; assert.strictEqual(result, expecting); - } + }) - @Test public testInsertBeforeTokenThenDeleteThatToken(): void { - let input: string = "abc"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testInsertBeforeTokenThenDeleteThatToken", function () { + const input = "abc"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.insertBefore(2, "y"); tokens.delete(2); - let result: string = tokens.getText(); - let expecting: string = "aby"; + const result: string = tokens.getText(); + const expecting = "aby"; assert.strictEqual(result, expecting); - } + }) // Test for https://github.com/antlr/antlr4/issues/550 - @Test - public testDistinguishBetweenInsertAfterAndInsertBeforeToPreserverOrder(): void { - let input: string = "aa"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testDistinguishBetweenInsertAfterAndInsertBeforeToPreserverOrder", function () { + const input = "aa"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.insertBefore(0, ""); tokens.insertAfter(0, ""); tokens.insertBefore(1, ""); tokens.insertAfter(1, ""); - let result: string = tokens.getText(); - let expecting: string = "aa"; // fails with aa" + const result: string = tokens.getText(); + const expecting = "aa"; // fails with aa" assert.strictEqual(result, expecting); - } + }) - @Test - public testDistinguishBetweenInsertAfterAndInsertBeforeToPreserverOrder2(): void { - let input: string = "aa"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testDistinguishBetweenInsertAfterAndInsertBeforeToPreserverOrder2", function () { + const input = "aa"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.insertBefore(0, "

"); tokens.insertBefore(0, ""); tokens.insertAfter(0, "

"); tokens.insertAfter(0, ""); tokens.insertBefore(1, ""); tokens.insertAfter(1, ""); - let result: string = tokens.getText(); - let expecting: string = "

a

a"; + const result: string = tokens.getText(); + const expecting = "

a

a"; assert.strictEqual(result, expecting); - } + }) // Test for https://github.com/antlr/antlr4/issues/550 - @Test - public testPreservesOrderOfContiguousInserts(): void { - let input: string = "ab"; - let lexEngine: LexerInterpreter = this.createLexerInterpreter(input, RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testPreservesOrderOfContiguousInserts", function () { + const input = "ab"; + const lexEngine: LexerInterpreter = createLexerInterpreter(input, RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.insertBefore(0, "

"); tokens.insertBefore(0, ""); tokens.insertBefore(0, "

"); @@ -742,23 +740,23 @@ export class TestTokenStreamRewriter { tokens.insertAfter(0, ""); tokens.insertAfter(0, "
"); tokens.insertBefore(1, "!"); - let result: string = tokens.getText(); - let expecting: string = "

a

!b"; + const result: string = tokens.getText(); + const expecting = "

a

!b"; assert.strictEqual(result, expecting); - } + }) - @Test public testInsertLiterals(): void { - let lexEngine: LexerInterpreter = this.createLexerInterpreter("abc", RewriterLexer1); - let stream: CommonTokenStream = new CommonTokenStream(lexEngine); + it("testInsertLiterals", function () { + const lexEngine: LexerInterpreter = createLexerInterpreter("abc", RewriterLexer1); + const stream: CommonTokenStream = new CommonTokenStream(lexEngine); stream.fill(); - let tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); + const tokens: TokenStreamRewriter = new TokenStreamRewriter(stream); tokens.insertBefore(0, false); tokens.insertBefore(0, 0); tokens.insertBefore(0, {}); tokens.insertBefore(0, []); tokens.insertBefore(0, ""); - let result: string = tokens.getText(); - let expecting: string = "[object Object]0falseabc"; + const result: string = tokens.getText(); + const expecting = "[object Object]0falseabc"; assert.strictEqual(result, expecting); - } -} + }) +}) diff --git a/test/tool/TestVocabulary.ts b/test/tool/TestVocabulary.ts index bb9864dc..0550f243 100644 --- a/test/tool/TestVocabulary.ts +++ b/test/tool/TestVocabulary.ts @@ -3,24 +3,22 @@ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. */ -import { Token } from "../../src/Token"; -import { Vocabulary } from "../../src/Vocabulary"; -import { VocabularyImpl } from "../../src/VocabularyImpl"; - import * as assert from "assert"; -import { suite, test as Test, skip as Ignore } from "mocha-typescript"; + +import { Token } from "antlr4ts"; +import { Vocabulary } from "antlr4ts"; +import { VocabularyImpl } from "antlr4ts"; /** * * @author Sam Harwell */ -@suite -export class TestVocabulary { +describe("TestVocabulary", function () { - @Test public testEmptyVocabulary(): void { + it("testEmptyVocabulary", function () { assert.notStrictEqual(VocabularyImpl.EMPTY_VOCABULARY, undefined); assert.strictEqual("EOF", VocabularyImpl.EMPTY_VOCABULARY.getSymbolicName(Token.EOF)); assert.strictEqual("0", VocabularyImpl.EMPTY_VOCABULARY.getDisplayName(Token.INVALID_TYPE)); - } + }) -} +}) diff --git a/test/tool/TestXPath.ts b/test/tool/TestXPath.ts index 170ee720..e8e50bc2 100644 --- a/test/tool/TestXPath.ts +++ b/test/tool/TestXPath.ts @@ -5,32 +5,75 @@ // ConvertTo-TS run at 2016-10-04T11:27:38.8508887-07:00 -import { CharStream } from "../../src/CharStream"; -import { CharStreams } from "../../src/CharStreams"; -import { CommonTokenStream } from "../../src/CommonTokenStream"; -import { Lexer } from "../../src/Lexer"; -import { Parser } from "../../src/Parser"; -import { ParseTree } from "../../src/tree/ParseTree"; -import { RuleContext } from "../../src/RuleContext"; -import { TerminalNode } from "../../src/tree"; -import { TokenStream } from "../../src/TokenStream"; -import { XPath } from "../../src/tree/xpath/XPath"; +import * as assert from "assert"; + +import { + CharStream, + CharStreams, + CommonTokenStream, + Lexer, + ParseTree, + Parser, + RuleContext, + TerminalNode, + TokenStream, + XPath +} from "antlr4ts"; import { TestXPathLexer } from "./gen/xpath/TestXPathLexer"; import { TestXPathParser } from "./gen/xpath/TestXPathParser"; -import * as assert from "assert"; -import { suite, test as Test, skip as Ignore } from "mocha-typescript"; - const SAMPLE_PROGRAM: string = "def f(x,y) { x = 3+4; y; ; }\n" + "def g(x) { return 1+2*x; }\n"; -@suite -export class TestXPath { +describe("TestXPath", function () { + + + function testError( + input: string, + path: string, + expected: RegExp, + startRule: (parser: TParser) => ParseTree, + // tslint:disable-next-line: callable-types + lexerCtor: { new(stream: CharStream): Lexer }, + // tslint:disable-next-line: callable-types + parserCtor: { new(stream: TokenStream): TParser }): void { + + const lexer = new lexerCtor(CharStreams.fromString(input)); + const parser = new parserCtor(new CommonTokenStream(lexer)); + const tree: ParseTree = startRule(parser); + + assert.throws(() => XPath.findAll(tree, path, parser), expected); + } + + function getNodeStrings( + input: string, + xpath: string, + startRule: (parser: TParser) => ParseTree, + // tslint:disable-next-line: callable-types + lexerCtor: { new(stream: CharStream): Lexer }, + parserCtor: new (stream: TokenStream) => TParser): string[] { - @Test public testValidPaths(): void { - let xpath: string[] = [ + const lexer = new lexerCtor(CharStreams.fromString(input)); + const parser = new parserCtor(new CommonTokenStream(lexer)); + const tree: ParseTree = startRule(parser); + + const nodes: string[] = []; + for (const t of XPath.findAll(tree, xpath, parser)) { + if (t instanceof RuleContext) { + nodes.push(parser.ruleNames[t.ruleIndex]); + } else { + const token: TerminalNode = t as TerminalNode; + nodes.push(token.text); + } + } + + return nodes; + } + + it("testValidPaths", function () { + const xpath: string[] = [ "/prog/func", // all funcs under prog at root "/prog/*", // all children of prog at root "/*/func", // all func kids of any root node @@ -53,7 +96,7 @@ export class TestXPath { "/!*", // nothing at root "//expr//ID", // any ID under any expression (tests antlr/antlr4#370) ]; - let expected: string[] = [ + const expected: string[] = [ "func,func", "func,func", "func,func", @@ -78,87 +121,51 @@ export class TestXPath { ]; for (let i = 0; i < xpath.length; i++) { - let nodes: string[] = this.getNodeStrings(SAMPLE_PROGRAM, xpath[i], (parser) => parser.prog(), TestXPathLexer, TestXPathParser); - let result: string = nodes.toString(); + const nodes: string[] = getNodeStrings(SAMPLE_PROGRAM, xpath[i], (parser) => parser.prog(), TestXPathLexer, TestXPathParser); + const result: string = nodes.toString(); assert.strictEqual(result, expected[i], "path " + xpath[i] + " failed"); } - } + }) - @Test public testWeirdChar(): void { - let path: string = "&"; - let expected: RegExp = /^RangeError: Invalid tokens or characters at index 0 in path '&' -- $/; + it("testWeirdChar", function () { + const path = "&"; + const expected = /^RangeError: Invalid tokens or characters at index 0 in path '&' -- $/; - this.testError(SAMPLE_PROGRAM, path, expected, (parser) => parser.prog(), TestXPathLexer, TestXPathParser); - } + testError(SAMPLE_PROGRAM, path, expected, (parser) => parser.prog(), TestXPathLexer, TestXPathParser); + }) - @Test public testWeirdChar2(): void { - let path: string = "//w&e/"; - let expected: RegExp = /^RangeError: Invalid tokens or characters at index 3 in path '\/\/w&e\/' -- $/; + it("testWeirdChar2", function () { + const path = "//w&e/"; + const expected = /^RangeError: Invalid tokens or characters at index 3 in path '\/\/w&e\/' -- $/; - this.testError(SAMPLE_PROGRAM, path, expected, (parser) => parser.prog(), TestXPathLexer, TestXPathParser); - } + testError(SAMPLE_PROGRAM, path, expected, (parser) => parser.prog(), TestXPathLexer, TestXPathParser); + }) - @Test public testBadSyntax(): void { - let path: string = "///"; - let expected: RegExp = /^Error: \/ at index 2 isn't a valid rule name$/; + it("testBadSyntax", function () { + const path = "///"; + const expected = /^Error: \/ at index 2 isn't a valid rule name$/; - this.testError(SAMPLE_PROGRAM, path, expected, (parser) => parser.prog(), TestXPathLexer, TestXPathParser); - } + testError(SAMPLE_PROGRAM, path, expected, (parser) => parser.prog(), TestXPathLexer, TestXPathParser); + }) - @Test public testMissingWordAtEnd(): void { - let path: string = "//"; - let expected: RegExp = /^Error: Missing path element at end of path$/; + it("testMissingWordAtEnd", function () { + const path = "//"; + const expected = /^Error: Missing path element at end of path$/; - this.testError(SAMPLE_PROGRAM, path, expected, (parser) => parser.prog(), TestXPathLexer, TestXPathParser); - } + testError(SAMPLE_PROGRAM, path, expected, (parser) => parser.prog(), TestXPathLexer, TestXPathParser); + }) - @Test public testBadTokenName(): void { - let path: string = "//Ick"; - let expected: RegExp = /^Error: Ick at index 2 isn't a valid token name$/; + it("testBadTokenName", function () { + const path = "//Ick"; + const expected = /^Error: Ick at index 2 isn't a valid token name$/; - this.testError(SAMPLE_PROGRAM, path, expected, (parser) => parser.prog(), TestXPathLexer, TestXPathParser); - } - - @Test public testBadRuleName(): void { - let path: string = "/prog/ick"; - let expected: RegExp = /^Error: ick at index 6 isn't a valid rule name$/; + testError(SAMPLE_PROGRAM, path, expected, (parser) => parser.prog(), TestXPathLexer, TestXPathParser); + }) - this.testError(SAMPLE_PROGRAM, path, expected, (parser) => parser.prog(), TestXPathLexer, TestXPathParser); - } - - protected testError( - input: string, path: string, expected: RegExp, - startRule: (parser: TParser) => ParseTree, - lexerCtor: {new(stream: CharStream): Lexer}, - parserCtor: {new(stream: TokenStream): TParser}): void { - - let lexer = new lexerCtor(CharStreams.fromString(input)); - let parser = new parserCtor(new CommonTokenStream(lexer)); - let tree: ParseTree = startRule(parser); - - assert.throws(() => XPath.findAll(tree, path, parser), expected); - } + it("testBadRuleName", function () { + const path = "/prog/ick"; + const expected = /^Error: ick at index 6 isn't a valid rule name$/; - private getNodeStrings( - input: string, xpath: string, - startRule: (parser: TParser) => ParseTree, - lexerCtor: {new(stream: CharStream): Lexer}, - parserCtor: {new(stream: TokenStream): TParser}): string[] { - - let lexer = new lexerCtor(CharStreams.fromString(input)); - let parser = new parserCtor(new CommonTokenStream(lexer)); - let tree: ParseTree = startRule(parser); - - let nodes: string[] = []; - for (let t of XPath.findAll(tree, xpath, parser) ) { - if (t instanceof RuleContext) { - nodes.push(parser.ruleNames[t.ruleIndex]); - } else { - let token: TerminalNode = t as TerminalNode; - nodes.push(token.text); - } - } - - return nodes; - } -} + testError(SAMPLE_PROGRAM, path, expected, (parser) => parser.prog(), TestXPathLexer, TestXPathParser); + }) +}) diff --git a/test/tsconfig.json b/test/tsconfig.json new file mode 100644 index 00000000..f4cdcc11 --- /dev/null +++ b/test/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../tsconfig.base.json", + // "include": ["**/*.ts"], + "exclude": ["node_modules", "dist"], + "compilerOptions": { + "outDir": "dist", + "rootDir": ".", + "types": ["node"] + }, + "references": [ + { + "path": "../runtime/typescript" + } + ] +} diff --git a/tool/antlr4ts b/tool/antlr4ts deleted file mode 100755 index 6b9911e8..00000000 --- a/tool/antlr4ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node - -require("antlr4ts-cli") diff --git a/tool/package-lock.json b/tool/package-lock.json deleted file mode 100644 index bff1381f..00000000 --- a/tool/package-lock.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "antlr4ts-cli", - "version": "0.5.0-dev", - "lockfileVersion": 1 -} diff --git a/tool/test/org/antlr/v4/test/runtime/typescript/package.json b/tool/test/org/antlr/v4/test/runtime/typescript/package.json deleted file mode 100644 index 4e0ca1d1..00000000 --- a/tool/test/org/antlr/v4/test/runtime/typescript/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "antlr4ts-test", - "version": "0.0.0", - "description": "Unit test project for the ANTLR 4 TypeScript target", - "main": "index.js", - "private": true, - "scripts": { - "prepublish": "tsc", - "test": "tsc" - }, - "devDependencies": { - "@types/node": "^6.0.41", - "source-map-support": "^0.4.3", - "typescript": "^2.0.3" - }, - "dependencies": { - } -} diff --git a/tool/test/org/antlr/v4/test/runtime/typescript/tsconfig.json b/tool/test/org/antlr/v4/test/runtime/typescript/tsconfig.json deleted file mode 100644 index ed995c38..00000000 --- a/tool/test/org/antlr/v4/test/runtime/typescript/tsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compilerOptions": { - "sourceMap": true, - "module": "commonjs", - "target": "es2015", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "strictNullChecks": true, - "experimentalDecorators": true, - "declaration": false, - "preserveConstEnums": true, - "typeRoots": [ - "./node_modules/@types" - ], - "types": [ - "node" - ] - }, - "include": [ - "./*.ts" - ], - "exclude": [ - "node_modules" - ] -} diff --git a/tool/tsconfig.json b/tool/tsconfig.json deleted file mode 100644 index ebb78db0..00000000 --- a/tool/tsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compilerOptions": { - "outDir": "target", - "sourceMap": true, - "module": "commonjs", - "target": "es2015", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "strictNullChecks": true, - "experimentalDecorators": true, - "declaration": true, - "preserveConstEnums": true, - "typeRoots": [ - "./node_modules/@types" - ], - "types": [ - "node", - "mocha" - ] - }, - "exclude": [ - "node_modules", - "target" - ] -} diff --git a/tool/LICENSE b/tool/typescript/LICENSE similarity index 100% rename from tool/LICENSE rename to tool/typescript/LICENSE diff --git a/tool/README.md b/tool/typescript/README.md similarity index 100% rename from tool/README.md rename to tool/typescript/README.md diff --git a/tool/typescript/antlr4ts b/tool/typescript/antlr4ts new file mode 100644 index 00000000..68a83689 --- /dev/null +++ b/tool/typescript/antlr4ts @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +require("./index.js"); diff --git a/tool/index.js b/tool/typescript/index.js similarity index 52% rename from tool/index.js rename to tool/typescript/index.js index 65b76fd3..2261713d 100644 --- a/tool/index.js +++ b/tool/typescript/index.js @@ -2,17 +2,18 @@ * Copyright 2016 The ANTLR Project. All rights reserved. * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information. */ +/*eslint-env node*/ -var child_process = require('child_process'); -var path = require('path'); -var process = require('process'); +const child_process = require('child_process'); +const path = require('path'); +const process = require('process'); -var cmd = 'java'; -var value = ['-jar', path.join(__dirname, 'target/antlr4-typescript-4.7.3-SNAPSHOT-complete.jar')] - .concat(process.argv.slice(2)); -var opt = {stdio: "inherit"}; +const cmd = 'java'; +const value = ['-jar', path.join(__dirname, 'target/antlr4-typescript-4.7.3-SNAPSHOT-complete.jar')] + .concat(process.argv.slice(2)); +const opt = { stdio: "inherit" }; -var child = child_process.spawn(cmd, value, opt); +const child = child_process.spawn(cmd, value, opt); // child.stderr.on('data', function (data) { // console.error(''+data); @@ -24,5 +25,5 @@ var child = child_process.spawn(cmd, value, opt); child.on('close', function (code) { process.exitCode = code; // Sets expected exit code without forcing exit prior to buffers flushing. - code && console.log("child process exited with code ", code); + code && console.log("child process exited with code ", code); }); diff --git a/tool/typescript/jsconfig.json b/tool/typescript/jsconfig.json new file mode 100644 index 00000000..bfddac21 --- /dev/null +++ b/tool/typescript/jsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "sourceMap": true, + "module": "commonjs", + "target": "es2015", + "lib": ["es6"], + "noImplicitAny": true, + "strictNullChecks": true, + "declaration": true + }, + "include": ["index.js"], + "exclude": ["node_modules", "target"] +} diff --git a/tool/typescript/package-lock.json b/tool/typescript/package-lock.json new file mode 100644 index 00000000..6baf00f5 --- /dev/null +++ b/tool/typescript/package-lock.json @@ -0,0 +1,1638 @@ +{ + "name": "antlr4ts-cli", + "version": "0.5.0-dev", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.8.3" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", + "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==", + "dev": true + }, + "@babel/highlight": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", + "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.0", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true + }, + "@types/eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", + "dev": true + }, + "@types/json-schema": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz", + "integrity": "sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==", + "dev": true + }, + "@types/node": { + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.0.tgz", + "integrity": "sha512-WE4IOAC6r/yBZss1oQGM5zs2D7RuKR6Q+w+X2SouPofnWn+LbCqClRyhO3ZE7Ix8nmFgo/oVuuE01cJT2XB13A==" + }, + "@typescript-eslint/eslint-plugin": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.28.0.tgz", + "integrity": "sha512-w0Ugcq2iatloEabQP56BRWJowliXUP5Wv6f9fKzjJmDW81hOTBxRoJ4LoEOxRpz9gcY51Libytd2ba3yLmSOfg==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "2.28.0", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^3.0.0", + "tsutils": "^3.17.1" + }, + "dependencies": { + "tsutils": { + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", + "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/eslint-plugin-tslint": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin-tslint/-/eslint-plugin-tslint-2.28.0.tgz", + "integrity": "sha512-a6cU6aJZa10sK6DybAtOdCV/tU1rWTTurBgYtyJb2DsG3BJwF6vYob9qOKw9n3MjV/F757LGqXz3RNmrvrimww==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "2.28.0", + "lodash": "^4.17.15" + } + }, + "@typescript-eslint/experimental-utils": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.28.0.tgz", + "integrity": "sha512-4SL9OWjvFbHumM/Zh/ZeEjUFxrYKtdCi7At4GyKTbQlrj1HcphIDXlje4Uu4cY+qzszR5NdVin4CCm6AXCjd6w==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/typescript-estree": "2.28.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + } + }, + "@typescript-eslint/parser": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.28.0.tgz", + "integrity": "sha512-RqPybRDquui9d+K86lL7iPqH6Dfp9461oyqvlXMNtap+PyqYbkY5dB7LawQjDzot99fqzvS0ZLZdfe+1Bt3Jgw==", + "dev": true, + "requires": { + "@types/eslint-visitor-keys": "^1.0.0", + "@typescript-eslint/experimental-utils": "2.28.0", + "@typescript-eslint/typescript-estree": "2.28.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.28.0.tgz", + "integrity": "sha512-HDr8MP9wfwkiuqzRVkuM3BeDrOC4cKbO5a6BymZBHUt5y/2pL0BXD6I/C/ceq2IZoHWhcASk+5/zo+dwgu9V8Q==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "eslint-visitor-keys": "^1.1.0", + "glob": "^7.1.6", + "is-glob": "^4.0.1", + "lodash": "^4.17.15", + "semver": "^6.3.0", + "tsutils": "^3.17.1" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "tsutils": { + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", + "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "acorn": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "dev": true + }, + "acorn-jsx": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", + "dev": true + }, + "ajv": { + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.1.tgz", + "integrity": "sha512-AUh2mDlJDAnzSRaKkMHopTD1GKwC1ApUq8oCzdjAOM5tavncgqWU+JoRu5Y3iYY0Q/euiU+1LWp0/O/QY8CcHw==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "opencollective-postinstall": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ansi-escapes": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "dev": true, + "requires": { + "type-fest": "^0.11.0" + }, + "dependencies": { + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + } + } + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-width": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", + "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", + "dev": true + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "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" + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.17.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", + "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.3", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.2", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^7.0.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.3", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "eslint-plugin-prettier": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.3.tgz", + "integrity": "sha512-+HG5jmu/dN3ZV3T6eCD7a4BlAySdN7mLIbJYo0z1cFQuI+r2DiTJEFeF68ots93PsnrMxbzIZ2S/ieX+mkrBeQ==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-scope": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", + "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz", + "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "dev": true + }, + "espree": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz", + "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "fast-deep-equal": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "dev": true + }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "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" + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "dev": true + }, + "has": { + "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.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "hosted-git-info": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "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 + }, + "inquirer": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz", + "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^3.0.0", + "cli-cursor": "^3.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.15", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.5.3", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "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": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "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-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", + "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==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "mkdirp": { + "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": "^1.2.5" + } + }, + "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 + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + } + }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "opencollective-postinstall": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz", + "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==", + "dev": true + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + }, + "resolve": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.16.0.tgz", + "integrity": "sha512-LarL/PIKJvc09k1jaeT4kQb/8/7P+qV4qSnN2K80AES+OHdfZELAKVOBjxsvtToT/uLOfFbvYvKfZmV8cee7nA==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", + "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "rxjs": { + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz", + "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shell-quote": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", + "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", + "dev": true + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + }, + "dependencies": { + "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 + } + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "source-map-support": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", + "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "string.prototype.padend": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.0.tgz", + "integrity": "sha512-3aIv8Ffdp8EZj8iLwREGpQaUZiPyrWrpzMBHvkiSW/bK/EGve9np07Vwy7IJ5waydpGXzQZu/F8Oze2/IWkBaA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string.prototype.trimleft": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", + "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimstart": "^1.0.0" + } + }, + "string.prototype.trimright": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", + "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimend": "^1.0.0" + } + }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + } + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", + "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==", + "dev": true + }, + "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" + } + }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "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 + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "tslib": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", + "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + }, + "typescript": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz", + "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "v8-compile-cache": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", + "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + } + } +} diff --git a/tool/package.json b/tool/typescript/package.json similarity index 60% rename from tool/package.json rename to tool/typescript/package.json index 54cac7ba..72882d1c 100644 --- a/tool/package.json +++ b/tool/typescript/package.json @@ -3,6 +3,7 @@ "version": "0.5.0-dev", "preferGlobal": true, "description": "ANTLR 4 command line tool for TypeScript", + "main": "index.js", "files": [ "LICENSE", "target/antlr4-typescript-4.7.3-SNAPSHOT-complete.jar", @@ -13,7 +14,8 @@ "antlr4ts": "./antlr4ts" }, "scripts": { - "prepare": "mvn verify" + "prepare": "mvn verify", + "build": "echo already built" }, "repository": { "type": "git", @@ -29,5 +31,18 @@ "bugs": { "url": "https://github.com/tunnelvisionlabs/antlr4ts/issues" }, - "homepage": "https://github.com/tunnelvisionlabs/antlr4ts/tool#readme" + "homepage": "https://github.com/tunnelvisionlabs/antlr4ts/tool#readme", + "dependencies": { + "@types/node": "^13.13.0", + "source-map-support": "^0.5.16" + }, + "devDependencies": { + "@typescript-eslint/eslint-plugin": "^2.28.0", + "@typescript-eslint/eslint-plugin-tslint": "^2.28.0", + "@typescript-eslint/parser": "^2.28.0", + "eslint": "^6.8.0", + "eslint-plugin-prettier": "^3.1.3", + "npm-run-all": "^4.1.5", + "typescript": "^3.8.3" + } } diff --git a/tool/pom.xml b/tool/typescript/pom.xml similarity index 99% rename from tool/pom.xml rename to tool/typescript/pom.xml index 8d7f6ba2..ad0d5767 100644 --- a/tool/pom.xml +++ b/tool/typescript/pom.xml @@ -166,9 +166,6 @@ Licensed under the BSD-3-Clause license. See LICENSE file in the project root fo test - - ../runtime - diff --git a/tool/resources/org/antlr/v4/tool/templates/codegen/TypeScript/TypeScript.stg b/tool/typescript/resources/org/antlr/v4/tool/templates/codegen/TypeScript/TypeScript.stg similarity index 93% rename from tool/resources/org/antlr/v4/tool/templates/codegen/TypeScript/TypeScript.stg rename to tool/typescript/resources/org/antlr/v4/tool/templates/codegen/TypeScript/TypeScript.stg index 74d7c606..08d9ecc4 100644 --- a/tool/resources/org/antlr/v4/tool/templates/codegen/TypeScript/TypeScript.stg +++ b/tool/typescript/resources/org/antlr/v4/tool/templates/codegen/TypeScript/TypeScript.stg @@ -20,27 +20,25 @@ ParserFile(file, parser, namedActions, contextSuperClass) ::= << -import { ATN } from "/atn/ATN"; -import { ATNDeserializer } from "/atn/ATNDeserializer"; -import { FailedPredicateException } from "/FailedPredicateException"; -import { NotNull } from "/Decorators"; -import { NoViableAltException } from "/NoViableAltException"; -import { Override } from "/Decorators"; -import { Parser } from "/Parser"; -import { ParserRuleContext } from "/ParserRuleContext"; -import { ParserATNSimulator } from "/atn/ParserATNSimulator"; -import { ParseTreeListener } from "/tree/ParseTreeListener"; -import { ParseTreeVisitor } from "/tree/ParseTreeVisitor"; -import { RecognitionException } from "/RecognitionException"; -import { RuleContext } from "/RuleContext"; -//import { RuleVersion } from "/RuleVersion"; -import { TerminalNode } from "/tree/TerminalNode"; -import { Token } from "/Token"; -import { TokenStream } from "/TokenStream"; -import { Vocabulary } from "/Vocabulary"; -import { VocabularyImpl } from "/VocabularyImpl"; - -import * as Utils from "/misc/Utils"; +import { + ATN, + ATNDeserializer, + FailedPredicateException, + NoViableAltException, + Parser, + ParserRuleContext, + ParserATNSimulator, + RecognitionException, + RuleContext, + RuleVersion, + TerminalNode, + Token, + TokenStream, + Vocabulary, + VocabularyImpl, + join, + toCharArray +} from ""; import { Listener } from "./Listener"; @@ -61,7 +59,7 @@ ListenerFile(file, header, namedActions) ::= <<
-import { ParseTreeListener } from "/tree/ParseTreeListener"; +import { ParseTreeListener } from ""; Context \} from "./";}; separator="\n"> @@ -103,7 +101,7 @@ VisitorFile(file, header, namedActions) ::= <<
-import { ParseTreeVisitor } from "/tree/ParseTreeVisitor"; +import { ParseTreeVisitor } from ""; Context \} from "./";}; separator="\n"> @@ -143,6 +141,7 @@ Parser(parser, funcs, atn, sempredFuncs, superClass, isLexer=false) ::= << >> Parser_(parser, funcs, atn, sempredFuncs, ctor, superClass) ::= << +/* eslint-disable no-useless-escape */ export abstract class extends { = ;}; separator="\n", wrap, anchor> @@ -196,16 +195,15 @@ case : >> vocabulary(className, literalNames, symbolicNames) ::= << -private static readonly _LITERAL_NAMES: Array\ = [ +private static readonly _LITERAL_NAMES: (string|undefined)[] = [ ,}; null="undefined,", separator=" ", wrap, anchor> ]; -private static readonly _SYMBOLIC_NAMES: Array\ = [ +private static readonly _SYMBOLIC_NAMES: (string|undefined)[] = [ ,}; null="undefined,", separator=" ", wrap, anchor> ]; public static readonly VOCABULARY: Vocabulary = new VocabularyImpl(._LITERAL_NAMES, ._SYMBOLIC_NAMES, []); // @Override -// @NotNull public get vocabulary(): Vocabulary { return .VOCABULARY; } @@ -757,6 +755,7 @@ CaptureNextTokenType(d) ::= " = this._input.LA(1);" StructDecl(struct,ctorAttrs,attrs,getters,dispatchMethods,interfaces,extensionMembers) ::= << +// tslint:disable-next-line: class-name export class extends ParserRuleContext implements { ;}; separator="\n"> }; separator="\n"> @@ -868,18 +867,18 @@ LexerFile(file, lexer, namedActions) ::= << -import { ATN } from "/atn/ATN"; -import { ATNDeserializer } from "/atn/ATNDeserializer"; -import { CharStream } from "/CharStream"; -import { Lexer } from "/Lexer"; -import { LexerATNSimulator } from "/atn/LexerATNSimulator"; -import { NotNull } from "/Decorators"; -import { Override } from "/Decorators"; -import { RuleContext } from "/RuleContext"; -import { Vocabulary } from "/Vocabulary"; -import { VocabularyImpl } from "/VocabularyImpl"; - -import * as Utils from "/misc/Utils"; +import { + ATN, + ATNDeserializer, + CharStream, + Lexer, + LexerATNSimulator, + RuleContext, + Vocabulary, + VocabularyImpl, + join, + toCharArray, +} from ""; @@ -889,6 +888,7 @@ import * as Utils from "/misc/Utils"; >> Lexer(lexer, atn, actionFuncs, sempredFuncs, superClass, isLexer=true) ::= << +/* eslint-disable no-useless-escape */ export abstract class extends { = ;}; separator="\n"> = ;}; separator="\n"> @@ -944,7 +944,7 @@ SerializedATN(model, className={; : string = "<\t>"}>";}; separator="\n"> -public static readonly _serializedATN: string = Utils.join( +public static readonly _serializedATN: string = join( [ ._serializedATNSegment,}; separator="\n"> ], @@ -958,7 +958,7 @@ public static readonly _serializedATN: string = public static __ATN: ATN; public static get _ATN(): ATN { if (!.__ATN) { - .__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(._serializedATN)); + .__ATN = new ATNDeserializer().deserialize(toCharArray(._serializedATN)); } return .__ATN; diff --git a/tool/src/org/antlr/v4/TypeScriptTool.java b/tool/typescript/src/org/antlr/v4/TypeScriptTool.java similarity index 100% rename from tool/src/org/antlr/v4/TypeScriptTool.java rename to tool/typescript/src/org/antlr/v4/TypeScriptTool.java diff --git a/tool/src/org/antlr/v4/codegen/target/TypeScriptTarget.java b/tool/typescript/src/org/antlr/v4/codegen/target/TypeScriptTarget.java similarity index 100% rename from tool/src/org/antlr/v4/codegen/target/TypeScriptTarget.java rename to tool/typescript/src/org/antlr/v4/codegen/target/TypeScriptTarget.java diff --git a/tool/test/org/antlr/v4/test/runtime/typescript/BaseTest.java b/tool/typescript/test/org/antlr/v4/test/runtime/typescript/BaseTest.java similarity index 98% rename from tool/test/org/antlr/v4/test/runtime/typescript/BaseTest.java rename to tool/typescript/test/org/antlr/v4/test/runtime/typescript/BaseTest.java index b5f27a17..ee4b7471 100644 --- a/tool/test/org/antlr/v4/test/runtime/typescript/BaseTest.java +++ b/tool/typescript/test/org/antlr/v4/test/runtime/typescript/BaseTest.java @@ -67,8 +67,8 @@ protected static void assertEquals(String a, String b) { @Before public void setUp() throws Exception { File cd = new File(".").getAbsoluteFile(); - File baseDir = cd.getParentFile().getParentFile(); - File classDir = new File(baseDir, "test/runtime/gen/" + getClass().getSimpleName()); + File baseDir = cd.getParentFile().getParentFile().getParentFile(); + File classDir = new File(baseDir, "test/runtime/cross-target/" + getClass().getSimpleName()); File testDir = new File(classDir, name.getMethodName()); testDir.mkdirs(); for (File file : testDir.listFiles()) { diff --git a/tool/test/org/antlr/v4/test/runtime/typescript/ErrorQueue.java b/tool/typescript/test/org/antlr/v4/test/runtime/typescript/ErrorQueue.java similarity index 100% rename from tool/test/org/antlr/v4/test/runtime/typescript/ErrorQueue.java rename to tool/typescript/test/org/antlr/v4/test/runtime/typescript/ErrorQueue.java diff --git a/tool/test/org/antlr/v4/test/runtime/typescript/TypeScript.test.stg b/tool/typescript/test/org/antlr/v4/test/runtime/typescript/TypeScript.test.stg similarity index 95% rename from tool/test/org/antlr/v4/test/runtime/typescript/TypeScript.test.stg rename to tool/typescript/test/org/antlr/v4/test/runtime/typescript/TypeScript.test.stg index 4f8cc737..a52f4b15 100644 --- a/tool/test/org/antlr/v4/test/runtime/typescript/TypeScript.test.stg +++ b/tool/typescript/test/org/antlr/v4/test/runtime/typescript/TypeScript.test.stg @@ -223,28 +223,26 @@ ImportListener(X) ::= "" ImportVisitor(grammarName) ::= << @parser::header { -import { AbstractParseTreeVisitor } from "antlr4ts/tree/AbstractParseTreeVisitor"; -import { RuleNode } from "antlr4ts/tree/RuleNode"; -import { ErrorNode } from "antlr4ts/tree/ErrorNode"; +import { AbstractParseTreeVisitor, ErrorNode, RuleNode } from "antlr4ts"; } >> ImportPredictionMode() ::= << @beforeParser { -import { PredictionMode } from "antlr4ts/atn/PredictionMode"; +import { PredictionMode } from "antlr4ts"; } >> ImportBailErrorStrategy() ::= << @beforeParser { -import { BailErrorStrategy } from "antlr4ts/BailErrorStrategy"; +import { BailErrorStrategy } from "antlr4ts"; } >> GetExpectedTokenNames() ::= "this.getExpectedTokens().toStringVocabulary(this.vocabulary)" RuleInvocationStack() ::= <% -"[" + Utils.join(this.getRuleInvocationStack(), ", ") + "]" +"[" + this.getRuleInvocationStack().join(", ") + "]" %> FULL_CONTEXT_DFA() ::= "this.interpreter.enable_global_context_dfa = true;" @@ -352,7 +350,7 @@ export class PositionAdjustingLexerATNSimulator extends LexerATNSimulator { BasicListener(X) ::= << @parser::beforeParser { -import { ParseTreeWalker } from "antlr4ts/tree/ParseTreeWalker"; +import { ParseTreeWalker } from "antlr4ts"; } @parser::afterParser { @@ -370,7 +368,7 @@ ParseTreeWalker.DEFAULT.walk\(new LeafListener(), ); TreeNodeWithAltNumField(X) ::= << @parser::beforeParser { -import { ParserRuleContext as PRC } from "antlr4ts/ParserRuleContext"; +import { ParserRuleContext as PRC } from "antlr4ts"; export class MyRuleNode extends PRC { private altNum: number; @@ -386,7 +384,7 @@ export class MyRuleNode extends PRC { TokenGetterListener(X) ::= << @parser::beforeParser { -import { ParseTreeWalker } from "antlr4ts/tree/ParseTreeWalker"; +import { ParseTreeWalker } from "antlr4ts"; } @parser::afterParser { @@ -405,7 +403,7 @@ export class LeafListener implements TListener { RuleGetterListener(X) ::= << @parser::beforeParser { -import { ParseTreeWalker } from "antlr4ts/tree/ParseTreeWalker"; +import { ParseTreeWalker } from "antlr4ts"; } @parser::afterParser { @@ -424,7 +422,7 @@ export class LeafListener implements TListener { LRListener(X) ::= << @parser::beforeParser { -import { ParseTreeWalker } from "antlr4ts/tree/ParseTreeWalker"; +import { ParseTreeWalker } from "antlr4ts"; } @parser::afterParser { @@ -443,7 +441,7 @@ export class LeafListener implements TListener { LRWithLabelsListener(X) ::= << @parser::beforeParser { -import { ParseTreeWalker } from "antlr4ts/tree/ParseTreeWalker"; +import { ParseTreeWalker } from "antlr4ts"; } @parser::afterParser { diff --git a/tool/typescript/tsconfig.json b/tool/typescript/tsconfig.json new file mode 100644 index 00000000..3fccf470 --- /dev/null +++ b/tool/typescript/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "composite": true, + "allowJs": true, + "outDir": "dist", + "types": ["node"] + }, + "exclude": ["node_modules", "target"] +} diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 00000000..bf242e70 --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,16 @@ +{ + "exclude": ["dist", "lib", "node_modules", "target"], + "compilerOptions": { + "composite": true, + "declaration": true, + "lib": ["es6"], + "module": "commonjs", + "noImplicitAny": true, + "preserveConstEnums": true, + "sourceMap": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "target": "es2015", + "types": ["node"] + } +} diff --git a/tsconfig.json b/tsconfig.json index 1c42583d..fd9769bb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,31 +1,13 @@ { - "compilerOptions": { - "outDir": "target", - "sourceMap": true, - "inlineSources": true, - "module": "commonjs", - "target": "es2015", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "experimentalDecorators": true, - "declaration": true, - "preserveConstEnums": true, - "typeRoots": [ - "./node_modules/@types" - ], - "types": [ - "node", - "mocha" - ] - }, + "references": [ + { + "path": "benchmark/" + }, + { + "path": "test" + } + ], "exclude": [ - "node_modules", - "target", - "tool", - "test/runtime" + "**/*" ] } diff --git a/tslint.json b/tslint.json deleted file mode 100644 index fe605b3e..00000000 --- a/tslint.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "extends": "tslint:recommended", - "rules": { - "comment-format": false, - "interface-name": false, - "max-classes-per-file": false, - "max-line-length": false, - "member-ordering": false, - "no-bitwise": false, - "no-consecutive-blank-lines": false, - "no-console": false, - "no-namespace": false, - "no-shadowed-variable": false, - "no-unused-expression": false, - "no-var-requires": false, - "one-line": false, - "prefer-const": false, - "unified-signatures": false, - "variable-name": false, - - // Enabled with specific or customized configuration - "indent": [true, "tabs"], - "prefer-while": true, - "no-for-in-array": true, - "return-undefined": true, - "no-boolean-literal-compare": true, - "no-inferred-empty-object-type": true, - "promise-function-async": true, - "no-unsafe-any": true, - "no-unnecessary-type-assertion": true, - "no-floating-promises": true, - "no-return-await": true, - "deprecation": true, - - // Can't be reasonably enabled because the imports need to be per-file within this repository - "ordered-imports": false - }, - "linterOptions": { - "exclude": [ - // Disabled due to uncontrollable space indentation - "test/runtime/gen/TestParseTrees/testTokenAndRuleContextString/TParser.ts", - "test/runtime/gen/TestSemPredEvalLexer/testIndent/L.ts", - "test/runtime/gen/TestSemPredEvalLexer/testLexerInputPositionSensitivePredicates/L.ts", - "test/runtime/gen/TestSemPredEvalLexer/testPredicatedKeywords/L.ts", - - // Disabled due to uncontrollable whitespace within action expressions - "test/runtime/gen/TestFullContextParsing/testLoopsSimulateTailRecursion/TParser.ts", - "test/runtime/gen/TestLeftRecursion/testReturnValueAndActionsAndLabels_1/TParser.ts", - "test/runtime/gen/TestLeftRecursion/testReturnValueAndActionsAndLabels_2/TParser.ts", - "test/runtime/gen/TestLeftRecursion/testReturnValueAndActionsAndLabels_3/TParser.ts", - "test/runtime/gen/TestLeftRecursion/testReturnValueAndActionsAndLabels_4/TParser.ts", - "test/runtime/gen/TestSemPredEvalParser/testPredTestedEvenWhenUnAmbig_1/TParser.ts", - "test/runtime/gen/TestSemPredEvalParser/testPredTestedEvenWhenUnAmbig_2/TParser.ts", - - // Disabled due to uncontrollable rule names with underscores producing class names with underscores - "test/runtime/gen/TestCompositeParsers/testDelegatorRuleOverridesLookaheadInDelegate/MParser.ts", - "test/runtime/gen/TestParserExec/testPredictionIssue334/TParser.ts", - "test/runtime/gen/TestSemPredEvalParser/testPredFromAltTestedInLoopBack_1/TParser.ts", - "test/runtime/gen/TestSemPredEvalParser/testPredFromAltTestedInLoopBack_2/TParser.ts" - ] - } -}