diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..8252235 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,13 @@ +{ + "root": true, + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "plugins": [ + "@typescript-eslint" + ], + "rules": { + } +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ab77a87 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: Build + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + name: CI (${{ matrix.os }}) + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + runs-on: ${{ matrix.os }} + timeout-minutes: 20 + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + cache: 'pnpm' + - name: Build + shell: bash + run: | + pnpm install + pnpm build + - name: Test + if: success() || failure() + shell: bash + run: | + pnpm test diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..091a1bf --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +.vscode/* +!.vscode/extensions.json +!.vscode/launch.json +!.vscode/tasks.json +node_modules/ +dist/ +out/ +**/src/generated +**/syntaxes/pli.merged.json +*.tsbuildinfo +*.vsix \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..b1d0393 --- /dev/null +++ b/.npmrc @@ -0,0 +1,3 @@ +auto-install-peers = true +lockfile = true +link-workspace-packages = true \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..3e50c0f --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,6 @@ +{ + "recommendations": [ + "langium.langium-vscode", + "vitest.explorer" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..92a7265 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,88 @@ +// A launch configuration that launches the extension inside a new window +// Use IntelliSense to learn about possible attributes. +// Hover to view descriptions of existing attributes. +// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Run Extension", + "type": "extensionHost", + "request": "launch", + "args": [ + "--extensionDevelopmentPath=${workspaceFolder}/packages/extension", + "${workspaceFolder}/code_samples" + ], + "sourceMaps": true, + "outFiles": [ + "${workspaceFolder}/packages/language/out/**/*.js", + "${workspaceFolder}/packages/extension/out/**/*.js" + ] + }, + { + "name": "Run Web Extension", + "type": "extensionHost", + "debugWebWorkerHost": true, + "request": "launch", + "args": [ + "--extensionDevelopmentPath=${workspaceFolder}/packages/extension", + "--extensionDevelopmentKind=web", + "${workspaceFolder}/code_samples" + ], + "sourceMaps": true, + "outFiles": [ + "${workspaceFolder}/packages/language/out/**/*.js", + "${workspaceFolder}/packages/extension/out/**/*.js" + ] + } + { + "name": "Attach to Language Server", + "type": "node", + "port": 6009, + "request": "attach", + "skipFiles": [ + "/**" + ], + "sourceMaps": true, + "outFiles": [ + "${workspaceFolder}/packages/language/out/**/*.js", + "${workspaceFolder}/packages/extension/out/**/*.js", + "${workspaceFolder}/node_modules/langium" + ] + }, + { + "name": "Vitest: Run All", + "type": "node", + "request": "launch", + "skipFiles": [ + "/**", + ], + "cwd": "${workspaceFolder}", + "runtimeExecutable": "pnpm", + "args": [ + "vitest", + "run", + "--no-watch" + ], + "smartStep": true, + "console": "integratedTerminal" + }, + { + "name": "Vitest: Run Selected File", + "type": "node", + "request": "launch", + "autoAttachChildProcesses": true, + "skipFiles": [ + "/**" + ], + "runtimeExecutable": "pnpm", + "args": [ + "vitest", + "run", + "${relativeFile}" + ], + "smartStep": true, + "console": "integratedTerminal" + } + ] +} diff --git a/code_samples/CHART.pli b/code_samples/CHART.pli index 5d76cec..7964452 100644 --- a/code_samples/CHART.pli +++ b/code_samples/CHART.pli @@ -1,4 +1,4 @@ -*PROCESS X(S),A(S),LINECOUNT(60); + /*PROCESS X(S),A(S),LINECOUNT(60); */ /* %M% %I% %D% %T% PUNCH ' IDENTIFY **%M%1(''%M%/%I% %D% %T%'')' PUNCH ' ENTRY PLISTART ' diff --git a/code_samples/MACROS.pli b/code_samples/MACROS.pli index 68ba696..5830d92 100644 --- a/code_samples/MACROS.pli +++ b/code_samples/MACROS.pli @@ -1,4 +1,4 @@ -*PROCESS MI(':'),NEST,X,AG,A,MAR(2,72,1),GN,NUM,STG; + /*PROCESS MI(':'),NEST,X,AG,A,MAR(2,72,1),GN,NUM,STG; */ /*** (CHECK): ***/ diff --git a/code_samples/PLI0002.pli b/code_samples/PLI0002.pli index 23a0b65..e6dff17 100644 --- a/code_samples/PLI0002.pli +++ b/code_samples/PLI0002.pli @@ -37,7 +37,7 @@ /* DECLARE HOST-VARIABLE */ DCL TIMESTAMP CHAR(26); - DCL BUF1_CLOB SQL TYPE IS CLOB_FILE; + DCL BUF1_CLOB; // SQL TYPE IS CLOB_FILE; EXEC SQL DECLARE :BUF1_CLOB VARIABLE CCSID EBCDIC; DCL I FIXED BIN(31); diff --git a/code_samples/messages/IBM1295IE.pli b/code_samples/messages/IBM1295IE.pli new file mode 100644 index 0000000..801ae2a --- /dev/null +++ b/code_samples/messages/IBM1295IE.pli @@ -0,0 +1,3 @@ + TEST: PROCEDURE OPTIONS(MAIN) REORDER; + dcl x(-2) fixed bin; //error: IBM1295IE Sole bound specified is less than 1. An upper bound of 1 is assumed. + END TEST; \ No newline at end of file diff --git a/code_samples/messages/IBM1324IE.pli b/code_samples/messages/IBM1324IE.pli new file mode 100644 index 0000000..54591bc --- /dev/null +++ b/code_samples/messages/IBM1324IE.pli @@ -0,0 +1,2 @@ +0PACK: PACKAGE EXPORTS(TEST, TEST, TEST); //error: TEST has 3 occurences, needed 1 +0END; \ No newline at end of file diff --git a/code_samples/messages/IBM1388IE.pli b/code_samples/messages/IBM1388IE.pli new file mode 100644 index 0000000..7d07555 --- /dev/null +++ b/code_samples/messages/IBM1388IE.pli @@ -0,0 +1,3 @@ +0a: proc( x ) options(nodescriptor); //error: The NODESCRIPTOR attribute is invalid when any parameters have the NONCONNECTED attribute. + dcl x(20) fixed bin nonconnected; +0end a; \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..536441e --- /dev/null +++ b/package.json @@ -0,0 +1,31 @@ +{ + "name": "pl-one-workspace", + "description": "Base workspace package", + "version": "0.0.1", + "type": "module", + "private": true, + "scripts": { + "watch": "tsc -b tsconfig.build.json --watch", + "build": "pnpm langium:generate && tsc -b tsconfig.build.json && pnpm --dir packages/extension build && node ./scripts/merge-tmlanguage.mjs", + "build:clean": "pnpm clean && pnpm build", + "lint": "eslint src --ext ts", + "langium:generate": "pnpm --dir packages/language langium:generate", + "langium:watch": "pnpm --dir packages/language langium:watch", + "test": "vitest" + }, + "devDependencies": { + "@types/node": "^18.0.0", + "@typescript-eslint/parser": "~7.13.0", + "@typescript-eslint/eslint-plugin": "~7.13.0", + "eslint": "~8.57.0", + "deepmerge": "^1.5.0", + "langium": "~3.2.0", + "shx": "~0.3.4", + "typescript": "~5.4.5", + "vitest": "^1.6.0" + }, + "volta": { + "node": "18.20.3", + "npm": "10.7.0" + } +} diff --git a/packages/language/README.md b/packages/language/README.md new file mode 100644 index 0000000..257e830 --- /dev/null +++ b/packages/language/README.md @@ -0,0 +1 @@ +# PL1 Language Package \ No newline at end of file diff --git a/packages/language/langium-config.json b/packages/language/langium-config.json new file mode 100644 index 0000000..3bfc983 --- /dev/null +++ b/packages/language/langium-config.json @@ -0,0 +1,10 @@ +{ + "projectName": "Pl1", + "languages": [{ + "id": "pli", + "grammar": "src/pli.langium", + "fileExtensions": [".pli"], + "caseInsensitive": true + }], + "out": "src/generated" +} diff --git a/packages/language/package.json b/packages/language/package.json new file mode 100644 index 0000000..ea4bcfc --- /dev/null +++ b/packages/language/package.json @@ -0,0 +1,48 @@ +{ + "name": "pl-one-language", + "description": "The language specific package", + "version": "0.0.1", + "type": "module", + "engines": { + "node": ">=18.0.0" + }, + "files": [ + "out", + "src" + ], + "main": "./out/index.js", + "module": "./out/index.js", + "exports": { + ".": { + "types": "./out/index.d.ts", + "default": "./out/index.js" + } + }, + "typesVersions": { + "*": { + ".": [ + "out/index" + ] + } + }, + "scripts": { + "clean": "shx rm -fr *.tsbuildinfo out", + "build": "echo 'No build step'", + "build:clean": "npm run clean && npm run build", + "langium:generate": "langium generate", + "langium:watch": "langium generate --watch" + }, + "dependencies": { + "chevrotain": "^11.0.3", + "langium": "~3.2.0", + "vscode-languageserver": "~9.0.1", + "vscode-languageserver-types": "^3.17.5" + }, + "devDependencies": { + "langium-cli": "~3.2.0" + }, + "volta": { + "node": "18.20.3", + "npm": "10.7.0" + } +} diff --git a/packages/language/src/documentation.ts/pli-documentation-provider.ts b/packages/language/src/documentation.ts/pli-documentation-provider.ts new file mode 100644 index 0000000..cc1c03e --- /dev/null +++ b/packages/language/src/documentation.ts/pli-documentation-provider.ts @@ -0,0 +1,63 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import { AstNode, JSDocDocumentationProvider } from 'langium'; +import { isDeclaredVariable, isDoType3Variable, isLabelPrefix, isProcedureStatement, ProcedureStatement } from '../generated/ast'; + +export class PliDocumentationProvider extends JSDocDocumentationProvider { + + override getDocumentation(node: AstNode): string | undefined { + if (isDeclaredVariable(node)) { + const declaredItem = node.$container; + let text = '```\n' + `DECLARE ${node.name} `; + for (const attribute of declaredItem.attributes) { + text += `${attribute.$cstNode?.text} `; + } + text += '\n```'; + return text; + } else if (isLabelPrefix(node) && isProcedureStatement(node.$container)) { + return this.getProcedureHoverContent(node.$container); + } else if (isProcedureStatement(node)) { + return this.getProcedureHoverContent(node); + } else if (isDoType3Variable(node)) { + return '```\nDECLARE' + node.name + '\n```'; + } + return ''; + } + + private getProcedureHoverContent(node: ProcedureStatement): string | undefined { + let text = '```\n'; + for (const label of node.labels) { + text += `${label.name} `; + } + text += 'PROCEDURE '; + if (node.parameters.length > 0) { + text += '(' + node.parameters.map(e => e.id).join(', ') + ') '; + } + if (node.recursive.length > 0) { + text += 'RECURSIVE '; + } + if (node.order.includes('ORDER')) { + text += 'ORDER '; + } else if (node.order.includes('REORDER')) { + text += 'REORDER '; + } + if (node.options.length > 0) { + text += node.options.map(e => e.$cstNode?.text).join(' '); + } + if (node.returns.length > 0) { + text += node.returns.map(e => e.$cstNode?.text).join(' '); + } + text += '\n```'; + return text; + } + +} \ No newline at end of file diff --git a/packages/language/src/index.ts b/packages/language/src/index.ts new file mode 100644 index 0000000..1566638 --- /dev/null +++ b/packages/language/src/index.ts @@ -0,0 +1,17 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +export * from './pli-module.js'; +export * from './validation/pli-validator.js'; +export * from './generated/ast.js'; +export * from './generated/grammar.js'; +export * from './generated/module.js'; +export * from './workspace/pli-builtin-functions.js'; diff --git a/packages/language/src/lsp/pli-completion-provider.ts b/packages/language/src/lsp/pli-completion-provider.ts new file mode 100644 index 0000000..946758a --- /dev/null +++ b/packages/language/src/lsp/pli-completion-provider.ts @@ -0,0 +1,37 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import { AstNodeDescription } from "langium"; +import { CompletionValueItem, DefaultCompletionProvider } from "langium/lsp"; + +export class PliCompletionProvider extends DefaultCompletionProvider { + + protected override createReferenceCompletionItem(nodeDescription: AstNodeDescription): CompletionValueItem { + let detail: string | undefined = undefined; + if (nodeDescription.type === 'ProcedureStatement') { + detail = 'PROCEDURE'; + } else if (nodeDescription.type === 'DeclaredVariable' || nodeDescription.type === 'DoType3Variable') { + detail = 'DECLARE'; + } else if (nodeDescription.type === 'LabelPrefix') { + detail = 'LABEL'; + } + const kind = this.nodeKindProvider.getCompletionItemKind(nodeDescription); + const documentation = this.getReferenceDocumentation(nodeDescription); + return { + nodeDescription, + kind, + documentation, + detail, + sortText: '0' + }; + } + +} \ No newline at end of file diff --git a/packages/language/src/lsp/pli-node-kind-provider.ts b/packages/language/src/lsp/pli-node-kind-provider.ts new file mode 100644 index 0000000..df420da --- /dev/null +++ b/packages/language/src/lsp/pli-node-kind-provider.ts @@ -0,0 +1,59 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import { AstNode, AstNodeDescription, isAstNodeDescription } from "langium"; +import { DefaultNodeKindProvider } from "langium/lsp"; +import { CompletionItemKind, SymbolKind } from "vscode-languageserver-types"; +import { isLabelPrefix, isNamedElement, isPackage, isProcedureStatement } from "../generated/ast"; + +export class PliNodeKindProvider extends DefaultNodeKindProvider { + override getSymbolKind(node: AstNode | AstNodeDescription): SymbolKind { + const symbol = this.getNode(node); + if (!symbol) { + return SymbolKind.Null; + } + if (isProcedureStatement(symbol)) { + return SymbolKind.Function; + } else if (isNamedElement(symbol)) { + return SymbolKind.Variable; + } else if (isPackage(symbol)) { + return SymbolKind.Namespace; + } else if (isLabelPrefix(symbol)) { + return SymbolKind.Constant; + } else { + return SymbolKind.Variable; + } + } + + override getCompletionItemKind(node: AstNode | AstNodeDescription): CompletionItemKind { + const symbol = this.getNode(node); + if (!symbol) { + return CompletionItemKind.Text; + } + if (isProcedureStatement(symbol)) { + return CompletionItemKind.Function; + } else if (isNamedElement(symbol)) { + return CompletionItemKind.Variable; + } else if (isPackage(symbol)) { + return CompletionItemKind.Module; + } else if (isLabelPrefix(symbol)) { + return CompletionItemKind.Constant; + } + return CompletionItemKind.Variable; + } + + private getNode(node: AstNode | AstNodeDescription): AstNode | undefined { + if (isAstNodeDescription(node)) { + return node.node; + } + return node; + } +} \ No newline at end of file diff --git a/packages/language/src/lsp/pli-semantic-highlighting.ts b/packages/language/src/lsp/pli-semantic-highlighting.ts new file mode 100644 index 0000000..222428e --- /dev/null +++ b/packages/language/src/lsp/pli-semantic-highlighting.ts @@ -0,0 +1,91 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import { AstNode } from 'langium'; +import { AbstractSemanticTokenProvider, SemanticTokenAcceptor } from 'langium/lsp'; +import { isDeclaredVariable, isDefineAliasStatement, isDoType3Variable, isEndStatement, isLabelPrefix, isLabelReference, isLiteral, isNumberLiteral, isProcedureCall, isProcedureParameter, isProcedureStatement, isReferenceItem, isStringLiteral } from '../generated/ast'; +import { SemanticTokenTypes } from 'vscode-languageserver'; + +export class PliSemanticTokenProvider extends AbstractSemanticTokenProvider { + protected override highlightElement(node: AstNode, acceptor: SemanticTokenAcceptor): void | undefined | 'prune' { + if (isReferenceItem(node)) { + const targetElement = node.ref?.ref; + acceptor({ + node, + property: 'ref', + type: isProcedureStatement(targetElement) ? SemanticTokenTypes.function : SemanticTokenTypes.variable + }); + } else if (isDeclaredVariable(node) || isDoType3Variable(node)) { + acceptor({ + node, + property: 'name', + type: SemanticTokenTypes.variable + }); + } else if (isDefineAliasStatement(node)) { + acceptor({ + node, + property: 'name', + type: SemanticTokenTypes.type + }); + } else if (isProcedureParameter(node)) { + acceptor({ + node, + property: 'id', + type: SemanticTokenTypes.parameter + }); + } else if (isEndStatement(node)) { + const container = node.$container; + acceptor({ + node, + property: 'label', + type: isProcedureStatement(container) ? SemanticTokenTypes.function : SemanticTokenTypes.variable + }) + } else if (isLabelReference(node)) { + acceptor({ + node, + property: 'label', + type: SemanticTokenTypes.variable + }) + } else if (isProcedureCall(node)) { + acceptor({ + node, + property: 'procedure', + type: SemanticTokenTypes.function + }); + } else if (isLabelPrefix(node)) { + const container = node.$container; + acceptor({ + node: node, + property: 'name', + type: isProcedureStatement(container) ? SemanticTokenTypes.function : SemanticTokenTypes.variable + }); + } else if (isNumberLiteral(node)) { + acceptor({ + node, + property: 'value', + type: SemanticTokenTypes.number + }); + } else if (isStringLiteral(node)) { + acceptor({ + node, + property: 'value', + type: SemanticTokenTypes.string + }); + } else if (isLiteral(node)) { + acceptor({ + node, + property: 'multiplier', + type: SemanticTokenTypes.number + }); + } + } + +} diff --git a/packages/language/src/parser/pli-lexer.ts b/packages/language/src/parser/pli-lexer.ts new file mode 100644 index 0000000..8e6126b --- /dev/null +++ b/packages/language/src/parser/pli-lexer.ts @@ -0,0 +1,58 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import { DefaultLexer, LexerResult } from "langium"; + +const NEWLINE = '\n'.charCodeAt(0); + +export class Pl1Lexer extends DefaultLexer { + + override tokenize(text: string): LexerResult { + const lines = this.splitLines(text); + const adjustedLines = lines.map(line => this.adjustLine(line)); + const adjustedText = adjustedLines.join(''); + return super.tokenize(adjustedText); + } + + private splitLines(text: string): string[] { + const lines: string[] = []; + for (let i = 0; i < text.length; i++) { + const start = i; + while (i < text.length && text.charCodeAt(i) !== NEWLINE) { + i++; + } + lines.push(text.substring(start, i + 1)); + } + return lines; + } + + private adjustLine(line: string): string { + let eol = ''; + if (line.endsWith('\r\n')) { + eol = '\r\n'; + } else if (line.endsWith('\n')) { + eol = '\n'; + } + const prefixLength = 1; + const lineLength = line.length - eol.length; + if (lineLength < prefixLength) { + return ' '.repeat(lineLength) + eol; + } + const lineEnd = 72; + const prefix = ' '.repeat(prefixLength); + let postfix = ''; + if (lineLength > lineEnd) { + postfix = ' '.repeat(lineLength - lineEnd); + } + return prefix + line.substring(prefixLength, Math.min(lineEnd, lineLength)) + postfix + eol; + } + +} diff --git a/packages/language/src/parser/pli-token-builder.ts b/packages/language/src/parser/pli-token-builder.ts new file mode 100644 index 0000000..4e6257e --- /dev/null +++ b/packages/language/src/parser/pli-token-builder.ts @@ -0,0 +1,41 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import { TokenType, TokenVocabulary } from "chevrotain"; +import { DefaultTokenBuilder, Grammar, GrammarUtils, RegExpUtils, stream, TokenBuilderOptions } from "langium"; + +export class PliTokenBuilder extends DefaultTokenBuilder { + + override buildTokens(grammar: Grammar, options?: TokenBuilderOptions): TokenVocabulary { + const reachableRules = stream(GrammarUtils.getAllReachableRules(grammar, false)); + const terminalTokens: TokenType[] = this.buildTerminalTokens(reachableRules); + const tokens: TokenType[] = this.buildKeywordTokens(reachableRules, terminalTokens, options); + const id = terminalTokens.find(e => e.name === 'ID')!; + + for (const keywordToken of tokens) { + if (/[a-zA-Z]/.test(keywordToken.name)) { + keywordToken.CATEGORIES = [id]; + } + } + + terminalTokens.forEach(terminalToken => { + const pattern = terminalToken.PATTERN; + if (typeof pattern === 'object' && pattern && 'test' in pattern && RegExpUtils.isWhitespace(pattern) || terminalToken.name === 'ExecFragment') { + tokens.unshift(terminalToken); + } else { + tokens.push(terminalToken); + } + }); + const execFragment = tokens.find(e => e.name === 'ExecFragment')!; + execFragment.START_CHARS_HINT = ['S', 'C']; + return tokens; + } +} diff --git a/packages/language/src/pli-module.ts b/packages/language/src/pli-module.ts new file mode 100644 index 0000000..168345f --- /dev/null +++ b/packages/language/src/pli-module.ts @@ -0,0 +1,121 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import { type Module, inject } from 'langium'; +import { createDefaultModule, createDefaultSharedModule, PartialLangiumSharedServices, type DefaultSharedModuleContext, type LangiumServices, type LangiumSharedServices, type PartialLangiumServices } from 'langium/lsp'; +import { Pl1GeneratedModule, Pl1GeneratedSharedModule } from './generated/module.js'; +import { Pl1Validator, registerValidationChecks } from './validation/pli-validator.js'; +import { Pl1Lexer } from './parser/pli-lexer.js'; +import { PliTokenBuilder } from './parser/pli-token-builder.js'; +import { PliScopeComputation } from './references/pli-scope-computation.js'; +import { PliDocumentValidator } from './validation/pli-document-validator.js'; +import { PliSemanticTokenProvider } from './lsp/pli-semantic-highlighting.js'; +import { PliNameProvider } from './references/pli-name-provider.js'; +import { PliReferences } from './references/pli-references.js'; +import { PliScopeProvider } from './references/pli-scope-provider.js'; +import { PliNodeKindProvider } from './lsp/pli-node-kind-provider.js'; +import { PliDocumentationProvider } from './documentation.ts/pli-documentation-provider.js'; +import { PliCompletionProvider } from './lsp/pli-completion-provider.js'; +import { PliIndexManager } from './workspace/pli-index-manager.js'; +import { PliWorkspaceManager } from './workspace/pli-workspace-manager.js'; + +/** + * Declaration of custom services - add your own service classes here. + */ +export type Pl1AddedServices = { + validation: { + Pl1Validator: Pl1Validator + } +} + +/** + * Union of Langium default services and your custom services - use this as constructor parameter + * of custom service classes. + */ +export type Pl1Services = LangiumServices & Pl1AddedServices + +/** + * Dependency injection module that overrides Langium default services and contributes the + * declared custom services. The Langium defaults can be partially specified to override only + * selected services, while the custom services must be fully specified. + */ +export const PliModule: Module = { + documentation: { + DocumentationProvider: services => new PliDocumentationProvider(services) + }, + validation: { + Pl1Validator: () => new Pl1Validator(), + DocumentValidator: services => new PliDocumentValidator(services) + }, + parser: { + Lexer: services => new Pl1Lexer(services), + TokenBuilder: () => new PliTokenBuilder() + }, + references: { + ScopeComputation: services => new PliScopeComputation(services), + NameProvider: () => new PliNameProvider(), + References: services => new PliReferences(services), + ScopeProvider: services => new PliScopeProvider(services) + }, + lsp: { + SemanticTokenProvider: services => new PliSemanticTokenProvider(services), + CompletionProvider: services => new PliCompletionProvider(services) + } +}; + +export const PliSharedModule: Module = { + lsp: { + NodeKindProvider: () => new PliNodeKindProvider() + }, + workspace: { + IndexManager: services => new PliIndexManager(services), + WorkspaceManager: services => new PliWorkspaceManager(services) + } +}; + +/** + * Create the full set of services required by Langium. + * + * First inject the shared services by merging two modules: + * - Langium default shared services + * - Services generated by langium-cli + * + * Then inject the language-specific services by merging three modules: + * - Langium default language-specific services + * - Services generated by langium-cli + * - Services specified in this file + * + * @param context Optional module context with the LSP connection + * @returns An object wrapping the shared services and the language-specific services + */ +export function createPliServices(context: DefaultSharedModuleContext): { + shared: LangiumSharedServices, + pli: Pl1Services +} { + const shared = inject( + createDefaultSharedModule(context), + Pl1GeneratedSharedModule, + PliSharedModule + ); + const pli = inject( + createDefaultModule({ shared }), + Pl1GeneratedModule, + PliModule + ); + shared.ServiceRegistry.register(pli); + registerValidationChecks(pli); + if (!context.connection) { + // We don't run inside a language server + // Therefore, initialize the configuration provider instantly + shared.workspace.ConfigurationProvider.initialized({}); + } + return { shared, pli }; +} diff --git a/packages/language/src/pli.langium b/packages/language/src/pli.langium new file mode 100644 index 0000000..85771f2 --- /dev/null +++ b/packages/language/src/pli.langium @@ -0,0 +1,666 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +grammar Pl1 + +entry PliProgram: + (statements+=TopLevelStatement)*; + +TopLevelStatement: Package | PackageLevelStatements | Directives; + +Directives: SkipDirective | PopDirective | PushDirective | LineDirective | NoteDirective | PageDirective | PrintDirective | IncludeDirective | NoPrintDirective | ProcessDirective | ProcincDirective; + +// Defined on p. 90 +Package: + prefix=ConditionPrefix? + name=FeatureID ':' + 'PACKAGE' + exports=Exports? + reserves=Reserves? + options=Options? ';' + statements+=PackageLevelStatements* + end=EndStatement ';'; + +ConditionPrefix: ('(' items+=ConditionPrefixItem ')' ':')+; + +ConditionPrefixItem: conditions+=Condition (',' conditions+=Condition)*; + +Exports: + 'EXPORTS' '(' (all?='*' | (procedures+=FeatureID (',' procedures+=FeatureID)*)) ')'; + +Reserves: 'RESERVES' '(' (all?='*' | (variables+=FeatureID (',' variables+=FeatureID)*)) ')'; + +// TODO refine based on p. 126 +Options: 'OPTIONS' '(' items+=OptionsItem (','? items+=OptionsItem)* ')'; + +OptionsItem: + SimpleOptionsItem | + CMPATOptionsItem | + LinkageOptionsItem | + NoMapOptionsItem; + +LinkageOptionsItem: 'LINKAGE' '(' value=('CDECL' | 'OPTLINK' | 'STDCALL' | 'SYSTEM') ')'; + +CMPATOptionsItem: 'CMPAT' '(' value=('V1' | 'V2' | 'V3') ')'; + +NoMapOptionsItem: type=('NOMAP' | 'NOMAPIN' | 'NOMAPOUT') ('(' (parameters+=FeatureID (',' parameters+=FeatureID)*)? ')')?; + +SimpleOptionsItem: value=( + // BEGIN/PACKAGE statement + 'ORDER' | 'REORDER' | 'NOCHARGRAPHIC' | 'CHARGRAPHIC' | 'NOINLINE' | 'INLINE' | 'MAIN' | 'NOEXECOPS' | + // ENTRY declaration + 'COBOL' | 'FORTRAN' | 'BYADDR' | 'BYVALUE' | 'DESCRIPTOR' | 'NODESCRIPTOR' | + 'IRREDUCIBLE' | 'REDUCIBLE' | 'NORETURN' | 'REENTRANT' | + // PACKAGE + 'FETCHABLE' | 'RENT' | 'AMODE31' | 'AMODE64' | + // PROCEDURE statement + 'DLLINTERNAL' | 'FROMALIEN' | 'RETCODE' | 'ASSEMBLER' | /* abbr */ 'ASM' | 'WINMAIN' | + // Undocumented (?) + 'INTER' | 'RECURSIVE' + ); + +PackageLevelStatements: DeclareStatement | DefineAliasStatement | DefineOrdinalStatement | DefineStructureStatement | DefaultStatement | ProcedureStatement; + +ProcedureStatement: + (labels+=LabelPrefix)* + ('PROC' | 'PROCEDURE' | xProc?='XPROC' | xProc?='XPROCEDURE') + ('(' (parameters+=ProcedureParameter (',' parameters+=ProcedureParameter)*)? ')')? + // These can appear in any order: + ( + returns+=ReturnsOption | + options+=Options | + recursive+='RECURSIVE' | + (order+=('ORDER' | 'REORDER')) | + (('EXTERNAL' | 'EXT') ('(' environmentName+=Expression ')')?) | + scope+=ScopeAttribute + )* ';' + statements+=ProcedureLevelStatement* + ('PROC' | 'PROCEDURE')? end=EndStatement ';'; + + +ScopeAttribute returns string: ('STATIC' | 'DYNAMIC'); + +LabelPrefix: name=FeatureID ':'; + +EntryStatement: + 'ENTRY' + ('(' (parameters+=ProcedureParameter (',' parameters+=ProcedureParameter)*)? ')')? + ((('EXTERNAL' | 'EXT') ('(' environmentName+=Expression ')')?) | + variable+='VARIABLE' | + limited+='LIMITED' | + returns+=ReturnsOption | + options+=Options)* ';'; + +ProcedureLevelStatement: Statement | ProcedureStatement; + +// #region Statements + +Statement: + condition=ConditionPrefix? (labels+=LabelPrefix)* value=Unit; + +Unit: DeclareStatement | AllocateStatement | AssertStatement | AssignmentStatement | AttachStatement + | BeginStatement | CallStatement | CancelThreadStatement | CloseStatement | DefaultStatement | DefineAliasStatement | DefineOrdinalStatement | DefineStructureStatement + | DelayStatement | DeleteStatement | DetachStatement | DisplayStatement | DoStatement + | EntryStatement | ExecStatement | ExitStatement | FetchStatement | FlushStatement | FormatStatement + | FreeStatement | GetStatement | GoToStatement + | IfStatement | IncludeDirective | IterateStatement + | LeaveStatement | LineDirective | LocateStatement + | NoPrintDirective | NoteDirective | NullStatement + | OnStatement | OpenStatement + | PageDirective | PopDirective | PrintDirective + | ProcessDirective | ProcincDirective | PushDirective + | PutStatement + | QualifyStatement + | ReadStatement | ReinitStatement | ReleaseStatement | ResignalStatement + | ReturnStatement | RevertStatement | RewriteStatement + | SelectStatement | SignalStatement | SkipDirective | StopStatement + | WaitStatement | WriteStatement; + +AllocateStatement: ('ALLOCATE' | 'ALLOC') variables+=AllocatedVariable (',' variables+=AllocatedVariable)* ';'; + +AllocatedVariable: level=NUMBER? var=ReferenceItem attribute=AllocateAttribute?; + +AllocateAttribute: AllocateDimension + | AllocateType + | AllocateLocationReference + | InitialAttribute; + +AllocateLocationReference: ('IN' '(' area=LocatorCall ')' ('SET' '(' locatorVariable=LocatorCall ')')? | 'SET' '(' locatorVariable=LocatorCall ')'); + +AllocateDimension: dimensions=Dimensions; + +AllocateType: type=AllocateAttributeType dimensions=Dimensions?; + +AllocateAttributeType returns string: 'CHAR' | 'CHARACTER' | 'BIT' | 'GRAPHIC' | 'UCHAR' | 'WIDECHAR' | 'AREA'; + +AssertStatement: 'ASSERT' ( + true?='TRUE' '(' actual=Expression ')' + | false?='FALSE' '(' actual=Expression ')' + | compare?='COMPARE' '(' actual=Expression ',' expected=Expression (',' operator=STRING_TERM)? ')' + | unreachable?='UNREACHABLE' + ) + ('TEXT' displayExpression=Expression)?; + +AssignmentStatement: refs+=LocatorCall (',' refs+=LocatorCall)* operator=AssignmentOperator expression=Expression (',' 'BY' ('NAME' | 'DIMACROSS' dimacrossExpr=Expression))? ';'; + +AssignmentOperator returns string: '=' | '+=' | '-=' | '*=' | '/=' | '|=' | '&=' | '||=' | '**=' | '¬=' | '^=' | '<>'; + +AttachStatement: 'ATTACH' reference=LocatorCall ('THREAD' '(' task=LocatorCall ')') (environment?='ENVIRONMENT' '(' ('TSTACK' '(' tstack=Expression ')')? ')')? ';'; + +BeginStatement: 'BEGIN' options=Options? recursive?='RECURSIVE'? (order?='ORDER' | reorder?='REORDER')? ';' + statements+=Statement* + end=EndStatement ';'; + +EndStatement: (labels+=LabelPrefix)* 'END' label=LabelReference?; + +CallStatement: 'CALL' call=ProcedureCall ';'; + +CancelThreadStatement: 'CANCEL' 'THREAD' '(' thread=LocatorCall ')' ';'; + +CloseStatement: 'CLOSE' 'FILE' '(' (files+=MemberCall | files+='*') ')' (','? 'FILE' '(' (files+=MemberCall | files+='*') ')')* ';'; + +DefaultStatement: ('DEFAULT' | 'DFT') expressions+=DefaultExpression (',' expressions+=DefaultExpression)* ';'; + +DefaultExpression: expression=DefaultExpressionPart attributes+=DeclarationAttribute*; + +DefaultExpressionPart: 'DESCRIPTORS' expression=DefaultAttributeExpression | ('RANGE' '(' identifiers=DefaultRangeIdentifiers ')' | '(' expression=DefaultAttributeExpression ')'); + +DefaultRangeIdentifiers: (identifiers+=('*' | DefaultRangeIdentifierItem) (',' identifiers+=('*' | DefaultRangeIdentifierItem))*); + +DefaultRangeIdentifierItem: from=FeatureID (':' to=FeatureID)?; + +DefaultAttributeExpression: items+=DefaultAttributeExpressionNot ((operators+=('AND' | 'OR') items+=DefaultAttributeExpressionNot)*)?; + +DefaultAttributeExpressionNot: (not?='NOT')? value=DefaultAttribute; + +DefaultAttribute returns string: + 'ABNORMAL' | 'ALIGNED' | 'AREA' | 'ASSIGNABLE' | 'AUTOMATIC' + | 'BACKWARDS' | 'BASED' | 'BIT' | 'BUFFERED' | 'BUILTIN' | 'BYADDR' | 'BYVALUE' | 'BIN' | 'BINARY' + | 'CHARACTER' | 'CHAR' | 'COMPLEX' | 'CONDITION' | 'CONNECTED' | 'CONSTANT' | 'CONTROLLED' | 'CTL' + | 'DECIMAL' | 'DEC' | 'DIMACROSS' + | 'EVENT' | 'EXCLUSIVE' | 'EXTERNAL' | 'EXT' + | 'FILE' | 'FIXED' | 'FLOAT' | 'FORMAT' + | 'GENERIC' | 'GRAPHIC' + | 'HEX' | 'HEXADEC' + | 'IEEE' | 'INONLY' | 'INOUT' | 'INTERNAL' | 'INT' | 'IRREDUCIBLE' | 'INPUT' + | 'KEYED' + | 'LABEL' | 'LIST' + | 'MEMBER' + | 'NATIVE' | 'NONASSIGNABLE' | 'NONASGN' | 'NONCONNECTED' | 'NONNATIVE' | 'NONVARYING' | 'NORMAL' + | 'OFFSET' | 'OPTIONAL' | 'OPTIONS' | 'OUTONLY' | 'OUTPUT' + | 'PARAMETER' | 'POINTER' | 'PTR' | 'POSITION' | 'PRECISION' | 'PREC' | 'PRINT' + | 'RANGE' | 'REAL' | 'RECORD' | 'RESERVED' | 'RETURNS' + | 'SEQUENTIAL' | 'SIGNED' | 'STATIC' | 'STREAM' | 'STRUCTURE' + | 'TASK' | 'TRANSIENT' + | 'UNAL' | 'UCHAR' | 'UNALIGNED' | 'UNBUFFERED' | 'UNION' | 'UNSIGNED' | 'UPDATE' + | 'VARIABLE' | 'VARYING' | 'VAR' | 'VARYING4' | 'VARYINGZ' | 'VARZ' + | 'WIDECHAR' + + | 'BIGENDIAN' | 'LITTLEENDIAN' + +; + +DefineAliasStatement: ('DEFINE' | xDefine?='XDEFINE') 'ALIAS' name=FeatureID (attributes+=DeclarationAttribute (','? attributes+=DeclarationAttribute)*)? ';'; + +DefineOrdinalStatement: + ('DEFINE' | xDefine?='XDEFINE') 'ORDINAL' name=FQN + '(' ordinalValues=OrdinalValueList ')' + (signed?='SIGNED' | unsigned?='UNSIGNED')? + (('PRECISION' | 'PREC') '(' precision=NUMBER ')')? + (signed?='SIGNED' | unsigned?='UNSIGNED')? + ';'; + +OrdinalValueList: members+=OrdinalValue (',' members+=OrdinalValue)*; + +OrdinalValue: name=FeatureID ('VALUE' '(' value=NUMBER ')')?; + +DefineStructureStatement: ('DEFINE' | xDefine?='XDEFINE') ('STRUCTURE'|'STRUCT') level=NUMBER name=FQN (union?='UNION')? (',' substructures+=SubStructure)* ';'; + +SubStructure: level=NUMBER name=FeatureID attributes+=DeclarationAttribute*; + +DelayStatement: 'DELAY' '(' delay=Expression ')' ';'; + +DeleteStatement: 'DELETE' 'FILE' '(' (file=LocatorCall) ')' ('KEY' '(' key=Expression ')')? ';'; + +DetachStatement: 'DETACH' 'THREAD' '(' reference=LocatorCall ')' ';'; + +DisplayStatement: 'DISPLAY' '(' expression=Expression ')' + ('REPLY' '(' reply=LocatorCall ')')? + ('ROUTCDE' '(' rout+=NUMBER (',' rout+=NUMBER)* ')' ('DESC' '(' desc+=NUMBER (',' desc+=NUMBER)* ')')?)? ';' +; + +DoStatement: + 'DO' + // Note: DoType1 does nothing + (DoType2 | DoType3)? ';' + statements+=Statement* + end=EndStatement ';'; + +DoType2: DoWhile | DoUntil; + +DoWhile: 'WHILE' '(' while=Expression ')' ('UNTIL' '(' until=Expression ')')?; + +DoUntil: 'UNTIL' '(' until=Expression ')' ('WHILE' '(' while=Expression ')')?; + +DoType3: variable=DoType3Variable '=' specifications+=DoSpecification (',' specifications+=DoSpecification)*; + +DoType3Variable: name=ID; + +DoSpecification: exp1=Expression ( + 'TO' to=Expression ('BY' by=Expression)? + | 'BY' by=Expression ('TO' to=Expression)? + | 'UPTHRU' upthru=Expression + | 'DOWNTHRU' downthru=Expression + | 'REPEAT' repeat=Expression + )? + ( whileOrUntil=(DoWhile | DoUntil)?); + +ExecStatement: 'EXEC' query=ExecFragment ';'; + +ExitStatement: {infer ExitStatement} 'EXIT' ';'; + +FetchStatement: 'FETCH' entries+=FetchEntry (',' entries+=FetchEntry)* ';'; + +FetchEntry: name=FeatureID ('SET' '(' set=LocatorCall ')')? ('TITLE' '(' title=Expression ')')?; + +FlushStatement: 'FLUSH' 'FILE' '(' file=(LocatorCall | '*') ')' ';'; + +FormatStatement: 'FORMAT' '(' list=FormatList ')' ';'; + +FormatList: items+=FormatListItem (',' items+=FormatListItem)*; + +FormatListItem: level=FormatListItemLevel? (item=FormatItem | '(' list=FormatList ')'); + +FormatListItemLevel: level=NUMBER | '(' level=Expression ')'; + +FormatItem: AFormatItem | BFormatItem | CFormatItem | EFormatItem | FFormatItem | PFormatItem + | ColumnFormatItem | GFormatItem | LFormatItem | LineFormatItem | PageFormatItem + | RFormatItem | SkipFormatItem | VFormatItem | XFormatItem; + +AFormatItem: 'A' ('(' fieldWidth=Expression ')')?; + +BFormatItem: 'B' ('(' fieldWidth=Expression ')')?; + +CFormatItem: 'C' '(' item=(FFormatItem | EFormatItem | PFormatItem)')'; + +FFormatItem: 'F' '(' fieldWidth=Expression (',' fractionalDigits=Expression (',' scalingFactor=Expression)?)? ')'; +EFormatItem: 'E' '(' fieldWidth=Expression ',' fractionalDigits=Expression (',' significantDigits=Expression)? ')'; +PFormatItem: 'P' specification=STRING_TERM; + +ColumnFormatItem: ('COLUMN' | 'COL') '(' characterPosition=Expression ')'; + +GFormatItem: 'G' ('(' fieldWidth=Expression ')')?; + +LFormatItem: {infer LFormatItem} 'L'; + +LineFormatItem: 'LINE' '(' lineNumber=Expression ')'; + +PageFormatItem: {infer PageFormatItem} 'PAGE'; + +RFormatItem: 'R' '(' labelReference=FeatureID ')'; + +SkipFormatItem: 'SKIP' ('(' skip=Expression ')')?; + +VFormatItem: {infer VFormatItem} 'V'; + +XFormatItem: 'X' '(' width=Expression ')'; + +FreeStatement: 'FREE' references+=LocatorCall (',' references+=LocatorCall)* ';'; + +GetStatement: 'GET' ( + {infer GetFileStatement} ('FILE' '(' file=Expression ')')? + (dataSpecification=DataSpecificationOptions)? + (copy?='COPY' ('(' /* TODO REFERENCE */ copyReference=FeatureID ')')?)? + (skip?='SKIP' ('(' skipExpression=Expression ')'))? + | + {infer GetStringStatement} 'STRING' '(' expression=Expression ')' dataSpecification=DataSpecificationOptions + ) +; + +GoToStatement: ('GO' 'TO' | 'GOTO') label=LabelReference ';'; + +IfStatement: 'IF' expression=Expression 'THEN' unit=Statement ('ELSE' else=Statement)?; + +IncludeDirective: ('%INCLUDE' | '%XINCLUDE') items+=IncludeItem (',' items+=IncludeItem)* ';'; + +IncludeItem: file=(STRING_TERM|ID) | ddname?='ddname' '(' file=(STRING_TERM|ID) ')'; + +IterateStatement: 'ITERATE' label=LabelReference? ';'; + +LeaveStatement: 'LEAVE' label=LabelReference? ';'; + +LineDirective: '%LINE' ('(' line=NUMBER ',' file=STRING_TERM ')') ';'; + +LocateStatement: + 'LOCATE' variable=LocatorCall + 'FILE' '(' file=ReferenceItem ')' + ('SET' '(' set=LocatorCall /* TODO Pointer-Reference? */ ')')? + ('KEYFROM' '(' keyfrom=Expression ')')? + ';' +; + +NoPrintDirective: {infer NoPrintDirective} '%NOPRINT' ';'; + +NoteDirective: '%NOTE' '(' message=Expression (',' code=Expression)? ')' ';'; + +NullStatement: {infer NullStatement} ';'; + +OnStatement: 'ON' conditions+=Condition (',' conditions+=Condition)* snap?='SNAP'? (system?='SYSTEM' ';' | onUnit=Statement); + +Condition: KeywordCondition | NamedCondition | FileReferenceCondition; + +KeywordCondition: keyword=( + 'ANYCONDITION' | 'ANYCOND' | 'AREA' | 'ASSERTION' | 'ATTENTION' + | 'CONFORMANCE' | 'CONVERSION' + | 'ERROR' + | 'FINISH' + | 'FIXEDOVERFLOW' | 'FOFL' + | 'INVALIDOP' + | 'OVERFLOW' | 'OFL' + | 'SIZE' | 'STORAGE' | 'STRINGRANGE' | 'STRINGSIZE' | 'SUBSCRIPTRANGE' + | 'UNDERFLOW' | 'UFL' + | 'ZERODIVIDE' | 'ZDIV' +); + +NamedCondition: 'CONDITION' '(' name=FeatureID ')'; + +FileReferenceCondition: keyword=('ENDFILE' | 'ENDPAGE'| 'KEY'|'NAME'|'RECORD'|'TRANSMIT'|'UNDEFINEDFILE'|'UNDF') ('(' fileReference=ReferenceItem ')')?; + +OpenStatement: 'OPEN' options+=OpenOptionsGroup (',' options+=OpenOptionsGroup)* ';'; + +OpenOptionsGroup: + 'FILE' '(' file=ReferenceItem ')' + (stream?='STREAM' | record?='RECORD')? + (input?='INPUT' | output?='OUTPUT' | update?='UPDATE')? + ((sequential?=('SEQUENTIAL'|'SEQL') | direct?='DIRECT')? (unbuffered?=('UNBUFFERED'|'UNBUF') | buffered?=('BUF'|'BUFFERED'))?)? + keyed?='KEYED'? + print?='PRINT'? + ('TITLE' '(' title=Expression ')')? + ('LINESIZE' '(' lineSize=Expression ')')? + ('PAGESIZE' '(' pageSize=Expression ')')? +; + +PageDirective: {infer PageDirective} '%PAGE' ';'; + +PopDirective: {infer PopDirective} '%POP' ';'; + +PrintDirective: {infer PrintDirective} '%PRINT' ';'; + +ProcessDirective: ('*PROCESS' | '%PROCESS') (compilerOptions+=CompilerOptions (',' compilerOptions+=CompilerOptions))? ';'; + +CompilerOptions: value='TODO'; + +ProcincDirective: ('%PROCINC' | '*PROCINC') datasetName=FeatureID ';'; + +PushDirective: {infer PushDirective} '%PUSH' ';'; + +PutStatement: 'PUT' + ( + {infer PutFileStatement} items+=(PutItem | DataSpecificationOptions)* + | + {infer PutStringStatement} ('STRING' '(' stringExpression=Expression ')' dataSpecification=DataSpecificationOptions) + ) ';' +; + +PutItem: attribute=PutAttribute ('(' expression=Expression ')')?; + +PutAttribute returns string: 'PAGE' | 'LINE' | 'SKIP' | 'FILE'; + +DataSpecificationOptions: ( + ('LIST'? '(' dataList=DataSpecificationDataList ')') + | data?='DATA' ('(' dataListItems+=DataSpecificationDataListItem (',' dataListItems+=DataSpecificationDataListItem)* ')')? + | edit?='EDIT' ('(' dataLists+=DataSpecificationDataList ')' '(' formatLists+=FormatList ')')+ +); + +DataSpecificationDataList: items+=DataSpecificationDataListEntry (',' items+=DataSpecificationDataListEntry)*; + +DataSpecificationDataListEntry: DataSpecificationDataListItem | DataSpecificationDataListItem3DO; + +DataSpecificationDataListItem: value=Expression; + +DataSpecificationDataListItem3DO: '(' list=DataSpecificationDataList 'DO' do=DoType3 ')'; + +QualifyStatement: + 'QUALIFY' ';' + statements+=Statement* + end=EndStatement ';' +; + +ReadStatement: 'READ' 'FILE' '(' fileReference=LocatorCall ')' + ( + 'IGNORE' '(' ignore=Expression ')' + | ('INTO' '(' intoRef=LocatorCall ')' | 'SET' '(' set=LocatorCall ')') ('KEY' '(' key=Expression ')' | 'KEYTO' '(' keyto=LocatorCall ')')? + )? ';' +; + +ReinitStatement: 'REINIT' reference=LocatorCall ';'; + +ReleaseStatement: 'RELEASE' (star?='*' | references+=FeatureID (',' references+=FeatureID)*) ';'; + +ResignalStatement: {infer ResignalStatement} 'RESIGNAL' ';'; + +ReturnStatement: 'RETURN' ('(' expression=Expression ')')? ';'; + +RevertStatement: 'REVER' conditions+=Condition (',' conditions+=Condition)* ';'; + +RewriteStatement: 'REWRITE' 'FILE' '(' file=LocatorCall ')' ('FROM' '(' from=LocatorCall ')')? ('KEY' '(' key=Expression ')')? ';'; + +// Ensure via validation that `Otherwise` appears last +SelectStatement: + 'SELECT' ('(' on=Expression ')')? ';' + (statements+=(WhenStatement | OtherwiseStatement))* + end=EndStatement ';' +; + +WhenStatement: 'WHEN' '(' conditions+=Expression (',' conditions+=Expression)* ')' unit=Statement /* maybe? ';' */; + +OtherwiseStatement: ('OTHERWISE' | 'OTHER') unit=Statement /* maybe? ';' */; + +SignalStatement: 'SIGNAL' condition+=Condition ';'; + +SkipDirective: '%SKIP' ('(' lines=Expression ')')? ';'; + +StopStatement: {infer StopStatement} 'STOP' ';'; + +WaitStatement: 'WAIT' 'THREAD' '(' task=LocatorCall ')' ';'; + +WriteStatement: 'WRITE' 'FILE' '(' fileReference=LocatorCall ')' 'FROM' '(' from=LocatorCall ')' ('KEYFROM' '(' keyfrom=Expression ')' | 'KEYTO' '(' keyto=LocatorCall ')')? ';'; + +// #endregion + +InitialAttribute: (('INITIAL' | 'INIT') ( + direct?='(' items+=InitialAttributeItem (',' items+=InitialAttributeItem)* ')' + | call?='CALL' procedureCall=ProcedureCall + | to?='TO' '(' content=InitialToContent ')' '(' items+=InitialAttributeItem (',' items+=InitialAttributeItem)* ')' + ) + | across?='INITACROSS' '(' expressions+=InitAcrossExpression (',' expressions+=InitAcrossExpression)* ')' + ); + +InitialToContent: (varying=Varying type=CharType? | type=CharType varying=Varying?); + +Varying returns string: 'VARYING' | 'VARYING4' | 'VARYINGZ' | 'NONVARYING'; + +CharType returns string: 'CHAR' | 'UCHAR' | 'WCHAR'; + +InitAcrossExpression: '(' expressions+=Expression (',' expressions+=Expression)* ')'; + +InitialAttributeItem: InitialAttributeItemStar | InitialAttributeSpecification | InitialAttributeExpression; + +InitialAttributeItemStar: {infer InitialAttributeItemStar} '*'; +InitialAttributeExpression: expression=Expression; +InitialAttributeSpecification: '(' (star?='*' | expression=Expression) ')' item=InitialAttributeSpecificationIteration; + +InitialAttributeSpecificationIteration: InitialAttributeItemStar | InitialAttributeExpression | InitialAttributeSpecificationIterationValue; + +InitialAttributeSpecificationIterationValue: '(' items+=InitialAttributeItem (',' items+=InitialAttributeItem)* ')'; + +DeclareStatement: ('DCL' | 'DECLARE' | xDeclare?='XDECLARE' | xDeclare?='XDCL') items+=DeclaredItem (',' items+=DeclaredItem)* ';'; +DeclaredItem: level=NUMBER? (element=DeclaredVariable | element='*' | '(' items+=DeclaredItem (',' items+=DeclaredItem)* ')') attributes+=DeclarationAttribute*; + +type NamedElement = DeclaredVariable | DoType3Variable | ProcedureStatement; +type NamedType = DefineAliasStatement; + +DeclaredVariable: name=ID; + +DeclarationAttribute: InitialAttribute | DateAttribute | HandleAttribute | DefinedAttribute | PictureAttribute | EnvironmentAttribute | DimensionsDataAttribute | ValueAttribute | ValueListFromAttribute | ValueListAttribute | ValueRangeAttribute | ComputationDataAttribute | EntryAttribute | LikeAttribute | TypeAttribute; + +DateAttribute: 'DATE' ('(' pattern=STRING_TERM ')')?; + +DefinedAttribute: ('DEFINED' | 'DEF') (reference=MemberCall | '(' reference=MemberCall ')') (('POSITION' | 'POS') '(' position=Expression ')')?; + +PictureAttribute: ('PICTURE' | 'WIDEPIC' | 'PIC') picture=STRING_TERM?; + +DimensionsDataAttribute: ('DIMENSION' | 'DIM')? dimensions=Dimensions; + +TypeAttribute: 'TYPE' (type=[NamedType:ID] | '(' type=[NamedType:ID] ')'); + +ComputationDataAttribute: type=DataAttributeType dimensions=Dimensions?; + +ValueAttribute: 'VALUE' '(' (items+=ValueAttributeItem (',' items+=ValueAttributeItem)* | value=Expression) ')'; + +ValueAttributeItem: attributes+=DeclarationAttribute+; + +ValueListAttribute: 'VALUELIST' '(' (values+=Expression (',' values+=Expression)*)? ')'; + +ValueListFromAttribute: 'VALUELISTFROM' from=LocatorCall; + +ValueRangeAttribute: 'VALUERANGE' '(' (values+=Expression (',' values+=Expression)*)? ')'; + +DataAttributeType returns string: DefaultAttribute; + +LikeAttribute: 'LIKE' reference=LocatorCall; + +HandleAttribute: 'HANDLE' ('(' size=NUMBER ')')? (type=[NamedType:ID] | '(' type=[NamedType:ID] ')'); + +Dimensions: '(' (dimensions+=DimensionBound (',' dimensions+=DimensionBound)*)? ')'; + +/** + * Attention! This naming has an explanation: + * - When only bound1 is given, it is the upper bound. + * - Otherwise bound1 is the lower and bound2 is the upper bound! + * Keep in mind, that `DimensionBound: upper=Bound | lower=Bound ':' upper=Bound;` is expensive because of the long common prefix. + */ +DimensionBound: bound1=Bound (':' bound2=Bound)?; + +Bound: (expression='*' | expression=Expression ('REFER' '(' refer=LocatorCall ')')?); + +// ONLY FOR FILES +EnvironmentAttribute: ('ENVIRONMENT' | 'ENV') '(' items+=EnvironmentAttributeItem* ')'; + +EnvironmentAttributeItem: environment=ID ('(' (args+=Expression (','? args+=Expression)*)? ')')?; + +EntryAttribute: + ( + limited+='LIMITED' + )* + 'ENTRY' + ('(' attributes+=EntryDescription (',' attributes+=EntryDescription)* ')')? + ( + options+=Options | + variable+='VARIABLE' | + limited+='LIMITED' | + returns+=ReturnsOption | + (('EXTERNAL' | 'EXT') ('(' environmentName+=Expression ')')?) + )* + +; + +ReturnsOption: 'RETURNS' '(' returnAttribute=DeclarationAttribute* ')'; + +EntryDescription: EntryParameterDescription | EntryUnionDescription; + +EntryParameterDescription: (attributes+=DeclarationAttribute+ | star?='*' attributes+=DeclarationAttribute*); + +EntryUnionDescription: init=NUMBER attributes+=DeclarationAttribute* ',' prefixedAttributes+=PrefixedAttribute*; + +PrefixedAttribute: level=NUMBER attribute=DeclarationAttribute*; + +ProcedureParameter: id=FeatureID; + +ReferenceItem: ref=[NamedElement:FeatureID] dimensions=Dimensions?; + +Expression: BitOrExpression; + + +// Note for expressions: Documentation uses '¬' to denote inversion or negation. The language actually uses '^' + +// Priority 7 +BitOrExpression infers Expression: BitAndExpression ({infer BitOrExpression.left=current} op=('|' | '¬' | '^') right=BitAndExpression)*; + +// Priority 6 +BitAndExpression infers Expression: CompExpression ({infer BitAndExpression.left=current} op='&' right=CompExpression)*; + +// Priority 5 +CompExpression infers Expression: ConcatExpression ({infer CompExpression.left=current} op=('<' | '¬<' | '<=' | '=' | '¬=' | '^=' | '<>' | '>=' | '>' | '¬>') right=ConcatExpression)*; + +// Priority 4 +ConcatExpression infers Expression: AddExpression ({infer ConcatExpression.left=current} op=('||' | '!!') right=AddExpression)*; + +// Priority 3 +AddExpression infers Expression: MultExpression ({infer AddExpression.left=current} op=('+' | '-' ) right=MultExpression)*; + +// Priority 2 +MultExpression infers Expression: ExpExpression ({infer MultExpression.left=current} op=('*' | '/' ) right=ExpExpression)*; + +// Priority 1 +ExpExpression infers Expression: PrimaryExpression ({infer ExpExpression.left=current} op='**' right=PrimaryExpression)*; + +PrimaryExpression infers Expression: + Literal + | '(' Expression ')' + | UnaryExpression + | LocatorCall; + +MemberCall: + element=ReferenceItem + ({infer MemberCall.previous=current} + "." element=ReferenceItem + )*; + +LocatorCall: + element=MemberCall + ({infer LocatorCall.previous=current} + (pointer?="->" | handle?="=>") element=MemberCall + )*; + +ProcedureCall: procedure=[ProcedureStatement:ID] ('(' (args+=(Expression | '*') (',' args+=(Expression | '*'))*)? ')')?; + +LabelReference: label=[LabelPrefix:ID]; + +UnaryExpression: op=('+' | '-' | '¬' | '^') expr=Expression; + +ConstantExpression: Literal; + +Literal: ('(' multiplier=NUMBER ')')? value=(StringLiteral | NumberLiteral); + +StringLiteral: value=STRING_TERM; +NumberLiteral: value=NUMBER; + +FQN returns string: ID ('.' ID)*; +FeatureID returns string: ID; + +hidden terminal WS: /\s+/; +terminal ExecFragment: /(?<=EXEC\s*)[a-zA-Z]+\s[^;]*/i; +terminal ID: /[$@#_a-zA-Z][\w_$@#]*/; +/** + * Includes both fixed and non-fixed (with and without mantissa) + */ +terminal NUMBER: FULL_NUM /([bB]|[iI])*/; +// terminal WRAPPED_NUM: ("'" (FULL_NUM | HEX_CHAR*) "'") /([xX][uU]|[xX][nN]|[bB]4|[bB]3|[bB][xX]|[bB]|[gG][xX]|[gG]|[uU][xX]|[wW][xX]|[xX]|[iI])*/; +// terminal fragment HEX_CHAR: /[0-9a-fA-F]/; +terminal fragment NUM: /([0-9][0-9_]*(\.[0-9_]+)?)|(\.[0-9_]+)/; +terminal fragment FULL_NUM: NUM MANTISSA?; +terminal fragment MANTISSA: /[eEsSdDqQ][-+]?[0-9]+/; +// This terminal combines WRAPPED_NUM and normal strings +terminal STRING_TERM: /("(""|\\.|[^"\\])*"|'(''|\\.|[^'\\])*')([xX]|[aA]|[eE]|[xX][uU]|[xX][nN]|[bB]4|[bB]3|[bB][xX]|[bB]|[gG][xX]|[gG]|[uU][xX]|[wW][xX]|[xX]|[iI])*/; + +hidden terminal ML_COMMENT: /\/\*[\s\S]*?\*\//; +hidden terminal SL_COMMENT: /\/\/[^\n\r]*/; \ No newline at end of file diff --git a/packages/language/src/references/pli-name-provider.ts b/packages/language/src/references/pli-name-provider.ts new file mode 100644 index 0000000..44e513b --- /dev/null +++ b/packages/language/src/references/pli-name-provider.ts @@ -0,0 +1,36 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import { AstNode, CstNode, DefaultNameProvider } from "langium"; +import { isProcedureStatement } from "../generated/ast"; + +export class PliNameProvider extends DefaultNameProvider { + override getName(node: AstNode): string | undefined { + if (isProcedureStatement(node)) { + const label = node.labels[0]; + return label?.name || undefined; + } else { + return super.getName(node); + } + } + override getNameNode(node: AstNode): CstNode | undefined { + if (isProcedureStatement(node)) { + const label = node.labels[0]; + if (label) { + return this.getNameNode(label); + } else { + return undefined; + } + } else { + return super.getNameNode(node); + } + } +} \ No newline at end of file diff --git a/packages/language/src/references/pli-references.ts b/packages/language/src/references/pli-references.ts new file mode 100644 index 0000000..8936747 --- /dev/null +++ b/packages/language/src/references/pli-references.ts @@ -0,0 +1,23 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import { AstNode, DefaultReferences, FindReferencesOptions, ReferenceDescription, Stream } from "langium"; +import { isLabelPrefix, isProcedureStatement } from "../generated/ast"; + +export class PliReferences extends DefaultReferences { + override findReferences(targetNode: AstNode, options: FindReferencesOptions): Stream { + if (isLabelPrefix(targetNode) && isProcedureStatement(targetNode.$container!)) { + return this.findReferences(targetNode.$container!, options); + } else { + return super.findReferences(targetNode, options); + } + } +} \ No newline at end of file diff --git a/packages/language/src/references/pli-scope-computation.ts b/packages/language/src/references/pli-scope-computation.ts new file mode 100644 index 0000000..c01fff8 --- /dev/null +++ b/packages/language/src/references/pli-scope-computation.ts @@ -0,0 +1,30 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import { AstNode, AstNodeDescription, AstUtils, DefaultScopeComputation, LangiumDocument, PrecomputedScopes } from "langium"; +import { CancellationToken } from "vscode-languageserver"; + +export class PliScopeComputation extends DefaultScopeComputation { + + override async computeExports(document: LangiumDocument, cancelToken = CancellationToken.None): Promise { + return this.computeExportsForNode(document.parseResult.value, document, AstUtils.streamAllContents, cancelToken); + } + + protected override processNode(node: AstNode, document: LangiumDocument, scopes: PrecomputedScopes): void { + const container = AstUtils.findRootNode(node); + if (container) { + const name = this.nameProvider.getName(node); + if (name) { + scopes.add(container, this.descriptions.createDescription(node, name, document)); + } + } + } +} diff --git a/packages/language/src/references/pli-scope-provider.ts b/packages/language/src/references/pli-scope-provider.ts new file mode 100644 index 0000000..b697298 --- /dev/null +++ b/packages/language/src/references/pli-scope-provider.ts @@ -0,0 +1,86 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import { AstUtils, DefaultScopeProvider, DocumentCache, EMPTY_SCOPE, MapScope, ReferenceInfo, Scope, URI, UriUtils } from "langium"; +import { DeclaredVariable, IncludeDirective, isDeclaredVariable, isIncludeDirective, isMemberCall } from "../generated/ast"; +import { LangiumServices } from "langium/lsp"; + +export class PliScopeProvider extends DefaultScopeProvider { + + protected readonly globalDocumentScopeCache: DocumentCache; + + constructor(services: LangiumServices) { + super(services); + this.globalDocumentScopeCache = new DocumentCache(services.shared); + } + + protected override getGlobalScope(referenceType: string, context: ReferenceInfo): Scope { + return this.globalDocumentScopeCache.get(AstUtils.getDocument(context.container).uri, referenceType, () => { + const allIncludes = AstUtils.streamAst(AstUtils.getDocument(context.container).parseResult.value).filter(isIncludeDirective); + const allFiles = this.getUrisFromIncludes(AstUtils.getDocument(context.container).uri, allIncludes.toArray()); + return new MapScope(this.indexManager.allElements(referenceType, allFiles)); + }); + } + + private getUrisFromIncludes(relative: URI, includes: IncludeDirective[]): Set { + const uris = new Set(); + uris.add(relative.toString()); + const dirname = UriUtils.dirname(relative); + for (const include of includes) { + for (const file of include.items) { + const uri = UriUtils.joinPath(dirname, file.file.substring(1, file.file.length - 1)); + uris.add(uri.toString()); + } + } + // Always add the builtins + uris.add('pli-builtin:/builtins.pli'); + return uris; + } + + override getScope(context: ReferenceInfo): Scope { + if (context.property === 'ref') { + const memberCall = AstUtils.getContainerOfType(context.container, isMemberCall); + if (memberCall?.previous) { + const previouslyReferenced = memberCall.previous.element.ref.ref; + if (previouslyReferenced && isDeclaredVariable(previouslyReferenced)) { + return this.createScopeForNodes(this.findChildren(previouslyReferenced)); + } else { + return EMPTY_SCOPE; + } + } + } + return super.getScope(context); + } + + private findChildren(declared: DeclaredVariable): DeclaredVariable[] { + const declaredItem = declared.$container; + let level = Number(declaredItem.level); + if (isNaN(level) || level < 1) { + level = 1; + } + const result: DeclaredVariable[] = []; + const container = declaredItem.$container; + const index = container.items.indexOf(declaredItem); + for (let i = index + 1; i < container.items.length; i++) { + const item = container.items[i]; + const childLevel = Number(item.level); + if (isNaN(childLevel) || childLevel < level) { + break; + } + if (childLevel === level + 1) { + if(isDeclaredVariable(item.element)) { + result.push(item.element); + } + } + } + return result; + } +} \ No newline at end of file diff --git a/packages/language/src/validation/messages/IBM1295IE-sole-bound-specified.ts b/packages/language/src/validation/messages/IBM1295IE-sole-bound-specified.ts new file mode 100644 index 0000000..6cf68f7 --- /dev/null +++ b/packages/language/src/validation/messages/IBM1295IE-sole-bound-specified.ts @@ -0,0 +1,32 @@ +import { ValidationAcceptor } from "langium"; +import { Bound, DimensionBound, isLiteral, isNumberLiteral, isUnaryExpression } from "../../generated/ast"; + +export function IBM1295IE_sole_bound_specified(bound: DimensionBound, accept: ValidationAcceptor): void { + if(bound.bound2 !== undefined) { + return; + } + const upper = bound.bound1; + if(isBoundNegative(upper) || isBoundZero(upper)) { + accept("error", "Sole bound specified is less than 1. An upper bound of 1 is assumed.", { + node: bound, + property: "bound1", + code: "IBM1295IE" + }); + } +} + +function isBoundNegative(bound: Bound) { + return bound.expression !== '*' + && isUnaryExpression(bound.expression) + && bound.expression.op === '-' + && isLiteral(bound.expression.expr) + && isNumberLiteral(bound.expression.expr.value); +} + +function isBoundZero(bound: Bound): boolean { + return bound.expression !== '*' + && isLiteral(bound.expression) + && isNumberLiteral(bound.expression.value) + //TODO find other cases when it is zero + && bound.expression.value.value === '0'; +} diff --git a/packages/language/src/validation/messages/IBM1324IE-name-occurs-more-than-once-within-exports-clause.ts b/packages/language/src/validation/messages/IBM1324IE-name-occurs-more-than-once-within-exports-clause.ts new file mode 100644 index 0000000..1bf17f8 --- /dev/null +++ b/packages/language/src/validation/messages/IBM1324IE-name-occurs-more-than-once-within-exports-clause.ts @@ -0,0 +1,19 @@ +import { ValidationAcceptor } from "langium" +import { Exports } from "../../generated/ast" + +export function IBM1324IE_name_occurs_more_than_once_within_exports_clause(exports: Exports, accept: ValidationAcceptor): void { + const set = new Set(); + exports.procedures.forEach((procedure, index) => { + if(!set.has(procedure)) { + set.add(procedure) + } else { + accept('error', `The name '${procedure}' occurs more than once in the EXPORTS clause.`, { + code: 'IBM1324IE', + node: exports, + property: "procedures", + index + }); + } + }); +} + diff --git a/packages/language/src/validation/messages/IBM1388IE-NODESCRIPTOR-attribute-is-invalid-when-any-parameter-has-NONCONNECTED-attribute.ts b/packages/language/src/validation/messages/IBM1388IE-NODESCRIPTOR-attribute-is-invalid-when-any-parameter-has-NONCONNECTED-attribute.ts new file mode 100644 index 0000000..96ec0f5 --- /dev/null +++ b/packages/language/src/validation/messages/IBM1388IE-NODESCRIPTOR-attribute-is-invalid-when-any-parameter-has-NONCONNECTED-attribute.ts @@ -0,0 +1,25 @@ +import { ValidationAcceptor } from "langium"; +import { isComputationDataAttribute, isDeclaredVariable, isDeclareStatement, isSimpleOptionsItem, isStatement, ProcedureStatement, SimpleOptionsItem } from "../../generated/ast"; +import { compareIdentifiers, normalizeIdentifier } from "../utils"; + +export function IBM1388IE_NODESCRIPTOR_attribute_is_invalid_when_any_parameter_has_NONCONNECTED_attribute(procedureStatement: ProcedureStatement, accept: ValidationAcceptor): void { + const items = procedureStatement.options.flatMap(o => o.items) + const item = items.find(i => isSimpleOptionsItem(i) && i.value.toUpperCase() === "NODESCRIPTOR") as SimpleOptionsItem|undefined; + if(item) { + const parameterNames = new Set(procedureStatement.parameters.map(p => normalizeIdentifier(p.id))); + const nonConnectedParameters = procedureStatement.statements + .filter(isStatement) + .map(s => s.value) + .filter(isDeclareStatement) + .flatMap(d => d.items) + .filter(i => isDeclaredVariable(i.element) && parameterNames.has(normalizeIdentifier(i.element.name))) + .filter(i => i.attributes.some(a => isComputationDataAttribute(a) && compareIdentifiers(a.type, 'NONCONNECTED'))); + if(nonConnectedParameters.length > 0) { + accept("error", "The NODESCRIPTOR attribute is invalid when any parameters have the NONCONNECTED attribute.", { + code: "IBM1388IE", + node: item, + property: 'value' + }); + } + } +} diff --git a/packages/language/src/validation/messages/IBM1747IS-Function-cannot-be-used-before-the-functions-descriptor-list-has-been-scanned.ts b/packages/language/src/validation/messages/IBM1747IS-Function-cannot-be-used-before-the-functions-descriptor-list-has-been-scanned.ts new file mode 100644 index 0000000..a1557c1 --- /dev/null +++ b/packages/language/src/validation/messages/IBM1747IS-Function-cannot-be-used-before-the-functions-descriptor-list-has-been-scanned.ts @@ -0,0 +1,37 @@ +import { AstUtils, ValidationAcceptor } from "langium"; +import { isDeclaredVariable, isEntryAttribute, MemberCall } from "../../generated/ast"; + +/** + * This validation addresses functions, not procedures. + * TODO check if also procedures are affected + * @see https://www.ibm.com/docs/en/epfz/6.1?topic=codes-compiler-severe-messages-1500-2399#ibm1747i__msgId__1 + */ +export function IBM1747IS_Function_cannot_be_used_before_the_functions_descriptor_list_has_been_scanned(call: MemberCall, accept: ValidationAcceptor): void { + //member call points to variable declaration... + if (!isDeclaredVariable(call.element.ref.ref)) { + return; + } + //...which actually is a function declaration... + const declaration = call.element.ref.ref.$container; + if (!declaration.attributes.some(a => isEntryAttribute(a) && a.returns)) { + return; + } + //... where both function call and function declaration are in the same file... + const callDocument = AstUtils.getDocument(call); + const declarationDocument = AstUtils.getDocument(declaration); + if (callDocument !== declarationDocument) { + return; + } + //...and the declaration happens after the call + const callOffset = call.$cstNode!.offset; + const declarationOffset = declaration.$cstNode!.offset; + if (callOffset > declarationOffset) { + return; + } + //throw error + accept('error', "Function cannot be used before the function's descriptor list has been scanned.", { + code: "IBM1747IS", + node: call, + property: "element" + }); +} \ No newline at end of file diff --git a/packages/language/src/validation/pli-document-validator.ts b/packages/language/src/validation/pli-document-validator.ts new file mode 100644 index 0000000..74eb275 --- /dev/null +++ b/packages/language/src/validation/pli-document-validator.ts @@ -0,0 +1,37 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import { AstNode, DefaultDocumentValidator, DiagnosticInfo, DocumentValidator, LangiumDocument, LinkingErrorData, ValidationOptions } from "langium"; +import { Diagnostic } from "vscode-languageserver-types"; + +export class PliDocumentValidator extends DefaultDocumentValidator { + + protected override processLinkingErrors(document: LangiumDocument, diagnostics: Diagnostic[], _options: ValidationOptions): void { + for (const reference of document.references) { + const linkingError = reference.error; + if (linkingError) { + const info: DiagnosticInfo = { + node: linkingError.container, + property: linkingError.property, + index: linkingError.index, + data: { + code: DocumentValidator.LinkingError, + containerType: linkingError.container.$type, + property: linkingError.property, + refText: linkingError.reference.$refText + } satisfies LinkingErrorData + }; + diagnostics.push(this.toDiagnostic('warning', linkingError.message, info)); + } + } + } + +} diff --git a/packages/language/src/validation/pli-validator.ts b/packages/language/src/validation/pli-validator.ts new file mode 100644 index 0000000..b0545be --- /dev/null +++ b/packages/language/src/validation/pli-validator.ts @@ -0,0 +1,40 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import type { ValidationChecks } from 'langium'; +import type { Pl1AstType } from '../generated/ast.js'; +import type { Pl1Services } from '../pli-module.js'; +import { IBM1295IE_sole_bound_specified } from './messages/IBM1295IE-sole-bound-specified.js'; +import { IBM1324IE_name_occurs_more_than_once_within_exports_clause } from './messages/IBM1324IE-name-occurs-more-than-once-within-exports-clause.js'; +import { IBM1388IE_NODESCRIPTOR_attribute_is_invalid_when_any_parameter_has_NONCONNECTED_attribute } from './messages/IBM1388IE-NODESCRIPTOR-attribute-is-invalid-when-any-parameter-has-NONCONNECTED-attribute.js'; +import { IBM1747IS_Function_cannot_be_used_before_the_functions_descriptor_list_has_been_scanned } from './messages/IBM1747IS-Function-cannot-be-used-before-the-functions-descriptor-list-has-been-scanned.js'; + +/** + * Register custom validation checks. + */ +export function registerValidationChecks(services: Pl1Services) { + const registry = services.validation.ValidationRegistry; + const validator = services.validation.Pl1Validator; + const checks: ValidationChecks = { + DimensionBound: [IBM1295IE_sole_bound_specified], + Exports: [IBM1324IE_name_occurs_more_than_once_within_exports_clause], + MemberCall: [IBM1747IS_Function_cannot_be_used_before_the_functions_descriptor_list_has_been_scanned], + ProcedureStatement: [IBM1388IE_NODESCRIPTOR_attribute_is_invalid_when_any_parameter_has_NONCONNECTED_attribute], + }; + registry.register(checks, validator); +} + +/** + * Implementation of custom validations. + */ +export class Pl1Validator { + +} diff --git a/packages/language/src/validation/utils.ts b/packages/language/src/validation/utils.ts new file mode 100644 index 0000000..457f827 --- /dev/null +++ b/packages/language/src/validation/utils.ts @@ -0,0 +1,7 @@ +export function normalizeIdentifier(id: T): Uppercase { + return id.toUpperCase() as Uppercase; +} + +export function compareIdentifiers(lhs: T, rhs: T) { + return normalizeIdentifier(lhs) === normalizeIdentifier(rhs); +} \ No newline at end of file diff --git a/packages/language/src/workspace/pli-builtin-functions.ts b/packages/language/src/workspace/pli-builtin-functions.ts new file mode 100644 index 0000000..7a7aef0 --- /dev/null +++ b/packages/language/src/workspace/pli-builtin-functions.ts @@ -0,0 +1,414 @@ +export const Builtins = ` // Mathematical functions + ABS: PROC (value) RETURNS (); + END; + + CEIL: PROC (value) RETURNS (); + END; + + COMPLEX: PROC (real, imag) RETURNS (COMPLEX); + END; + + CONJG: PROC (value) RETURNS (COMPLEX); + END; + + FLOOR: PROC (value) RETURNS (); + END; + + IMAG: PROC (value) RETURNS (); + END; + + MAX: PROC (value1, value2) RETURNS (); + END; + + MAXVAL: PROC (array) RETURNS (); + END; + + MIN: PROC (value1, value2) RETURNS (); + END; + + MINVAL: PROC (array) RETURNS (); + END; + + MOD: PROC (value1, value2) RETURNS (); + END; + + RANDOM: PROC () RETURNS (); + END; + + REAL: PROC (value) RETURNS (); + END; + + REM: PROC (value1, value2) RETURNS (); + END; + + ROUND: PROC (value) RETURNS (); + END; + + ROUNDAWAYFROMZERO: PROC (value) RETURNS (); + END; + + ROUNDTOEVEN: PROC (value) RETURNS (); + END; + + SIGN: PROC (value) RETURNS (); + END; + + TRUNC: PROC (value) RETURNS (); + END; + + // Array handling functions + ALL: PROC (array) RETURNS (); + END; + + ANY: PROC (array) RETURNS (); + END; + + DIMENSION: PROC (array) RETURNS (); + END; + + HBOUND: PROC (array) RETURNS (); + END; + + HBOUNDACROSS: PROC (array) RETURNS (); + END; + + INARRAY: PROC (array, value) RETURNS (); + END; + + LBOUND: PROC (array) RETURNS (); + END; + + LBOUNDACROSS: PROC (array) RETURNS (); + END; + + POLY: PROC (array, value) RETURNS (); + END; + + PROD: PROC (array) RETURNS (); + END; + + QUICKSORT: PROC (array) RETURNS (); + END; + + QUICKSORTX: PROC (array, fn) RETURNS (); + END; + + SUM: PROC (array) RETURNS (); + END; + + // Buffer management functions + COMPARE: PROC (buffer1, buffer2) RETURNS (); + END; + + HEXENCODE: PROC (buffer) RETURNS (); + END; + + HEXENCODE8: PROC (buffer) RETURNS (); + END; + + HEXIMAGE: PROC (buffer) RETURNS (); + END; + + HEXIMAGE8: PROC (buffer) RETURNS (); + END; + + MEMCONVERT: PROC (buffer, from, to) RETURNS (); + END; + + MEMCOLLAPSE: PROC (buffer) RETURNS (); + END; + + MEMCU12: PROC (buffer, target) RETURNS (); + END; + + MEMCU14: PROC (buffer, target) RETURNS (); + END; + + MEMCU21: PROC (buffer, target) RETURNS (); + END; + + MEMCU24: PROC (buffer, target) RETURNS (); + END; + + MEMCU41: PROC (buffer, target) RETURNS (); + END; + + MEMCU42: PROC (buffer, target) RETURNS (); + END; + + MEMINDEX: PROC (buffer, value) RETURNS (); + END; + + MEMREPLACE: PROC (buffer, value, replacement) RETURNS (); + END; + + MEMSEARCH: PROC (buffer, value) RETURNS (); + END; + + MEMSEARCHR: PROC (buffer, value) RETURNS (); + END; + + MEMSQUEEZE: PROC (buffer, target, replacement) RETURNS (); + END; + + /** + * Searches for the first nonoccurrence of any one of the elements of + * a string within a buffer. + */ + MEMVERIFY: PROC (buffer, value) RETURNS (); + END; + + MEMVERIFYR: PROC (buffer, value) RETURNS (); + END; + + WHEREDIFF: PROC (buffer1, buffer2) RETURNS (); + END; + + WSCOLLAPSE: PROC (buffer, target) RETURNS (); + END; + + WSCOLLAPSE16: PROC (buffer, target) RETURNS (); + END; + + WSREPLACE: PROC (buffer, target) RETURNS (); + END; + + WSREPLACE16: PROC (buffer, target) RETURNS (); + END; + + XMLCHAR: PROC (buffer) RETURNS (); + END; + + XMLSCRUB: PROC (buffer) RETURNS (); + END; + + XMLSCRUB16: PROC (buffer) RETURNS (); + END; + + XMLUCHAR: PROC (buffer) RETURNS (); + END; + + // Condition handling builtins + DATAFIELD: PROC () RETURNS (); + END; + ONACTUAL: PROC () RETURNS (); + END; + ONAREA: PROC () RETURNS (); + END; + ONCHAR: PROC () RETURNS (); + END; + ONEXPECTED: PROC () RETURNS (); + END; + ONCODE: PROC () RETURNS (); + END; + ONCONDCOND: PROC () RETURNS (); + END; + ONCONDID: PROC () RETURNS (); + END; + ONCOUNT: PROC () RETURNS (); + END; + ONFILE: PROC () RETURNS (); + END; + ONGSOURCE: PROC () RETURNS (); + END; + ONHBOUND: PROC () RETURNS (); + END; + ONJSONNAME: PROC () RETURNS (); + END; + ONKEY: PROC () RETURNS (); + END; + ONLBOUND: PROC () RETURNS (); + END; + ONLINE: PROC () RETURNS (); + END; + ONLOC: PROC () RETURNS (); + END; + ONOFFSET: PROC () RETURNS (); + END; + ONOPERATOR: PROC () RETURNS (); + END; + ONPACKAGE: PROC () RETURNS (); + END; + ONPROCEDURE: PROC () RETURNS (); + END; + ONSOURCE: PROC () RETURNS (); + END; + ONSUBSCRIPT: PROC () RETURNS (); + END; + ONTEXT: PROC () RETURNS (); + END; + ONUCHAR: PROC () RETURNS (); + END; + ONUSOURCE: PROC () RETURNS (); + END; + ONWCHAR: PROC () RETURNS (); + END; + ONWSOURCE: PROC () RETURNS (); + END; + + // Date and time functions + DATE: PROC () RETURNS (); + END; + + DATEIME: PROC () RETURNS (); + END; + + DAYS: PROC () RETURNS (); + END; + + DAYSTODATE: PROC (days) RETURNS (); + END; + + DAYSTOMICROSECS: PROC (days) RETURNS (); + END; + + DAYSTOSECS: PROC (days) RETURNS (); + END; + + JULIANTOSMF: PROC (julian) RETURNS (); + END; + + MAXDATE: PROC () RETURNS (); + END; + + MICROSECS: PROC () RETURNS (); + END; + + MICROSECSTODATE: PROC (microsecs) RETURNS (); + END; + + MICROSECSTODAYS: PROC (microsecs) RETURNS (); + END; + + MINDATE: PROC () RETURNS (); + END; + + REPATTERN: PROC () RETURNS (); + END; + + SECS: PROC () RETURNS (); + END; + + SECSTODATE: PROC (secs) RETURNS (); + END; + + SECSTODAYS: PROC (secs) RETURNS (); + END; + + SMFTOJULIAN: PROC (smf) RETURNS (); + END; + + STCKETODATE: PROC (stck) RETURNS (); + END; + + STCKTODATE: PROC (stck) RETURNS (); + END; + + TIME: PROC () RETURNS (); + END; + + TIMESTAMP: PROC () RETURNS (); + END; + + UTCDATETIME: PROC () RETURNS (); + END; + + UTCMICROSECS: PROC () RETURNS (); + END; + + UTCSECS: PROC () RETURNS (); + END; + + VALIDDATE: PROC (date) RETURNS (); + END; + + WEEKDAY: PROC (date) RETURNS (); + END; + + Y4DATE: PROC (date) RETURNS (); + END; + + Y4JULIAN: PROC (julian) RETURNS (); + END; + + Y4YEAR: PROC (date) RETURNS (); + END; + + // Encoding and hashing functions + BASE64DECODE: PROC (buffer) RETURNS (); + END; + BASE64DECODE8: PROC (buffer) RETURNS (); + END; + BASE64DECODE16: PROC (buffer) RETURNS (); + END; + BASE64ENCODE: PROC (buffer) RETURNS (); + END; + BASE64ENCODE8: PROC (buffer) RETURNS (); + END; + BASE64ENCODE16: PROC (buffer) RETURNS (); + END; + CHECKSUM: PROC (buffer) RETURNS (); + END; + HEXDECODE: PROC (buffer) RETURNS (); + END; + HEXDECODE8: PROC (buffer) RETURNS (); + END; + SHA1DIGEST: PROC (buffer) RETURNS (); + END; + SHA1FINAL: PROC (buffer) RETURNS (); + END; + SHA1INIT: PROC (buffer) RETURNS (); + END; + SHA1UPDATE: PROC (buffer) RETURNS (); + END; + SHA2DIGESTx: PROC (buffer) RETURNS (); + END; + SHA2FINALx: PROC (buffer) RETURNS (); + END; + SHA2INITx: PROC (buffer) RETURNS (); + END; + SHA2UPDATEx: PROC (buffer) RETURNS (); + END; + SHA3DIGESTx: PROC (buffer) RETURNS (); + END; + SHA3FINALx: PROC (buffer) RETURNS (); + END; + SHA3INITx: PROC (buffer) RETURNS (); + END; + SHA3UPDATEx: PROC (buffer) RETURNS (); + END; + + // Floating point inquiry functions + EPSILON: PROC () RETURNS (); + END; + HUGE: PROC () RETURNS (); + END; + ISFINITE: PROC (value) RETURNS (); + END; + ISINF: PROC (value) RETURNS (); + END; + ISNAN: PROC (value) RETURNS (); + END; + ISNORMAL: PROC (value) RETURNS (); + END; + ISZERO: PROC (value) RETURNS (); + END; + MAXEXP: PROC () RETURNS (); + END; + MINEXP: PROC () RETURNS (); + END; + PLACES: PROC (value) RETURNS (); + END; + RADIX: PROC (value) RETURNS (); + END; + TINY: PROC () RETURNS (); + END; + EXPONENT: PROC (value) RETURNS (); + END; + PRED: PROC (value) RETURNS (); + END; + SCALE: PROC (value, radix) RETURNS (); + END; + SUCC: PROC (value) RETURNS (); + END; + `; \ No newline at end of file diff --git a/packages/language/src/workspace/pli-index-manager.ts b/packages/language/src/workspace/pli-index-manager.ts new file mode 100644 index 0000000..c02d06f --- /dev/null +++ b/packages/language/src/workspace/pli-index-manager.ts @@ -0,0 +1,18 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import { DefaultIndexManager, LangiumDocument } from "langium"; + +export class PliIndexManager extends DefaultIndexManager { + override isAffected(document: LangiumDocument, changedUris: Set): boolean { + return false; + } +} \ No newline at end of file diff --git a/packages/language/src/workspace/pli-workspace-manager.ts b/packages/language/src/workspace/pli-workspace-manager.ts new file mode 100644 index 0000000..68a4ea1 --- /dev/null +++ b/packages/language/src/workspace/pli-workspace-manager.ts @@ -0,0 +1,29 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import { DefaultWorkspaceManager, LangiumDocument, LangiumDocumentFactory, URI, WorkspaceFolder } from "langium"; +import { Builtins } from "./pli-builtin-functions.js"; +import { LangiumSharedServices } from "langium/lsp"; + +export class PliWorkspaceManager extends DefaultWorkspaceManager { + + private readonly factory: LangiumDocumentFactory; + + constructor(services: LangiumSharedServices) { + super(services); + this.factory = services.workspace.LangiumDocumentFactory; + } + + protected override async loadAdditionalDocuments(_folders: WorkspaceFolder[], _collector: (document: LangiumDocument) => void): Promise { + const document = this.factory.fromString(Builtins, URI.parse('pli-builtin:///builtins.pli')); + _collector(document); + } +} diff --git a/packages/language/test/extracted-doc-cases.test.ts b/packages/language/test/extracted-doc-cases.test.ts new file mode 100644 index 0000000..ec0c359 --- /dev/null +++ b/packages/language/test/extracted-doc-cases.test.ts @@ -0,0 +1,5614 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +/** + * Auto-extracted cases from the: + * - PL/I Language Reference v6.1 + * - PL/I Programming Guide v6.1 + * + * Each case is tagged with a bit of auto-extracted context + a comment referencing the sourcing doc & page number + * + * All cases have been run through the PL/I compiler and passed, and are now being run through the Langium parser to ensure they pass here as well + */ + +import { beforeAll, expect, test } from "vitest"; +import { EmptyFileSystem, type LangiumDocument } from "langium"; +import { parseHelper } from "langium/test"; +import type { PliProgram } from "pl-one-language"; +import { createPliServices } from "pl-one-language"; + +let services: ReturnType; +let parse: ReturnType>; +let parseStmts: ReturnType>; + +beforeAll(async () => { + services = createPliServices(EmptyFileSystem); + parse = parseHelper(services.pli); + + /** + * Helper function to parse a string of PL/I statements, + * wrapping them in a procedure to ensure they are valid + */ + parseStmts = (input: string) => { + return parse(` STARTPR: PROCEDURE OPTIONS (MAIN); +${input} + end STARTPR;`); + } + + // activate the following if your linking test requires elements from a built-in library, for example + await services.shared.workspace.WorkspaceManager.initializeWorkspace([]); +}); + +test('Block block-492.pli', async () => { + // Context: + // + // control. It allows multiple ON-units to get control for the same condition. + // The processing continues as if the ON-unit executing the RESIGNAL did not exist and was never given + // condition to get control. + // The RESIGNAL statement terminates the current ON-unit and allows another ON-unit for the same + // RESIGNAL statement + // attribute. + // Is any condition described in Chapter 16, “Conditions,” on page 349 or defined with the CONDITION + // condition + // If the specified condition is disabled, the SIGNAL statement becomes equivalent to a null statement. + // the condition. The established action is taken unless the condition is disabled. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.398 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + RESIGNAL + ; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-508.pli', async () => { + // Context: + // + // Example + // A reference with the AREA attribute + // x + // 407 + // Chapter 18. Built-in functions, pseudovariables, and subroutines   + // ATAND + // . + // x + // obtained from the area + // value that indicates the size of the largest single allocation that can be + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.459 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl Uarea area(1000); + dcl Pz ptr; + dcl C99z char(99) varyingz based(Pz); + dcl (SizeBefore, SizeAfter) fixed bin(31); + SizeBefore = availablearea(Uarea); /* returns 1000 */ + Alloc C99z in(Uarea); + SizeAfter = availablearea(Uarea); /* returns 896 */ + dcl C9 char(896) based(Pz); + Alloc C9 in(Uarea); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-400.pli', async () => { + // Context: + // + // both specify null ON-units for the same file. + // L2 + // and + // L1 + // “ON-units for file variables” on page 345). In the following example, the statements labelled + // On-units can be established for a file constant through a file variable that represents its value (see + // • As the expression in a RETURN statement. + // • To qualify an input/output condition for ON, SIGNAL, and REVERT statements + // • As an argument to be passed to a function or subroutine + // • In a FILE or COPY option + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.331 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl F file, + G file variable; + G=F; + L1: on endfile(G); + L2: on endfile(F); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-204.pli', async () => { + // Context: + // + // "would be the same as this longer declare: + // func + // The declare for the entry " + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 180 + // Assignments to UNIONs + // description, the member names are not copied. For example, the following declares are valid: + // The LIKE attribute is supported in ENTRY descriptions and in parameter declarations. If used in an ENTRY + // name with the LIKE attribute. + // follows the object variable in the LIKE attribute must be equal to or less than the level-number of the + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.232 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl func entry( 1, 2 char(20) var, 2 char(10) var, 2 char(30) var ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-658.pli', async () => { + // Context: + // + // which is a structure declaration: + // For example, assume that PAYRL is a member of the data set SYSLIB and contains the following text, + // compile-time option.) + // %INCLUDE, execution of the preprocessor can be omitted. (This necessitates the use of the INCLUDE + // If the preprocessor input and the included text contain no preprocessor statements other than + // portion of the preprocessor input. + // For example, it is not allowable to have half of a %IF statement in an included text and half in another + // Preprocessor statements, DO-groups, SELECT-groups and procedures in included text must be complete. + // target label in the %GOTO statement must not precede the %GOTO. + // A %GO TO statement in included text can transfer control only to a point within the same include file. The + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.670 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + DECLARE 1 PAYROLL, + 2 NAME, + 3 LAST CHARACTER (30) VARYING, + 3 FIRST CHARACTER (15) VARYING, + 3 MIDDLE CHARACTER (3) VARYING, + 2 CURR, + 3 (REGLAR, OVERTIME) FIXED DECIMAL (8,2), + 2 YTD LIKE CURR; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-297.pli', async () => { + // Context: + // + // is encountered or until a %POP directive that restores the previous %PRINT directive is encountered. + // The %NOPRINT directive causes printing of the source listings to be suspended until a %PRINT directive + // %NOPRINT directive + // oriented data transmission,” on page 289. + // For details about the LOCATE statement, see “LOCATE statement” on page 291 in Chapter 11, “Record- + // BUFFERED file for locate mode processing. + // to the location of the next record. The LOCATE statement can be used only with an OUTPUT SEQUENTIAL + // The LOCATE statement allocates storage within an output buffer for a based variable and sets a pointer + // LOCATE statement + // The %LINE directive is invalid unless the LINEDIR compiler option is in effect. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.278 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + %NOPRINT + ; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-477.pli', async () => { + // Context: + // + // Consider the following example: + // Specifies the currency symbol. + // currency symbol + // type of sign character can appear in each field. + // currency symbol) specifies a currency symbol in the character value of numeric character data. Only one + // The picture characters S, +, and – specify signs in numeric character data. The picture character $ (or the + // Using signs and currency symbols + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 334 + // Currency symbols + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.386 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl Price picture '$99V.99'; + Price = 12.45; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-610.pli', async () => { + // Context: + // + // Example + // 551 + // Chapter 18. Built-in functions, pseudovariables, and subroutines   + // SINH + // have the UNALIGNED attribute. + // x + // • All other elements in + // with the NONVARYING and BIT attributes have the ALIGNED attribute. + // x + // • Elements in + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.603 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl Scids char(17) init('See you at SCIDS!') static; + dcl Vscids char(20) varying init('See you at SCIDS!') static; + dcl Stg fixed bin(31); + Stg = storage (Scids); /* 17 bytes */ + Stg = currentsize (Scids); /* 17 bytes */ + Stg = size (Vscids); /* 22 bytes */ + Stg = currentsize (Vscids); /* 19 bytes */ + Stg = size (Stg); /* 4 bytes */ + Stg = currentsize (Stg); /* 4 bytes */ + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-278.pli', async () => { + // Context: + // + // UPTHRU and DOWNTHRU are particularly useful with ordinals. Consider the following example: + // Similarly, the following loop avoids the problem of decrementing an unsigned value equal to zero: + // FIXEDOVERFLOW condition would not be raised by the following loop: + // updated; this can be very useful when there is no value after the terminating value. For instance, the + // When the UPTHRU option is used, the reference is compared to the terminating value before being + // has the value 5: + // i + // In the following example, the do-group executes 5 times and at the end of the loop + // terminating value. + // The UPTHRU and DOWNTHRU options make successive executions of the do-group dependent upon the + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.270 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + define ordinal Color ( Red value (1), + Orange, + Yellow, + Green, + Blue, + Indigo, + Violet); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-184.pli', async () => { + // Context: + // + // precision: + // However, the following statement specifies both the FIXED BINARY attribute as a default and the + // BINARY: + // For example, the following statement specifies precision for identifiers already known to be FIXED + // precision for FIXED DECIMAL names is to be (8,3). + // influenced by the default statement, because this statement specifies only that the default + // not + // It is + // If it is not declared explicitly, I is given the language-specified default attributes FIXED BINARY(15,0). + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.222 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + DFT RANGE(*) FIXED BINARY VALUE(FIXED BINARY(31)); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-129.pli', async () => { + // Context: + // + // To return from a subroutine, the RETURN statement syntax is as follows: + // Return from a subroutine + // of course). + // A procedure with the RETURNS option must contains at least one RETURN statement (with an expression, + // option. + // Conversely, a RETURN statement with an expression is not valid in a procedure without the RETURNS + // A RETURN statement without an expression is not valid in a procedure with the RETURNS option. + // The RETURN statement with an expression should not be used within a procedure with OPTIONS(MAIN). + // immediately following the invocation reference. + // the RETURN statement and returns control to the invoking procedure. Control is returned to the point + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.175 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + RETURN + ; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-689.pli', async () => { + // Context: + // + // Upper limits + // Lower limits + // (continued) + // Table 88. Supported code page values for LOWERCASE built-in function and UPPERCASE built-in function + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 632 + // Limits + // Upper limits + // Lower limits + // (continued) + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.684 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl lower_00813 char + value( ( + '6162636465666768'x + || '696A6B6C6D6E6F70'x + || '7172737475767778'x + || '797ADCDDDEDFE1E2'x + || 'E3E4E5E6E7E8E9EA'x + || 'EBECEDEEEFF0F1F3'x + || 'F4F5F6F7F8F9FAFB'x + || 'FCFDFE'x + ) ); + dcl upper_00813 char + value( ( + '4142434445464748'x + || '494A4B4C4D4E4F50'x + || '5152535455565758'x + || '595AB6B8B9BAC1C2'x + || 'C3C4C5C6C7C8C9CA'x + || 'CBCCCDCECFD0D1D3'x + || 'D4D5D6D7D8D9DADB'x + || 'BCBEBF'x + ) ); + dcl lower_00819 char + value( ( + '6162636465666768'x + || '696A6B6C6D6E6F70'x + || '7172737475767778'x + || '797AE0E1E2E3E4E5'x + || 'E6E7E8E9EAEBECED'x + || 'EEEFF0F1F2F3F4F5'x + || 'F6F8F9FAFBFCFDFE'x + ) ); + dcl upper_00819 char + value( ( + '4142434445464748'x + || '494A4B4C4D4E4F50'x + || '5152535455565758'x + || '595AC0C1C2C3C4C5'x + || 'C6C7C8C9CACBCCCD'x + || 'CECFD0D1D2D3D4D5'x + || 'D6D8D9DADBDCDDDE'x + ) ); + dcl lower_00850 char + value( ( + '6162636465666768'x + || '696A6B6C6D6E6F70'x + || '7172737475767778'x + || '797A818283848586'x + || '8788898A8B8C8D91'x + || '93949596979BA0A1'x + || 'A2A3A4C6D0E4E7EC'x + ) ); + dcl upper_00850 char + value( ( + '4142434445464748'x + || '494A4B4C4D4E4F50'x + || '5152535455565758'x + || '595A9A90B68EB78F'x + || '80D2D3D4D8D7DE92'x + || 'E299E3EAEB9DB5D6'x + || 'E0E9A5C7D1E5E8ED'x + ) ); + dcl lower_00858 char + value( ( + '6162636465666768'x + || '696A6B6C6D6E6F70'x + || '7172737475767778'x + || '797A818283848586'x + || '8788898A8B8C8D91'x + || '93949596979BA0A1'x + || 'A2A3A4C6D0E4E7EC'x + ) ); + dcl upper_00858 char + value( ( + '4142434445464748'x + || '494A4B4C4D4E4F50'x + || '5152535455565758'x + || '595A9A90B68EB78F'x + || '80D2D3D4D8D7DE92'x + || 'E299E3EAEB9DB5D6'x + || 'E0E9A5C7D1E5E8ED'x + ) ); + dcl lower_00871 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424344454647'x + || '4849515253545556'x + || '575870798DA1C0CB'x + || 'CDCECFD0DBDCDDDE'x + ) ); + dcl upper_00871 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626364656667'x + || '6869717273747576'x + || '7778807CAD5F4AEB'x + || 'EDEEEF5AFBFCFDFE'x + ) ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-688.pli', async () => { + // Context: + // + // Upper limits + // Lower limits + // (continued) + // Table 88. Supported code page values for LOWERCASE built-in function and UPPERCASE built-in function + // 631 + // Appendix A. Limits   + // Limits + // Upper limits + // Lower limits + // Table 88. Supported code page values for LOWERCASE built-in function and UPPERCASE built-in function + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.683 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl lower_00280 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424345464749'x + || '52535556575A6A70'x + || '798C8D8E9CA1C0CB'x + || 'CCCECFD0DBDCDEE0'x + ) ); + dcl upper_00280 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626365666769'x + || '727375767771ED80'x + || 'FDACADAE9E7864EB'x + || 'ECEEEF74FBFCFE68'x + ) ); + dcl lower_00284 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424344454647'x + || '4851525354555657'x + || '586A708C8D8E9CCB'x + || 'CCCDCECFDBDCDDDE'x + ) ); + dcl upper_00284 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626364656667'x + || '6871727374757677'x + || '787B80ACADAE9EEB'x + || 'ECEDEEEFFBFCFDFE'x + ) ); + dcl lower_00285 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424344454647'x + || '4849515253545556'x + || '5758708C8D8E9CCB'x + || 'CCCDCECFDBDCDDDE'x + ) ); + dcl upper_00285 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626364656667'x + || '6869717273747576'x + || '777880ACADAE9EEB'x + || 'ECEDEEEFFBFCFDFE'x + ) ); + dcl lower_00297 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424345464749'x + || '5253555657586A70'x + || '7C8C8D8E9CC0CBCC'x + || 'CDCECFD0DBDCDEE0'x + ) ); + dcl upper_00297 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626365666769'x + || '727375767778FD80'x + || '64ACADAE9E71EBEC'x + || 'EDEEEF74FBFCFE68'x + ) ); + dcl lower_00500 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424344454647'x + || '4849515253545556'x + || '5758708C8D8E9CCB'x + || 'CCCDCECFDBDCDDDE'x + ) ); + dcl upper_00500 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626364656667'x + || '6869717273747576'x + || '777880ACADAE9EEB'x + || 'ECEDEEEFFBFCFDFE'x + ) ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-68.pli', async () => { + // Context: + // + // them separately. Consider the following example: + // necessarily go through more than one. To understand the conversion rules, it is convenient to consider + // More than one conversion might be required for a particular operation. The implementation does not + // LIMITS(FIXEDDEC(N1,N2)). + // is the maximum precision for FIXED DECIMAL. This is the value N2 from the compiler option + // N + // • + // LIMITS(FIXEDBIN(M1,M2)). + // is the maximum precision for FIXED BINARY. This is the value M2 from the compiler option + // M + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.127 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl A fixed dec(3,2) init(1.23); + dcl B fixed bin(15,5); + B = A; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-142.pli', async () => { + // Context: + // + // the parent structure. + // parent structure contains a handle to the child structure, but the child structure also contains a handle to + // structure that also contains a handle to the first structure. For instance, in the following example, the + // Unspecified structure definitions are useful when a structure definition contains a handle to a second + // specify its members. + // • An unspecified structure can also be the subject of a later DEFINE STRUCTURE statement that does + // course, cannot be dereferenced either. + // • An unspecified structure cannot be dereferenced, but it can be used to declare a HANDLE which, of + // its members defines an "unspecified structure". + // A DEFINE STRUCTURE statement that merely names the structure to be defined without specifying any of + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.192 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + define structure 1 child; + define structure + 1 parent, + 2 first_child handle child, + 2 parent_data fixed bin(31); + define structure + 1 child, + 2 parent handle parent, + 2 next_child handle child, + 2 child_data fixed bin(31); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-21.pli', async () => { + // Context: + // + // of 16 binary digits. + // represents binary floating-point data with a precision + // S + // For example, in the following DECLARE statement, + // The data attributes for declaring binary floating-point variables are BINARY and FLOAT. + // Binary floating-point data + // (4,4) + // .0012 + // (4,0) + // 5280 + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.78 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare S binary float (16); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-20.pli', async () => { + // Context: + // + // represents fixed-point data of 3 digits, 2 of which are fractional. + // D + // The following example specifies that + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 26 + // XN (hex) binary constant + // range -9999999*100 - 9999999*100, in increments of 100. + // holds 7 digits in the + // C + // has a scaling factor of -2. This means that + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.78 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare D decimal fixed real(3,2); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-389.pli', async () => { + // Context: + // + // Combined with DIMACROSS, it can become even easier to add elements to this declaration: + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 270 + // DEFINED and POSITION + // Using INITACROSS, you can simplify this declare by writing it as: + // For example, consider the declaration: + // set of initial values for a structure element in the array. + // attribute specifies a series of comma lists of expressions where each comma list in turn specifies the + // members are scalars in a way that makes it easy to add or delete elements to those arrays. The + // The INITACROSS attribute helps initialize one-dimensional arrays of structures where all the structure + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.322 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl + 1 a(*) dimacross + initacross( ( 'DE', 'Germany' ) + ,( 'FE', 'France' ) + ,( 'SP', 'Spain' ) + ) + ,2 b char(2) + ,2 c char(40) var + ; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-212.pli', async () => { + // Context: + // + // This example is based on the following declaration: + // This example illustrates the difference between the INDFOR attribute and the LIKE attribute. + // Example + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 182 + // Assignments to UNIONs + // the INDFOR attribute is expanded only after all INDFOR attributes have been resolved. + // UNALIGNED attributes are applied to the contained elements of the INDFOR object variable. However, + // The INDFOR attribute is expanded before the defaults are applied and before the ALIGNED and + // attributes are expanded. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.234 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl 1 a, 2 b char(8), 2 c fixed dec(5,0); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-149.pli', async () => { + // Context: + // + // is not. + // Y + // is a valid reference, but + // B + // For example, given the following declares and definitions, + // cannot be referenced by themselves. + // names in a typical untyped structure, the names in a typed structure form their own “name space” and + // You reference a member of a typed structure using the . operator or a handle with the => operator. Unlike + // Typed structure qualification + // Example + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.195 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl 1 A, + 2 B fixed bin, + 2 C fixed bin; + define structure + 1 X, + 2 Y fixed bin, + 2 Z fixed bin; + dcl S type X; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-192.pli', async () => { + // Context: + // + // Consider the following example: + // has bounds of 1 and 8, and its extent is 8. + // List + // three digits. The one dimension of + // is declared as a one-dimensional array of eight elements, each one a fixed-point decimal element of + // List + // Consider the following declaration: + // These examples help you understand declarations of arrays and array dimensions. + // Examples of arrays + // Declaration 2 + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.225 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare Table (4,2) fixed dec (3); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-633.pli', async () => { + // Context: + // + // Example + // Name of an ordinal type + // t + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 590 + // BIND + // . + // t + // FIRST returns the first value in the ordinal set + // FIRST + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.642 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + define ordinal Color ( Red, + Orange, + Yellow, + Green, + Blue, + Indigo, + Violet ); + display (ordinalname( first(Color) )); /* RED */ + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-383.pli', async () => { + // Context: + // + // consists of the elements '9.99' of the picture E. + // character string that consists of the elements '999' of the picture E. Z3 is a character-string array that + // Z1 is a character string array that consists of all the elements of the decimal numeric picture E. Z2 is a + // X is a bit string that consists of 40 elements of C, starting at the 20th element. + // Examples + // The base variable must refer to data in connected storage. + // and the base variable must not be subscripted. + // When the defined variable is a bit class aggregate, the POSITION attribute can contain only an integer, + // If the POSITION attribute is omitted, POSITION(1) is the default. + // The expression is evaluated and converted to an integer value at each reference to the defined item. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.318 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + DCL A(20) CHAR(10), + B(10) CHAR(5) DEF (A) POSITION(1); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-382.pli', async () => { + // Context: + // + // X is a bit string that consists of 40 elements of C, starting at the 20th element. + // Examples + // The base variable must refer to data in connected storage. + // and the base variable must not be subscripted. + // When the defined variable is a bit class aggregate, the POSITION attribute can contain only an integer, + // If the POSITION attribute is omitted, POSITION(1) is the default. + // The expression is evaluated and converted to an integer value at each reference to the defined item. + // is the number of characters, bits, graphics, uchars, or widechars in the defined variable. + // where N(b) is the number of characters, bits, graphics, uchars, or widechars in the base variable, and N(d) + // is defined as follows: + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.318 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + DCL E PIC'99V.999', + Z1(6) CHAR(1) DEF (E), + Z2 CHAR(3) DEF (E) POS(4), + Z3(4) CHAR(1) DEF (E) POS(2); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-177.pli', async () => { + // Context: + // + // Consider the following example: + // null descriptors). + // • At least one attribute is already present. (The DESCRIPTORS default attributes are not applied to + // same class. + // • The inclusion of any such attributes is not prohibited by the presence of alternative attributes of the + // an explicit entry declaration, if the following conditions are true: + // Specifies that the attributes are included in any parameter descriptors in a parameter descriptor list of + // DESCRIPTORS + // This statement specifies default attributes REAL PICTURE '99999' for all names. + // Specifies all names in the scope of the DEFAULT statement. Consider the following example: + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.220 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + DEFAULT DESCRIPTORS BINARY; + DCL X ENTRY (FIXED, FLOAT); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-87.pli', async () => { + // Context: + // + // The ENTRY statement can define a secondary entry point to a procedure. Consider the following example: + // of the procedure. + // entry point + // and represents the + // Name + // example, the name of the procedure is + // An application must have exactly one external procedure that has OPTIONS(MAIN). In the following + // statement. A procedure can be a main procedure, a subroutine, or a function. + // A procedure is a sequence of statements delimited by a PROCEDURE statement and a corresponding END + // Procedures + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.145 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + Name: procedure; + B: entry; + end Name; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-562.pli', async () => { + // Context: + // + // Example + // does not occur in the buffer, the result is zero. + // x + // If + // is the null string, the result is zero. + // x + // is zero or + // n + // If either the buffer length + // . + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.541 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl cb(128*1024) char(1); + dcl wb(128*1024) widechar(1); + dcl pos fixed bin(31); + /* 128K bytes searched from the right for a numeric */ + pos = memsearchr( addr(cb), stg(cb), '012345789' ); + /* 256K bytes searched from the right for a widechar '0' or '1' */ + pos = memsearchr( addr(wb), stg(wb), '0030_0031'wx ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-563.pli', async () => { + // Context: + // + // Example + // appropriate. + // th position onwards, squeezed and trimmed as + // n + // any collapsing) and then all characters from the + // th character (without + // i + // • The target buffer will include all the characters in the source buffer before the + // • If the target buffer is large enough, the number of bytes that are written to the buffer is returned. + // • If the target buffer is not large enough, a value of -1 is returned. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.542 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl s char(20); + dcl t char(20); + dcl cx fixed bin(31); + + s = '...abc....def...gh..'; + cx = memsqueeze(sysnull(), 0, addr(s), stg(s), '.'); + /* cx = 12 */ + cx = memsqueeze(addr(t), stg(t), addr(s), stg(s), '.'); + /* cx = 12 */ + /* t = '.abc.def.gh.' */ + + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-27.pli', async () => { + // Context: + // + // in this example do compare as equal: + // C + // and + // Z + // To the contrary, + // compare as being equal: + // not + // the same internal hex representation, they do + // determine the length of the string. Consequently, although the strings in the following declarations have + // The null terminator held in a VARYINGZ string is not used in comparisons or assignments, other than to + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.83 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl Z char(3) nonvarying init('abc'); + dcl C char(3) varyingz init('abc'); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-692.pli', async () => { + // Context: + // + // Upper limits + // Lower limits + // (continued) + // Table 88. Supported code page values for LOWERCASE built-in function and UPPERCASE built-in function + // 635 + // Appendix A. Limits   + // Limits + // Upper limits + // Lower limits + // (continued) + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.687 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl lower_01149 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424344454647'x + || '4849515253545556'x + || '575870798DA1C0CB'x + || 'CDCECFD0DBDCDDDE'x + ) ); + dcl upper_01149 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626364656667'x + || '6869717273747576'x + || '7778807CAD5F4AEB'x + || 'EDEEEF5AFBFCFDFE'x + ) ); + dcl lower_01155 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424344454647'x + || '4951525354555657'x + || '586A709CA1C0CBCD'x + || 'CECFD0DBDDDEE0'x + ) ); + dcl upper_01155 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626364656667'x + || '6971727374757677'x + || '787C809E7B4AEBED'x + || 'EEEF5AFBFDFE7F'x + ) ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-214.pli', async () => { + // Context: + // + // twentieth and the twenty-first centuries, it might be declared as follows: + // For example, if a structure is used to hold meteorological data for each month of the year for the + // levels, and members. + // , respectively. The elements of such an array are structures or unions having identical names, + // of unions + // array + // or an + // array of structures + // Specifying the dimension attribute on a structure or union results in an + // Combinations of arrays, structures, and unions + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.237 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + Declare 1 Year(1901:2100), + 3 Month(12), + 5 Temperature, + 7 High decimal fixed(4,1), + 7 Low decimal fixed(4,1), + 5 Wind_velocity, + 7 High decimal fixed(3), + 7 Low decimal fixed(3), + 5 Precipitation, + 7 Total decimal fixed(3,1), + 7 Average decimal fixed(3,1), + 3 * char(0); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-215.pli', async () => { + // Context: + // + // are structures: + // B + // and + // A + // contains members that are arrays. In the following example, both + // The need for subscripted qualified references becomes apparent when an array of structures or unions + // qualified reference. + // , which refers to the high temperature in March 1991, is a subscripted + // Temperature.High(1991,3) + // 1991. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.237 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare + 1 A (2,2), + 2 B (2), + 3 C fixed bin, + 3 D fixed bin, + 2 E fixed bin; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-286.pli', async () => { + // Context: + // + // The EXIT statement stops the current thread. + // EXIT statement + // For details about the ENTRY statement, see “ENTRY statement” on page 96. + // The ENTRY statement specifies a secondary entry point of a procedure. + // ENTRY statement + // Normal termination of a program occurs when control reaches the END statement of the main procedure. + // If control reaches an END statement for a procedure, it is treated as a RETURN statement. + // “Procedures” on page 94 and “Begin-blocks” on page 112 for more details.) + // the only way to terminate a block's execution, even though each block must have an END statement. (See + // Execution of a block terminates when control reaches the END statement for the block. However, it is not + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.272 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + EXIT + ; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-329.pli', async () => { + // Context: + // + // Consider the following example: + // The asterisk notation can also be used in a DECLARE statement, but has a different meaning there. + // are all character strings of length 5. + // X + // elements of each generation of + // has bounds (10,20); the second and third generations have bounds (10,10). The + // X + // The first generation of + // Consider the following example: + // dimension of the array, not just one of them. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.294 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl Y char(*) ctl, + N fixed bin; + N=20; + allocate Y char(N); + allocate Y; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-194.pli', async () => { + // Context: + // + // its associated name. For example, the items of a payroll record could be declared as follows: + // names are declared with level-numbers greater than 1. A delimiter must separate the level-number and + // A major structure name is declared with the level-number 1. Minor structures, unions, and elementary + // associated names. Level-numbers must be integers. + // A structure is described in a DECLARE statement through the use of level-numbers preceding the + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 176 + // Cross sections of arrays + // represent an elementary variable or an array variable. + // names, which can + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.228 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare 1 Payroll, /* major structure name */ + 2 Name, /* minor structure name */ + 3 Last char(20), /* elementary name */ + 3 First char(15), + 2 Hours, + 3 Regular fixed dec(5,2), + 3 Overtime fixed dec(5,2), + 2 Rate, + 3 Regular fixed dec(3,2), + 3 Overtime fixed dec(3,2); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-317.pli', async () => { + // Context: + // + // interpreted as fixed-point binary. + // is a reference to a piece of storage that contains a value to be + // X + // In the following example, a reference to + // required and how it is interpreted. + // All variables require storage. The attributes specified for a variable describe the amount of storage + // Chapter 9. Storage control + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 236 + // XPROCEDURE + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.288 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl X fixed binary(31,0) automatic; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-12.pli', async () => { + // Context: + // + // DECIMAL with a PRECISION of five digits, four to the right of the decimal point: + // has the programmer-defined data attributes of FIXED and + // Pi + // In the following example, the variable + // 1E0 (a decimal floating-point constant). + // fixed-point constant), '1'B (a bit constant), '1' (a character constant), 1B (binary fixed-point constant), or + // The constant 1.0 (a decimal fixed-point constant) is different from the constants 1 (another decimal + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 18 + // Nondata attributes + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.70 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare Pi fixed decimal(5,4) initial(3.1416); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-385.pli', async () => { + // Context: + // + // containing the names of the weekdays. + // strings + // varyingz + // is initialized with the addresses of character + // pdays + // In the following example, + // indicated by the TO keyword. + // the address of the string specified in the INITIAL LIST. Also specifies that the string has the attributes + // Use only with static native pointers. Specifies that the pointer (or array of pointers) is initialized with + // INITIAL TO + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.321 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl pdays(7) static ptr init to(varyingz) + ('Sunday', + 'Monday', + 'Tuesday', + 'Wednesday', + 'Thursday', + 'Friday', + 'Saturday' ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-153.pli', async () => { + // Context: + // + // is valid. + // x(1).b(2) + // However, given the following typed structure, only + // Example 2 + // have the same meaning. + // a(1,2).b + // , and + // a.b(1,2) + // , + // a(1).b(2) + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.196 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + define structure + 1 t, + 2 b(4) fixed bin, + 2 c(5) fixed bin; + dcl x(3) type t; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-152.pli', async () => { + // Context: + // + // Consider the following example: + // Example 1 + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 144 + // Typed structure qualification + // For details, see “Combinations of arrays, structures, and unions” on page 186. + // structures or unions that have identical names, levels, and members. + // You can specify the dimension attribute on typed structures or unions. The resulting arrays contain + // Combinations of arrays and typed structures or unions + // attribute” on page 142, the following code obtains the system date and displays the time: + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.196 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl 1 a(3), + 2 b(4) fixed bin, + 2 c(5) fixed bin; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-31.pli', async () => { + // Context: + // + // false. However, if the window started at 1950, the comparison would return true. + // statement is 'windowed'. This means that if the window started at 1900, the comparison would return + // In the following code fragment, if the DATE attribute is honored, the comparison in the second display + // WINDOW compile-time option. + // you specify in the + // window + // comparable representation. This process converts 2-digit years using the + // Implicit commoning means that the compiler generates code to convert the dates to a common, + // which are discussed later. + // comparand is generally treated as if it had the same DATE attribute, although some exceptions apply + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.93 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl a pic'(6)9' date; + dcl b pic'(6)9' def(a); + dcl c pic'(6)9' date; + dcl d pic'(6)9' def(c); + b = '670101'; + d = '010101'; + display( b || ' < ' || d || ' ?' ); + display( a < c ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-629.pli', async () => { + // Context: + // + // This example is based on the following code fragment: + // Example of using XMLCHAR + // case in which they were declared. + // CASE(ASIS) suboption of the XML compiler option can be used to specify that the names appear in the + // By default the names of the variables in the generated XML output are all in upper case. The + // Note: + // • Leading and trailing blanks are trimmed wherever possible. + // • Numeric and bit data is converted to character. + // • When a variable has the XMLOMIT attribute, the field is omitted if it has a null value. + // structure. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.634 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl buffer char(800); + dcl written fixed bin(31); + dcl next pointer; + dcl left fixed bin(31); + dcl + 1 a, + 2 a1, + 3 b1 char(8), + 3 b2 char(8), + 2 a2, + 3 c1 fixed bin, + 3 c2 fixed dec(5,1); + b1 = ' t1'; + b2 = 't2'; + c1 = 17; + c2 = -29; + next = addr(buffer); + left = stg(buffer); + written = xmlchar( a, next, left ); + next += written; + left -= written; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-291.pli', async () => { + // Context: + // + // This example is based on the following declarations. + // Example + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 224 + // IF + // AND or OR infix operators will also be short-circuited. + // Naturally, an expression formed (possibly recursively) from the above and the NOT prefix operator and the + // – VALIDDATE + // – VALID + // – UNALLOCATED + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.276 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl A bit(1); + dcl B bit(1); + dcl C bit(2); + dcl D bit(2); + dcl P pointer; + dcl BX based fixed bin(31); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-530.pli', async () => { + // Context: + // + // Example 1 + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 448 + // HBOUNDACROSS + // HEXIMAGE built-in function. + // in storage. If an exact image is required, use the + // x + // This function does not return an exact image of + // Note: + // bytes will be converted. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.500 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl Sweet char(5) init('Sweet'); + dcl Sixteen fixed bin(31) init(16) littleendian; + dcl XSweet char(size(Sweet)*2+(size(Sweet)-1)/4); + dcl XSixteen char(size(Sixteen)*2+(size(Sixteen)-1)/4); + XSweet = hex(Sweet,'-'); + /* '53776565-74' */ + XSweet = heximage(addr(Sweet),length(Sweet),'-'); + /* '53776565-74' */ + XSixteen = hex(Sixteen,'-'); + /* '00000010' - bytes reversed */ + XSixteen = heximage(addr(Sixteen),stg(Sixteen),'-'); + /* '10000000' - bytes NOT reversed */ + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-399.pli', async () => { + // Context: + // + // file constants. The file constants can subsequently be assigned to the file variable. + // are declared as + // Acct2 + // and + // Acct1 + // is declared as a file variable, and + // Account + // In the following declaration, + // 46. + // The VARIABLE attribute is implied under the circumstances described in “VARIABLE attribute” on page + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.331 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare Account file variable, + Acct1 file, + Acc2 file; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-471.pli', async () => { + // Context: + // + // 329 + // Chapter 14. Picture specification characters   + // Digits and decimal points + // each of which is a digit (0 through 9). See the following example: + // A string of n 9 picture characters specifies that the item is a nonvarying character-string of length n, + // character data because the corresponding character cannot be a blank for character data.) + // 9 picture specification character for numeric character data is different from the specification for + // Specifies that the associated position in the data item contains a decimal digit. (Note that the + // 9 + // decimal values. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.381 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl digit picture'9', + Count picture'999', + XYZ picture '(10)9'; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-183.pli', async () => { + // Context: + // + // BINARY: + // For example, the following statement specifies precision for identifiers already known to be FIXED + // precision for FIXED DECIMAL names is to be (8,3). + // influenced by the default statement, because this statement specifies only that the default + // not + // It is + // If it is not declared explicitly, I is given the language-specified default attributes FIXED BINARY(15,0). + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 170 + // DEFAULT + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.222 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + DFT RANGE(*) VALUE(FIXED BINARY(31)); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-236.pli', async () => { + // Context: + // + // This code sums up all the row elements: + // Example 1 + // These examples illustrate the structure assignment using the BY DIMACROSS option. + // Example of assigning a structure using BY DIMACROSS + // The second assignment statement is the same as the following statement: + //  2  + // The first assignment statement is the same as the following statements: + //  1  + //  2  + //  1  + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.257 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl + 1 x, + 2 a fixed bin(31), + 2 b fixed bin(31), + 2 c fixed bin(31), + 2 d fixed bin(31); + dcl 1 xa(17) dimacross like x; + dcl jx fixed bin; + x = 0; + do jx = lboundacross( xa ) to hboundacross( xa ); + x = x + xa, by dimacross( jx ); + end; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-209.pli', async () => { + // Context: + // + // would be ambiguous: + // aa3_array + // resolved, otherwise the reference + // The following example is valid, but only because the LIKE references are expanded after they are all + // 181 + // Chapter 7. Data declarations   + // Assignments to UNIONs + // : + // F + // is declared before + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.233 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl 1 aa(30) + ,5 aa1 char( 5) + ,5 aa2 fixed bin(31) + ,5 aa3_array(30) + ,7 aa3_1 fixed dec(15,2) + ,7 aa3_2 fixed dec(15,2) + ,7 aa3_3 fixed dec(11,4) + ,7 aa3_4 fixed dec(7,3) + ; + dcl bb like aa; + dcl cc like + aa3_array; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-208.pli', async () => { + // Context: + // + // : + // F + // is declared before + // E + // and + // C + // is declared before + // B + // The following declarations are valid, but only because + // have the results shown in the following example: + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.232 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl 1 a, 2 a1 fixed bin; + dcl 1 b, 2 b1 like a; + dcl 1 c, 2 c1 like b; + + dcl 1 d, 2 d1 fixed bin; + dcl 1 e like d; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-393.pli', async () => { + // Context: + // + // . + // 3.1416 + // is allocated, it is initialized to the value + // Pi + // In the following example, when + // (padded on the right to 10 characters) is assigned to it. + // 'John Doe' + // , the character constant + // Name + // In the following example, when storage is allocated for + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.324 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl Pi fixed dec(5,4) init(3.1416); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-392.pli', async () => { + // Context: + // + // (padded on the right to 10 characters) is assigned to it. + // 'John Doe' + // , the character constant + // Name + // In the following example, when storage is allocated for + // These examples illustrate how variables are initialized upon allocation. + // Examples + // the initial values are not assigned; for area variables, the area is not implicitly initialized to EMPTY. + // When storage for based variables is allocated through the ALLOCATE or the AUTOMATIC built-in functions, + // LOCATE statements for based variables), any specified initial value is assigned with each allocation. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.324 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl Name char(10) init('John Doe'); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-300.pli', async () => { + // Context: + // + // The %PAGE directive allows you to start a new page in the compiler source listings. + // %PAGE directive + // organization,” on page 89. + // For details about the PACKAGE statement, see “Packages” on page 91 in Chapter 5, “Program + // declarations and procedures contained in the package, unless the names are declared again. + // The PACKAGE statement defines a package. A package forms a name scope that is shared by all + // PACKAGE statement + // For details about the OTHERWISE statement, see “SELECT statement” on page 232. + // preceding WHEN statements fails. + // In a select-group, the OTHERWISE statement specifies the unit to be executed when every test of the + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.279 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + %PAGE + ; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-166.pli', async () => { + // Context: + // + // See the following example: + // to uppercase. + // The environment name must be a character string constant, and is used as is without any translation + // the compilation unit. The environment name is known instead. + // When so specified, the name being declared effectively becomes internal and is not known outside of + // Specifies the name by which the procedure or variable is known outside of the compilation unit. + // environment-name + // : INT for INTERNAL, EXT for EXTERNAL + // Abbreviations + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.206 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl X entry external ('koala'); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-28.pli', async () => { + // Context: + // + // Consider the following example: + // converted to an arithmetic value. + // Numeric picture specification describes a character string that can be assigned only data that can be + // fixed-point or floating-point value. + // attribute with a numeric picture specification. The data item is the character representation of a decimal + // A numeric character data item is the value of a variable that has been declared with the PICTURE + // Numeric character data + // • The use of WX can limit the portability of a program. + // '0031'wx (and not as '3100'wx). + // format). So, for example, the widechar value for the character '1' should always be specified as + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.91 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare Price picture '999V99'; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-29.pli', async () => { + // Context: + // + // digits, signs, and the location of the assumed decimal point are assigned. Consider the following example: + // arithmetic variable, the editing characters are not included in the assignment operation—only the actual + // assignment operation. However, if a numeric character item is assigned to another numeric character or + // when the item is printed or treated as a character string, the editing characters are included in the + // numeric character data item, and such characters are actually stored within the data item. Consequently, + // arithmetic items or character strings are processed. Editing characters can be specified for insertion into a + // on the decimal point like coded arithmetic data, it is processed differently from the way either coded + // Although numeric character data is in character form, like character strings, and although it is aligned + // automatically, but they require extra processing time. + // be converted either to decimal fixed-point or to decimal floating-point format. Such conversions are done + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.91 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare Price picture '$99V.99', + Cost character (6), + Amount fixed decimal (6,2); + Price = 12.28; + Cost = '$12.28'; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-516.pli', async () => { + // Context: + // + // is too short to contain the result. + // y + // This example shows a conversion from graphic to character. However, + // Example 2 + // .A.B.C.D.E.F + // .A.B.C.D.E.F + // .A.B.C.D.E.F + // A is assigned + // Intermediate Result + // For X with value + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.472 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl X graphic(6); + dcl A char (12); + A = char(X,11); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-679.pli', async () => { + // Context: + // + // preprocessor output generated is as follows: + // value replaces the function reference and the result is inserted into the preprocessor output. Thus, the + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 624 + // Preprocessor examples + // and returns the concatenated value, that is, the string Z (3), to the point of invocation. The returned + // corresponding parameter. VALUE then performs a concatenation of these arguments and the parentheses + // in a previous assignment statement), and 3 is converted to fixed-point to conform to the attribute of its + // However, before the arguments A and 3 are passed to VALUE, A is replaced by its value Z (assigned to A + // name. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.676 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + DECLARE (Z(10),Q) FIXED; + Q = 6+Z( 3); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-191.pli', async () => { + // Context: + // + // Consider the following declaration: + // These examples help you understand declarations of arrays and array dimensions. + // Examples of arrays + // Declaration 2 + // Declaration 1 + // As an example, the following declarations are equivalent: + // built-in functions. + // an array in a BY DIMACROSS assignment or as an argument to the LBOUNDACROSS or HBOUNDACROSS + // attribute is not an array. The children of the variable are arrays. However, the variable might be used as + // Unlike a variable declared with the DIMENSION attribute, a variable declared with the DIMACROSS + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.225 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare List fixed decimal(3) dimension(8); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-380.pli', async () => { + // Context: + // + // V is a two-dimensional array that consists of all the elements in the character string A. + // Examples + // Aggregates of fixed-length widechar variables + // Fixed-length widechar variables + // • The widechar class, which consists of the following variables: + // Aggregates of fixed-length uchar variables + // Fixed-length uchar variables + // • The uchar class, which consists of the following variables: + // Aggregates of fixed-length graphic variables + // Fixed-length graphic variables + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.317 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + DCL B(10) CHAR(1), + W CHAR(10) DEF B; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-528.pli', async () => { + // Context: + // + // contain the result. + // This example shows a conversion from CHARACTER to GRAPHIC. However, the target is too short to + // Example 2 + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 446 + // GRAPHIC + // b is a DBCS blank. + // . + // where + // A is assigned + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.498 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl X char (10) varying; + dcl A graphic (8); + A = graphic(X); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-486.pli', async () => { + // Context: + // + // Example 1 + // variable when the ON-unit is established. + // An ON statement that specifies a file variable refers to the file constant that is the current value of the + // ON-units for file variables + // situation, use the following technique: + // to be exceeded, a message is printed and the application is terminated. To avoid a loop caused by this + // raising the ERROR condition again. In any situation where a loop can cause the maximum nesting level + // A loop can occur if an ERROR condition raised in an ERROR ON-unit executes the same ERROR ON-unit, + // environment of the ON-unit in which the condition was raised. + // descendent ON-unit. A normal return from a dynamically descendent ON-unit reestablishes the + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.396 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl F file, + G file variable; + G = F; + L1: on endfile(G); + L2: on endfile(F); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-22.pli', async () => { + // Context: + // + // Consider this example: + // The data attributes for declaring decimal floating-point variables are DECIMAL and FLOAT. + // Decimal floating-point data + // ) + // z/OS + // ( + // (109) + // 1Q0b + // ) + // AIX + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.79 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare Light_years decimal float(5); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-23.pli', async () => { + // Context: + // + // 15: + // as a variable that can represent character data with a length of + // User + // The following statement declares + // Examples + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 30 + // BIT, CHARACTER, GRAPHIC, UCHAR and WIDECHAR + // See “REFER option (self-defining data)” on page 251 for the description of the REFER option. + // REFER + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.82 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare User character (15); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-115.pli', async () => { + // Context: + // + // applied only for the second parameter. + // Defaults are not applied if an asterisk is specified. For example, in the following declaration, defaults are + // order. + // parameter, but the structuring must be identical. The attributes for a particular level can appear in any + // For a structure-union descriptor, the descriptor level-numbers need not be the same as those of the + // structure-union-descr (structure-union-descriptor) + // See “OPTIONAL attribute” on page 117. + // OPTIONAL + // No conversions are done. + // • OPTIONAL + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.167 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl X entry(* optional, aligned); /* defaults applied for 2nd parm */ + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-548.pli', async () => { + // Context: + // + // Example + // must have the type CHARACTER(1) NONVARYING type. + // z + // Expression. If specified, + // z + // the attributes FIXED BINARY(31,0), it is converted to them. + // does not have + // n + // must have a computational type and should have a character type. If + // n + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.525 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl Source char value('One Hundred SCIDS Marks'); + dcl Target char(30); + Target = left (Source, length(Target), '*'); + /* 'One Hundred SCIDS Marks*******' */ + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-549.pli', async () => { + // Context: + // + // Example + // options, it returns a FIXED BIN(31) value. + // Under the CMPAT(V3) compiler option, LOCATION returns a FIXED BIN(63) value. Under all other CMPAT + // that must have a constant value. + // y + // • The value of a variable + // that must have constant extents. + // y + // • The extent of a variable + // if LOC(x) is used to set either of the following: + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.526 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl 1 Table static, + 2 Tab2loc fixed bin(15) nonasgn init(loc(Tab2)), + /* location is 0; gets initialized to 8 */ + 2 Tab3loc fixed bin(15) nonasgn init(loc(Tab3)), + /* location is 2; gets initialized to 808 */ + 2 Length fixed bin nonasgn init(loc(End)), + /* location is 4 */ + 2 * fixed bin, + 2 Tab2(20,20) fixed bin, + /* location is 8 */ + 2 Tab3(20,20) fixed bin, + /* location is 808 */ + 2 F2_loc fixed bin nonasgn init(loc(F2)), + /* location is 1608; gets initialized to 1612 */ + 2 F2_bitloc fixed bin nonasgn init(bitloc(F2)), + /* location is 1610; gets initialized to 1 */ + 2 Flags, /* location is 1612 */ + 3 F1 bit(1), + 3 F2 bit(1), /* bitlocation is 1 */ + 3 F3 bit(1), + 2 Bits(16) bit, /* location is 1613 */ + 2 End char(0); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-436.pli', async () => { + // Context: + // + // list. Consider the following example: + // The variable referenced in the STRING option should not be referenced by name or by alias in the data + // . + // Outprt + // write the record into the file + // are assigned. The WRITE statement specifies that record transmission is used to + // Hours*Rate + // expression + // and of the + // Pay# + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.354 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare S char(8) init('YYMMDD'); + put string (S) edit + (substr (S, 3, 2), '/', + substr (S, 5, 2), '/', + substr (S, 1, 2)) + (A); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-305.pli', async () => { + // Context: + // + // A common use of %PUSH and %POP directives is in included files and macros. + // first-out basis, by using the %POP directive. + // a “push down” stack on a last-in, first-out basis. You can restore this saved status later, also on a last-in, + // The %PUSH directive allows you to save the current status of the %PRINT and %NOPRINT directives in + // %PUSH directive + // The %PROCINC directive is used to override compiler options. + // “%PROCINC directive” on page 229 + // Related information + // The *PROCINC directive is a synonym for the %PROCINC directive. + // *PROCINC directive + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.281 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + %PUSH + ; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-239.pli', async () => { + // Context: + // + // : + // xa + // This code exchanges the entries in the first and seventeenth columns of + // Example 2 + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 206 + // Multiple assignments + // The assignment inside the loop is equivalent to the following statements: + // This code sums up all the row elements: + // Example 1 + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.258 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl + 1 x, + 2 a fixed bin(31), + 2 b fixed bin(31), + 2 c fixed bin(31), + 2 d fixed bin(31); + dcl 1 xa(17) dimacross like x; + dcl y like x; + x = xa, by dimacross( 1 ); + y = xa, by dimacross( 17 ); + xa = y, by dimacross( 1 ); + xa = x, by dimacross( 17 ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-403.pli', async () => { + // Context: + // + // This example illustrates attribute merging for an explicit opening of a file by using a file variable. + // Example of file variable + // PRINT, OUTPUT, and EXTERNAL. + // after implication are STREAM, PRINT, and OUTPUT. Attributes after default application are STREAM, + // Attributes after merge caused by execution of the OPEN statement are STREAM and PRINT. Attributes + // constant. + // This example illustrates attribute merging for an explicit opening of a file that is specified by a file + // Example of file constant + // RECORD + // KEYED + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.336 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare Account file variable, + (Acct1,Acct2) file + output; + Account = Acct1; + open file(Account) print; + Account = Acct2; + open file(Account) record unbuf; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-402.pli', async () => { + // Context: + // + // constant. + // This example illustrates attribute merging for an explicit opening of a file that is specified by a file + // Example of file constant + // RECORD + // KEYED + // OUTPUT, STREAM + // PRINT + // RECORD, KEYED + // DIRECT + // RECORD + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.336 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare Listing file stream; + open file(Listing) print; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-379.pli', async () => { + // Context: + // + // Examples + // Aggregates of fixed-length widechar variables + // Fixed-length widechar variables + // • The widechar class, which consists of the following variables: + // Aggregates of fixed-length uchar variables + // Fixed-length uchar variables + // • The uchar class, which consists of the following variables: + // Aggregates of fixed-length graphic variables + // Fixed-length graphic variables + // • The graphic class, which consists of the following variables: + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.317 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + DCL A CHAR(100), + V(10,10) CHAR(1) DEF A; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-475.pli', async () => { + // Context: + // + // . + // 7.6200 + // , but its arithmetic value is + // '762.00' + // printed, it appears as + // is + // Rate + // In the following example, decimal point alignment during assignment occurs on the character V. If + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 332 + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.384 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare Rate picture '9V99.99'; + Rate = 7.62; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-613.pli', async () => { + // Context: + // + // The following are invalid STRING targets: + // The following are valid STRING targets: + // STRINGOFGRAPHIC compiler options specifies that it should be CHARACTER. + // • If any of the base elements have the GRAPHIC type, then the type returned is GRAPHIC unless the + // • If any of the base elements are PICTUREs, then the type returned has CHARACTER type. + // The type of string returned has the same type as one of these base elements with these exceptions: + // • If applied to an array, all elements in the array are subject to the restrictions as described previously. + // – All widechar strings + // – All uchar strings + // – All graphic strings + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.606 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl + 1 A, + 2 B bit(8) aligned, + 2 C bit(2), + 2 D bit(8) aligned; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-181.pli', async () => { + // Context: + // + // These statements are equivalent to the following declaration: + // Consider the following example: + // integer, and can include the REFER option or can be specified as an asterisk. + // The size of AREA data, or length of BIT, CHARACTER, or GRAPHIC data can be an expression or an + // default of 15). + // attributes of FIXED BINART, but the precision 31 from the VALUE option (rather than the system + // will receive the system default + // I + // I; and DEFAULT RANGE(*) VALUE( FIXED BIN(31) );, the variable + // attributes, but before the system defaults for size, length and precision. So, for example, given DCL + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.221 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + DECLARE B FIXED DECIMAL(10), + C FLOAT DECIMAL(14), + A AREA(2000); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-180.pli', async () => { + // Context: + // + // Consider the following example: + // integer, and can include the REFER option or can be specified as an asterisk. + // The size of AREA data, or length of BIT, CHARACTER, or GRAPHIC data can be an expression or an + // default of 15). + // attributes of FIXED BINART, but the precision 31 from the VALUE option (rather than the system + // will receive the system default + // I + // I; and DEFAULT RANGE(*) VALUE( FIXED BIN(31) );, the variable + // attributes, but before the system defaults for size, length and precision. So, for example, given DCL + // These size, length and precision specifications in a VALUE clause are applied after the system default + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.221 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + DEFAULT RANGE(A:C) + VALUE (FIXED DEC(10), + FLOAT DEC(14), + AREA(2000)); + DECLARE B FIXED DECIMAL, + C FLOAT DECIMAL, + A AREA; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-375.pli', async () => { + // Context: + // + // Y is a character string that consists of the first 5 characters of B. + // element identified by the subscript expressions L, M, and N. + // A. X2 is a two-dimensional array that consists of the fifth plane of A. X3 is an element that consists of the + // X1 is a three-dimensional array that consists of the first two elements of each row, column and plane of + // Examples + // defined variable is a varying string of the same maximum length. + // A base variable can be, or can contain, a varying string, provided that the corresponding part of the + // In simple defining of an area, the size of the defined area must be equal to the size of the base area. + // the base string. + // In simple defining of a string, the length of the defined string must be less than or equal to the length of + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.316 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + DCL C AREA(500), + Z AREA(500) DEF C; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-374.pli', async () => { + // Context: + // + // element identified by the subscript expressions L, M, and N. + // A. X2 is a two-dimensional array that consists of the fifth plane of A. X3 is an element that consists of the + // X1 is a three-dimensional array that consists of the first two elements of each row, column and plane of + // Examples + // defined variable is a varying string of the same maximum length. + // A base variable can be, or can contain, a varying string, provided that the corresponding part of the + // In simple defining of an area, the size of the defined area must be equal to the size of the base area. + // the base string. + // In simple defining of a string, the length of the defined string must be less than or equal to the length of + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.316 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + DCL B CHAR(10), + Y CHAR(5) DEF B; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-506.pli', async () => { + // Context: + // + // The following example is not a multiple declaration: + // scopes. + // The abbreviations for built-in functions have separate declarations (explicit or contextual) and name + // • Any other qualifications on using the function or pseudovariable + // • A description of any arguments + // • A description of the value returned or, for a pseudovariable, the value set + // • A heading showing the syntax of the reference + // In general, each description has the following format: + // detailed descriptions for each function, subroutine, and pseudovariable. + // This section lists the built-in functions, subroutines, and pseudovariables in alphabetic order and provides + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.452 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl (Dim, Dimension) builtin; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-594.pli', async () => { + // Context: + // + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 538 + // ROUND + // values: + // point instructions are used, these successive roundings of 3.1415926d0 would produce the following + // what a naive user expects. For example, if compiled with USAGE(ROUND(ANS)) and IEEE binary floating + // Note that under USAGE(ROUND(ANS)), the rounding is a base 2 rounding, and the results may not be + // where where b = 2 (=radix(x)) and e = exponent(x): + // Under the compiler option USAGE(ROUND(ANS)), the value of the result is given by the following formula, + // source. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.590 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl x float bin(53) init( 3.1415926d0 ); + display( round(x,1) ); /* 4.000000000000000E+0000 */ + display( round(x,2) ); /* 3.000000000000000E+0000 */ + display( round(x,3) ); /* 3.000000000000000E+0000 */ + display( round(x,4) ); /* 3.250000000000000E+0000 */ + display( round(x,5) ); /* 3.125000000000000E+0000 */ + display( round(x,6) ); /* 3.125000000000000E+0000 */ + display( round(x,7) ); /* 3.156250000000000E+0000 */ + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-479.pli', async () => { + // Context: + // + // Consider the following example: + // represents negative values. The T can appear anywhere a '9' picture specification character occurs. + // 337 + // Chapter 14. Picture specification characters   + // Credit, debit, overpunched and zero replacement + // the input data represents positive values, and one of the characters } through R if the input data + // On output, T specifies that the associated position contains one of the characters { through I if + // values, and that the characters } through R represent negative values. + // On input, T specifies that the characters { through I and the digits 0 through 9 represent positive + // T + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.389 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl Credit picture 'ZZV9T'; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-478.pli', async () => { + // Context: + // + // Consider the following example: + // character (-). The rules are identical to those for the currency symbol. + // Specifies the plus sign character (+) if the data value is >=0; otherwise, it specifies the minus sign + // S + // symbols” on page 333. + // For information about specifying a character as a currency symbol, refer to “Defining currency + // . + // 12.45 + // . Its arithmetic value is + // '$12.45' + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.386 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl Root picture 'S999'; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-94.pli', async () => { + // Context: + // + // entry variable that is used in a procedure reference, as in the following example: + // ) can also be assigned to an + // Readin + // . The entry constant ( + // statement-3 + // and execution begins with + // Errt + // 99 + // Chapter 5. Program organization   + // Procedure activation + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.151 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare Readin entry, + Ent1 entry variable; + Ent1 = Readin; + call Ent1; + call Readin; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-299.pli', async () => { + // Context: + // + // OTHERWISE statements. + // execution. It is often used to denote null action for THEN and ELSE clauses and for WHEN and + // The null statement causes no operation to be performed and does not modify sequential statement + // null statement + // 227 + // Chapter 8. Statements and directives   + // %NOPRINT + // the setting of various compiler options. + // Generated messages of severity S, E, or W might cause termination of compilation, depending upon + // Generated messages of severity U cause immediate termination of preprocessing and compilation. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.279 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + ; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-302.pli', async () => { + // Context: + // + // The %PRINT directive causes printing of the source listings to be resumed. + // %PRINT directive + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 228 + // null + // For an example, see “%PUSH directive” on page 230. + // The most common use of the %PUSH and %POP directives is in included files and macros. + // the most recent %PUSH directive. + // The %POP directive allows you to restore the status of the %PRINT and %NOPRINT directives saved by + // %POP directive + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.280 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + %PRINT + ; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-165.pli', async () => { + // Context: + // + // . + // X + // procedure + // , as declared in + // 1 + // is + // B + // . The output for + // 2 + // , which is + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.204 */ + + + X: proc options(main); + dcl (A,B) char(1) init('1'); + call Y; + return; + Y: proc; + dcl 1 C, + 3 A char(1) init('2'); + put data(A,B); + return; + end Y; + end X; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-150.pli', async () => { + // Context: + // + // a type as a variable name as well. + // Type names are also in a separate name space from declared names. Therefore, you can use the name of + // is not. + // Y + // is a valid reference, but + // B + // For example, given the following declares and definitions, + // cannot be referenced by themselves. + // names in a typical untyped structure, the names in a typed structure form their own “name space” and + // You reference a member of a typed structure using the . operator or a handle with the => operator. Unlike + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.195 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + define alias Hps pointer; + declare Hps type Hps; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-309.pli', async () => { + // Context: + // + // Qualify blocks can also be nested. For example, you can nest a qualify block inside the block above: + // PAINT.RED, PAINT.ORANGE, and so on. The name of the qualify block must be unique to its block. + // means you can declare a variable as having type PAINT.COLOR and that you can refer to the constants + // The names inside a qualify block must be unique to that block, but not to their containing blocks. This + // etc. + // define PAINT as a qualifier to the ORDINAL type COLOR and as a qualifier to the values RED, ORANGE, + // For example, the statements: + // DECLARE statements in it must specify scalars with the VALUE attribute. + // A qualify block can contain only DECLARE, DEFINE, and QUALIFY statements, and the only valid + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.282 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + paint: qualify; + define ordinal color ( red, orange, yellow ); + depth: qualify; + define ordinal intensity ( high, medium, low ); + end depth; + end paint; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-532.pli', async () => { + // Context: + // + // Example 1 + // HEXIMAGE8 built-in function. + // in storage. If an exact image is required, use the + // x + // This function does not return an exact image of + // Note: + // 449 + // Chapter 18. Built-in functions, pseudovariables, and subroutines   + // HEX8 + // bytes will be converted. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.501 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl Sweet char(5) init('Sweet'); + dcl Sixteen fixed bin(31) init(16) littleendian; + dcl XSweet char(size(Sweet)*2+(size(Sweet)-1)/4); + dcl XSixteen char(size(Sixteen)*2+(size(Sixteen)-1)/4); + XSweet = hex8(Sweet,'-'); + /* '53776565-74'a */ + XSweet = heximage8(addr(Sweet),length(Sweet),'-'); + /* '53776565-74'a */ + XSixteen = hex8(Sixteen,'-'); + /* '00000010' - bytes reversed */ + XSixteen = heximage8(addr(Sixteen),stg(Sixteen),'-'); + /* '10000000' - bytes NOT reversed */ + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-473.pli', async () => { + // Context: + // + // Consider the following example: + // The V character cannot appear more than once in a picture specification. + // specification. This can cause the assigned value to be truncated, if necessary, to an integer. + // of a picture specification of a floating-point decimal value), a V is assumed at the right end of the field + // If no V character appears in the picture specification of a fixed-point decimal value (or in the first field + // condition is raised if enabled.) + // at either end. (If significant digits are truncated on the left, the result is undefined and the SIZE + // aligned on the V character. Therefore, an assigned value can be truncated or extended with zero digits + // fractional value of the assigned value, after modification by the optional scaling factor F(±x), are + // does not specify that an actual decimal point or decimal comma is inserted. The integer value and + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.381 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl Value picture 'Z9V999'; + Value = 12.345; + dcl Cvalue char(5); + Cvalue = Value; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-687.pli', async () => { + // Context: + // + // Upper limits + // Lower limits + // Table 88. Supported code page values for LOWERCASE built-in function and UPPERCASE built-in function + // code page that will be uppercased or lowercased. + // denotes the + // c + // . + // c + // for the supported values of + // upperc + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.682 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl lower_00037 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424344454647'x + || '4849515253545556'x + || '5758708C8D8E9CCB'x + || 'CCCDCECFDBDCDDDE'x + ) ); + dcl upper_00037 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626364656667'x + || '6869717273747576'x + || '777880ACADAE9EEB'x + || 'ECEDEEEFFBFCFDFE'x + ) ); + dcl lower_00273 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424445464748'x + || '4951525354555657'x + || '586A708C8D8E9CC0'x + || 'CBCDCECFD0DBDDDE'x + ) ); + dcl upper_00273 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626465666768'x + || '6971727374757677'x + || '78E080ACADAE9E4A'x + || 'EBEDEEEF5AFBFDFE'x + ) ); + dcl lower_00277 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424344454648'x + || '4951525354555657'x + || '586A8C8D8EA1C0CB'x + || 'CCCDCECFD0DBDDDE'x + ) ); + dcl upper_00277 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626364656668'x + || '6971727374757677'x + || '787CACADAEFC7BEB'x + || 'ECEDEEEF5BFBFDFE'x + ) ); + dcl lower_00278 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424445464849'x + || '525354555657586A'x + || '70798C8D8E9CA1C0'x + || 'CBCDCECFD0DBDDDE'x + ) ); + dcl upper_00278 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626465666869'x + || '727374757677787C'x + || '80E0ACADAE9EFC7B'x + || 'EBEDEEEF5BFBFDFE'x + ) ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-222.pli', async () => { + // Context: + // + // Example: The usage of the ASSERT COMPARE statement + // that are used in this example. + // The following example shows the usage of the ASSERT COMPARE statement. You must code the routines + // 197 + // Chapter 8. Statements and directives   + // statements. You must code the routines that are used in this example. + // The following example shows the usage of the ASSERT TRUE, ASSERT FALSE and ASSERT UNREACHABLE + // Example: The usage of the ASSERT TRUE, ASSERT FALSE and ASSERT UNREACHABLE statements + // • Any other type, then the strings will be null strings. + // • ORDINALs, then the strings will be their ORDINALNAME values. + // + + const doc: LangiumDocument = await parse(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.249 */ + + + asserts: package; + + main: proc options(main); + + dcl n fixed bin; + + n = 1; + assert compare(n,1); + assert compare(n,2) text("n not equal to 2"); + assert unreachable; + end; + + ibmpasc: + proc( packagename_ptr, procname_ptr, assert_sourceline, + actual_addr, actual_length, + expected_addr, expected_length, + text_addr, text_length ) + ext( '_IBMPASC') + options( byvalue linkage(optlink) ); + + dcl packagename_ptr pointer; + dcl procname_ptr pointer; + dcl assert_sourceline fixed BINARY(31); + dcl actual_addr pointer; + dcl actual_length fixed BINARY(31); + dcl expected_addr pointer; + dcl expected_length fixed BINARY(31); + dcl text_addr pointer; + dcl text_length fixed BINARY(31); + + dcl assert_packagename char(100) var based(packagename_ptr); + dcl assert_procname char(100) var based(procname_ptr); + dcl assert_text char(text_length) based(text_addr); + dcl actual_text char(actual_length) based(actual_addr); + dcl expected_text char(expected_length) + based(expected_addr); + + put skip edit( 'compare code hit on line ', + trim(assert_sourceline), + ' in ', + assert_packagename, + ':', assert_procname ) + ( a ); + + if text_length = 0 then; + else + put skip list( assert_text ); + + if actual_length = 0 then; + else + put skip list( actual_text ); + + if expected_length = 0 then; + else + put skip list( expected_text ); + + end; + end; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-450.pli', async () => { + // Context: + // + // Example 2 + // Output stream: + // Input stream: + // The following example shows data-directed transmission (both input and output). + // Example 1 + // quotation mark contained within the character string is represented by two successive quotation marks. + // For character data, the contents of the character string are written out enclosed in quotation marks. Each + // expression. + // numeric character variable does not represent a valid optionally signed arithmetic constant or a complex + // Data-directed output is not valid for subsequent data-directed input when the character-string value of a + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.358 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl 1 A, + 2 B FIXED, + 2 C, + 3 D FIXED; + A.B = 2; + A.D = 17; + put data (A); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-637.pli', async () => { + // Context: + // + // The preprocessor would produce the output text: + // replacement text and regular text. For example, suppose that the input text is as follows: + // . Such a null statement can be used to concatenate + // %; + // statement when it is specified in the form + // Preprocessor statements should be on separate lines from normal text. The one exception is the null + // delimiters. + // Replacement values must not contain % symbols, unmatched quotation marks, or unmatched comment + // been made. + // insertion of a value into the preprocessor output takes place only after all possible replacements have + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.647 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl BC fixed bin(31); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-196.pli', async () => { + // Context: + // + // and variant parts. For example, records in a client file can be declared as follows: + // Unions can be used to declare variant records that would typically contain a common part, a selector part, + // A union, like a structure, is declared through the use of level-numbers preceding the associated names. + // programmer determines which member is used. + // to the storage required by the largest member. Normally, only one member is used at any time and the + // level are members of the union and occupy the same storage. The storage occupied by the union is equal + // Like a structure, a union can be at any level including level 1. All elements of a union at the next deeper + // 177 + // Chapter 7. Data declarations   + // Unions + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.229 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + Declare 1 Client, + 2 Number pic '999999', + 2 Type bit(1), + 2 * bit(7), + 2 Name union, + 3 Individual, + 5 Last_Name char(20), + 5 First_Name union, + 7 First char(15), + 7 Initial char(1), + 3 Company char(35), + 2 * char(0); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-67.pli', async () => { + // Context: + // + // Examples + // • Type functions: BIND, CAST, FIRST, LAST, RESPEC, SIZE, and VALUE + // PROCEDURENAME, RANK, SOURCEFILE, SOURCELINE, and WCHARVAL + // – Miscellaneous functions: BYTE, CHARVAL, COLLATE, INDICATORS, PACKAGENAME, POPCNT, + // STORAGE, and SYSNULL + // – Storage-control functions: BINARYVALUE, LENGTH, NULL, OFFSETVALUE, POINTERVALUE, SIZE, + // LBOUNDACROSS + // – Array-handling functions: DIMACROSS, DIMENSION, HBOUND, HBOUNDACROSS, LBOUND, and + // – Precision-handling + // – Integer manipulation + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.124 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl Max_names fixed bin value (1000), + Name_size fixed bin value (30), + Addr_size fixed bin value (20), + Addr_lines fixed bin value (4); + dcl 1 Name_addr(Max_names), + 2 Name char(Name_size), + 2 * union, + 3 Address char(Addr_lines*Addr_size), /* address */ + 3 addr(Addr_lines) char(Addr_size), + 2 * char(0); + dcl One_Name_addr char(size(Name_addr(1))); /* 1 name/addr*/ + dcl Two_Name_addr char(length(One_Name_addr) + *2); /* 2 name/addrs */ + dcl Name_or_addr char(max(Name_size,Addr_size)) based; + dcl Ar(10) pointer; + dcl Ex entry( dim(lbound(Ar):hbound(Ar)) pointer); + dcl Identical_to_Ar( lbound(Ar):hbound(Ar) ) pointer; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-315.pli', async () => { + // Context: + // + // The STOP statement stops the current application. + // STOP statement + // %PAGE directive is executed in place of the %SKIP directive. + // is greater than the number of lines remaining on the page, the equivalent of a + // n + // the default is 1. If + // is omitted, + // n + // Specifies the number of lines to be skipped. It must be an integer in the range 1 - 999. If + // n + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.285 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + STOP + ; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-172.pli', async () => { + // Context: + // + // declaration: + // specified for the corresponding parameter in the invoked procedure. For example, consider the following + // If no description list is given in an ENTRY declaration, the attributes for the argument must match those + // alignment attributes are shown in Table 8 on page 21 and Table 7 on page 19. + // precision as indicated in Table 40 on page 168. The language-specified defaults for scope, storage and + // If a precision is not specified in an arithmetic declaration, the DEFAULT compiler option determines the + // with the attributes FIXED BINARY(p,q). + // attributes. Therefore, a declaration with the attributes BINARY(p,q) is always equivalent to a declaration + // If a scaling factor is specified in the precision attribute, the attribute FIXED is applied before any other + // • If DEFAULT(ANS) is in effect, all variables are given the attributes REAL FIXED BINARY(31,0). + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.218 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl X entry; + call X( 1 ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-387.pli', async () => { + // Context: + // + // For example, consider the declaration: + // set of initial values for a structure element in the array. + // attribute specifies a series of comma lists of expressions where each comma list in turn specifies the + // members are scalars in a way that makes it easy to add or delete elements to those arrays. The + // The INITACROSS attribute helps initialize one-dimensional arrays of structures where all the structure + // INITACROSS + // in the preceding example, the following assignment is illegal: + // pdays + // in read-only storage and an attempt to change it could result in a protection exception. Given the array + // You should not change a value identified by a pointer initialized with INITIAL TO. The value can be placed + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.321 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl + 1 a(3) + ,2 b char(2) + init( 'DE', 'FR', 'SP' ) + ,2 c char(40) var + init( 'Germany', 'France', 'Spain' ) + ; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-25.pli', async () => { + // Context: + // + // . + // Zuser + // and 16 bytes for + // User + // bytes for + // is null-terminated. The storage allocated is 17 + // Zuser + // , + // User + // a maximum length of 15. However, unlike + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.82 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare User character (15) varying; + declare Zuser character (15) varyingz; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-480.pli', async () => { + // Context: + // + // the following example: + // input data represents negative values; otherwise, it contains one of the digits 0 through 9. Consider + // On output, R specifies that the associated position contains one of the characters } through R if the + // through 9 represent positive values. + // On input, R specifies that the characters } through R represent negative values and the digits 0 + // R + // input data represents positive values; otherwise, it contains one of the digits, 0 through 9. + // On output, I specifies that the associated position contains one of the characters { through I if the + // values. + // On input, I specifies that the characters { through I and the digits 0 through 9 represent positive + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.389 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl X fixed decimal(3); + get edit (x) (P'R99'); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-24.pli', async () => { + // Context: + // + // The following example shows the declaration of a bit variable: + // 15: + // as a variable that can represent character data with a length of + // User + // The following statement declares + // Examples + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 30 + // BIT, CHARACTER, GRAPHIC, UCHAR and WIDECHAR + // See “REFER option (self-defining data)” on page 251 for the description of the REFER option. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.82 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare Symptoms bit (64); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-589.pli', async () => { + // Context: + // + // substring f in the string x will be replaced by the substring t. + // BINARY(31,0). The default value for i is 1. i must be non-negative. If i is 0, all occurrences of the + // be replaced by the substring t. i must have a computational type and is converted to FIXED + // An optional expression that specifies the maximum number of times that the substring f should + // i + // STRINGRANGE condition will be raised if enabled, and the result will be a null character string. + // BINARY(31,0). The default value for n is 1. If n is less than 1 or greater than the length(x), the + // begins searching for the substring f. n must have a computational type and is converted to FIXED + // An optional expression that specifies a location within the string x, from where the compiler + // n + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.587 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl ein char(50) var init( 'reserved from #date# till #date#.' ); + dcl aus char(80) var; + + dcl f char(6); + dcl t char(10); + + f = '#date#'; + t = '2018/05/01'; + + aus = replace( ein, f, t ); + /* 'reserved from 2018/05/01 till #date#.' */ + aus = replace( ein, f, t, 16 ); + /* 'reserved from #date# till 2018/05/01.' */ + aus = replace( ein, f, t, 1, 2 ); + /* 'reserved from 2018/05/01 till 2018/05/01.' */ + aus = replace( ein, f, t, 16, 1 ); + /* 'reserved from #date# till 2018/05/01.' */ + aus = replace( ein, f, t, 1, 0 ); + /* 'reserved from 2018/05/01 till 2018/05/01.' */ + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-147.pli', async () => { + // Context: + // + // that gets a handle to this typed structure: + // ), and declares the C function + // tm + // The following example defines several named types, a structure type ( + // Example 2 + // previous DEFINE ALIAS statement. See the following example: + // The TYPE attribute can be used in a DEFINE ALIAS statement to specify an alias for a type defined in a + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 142 + // HANDLE attribute + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.194 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + define alias int fixed bin(31); + define alias time_t fixed bin(31); + define structure + 1 tm + ,2 tm_sec type int /* seconds after the minute (0-61) */ + ,2 tm_min type int /* minutes after the hour (0-59) */ + ,2 tm_hour type int /* hours since midnight (0-23) */ + ,2 tm_mday type int /* day of the month (1-31) */ + ,2 tm_mon type int /* months since January (0-11) */ + ,2 tm_year type int /* years since 1900 */ + ,2 tm_wday type int /* days since Sunday (0-6) */ + ,2 tm_yday type int /* days since January 1 (0-365) */ + ,2 tm_isdst type int /* Daylight Saving Time flag */ + ; + dcl localtime ext('localtime') + entry( nonasgn byaddr type time_t ) + returns( byvalue handle tm ); + dcl time ext('time') + entry( byvalue pointer ) + returns( byvalue type time_t ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-321.pli', async () => { + // Context: + // + // . PL/I does not resolve this type of declaration dependency. + // Str2 + // , but not for + // Str1 + // allocated is correct for + // either to a restricted expression or to an initialized static variable. In the following example, the length + // be initialized + // N + // If the declare statements are located in the same block, PL/I requires that the variable + // is invoked. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.290 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl N fixed bin (15) init(10), + M fixed bin (15) init(N), + Str1 char(N), + Str2 char(M); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-146.pli', async () => { + // Context: + // + // previous DEFINE ALIAS statement. See the following example: + // The TYPE attribute can be used in a DEFINE ALIAS statement to specify an alias for a type defined in a + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 142 + // HANDLE attribute + // Consider the following code: + // Example 1 + // Specifies the name of a QUALIFY block. + // y + // Specifies the name of a previously defined alias, defined structure, or ordinal type. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.194 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + define alias Word fixed bin(31); + define alias Short type word; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-52.pli', async () => { + // Context: + // + // Consider the following example: + // A pseudovariable represents a target field. + // Pseudovariables + // 53 + // Chapter 3. Expressions and references   + // Order of evaluation + // and record I/O statements. + // assignment symbol (in this case A). Assignment to variables can also occur in stream I/O, DO, DISPLAY, + // , the target is the variable on the left of the + // A = B; + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.105 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare A character(10), + B character(30); + substr(A,6,5) = substr(B,20,5); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-690.pli', async () => { + // Context: + // + // Upper limits + // Lower limits + // (continued) + // Table 88. Supported code page values for LOWERCASE built-in function and UPPERCASE built-in function + // 633 + // Appendix A. Limits   + // Limits + // Upper limits + // Lower limits + // (continued) + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.685 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl lower_00920 char + value( ( + '6162636465666768'x + || '696A6B6C6D6E6F70'x + || '7172737475767778'x + || '797AE0E1E2E3E4E5'x + || 'E6E7E8E9EAEBECED'x + || 'EEEFF0F1F2F3F4F5'x + || 'F6F8F9FAFBFCFE'x + ) ); + dcl upper_00920 char + value( ( + '4142434445464748'x + || '494A4B4C4D4E4F50'x + || '5152535455565758'x + || '595AC0C1C2C3C4C5'x + || 'C6C7C8C9CACBCCCD'x + || 'CECFD0D1D2D3D4D5'x + || 'D6D8D9DADBDCDE'x + ) ); + dcl lower_01026 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424344454647'x + || '4951525354555657'x + || '586A709CA1C0CBCD'x + || 'CECFD0DBDDDEE0'x + ) ); + dcl upper_01026 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626364656667'x + || '6971727374757677'x + || '787C809E7B4AEBED'x + || 'EEEF5AFBFDFE7F'x + ) ); + dcl lower_01047 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424344454647'x + || '4849515253545556'x + || '5758708C8D8E9CCB'x + || 'CCCDCECFDBDCDDDE'x + ) ); + dcl upper_01047 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626364656667'x + || '6869717273747576'x + || '777880ACBAAE9EEB'x + || 'ECEDEEEFFBFCFDFE'x + ) ); + dcl lower_01140 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424344454647'x + || '4849515253545556'x + || '5758708C8D8E9CCB'x + || 'CCCDCECFDBDCDDDE'x + ) ); + dcl upper_01140 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626364656667'x + || '6869717273747576'x + || '777880ACADAE9EEB'x + || 'ECEDEEEFFBFCFDFE'x + ) ); + dcl lower_01141 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424445464748'x + || '4951525354555657'x + || '586A708C8D8E9CC0'x + || 'CBCDCECFD0DBDDDE'x + ) ); + dcl upper_01141 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626465666768'x + || '6971727374757677'x + || '78E080ACADAE9E4A'x + || 'EBEDEEEF5AFBFDFE'x + ) ); + dcl lower_01142 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424344454648'x + || '4951525354555657'x + || '586A8C8D8EA1C0CB'x + || 'CCCDCECFD0DBDDDE'x + ) ); + dcl upper_01142 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626364656668'x + || '6971727374757677'x + || '787CACADAEFC7BEB'x + || 'ECEDEEEF5BFBFDFE'x + ) ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-691.pli', async () => { + // Context: + // + // Upper limits + // Lower limits + // (continued) + // Table 88. Supported code page values for LOWERCASE built-in function and UPPERCASE built-in function + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Language Reference + // 634 + // Limits + // Upper limits + // Lower limits + // (continued) + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.686 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl lower_01143 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424445464849'x + || '525354555657586A'x + || '70798C8D8E9CA1C0'x + || 'CBCDCECFD0DBDDDE'x + ) ); + dcl upper_01143 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626465666869'x + || '727374757677787C'x + || '80E0ACADAE9EFC7B'x + || 'EBEDEEEF5BFBFDFE'x + ) ); + dcl lower_01144 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424345464749'x + || '52535556575A6A70'x + || '798C8D8E9CA1C0CB'x + || 'CCCECFD0DBDCDEE0'x + ) ); + dcl upper_01144 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626365666769'x + || '727375767771ED80'x + || 'FDACADAE9E7864EB'x + || 'ECEEEF74FBFCFE68'x + ) ); + dcl lower_01145 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424344454647'x + || '4851525354555657'x + || '586A708C8D8E9CCB'x + || 'CCCDCECFDBDCDDDE'x + ) ); + dcl upper_01145 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626364656667'x + || '6871727374757677'x + || '787B80ACADAE9EEB'x + || 'ECEDEEEFFBFCFDFE'x + ) ); + dcl lower_01146 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424344454647'x + || '4849515253545556'x + || '5758708C8D8E9CCB'x + || 'CCCDCECFDBDCDDDE'x + ) ); + dcl upper_01146 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626364656667'x + || '6869717273747576'x + || '777880ACADAE9EEB'x + || 'ECEDEEEFFBFCFDFE'x + ) ); + dcl lower_01147 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424345464749'x + || '5253555657586A70'x + || '7C8C8D8E9CC0CBCC'x + || 'CDCECFD0DBDCDEE0'x + ) ); + dcl upper_01147 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626365666769'x + || '727375767778FD80'x + || '64ACADAE9E71EBEC'x + || 'EDEEEF74FBFCFE68'x + ) ); + dcl lower_01148 char + value( ( + '8182838485868788'x + || '8991929394959697'x + || '9899A2A3A4A5A6A7'x + || 'A8A9424344454647'x + || '4849515253545556'x + || '5758708C8D8E9CCB'x + || 'CCCDCECFDBDCDDDE'x + ) ); + dcl upper_01148 char + value( ( + 'C1C2C3C4C5C6C7C8'x + || 'C9D1D2D3D4D5D6D7'x + || 'D8D9E2E3E4E5E6E7'x + || 'E8E9626364656667'x + || '6869717273747576'x + || '777880ACADAE9EEB'x + || 'ECEDEEEFFBFCFDFE'x + ) ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-216.pli', async () => { + // Context: + // + // Consider the following union: + // member. + // the members requires different alignment and therefore different padding before the beginning of the + // that the first storage locations for each of the members of a union do not overlay each other if each of + // Each of the members, if not a union, is mapped as if it were a member of a structure. This means + // Individual members of a union are mapped the same way as members of the structure. + // Structure and union mapping + // • Storage control and those built-in functions and subroutines that allow structures. + // • Parameters and arguments + // But references to unions or structures that contain unions are limited to the following contexts: + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.238 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl + 1 A union, + 2 B, + 3 C char(1), + 3 D fixed bin(31), + 2 E, + 3 F char(2), + 3 G fixed bin(31), + 2 H char(8); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-179.pli', async () => { + // Context: + // + // an attribute specification. Consider the following example: + // Attributes that conflict, when applied to a data item, do not necessarily conflict when they appear in + // The INITIAL attribute can be specified. + // the dimension attribute can be applied by default only to explicitly declared names. + // declared explicitly, a subscripted name is contextually declared with the attribute BUILTIN. Therefore, + // Although the DEFAULT statement can specify the dimension attribute for names that have not been + // following example: + // can be specified as an arithmetic constant or an expression and can include the REFER option. See the + // The dimension attribute is allowed, but only as the first item in an attribute specification. The bounds + // 169 + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.221 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + DEFAULT RANGE(S) BINARY VARYING; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-178.pli', async () => { + // Context: + // + // following example: + // can be specified as an arithmetic constant or an expression and can include the REFER option. See the + // The dimension attribute is allowed, but only as the first item in an attribute specification. The bounds + // 169 + // Chapter 7. Data declarations   + // DEFAULT + // If FILE is used, it implies the attributes VARIABLE and INTERNAL. + // list of attributes. + // Only those attributes that are necessary to complete the declaration of a data item are taken from the + // range. Attributes in the list can appear in any order and must be separated by blanks. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Language Reference v6.1, pg.221 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + DFT RANGE(J) (5); + DFT RANGE(J) (5,5) FIXED; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-271.pli', async () => { + // Context: + // + // The following example shows a procedure-specific message filter control block: + // information back to the compiler indicating how a particular message should be handled. + // The procedure-specific control block contains information about the messages. It is used to pass + // (severity code 4) messages. + // WARNING + // (severity code 8) or + // ERROR + // You can increase the severity of any of the messages but you can decrease the severity only of + // messages. + // The message filtering procedure permits you to either suppress messages or alter the severity of + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.518 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + Dcl 1 Uex_MFX native based, + 2 Uex_MFX_Length fixed bin(31), + 2 Uex_MFX_Facility_Id char(3), /* of component writing + message */ + 2 * char(1), + 2 Uex_MFX_Message_no fixed bin(31), + 2 Uex_MFX_Severity fixed bin(15), + 2 Uex_MFX_New_Severity fixed bin(15), /* set by exit proc */ + 2 Uex_MFX_Inserts fixed bin(15), + 2 Uex_MFX_Inserts_Data( 6 refer(Uex_MFX_Inserts) ), + 3 Uex_MFX_Ins_Type fixed bin(7), + 3 Uex_MFX_Ins_Type_Data union unaligned, + 4 * char(8), + 4 Uex_MFX_Ins_Bin8 fixed bin(63), + 4 Uex_MFX_Ins_Bin fixed bin(31), + 4 Uex_MFX_Ins_Str, + 5 Uex_MFX_Ins_Str_Len fixed bin(15), + 5 Uex_MFX_Ins_Str_Addr pointer(32), + 4 Uex_MFX_Ins_Series, + 5 Uex_MFX_Ins_Series_Sep char(1), + 5 Uex_MFX_Ins_Series_Addr pointer(32); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-169.pli', async () => { + // Context: + // + // Table 94. PL/I equivalent for a C file + // What is needed is a pointer (or token) for a file, so this translation can be finessed as follows: + // Table 93. Start of the C declaration for its FILE type + // A C file declaration depends on the platform, but it often starts as follows: + // File type equivalence + // Table 92. Sample enum type equivalence + // . + // stdio.h + // from the C header file + // __device_t + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.400 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + define struct 1 file; + define alias file_Handle handle file; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-48.pli', async () => { + // Context: + // + // positions. + // This declaration gives the standard page size, line size, and tabulating + // Table 32. Declaration of PLITABS. + // NONASGN attribute can also be specified when compiling with NORENT. + // recommended that PLITABS should always be declared with the NONASGN attribute, because the + // If compiling with the RENT option, PLITABS must be declared with the NONASGN attribute. It is + // tabs set by the structure, and the Enterprise PL/I library code will not work correctly if this is not true. + // structure must are all valid. This field is supposed to hold the offset to the field specifying the number of + // If your code contains a declare for PLITABS, ensure that the values and the first field in the PLITABS + // information about overriding the tab table, see “Overriding the tab control table” on page 241. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.223 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + DCL 1 PLITABS STATIC EXTERNAL NONASGN, + ( 2 OFFSET INIT (14), + 2 PAGESIZE INIT (60), + 2 LINESIZE INIT (120), + 2 PAGELENGTH INIT (64), + 2 FILL1 INIT (0), + 2 FILL2 INIT (0), + 2 FILL3 INIT (0), + 2 NUMBER_OF_TABS INIT (5), + 2 TAB1 INIT (25), + 2 TAB2 INIT (49), + 2 TAB3 INIT (73), + 2 TAB4 INIT (97), + 2 TAB5 INIT (121)) FIXED BIN (15,0); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-187.pli', async () => { + // Context: + // + // Table 113. Incorrect declaration of qsort + // be declared simply as follows: + // function must not + // qsort + // But because C function pointers are not the same as PL/I ENTRY variables, the C + // Table 112. Sample code to use C qsort function + // following code fragment: + // function could be used with this compare routine to sort an array of integers, as in the + // qsort + // And the C + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.405 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl qsort ext('qsort') + entry( pointer, + fixed bin(31), + fixed bin(31), + entry returns( byvalue fixed bin(31) ) + ) + options( byvalue nodescriptor ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-2.pli', async () => { + // Context: + // + // Consider the following example: + // unprototyped function to a 2-byte FIXED BIN temporary and pass that temporary instead. + // But under NOBIN1ARG, the compiler assigns any 1-byte REAL FIXED BIN argument passed to an + // 25 + // Chapter 1. Using compiler options and facilities   + // Under BIN1ARG, the compiler passes a FIXED BIN argument as is to an unprototyped function. + // unprototyped function. + // This suboption controls how the compiler handles 1-byte REAL FIXED BIN arguments passed to an + // BIN1ARG | NOBIN1ARG + // attribute from a parent. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.81 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl f1 ext entry; + dcl f2 ext entry( fixed bin(15) ); + call f1( 1b ); + call f2( 1b ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-267.pli', async () => { + // Context: + // + // must execute the statement: + // The rules for the restart are the same as for a restart after a system failure. To request the restart, you + // You can request a restart at any point in your program. + // Automatic restart within a program + // automatic step restart without checkpoint processing if another system failure occurs. + // by specifying RD=RNC in the EXEC or JOB statement. By specifying RD=RNC, you are requesting an + // After a system failure occurs, you can still force automatic restart from the beginning of the job step + // of the job step, can still occur if you have specified RD=R in the EXEC or JOB statement. + // If a system failure occurs before any checkpoint has been taken, an automatic restart, from the beginning + // checkpoint if you have specified RD=R (or omitted the RD parameter) in the EXEC or JOB statement. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.512 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + CALL PLIREST; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-283.pli', async () => { + // Context: + // + // The declare for a CMPAT(V3) array descriptor is as follows: + // 469 + // Chapter 26. PL/I descriptors   + // The declare for a CMPAT(V2) array descriptor is as follows: + // The declare for a CMPAT(V1) array descriptor is as follows: + // that the actual upper bound will always match the number of dimensions in the array it describes. + // In the following declares, the upper bound for the arrays is declared as 15, but it should be understood + // Array descriptors + // The possible values for the codepage encoding are defined as follows: + // The declare for a string descriptor under CMPAT(V3) is as follows: + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.525 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare + 1 dso_v3 based, + 2 dso_v3_rvo fixed bin(63), /* relative virtual origin */ + 2 dso_v3_data(1:15), + 3 dso_v3_stride fixed bin(63), /* multiplier */ + 3 dso_v3_hbound fixed bin(63), /* hbound */ + 3 dso_v3_lbound fixed bin(63); /* lbound */ + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-137.pli', async () => { + // Context: + // + // string: + // is an input-only CHAR VARYINGZ + // getenv + // In the following declaration, for instance, the first parameter to + // (input-only parameters that can be passed in registers are best declared as BYVALUE). + // This practice is particularly useful for strings and other parameters that cannot be passed in registers + // pass the address of that static area. + // later called with a constant for that parameter, the compiler can put that constant in static storage and + // as NONASSIGNABLE (rather than letting it get the default attribute of ASSIGNABLE). If that procedure is + // If a procedure has a BYADDR parameter that it uses as input only, it is best to declare that parameter + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.369 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl getenv entry( char(*) varyingz nonasgn byaddr, + pointer byaddr ) + returns( native fixed bin(31) optional ) + options( nodescriptor ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-102.pli', async () => { + // Context: + // + // preceded by a PUT statement as follows: + // system prompt by ending your own prompt with a colon. For example, the GET statement could be + // If you include output statements that prompt you for input in your program, you can inhibit the initial + // your program until you enter two or more lines. + // By adding a hyphen to the end of any line that is to continue, you can delay transmission of the data to + // GET statement, a further prompt, which is a plus sign followed by a colon (+:), is displayed. + // enter the required data. If you enter a line that does not contain enough data to complete execution of the + // is executed in the program. The GET statement causes the system to go to the next line. You can then + // You are prompted for input to stream files by a colon (:). You will see the colon each time a GET statement + // to the terminal. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.298 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + PUT SKIP LIST('ENTER NEXT ITEM:'); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-8.pli', async () => { + // Context: + // + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Programming Guide + // 74 + // But this code would still be valid under NOLAXCTL: + // The following code is illegal under NOLAXCTL: + // with a varying extent, that extent must be specified as an asterisk or as a non-constant expression. + // allocated with a differing extent. NOLAXCTL requires that if a CONTROLLED variable is to be allocated + // Specifying LAXCTL allows a CONTROLLED variable to be declared with a constant extent and yet to be + // LAXCTL | NOLAXCTL + // The default is RULES(LAXCONV). When you specify RULES(NOLAXCONV), the default is ALL. + // Under SOURCE, only those violations that occur in the primary source file are flagged. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.130 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl b bit(n) ctl; + dcl n fixed bin(31) init(8); + alloc b; + alloc b bit(16); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-289.pli', async () => { + // Context: + // + // Table 144. Record types encoded as an ordinal value + // 473 + // Copyright IBM Corp. 1999, 2022 + // Possible record types are encoded as an ordinal value as shown in Table 144 on page 474. + // • Whether the record is continued onto the next record + // • Record type + // The header also has some fields that vary from record to record: + // the number 4. + // A number representing the level of SYSADATA that this file format represents. For this product, it is + // SYSADATA level + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.529 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + Define ordinal xin_Rect + (Xin_Rect_Msg value(50), /* Message record */ + Xin_Rect_Fil value(57), /* File record */ + Xin_Rect_Opt value(60), /* Options record */ + Xin_Rect_Sum value(61), /* Summary record */ + Xin_Rect_Rep value(62), /* Replace record */ + Xin_Rect_Src value(63), /* Source record */ + Xin_Rect_Tok value(64), /* Token record */ + Xin_Rect_Sym value(66), /* Symbol record */ + Xin_Rect_Lit value(67), /* Literal record */ + Xin_Rect_Syn value(69), /* Syntax record */ + Xin_Rect_Ord_Type value(80), /* Ordinal type record */ + Xin_Rect_Ord_Elem value(81), /* Ordinal element record */ + Xin_Rect_Ctr value(82) ) /* Counter record */ + prec(15); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-55.pli', async () => { + // Context: + // + // Here is the sample of the PL/I fetched MAIN program: + // Examples + // with DEFAULT(LINKAGE(SYSTEM)). + // OPTIONS(LINKAGE(SYSTEM)) in its ENTRY declaration for the fetched MAIN routine, or be compiled + // • If no parameters are passed to the fetched MAIN program, the fetching program should either specify + // passed char varying string is not parsed for the runtime options. + // messages regarding invalid runtime options. If NOEXECOPS is specified in the fetched MAIN routine, the + // • Avoid passing runtime options because attempts to parse them might produce LE informational + // fetched MAIN routine in the fetching program. + // • You must not specify OPTIONS(ASM) or OPTIONS(NODESCRIPTOR) in the ENTRY declaration for the + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.231 */ + + + FMAIN: proc(parm) options(main,noexecops ); + DCL parm char(*) var; + DCL SYSPRINT print; + DCL PLIXOPT CHAR(11) VAR INIT('RPTOPTS(ON)') + STATIC EXTERNAL; + Put skip list("FMAIN parm: "|| parm); + Put skip list("FMAIN finished "); + End FMAIN; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-285.pli', async () => { + // Context: + // + // These are possible values for the dsc_Type field: + // The declare for a descriptor header is as follows: + // type. + // structure, or union). The remaining three bytes are zero unless they are set by the particular descriptor + // Every LE descriptor starts with a 4-byte field. The first byte specifies the descriptor type (scalar, array, + // CMPAT(LE) descriptors + // The declare for a CMPAT(V3) array descriptor is as follows: + // 469 + // Chapter 26. PL/I descriptors   + // The declare for a CMPAT(V2) array descriptor is as follows: + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.525 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare + dsc_Type_Unset fixed bin(8) value(0), + dsc_Type_Element fixed bin(8) value(2), + dsc_Type_Array fixed bin(8) value(3), + dsc_Type_Structure fixed bin(8) value(4), + dsc_Type_Union fixed bin(8) value(4); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-284.pli', async () => { + // Context: + // + // The declare for a descriptor header is as follows: + // type. + // structure, or union). The remaining three bytes are zero unless they are set by the particular descriptor + // Every LE descriptor starts with a 4-byte field. The first byte specifies the descriptor type (scalar, array, + // CMPAT(LE) descriptors + // The declare for a CMPAT(V3) array descriptor is as follows: + // 469 + // Chapter 26. PL/I descriptors   + // The declare for a CMPAT(V2) array descriptor is as follows: + // The declare for a CMPAT(V1) array descriptor is as follows: + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.525 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare + 1 dsc_Header based( sysnull() ), + 2 dsc_Type fixed bin(8) unsigned, + 2 dsc_Datatype fixed bin(8) unsigned, + 2 * fixed bin(8) unsigned, + 2 * fixed bin(8) unsigned; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-131.pli', async () => { + // Context: + // + // For instance, under RULES(LAXCTL), you can declare a structure as follows: + // that you use the RULES(NOLAXCTL) option to disallow such practice. + // with different extents. However, this coding practice severely impacts performance. It is recommended + // Under RULES(LAXCTL), a CONTROLLED variable can be declared with constant extents and yet allocated + // (NO)LAXCTL + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Programming Guide + // 308 + // Improving performance + // Specifying RULES(NOGLOBALDO) will cause the compile to flag any code where this is not true. + // It is best that JX be declared in the same PROCEDURE that contains this loop. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.364 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl + 1 a controlled, + 2 b char(17), + 2 c char(29); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-11.pli', async () => { + // Context: + // + // members that are not level 1 and are not dot qualified. Consider the following example: + // Specifying RULES(NOLAXQUAL(LOOSE)) causes the compiler to flag any reference to structure + // LOOSE + // excluded from the NOLAXQUAL checking. + // not level 1. References which names start with 'CEE', 'DFH', 'DSN', 'EYU', 'IBM', 'PLI', and 'SQL' are + // Specifying NOLAXQUAL causes the compiler to flag any reference to structure members that are + // LAXQUAL | NOLAXQUAL + // The default is RULES(LAXPUNC). + // flagged with an E-level message; otherwise, it will be flagged with a W-level message. + // parenthesis is meant before the semicolon. Under RULES(NOLAXPUNC), this statement will be + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.133 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl + 1 a, + 2 b, + 3 b fixed bin, + 3 c fixed bin; + c = 11; /* would be flagged */ + b.c = 13; /* would not be flagged */ + a.c = 17; /* would not be flagged */ + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-276.pli', async () => { + // Context: + // + // is declared as follows: + // sample + // For example, suppose that the routine + // address of the string and then the string descriptor itself. + // is still such a pair of pointers. But under the other CMPAT options, the locator/descriptor consists of the + // the second pointer is the address of the descriptor. For strings, under CMPAT(LE), the locator/descriptor + // Except for strings, the locator/descriptor is a pair of pointers. The first pointer is the address of the data; + // descriptor, the address of a locator/descriptor for the argument is passed instead. + // When arguments and their descriptors are passed by locator/descriptor, whenever an argument requires a + // Argument passing by locator/descriptor + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.523 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare sample entry( fixed bin(31), varying char(*) ) + options( byaddr descriptor ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-249.pli', async () => { + // Context: + // + // OSRIN is an zFS file, use the following JCL statement instead: + // ddname + // If the associated + // To run a program by using an OSR in a PDS, you can specify the following DD statement in the JCL: + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Programming Guide + // 430 + // file into the buffer: + // If the inbound schema file were in an zFS file instead, you could use the following code to read the OSR + // you can increase the initial size of the OSR buffer accordingly. + // following example is in a PDS. The initial size of the OSR buffer is set to 4096. If you have a larger OSR file, + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.486 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + //OSRIN DD DSN=HLQ.XML.OSR(STOCK),DISP=SHR + //OSRIN DD PATH=“/u/HLQ/xml/stock.osr” + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-94.pli', async () => { + // Context: + // + // Table 43. Creating a library member in a PL/I program + // page 228. It copies all the records of the original member except those that contain only blanks. + // The program shown in Table 44 on page 229 updates the member created by the program in Table 43 on + // both can be associated with the same DD statement. + // originally occupied by the member cannot be used again. You must use two files in your PL/I program, but + // the entire member in another part of the library. This is rarely an economic proposition because the space + // To use a PL/I program to add or delete one or more records within a member of a library, you must rewrite + // Example: Updating a library member + // Table 42. Placing a load module in an existing library + // load module in the existing library HPU8.CCLM. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.283 */ + + + //OPT10#3 JOB + //TREX EXEC IBMZCBG + //PLI.SYSIN DD * + NMEM: PROC OPTIONS(MAIN); + DCL IN FILE RECORD SEQUENTIAL INPUT, + OUT FILE RECORD SEQUENTIAL OUTPUT, + P POINTER, + IOFIELD CHAR(80) BASED(P), + EOF BIT(1) INIT('0'B); + OPEN FILE(IN),FILE (OUT); + ON ENDFILE(IN) EOF='1'B; + READ FILE(IN) SET(P); + DO WHILE (¬EOF); + PUT FILE(SYSPRINT) SKIP EDIT (IOFIELD) (A); + WRITE FILE(OUT) FROM(IOFIELD); + READ FILE(IN) SET(P); + END; + CLOSE FILE(IN),FILE(OUT); + END NMEM; + /* + //GO.OUT DD UNIT=SYSDA,DSNAME=HPU8.ALIB(NMEM), + // DISP=(NEW,CATLG),SPACE=(TRK,(1,1,1)), + // DCB=(RECFM=FB,BLKSIZE=3600,LRECL=80) + //GO.IN DD */ +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-309.pli', async () => { + // Context: + // + // Table 162. Declare for the expression kind + // • A prefix op, such as a minus for a negation, will have a child node that describes its operand. + // (and the sibling node of that operand will describe the righthand operator). + // • An infix op, such as a minus for a subtraction, will have a child node that describes its lefthand operand + // expression. Some of these records will have nonzero child nodes; for example: + // The ordinal xin_Exp_Kind identifies the type of an expression for a syntax record that describes an + // • A lexeme record (for the semicolon) + // • A keyword record (for the END keyword) + // The records for the END statement consists of 2 records: + // • A lexeme record (for the semicolon) + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.542 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + Define + ordinal + xin_Exp_Kind + ( xin_Exp_Kind_Unset + ,xin_Exp_Kind_Bit_String + ,xin_Exp_Kind_Char_String + ,xin_Exp_Kind_Graphic_String + ,xin_Exp_Kind_Number + ,xin_Exp_Kind_Infix_Op + ,xin_Exp_Kind_Prefix_Op + ,xin_Exp_Kind_Builtin_Rfrnc + ,xin_Exp_Kind_Entry_Rfrnc + ,xin_Exp_Kind_Qualified_Rfrnc + ,xin_Exp_Kind_Unsub_Rfrnc + ,xin_Exp_Kind_Subscripted_Rfrnc + ,xin_Exp_Kind_Type_Func + ,xin_Exp_Kind_Widechar_String + ) prec(8) unsigned; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-303.pli', async () => { + // Context: + // + // Table 157. Declare for the token record kind + // The ordinal xin_Tok_Kind identifies the type of the token record. + // Table 156. Declare for a token record + // on which it started and ended. + // recognized by the PL/I compiler. The record also identifies the type of the token plus the column and line + // Each token record assigns a number, called a token index, that is used by later records to refer to a token + // Token records + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Programming Guide + // 482 + // Table 155. Declare for a source record + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.538 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + Define + ordinal + xin_Tok_Kind + ( xin_Tok_Kind_Unset + ,xin_Tok_Kind_Lexeme + ,xin_Tok_Kind_Comment + ,xin_Tok_Kind_Literal + ,xin_Tok_Kind_Identifier + ,xin_Tok_Kind_Keyword + ) prec(8) unsigned; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-298.pli', async () => { + // Context: + // + // Consider the following structure: + // • The first child, if any + // • The parent, if any + // • The first sibling, if any + // following: + // If the identifier is part of a structure or union, the symbol record contains a symbol index for each of the + // file and line in which the symbol was declared. + // is indicated by a literal index. Each symbol record contains the file index and source line number for the + // For example, the index can be used as the name of a user variable or constant. The name of the identifier + // refer to the symbol described by this record. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.534 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl + 1 a + , 3 b fixed bin + , 3 c fixed bin + , 3 d + , 5 e fixed bin + , 5 f fixed bin + ; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-299.pli', async () => { + // Context: + // + // Table 154. Data type of a variable + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Programming Guide + // 480 + // The variable's data type is specified by the ordinal shown in Table 154 on page 481. + // specified. + // the symbol index of that variable is specified here. If its position attribute is constant, it is also + // If the variable is declared as defined on another mapped variable that is not an element of an array, + // Defined variables + // symbol index of that variable is specified. + // If the variable is declared as based on another mapped variable that is not an element of an array, the + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.536 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + define + ordinal + xin_Data_Kind + ( xin_Data_Kind_Unset + ,xin_Data_Kind_Character + ,xin_Data_Kind_Bit + ,xin_Data_Kind_Graphic + ,xin_Data_Kind_Fixed + ,xin_Data_Kind_Float + ,xin_Data_Kind_Picture + ,xin_Data_Kind_Pointer + ,xin_Data_Kind_Offset + ,xin_Data_Kind_Entry + ,xin_Data_Kind_File + ,xin_Data_Kind_Label + ,xin_Data_Kind_Format + ,xin_Data_Kind_Area + ,xin_Data_Kind_Task + ,xin_Data_Kind_Event + ,xin_Data_Kind_Condition + ,xin_Data_Kind_Structure + ,xin_Data_Kind_Union + ,xin_Data_Kind_Descriptor + ,xin_Data_Kind_Ordinal + ,xin_Data_Kind_Handle + ,xin_Data_Kind_Type + ,xin_Data_Kind_Builtin + ,xin_Data_Kind_Generic + ,xin_Data_Kind_Widechar + ) prec(8) unsigned; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-101.pli', async () => { + // Context: + // + // Table 49. PL/I structure PLITABS for modifying the preset tab settings + // not be omitted. + // the left margin. The first item in the structure is the offset to the NO_OF_TABS field. The FILL fields must + // TAB1 identifies the position of the second item printed on a line; the first item on a line always starts at + // three tab settings, in positions 30, 60, and 90, and uses the defaults for page size and line size. Note that + // procedure. An example of the PL/I structure is shown in Table 49 on page 242. This example creates + // you must declare to be STATIC EXTERNAL in your MAIN procedure or in a program linked with your MAIN + // To supply this tab table, include a PL/I structure in your source program with the name PLITABS, which + // NONASGN attribute can also be specified when compiling with NORENT. + // recommended that PLITABS should always be declared with the NONASGN attribute, because the + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.297 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + DCL 1 PLITABS STATIC EXT NONASGN, + 2 (OFFSET INIT(14), + PAGESIZE INIT(60), + LINESIZE INIT(120), + PAGELENGTH INIT(0), + FILL1 INIT(0), + FILL2 INIT(0), + FILL3 INIT(0), + NO_OF_TABS INIT(3), + TAB1 INIT(30), + TAB2 INIT(60), + TAB3 INIT(90)) FIXED BIN(15,0); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-21.pli', async () => { + // Context: + // + // declared as follows: + // A + // where it would seem to start. For example, consider the AUTOMATIC structure + // The mapping rules of the PL/I language might require that a structure be offset by up to 8 bytes from + // • An "automatic map" that lists, for each block, all AUTOMATIC variables but sorted by hex offset + // • A "static map" that lists all STATIC variables but sorted by hex offset + // However, specifying the MAP option also causes the compiler to produce the following maps: + // This storage offset listing is sorted by block and by variable name, and it also includes only user variables. + // variable. + // The fourth column in the Storage Offset Listing is unlabeled and tells how to find the location of the + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.163 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl + 1 A, + 2 B char(2), + 2 C fixed bin(31); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-311.pli', async () => { + // Context: + // + // Table 164. Declare for the lexeme kind + // for instance, as the "concatenate" symbol. + // • In these ordinal names, "dbl" means "double", so that dbl_Vrule is a doubled vertical rule that is used, + // • In these ordinal names, "vrule" means "vertical rule", which is used, for instance, as the "or" symbol. + // The ordinal xin_Lex_Kind identifies the type of a lexeme for a syntax record that describes a lexical unit. + // Table 163. Declare for the number kind + // The ordinal xin_Number_Kind identifies the type of a number for a syntax record that describes a number. + // 487 + // Appendix A. SYSADATA message information   + // Table 162. Declare for the expression kind + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.543 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + Define + ordinal + xin_Lex_Kind + ( xin_Lex_Undefined + ,xin_Lex_Period + ,xin_Lex_Colon + ,xin_Lex_Semicolon + ,xin_Lex_Lparen + ,xin_Lex_Rparen + ,xin_Lex_Comma + ,xin_Lex_Equals + ,xin_Lex_Gt + ,xin_Lex_Ge + ,xin_Lex_Lt + ,xin_Lex_Le + ,xin_Lex_Ne + ,xin_Lex_Lctr + ,xin_Lex_Star + ,xin_Lex_Dbl_Colon + ,xin_Lex_Not + ,xin_Lex_Vrule + ,xin_Lex_Dbl_Vrule + ,xin_Lex_And + ,xin_Lex_Dbl_Star + ,xin_Lex_Plus + ,xin_Lex_Minus + ,xin_Lex_Slash + ,xin_Lex_Equals_Gt + ,xin_Lex_Lparen_Colon + ,xin_Lex_Colon_Rparen + ,xin_Lex_Plus_Equals + ,xin_Lex_Minus_Equals + ,xin_Lex_Star_Equals + ,xin_Lex_Slash_Equals + ,xin_Lex_Vrule_Equals + ,xin_Lex_And_Equals + ,xin_Lex_Dbl_Star_Equals + ,xin_Lex_Dbl_Vrule_Equals + ,xin_Lex_Dbl_Slash + ) unsigned prec(16); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-310.pli', async () => { + // Context: + // + // Table 163. Declare for the number kind + // The ordinal xin_Number_Kind identifies the type of a number for a syntax record that describes a number. + // 487 + // Appendix A. SYSADATA message information   + // Table 162. Declare for the expression kind + // • A prefix op, such as a minus for a negation, will have a child node that describes its operand. + // (and the sibling node of that operand will describe the righthand operator). + // • An infix op, such as a minus for a subtraction, will have a child node that describes its lefthand operand + // expression. Some of these records will have nonzero child nodes; for example: + // The ordinal xin_Exp_Kind identifies the type of an expression for a syntax record that describes an + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.543 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + Define + ordinal + xin_Number_Kind + ( xin_Number_Kind_Unset + ,xin_Number_Kind_Real_Fixed_Bin + ,xin_Number_Kind_Real_Fixed_Dec + ,xin_Number_Kind_Real_Float_Bin + ,xin_Number_Kind_Real_Float_Dec + ,xin_Number_Kind_Cplx_Fixed_Bin + ,xin_Number_Kind_Cplx_Fixed_Dec + ,xin_Number_Kind_Cplx_Float_Bin + ,xin_Number_Kind_Cplx_Float_Dec + ) prec(8) unsigned; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-56.pli', async () => { + // Context: + // + // Here is the sample of the PL/I MAIN program that fetches another PL/I MAIN program: + // Here is the sample of the PL/I fetched MAIN program: + // Examples + // with DEFAULT(LINKAGE(SYSTEM)). + // OPTIONS(LINKAGE(SYSTEM)) in its ENTRY declaration for the fetched MAIN routine, or be compiled + // • If no parameters are passed to the fetched MAIN program, the fetching program should either specify + // passed char varying string is not parsed for the runtime options. + // messages regarding invalid runtime options. If NOEXECOPS is specified in the fetched MAIN routine, the + // • Avoid passing runtime options because attempts to parse them might produce LE informational + // fetched MAIN routine in the fetching program. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.231 */ + + + MainFet: Proc Options(main); + Dcl Parm char(1000) var; + Dcl SYSPRINT print; + Dcl Fmain entry(char(*) var) ; + Put skip list("MainFet: start "); + Parm = 'local-parm'; + Put skip list("MainFet parm: "|| Parm); + Fetch Fmain; + Call Fmain(Parm); + Release Fmain; + Put skip list("MainFet:testcase finished "); + End; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-143.pli', async () => { + // Context: + // + // compiler generates more optimal code for the pair in the union. + // , but the + // b2 + // and + // b1 + // perform the same function as + // b4 + // and + // b3 + // In the following example, the pair of variables + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.372 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl b1 bit(32); + dcl b2 bit(16) def b1; + dcl + 1 * union, + 2 b3 bit(32), + 2 b4 bit(16); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-281.pli', async () => { + // Context: + // + // The declare for a CMPAT(V1) array descriptor is as follows: + // that the actual upper bound will always match the number of dimensions in the array it describes. + // In the following declares, the upper bound for the arrays is declared as 15, but it should be understood + // Array descriptors + // The possible values for the codepage encoding are defined as follows: + // The declare for a string descriptor under CMPAT(V3) is as follows: + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Programming Guide + // 468 + // The declare for a string descriptor under CMPAT(V1) and CMPAT(V2) is as follows: + // In a string descriptor for a CHARACTER string, the fourth byte encodes the compiler CODEPAGE option. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.524 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare + 1 dso_v1 based, + 2 dso_v1_rvo fixed bin(31), /* relative virtual origin */ + 2 dso_v1_data(1:15), + 3 dso_v1_stride fixed bin(31), /* multiplier */ + 3 dso_v1_hbound fixed bin(15), /* hbound */ + 3 dso_v1_lbound fixed bin(15); /* lbound */ + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-280.pli', async () => { + // Context: + // + // The possible values for the codepage encoding are defined as follows: + // The declare for a string descriptor under CMPAT(V3) is as follows: + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Programming Guide + // 468 + // The declare for a string descriptor under CMPAT(V1) and CMPAT(V2) is as follows: + // In a string descriptor for a CHARACTER string, the fourth byte encodes the compiler CODEPAGE option. + // In a string descriptor for a nonvarying bit string, the fourth byte gives the bit offset. + // bigendian format). + // is held in littleendian or bigendian format or if the data in a WIDECHAR string is held in littleendian or + // The third byte contains various flags (to indicate, for example, if the string length in a VARYING string + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.524 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + define ordinal + ccs_Codepage_Enum + ( ccs_Codepage_01047 value(1) + ,ccs_Codepage_01140 + ,ccs_Codepage_01141 + ,ccs_Codepage_01142 + ,ccs_Codepage_01143 + ,ccs_Codepage_01144 + ,ccs_Codepage_01145 + ,ccs_Codepage_01146 + ,ccs_Codepage_01147 + ,ccs_Codepage_01148 + ,ccs_Codepage_01149 + ,ccs_Codepage_00819 + ,ccs_Codepage_00813 + ,ccs_Codepage_00920 + ,ccs_Codepage_00037 + ,ccs_Codepage_00273 + ,ccs_Codepage_00277 + ,ccs_Codepage_00278 + ,ccs_Codepage_00280 + ,ccs_Codepage_00284 + ,ccs_Codepage_00285 + ,ccs_Codepage_00297 + ,ccs_Codepage_00500 + ,ccs_Codepage_00871 + ,ccs_Codepage_01026 + ,ccs_Codepage_01155 + ) unsigned prec(8); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-135.pli', async () => { + // Context: + // + // For example, under the DEFAULT( NOOVERLAP ) option, the assignment in this example is invalid: + // However, if you use this option, you must ensure that the source and target in assignment do not overlap. + // do not overlap, and it can therefore generate smaller and faster code. + // The DEFAULT(NOOVERALP) option lets the compiler assume that the source and target in an assignment + // NOOVERLAP + // Consequently, if your program logic allows, use DEFAULT(REORDER) to generate superior code. + // their latest values. This effectively prohibits almost all optimization on such variables. + // variables in that block referenced in ON-units (or blocks dynamically descendant from ON-units) have + // The DEFAULT(ORDER) option indicates that the ORDER option is applied to every block, meaning that + // (RE)ORDER + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.367 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl c char(20); + substr(c,2,5) = substr(c,1,5); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-307.pli', async () => { + // Context: + // + // Table 160. Declare for the syntax record kind + // 485 + // Appendix A. SYSADATA message information   + // The ordinal xin_Syn_Kind identifies the type of the syntax record. + // Table 159. Declare for a syntax record (continued) + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Programming Guide + // 484 + // Table 159. Declare for a syntax record + // Table 158. Node indices assigned to the blocks in a program + // The node indices are assigned to the blocks of the preceding program as follows: + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.541 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + Define + ordinal + xin_Syn_Kind + ( xin_Syn_Kind_Unset + ,xin_Syn_Kind_Lexeme + ,xin_Syn_Kind_Asterisk + ,xin_Syn_Kind_Int + ,xin_Syn_Kind_Name + ,xin_Syn_Kind_Expression + ,xin_Syn_Kind_Parenthesized_Expr + ,xin_Syn_Kind_Argument_List + ,xin_Syn_Kind_Keyword + ,xin_Syn_Kind_Proc_Stmt + ,xin_Syn_Kind_Begin_Stmt + ,xin_Syn_Kind_Stmt + ,xin_Syn_Kind_Substmt + ,xin_Syn_Kind_Label + ,xin_Syn_Kind_Invoke_Begin + ,xin_Syn_Kind_Assignment + ,xin_Syn_Kind_Assignment_Byname + ,xin_Syn_Kind_Do_Fragment + ,xin_Syn_Kind_Keyed_List + ,xin_Syn_Kind_Iteration_Factor + ,xin_Syn_Kind_If_Clause + ,xin_Syn_Kind_Else_Clause + ,xin_Syn_Kind_Do_Stmt + ,xin_Syn_Kind_Select_Stmt + ,xin_Syn_Kind_When_Stmt + ,xin_Syn_Kind_Otherwise_Stmt + ,xin_Syn_Kind_Procedure + ,xin_Syn_Kind_Package + ,xin_Syn_Kind_Begin_Block + ,xin_Syn_Kind_Picture + ,xin_Syn_Kind_Raw_Rfrnc + ,xin_Syn_Kind_Generic_Desc + ) prec(8) unsigned; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-128.pli', async () => { + // Context: + // + // . + // field12 + // and + // field11 + // For instance, in the following structure, there is one byte of padding between + // 307 + // Copyright IBM Corp. 1999, 2022 + // Improving performance + // However, padding bytes might be zeroed out. + // structure, and that will usually mean your compilation will be quicker and your code will run much faster. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.363 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl + 1 sample ext, + 5 field10 bin fixed(31), + 5 field11 dec fixed(13), + 5 field12 bin fixed(31), + 5 field13 bin fixed(31), + 5 field14 bit(32), + 5 field15 bin fixed(31), + 5 field16 bit(32), + 5 field17 bin fixed(31); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-273.pli', async () => { + // Context: + // + // Code the termination procedure-specific control block as follows: + // message filter procedures and the initialization procedures. + // might also want to write out final statistical reports based on information collected during the error + // You should use the termination procedure to perform any cleanup required, such as closing files. You + // Writing the termination procedure + // Abort compilation + // 16/n + // Reserved for future use + // 8/n + // Reserved for future use + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.520 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + Dcl 1 Uex_ISA native based, + 2 Uex_ISA_Length_fixed bin(31); /* storage(Uex_ISA) */ + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-272.pli', async () => { + // Context: + // + // 463 + // Chapter 25. Using user exits   + // Uex_MFX_Ins_Series_Addr points to this structure: + // The following example shows a procedure-specific message filter control block: + // information back to the compiler indicating how a particular message should be handled. + // The procedure-specific control block contains information about the messages. It is used to pass + // (severity code 4) messages. + // WARNING + // (severity code 8) or + // ERROR + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.519 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl + 1 series based, + 2 series_count fixed bin(31), + 2 series_string( 1 refer(series_Count ) ) pointer(32); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-74.pli', async () => { + // Context: + // + // how a DD statement should be associated with the value of a file variable: + // be the same as the value of the file reference. The following example illustrates + // must + // DD statement name + // If the file reference in the statement that explicitly or implicitly opens the file is not a file constant, the + // //DETAIL DD ... + // 3. + // //OLDSAMPL DD ... + // 2. + // //SAMPLE DD ... + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.250 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + DCL PRICES FILE VARIABLE, + RPRICE FILE; + PRICES = RPRICE; + OPEN FILE(PRICES); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-91.pli', async () => { + // Context: + // + // For example, you can use redirection in the following program: + // You can redirect standard input, standard output, and standard error devices to a file. + // Redirecting standard input, output, and error devices under z/OS UNIX + // home directory. + // in the user's + // .profile + // . To set them for a specific user only, add them to the file + // /etc/profile + // the file + // 223 + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.279 */ + + + Hello2: proc options(main); + put list('Hello!'); + end; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-300.pli', async () => { + // Context: + // + // The type of the extent is encoded by the values: + // The type and value of the extent is specified in addition to the symbol index of the returns description. + // String and area variables + // The symbol index of the underlying type is specified. + // Typed variables and handles + // The ordinal type index is specified. + // Ordinal variables + // If the variable has the returns attribute, the symbol index of the returns description is specified. + // Entry variables + // The literal index of the picture specification is specified. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.536 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare + ( xin_Extent_Constant value(01) + ,xin_Extent_Star value(02) + ,xin_Extent_Nonconstant value(04) + ,xin_Extent_Refer value(08) + ,xin_Extent_In_Error value(16) + ) + fixed bin; + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-274.pli', async () => { + // Context: + // + // is declared as follows: + // sample + // For example, suppose the routine + // the descriptor list is set to the address of that argument's descriptor. + // descriptor list is set to SYSNULL. For arguments that do require a descriptor, the corresponding pointer in + // of arguments passed. For arguments that do not require a descriptor, the corresponding pointer in the + // This extra argument is a pointer to a list of pointers. The number of entries in this list equals the number + // whenever at least one argument needs a descriptor. + // When arguments and their descriptors are passed with a descriptor list, an extra argument is passed + // Argument passing by descriptor list + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.522 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare sample entry( fixed bin(31), varying char(*) ) + options( byaddr descriptor ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-188.pli', async () => { + // Context: + // + // Table 114. Correct declaration of qsort + // function could be declared as follows: + // qsort + // However, a C function pointer is equivalent to the PL/I type LIMITED ENTRY. Therefore, the C + // only, and so a PL/I ENTRY variable and a C function pointer do not even use the amount of storage. + // as well as an entry point address). But a C function pointer is limited in pointing to a non-nested function + // Recall that a PL/I ENTRY variable might point to a nested function (and thus requires a backchain address + // Table 113. Incorrect declaration of qsort + // be declared simply as follows: + // function must not + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.405 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl qsort ext('qsort') + entry( pointer, + fixed bin(31), + fixed bin(31), + limited entry + returns( byvalue fixed bin(31) ) + ) + options( byvalue nodescriptor ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-220.pli', async () => { + // Context: + // + // as follows: + // For example, to pass a pointer to a singly-linked list of integers, the structure for that list must be declared + // storage. + // • It is recommended to use the RELEASE function to release the fetched routine and its associated + // POINTERs and HANDLEs must have the attributes POINTER(32) and HANDLE(32). + // • If a parameter is a POINTER, HANDLE, or an aggregate containing POINTERs or HANDLEs, then those + // (not array or structure expressions). + // • All array and structure arguments passed to an ENTRY with OPTIONS(AMODE31) must be references + // • Any GOTO statement in one AMODE must not cross over any routines in the opposite AMODE. + // • Any exception that occurs in one AMODE must be handled in that AMODE. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.433 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl + 1 list_element based, + 2 list_next pointer(32), + 2 list_int fixed bin(31); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-171.pli', async () => { + // Context: + // + // Table 96. Declarations for filedump program + // are obvious: + // filedump + // Most of the declarations in the INCLUDE file + // Table 95. Sample code to use fopen and fread to dump a file + // 345 + // Chapter 17. ILC with C   + // The code for this program is straightforward: + // . + // fread + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.401 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + define struct 1 file; + define alias file_Handle handle file; + define alias size_t unsigned fixed bin(32); + define alias int signed fixed bin(31); + dcl file type(file_Handle); + dcl read_In fixed bin(31); + dcl buffer char(16); + dcl unprintable char(32) value( substr(collate(),1,32) ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-287.pli', async () => { + // Context: + // + // These are the possible values for the dsc_String_Type field: + //   Enterprise PL/I for z/OS: Enterprise PL/I for z/OS Programming Guide + // 470 + // The declare for a string descriptor is as follows: + // EBCDIC. + // In a string descriptor for a character string, the fourth byte also has a bit indicating if the string data is in + // nonnative format. + // In a string descriptor for a varying string, the fourth byte has a bit indicating if the string length is held in + // CODEPAGE option. + // In a string descriptor for a CHARACTER string, the third byte of the header encodes the compiler + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.526 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + declare + dsc_datatype_unset fixed bin(7) value(0), + dsc_datatype_char_nonvarying fixed bin(7) value(2), + dsc_datatype_char_varyingz fixed bin(7) value(3), + dsc_datatype_char_varying2 fixed bin(7) value(4), + dsc_datatype_char_varying4 fixed bin(7) value(5), + dsc_datatype_bit_nonvarying fixed bin(7) value(6), + dsc_datatype_bit_varying2 fixed bin(7) value(7), + dsc_datatype_bit_varying4 fixed bin(7) value(8), + dsc_datatype_graphic_nonvarying fixed bin(7) value(9), + dsc_datatype_graphic_varyingz fixed bin(7) value(10), + dsc_datatype_graphic_varying2 fixed bin(7) value(11), + dsc_datatype_graphic_varying4 fixed bin(7) value(12), + dsc_datatype_widechar_nonvarying fixed bin(7) value(13), + dsc_datatype_widechar_varyingz fixed bin(7) value(14), + dsc_datatype_widechar_varying2 fixed bin(7) value(15), + dsc_datatype_widechar_varying4 fixed bin(7) value(16), + dsc_datatype_uchar_nonvarying fixed bin(7) value(17), + dsc_datatype_uchar_varyingz fixed bin(7) value(18), + dsc_datatype_uchar_varying2 fixed bin(7) value(19), + dsc_datatype_uchar_varying4 fixed bin(7) value(20); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-215.pli', async () => { + // Context: + // + // PLIXOPT variable as follows: + // runtime option. You can declare the + // XPLINK=ON + // but you must use the PLIXOPT variable to specify the + // are linked with XPLINK and the PL/I modules are not. PL/I can still link to and call XPLINK libraries + // Because this PL/I sample program calls Java, the program must link to the Java library. The Java libraries + // This section applies to 31-bit only. + // Note: + // Linking the PL/I program with the Java library + // include files are provided in the PL/I SIBMZSAM data set. + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.424 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + Dcl PLIXOPT Char(40) Varying Ext Static Init( 'XPLINK(ON)'e ); + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); + +test('Block block-12.pli', async () => { + // Context: + // + // members that do not include the level-1 name. Consider the following example: + // Specifying RULES(NOLAXQUAL(STRICT)) causes the compiler to flag any reference to structure + // STRICT + // members that are not level 1 and are not dot qualified. Consider the following example: + // Specifying RULES(NOLAXQUAL(LOOSE)) causes the compiler to flag any reference to structure + // LOOSE + // excluded from the NOLAXQUAL checking. + // not level 1. References which names start with 'CEE', 'DFH', 'DSN', 'EYU', 'IBM', 'PLI', and 'SQL' are + // Specifying NOLAXQUAL causes the compiler to flag any reference to structure members that are + // LAXQUAL | NOLAXQUAL + // + + const doc: LangiumDocument = await parseStmts(` /* Enterprise PL/I for z/OS Programming Guide v6.1, pg.133 */ + + MAINTP: PROCEDURE OPTIONS (MAIN); + + dcl + 1 a, + 2 b, + 3 b fixed bin, + 3 c fixed bin; + c = 11; /* would be flagged */ + b.c = 13; /* would be flagged */ + a.c = 17; /* would not be flagged */ + END MAINTP; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); +}); diff --git a/packages/language/test/linking.test.ts b/packages/language/test/linking.test.ts new file mode 100644 index 0000000..0c0fb07 --- /dev/null +++ b/packages/language/test/linking.test.ts @@ -0,0 +1,71 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import { describe, test } from "vitest"; + +describe('Validating', () => { + + test('empty test', () => { + }); +}); +// import { afterEach, beforeAll, describe, expect, test } from "vitest"; +// import { EmptyFileSystem, type LangiumDocument } from "langium"; +// import { expandToString as s } from "langium/generate"; +// import { clearDocuments, parseHelper } from "langium/test"; +// import type { Model } from "pl-one-language"; +// import { createPl1Services, isModel } from "pl-one-language"; +// +// let services: ReturnType; +// let parse: ReturnType>; +// let document: LangiumDocument | undefined; +// +// beforeAll(async () => { +// services = createPl1Services(EmptyFileSystem); +// parse = parseHelper(services.Pl1); +// +// // activate the following if your linking test requires elements from a built-in library, for example +// // await services.shared.workspace.WorkspaceManager.initializeWorkspace([]); +// }); +// +// afterEach(async () => { +// document && clearDocuments(services.shared, [ document ]); +// }); +// +// describe('Linking tests', () => { +// +// test('linking of greetings', async () => { +// document = await parse(` +// person Langium +// Hello Langium! +// `); +// +// expect( +// // here we first check for validity of the parsed document object by means of the reusable function +// // 'checkDocumentValid()' to sort out (critical) typos first, +// // and then evaluate the cross references we're interested in by checking +// // the referenced AST element as well as for a potential error message; +// checkDocumentValid(document) +// || document.parseResult.value.greetings.map(g => g.person.ref?.name || g.person.error?.message).join('\n') +// ).toBe(s` +// Langium +// `); +// }); +// }); +// +// function checkDocumentValid(document: LangiumDocument): string | undefined { +// return document.parseResult.parserErrors.length && s` +// Parser errors: +// ${document.parseResult.parserErrors.map(e => e.message).join('\n ')} +// ` +// || document.parseResult.value === undefined && `ParseResult is 'undefined'.` +// || !isModel(document.parseResult.value) && `Root AST object is a ${document.parseResult.value.$type}, expected a 'Model'.` +// || undefined; +// } diff --git a/packages/language/test/parsing.test.ts b/packages/language/test/parsing.test.ts new file mode 100644 index 0000000..9e9069d --- /dev/null +++ b/packages/language/test/parsing.test.ts @@ -0,0 +1,615 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import { beforeAll, describe, expect, test } from "vitest"; +import { EmptyFileSystem, type LangiumDocument } from "langium"; +import { parseHelper } from "langium/test"; +import type { PliProgram } from "pl-one-language"; +import { createPliServices } from "pl-one-language"; + +let services: ReturnType; +let parse: ReturnType>; +let parseStmts: ReturnType>; + +beforeAll(async () => { + services = createPliServices(EmptyFileSystem); + parse = parseHelper(services.pli); + + /** + * Helper function to parse a string of PL/I statements, + * wrapping them in a procedure to ensure they are valid + */ + parseStmts = (input: string) => { + return parse(` STARTPR: PROCEDURE OPTIONS (MAIN); +${input} + end STARTPR;`); + } + + // activate the following if your linking test requires elements from a built-in library, for example + await services.shared.workspace.WorkspaceManager.initializeWorkspace([]); +}); + +describe('PL/I Parsing tests', () => { + + // // Handle as validation error + // test.fails('empty program', async () => { + // const doc: LangiumDocument = await parse(``); + // expect(doc.parseResult.lexerErrors).toHaveLength(0); + // expect(doc.parseResult.parserErrors).toHaveLength(0); + // }); + + test('empty program w/ null statement', async () => { + const doc: LangiumDocument = await parseStmts(`;`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + // TODO @montymxb this should pass according to the docs, but doesn't work in practice + // test('empty program w/ null %statement', async () => { + // const doc: LangiumDocument = await parseStmts(`%;`); + // expect(doc.parseResult.lexerErrors).toHaveLength(0); + // expect(doc.parseResult.parserErrors).toHaveLength(0); + // }); + + test('Hello World Program', async () => { + const doc = await parse(` + AVERAGE: PROCEDURE OPTIONS (MAIN); + /* Test characters: ^[] € */ + /* AVERAGE_GRADE = SUM / 5; */ + PUT LIST ('PROGRAM TO COMPUTE AVERAGE'); + END AVERAGE;`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + describe('Procedures', () => { + test('Simple procedure', async () => { + const doc: LangiumDocument = await parse(` + P1: procedure; + end P1;`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('Procedure w/ alternate entry point', async () => { + const doc: LangiumDocument = await parseStmts(` + P1: procedure; + B: entry; // secondary entry point into this procedure + end P1;`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('Procedure with call', async () => { + const doc: LangiumDocument = await parse(` + Control: procedure options(main); + call A('ok'); // invoke the 'A' subroutine + end Control; + A: procedure (VAR1); + declare VAR1 char(3); + put skip list(VAR1); + end A;`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('Simple recursive procedure w/ recursive stated before returns', async () => { + const doc: LangiumDocument = await parseStmts(` + Fact: proc (Input) recursive returns (fixed bin(31)); + dcl Input fixed bin(15); + if Input <= 1 then + return(1); + else + return( Input*Fact(Input-1) ); + end Fact;`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('Simple recursive procedure w/ recursive stated after returns', async () => { + const doc: LangiumDocument = await parseStmts(` + Fact: proc (Input) returns (fixed bin(31)) recursive; + dcl Input fixed bin(15); + if Input <= 1 then + return(1); + else + return( Input*Fact(Input-1) ); + end Fact;`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('Procedures w/ Order & Reorder options', async () => { + const doc: LangiumDocument = await parseStmts(` + P1: proc Options(Order); + end P1; + P2: proc Options( Reorder ); + end P2; + call P1; + call P2;`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('Procedure w/ Reorder option & Returns', async () => { + const doc: LangiumDocument = await parseStmts(` + Double: proc (Input) Options(Reorder) returns(fixed bin(31)); + declare Input fixed bin(15); + return( Input * 2); + end Double; + declare X fixed bin(31); + X = Double(5);`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('Recursive - Returns - Options for a Procedure in various permutations', async () => { + const doc: LangiumDocument = await parseStmts(` + // returns - options - recursive + F1: proc (Input) returns (fixed bin(31)) Options(Order) recursive; + dcl Input fixed bin(15); + if Input <= 1 then + return(1); + else + return( Input*F1(Input-1) ); + end F1; + + // options - returns - recursive + F2: proc (Input) Options(Order) returns (fixed bin(31)) recursive; + dcl Input fixed bin(15); + if Input <= 1 then + return(1); + else + return( Input*F2(Input-1) ); + end F2; + + // options - recursive - returns + F3: proc (Input) Options(Order) recursive returns (fixed bin(31)); + dcl Input fixed bin(15); + if Input <= 1 then + return(1); + else + return( Input*F3(Input-1) ); + end F3; + + // returns - options - recursive + F4: proc (Input) returns (fixed bin(31)) Options(Order) recursive; + dcl Input fixed bin(15); + if Input <= 1 then + return(1); + else + return( Input*F4(Input-1) ); + end F4; + + // returns - recursive - options + F5: proc (Input) returns (fixed bin(31)) recursive Options(Order); + dcl Input fixed bin(15); + if Input <= 1 then + return(1); + else + return( Input*F5(Input-1) ); + end F5; + `); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('Options Separate by Commas & Spaces', async () => { + const doc: LangiumDocument = await parseStmts(` + P1: proc Options( Order, Reorder, Recursive ); + end P1; + P2: proc Options( Order Reorder Recursive); + end P2; + P3: proc Options(Order Reorder, Recursive ); + end P3; + P4: proc Options(Order, Reorder Recursive); + end P4;`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('Complex recursive procedure', async () => { + const doc: LangiumDocument = await parse(` + START: procedure options (main); + dcl I fixed bin(15); + I=1; call A; + A: proc recursive; + declare Ev entry variable static; + if I=1 then + do; I=2; + Ev=B; + call A; end; + else call Ev; + B: proc; + go to Out; + end B; + Out: end A; + end Start; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + }); + + // tests for labels + describe('Label Tests', () => { + + test('empty label, null statement', async () => { + const doc: LangiumDocument = await parseStmts(` main:;`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('Declared label', async () => { + const doc: LangiumDocument = await parseStmts(` declare Label_x label;`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('Label assignment', async () => { + const doc: LangiumDocument = await parseStmts(` + declare Label_x label; + Label_a:; + Label_x = Label_a; // label assignments + go to Label_x; // jump to label +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + }); + + // tests fro declarations + describe('Declaration tests', () => { + + test('simple char declarations', async () => { + const doc: LangiumDocument = await parseStmts(` + declare UserA character (15); // 15 character var + declare UserB character (15) varying; // varying + declare UserC character (15) varyingz; // varying w/ null termination + declare A char(5) nonvarying init( ('abc' || '00'x) ); // nonvarying w/ init + declare B char(3) varyingz init ( 'abc' ); // not equal to the one before by the way, null term is not used in varyingz for comparisons, even though it's there implicitly + dcl Z char(3) nonvarying init('abc'); +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('char declaration w/ overflow assignment', async () => { + const doc: LangiumDocument = await parseStmts(` + declare Subject char(10); + Subject = 'Transformations'; // will truncate the last 5 chars, emitting a warning (but valid nonetheless) +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('arbitrary length char decl', async () => { + const doc: LangiumDocument = await parseStmts(` + dcl VAL char(*) value('Some text that runs on and on'); +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('nested quotes char decl', async () => { + const doc: LangiumDocument = await parseStmts(` + declare User1 character (30) init('Shakespeare''s "Hamlet"'); + declare User2 character (30) init("Shakespeare's ""Hamlet"""); + declare User3 character (30) init('/* blah */'); +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('Bit declarations', async () => { + const doc: LangiumDocument = await parseStmts(` + declare S bit (64); // 64 bit var + declare Code bit(10); + Code = '110011'B; + Code = '1100110000'B; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('Format constants', async () => { + const doc: LangiumDocument = await parseStmts(` + Prntexe: format + ( column(20),A(15), column(40),A(15), column(60),A(15) ); + Prntstf: format + ( column(20),A(10), column(35),A(10), column(50),A(10) ); +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('Attribute declarations', async () => { + const doc: LangiumDocument = await parseStmts(` + declare Account1 file variable, // file var + Account2 file automatic, // file var too + File1 file, // file constant + File2 file; // file constant +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('Value List declaration', async () => { + const doc: LangiumDocument = await parseStmts(` + dcl cmonth char(3) + valuelist( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ); +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('value list from declaration', async () => { + const doc: LangiumDocument = await parseStmts(` + dcl 1 a, + 2 b fixed bin value(31), + 2 c fixed bin value(28), + 2 d fixed bin value(30); + dcl x fixed bin valuelistfrom a; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + // Handle as validation error +// test.fails('fails with duplicate value in value list', async () => { +// const doc: LangiumDocument = await parseStmts(` +// dcl 1 a, +// 2 b fixed bin value(31), +// 2 d fixed bin value(31); +// dcl x fixed bin valuelistfrom a; +// `); +// expect(doc.parseResult.lexerErrors).toHaveLength(0); +// expect(doc.parseResult.parserErrors).toHaveLength(0); +// }); + + test.fails('value list is too long to handle in compiler correctly', async () => { + const doc: LangiumDocument = await parseStmts(` + dcl 1 a, 2 b fixed bin value(31), 2 c fixed bin value(28), 2 d fixed bin value(31); + dcl x fixed bin valuelistfrom a; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('value range declaration', async () => { + const doc: LangiumDocument = await parseStmts(` + define alias numeric_month fixed bin(7) valuerange(1,12); + dcl imonth type numeric_month; // must hold a val between 1 & 12 inclusive + dcl cmonth char(3) // must be one of the 12 months listed + valuelist( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ); +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('multi-declaration', async () => { + const doc: LangiumDocument = await parseStmts(` + declare Result bit(3), + A fixed decimal(1), + B fixed binary (15), // precison lower than 15 will trigger a compiler warning, less than storage allows + C character(2), D bit(4); + `); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + }); + + test('pseduovariables', async () => { + // assigns into a sub-section of A from a sub-string of B + const doc: LangiumDocument = await parseStmts(` + declare A character(10), + B character(30); + substr(A,6,5) = substr(B,20,5); +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('assignment from multi-declaration', async () => { + const doc: LangiumDocument = await parseStmts(` + declare Result bit(4), + A fixed decimal(1), + B fixed binary (15), + C character(4), D bit(4); + A = 1.0; + B = 2; + C = 'ABCD'; + D = 1; + Result = A + B < C & D; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + describe('Expressions', () => { + + test('Assorted restricted expressions', async () => { + const doc: LangiumDocument = await parseStmts(` + // from pg. 73 + dcl Max_names fixed bin value (1000), + Name_size fixed bin value (30), + Addr_size fixed bin value (20), + Addr_lines fixed bin value (4); + dcl 1 Name_addr(Max_names), + 2 Name char(Name_size), + 2 * union, + 3 Address char(Addr_lines*Addr_size), /* address */ + 3 addr(Addr_lines) char(Addr_size), + 2 * char(0); + dcl One_Name_addr char(size(Name_addr(1))); /* 1 name/addr*/ + dcl Two_Name_addr char(length(One_Name_addr) + *2); /* 2 name/addrs */ + dcl Name_or_addr char(max(Name_size,Addr_size)) based; + dcl Ar(10) pointer; + dcl Ex entry( dim(lbound(Ar):hbound(Ar)) pointer); + dcl Identical_to_Ar( lbound(Ar):hbound(Ar) ) pointer; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('Simple arithmetic expressions', async () => { + const doc: LangiumDocument = await parseStmts(` + dcl A fixed bin(15), B fixed bin(15), C fixed bin(15); + A = 5; + B = 10; + C = A + B; + C = A - B; + C = A * B; + C = A / B; + C = A ** B; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('Function invocation', async () => { + const doc: LangiumDocument = await parseStmts(` + dcl A fixed bin(15), B fixed bin(15), Y fixed bin(15), X fixed bin(15); + A = 5; + B = 10; + // will warn about dummy args being gend for ADD, but it's valid + Y = ADD(A,B); + X = Y**3+ADD(A,B); + ADD: procedure (v1,v2) returns(byvalue); + dcl (v1,v2) bin float(32); + return(v1+v2); + end ADD; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + }); + + test('Basic branching', async () => { + const doc: LangiumDocument = await parseStmts(` + dcl A bit(4), + D bit(5); + A=1; + D=1; + if A=1 then go to Y; + else go to X; + X:; + Y:; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + describe('Packages', () => { + + test('Package with main routine', async () => { + const doc: LangiumDocument = await parse(` + Package_Demo: Package exports (T); + T: PROCEDURE OPTIONS (MAIN); + END T; + end Package_Demo; +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + }); + + test('simple PUT', async () => { + // output a string to the stdout + const doc: LangiumDocument = await parseStmts(` put skip list('Hello ' || 'World');`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('simple GET', async () => { + // read a string into a variable 'var' + const doc: LangiumDocument = await parseStmts(` + dcl VAR fixed bin(15); + get list(var); +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('fetch', async () => { + const doc: LangiumDocument = await parseStmts(` + dcl A entry; + fetch A title('X'); + fetch A; + + declare ProgA entry; + + // fetch & release storage occupied by ProgA + fetch ProgA; + call ProgA; + release ProgA;`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('BEGIN block', async () => { + const doc: LangiumDocument = await parseStmts(` + B: begin; + declare A fixed bin(15); + end B;`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test.skip('Subscripted entry invocation', async () => { + const doc: LangiumDocument = await parseStmts(` + declare (A,B,C,D,E) entry; + declare F(5) entry variable initial (A,B,C,D,E); + declare I fixed bin(15), + X fixed bin(15), + Y fixed bin(15), + Z fixed bin(15); + do I = 1 to 5; + call F(I) (X,Y,Z); // each entry call gets args x,y,z + end;`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('Optional args', async () => { + const doc: LangiumDocument = await parseStmts(` + dcl Vrtn entry ( + fixed bin, + ptr optional, + float, + * optional); + + // valid calls for this entry point + dcl x ptr; + call Vrtn(10, *, 15.5, 'abcd'); + call Vrtn(10, *, 15.5, *); + call Vrtn(10, addr(x), 15.5, *); + call Vrtn(10, *, 15.5); + call Vrtn(10, addr(x), 15.5); +`); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); + + test('Block 27', async () => { + const doc: LangiumDocument = await parseStmts(` + /* Enterprise PL/I for z/OS Language Reference v6.1, pg.59 */ + A = '/* This is a constant, not a comment */' ; + `); + expect(doc.parseResult.lexerErrors).toHaveLength(0); + expect(doc.parseResult.parserErrors).toHaveLength(0); + }); +}); diff --git a/packages/language/test/validating.test.ts b/packages/language/test/validating.test.ts new file mode 100644 index 0000000..a0dd0f8 --- /dev/null +++ b/packages/language/test/validating.test.ts @@ -0,0 +1,82 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import { describe, test } from "vitest"; +// import { beforeAll, describe, expect, test } from "vitest"; +// import { EmptyFileSystem, type LangiumDocument } from "langium"; +// import { expandToString as s } from "langium/generate"; +// import { parseHelper } from "langium/test"; +// import type { Diagnostic } from "vscode-languageserver-types"; +// import type { Model } from "pl-one-language"; +// import { createPl1Services, isModel } from "pl-one-language"; +// +// let services: ReturnType; +// let parse: ReturnType>; +// let document: LangiumDocument | undefined; +// +// beforeAll(async () => { +// services = createPl1Services(EmptyFileSystem); +// const doParse = parseHelper(services.Pl1); +// parse = (input: string) => doParse(input, { validation: true }); +// +// // activate the following if your linking test requires elements from a built-in library, for example +// // await services.shared.workspace.WorkspaceManager.initializeWorkspace([]); +// }); +// +describe('Validating', () => { + + test('empty test', () => { + }); + +// +// test('check no errors', async () => { +// document = await parse(` +// person Langium +// `); +// +// expect( +// // here we first check for validity of the parsed document object by means of the reusable function +// // 'checkDocumentValid()' to sort out (critical) typos first, +// // and then evaluate the diagnostics by converting them into human readable strings; +// // note that 'toHaveLength()' works for arrays and strings alike ;-) +// checkDocumentValid(document) || document?.diagnostics?.map(diagnosticToString)?.join('\n') +// ).toHaveLength(0); +// }); +// +// test('check capital letter validation', async () => { +// document = await parse(` +// person langium +// `); +// +// expect( +// checkDocumentValid(document) || document?.diagnostics?.map(diagnosticToString)?.join('\n') +// ).toEqual( +// // 'expect.stringContaining()' makes our test robust against future additions of further validation rules +// expect.stringContaining(s` +// [1:19..1:26]: Person name should start with a capital. +// `) +// ); +// }); +}); +// +// function checkDocumentValid(document: LangiumDocument): string | undefined { +// return document.parseResult.parserErrors.length && s` +// Parser errors: +// ${document.parseResult.parserErrors.map(e => e.message).join('\n ')} +// ` +// || document.parseResult.value === undefined && `ParseResult is 'undefined'.` +// || !isModel(document.parseResult.value) && `Root AST object is a ${document.parseResult.value.$type}, expected a 'Model'.` +// || undefined; +// } +// +// function diagnosticToString(d: Diagnostic) { +// return `[${d.range.start.line}:${d.range.start.character}..${d.range.end.line}:${d.range.end.character}]: ${d.message}`; +// } diff --git a/packages/language/test/validation-messages/errors.test.ts b/packages/language/test/validation-messages/errors.test.ts new file mode 100644 index 0000000..3bde89a --- /dev/null +++ b/packages/language/test/validation-messages/errors.test.ts @@ -0,0 +1,71 @@ +import { EmptyFileSystem } from "langium"; +import { expectIssue, parseHelper } from "langium/test"; +import { beforeAll, describe, test } from "vitest"; +import { createPliServices, PliProgram } from "../../src"; + +describe('Error messages', () => { + let services: ReturnType; + let parse: ReturnType>; + + beforeAll(async () => { + services = createPliServices(EmptyFileSystem); + parse = (input: string) => parseHelper(services.pli)(input, { validation: true }); + await services.shared.workspace.WorkspaceManager.initializeWorkspace([]); + }); + + describe('IBM1295IE Sole bound specified is less than 1', () => { + test.each([[-5], [0]])(`IBM1295IE: Upper bound is %d`, async (upperBound) => { + const document = await parse(` + TEST: PROCEDURE OPTIONS(MAIN) REORDER; + dcl x(${upperBound}) fixed bin; + END TEST; + `); + const diagnostics = document.diagnostics ?? []; + const result = { document, diagnostics, dispose: undefined! }; + expectIssue(result, { + code: 'IBM1295IE' + }); + }); + }); + + test('IBM1324IE the name occurs more than once in the EXPORTS clause', async () => { + const document = await parse(` +0PACK: PACKAGE EXPORTS(TEST, TEST); +0END; + `); + const diagnostics = document.diagnostics ?? []; + const result = { document, diagnostics, dispose: undefined! }; + expectIssue(result, { + code: 'IBM1324IE' + }); + }); + + test('IBM1388IE_NODESCRIPTOR attribute_is_invalid_when_any_parameter_has_NONCONNECTED_attribute', async () => { + const document = await parse(` +0a: proc( x ) options(nodescriptor); + dcl x(20) fixed bin nonconnected; +0end a; + `); + const diagnostics = document.diagnostics ?? []; + const result = { document, diagnostics, dispose: undefined! }; + expectIssue(result, { + code: 'IBM1388IE' + }); + }); + + + test('IBM1747IS_Function_cannot_be_used_before_the_functions_descriptor_list_has_been_scanned', async () => { + const document = await parse(` + TEST: PROCEDURE OPTIONS(MAIN) REORDER; + dcl a char( csize( x, y ) ); + dcl csize entry( char(2), fixed bin ) + returns( fixed bin ); + END TEST; + `); + const diagnostics = document.diagnostics ?? []; + const result = { document, diagnostics, dispose: undefined! }; + expectIssue(result, { + code: 'IBM1747IS' + }); + }); +}); \ No newline at end of file diff --git a/packages/language/tsconfig.json b/packages/language/tsconfig.json new file mode 100644 index 0000000..25c9de5 --- /dev/null +++ b/packages/language/tsconfig.json @@ -0,0 +1,12 @@ +// this file is required for VSCode to work properly +{ + "extends": "./tsconfig.src.json", + "compilerOptions": { + "noEmit": true, + "rootDir": "." + }, + "include": [ + "src/**/*", + "test/**/*" + ] +} diff --git a/packages/language/tsconfig.src.json b/packages/language/tsconfig.src.json new file mode 100644 index 0000000..b95fbed --- /dev/null +++ b/packages/language/tsconfig.src.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "out" + }, + "include": [ + "src/**/*.ts", + ] + } diff --git a/packages/language/tsconfig.test.json b/packages/language/tsconfig.test.json new file mode 100644 index 0000000..d13f58d --- /dev/null +++ b/packages/language/tsconfig.test.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.src.json", + "compilerOptions": { + "noEmit": true, + "rootDir": "test" + }, + "references": [{ + "path": "./tsconfig.src.json" + }], + "include": [ + "test/**/*.ts", + ] + } + \ No newline at end of file diff --git a/packages/vscode-extension/.vscodeignore b/packages/vscode-extension/.vscodeignore new file mode 100644 index 0000000..9118023 --- /dev/null +++ b/packages/vscode-extension/.vscodeignore @@ -0,0 +1,3 @@ +.vscode/** +.vscode-test/** +src/** \ No newline at end of file diff --git a/packages/vscode-extension/LICENSE b/packages/vscode-extension/LICENSE new file mode 100644 index 0000000..d3087e4 --- /dev/null +++ b/packages/vscode-extension/LICENSE @@ -0,0 +1,277 @@ +Eclipse Public License - v 2.0 + + THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE + PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION + OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + + a) in the case of the initial Contributor, the initial content + Distributed under this Agreement, and + + b) in the case of each subsequent Contributor: + i) changes to the Program, and + ii) additions to the Program; + where such changes and/or additions to the Program originate from + and are Distributed by that particular Contributor. A Contribution + "originates" from a Contributor if it was added to the Program by + such Contributor itself or anyone acting on such Contributor's behalf. + Contributions do not include changes or additions to the Program that + are not Modified Works. + +"Contributor" means any person or entity that Distributes the Program. + +"Licensed Patents" mean patent claims licensable by a Contributor which +are necessarily infringed by the use or sale of its Contribution alone +or when combined with the Program. + +"Program" means the Contributions Distributed in accordance with this +Agreement. + +"Recipient" means anyone who receives the Program under this Agreement +or any Secondary License (as applicable), including Contributors. + +"Derivative Works" shall mean any work, whether in Source Code or other +form, that is based on (or derived from) the Program and for which the +editorial revisions, annotations, elaborations, or other modifications +represent, as a whole, an original work of authorship. + +"Modified Works" shall mean any work in Source Code or other form that +results from an addition to, deletion from, or modification of the +contents of the Program, including, for purposes of clarity any new file +in Source Code form that contains any contents of the Program. Modified +Works shall not include works that contain only declarations, +interfaces, types, classes, structures, or files of the Program solely +in each case in order to link to, bind by name, or subclass the Program +or Modified Works thereof. + +"Distribute" means the acts of a) distributing or b) making available +in any manner that enables the transfer of a copy. + +"Source Code" means the form of a Program preferred for making +modifications, including but not limited to software source code, +documentation source, and configuration files. + +"Secondary License" means either the GNU General Public License, +Version 2.0, or any later versions of that license, including any +exceptions or additional permissions as identified by the initial +Contributor. + +2. GRANT OF RIGHTS + + a) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free copyright + license to reproduce, prepare Derivative Works of, publicly display, + publicly perform, Distribute and sublicense the Contribution of such + Contributor, if any, and such Derivative Works. + + b) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free patent + license under Licensed Patents to make, use, sell, offer to sell, + import and otherwise transfer the Contribution of such Contributor, + if any, in Source Code or other form. This patent license shall + apply to the combination of the Contribution and the Program if, at + the time the Contribution is added by the Contributor, such addition + of the Contribution causes such combination to be covered by the + Licensed Patents. The patent license shall not apply to any other + combinations which include the Contribution. No hardware per se is + licensed hereunder. + + c) Recipient understands that although each Contributor grants the + licenses to its Contributions set forth herein, no assurances are + provided by any Contributor that the Program does not infringe the + patent or other intellectual property rights of any other entity. + Each Contributor disclaims any liability to Recipient for claims + brought by any other entity based on infringement of intellectual + property rights or otherwise. As a condition to exercising the + rights and licenses granted hereunder, each Recipient hereby + assumes sole responsibility to secure any other intellectual + property rights needed, if any. For example, if a third party + patent license is required to allow Recipient to Distribute the + Program, it is Recipient's responsibility to acquire that license + before distributing the Program. + + d) Each Contributor represents that to its knowledge it has + sufficient copyright rights in its Contribution, if any, to grant + the copyright license set forth in this Agreement. + + e) Notwithstanding the terms of any Secondary License, no + Contributor makes additional grants to any Recipient (other than + those set forth in this Agreement) as a result of such Recipient's + receipt of the Program under the terms of a Secondary License + (if permitted under the terms of Section 3). + +3. REQUIREMENTS + +3.1 If a Contributor Distributes the Program in any form, then: + + a) the Program must also be made available as Source Code, in + accordance with section 3.2, and the Contributor must accompany + the Program with a statement that the Source Code for the Program + is available under this Agreement, and informs Recipients how to + obtain it in a reasonable manner on or through a medium customarily + used for software exchange; and + + b) the Contributor may Distribute the Program under a license + different than this Agreement, provided that such license: + i) effectively disclaims on behalf of all other Contributors all + warranties and conditions, express and implied, including + warranties or conditions of title and non-infringement, and + implied warranties or conditions of merchantability and fitness + for a particular purpose; + + ii) effectively excludes on behalf of all other Contributors all + liability for damages, including direct, indirect, special, + incidental and consequential damages, such as lost profits; + + iii) does not attempt to limit or alter the recipients' rights + in the Source Code under section 3.2; and + + iv) requires any subsequent distribution of the Program by any + party to be under a license that satisfies the requirements + of this section 3. + +3.2 When the Program is Distributed as Source Code: + + a) it must be made available under this Agreement, or if the + Program (i) is combined with other material in a separate file or + files made available under a Secondary License, and (ii) the initial + Contributor attached to the Source Code the notice described in + Exhibit A of this Agreement, then the Program may be made available + under the terms of such Secondary Licenses, and + + b) a copy of this Agreement must be included with each copy of + the Program. + +3.3 Contributors may not remove or alter any copyright, patent, +trademark, attribution notices, disclaimers of warranty, or limitations +of liability ("notices") contained within the Program from any copy of +the Program which they Distribute, provided that Contributors may add +their own appropriate notices. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities +with respect to end users, business partners and the like. While this +license is intended to facilitate the commercial use of the Program, +the Contributor who includes the Program in a commercial product +offering should do so in a manner which does not create potential +liability for other Contributors. Therefore, if a Contributor includes +the Program in a commercial product offering, such Contributor +("Commercial Contributor") hereby agrees to defend and indemnify every +other Contributor ("Indemnified Contributor") against any losses, +damages and costs (collectively "Losses") arising from claims, lawsuits +and other legal actions brought by a third party against the Indemnified +Contributor to the extent caused by the acts or omissions of such +Commercial Contributor in connection with its distribution of the Program +in a commercial product offering. The obligations in this section do not +apply to any claims or Losses relating to any actual or alleged +intellectual property infringement. In order to qualify, an Indemnified +Contributor must: a) promptly notify the Commercial Contributor in +writing of such claim, and b) allow the Commercial Contributor to control, +and cooperate with the Commercial Contributor in, the defense and any +related settlement negotiations. The Indemnified Contributor may +participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial +product offering, Product X. That Contributor is then a Commercial +Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance +claims and warranties are such Commercial Contributor's responsibility +alone. Under this section, the Commercial Contributor would have to +defend claims against the other Contributors related to those performance +claims and warranties, and if a court requires any other Contributor to +pay any damages as a result, the Commercial Contributor must pay +those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT +PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" +BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF +TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR +PURPOSE. Each Recipient is solely responsible for determining the +appropriateness of using and distributing the Program and assumes all +risks associated with its exercise of rights under this Agreement, +including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs +or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT +PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS +SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST +PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE +EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of +the remainder of the terms of this Agreement, and without further +action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that the +Program itself (excluding combinations of the Program with other software +or hardware) infringes such Recipient's patent(s), then such Recipient's +rights granted under Section 2(b) shall terminate as of the date such +litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it +fails to comply with any of the material terms or conditions of this +Agreement and does not cure such failure in a reasonable period of +time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use +and distribution of the Program as soon as reasonably practicable. +However, Recipient's obligations under this Agreement and any licenses +granted by Recipient relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, +but in order to avoid inconsistency the Agreement is copyrighted and +may only be modified in the following manner. The Agreement Steward +reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement +Steward has the right to modify this Agreement. The Eclipse Foundation +is the initial Agreement Steward. The Eclipse Foundation may assign the +responsibility to serve as the Agreement Steward to a suitable separate +entity. Each new version of the Agreement will be given a distinguishing +version number. The Program (including Contributions) may always be +Distributed subject to the version of the Agreement under which it was +received. In addition, after a new version of the Agreement is published, +Contributor may elect to Distribute the Program (including its +Contributions) under the new version. + +Except as expressly stated in Sections 2(a) and 2(b) above, Recipient +receives no rights or licenses to the intellectual property of any +Contributor under this Agreement, whether expressly, by implication, +estoppel or otherwise. All rights in the Program not expressly granted +under this Agreement are reserved. Nothing in this Agreement is intended +to be enforceable by any entity that is not a Contributor or Recipient. +No third-party beneficiary rights are created under this Agreement. + +Exhibit A - Form of Secondary Licenses Notice + +"This Source Code may also be made available under the following +Secondary Licenses when the conditions for such availability set forth +in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), +version(s), and exceptions or additional permissions here}." + + Simply including a copy of this Agreement, including this Exhibit A + is not sufficient to license the Source Code under Secondary Licenses. + + If it is not possible or desirable to put the notice in a particular + file, then You may include the notice in a location (such as a LICENSE + file in a relevant directory) where a recipient would be likely to + look for such a notice. + + You may add additional accurate notices of copyright ownership. diff --git a/packages/vscode-extension/README.md b/packages/vscode-extension/README.md new file mode 100644 index 0000000..b7eadbd --- /dev/null +++ b/packages/vscode-extension/README.md @@ -0,0 +1 @@ +# PL1 Extension \ No newline at end of file diff --git a/packages/vscode-extension/esbuild.mjs b/packages/vscode-extension/esbuild.mjs new file mode 100644 index 0000000..499f78a --- /dev/null +++ b/packages/vscode-extension/esbuild.mjs @@ -0,0 +1,89 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +//@ts-check +import * as esbuild from 'esbuild'; + +const watch = process.argv.includes('--watch'); +const minify = process.argv.includes('--minify'); + +const success = watch ? 'Watch build succeeded' : 'Build succeeded'; + +function getTime() { + const date = new Date(); + return `[${`${padZeroes(date.getHours())}:${padZeroes(date.getMinutes())}:${padZeroes(date.getSeconds())}`}] `; +} + +function padZeroes(i) { + return i.toString().padStart(2, '0'); +} + +const plugins = [{ + name: 'watch-plugin', + setup(build) { + build.onEnd(result => { + if (result.errors.length === 0) { + console.log(getTime() + success); + } + }); + }, +}]; + +const nodeCtx = await esbuild.context({ + // Entry points for the vscode extension and the language server + entryPoints: ['src/extension/main.ts', 'src/language/main.ts'], + outdir: 'out', + bundle: true, + target: "ES2017", + // VSCode's extension host is still using cjs, so we need to transform the code + format: 'cjs', + // To prevent confusing node, we explicitly use the `.cjs` extension + outExtension: { + '.js': '.cjs' + }, + loader: { '.ts': 'ts' }, + external: ['vscode'], + platform: 'node', + sourcemap: !minify, + minify, + plugins +}); + +const browserCtx = await esbuild.context({ + // Entry points for the vscode extension and the language server + entryPoints: ['src/extension/main-browser.ts', 'src/language/main-browser.ts'], + outdir: 'out', + bundle: true, + target: "ES2017", + format: 'cjs', + loader: { '.ts': 'ts' }, + external: ['vscode'], + platform: 'browser', + sourcemap: !minify, + minify, + plugins +}); + +if (watch) { + await Promise.all([ + nodeCtx.watch(), + browserCtx.watch() + ]); +} else { + await Promise.all([ + nodeCtx.rebuild(), + browserCtx.rebuild() + ]); + await Promise.all([ + nodeCtx.dispose(), + browserCtx.dispose() + ]); +} diff --git a/packages/vscode-extension/language-configuration.json b/packages/vscode-extension/language-configuration.json new file mode 100644 index 0000000..aa136e5 --- /dev/null +++ b/packages/vscode-extension/language-configuration.json @@ -0,0 +1,28 @@ +{ + "comments": { + // symbols used for start and end a block comment. Remove this entry if your language does not support block comments + "blockComment": [ "/*", "*/" ] + }, + // symbols used as brackets + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + // symbols that are auto closed when typing + "autoClosingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""], + ["'", "'"] + ], + // symbols that can be used to surround a selection + "surroundingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""], + ["'", "'"] + ] +} diff --git a/packages/vscode-extension/package.json b/packages/vscode-extension/package.json new file mode 100644 index 0000000..a2e00b0 --- /dev/null +++ b/packages/vscode-extension/package.json @@ -0,0 +1,59 @@ +{ + "name": "pl-one-extension", + "description": "The extension specific package", + "author": "Zowe", + "license": "EPL-2.0", + "preview": false, + "publisher": "Zowe", + "repository": { + "type": "git", + "url": "https://github.com/zowe/zowe-pli-language-support" + }, + "version": "0.0.1", + "displayName": "PL/I Language Support", + "engines": { + "vscode": "^1.67.0" + }, + "categories": [ + "Programming Languages" + ], + "contributes": { + "languages": [{ + "id": "pli", + "aliases": ["PL/I", "PLI", "PL1", "PL/1"], + "extensions": [".pli"], + "configuration": "./language-configuration.json" + }], + "grammars": [{ + "language": "pli", + "scopeName": "source.pli", + "path": "syntaxes/pli.merged.json" + }] + }, + "activationEvents": [], + "main": "./out/extension/main.cjs", + "browser": "./out/extension/main-browser.js", + "scripts": { + "clean": "shx rm -fr *.tsbuildinfo out", + "vscode:prepublish": "npm run build && node esbuild.mjs --minify", + "package": "vsce package", + "build": "tsc -b tsconfig.json && node esbuild.mjs", + "build:clean": "npm run clean && npm run build", + "watch": "concurrently -n tsc,esbuild -c blue,yellow \"tsc -b tsconfig.json --watch\" \"node esbuild.mjs --watch\"" + }, + "vsce": { + "dependencies": false + }, + "dependencies": { + "langium": "~3.2.0", + "pl-one-language": "workspace:*", + "vscode-languageclient": "~9.0.1", + "vscode-languageserver": "~9.0.1" + }, + "devDependencies": { + "@types/vscode": "~1.67.0", + "@vscode/vsce": "^3.0.0", + "concurrently": "~8.2.1", + "esbuild": "~0.21.5" + } +} diff --git a/packages/vscode-extension/src/extension/builtin-files.ts b/packages/vscode-extension/src/extension/builtin-files.ts new file mode 100644 index 0000000..e751b98 --- /dev/null +++ b/packages/vscode-extension/src/extension/builtin-files.ts @@ -0,0 +1,71 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import * as vscode from 'vscode'; +import { Builtins } from 'pl-one-language'; + +export class BuiltinFileSystemProvider implements vscode.FileSystemProvider { + + static register(context: vscode.ExtensionContext) { + context.subscriptions.push( + vscode.workspace.registerFileSystemProvider('pli-builtin', new BuiltinFileSystemProvider(), { + isReadonly: true, + isCaseSensitive: false + })); + } + + stat(uri: vscode.Uri): vscode.FileStat { + const date = Date.now(); + return { + ctime: date, + mtime: date, + size: Buffer.from(Builtins).length, + type: vscode.FileType.File + }; + } + + readFile(uri: vscode.Uri): Uint8Array { + // We could return different libraries based on the URI + // We have only one, so we always return the same + return new Uint8Array(Buffer.from(Builtins)); + } + + // The following class members only serve to satisfy the interface + + private readonly didChangeFile = new vscode.EventEmitter(); + onDidChangeFile = this.didChangeFile.event; + + watch() { + return { + dispose: () => {} + }; + } + + readDirectory(): [] { + throw vscode.FileSystemError.NoPermissions(); + } + + createDirectory() { + throw vscode.FileSystemError.NoPermissions(); + } + + writeFile() { + throw vscode.FileSystemError.NoPermissions(); + } + + delete() { + throw vscode.FileSystemError.NoPermissions(); + } + + rename() { + throw vscode.FileSystemError.NoPermissions(); + } +} diff --git a/packages/vscode-extension/src/extension/main-browser.ts b/packages/vscode-extension/src/extension/main-browser.ts new file mode 100644 index 0000000..e61849b --- /dev/null +++ b/packages/vscode-extension/src/extension/main-browser.ts @@ -0,0 +1,53 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import type { LanguageClientOptions } from 'vscode-languageclient/browser.js'; +import * as vscode from 'vscode'; +import { LanguageClient } from 'vscode-languageclient/browser.js'; +import { BuiltinFileSystemProvider } from './builtin-files'; + +let client: LanguageClient; + +// This function is called when the extension is activated. +export function activate(context: vscode.ExtensionContext): void { + BuiltinFileSystemProvider.register(context); + client = startLanguageClient(context); +} + +// This function is called when the extension is deactivated. +export function deactivate(): Thenable | undefined { + if (client) { + return client.stop(); + } + return undefined; +} + +function startLanguageClient(context: vscode.ExtensionContext): LanguageClient { + const serverModule = vscode.Uri.joinPath(context.extensionUri, 'out/language/main-browser.js'); + const worker = new Worker(serverModule.toString(true)); + + // Options to control the language client + const clientOptions: LanguageClientOptions = { + documentSelector: [{ scheme: '*', language: 'pli' }] + }; + + // Create the language client and start the client. + const client = new LanguageClient( + 'pli', + 'PL/I', + clientOptions, + worker + ); + + // Start the client. This will also launch the server + client.start(); + return client; +} diff --git a/packages/vscode-extension/src/extension/main.ts b/packages/vscode-extension/src/extension/main.ts new file mode 100644 index 0000000..85dec76 --- /dev/null +++ b/packages/vscode-extension/src/extension/main.ts @@ -0,0 +1,64 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import type { LanguageClientOptions, ServerOptions } from 'vscode-languageclient/node.js'; +import type * as vscode from 'vscode'; +import * as path from 'node:path'; +import { LanguageClient, TransportKind } from 'vscode-languageclient/node.js'; +import { BuiltinFileSystemProvider } from './builtin-files'; + +let client: LanguageClient; + +// This function is called when the extension is activated. +export function activate(context: vscode.ExtensionContext): void { + BuiltinFileSystemProvider.register(context); + client = startLanguageClient(context); +} + +// This function is called when the extension is deactivated. +export function deactivate(): Thenable | undefined { + if (client) { + return client.stop(); + } + return undefined; +} + +function startLanguageClient(context: vscode.ExtensionContext): LanguageClient { + const serverModule = context.asAbsolutePath(path.join('out', 'language', 'main.cjs')); + // The debug options for the server + // --inspect=6009: runs the server in Node's Inspector mode so VS Code can attach to the server for debugging. + // By setting `process.env.DEBUG_BREAK` to a truthy value, the language server will wait until a debugger is attached. + const debugOptions = { execArgv: ['--nolazy', `--inspect${process.env.DEBUG_BREAK ? '-brk' : ''}=${process.env.DEBUG_SOCKET || '6009'}`] }; + + // If the extension is launched in debug mode then the debug server options are used + // Otherwise the run options are used + const serverOptions: ServerOptions = { + run: { module: serverModule, transport: TransportKind.ipc }, + debug: { module: serverModule, transport: TransportKind.ipc, options: debugOptions } + }; + + // Options to control the language client + const clientOptions: LanguageClientOptions = { + documentSelector: [{ scheme: '*', language: 'pli' }] + }; + + // Create the language client and start the client. + const client = new LanguageClient( + 'pli', + 'PL/I', + serverOptions, + clientOptions + ); + + // Start the client. This will also launch the server + client.start(); + return client; +} diff --git a/packages/vscode-extension/src/language/main-browser.ts b/packages/vscode-extension/src/language/main-browser.ts new file mode 100644 index 0000000..a0a2c5f --- /dev/null +++ b/packages/vscode-extension/src/language/main-browser.ts @@ -0,0 +1,27 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import { EmptyFileSystem } from 'langium'; +import { startLanguageServer } from 'langium/lsp'; +import { BrowserMessageReader, BrowserMessageWriter, createConnection } from 'vscode-languageserver/browser.js'; +import { createPliServices } from 'pl-one-language'; + +/* browser specific setup code */ +const messageReader = new BrowserMessageReader(self); +const messageWriter = new BrowserMessageWriter(self); + +const connection = createConnection(messageReader, messageWriter); + +// Inject the shared services and language-specific services +const { shared } = createPliServices({ connection, ...EmptyFileSystem }); + +// Start the language server with the shared services +startLanguageServer(shared); diff --git a/packages/vscode-extension/src/language/main.ts b/packages/vscode-extension/src/language/main.ts new file mode 100644 index 0000000..6dd464f --- /dev/null +++ b/packages/vscode-extension/src/language/main.ts @@ -0,0 +1,24 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import { startLanguageServer } from 'langium/lsp'; +import { NodeFileSystem } from 'langium/node'; +import { createConnection, ProposedFeatures } from 'vscode-languageserver/node.js'; +import { createPliServices } from 'pl-one-language'; + +// Create a connection to the client +const connection = createConnection(ProposedFeatures.all); + +// Inject the shared services and language-specific services +const { shared } = createPliServices({ connection, ...NodeFileSystem }); + +// Start the language server with the shared services +startLanguageServer(shared); diff --git a/packages/vscode-extension/syntaxes/pli.manual.json b/packages/vscode-extension/syntaxes/pli.manual.json new file mode 100644 index 0000000..54eaa9a --- /dev/null +++ b/packages/vscode-extension/syntaxes/pli.manual.json @@ -0,0 +1,79 @@ +{ + "name": "pli", + "scopeName": "source.pli", + "fileTypes": [ + ".pli" + ], + "patterns": [ + { + "include": "#comments" + }, + { + "name": "string.quoted.single.pli", + "begin": "'", + "end": "'", + "patterns": [ + { + "include": "#string-character-escape" + } + ] + }, + { + "name": "string.double.single.pli", + "begin": "\"", + "end": "\"", + "patterns": [ + { + "include": "#string-character-escape" + } + ] + }, + { + "name": "string.exec.pli", + "match": "(?<=[eE][xX][eE][cC]\\s*)[a-zA-Z]+\\s[^;]*" + }, + { + "name": "constant.numeric.decimal.pli", + "match": "([0-9][0-9_]*(\\.[0-9_]+)?)|(\\.[0-9_]+)([ESDQ][-+]?[0-9]+)?([bB]|[iI])*" + }, + { + "name": "entity.other.pli", + "match": "[a-zA-Z_][a-zA-Z0-9_]*" + } + ], + "repository": { + "string-character-escape": { + "name": "constant.character.escape.lox", + "match": "\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\\{[0-9A-Fa-f]+\\}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)" + }, + "comments": { + "patterns": [ + { + "name": "comment.block.pli", + "begin": "/\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.pli" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.pli" + } + } + }, + { + "begin": "//", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.pli" + } + }, + "end": "(?=$)", + "name": "comment.line.pli" + } + ] + } + } +} \ No newline at end of file diff --git a/packages/vscode-extension/tsconfig.json b/packages/vscode-extension/tsconfig.json new file mode 100644 index 0000000..315afa5 --- /dev/null +++ b/packages/vscode-extension/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "noEmit": true, + "rootDir": ".", + "lib": ["DOM", "ES2022"] + }, + "references": [ + { + "path": "../language/tsconfig.src.json" + } + ], + "include": [ + "src/**/*.ts" + ] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..e4e990c --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,3931 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + '@types/node': + specifier: ^18.0.0 + version: 18.19.60 + '@typescript-eslint/eslint-plugin': + specifier: ~7.13.0 + version: 7.13.1(@typescript-eslint/parser@7.13.1(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1)(typescript@5.4.5) + '@typescript-eslint/parser': + specifier: ~7.13.0 + version: 7.13.1(eslint@8.57.1)(typescript@5.4.5) + deepmerge: + specifier: ^1.5.0 + version: 1.5.2 + eslint: + specifier: ~8.57.0 + version: 8.57.1 + langium: + specifier: ~3.2.0 + version: 3.2.0 + shx: + specifier: ~0.3.4 + version: 0.3.4 + typescript: + specifier: ~5.4.5 + version: 5.4.5 + vitest: + specifier: ^1.6.0 + version: 1.6.0(@types/node@18.19.60) + + packages/language: + dependencies: + chevrotain: + specifier: ^11.0.3 + version: 11.0.3 + langium: + specifier: ~3.2.0 + version: 3.2.0 + vscode-languageserver: + specifier: ~9.0.1 + version: 9.0.1 + vscode-languageserver-types: + specifier: ^3.17.5 + version: 3.17.5 + devDependencies: + langium-cli: + specifier: ~3.2.0 + version: 3.2.0 + + packages/vscode-extension: + dependencies: + langium: + specifier: ~3.2.0 + version: 3.2.0 + pl-one-language: + specifier: workspace:* + version: link:../language + vscode-languageclient: + specifier: ~9.0.1 + version: 9.0.1 + vscode-languageserver: + specifier: ~9.0.1 + version: 9.0.1 + devDependencies: + '@types/vscode': + specifier: ~1.67.0 + version: 1.67.0 + '@vscode/vsce': + specifier: ^3.0.0 + version: 3.2.1 + concurrently: + specifier: ~8.2.1 + version: 8.2.2 + esbuild: + specifier: ~0.21.5 + version: 0.21.5 + +packages: + + '@azure/abort-controller@2.1.2': + resolution: {integrity: sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==} + engines: {node: '>=18.0.0'} + + '@azure/core-auth@1.9.0': + resolution: {integrity: sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw==} + engines: {node: '>=18.0.0'} + + '@azure/core-client@1.9.2': + resolution: {integrity: sha512-kRdry/rav3fUKHl/aDLd/pDLcB+4pOFwPPTVEExuMyaI5r+JBbMWqRbCY1pn5BniDaU3lRxO9eaQ1AmSMehl/w==} + engines: {node: '>=18.0.0'} + + '@azure/core-rest-pipeline@1.17.0': + resolution: {integrity: sha512-62Vv8nC+uPId3j86XJ0WI+sBf0jlqTqPUFCBNrGtlaUeQUIXWV/D8GE5A1d+Qx8H7OQojn2WguC8kChD6v0shA==} + engines: {node: '>=18.0.0'} + + '@azure/core-tracing@1.2.0': + resolution: {integrity: sha512-UKTiEJPkWcESPYJz3X5uKRYyOcJD+4nYph+KpfdPRnQJVrZfk0KJgdnaAWKfhsBBtAf/D58Az4AvCJEmWgIBAg==} + engines: {node: '>=18.0.0'} + + '@azure/core-util@1.11.0': + resolution: {integrity: sha512-DxOSLua+NdpWoSqULhjDyAZTXFdP/LKkqtYuxxz1SCN289zk3OG8UOpnCQAz/tygyACBtWp/BoO72ptK7msY8g==} + engines: {node: '>=18.0.0'} + + '@azure/identity@4.5.0': + resolution: {integrity: sha512-EknvVmtBuSIic47xkOqyNabAme0RYTw52BTMz8eBgU1ysTyMrD1uOoM+JdS0J/4Yfp98IBT3osqq3BfwSaNaGQ==} + engines: {node: '>=18.0.0'} + + '@azure/logger@1.1.4': + resolution: {integrity: sha512-4IXXzcCdLdlXuCG+8UKEwLA1T1NHqUfanhXYHiQTn+6sfWCZXduqbtXDGceg3Ce5QxTGo7EqmbV6Bi+aqKuClQ==} + engines: {node: '>=18.0.0'} + + '@azure/msal-browser@3.26.1': + resolution: {integrity: sha512-y78sr9g61aCAH9fcLO1um+oHFXc1/5Ap88RIsUSuzkm0BHzFnN+PXGaQeuM1h5Qf5dTnWNOd6JqkskkMPAhh7Q==} + engines: {node: '>=0.8.0'} + + '@azure/msal-common@14.15.0': + resolution: {integrity: sha512-ImAQHxmpMneJ/4S8BRFhjt1MZ3bppmpRPYYNyzeQPeFN288YKbb8TmmISQEbtfkQ1BPASvYZU5doIZOPBAqENQ==} + engines: {node: '>=0.8.0'} + + '@azure/msal-node@2.15.0': + resolution: {integrity: sha512-gVPW8YLz92ZeCibQH2QUw96odJoiM3k/ZPH3f2HxptozmH6+OnyyvKXo/Egg39HAM230akarQKHf0W74UHlh0Q==} + engines: {node: '>=16'} + + '@babel/runtime@7.26.0': + resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} + engines: {node: '>=6.9.0'} + + '@chevrotain/cst-dts-gen@11.0.3': + resolution: {integrity: sha512-BvIKpRLeS/8UbfxXxgC33xOumsacaeCKAjAeLyOn7Pcp95HiRbrpl14S+9vaZLolnbssPIUuiUd8IvgkRyt6NQ==} + + '@chevrotain/gast@11.0.3': + resolution: {integrity: sha512-+qNfcoNk70PyS/uxmj3li5NiECO+2YKZZQMbmjTqRI3Qchu8Hig/Q9vgkHpI3alNjr7M+a2St5pw5w5F6NL5/Q==} + + '@chevrotain/regexp-to-ast@11.0.3': + resolution: {integrity: sha512-1fMHaBZxLFvWI067AVbGJav1eRY7N8DDvYCTwGBiE/ytKBgP8azTdgyrKyWZ9Mfh09eHWb5PgTSO8wi7U824RA==} + + '@chevrotain/types@11.0.3': + resolution: {integrity: sha512-gsiM3G8b58kZC2HaWR50gu6Y1440cHiJ+i3JUvcp/35JchYejb2+5MVeJK0iKThYpAa/P2PYFV4hoi44HD+aHQ==} + + '@chevrotain/utils@11.0.3': + resolution: {integrity: sha512-YslZMgtJUyuMbZ+aKvfF3x1f5liK4mWNxghFRv7jqRR9C3R3fAOGTTKvxXDa2Y1s9zSbcpuO0cAxDYsc9SrXoQ==} + + '@esbuild/aix-ppc64@0.21.5': + resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.21.5': + resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.21.5': + resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.21.5': + resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.21.5': + resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.21.5': + resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.21.5': + resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.21.5': + resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.21.5': + resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.21.5': + resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.21.5': + resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.21.5': + resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.21.5': + resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.21.5': + resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.21.5': + resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.21.5': + resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.21.5': + resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-x64@0.21.5': + resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-x64@0.21.5': + resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + + '@esbuild/sunos-x64@0.21.5': + resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.21.5': + resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.21.5': + resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.21.5': + resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + + '@eslint-community/eslint-utils@4.4.1': + resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.1': + resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/eslintrc@2.1.4': + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + '@eslint/js@8.57.1': + resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + '@humanwhocodes/config-array@0.13.0': + resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} + engines: {node: '>=10.10.0'} + deprecated: Use @eslint/config-array instead + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + deprecated: Use @eslint/object-schema instead + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@jest/schemas@29.6.3': + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@rollup/rollup-android-arm-eabi@4.24.2': + resolution: {integrity: sha512-ufoveNTKDg9t/b7nqI3lwbCG/9IJMhADBNjjz/Jn6LxIZxD7T5L8l2uO/wD99945F1Oo8FvgbbZJRguyk/BdzA==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.24.2': + resolution: {integrity: sha512-iZoYCiJz3Uek4NI0J06/ZxUgwAfNzqltK0MptPDO4OR0a88R4h0DSELMsflS6ibMCJ4PnLvq8f7O1d7WexUvIA==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.24.2': + resolution: {integrity: sha512-/UhrIxobHYCBfhi5paTkUDQ0w+jckjRZDZ1kcBL132WeHZQ6+S5v9jQPVGLVrLbNUebdIRpIt00lQ+4Z7ys4Rg==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.24.2': + resolution: {integrity: sha512-1F/jrfhxJtWILusgx63WeTvGTwE4vmsT9+e/z7cZLKU8sBMddwqw3UV5ERfOV+H1FuRK3YREZ46J4Gy0aP3qDA==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.24.2': + resolution: {integrity: sha512-1YWOpFcGuC6iGAS4EI+o3BV2/6S0H+m9kFOIlyFtp4xIX5rjSnL3AwbTBxROX0c8yWtiWM7ZI6mEPTI7VkSpZw==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.24.2': + resolution: {integrity: sha512-3qAqTewYrCdnOD9Gl9yvPoAoFAVmPJsBvleabvx4bnu1Kt6DrB2OALeRVag7BdWGWLhP1yooeMLEi6r2nYSOjg==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.24.2': + resolution: {integrity: sha512-ArdGtPHjLqWkqQuoVQ6a5UC5ebdX8INPuJuJNWRe0RGa/YNhVvxeWmCTFQ7LdmNCSUzVZzxAvUznKaYx645Rig==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.24.2': + resolution: {integrity: sha512-B6UHHeNnnih8xH6wRKB0mOcJGvjZTww1FV59HqJoTJ5da9LCG6R4SEBt6uPqzlawv1LoEXSS0d4fBlHNWl6iYw==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.24.2': + resolution: {integrity: sha512-kr3gqzczJjSAncwOS6i7fpb4dlqcvLidqrX5hpGBIM1wtt0QEVtf4wFaAwVv8QygFU8iWUMYEoJZWuWxyua4GQ==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.24.2': + resolution: {integrity: sha512-TDdHLKCWgPuq9vQcmyLrhg/bgbOvIQ8rtWQK7MRxJ9nvaxKx38NvY7/Lo6cYuEnNHqf6rMqnivOIPIQt6H2AoA==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-powerpc64le-gnu@4.24.2': + resolution: {integrity: sha512-xv9vS648T3X4AxFFZGWeB5Dou8ilsv4VVqJ0+loOIgDO20zIhYfDLkk5xoQiej2RiSQkld9ijF/fhLeonrz2mw==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.24.2': + resolution: {integrity: sha512-tbtXwnofRoTt223WUZYiUnbxhGAOVul/3StZ947U4A5NNjnQJV5irKMm76G0LGItWs6y+SCjUn/Q0WaMLkEskg==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.24.2': + resolution: {integrity: sha512-gc97UebApwdsSNT3q79glOSPdfwgwj5ELuiyuiMY3pEWMxeVqLGKfpDFoum4ujivzxn6veUPzkGuSYoh5deQ2Q==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.24.2': + resolution: {integrity: sha512-jOG/0nXb3z+EM6SioY8RofqqmZ+9NKYvJ6QQaa9Mvd3RQxlH68/jcB/lpyVt4lCiqr04IyaC34NzhUqcXbB5FQ==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.24.2': + resolution: {integrity: sha512-XAo7cJec80NWx9LlZFEJQxqKOMz/lX3geWs2iNT5CHIERLFfd90f3RYLLjiCBm1IMaQ4VOX/lTC9lWfzzQm14Q==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-win32-arm64-msvc@4.24.2': + resolution: {integrity: sha512-A+JAs4+EhsTjnPQvo9XY/DC0ztaws3vfqzrMNMKlwQXuniBKOIIvAAI8M0fBYiTCxQnElYu7mLk7JrhlQ+HeOw==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.24.2': + resolution: {integrity: sha512-ZhcrakbqA1SCiJRMKSU64AZcYzlZ/9M5LaYil9QWxx9vLnkQ9Vnkve17Qn4SjlipqIIBFKjBES6Zxhnvh0EAEw==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.24.2': + resolution: {integrity: sha512-2mLH46K1u3r6uwc95hU+OR9q/ggYMpnS7pSp83Ece1HUQgF9Nh/QwTK5rcgbFnV9j+08yBrU5sA/P0RK2MSBNA==} + cpu: [x64] + os: [win32] + + '@sinclair/typebox@0.27.8': + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + + '@types/node@18.19.60': + resolution: {integrity: sha512-cYRj7igVqgxhlHFdBHHpU2SNw3+dN2x0VTZJtLYk6y/ieuGN4XiBgtDjYVktM/yk2y/8pKMileNc6IoEzEJnUw==} + + '@types/vscode@1.67.0': + resolution: {integrity: sha512-GH8BDf8cw9AC9080uneJfulhSa7KHSMI2s/CyKePXoGNos9J486w2V4YKoeNUqIEkW4hKoEAWp6/cXTwyGj47g==} + + '@typescript-eslint/eslint-plugin@7.13.1': + resolution: {integrity: sha512-kZqi+WZQaZfPKnsflLJQCz6Ze9FFSMfXrrIOcyargekQxG37ES7DJNpJUE9Q/X5n3yTIP/WPutVNzgknQ7biLg==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + '@typescript-eslint/parser': ^7.0.0 + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/parser@7.13.1': + resolution: {integrity: sha512-1ELDPlnLvDQ5ybTSrMhRTFDfOQEOXNM+eP+3HT/Yq7ruWpciQw+Avi73pdEbA4SooCawEWo3dtYbF68gN7Ed1A==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/scope-manager@7.13.1': + resolution: {integrity: sha512-adbXNVEs6GmbzaCpymHQ0MB6E4TqoiVbC0iqG3uijR8ZYfpAXMGttouQzF4Oat3P2GxDVIrg7bMI/P65LiQZdg==} + engines: {node: ^18.18.0 || >=20.0.0} + + '@typescript-eslint/type-utils@7.13.1': + resolution: {integrity: sha512-aWDbLu1s9bmgPGXSzNCxELu+0+HQOapV/y+60gPXafR8e2g1Bifxzevaa+4L2ytCWm+CHqpELq4CSoN9ELiwCg==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/types@7.13.1': + resolution: {integrity: sha512-7K7HMcSQIAND6RBL4kDl24sG/xKM13cA85dc7JnmQXw2cBDngg7c19B++JzvJHRG3zG36n9j1i451GBzRuHchw==} + engines: {node: ^18.18.0 || >=20.0.0} + + '@typescript-eslint/typescript-estree@7.13.1': + resolution: {integrity: sha512-uxNr51CMV7npU1BxZzYjoVz9iyjckBduFBP0S5sLlh1tXYzHzgZ3BR9SVsNed+LmwKrmnqN3Kdl5t7eZ5TS1Yw==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/utils@7.13.1': + resolution: {integrity: sha512-h5MzFBD5a/Gh/fvNdp9pTfqJAbuQC4sCN2WzuXme71lqFJsZtLbjxfSk4r3p02WIArOF9N94pdsLiGutpDbrXQ==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + + '@typescript-eslint/visitor-keys@7.13.1': + resolution: {integrity: sha512-k/Bfne7lrP7hcb7m9zSsgcBmo+8eicqqfNAJ7uUY+jkTFpKeH2FSkWpFRtimBxgkyvqfu9jTPRbYOvud6isdXA==} + engines: {node: ^18.18.0 || >=20.0.0} + + '@ungap/structured-clone@1.2.0': + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + + '@vitest/expect@1.6.0': + resolution: {integrity: sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==} + + '@vitest/runner@1.6.0': + resolution: {integrity: sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==} + + '@vitest/snapshot@1.6.0': + resolution: {integrity: sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==} + + '@vitest/spy@1.6.0': + resolution: {integrity: sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==} + + '@vitest/utils@1.6.0': + resolution: {integrity: sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==} + + '@vscode/vsce-sign-alpine-arm64@2.0.2': + resolution: {integrity: sha512-E80YvqhtZCLUv3YAf9+tIbbqoinWLCO/B3j03yQPbjT3ZIHCliKZlsy1peNc4XNZ5uIb87Jn0HWx/ZbPXviuAQ==} + cpu: [arm64] + os: [alpine] + + '@vscode/vsce-sign-alpine-x64@2.0.2': + resolution: {integrity: sha512-n1WC15MSMvTaeJ5KjWCzo0nzjydwxLyoHiMJHu1Ov0VWTZiddasmOQHekA47tFRycnt4FsQrlkSCTdgHppn6bw==} + cpu: [x64] + os: [alpine] + + '@vscode/vsce-sign-darwin-arm64@2.0.2': + resolution: {integrity: sha512-rz8F4pMcxPj8fjKAJIfkUT8ycG9CjIp888VY/6pq6cuI2qEzQ0+b5p3xb74CJnBbSC0p2eRVoe+WgNCAxCLtzQ==} + cpu: [arm64] + os: [darwin] + + '@vscode/vsce-sign-darwin-x64@2.0.2': + resolution: {integrity: sha512-MCjPrQ5MY/QVoZ6n0D92jcRb7eYvxAujG/AH2yM6lI0BspvJQxp0o9s5oiAM9r32r9tkLpiy5s2icsbwefAQIw==} + cpu: [x64] + os: [darwin] + + '@vscode/vsce-sign-linux-arm64@2.0.2': + resolution: {integrity: sha512-Ybeu7cA6+/koxszsORXX0OJk9N0GgfHq70Wqi4vv2iJCZvBrOWwcIrxKjvFtwyDgdeQzgPheH5nhLVl5eQy7WA==} + cpu: [arm64] + os: [linux] + + '@vscode/vsce-sign-linux-arm@2.0.2': + resolution: {integrity: sha512-Fkb5jpbfhZKVw3xwR6t7WYfwKZktVGNXdg1m08uEx1anO0oUPUkoQRsNm4QniL3hmfw0ijg00YA6TrxCRkPVOQ==} + cpu: [arm] + os: [linux] + + '@vscode/vsce-sign-linux-x64@2.0.2': + resolution: {integrity: sha512-NsPPFVtLaTlVJKOiTnO8Cl78LZNWy0Q8iAg+LlBiCDEgC12Gt4WXOSs2pmcIjDYzj2kY4NwdeN1mBTaujYZaPg==} + cpu: [x64] + os: [linux] + + '@vscode/vsce-sign-win32-arm64@2.0.2': + resolution: {integrity: sha512-wPs848ymZ3Ny+Y1Qlyi7mcT6VSigG89FWQnp2qRYCyMhdJxOpA4lDwxzlpL8fG6xC8GjQjGDkwbkWUcCobvksQ==} + cpu: [arm64] + os: [win32] + + '@vscode/vsce-sign-win32-x64@2.0.2': + resolution: {integrity: sha512-pAiRN6qSAhDM5SVOIxgx+2xnoVUePHbRNC7OD2aOR3WltTKxxF25OfpK8h8UQ7A0BuRkSgREbB59DBlFk4iAeg==} + cpu: [x64] + os: [win32] + + '@vscode/vsce-sign@2.0.5': + resolution: {integrity: sha512-GfYWrsT/vypTMDMgWDm75iDmAOMe7F71sZECJ+Ws6/xyIfmB3ELVnVN+LwMFAvmXY+e6eWhR2EzNGF/zAhWY3Q==} + + '@vscode/vsce@3.2.1': + resolution: {integrity: sha512-AY9vBjwExakK1c0cI/3NN2Ey0EgiKLBye/fxl/ue+o4q6RZ7N+xzd1jAD6eI6eBeMVANi617+V2rxIAkDPco2Q==} + engines: {node: '>= 20'} + hasBin: true + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn-walk@8.3.4: + resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} + engines: {node: '>=0.4.0'} + + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} + engines: {node: '>=0.4.0'} + hasBin: true + + agent-base@7.1.1: + resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} + engines: {node: '>= 14'} + + ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.1.0: + resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} + engines: {node: '>=12'} + + ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} + + ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + + assertion-error@1.1.0: + resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + + asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + + azure-devops-node-api@12.5.0: + resolution: {integrity: sha512-R5eFskGvOm3U/GzeAuxRkUsAl0hrAwGgWn6zAd2KrZmrEhWZVqLew4OOupbQlXUuojUzpGtq62SmdhJ06N88og==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + + bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + + boolbase@1.0.0: + resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} + + brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + + buffer-crc32@0.2.13: + resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} + + buffer-equal-constant-time@1.0.1: + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} + + buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + + call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + chai@4.5.0: + resolution: {integrity: sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==} + engines: {node: '>=4'} + + chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chalk@5.3.0: + resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + + check-error@1.0.3: + resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + + cheerio-select@2.1.0: + resolution: {integrity: sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==} + + cheerio@1.0.0: + resolution: {integrity: sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==} + engines: {node: '>=18.17'} + + chevrotain-allstar@0.3.1: + resolution: {integrity: sha512-b7g+y9A0v4mxCW1qUhf3BSVPg+/NvGErk/dOkrDaHA0nQIQGAtrOjlX//9OQtRlSCy+x9rfB5N8yC71lH1nvMw==} + peerDependencies: + chevrotain: ^11.0.0 + + chevrotain@11.0.3: + resolution: {integrity: sha512-ci2iJH6LeIkvP9eJW6gpueU8cnZhv85ELY8w8WiFtNjMHA5ad6pQLaJo9mEly/9qUyCpvqX8/POVUTf18/HFdw==} + + chownr@1.1.4: + resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + cockatiel@3.2.1: + resolution: {integrity: sha512-gfrHV6ZPkquExvMh9IOkKsBzNDk6sDuZ6DdBGUBkvFnTCqCxzpuq48RySgP0AnaqQkw2zynOFj9yly6T1Q2G5Q==} + engines: {node: '>=16'} + + color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + + commander@11.0.0: + resolution: {integrity: sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==} + engines: {node: '>=16'} + + commander@6.2.1: + resolution: {integrity: sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==} + engines: {node: '>= 6'} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + concurrently@8.2.2: + resolution: {integrity: sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg==} + engines: {node: ^14.13.0 || >=16.0.0} + hasBin: true + + confbox@0.1.8: + resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} + + cross-spawn@7.0.3: + resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + engines: {node: '>= 8'} + + css-select@5.1.0: + resolution: {integrity: sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==} + + css-what@6.1.0: + resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==} + engines: {node: '>= 6'} + + date-fns@2.30.0: + resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} + engines: {node: '>=0.11'} + + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decompress-response@6.0.0: + resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} + engines: {node: '>=10'} + + deep-eql@4.1.4: + resolution: {integrity: sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==} + engines: {node: '>=6'} + + deep-extend@0.6.0: + resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} + engines: {node: '>=4.0.0'} + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + + deepmerge@1.5.2: + resolution: {integrity: sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ==} + engines: {node: '>=0.10.0'} + + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + + define-lazy-prop@2.0.0: + resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} + engines: {node: '>=8'} + + delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + + detect-libc@2.0.3: + resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} + engines: {node: '>=8'} + + diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + + dom-serializer@2.0.0: + resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} + + domelementtype@2.3.0: + resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} + + domhandler@5.0.3: + resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} + engines: {node: '>= 4'} + + domutils@3.1.0: + resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + ecdsa-sig-formatter@1.0.11: + resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + encoding-sniffer@0.2.0: + resolution: {integrity: sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==} + + end-of-stream@1.4.4: + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + + es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + esbuild@0.21.5: + resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} + engines: {node: '>=12'} + hasBin: true + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint@8.57.1: + resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. + hasBin: true + + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + + events@3.3.0: + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} + + execa@8.0.1: + resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} + engines: {node: '>=16.17'} + + expand-template@2.0.3: + resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} + engines: {node: '>=6'} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + + fastq@1.17.1: + resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + + fd-slicer@1.1.0: + resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} + + file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + + flatted@3.3.1: + resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + + foreground-child@3.3.0: + resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} + engines: {node: '>=14'} + + form-data@4.0.1: + resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==} + engines: {node: '>= 6'} + + fs-constants@1.0.0: + resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} + + fs-extra@11.1.1: + resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} + engines: {node: '>=14.14'} + + fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-func-name@2.0.2: + resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} + + get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} + + get-stream@8.0.1: + resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} + engines: {node: '>=16'} + + github-from-package@0.0.0: + resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + glob@11.0.0: + resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} + engines: {node: 20 || >=22} + hasBin: true + + glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported + + globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} + engines: {node: '>=8'} + + globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + + gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + + has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + + has-proto@1.0.3: + resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + engines: {node: '>= 0.4'} + + has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + + hosted-git-info@4.1.0: + resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==} + engines: {node: '>=10'} + + htmlparser2@9.1.0: + resolution: {integrity: sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==} + + http-proxy-agent@7.0.2: + resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} + engines: {node: '>= 14'} + + https-proxy-agent@7.0.5: + resolution: {integrity: sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==} + engines: {node: '>= 14'} + + human-signals@5.0.0: + resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} + engines: {node: '>=16.17.0'} + + iconv-lite@0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} + + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + + import-fresh@3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + ini@1.3.8: + resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + + interpret@1.4.0: + resolution: {integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==} + engines: {node: '>= 0.10'} + + is-core-module@2.15.1: + resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} + engines: {node: '>= 0.4'} + + is-docker@2.2.1: + resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} + engines: {node: '>=8'} + hasBin: true + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + + is-stream@3.0.0: + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + is-wsl@2.2.0: + resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} + engines: {node: '>=8'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + jackspeak@4.0.2: + resolution: {integrity: sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==} + engines: {node: 20 || >=22} + + js-tokens@9.0.0: + resolution: {integrity: sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==} + + js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + jsonc-parser@3.3.1: + resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} + + jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + + jsonschema@1.4.1: + resolution: {integrity: sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ==} + + jsonwebtoken@9.0.2: + resolution: {integrity: sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==} + engines: {node: '>=12', npm: '>=6'} + + jwa@1.4.1: + resolution: {integrity: sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==} + + jwa@2.0.0: + resolution: {integrity: sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==} + + jws@3.2.2: + resolution: {integrity: sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==} + + jws@4.0.0: + resolution: {integrity: sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==} + + keytar@7.9.0: + resolution: {integrity: sha512-VPD8mtVtm5JNtA2AErl6Chp06JBfy7diFQ7TQQhdpWOl6MrCRB+eRbvAZUsbGQS9kiMq0coJsy0W0vHpDCkWsQ==} + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + langium-cli@3.2.0: + resolution: {integrity: sha512-4JWeCMuTHyFO+GCnOVT8+jygdob4KnU0uh/26cMxgZ1FlenAk8zrOnrXbuUzIm0FAIetCqrR6GUXqeko+Vg5og==} + engines: {node: '>=16.0.0'} + hasBin: true + + langium-railroad@3.2.0: + resolution: {integrity: sha512-8wJqRid1udSH9PKo8AkRrJCUNHQ6Xu9tGi+//bLdHGDdlK9gpps1AwO71ufE864/so77K4ZmqBuLnBnxPcGs/Q==} + + langium@3.2.0: + resolution: {integrity: sha512-HxAPgCVC7X+dCN99QKlZMEoaLW4s/mt0IImYrP6ooEBOMh8lJYdFNNSpJ5NIOE+WFwQd3xa2phTJDmJhOWVR7A==} + engines: {node: '>=16.0.0'} + + leven@3.1.0: + resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} + engines: {node: '>=6'} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + linkify-it@5.0.0: + resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} + + local-pkg@0.5.0: + resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} + engines: {node: '>=14'} + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash-es@4.17.21: + resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} + + lodash.includes@4.3.0: + resolution: {integrity: sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==} + + lodash.isboolean@3.0.3: + resolution: {integrity: sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==} + + lodash.isinteger@4.0.4: + resolution: {integrity: sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==} + + lodash.isnumber@3.0.3: + resolution: {integrity: sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==} + + lodash.isplainobject@4.0.6: + resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} + + lodash.isstring@4.0.1: + resolution: {integrity: sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + + lodash.once@4.1.1: + resolution: {integrity: sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==} + + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + + loupe@2.3.7: + resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} + + lru-cache@11.0.1: + resolution: {integrity: sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==} + engines: {node: 20 || >=22} + + lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + + magic-string@0.30.12: + resolution: {integrity: sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==} + + markdown-it@14.1.0: + resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} + hasBin: true + + mdurl@2.0.0: + resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + + merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + + mime@1.6.0: + resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} + engines: {node: '>=4'} + hasBin: true + + mimic-fn@4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} + + mimic-response@3.1.0: + resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} + engines: {node: '>=10'} + + minimatch@10.0.1: + resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} + engines: {node: 20 || >=22} + + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + + minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + + mkdirp-classic@0.5.3: + resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} + + mlly@1.7.2: + resolution: {integrity: sha512-tN3dvVHYVz4DhSXinXIk7u9syPYaJvio118uomkovAtWBT+RdbP6Lfh/5Lvo519YMmwBafwlh20IPTXIStscpA==} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + mute-stream@0.0.8: + resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} + + nanoid@3.3.7: + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + napi-build-utils@1.0.2: + resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + node-abi@3.71.0: + resolution: {integrity: sha512-SZ40vRiy/+wRTf21hxkkEjPJZpARzUMVcJoQse2EF8qkUWbbO2z7vd5oA/H6bVH6SZQ5STGcu0KRDS7biNRfxw==} + engines: {node: '>=10'} + + node-addon-api@4.3.0: + resolution: {integrity: sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==} + + npm-run-path@5.3.0: + resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + nth-check@2.1.1: + resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} + + object-inspect@1.13.2: + resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} + engines: {node: '>= 0.4'} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + onetime@6.0.0: + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} + + open@8.4.2: + resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} + engines: {node: '>=12'} + + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-limit@5.0.0: + resolution: {integrity: sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==} + engines: {node: '>=18'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + parse-semver@1.1.1: + resolution: {integrity: sha512-Eg1OuNntBMH0ojvEKSrvDSnwLmvVuUOSdylH/pSCPNMIspLlweJyIWXCE+k/5hm3cj/EBUYwmWkjhBALNP4LXQ==} + + parse5-htmlparser2-tree-adapter@7.1.0: + resolution: {integrity: sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==} + + parse5-parser-stream@7.1.2: + resolution: {integrity: sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==} + + parse5@7.2.1: + resolution: {integrity: sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-key@4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + path-scurry@2.0.0: + resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} + engines: {node: 20 || >=22} + + path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + + pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + + pathval@1.1.1: + resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + + pend@1.2.0: + resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + + pkg-types@1.2.1: + resolution: {integrity: sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==} + + postcss@8.4.47: + resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} + engines: {node: ^10 || ^12 || >=14} + + prebuild-install@7.1.2: + resolution: {integrity: sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==} + engines: {node: '>=10'} + hasBin: true + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + pretty-format@29.7.0: + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + + pump@3.0.2: + resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} + + punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + qs@6.13.0: + resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} + engines: {node: '>=0.6'} + + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + + railroad-diagrams@1.0.0: + resolution: {integrity: sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==} + + rc@1.2.8: + resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} + hasBin: true + + react-is@18.3.1: + resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} + + read@1.0.7: + resolution: {integrity: sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ==} + engines: {node: '>=0.8'} + + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + + rechoir@0.6.2: + resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} + engines: {node: '>= 0.10'} + + regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + + resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + + reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true + + rollup@4.24.2: + resolution: {integrity: sha512-do/DFGq5g6rdDhdpPq5qb2ecoczeK6y+2UAjdJ5trjQJj5f1AiVdLRWRc9A9/fFukfvJRgM0UXzxBIYMovm5ww==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + + rxjs@7.8.1: + resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + sax@1.4.1: + resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} + + semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} + hasBin: true + + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + engines: {node: '>=10'} + hasBin: true + + set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + shell-quote@1.8.1: + resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} + + shelljs@0.8.5: + resolution: {integrity: sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==} + engines: {node: '>=4'} + hasBin: true + + shx@0.3.4: + resolution: {integrity: sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==} + engines: {node: '>=6'} + hasBin: true + + side-channel@1.0.6: + resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} + engines: {node: '>= 0.4'} + + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + simple-concat@1.0.1: + resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} + + simple-get@4.0.1: + resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} + + slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + spawn-command@0.0.2: + resolution: {integrity: sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==} + + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + + std-env@3.7.0: + resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} + + stoppable@1.1.0: + resolution: {integrity: sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==} + engines: {node: '>=4', npm: '>=6'} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + + strip-final-newline@3.0.0: + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} + + strip-json-comments@2.0.1: + resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} + engines: {node: '>=0.10.0'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + strip-literal@2.1.0: + resolution: {integrity: sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==} + + supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + tar-fs@2.1.1: + resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} + + tar-stream@2.2.0: + resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} + engines: {node: '>=6'} + + text-table@0.2.0: + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + + tinypool@0.8.4: + resolution: {integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==} + engines: {node: '>=14.0.0'} + + tinyspy@2.2.1: + resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==} + engines: {node: '>=14.0.0'} + + tmp@0.2.3: + resolution: {integrity: sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==} + engines: {node: '>=14.14'} + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + + ts-api-utils@1.3.0: + resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + + tslib@2.8.0: + resolution: {integrity: sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==} + + tunnel-agent@0.6.0: + resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} + + tunnel@0.0.6: + resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} + engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + type-detect@4.1.0: + resolution: {integrity: sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==} + engines: {node: '>=4'} + + type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + + typed-rest-client@1.8.11: + resolution: {integrity: sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==} + + typescript@5.4.5: + resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + engines: {node: '>=14.17'} + hasBin: true + + uc.micro@2.1.0: + resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + + ufo@1.5.4: + resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} + + underscore@1.13.7: + resolution: {integrity: sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==} + + undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + + undici@6.20.1: + resolution: {integrity: sha512-AjQF1QsmqfJys+LXfGTNum+qw4S88CojRInG/6t31W/1fk6G59s92bnAvGz5Cmur+kQv2SURXEvvudLmbrE8QA==} + engines: {node: '>=18.17'} + + universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + url-join@4.0.1: + resolution: {integrity: sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==} + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + uuid@8.3.2: + resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} + hasBin: true + + vite-node@1.6.0: + resolution: {integrity: sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + + vite@5.4.10: + resolution: {integrity: sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + + vitest@1.6.0: + resolution: {integrity: sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': 1.6.0 + '@vitest/ui': 1.6.0 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + + vscode-jsonrpc@8.2.0: + resolution: {integrity: sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==} + engines: {node: '>=14.0.0'} + + vscode-languageclient@9.0.1: + resolution: {integrity: sha512-JZiimVdvimEuHh5olxhxkht09m3JzUGwggb5eRUkzzJhZ2KjCN0nh55VfiED9oez9DyF8/fz1g1iBV3h+0Z2EA==} + engines: {vscode: ^1.82.0} + + vscode-languageserver-protocol@3.17.5: + resolution: {integrity: sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==} + + vscode-languageserver-textdocument@1.0.12: + resolution: {integrity: sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==} + + vscode-languageserver-types@3.17.5: + resolution: {integrity: sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==} + + vscode-languageserver@9.0.1: + resolution: {integrity: sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==} + hasBin: true + + vscode-uri@3.0.8: + resolution: {integrity: sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==} + + whatwg-encoding@3.1.1: + resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} + engines: {node: '>=18'} + + whatwg-mimetype@4.0.0: + resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} + engines: {node: '>=18'} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + xml2js@0.5.0: + resolution: {integrity: sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==} + engines: {node: '>=4.0.0'} + + xmlbuilder@11.0.1: + resolution: {integrity: sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==} + engines: {node: '>=4.0'} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + + yauzl@2.10.0: + resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} + + yazl@2.5.1: + resolution: {integrity: sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + + yocto-queue@1.1.1: + resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} + engines: {node: '>=12.20'} + +snapshots: + + '@azure/abort-controller@2.1.2': + dependencies: + tslib: 2.8.0 + + '@azure/core-auth@1.9.0': + dependencies: + '@azure/abort-controller': 2.1.2 + '@azure/core-util': 1.11.0 + tslib: 2.8.0 + + '@azure/core-client@1.9.2': + dependencies: + '@azure/abort-controller': 2.1.2 + '@azure/core-auth': 1.9.0 + '@azure/core-rest-pipeline': 1.17.0 + '@azure/core-tracing': 1.2.0 + '@azure/core-util': 1.11.0 + '@azure/logger': 1.1.4 + tslib: 2.8.0 + transitivePeerDependencies: + - supports-color + + '@azure/core-rest-pipeline@1.17.0': + dependencies: + '@azure/abort-controller': 2.1.2 + '@azure/core-auth': 1.9.0 + '@azure/core-tracing': 1.2.0 + '@azure/core-util': 1.11.0 + '@azure/logger': 1.1.4 + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.5 + tslib: 2.8.0 + transitivePeerDependencies: + - supports-color + + '@azure/core-tracing@1.2.0': + dependencies: + tslib: 2.8.0 + + '@azure/core-util@1.11.0': + dependencies: + '@azure/abort-controller': 2.1.2 + tslib: 2.8.0 + + '@azure/identity@4.5.0': + dependencies: + '@azure/abort-controller': 2.1.2 + '@azure/core-auth': 1.9.0 + '@azure/core-client': 1.9.2 + '@azure/core-rest-pipeline': 1.17.0 + '@azure/core-tracing': 1.2.0 + '@azure/core-util': 1.11.0 + '@azure/logger': 1.1.4 + '@azure/msal-browser': 3.26.1 + '@azure/msal-node': 2.15.0 + events: 3.3.0 + jws: 4.0.0 + open: 8.4.2 + stoppable: 1.1.0 + tslib: 2.8.0 + transitivePeerDependencies: + - supports-color + + '@azure/logger@1.1.4': + dependencies: + tslib: 2.8.0 + + '@azure/msal-browser@3.26.1': + dependencies: + '@azure/msal-common': 14.15.0 + + '@azure/msal-common@14.15.0': {} + + '@azure/msal-node@2.15.0': + dependencies: + '@azure/msal-common': 14.15.0 + jsonwebtoken: 9.0.2 + uuid: 8.3.2 + + '@babel/runtime@7.26.0': + dependencies: + regenerator-runtime: 0.14.1 + + '@chevrotain/cst-dts-gen@11.0.3': + dependencies: + '@chevrotain/gast': 11.0.3 + '@chevrotain/types': 11.0.3 + lodash-es: 4.17.21 + + '@chevrotain/gast@11.0.3': + dependencies: + '@chevrotain/types': 11.0.3 + lodash-es: 4.17.21 + + '@chevrotain/regexp-to-ast@11.0.3': {} + + '@chevrotain/types@11.0.3': {} + + '@chevrotain/utils@11.0.3': {} + + '@esbuild/aix-ppc64@0.21.5': + optional: true + + '@esbuild/android-arm64@0.21.5': + optional: true + + '@esbuild/android-arm@0.21.5': + optional: true + + '@esbuild/android-x64@0.21.5': + optional: true + + '@esbuild/darwin-arm64@0.21.5': + optional: true + + '@esbuild/darwin-x64@0.21.5': + optional: true + + '@esbuild/freebsd-arm64@0.21.5': + optional: true + + '@esbuild/freebsd-x64@0.21.5': + optional: true + + '@esbuild/linux-arm64@0.21.5': + optional: true + + '@esbuild/linux-arm@0.21.5': + optional: true + + '@esbuild/linux-ia32@0.21.5': + optional: true + + '@esbuild/linux-loong64@0.21.5': + optional: true + + '@esbuild/linux-mips64el@0.21.5': + optional: true + + '@esbuild/linux-ppc64@0.21.5': + optional: true + + '@esbuild/linux-riscv64@0.21.5': + optional: true + + '@esbuild/linux-s390x@0.21.5': + optional: true + + '@esbuild/linux-x64@0.21.5': + optional: true + + '@esbuild/netbsd-x64@0.21.5': + optional: true + + '@esbuild/openbsd-x64@0.21.5': + optional: true + + '@esbuild/sunos-x64@0.21.5': + optional: true + + '@esbuild/win32-arm64@0.21.5': + optional: true + + '@esbuild/win32-ia32@0.21.5': + optional: true + + '@esbuild/win32-x64@0.21.5': + optional: true + + '@eslint-community/eslint-utils@4.4.1(eslint@8.57.1)': + dependencies: + eslint: 8.57.1 + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.1': {} + + '@eslint/eslintrc@2.1.4': + dependencies: + ajv: 6.12.6 + debug: 4.3.7 + espree: 9.6.1 + globals: 13.24.0 + ignore: 5.3.2 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@8.57.1': {} + + '@humanwhocodes/config-array@0.13.0': + dependencies: + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.3.7 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/object-schema@2.0.3': {} + + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@jest/schemas@29.6.3': + dependencies: + '@sinclair/typebox': 0.27.8 + + '@jridgewell/sourcemap-codec@1.5.0': {} + + '@nodelib/fs.scandir@2.1.5': + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + + '@nodelib/fs.stat@2.0.5': {} + + '@nodelib/fs.walk@1.2.8': + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.17.1 + + '@rollup/rollup-android-arm-eabi@4.24.2': + optional: true + + '@rollup/rollup-android-arm64@4.24.2': + optional: true + + '@rollup/rollup-darwin-arm64@4.24.2': + optional: true + + '@rollup/rollup-darwin-x64@4.24.2': + optional: true + + '@rollup/rollup-freebsd-arm64@4.24.2': + optional: true + + '@rollup/rollup-freebsd-x64@4.24.2': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.24.2': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.24.2': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.24.2': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.24.2': + optional: true + + '@rollup/rollup-linux-powerpc64le-gnu@4.24.2': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.24.2': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.24.2': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.24.2': + optional: true + + '@rollup/rollup-linux-x64-musl@4.24.2': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.24.2': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.24.2': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.24.2': + optional: true + + '@sinclair/typebox@0.27.8': {} + + '@types/estree@1.0.6': {} + + '@types/node@18.19.60': + dependencies: + undici-types: 5.26.5 + + '@types/vscode@1.67.0': {} + + '@typescript-eslint/eslint-plugin@7.13.1(@typescript-eslint/parser@7.13.1(eslint@8.57.1)(typescript@5.4.5))(eslint@8.57.1)(typescript@5.4.5)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 7.13.1(eslint@8.57.1)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.13.1 + '@typescript-eslint/type-utils': 7.13.1(eslint@8.57.1)(typescript@5.4.5) + '@typescript-eslint/utils': 7.13.1(eslint@8.57.1)(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.13.1 + eslint: 8.57.1 + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + ts-api-utils: 1.3.0(typescript@5.4.5) + optionalDependencies: + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@7.13.1(eslint@8.57.1)(typescript@5.4.5)': + dependencies: + '@typescript-eslint/scope-manager': 7.13.1 + '@typescript-eslint/types': 7.13.1 + '@typescript-eslint/typescript-estree': 7.13.1(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.13.1 + debug: 4.3.7 + eslint: 8.57.1 + optionalDependencies: + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@7.13.1': + dependencies: + '@typescript-eslint/types': 7.13.1 + '@typescript-eslint/visitor-keys': 7.13.1 + + '@typescript-eslint/type-utils@7.13.1(eslint@8.57.1)(typescript@5.4.5)': + dependencies: + '@typescript-eslint/typescript-estree': 7.13.1(typescript@5.4.5) + '@typescript-eslint/utils': 7.13.1(eslint@8.57.1)(typescript@5.4.5) + debug: 4.3.7 + eslint: 8.57.1 + ts-api-utils: 1.3.0(typescript@5.4.5) + optionalDependencies: + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/types@7.13.1': {} + + '@typescript-eslint/typescript-estree@7.13.1(typescript@5.4.5)': + dependencies: + '@typescript-eslint/types': 7.13.1 + '@typescript-eslint/visitor-keys': 7.13.1 + debug: 4.3.7 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.4.5) + optionalDependencies: + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@7.13.1(eslint@8.57.1)(typescript@5.4.5)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) + '@typescript-eslint/scope-manager': 7.13.1 + '@typescript-eslint/types': 7.13.1 + '@typescript-eslint/typescript-estree': 7.13.1(typescript@5.4.5) + eslint: 8.57.1 + transitivePeerDependencies: + - supports-color + - typescript + + '@typescript-eslint/visitor-keys@7.13.1': + dependencies: + '@typescript-eslint/types': 7.13.1 + eslint-visitor-keys: 3.4.3 + + '@ungap/structured-clone@1.2.0': {} + + '@vitest/expect@1.6.0': + dependencies: + '@vitest/spy': 1.6.0 + '@vitest/utils': 1.6.0 + chai: 4.5.0 + + '@vitest/runner@1.6.0': + dependencies: + '@vitest/utils': 1.6.0 + p-limit: 5.0.0 + pathe: 1.1.2 + + '@vitest/snapshot@1.6.0': + dependencies: + magic-string: 0.30.12 + pathe: 1.1.2 + pretty-format: 29.7.0 + + '@vitest/spy@1.6.0': + dependencies: + tinyspy: 2.2.1 + + '@vitest/utils@1.6.0': + dependencies: + diff-sequences: 29.6.3 + estree-walker: 3.0.3 + loupe: 2.3.7 + pretty-format: 29.7.0 + + '@vscode/vsce-sign-alpine-arm64@2.0.2': + optional: true + + '@vscode/vsce-sign-alpine-x64@2.0.2': + optional: true + + '@vscode/vsce-sign-darwin-arm64@2.0.2': + optional: true + + '@vscode/vsce-sign-darwin-x64@2.0.2': + optional: true + + '@vscode/vsce-sign-linux-arm64@2.0.2': + optional: true + + '@vscode/vsce-sign-linux-arm@2.0.2': + optional: true + + '@vscode/vsce-sign-linux-x64@2.0.2': + optional: true + + '@vscode/vsce-sign-win32-arm64@2.0.2': + optional: true + + '@vscode/vsce-sign-win32-x64@2.0.2': + optional: true + + '@vscode/vsce-sign@2.0.5': + optionalDependencies: + '@vscode/vsce-sign-alpine-arm64': 2.0.2 + '@vscode/vsce-sign-alpine-x64': 2.0.2 + '@vscode/vsce-sign-darwin-arm64': 2.0.2 + '@vscode/vsce-sign-darwin-x64': 2.0.2 + '@vscode/vsce-sign-linux-arm': 2.0.2 + '@vscode/vsce-sign-linux-arm64': 2.0.2 + '@vscode/vsce-sign-linux-x64': 2.0.2 + '@vscode/vsce-sign-win32-arm64': 2.0.2 + '@vscode/vsce-sign-win32-x64': 2.0.2 + + '@vscode/vsce@3.2.1': + dependencies: + '@azure/identity': 4.5.0 + '@vscode/vsce-sign': 2.0.5 + azure-devops-node-api: 12.5.0 + chalk: 2.4.2 + cheerio: 1.0.0 + cockatiel: 3.2.1 + commander: 6.2.1 + form-data: 4.0.1 + glob: 11.0.0 + hosted-git-info: 4.1.0 + jsonc-parser: 3.3.1 + leven: 3.1.0 + markdown-it: 14.1.0 + mime: 1.6.0 + minimatch: 3.1.2 + parse-semver: 1.1.1 + read: 1.0.7 + semver: 7.6.3 + tmp: 0.2.3 + typed-rest-client: 1.8.11 + url-join: 4.0.1 + xml2js: 0.5.0 + yauzl: 2.10.0 + yazl: 2.5.1 + optionalDependencies: + keytar: 7.9.0 + transitivePeerDependencies: + - supports-color + + acorn-jsx@5.3.2(acorn@8.14.0): + dependencies: + acorn: 8.14.0 + + acorn-walk@8.3.4: + dependencies: + acorn: 8.14.0 + + acorn@8.14.0: {} + + agent-base@7.1.1: + dependencies: + debug: 4.3.7 + transitivePeerDependencies: + - supports-color + + ajv@6.12.6: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + + ansi-regex@5.0.1: {} + + ansi-regex@6.1.0: {} + + ansi-styles@3.2.1: + dependencies: + color-convert: 1.9.3 + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + ansi-styles@5.2.0: {} + + ansi-styles@6.2.1: {} + + argparse@2.0.1: {} + + array-union@2.1.0: {} + + assertion-error@1.1.0: {} + + asynckit@0.4.0: {} + + azure-devops-node-api@12.5.0: + dependencies: + tunnel: 0.0.6 + typed-rest-client: 1.8.11 + + balanced-match@1.0.2: {} + + base64-js@1.5.1: + optional: true + + bl@4.1.0: + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + optional: true + + boolbase@1.0.0: {} + + brace-expansion@1.1.11: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + + brace-expansion@2.0.1: + dependencies: + balanced-match: 1.0.2 + + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + + buffer-crc32@0.2.13: {} + + buffer-equal-constant-time@1.0.1: {} + + buffer@5.7.1: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + optional: true + + cac@6.7.14: {} + + call-bind@1.0.7: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + set-function-length: 1.2.2 + + callsites@3.1.0: {} + + chai@4.5.0: + dependencies: + assertion-error: 1.1.0 + check-error: 1.0.3 + deep-eql: 4.1.4 + get-func-name: 2.0.2 + loupe: 2.3.7 + pathval: 1.1.1 + type-detect: 4.1.0 + + chalk@2.4.2: + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chalk@5.3.0: {} + + check-error@1.0.3: + dependencies: + get-func-name: 2.0.2 + + cheerio-select@2.1.0: + dependencies: + boolbase: 1.0.0 + css-select: 5.1.0 + css-what: 6.1.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.1.0 + + cheerio@1.0.0: + dependencies: + cheerio-select: 2.1.0 + dom-serializer: 2.0.0 + domhandler: 5.0.3 + domutils: 3.1.0 + encoding-sniffer: 0.2.0 + htmlparser2: 9.1.0 + parse5: 7.2.1 + parse5-htmlparser2-tree-adapter: 7.1.0 + parse5-parser-stream: 7.1.2 + undici: 6.20.1 + whatwg-mimetype: 4.0.0 + + chevrotain-allstar@0.3.1(chevrotain@11.0.3): + dependencies: + chevrotain: 11.0.3 + lodash-es: 4.17.21 + + chevrotain@11.0.3: + dependencies: + '@chevrotain/cst-dts-gen': 11.0.3 + '@chevrotain/gast': 11.0.3 + '@chevrotain/regexp-to-ast': 11.0.3 + '@chevrotain/types': 11.0.3 + '@chevrotain/utils': 11.0.3 + lodash-es: 4.17.21 + + chownr@1.1.4: + optional: true + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + cockatiel@3.2.1: {} + + color-convert@1.9.3: + dependencies: + color-name: 1.1.3 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.3: {} + + color-name@1.1.4: {} + + combined-stream@1.0.8: + dependencies: + delayed-stream: 1.0.0 + + commander@11.0.0: {} + + commander@6.2.1: {} + + concat-map@0.0.1: {} + + concurrently@8.2.2: + dependencies: + chalk: 4.1.2 + date-fns: 2.30.0 + lodash: 4.17.21 + rxjs: 7.8.1 + shell-quote: 1.8.1 + spawn-command: 0.0.2 + supports-color: 8.1.1 + tree-kill: 1.2.2 + yargs: 17.7.2 + + confbox@0.1.8: {} + + cross-spawn@7.0.3: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + css-select@5.1.0: + dependencies: + boolbase: 1.0.0 + css-what: 6.1.0 + domhandler: 5.0.3 + domutils: 3.1.0 + nth-check: 2.1.1 + + css-what@6.1.0: {} + + date-fns@2.30.0: + dependencies: + '@babel/runtime': 7.26.0 + + debug@4.3.7: + dependencies: + ms: 2.1.3 + + decompress-response@6.0.0: + dependencies: + mimic-response: 3.1.0 + optional: true + + deep-eql@4.1.4: + dependencies: + type-detect: 4.1.0 + + deep-extend@0.6.0: + optional: true + + deep-is@0.1.4: {} + + deepmerge@1.5.2: {} + + define-data-property@1.1.4: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + gopd: 1.0.1 + + define-lazy-prop@2.0.0: {} + + delayed-stream@1.0.0: {} + + detect-libc@2.0.3: + optional: true + + diff-sequences@29.6.3: {} + + dir-glob@3.0.1: + dependencies: + path-type: 4.0.0 + + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + + dom-serializer@2.0.0: + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + entities: 4.5.0 + + domelementtype@2.3.0: {} + + domhandler@5.0.3: + dependencies: + domelementtype: 2.3.0 + + domutils@3.1.0: + dependencies: + dom-serializer: 2.0.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 + + eastasianwidth@0.2.0: {} + + ecdsa-sig-formatter@1.0.11: + dependencies: + safe-buffer: 5.2.1 + + emoji-regex@8.0.0: {} + + emoji-regex@9.2.2: {} + + encoding-sniffer@0.2.0: + dependencies: + iconv-lite: 0.6.3 + whatwg-encoding: 3.1.1 + + end-of-stream@1.4.4: + dependencies: + once: 1.4.0 + optional: true + + entities@4.5.0: {} + + es-define-property@1.0.0: + dependencies: + get-intrinsic: 1.2.4 + + es-errors@1.3.0: {} + + esbuild@0.21.5: + optionalDependencies: + '@esbuild/aix-ppc64': 0.21.5 + '@esbuild/android-arm': 0.21.5 + '@esbuild/android-arm64': 0.21.5 + '@esbuild/android-x64': 0.21.5 + '@esbuild/darwin-arm64': 0.21.5 + '@esbuild/darwin-x64': 0.21.5 + '@esbuild/freebsd-arm64': 0.21.5 + '@esbuild/freebsd-x64': 0.21.5 + '@esbuild/linux-arm': 0.21.5 + '@esbuild/linux-arm64': 0.21.5 + '@esbuild/linux-ia32': 0.21.5 + '@esbuild/linux-loong64': 0.21.5 + '@esbuild/linux-mips64el': 0.21.5 + '@esbuild/linux-ppc64': 0.21.5 + '@esbuild/linux-riscv64': 0.21.5 + '@esbuild/linux-s390x': 0.21.5 + '@esbuild/linux-x64': 0.21.5 + '@esbuild/netbsd-x64': 0.21.5 + '@esbuild/openbsd-x64': 0.21.5 + '@esbuild/sunos-x64': 0.21.5 + '@esbuild/win32-arm64': 0.21.5 + '@esbuild/win32-ia32': 0.21.5 + '@esbuild/win32-x64': 0.21.5 + + escalade@3.2.0: {} + + escape-string-regexp@1.0.5: {} + + escape-string-regexp@4.0.0: {} + + eslint-scope@7.2.2: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint@8.57.1: + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) + '@eslint-community/regexpp': 4.12.1 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.57.1 + '@humanwhocodes/config-array': 0.13.0 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.3 + debug: 4.3.7 + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.6.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.4 + strip-ansi: 6.0.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + + espree@9.6.1: + dependencies: + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) + eslint-visitor-keys: 3.4.3 + + esquery@1.6.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.6 + + esutils@2.0.3: {} + + events@3.3.0: {} + + execa@8.0.1: + dependencies: + cross-spawn: 7.0.3 + get-stream: 8.0.1 + human-signals: 5.0.0 + is-stream: 3.0.0 + merge-stream: 2.0.0 + npm-run-path: 5.3.0 + onetime: 6.0.0 + signal-exit: 4.1.0 + strip-final-newline: 3.0.0 + + expand-template@2.0.3: + optional: true + + fast-deep-equal@3.1.3: {} + + fast-glob@3.3.2: + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 + + fast-json-stable-stringify@2.1.0: {} + + fast-levenshtein@2.0.6: {} + + fastq@1.17.1: + dependencies: + reusify: 1.0.4 + + fd-slicer@1.1.0: + dependencies: + pend: 1.2.0 + + file-entry-cache@6.0.1: + dependencies: + flat-cache: 3.2.0 + + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat-cache@3.2.0: + dependencies: + flatted: 3.3.1 + keyv: 4.5.4 + rimraf: 3.0.2 + + flatted@3.3.1: {} + + foreground-child@3.3.0: + dependencies: + cross-spawn: 7.0.3 + signal-exit: 4.1.0 + + form-data@4.0.1: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + mime-types: 2.1.35 + + fs-constants@1.0.0: + optional: true + + fs-extra@11.1.1: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + + fs.realpath@1.0.0: {} + + fsevents@2.3.3: + optional: true + + function-bind@1.1.2: {} + + get-caller-file@2.0.5: {} + + get-func-name@2.0.2: {} + + get-intrinsic@1.2.4: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + hasown: 2.0.2 + + get-stream@8.0.1: {} + + github-from-package@0.0.0: + optional: true + + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 + + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + + glob@11.0.0: + dependencies: + foreground-child: 3.3.0 + jackspeak: 4.0.2 + minimatch: 10.0.1 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 2.0.0 + + glob@7.2.3: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + + globals@13.24.0: + dependencies: + type-fest: 0.20.2 + + globby@11.1.0: + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.2 + ignore: 5.3.2 + merge2: 1.4.1 + slash: 3.0.0 + + gopd@1.0.1: + dependencies: + get-intrinsic: 1.2.4 + + graceful-fs@4.2.11: {} + + graphemer@1.4.0: {} + + has-flag@3.0.0: {} + + has-flag@4.0.0: {} + + has-property-descriptors@1.0.2: + dependencies: + es-define-property: 1.0.0 + + has-proto@1.0.3: {} + + has-symbols@1.0.3: {} + + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + + hosted-git-info@4.1.0: + dependencies: + lru-cache: 6.0.0 + + htmlparser2@9.1.0: + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.1.0 + entities: 4.5.0 + + http-proxy-agent@7.0.2: + dependencies: + agent-base: 7.1.1 + debug: 4.3.7 + transitivePeerDependencies: + - supports-color + + https-proxy-agent@7.0.5: + dependencies: + agent-base: 7.1.1 + debug: 4.3.7 + transitivePeerDependencies: + - supports-color + + human-signals@5.0.0: {} + + iconv-lite@0.6.3: + dependencies: + safer-buffer: 2.1.2 + + ieee754@1.2.1: + optional: true + + ignore@5.3.2: {} + + import-fresh@3.3.0: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + + imurmurhash@0.1.4: {} + + inflight@1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + + inherits@2.0.4: {} + + ini@1.3.8: + optional: true + + interpret@1.4.0: {} + + is-core-module@2.15.1: + dependencies: + hasown: 2.0.2 + + is-docker@2.2.1: {} + + is-extglob@2.1.1: {} + + is-fullwidth-code-point@3.0.0: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-number@7.0.0: {} + + is-path-inside@3.0.3: {} + + is-stream@3.0.0: {} + + is-wsl@2.2.0: + dependencies: + is-docker: 2.2.1 + + isexe@2.0.0: {} + + jackspeak@4.0.2: + dependencies: + '@isaacs/cliui': 8.0.2 + + js-tokens@9.0.0: {} + + js-yaml@4.1.0: + dependencies: + argparse: 2.0.1 + + json-buffer@3.0.1: {} + + json-schema-traverse@0.4.1: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + + jsonc-parser@3.3.1: {} + + jsonfile@6.1.0: + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + + jsonschema@1.4.1: {} + + jsonwebtoken@9.0.2: + dependencies: + jws: 3.2.2 + lodash.includes: 4.3.0 + lodash.isboolean: 3.0.3 + lodash.isinteger: 4.0.4 + lodash.isnumber: 3.0.3 + lodash.isplainobject: 4.0.6 + lodash.isstring: 4.0.1 + lodash.once: 4.1.1 + ms: 2.1.3 + semver: 7.6.3 + + jwa@1.4.1: + dependencies: + buffer-equal-constant-time: 1.0.1 + ecdsa-sig-formatter: 1.0.11 + safe-buffer: 5.2.1 + + jwa@2.0.0: + dependencies: + buffer-equal-constant-time: 1.0.1 + ecdsa-sig-formatter: 1.0.11 + safe-buffer: 5.2.1 + + jws@3.2.2: + dependencies: + jwa: 1.4.1 + safe-buffer: 5.2.1 + + jws@4.0.0: + dependencies: + jwa: 2.0.0 + safe-buffer: 5.2.1 + + keytar@7.9.0: + dependencies: + node-addon-api: 4.3.0 + prebuild-install: 7.1.2 + optional: true + + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + + langium-cli@3.2.0: + dependencies: + chalk: 5.3.0 + commander: 11.0.0 + fs-extra: 11.1.1 + jsonschema: 1.4.1 + langium: 3.2.0 + langium-railroad: 3.2.0 + lodash: 4.17.21 + + langium-railroad@3.2.0: + dependencies: + langium: 3.2.0 + railroad-diagrams: 1.0.0 + + langium@3.2.0: + dependencies: + chevrotain: 11.0.3 + chevrotain-allstar: 0.3.1(chevrotain@11.0.3) + vscode-languageserver: 9.0.1 + vscode-languageserver-textdocument: 1.0.12 + vscode-uri: 3.0.8 + + leven@3.1.0: {} + + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + + linkify-it@5.0.0: + dependencies: + uc.micro: 2.1.0 + + local-pkg@0.5.0: + dependencies: + mlly: 1.7.2 + pkg-types: 1.2.1 + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + lodash-es@4.17.21: {} + + lodash.includes@4.3.0: {} + + lodash.isboolean@3.0.3: {} + + lodash.isinteger@4.0.4: {} + + lodash.isnumber@3.0.3: {} + + lodash.isplainobject@4.0.6: {} + + lodash.isstring@4.0.1: {} + + lodash.merge@4.6.2: {} + + lodash.once@4.1.1: {} + + lodash@4.17.21: {} + + loupe@2.3.7: + dependencies: + get-func-name: 2.0.2 + + lru-cache@11.0.1: {} + + lru-cache@6.0.0: + dependencies: + yallist: 4.0.0 + + magic-string@0.30.12: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + + markdown-it@14.1.0: + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.0 + mdurl: 2.0.0 + punycode.js: 2.3.1 + uc.micro: 2.1.0 + + mdurl@2.0.0: {} + + merge-stream@2.0.0: {} + + merge2@1.4.1: {} + + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + + mime-db@1.52.0: {} + + mime-types@2.1.35: + dependencies: + mime-db: 1.52.0 + + mime@1.6.0: {} + + mimic-fn@4.0.0: {} + + mimic-response@3.1.0: + optional: true + + minimatch@10.0.1: + dependencies: + brace-expansion: 2.0.1 + + minimatch@3.1.2: + dependencies: + brace-expansion: 1.1.11 + + minimatch@5.1.6: + dependencies: + brace-expansion: 2.0.1 + + minimatch@9.0.5: + dependencies: + brace-expansion: 2.0.1 + + minimist@1.2.8: {} + + minipass@7.1.2: {} + + mkdirp-classic@0.5.3: + optional: true + + mlly@1.7.2: + dependencies: + acorn: 8.14.0 + pathe: 1.1.2 + pkg-types: 1.2.1 + ufo: 1.5.4 + + ms@2.1.3: {} + + mute-stream@0.0.8: {} + + nanoid@3.3.7: {} + + napi-build-utils@1.0.2: + optional: true + + natural-compare@1.4.0: {} + + node-abi@3.71.0: + dependencies: + semver: 7.6.3 + optional: true + + node-addon-api@4.3.0: + optional: true + + npm-run-path@5.3.0: + dependencies: + path-key: 4.0.0 + + nth-check@2.1.1: + dependencies: + boolbase: 1.0.0 + + object-inspect@1.13.2: {} + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + onetime@6.0.0: + dependencies: + mimic-fn: 4.0.0 + + open@8.4.2: + dependencies: + define-lazy-prop: 2.0.0 + is-docker: 2.2.1 + is-wsl: 2.2.0 + + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-limit@5.0.0: + dependencies: + yocto-queue: 1.1.1 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + package-json-from-dist@1.0.1: {} + + parent-module@1.0.1: + dependencies: + callsites: 3.1.0 + + parse-semver@1.1.1: + dependencies: + semver: 5.7.2 + + parse5-htmlparser2-tree-adapter@7.1.0: + dependencies: + domhandler: 5.0.3 + parse5: 7.2.1 + + parse5-parser-stream@7.1.2: + dependencies: + parse5: 7.2.1 + + parse5@7.2.1: + dependencies: + entities: 4.5.0 + + path-exists@4.0.0: {} + + path-is-absolute@1.0.1: {} + + path-key@3.1.1: {} + + path-key@4.0.0: {} + + path-parse@1.0.7: {} + + path-scurry@2.0.0: + dependencies: + lru-cache: 11.0.1 + minipass: 7.1.2 + + path-type@4.0.0: {} + + pathe@1.1.2: {} + + pathval@1.1.1: {} + + pend@1.2.0: {} + + picocolors@1.1.1: {} + + picomatch@2.3.1: {} + + pkg-types@1.2.1: + dependencies: + confbox: 0.1.8 + mlly: 1.7.2 + pathe: 1.1.2 + + postcss@8.4.47: + dependencies: + nanoid: 3.3.7 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + prebuild-install@7.1.2: + dependencies: + detect-libc: 2.0.3 + expand-template: 2.0.3 + github-from-package: 0.0.0 + minimist: 1.2.8 + mkdirp-classic: 0.5.3 + napi-build-utils: 1.0.2 + node-abi: 3.71.0 + pump: 3.0.2 + rc: 1.2.8 + simple-get: 4.0.1 + tar-fs: 2.1.1 + tunnel-agent: 0.6.0 + optional: true + + prelude-ls@1.2.1: {} + + pretty-format@29.7.0: + dependencies: + '@jest/schemas': 29.6.3 + ansi-styles: 5.2.0 + react-is: 18.3.1 + + pump@3.0.2: + dependencies: + end-of-stream: 1.4.4 + once: 1.4.0 + optional: true + + punycode.js@2.3.1: {} + + punycode@2.3.1: {} + + qs@6.13.0: + dependencies: + side-channel: 1.0.6 + + queue-microtask@1.2.3: {} + + railroad-diagrams@1.0.0: {} + + rc@1.2.8: + dependencies: + deep-extend: 0.6.0 + ini: 1.3.8 + minimist: 1.2.8 + strip-json-comments: 2.0.1 + optional: true + + react-is@18.3.1: {} + + read@1.0.7: + dependencies: + mute-stream: 0.0.8 + + readable-stream@3.6.2: + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + optional: true + + rechoir@0.6.2: + dependencies: + resolve: 1.22.8 + + regenerator-runtime@0.14.1: {} + + require-directory@2.1.1: {} + + resolve-from@4.0.0: {} + + resolve@1.22.8: + dependencies: + is-core-module: 2.15.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + + reusify@1.0.4: {} + + rimraf@3.0.2: + dependencies: + glob: 7.2.3 + + rollup@4.24.2: + dependencies: + '@types/estree': 1.0.6 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.24.2 + '@rollup/rollup-android-arm64': 4.24.2 + '@rollup/rollup-darwin-arm64': 4.24.2 + '@rollup/rollup-darwin-x64': 4.24.2 + '@rollup/rollup-freebsd-arm64': 4.24.2 + '@rollup/rollup-freebsd-x64': 4.24.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.24.2 + '@rollup/rollup-linux-arm-musleabihf': 4.24.2 + '@rollup/rollup-linux-arm64-gnu': 4.24.2 + '@rollup/rollup-linux-arm64-musl': 4.24.2 + '@rollup/rollup-linux-powerpc64le-gnu': 4.24.2 + '@rollup/rollup-linux-riscv64-gnu': 4.24.2 + '@rollup/rollup-linux-s390x-gnu': 4.24.2 + '@rollup/rollup-linux-x64-gnu': 4.24.2 + '@rollup/rollup-linux-x64-musl': 4.24.2 + '@rollup/rollup-win32-arm64-msvc': 4.24.2 + '@rollup/rollup-win32-ia32-msvc': 4.24.2 + '@rollup/rollup-win32-x64-msvc': 4.24.2 + fsevents: 2.3.3 + + run-parallel@1.2.0: + dependencies: + queue-microtask: 1.2.3 + + rxjs@7.8.1: + dependencies: + tslib: 2.8.0 + + safe-buffer@5.2.1: {} + + safer-buffer@2.1.2: {} + + sax@1.4.1: {} + + semver@5.7.2: {} + + semver@7.6.3: {} + + set-function-length@1.2.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + shell-quote@1.8.1: {} + + shelljs@0.8.5: + dependencies: + glob: 7.2.3 + interpret: 1.4.0 + rechoir: 0.6.2 + + shx@0.3.4: + dependencies: + minimist: 1.2.8 + shelljs: 0.8.5 + + side-channel@1.0.6: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + object-inspect: 1.13.2 + + siginfo@2.0.0: {} + + signal-exit@4.1.0: {} + + simple-concat@1.0.1: + optional: true + + simple-get@4.0.1: + dependencies: + decompress-response: 6.0.0 + once: 1.4.0 + simple-concat: 1.0.1 + optional: true + + slash@3.0.0: {} + + source-map-js@1.2.1: {} + + spawn-command@0.0.2: {} + + stackback@0.0.2: {} + + std-env@3.7.0: {} + + stoppable@1.1.0: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + + string_decoder@1.3.0: + dependencies: + safe-buffer: 5.2.1 + optional: true + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-ansi@7.1.0: + dependencies: + ansi-regex: 6.1.0 + + strip-final-newline@3.0.0: {} + + strip-json-comments@2.0.1: + optional: true + + strip-json-comments@3.1.1: {} + + strip-literal@2.1.0: + dependencies: + js-tokens: 9.0.0 + + supports-color@5.5.0: + dependencies: + has-flag: 3.0.0 + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + supports-color@8.1.1: + dependencies: + has-flag: 4.0.0 + + supports-preserve-symlinks-flag@1.0.0: {} + + tar-fs@2.1.1: + dependencies: + chownr: 1.1.4 + mkdirp-classic: 0.5.3 + pump: 3.0.2 + tar-stream: 2.2.0 + optional: true + + tar-stream@2.2.0: + dependencies: + bl: 4.1.0 + end-of-stream: 1.4.4 + fs-constants: 1.0.0 + inherits: 2.0.4 + readable-stream: 3.6.2 + optional: true + + text-table@0.2.0: {} + + tinybench@2.9.0: {} + + tinypool@0.8.4: {} + + tinyspy@2.2.1: {} + + tmp@0.2.3: {} + + to-regex-range@5.0.1: + dependencies: + is-number: 7.0.0 + + tree-kill@1.2.2: {} + + ts-api-utils@1.3.0(typescript@5.4.5): + dependencies: + typescript: 5.4.5 + + tslib@2.8.0: {} + + tunnel-agent@0.6.0: + dependencies: + safe-buffer: 5.2.1 + optional: true + + tunnel@0.0.6: {} + + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + + type-detect@4.1.0: {} + + type-fest@0.20.2: {} + + typed-rest-client@1.8.11: + dependencies: + qs: 6.13.0 + tunnel: 0.0.6 + underscore: 1.13.7 + + typescript@5.4.5: {} + + uc.micro@2.1.0: {} + + ufo@1.5.4: {} + + underscore@1.13.7: {} + + undici-types@5.26.5: {} + + undici@6.20.1: {} + + universalify@2.0.1: {} + + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + + url-join@4.0.1: {} + + util-deprecate@1.0.2: + optional: true + + uuid@8.3.2: {} + + vite-node@1.6.0(@types/node@18.19.60): + dependencies: + cac: 6.7.14 + debug: 4.3.7 + pathe: 1.1.2 + picocolors: 1.1.1 + vite: 5.4.10(@types/node@18.19.60) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + + vite@5.4.10(@types/node@18.19.60): + dependencies: + esbuild: 0.21.5 + postcss: 8.4.47 + rollup: 4.24.2 + optionalDependencies: + '@types/node': 18.19.60 + fsevents: 2.3.3 + + vitest@1.6.0(@types/node@18.19.60): + dependencies: + '@vitest/expect': 1.6.0 + '@vitest/runner': 1.6.0 + '@vitest/snapshot': 1.6.0 + '@vitest/spy': 1.6.0 + '@vitest/utils': 1.6.0 + acorn-walk: 8.3.4 + chai: 4.5.0 + debug: 4.3.7 + execa: 8.0.1 + local-pkg: 0.5.0 + magic-string: 0.30.12 + pathe: 1.1.2 + picocolors: 1.1.1 + std-env: 3.7.0 + strip-literal: 2.1.0 + tinybench: 2.9.0 + tinypool: 0.8.4 + vite: 5.4.10(@types/node@18.19.60) + vite-node: 1.6.0(@types/node@18.19.60) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 18.19.60 + transitivePeerDependencies: + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + + vscode-jsonrpc@8.2.0: {} + + vscode-languageclient@9.0.1: + dependencies: + minimatch: 5.1.6 + semver: 7.6.3 + vscode-languageserver-protocol: 3.17.5 + + vscode-languageserver-protocol@3.17.5: + dependencies: + vscode-jsonrpc: 8.2.0 + vscode-languageserver-types: 3.17.5 + + vscode-languageserver-textdocument@1.0.12: {} + + vscode-languageserver-types@3.17.5: {} + + vscode-languageserver@9.0.1: + dependencies: + vscode-languageserver-protocol: 3.17.5 + + vscode-uri@3.0.8: {} + + whatwg-encoding@3.1.1: + dependencies: + iconv-lite: 0.6.3 + + whatwg-mimetype@4.0.0: {} + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + + word-wrap@1.2.5: {} + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + + wrappy@1.0.2: {} + + xml2js@0.5.0: + dependencies: + sax: 1.4.1 + xmlbuilder: 11.0.1 + + xmlbuilder@11.0.1: {} + + y18n@5.0.8: {} + + yallist@4.0.0: {} + + yargs-parser@21.1.1: {} + + yargs@17.7.2: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + yauzl@2.10.0: + dependencies: + buffer-crc32: 0.2.13 + fd-slicer: 1.1.0 + + yazl@2.5.1: + dependencies: + buffer-crc32: 0.2.13 + + yocto-queue@0.1.0: {} + + yocto-queue@1.1.1: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..18ec407 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +packages: + - 'packages/*' diff --git a/scripts/merge-tmlanguage.mjs b/scripts/merge-tmlanguage.mjs new file mode 100644 index 0000000..fb2cf3a --- /dev/null +++ b/scripts/merge-tmlanguage.mjs @@ -0,0 +1,83 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +import * as fs from 'fs/promises'; + +import { createLangiumGrammarServices } from 'langium/grammar'; +import { NodeFileSystem } from 'langium/node'; +import { parseHelper } from 'langium/test'; +import { AstUtils, GrammarAST, RegExpUtils } from 'langium'; +import { readFileSync } from 'fs'; + +const services = createLangiumGrammarServices({ + fileSystemProvider: NodeFileSystem.fileSystemProvider +}); +const parse = parseHelper(services.grammar); + +const file = readFileSync('./packages/language/src/pli.langium', 'utf8'); +const grammar = await parse(file); +const keywords = AstUtils.streamAst(grammar.parseResult.value) + .filter(GrammarAST.isKeyword) + .map(e => e.value) + .filter(e => /\w/.test(e)); + +const manual = JSON.parse(await fs.readFile('./packages/extension/syntaxes/pli.manual.json', 'utf8')); + +const controlKeywords = [ + 'if', + 'else', + 'then', + 'do', + 'end', + 'on', + 'while', + 'next', + 'go', + 'to', + 'goto', + 'return', + 'when', + 'begin' +]; + +const storageKeywords = keywords.exclude(controlKeywords).toArray(); + +function toPattern(keywords) { + const patterns = []; + for (const keyword of keywords) { + let keywordPattern = ''; + for (const char of keyword) { + if (char.toUpperCase() !== char.toLowerCase()) { + keywordPattern += `[${char.toUpperCase()}${char.toLowerCase()}]`; + } else { + keywordPattern += RegExpUtils.escapeRegExp(char); + } + } + patterns.push(keywordPattern); + } + return `\\b(${patterns.join('|')})\\b`; +} + +const controlPattern = toPattern(controlKeywords); +const storagePattern = toPattern(storageKeywords); + +manual.patterns.unshift({ + name: 'keyword.control.pli', + match: controlPattern +}); + +manual.patterns.unshift({ + name: 'keyword.storage.pli', + match: storagePattern +}); + +const json = JSON.stringify(manual, null, 2); +await fs.writeFile('./packages/extension/syntaxes/pli.merged.json', json); diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..7f2f9fe --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,14 @@ +{ + "files": [], + "references": [ + { + "path": "./packages/language/tsconfig.src.json" + }, + { + "path": "./packages/language/tsconfig.test.json" + }, + { + "path": "./packages/extension/tsconfig.json" + } + ] +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..a423856 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "target": "ES2020", + "module": "ES2022", + "moduleResolution": "Bundler", + "lib": ["ES2022"], + "sourceMap": true, + "strict": true, + "noUnusedLocals": true, + "noImplicitReturns": true, + "noImplicitOverride": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "declaration": true, + "composite": true + }, + "include": [ + "**/src/**/*", + "**/test/**/*" + ], + "exclude": [ + "**/lib/**/*", + "**/out/**/*", + "**/node_modules/**/*" + ] +} diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 0000000..c972344 --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,25 @@ +/** + * This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v2.0 which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-v20.html + * + * SPDX-License-Identifier: EPL-2.0 + * + * Copyright Contributors to the Zowe Project. + * + */ + +/* + * For a detailed explanation regarding each configuration property and type check, visit: + * https://vitest.dev/config/ + */ +import { defineConfig } from 'vitest/config'; + +export default defineConfig({ + test: { + deps: { + interopDefault: true + }, + include: ['packages/**/test/**/*.test.ts'] + } +});