Generate typed QX bindings and add source editing tools
This commit is contained in:
@@ -42,6 +42,12 @@ Generics, interface composition, declarative forwarding, automatic
|
|||||||
relationship materialization, and first-class bundles are intentionally absent
|
relationship materialization, and first-class bundles are intentionally absent
|
||||||
from v1.
|
from v1.
|
||||||
|
|
||||||
|
Local workspace fragments, source-editing APIs, and generated package contracts
|
||||||
|
are documented in [QX bindings and tooling](../docs/QX_BINDINGS_AND_TOOLING.md).
|
||||||
|
`quixos-resource-compile --schema-out` exports the portable generator input;
|
||||||
|
`quixos-codegen-ts` is the first backend. `quixos-qx` provides parse, lint,
|
||||||
|
format, and nominal-atom scaffold commands.
|
||||||
|
|
||||||
## Repository locks
|
## Repository locks
|
||||||
|
|
||||||
Every workspace, interface, and package repository carries a `quixos.lock`.
|
Every workspace, interface, and package repository carries a `quixos.lock`.
|
||||||
|
|||||||
@@ -46,6 +46,8 @@
|
|||||||
esbuild dist/src/resource-lock/cli.js \
|
esbuild dist/src/resource-lock/cli.js \
|
||||||
--bundle --platform=node --target=node24 --format=esm \
|
--bundle --platform=node --target=node24 --format=esm \
|
||||||
--outfile=quixos-lock-check.mjs
|
--outfile=quixos-lock-check.mjs
|
||||||
|
esbuild dist/src/bindings/cli.js --bundle --platform=node --target=node24 --format=esm --outfile=quixos-codegen-ts.mjs
|
||||||
|
esbuild dist/src/capability-language/tool-cli.js --bundle --platform=node --target=node24 --format=esm --outfile=quixos-qx.mjs
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
@@ -62,6 +64,10 @@
|
|||||||
cp --reflink=auto --recursive dist "$out/dist"
|
cp --reflink=auto --recursive dist "$out/dist"
|
||||||
cp package.json "$out/package.json"
|
cp package.json "$out/package.json"
|
||||||
mkdir -p "$out/bin"
|
mkdir -p "$out/bin"
|
||||||
|
for tool in quixos-codegen-ts quixos-qx; do
|
||||||
|
printf '#!/bin/sh\nexec ${pkgs.nodejs_24}/bin/node "%s/libexec/quixos-protocol/%s.mjs" "$@"\n' "$out" "$tool" > "$out/bin/$tool"
|
||||||
|
chmod +x "$out/bin/$tool"
|
||||||
|
done
|
||||||
cat > "$out/bin/quixos-descriptor-check" <<EOF
|
cat > "$out/bin/quixos-descriptor-check" <<EOF
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
export PATH="${pkgs.protobuf}/bin:\$PATH"
|
export PATH="${pkgs.protobuf}/bin:\$PATH"
|
||||||
@@ -90,6 +96,7 @@ exec ${pkgs.nodejs_24}/bin/node "$out/libexec/quixos-protocol/quixos-lock-check.
|
|||||||
EOF
|
EOF
|
||||||
chmod +x "$out/bin/quixos-lock-check"
|
chmod +x "$out/bin/quixos-lock-check"
|
||||||
mkdir -p "$out/libexec/quixos-protocol"
|
mkdir -p "$out/libexec/quixos-protocol"
|
||||||
|
install -m644 quixos-codegen-ts.mjs quixos-qx.mjs "$out/libexec/quixos-protocol/"
|
||||||
install -m644 quixos-descriptor-check.mjs "$out/libexec/quixos-protocol/quixos-descriptor-check.mjs"
|
install -m644 quixos-descriptor-check.mjs "$out/libexec/quixos-protocol/quixos-descriptor-check.mjs"
|
||||||
install -m644 quixos-capability-compile.mjs "$out/libexec/quixos-protocol/quixos-capability-compile.mjs"
|
install -m644 quixos-capability-compile.mjs "$out/libexec/quixos-protocol/quixos-capability-compile.mjs"
|
||||||
install -m644 quixos-workspace-compile.mjs "$out/libexec/quixos-protocol/quixos-workspace-compile.mjs"
|
install -m644 quixos-workspace-compile.mjs "$out/libexec/quixos-protocol/quixos-workspace-compile.mjs"
|
||||||
|
|||||||
@@ -4,6 +4,15 @@ document
|
|||||||
: workspaceDecl EOF
|
: workspaceDecl EOF
|
||||||
| interfaceResourceDecl EOF
|
| interfaceResourceDecl EOF
|
||||||
| packageResourceDecl EOF
|
| packageResourceDecl EOF
|
||||||
|
| fragmentDecl EOF
|
||||||
|
;
|
||||||
|
|
||||||
|
fragmentDecl
|
||||||
|
: FRAGMENT LBRACE workspaceItem* RBRACE
|
||||||
|
;
|
||||||
|
|
||||||
|
sourceImportDecl
|
||||||
|
: IMPORT stringLiteral SEMI
|
||||||
;
|
;
|
||||||
|
|
||||||
workspaceDecl
|
workspaceDecl
|
||||||
@@ -12,7 +21,8 @@ workspaceDecl
|
|||||||
;
|
;
|
||||||
|
|
||||||
workspaceItem
|
workspaceItem
|
||||||
: atomDecl
|
: sourceImportDecl
|
||||||
|
| atomDecl
|
||||||
| resourceImportDecl
|
| resourceImportDecl
|
||||||
| sharedAttachmentDecl
|
| sharedAttachmentDecl
|
||||||
| conformanceDecl
|
| conformanceDecl
|
||||||
@@ -142,7 +152,7 @@ dependencyPort
|
|||||||
: STATE identifier ID stringLiteral COLON valueType primitiveList SEMI
|
: STATE identifier ID stringLiteral COLON valueType primitiveList SEMI
|
||||||
| EDGE identifier ID stringLiteral COLON cardinality targetConstraint primitiveList SEMI
|
| EDGE identifier ID stringLiteral COLON cardinality targetConstraint primitiveList SEMI
|
||||||
| INTERFACE identifier ID stringLiteral COLON identifier SEMI
|
| INTERFACE identifier ID stringLiteral COLON identifier SEMI
|
||||||
| CONSTRUCTOR identifier ID stringLiteral COLON identifier SEMI
|
| CONSTRUCTOR identifier ID stringLiteral COLON identifier (INPUT valueType)? SEMI
|
||||||
;
|
;
|
||||||
|
|
||||||
primitiveList
|
primitiveList
|
||||||
@@ -320,6 +330,7 @@ stringLiteral
|
|||||||
;
|
;
|
||||||
|
|
||||||
WORKSPACE: 'workspace';
|
WORKSPACE: 'workspace';
|
||||||
|
FRAGMENT: 'fragment';
|
||||||
IMPORT: 'import';
|
IMPORT: 'import';
|
||||||
EXTERNAL: 'external';
|
EXTERNAL: 'external';
|
||||||
ATOM: 'atom';
|
ATOM: 'atom';
|
||||||
@@ -332,6 +343,7 @@ OPERATION: 'operation';
|
|||||||
FUNCTION: 'function';
|
FUNCTION: 'function';
|
||||||
CONSTRUCTOR: 'constructor';
|
CONSTRUCTOR: 'constructor';
|
||||||
CONSTRUCTS: 'constructs';
|
CONSTRUCTS: 'constructs';
|
||||||
|
INPUT: 'input';
|
||||||
CONFORM: 'conform';
|
CONFORM: 'conform';
|
||||||
AS: 'as';
|
AS: 'as';
|
||||||
BIND: 'bind';
|
BIND: 'bind';
|
||||||
@@ -423,6 +435,6 @@ STRING_LITERAL: '"' (ESC | ~["\\\r\n])* '"';
|
|||||||
fragment ESC: '\\' (["\\/bfnrt] | 'u' HEX HEX HEX HEX);
|
fragment ESC: '\\' (["\\/bfnrt] | 'u' HEX HEX HEX HEX);
|
||||||
fragment HEX: [0-9a-fA-F];
|
fragment HEX: [0-9a-fA-F];
|
||||||
|
|
||||||
LINE_COMMENT: '//' ~[\r\n]* -> skip;
|
LINE_COMMENT: '//' ~[\r\n]* -> channel(HIDDEN);
|
||||||
BLOCK_COMMENT: '/*' .*? '*/' -> skip;
|
BLOCK_COMMENT: '/*' .*? '*/' -> channel(HIDDEN);
|
||||||
WS: [ \t\r\n]+ -> skip;
|
WS: [ \t\r\n]+ -> channel(HIDDEN);
|
||||||
|
|||||||
+6
-3
@@ -5,13 +5,16 @@
|
|||||||
"packageManager": "yarn@4.18.0",
|
"packageManager": "yarn@4.18.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
"quixos-qx": "dist/src/capability-language/tool-cli.js",
|
||||||
|
"quixos-codegen-ts": "dist/src/bindings/cli.js",
|
||||||
"quixos-capability-compile": "dist/src/capability-language/cli.js",
|
"quixos-capability-compile": "dist/src/capability-language/cli.js",
|
||||||
"quixos-resource-compile": "dist/src/capability-language/resource-cli.js",
|
|
||||||
"quixos-workspace-compile": "dist/src/capability-language/workspace-cli.js",
|
|
||||||
"quixos-descriptor-check": "dist/src/descriptor-check.js",
|
"quixos-descriptor-check": "dist/src/descriptor-check.js",
|
||||||
"quixos-lock-check": "dist/src/resource-lock/cli.js"
|
"quixos-lock-check": "dist/src/resource-lock/cli.js",
|
||||||
|
"quixos-resource-compile": "dist/src/capability-language/resource-cli.js",
|
||||||
|
"quixos-workspace-compile": "dist/src/capability-language/workspace-cli.js"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
|
"./bindings": "./dist/src/bindings/index.js",
|
||||||
"./capability-model": "./dist/src/capability-model/index.js",
|
"./capability-model": "./dist/src/capability-model/index.js",
|
||||||
"./capability-language": "./dist/src/capability-language/index.js",
|
"./capability-language": "./dist/src/capability-language/index.js",
|
||||||
"./resource-lock": "./dist/src/resource-lock/index.js",
|
"./resource-lock": "./dist/src/resource-lock/index.js",
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
import { readFile, writeFile } from "node:fs/promises";
|
||||||
|
import { generateTypeScriptBindings } from "./index.js";
|
||||||
|
|
||||||
|
const main = async () => {
|
||||||
|
const [schema, revision, output, options, ...rest] = process.argv.slice(2);
|
||||||
|
if (!schema || !revision || !output || rest.length) throw new Error(
|
||||||
|
"usage: quixos-codegen-ts SCHEMA.json PACKAGE_REVISION OUTPUT.ts [OPTIONS.json]");
|
||||||
|
const generated = generateTypeScriptBindings(JSON.parse(await readFile(schema, "utf8")), revision,
|
||||||
|
options ? JSON.parse(await readFile(options, "utf8")) : {});
|
||||||
|
await writeFile(output, generated);
|
||||||
|
};
|
||||||
|
main().catch((error: unknown) => { console.error(error instanceof Error ? error.message : error); process.exitCode = 1; });
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
import type { InterfaceRevision, PackageRevision, ValueType, DependencyPort } from "../capability-model/types.js";
|
||||||
|
import type { CompiledCapabilityResourceRepository } from "../capability-language/assembly.js";
|
||||||
|
|
||||||
|
/** Portable generator input. New backends consume this instead of the parser or TS runtime. */
|
||||||
|
export type BindingSchema = {
|
||||||
|
format: "quixos-bindings";
|
||||||
|
version: 1;
|
||||||
|
interfaces: InterfaceRevision[];
|
||||||
|
packages: PackageRevision[];
|
||||||
|
};
|
||||||
|
export const bindingSchema = (compiled: CompiledCapabilityResourceRepository): BindingSchema => ({
|
||||||
|
format: "quixos-bindings", version: 1,
|
||||||
|
interfaces: compiled.resources.flatMap((node) => node.resource.kind === "interface" ? [node.resource.revision] : []),
|
||||||
|
packages: compiled.resources.flatMap((node) => node.resource.kind === "package" ? [node.resource.revision] : []),
|
||||||
|
});
|
||||||
|
export type TypeScriptBindingOptions = {
|
||||||
|
runtimeModule?: string;
|
||||||
|
/** Each export must implement MessageBinding<T>, providing both TS type and wire codec. */
|
||||||
|
messages?: Record<string, { module: string; export: string }>;
|
||||||
|
};
|
||||||
|
const q = JSON.stringify;
|
||||||
|
const object = (entries: [string, string][]) => `{ ${entries.map(([key, value]) => `${q(key)}: ${value}`).join("; ")} }`;
|
||||||
|
const unit = (type: ValueType) => type.kind === "builtin" && type.name === "unit";
|
||||||
|
|
||||||
|
export const generateTypeScriptBindings = (
|
||||||
|
schema: BindingSchema, packageRevisionId: string, options: TypeScriptBindingOptions = {},
|
||||||
|
) => {
|
||||||
|
if (schema.format !== "quixos-bindings" || schema.version !== 1) throw new Error("Unsupported binding schema version");
|
||||||
|
const pkg = schema.packages.find((entry) => entry.revisionId === packageRevisionId);
|
||||||
|
if (!pkg) throw new Error(`Unknown package revision ${packageRevisionId}`);
|
||||||
|
const messages = new Map<string, string>();
|
||||||
|
const type = (value: ValueType): string => {
|
||||||
|
switch (value.kind) {
|
||||||
|
case "builtin": return value.name === "unit" ? "null" : "QxWatchHandle";
|
||||||
|
case "scalar": return ({ bool: "boolean", bytes: "Uint8Array", string: "string", int64: "bigint", uint64: "bigint",
|
||||||
|
double: "number", int32: "number", uint32: "number" })[value.name];
|
||||||
|
case "object-ref": return `QxObjectRef<${q(value.expectation.kind === "atom" ? `atom:${value.expectation.atomId}` : `interface:${value.expectation.interfaceRevisionId}`)}>`;
|
||||||
|
case "optional": return `(${type(value.value)} | null)`;
|
||||||
|
case "list": return `Array<${type(value.value)}>`;
|
||||||
|
case "message": {
|
||||||
|
if (!options.messages?.[value.descriptorId]) throw new Error(`Missing TypeScript message binding for ${value.descriptorId}`);
|
||||||
|
if (!messages.has(value.descriptorId)) messages.set(value.descriptorId, `message${messages.size}`);
|
||||||
|
return `BindingValue<typeof ${messages.get(value.descriptorId)}>`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const ref = (target: { kind: "atom"; atomId: string } | { kind: "interface"; interfaceRevisionId: string }) =>
|
||||||
|
`QxObjectRef<${q(target.kind === "atom" ? `atom:${target.atomId}` : `interface:${target.interfaceRevisionId}`)}>`;
|
||||||
|
const params = (input: ValueType) => unit(input) ? "" : `input: ${type(input)}`;
|
||||||
|
const port = (entry: DependencyPort): { type: string; spec: unknown } => {
|
||||||
|
const requirement = entry.requirement;
|
||||||
|
switch (requirement.kind) {
|
||||||
|
case "state": {
|
||||||
|
const methods = requirement.primitives.map((primitive): [string, string] => {
|
||||||
|
if (primitive === "read") return ["get", `() => Promise<${type(requirement.valueType)}>`];
|
||||||
|
if (primitive === "write") return ["set", `(value: ${type(requirement.valueType)}) => Promise<void>`];
|
||||||
|
throw new Error(`State primitive ${primitive} is not supported by the TypeScript runtime binding yet`);
|
||||||
|
});
|
||||||
|
return { type: object(methods), spec: { ...requirement, id: entry.id } };
|
||||||
|
}
|
||||||
|
case "edge": {
|
||||||
|
const methods = requirement.primitives.map((primitive): [string, string] => {
|
||||||
|
if (primitive === "resolve") return [primitive, `() => Promise<Array<${ref(requirement.target)}>>`];
|
||||||
|
if (primitive === "connect" || primitive === "disconnect") return [primitive, `(target: ${ref(requirement.target)}) => Promise<void>`];
|
||||||
|
throw new Error(`Edge primitive ${primitive} is not supported by the TypeScript runtime binding yet`);
|
||||||
|
});
|
||||||
|
return { type: object(methods), spec: { kind: "edge", id: entry.id, primitives: requirement.primitives } };
|
||||||
|
}
|
||||||
|
case "interface": {
|
||||||
|
const contract = schema.interfaces.find((candidate) => candidate.revisionId === requirement.interfaceRevisionId);
|
||||||
|
if (!contract) throw new Error(`Missing imported interface contract ${requirement.interfaceRevisionId}`);
|
||||||
|
// Streaming ports need a future streaming ABI; ordinary calls are fully typed today.
|
||||||
|
const operations = contract.members.flatMap((member) => member.operations.filter((operation) => operation.mode === "call")
|
||||||
|
.map((operation) => ({ ...operation, name: `${member.displayName}.${operation.displayName}` })));
|
||||||
|
return { type: object(operations.map((operation) => [operation.name, `(${params(operation.inputType)}) => Promise<${type(operation.outputType)}>`])),
|
||||||
|
spec: { kind: "interface", id: entry.id, operations: Object.fromEntries(operations.map((operation) => [operation.name, operation])) } };
|
||||||
|
}
|
||||||
|
case "constructor": {
|
||||||
|
const input = requirement.inputType;
|
||||||
|
if (!input) throw new Error(`Constructor port ${entry.id} needs an explicit input contract: add 'input TYPE' after ${requirement.atomId} in QX`);
|
||||||
|
return { type: object([["construct", `(${params(input)}) => Promise<${ref({ kind: "atom", atomId: requirement.atomId })}>`]]),
|
||||||
|
spec: { kind: "constructor", id: entry.id, inputType: input } };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const exports = [...pkg.exports].sort((a, b) => a.id < b.id ? -1 : a.id > b.id ? 1 : 0);
|
||||||
|
const names = new Set<string>();
|
||||||
|
const specs: Record<string, unknown> = {};
|
||||||
|
const contexts: [string, string][] = [];
|
||||||
|
const handlers: [string, string][] = [];
|
||||||
|
for (const entry of exports) {
|
||||||
|
if (names.has(entry.displayName)) throw new Error(`Duplicate export name ${entry.displayName}`);
|
||||||
|
names.add(entry.displayName);
|
||||||
|
const ports = entry.dependencyPorts.map((dependency) => ({ name: dependency.displayName, ...port(dependency) }));
|
||||||
|
if (new Set(ports.map((p) => p.name)).size !== ports.length) throw new Error(`Duplicate dependency name in ${entry.displayName}`);
|
||||||
|
const receiver = entry.kind === "constructor" ? ref({ kind: "atom", atomId: entry.constructsAtom }) :
|
||||||
|
entry.kind === "operation" && entry.receiverRequirement.kind === "exact-atom" ?
|
||||||
|
ref({ kind: "atom", atomId: entry.receiverRequirement.atomId }) :
|
||||||
|
entry.kind === "operation" && entry.receiverRequirement.kind === "all-interfaces" ?
|
||||||
|
`QxObjectRef<${entry.receiverRequirement.interfaceRevisionIds.map((id) => q(`interface:${id}`)).join(" | ") || "never"}>` : "string";
|
||||||
|
contexts.push([entry.displayName, object([["objectId", receiver], ["input", type(entry.inputType)],
|
||||||
|
["ports", object(ports.map((port) => [port.name, port.type]))]])]);
|
||||||
|
const event = entry.kind === "operation" ? entry.eventType : undefined;
|
||||||
|
const contextType = `Contexts[${q(entry.displayName)}]`;
|
||||||
|
const outputType = type(event ?? entry.outputType);
|
||||||
|
// Watch-start handlers produce events through the runtime's derived stream protocol.
|
||||||
|
handlers.push([entry.displayName, event ? `QxDerived<${contextType}, ${outputType}>` :
|
||||||
|
`QxHandler<${contextType}, ${outputType}>${entry.kind === "operation" && entry.mode === "call" ? ` | QxDerived<${contextType}, ${outputType}>` : ""}`]);
|
||||||
|
specs[entry.displayName] = { inputType: entry.inputType, outputType: entry.outputType,
|
||||||
|
...(event ? { eventType: event } : {}), ports: Object.fromEntries(ports.map((port) => [port.name, port.spec])) };
|
||||||
|
}
|
||||||
|
const imports = [...messages].map(([id, alias]) => {
|
||||||
|
const binding = options.messages![id]!;
|
||||||
|
if (!/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(binding.export)) throw new Error(`Invalid message binding export ${binding.export}`);
|
||||||
|
return `import { ${binding.export} as ${alias} } from ${q(binding.module)};`;
|
||||||
|
});
|
||||||
|
const signatures = `${object(contexts)} ${object(handlers)}`;
|
||||||
|
const typeImports = ["BindingValue", "QxObjectRef", "QxWatchHandle", "QxHandler", "QxDerived"].filter((name) => new RegExp(`\\b${name}\\b`).test(signatures));
|
||||||
|
return `// Generated by quixos-codegen-ts. Do not edit. Binding ABI version 1.\n` +
|
||||||
|
`import { ${exports.length ? "bindQxHandler, " : ""}${[...typeImports, "QxHandlerSpec", "QxMessages"].map((name) => `type ${name}`).join(", ")} } from ${q(options.runtimeModule ?? "@quixos/camino-package-runtime")};\n` +
|
||||||
|
imports.join("\n") + `\nexport const packageRevisionId = ${q(pkg.revisionId)};\n` +
|
||||||
|
`export type Contexts = ${object(contexts)};\nexport type Implementation = ${object(handlers)};\n` +
|
||||||
|
`const messages = { ${[...messages].map(([id, alias]) => `${q(id)}: ${alias}`).join(", ")} } satisfies QxMessages;\n` +
|
||||||
|
`const specs = ${JSON.stringify(specs, null, 2)} satisfies Record<string, QxHandlerSpec>;\n` +
|
||||||
|
`export const createRuntime = (implementation: Implementation) => ({\n packageRevisionId,\n exports: {\n` +
|
||||||
|
exports.map((entry) => ` ${q(entry.id)}: bindQxHandler(specs[${q(entry.displayName)}], implementation[${q(entry.displayName)}], messages),`).join("\n") +
|
||||||
|
`\n },\n});\n`;
|
||||||
|
};
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import { readFile } from "node:fs/promises";
|
import { readFile } from "node:fs/promises";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
|
import { loadQxSources, resolveQxSources } from "./source-loader.js";
|
||||||
import {
|
import {
|
||||||
capabilityId,
|
capabilityId,
|
||||||
compileWorkspaceRevision,
|
compileWorkspaceRevision,
|
||||||
@@ -286,6 +287,8 @@ export const compileWorkspaceRepository = async (options: {
|
|||||||
workspaceId?: string;
|
workspaceId?: string;
|
||||||
workspaceRevisionId?: string;
|
workspaceRevisionId?: string;
|
||||||
sourceRootCommit?: string;
|
sourceRootCommit?: string;
|
||||||
|
/** An editor's proposed source snapshot; locks and dependency revisions remain exact. */
|
||||||
|
readSource?: (name: string) => Promise<string>;
|
||||||
}): Promise<CompiledWorkspaceRepository> => {
|
}): Promise<CompiledWorkspaceRepository> => {
|
||||||
const rootLockResult = await loadQuixosLock(
|
const rootLockResult = await loadQuixosLock(
|
||||||
path.join(options.rootDirectory, "quixos.lock"),
|
path.join(options.rootDirectory, "quixos.lock"),
|
||||||
@@ -303,10 +306,11 @@ export const compileWorkspaceRepository = async (options: {
|
|||||||
const nodes = await resolver.nodes();
|
const nodes = await resolver.nodes();
|
||||||
const environment = environmentFor(directPairs, nodes);
|
const environment = environmentFor(directPairs, nodes);
|
||||||
const workspacePath = path.join(options.rootDirectory, "workspace.qx");
|
const workspacePath = path.join(options.rootDirectory, "workspace.qx");
|
||||||
const workspaceSource = await readFile(workspacePath, "utf8");
|
const sources = options.readSource ? await resolveQxSources(options.readSource) : await loadQxSources(options.rootDirectory);
|
||||||
const compiled = compileCapabilitySource(workspaceSource, workspacePath, environment);
|
const compiled = compileCapabilitySource(sources.source, workspacePath, environment);
|
||||||
if (!compiled.ok) {
|
if (!compiled.ok) {
|
||||||
throw new Error(diagnosticsMessage("Workspace", compiled.diagnostics));
|
throw new Error(diagnosticsMessage("Workspace", compiled.diagnostics.map((diagnostic) =>
|
||||||
|
diagnostic.line > 0 ? { ...diagnostic, ...sources.originalPosition(diagnostic.line, diagnostic.column) } : diagnostic)));
|
||||||
}
|
}
|
||||||
assertImportsMatchLock(workspacePath, compiled.imports, rootLock.resources);
|
assertImportsMatchLock(workspacePath, compiled.imports, rootLock.resources);
|
||||||
const availableInterfaceIds = new Set(
|
const availableInterfaceIds = new Set(
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,197 +1,201 @@
|
|||||||
WORKSPACE=1
|
WORKSPACE=1
|
||||||
IMPORT=2
|
FRAGMENT=2
|
||||||
EXTERNAL=3
|
IMPORT=3
|
||||||
ATOM=4
|
EXTERNAL=4
|
||||||
INTERFACE=5
|
ATOM=5
|
||||||
INTERFACES=6
|
INTERFACE=6
|
||||||
PACKAGE=7
|
INTERFACES=7
|
||||||
VALUE=8
|
PACKAGE=8
|
||||||
RELATION=9
|
VALUE=9
|
||||||
OPERATION=10
|
RELATION=10
|
||||||
FUNCTION=11
|
OPERATION=11
|
||||||
CONSTRUCTOR=12
|
FUNCTION=12
|
||||||
CONSTRUCTS=13
|
CONSTRUCTOR=13
|
||||||
CONFORM=14
|
CONSTRUCTS=14
|
||||||
AS=15
|
INPUT=15
|
||||||
BIND=16
|
CONFORM=16
|
||||||
TO=17
|
AS=17
|
||||||
PRIVATE=18
|
BIND=18
|
||||||
SHARED=19
|
TO=19
|
||||||
STATE=20
|
PRIVATE=20
|
||||||
EDGE=21
|
SHARED=21
|
||||||
PROJECTION=22
|
STATE=22
|
||||||
WITH=23
|
EDGE=23
|
||||||
USING=24
|
PROJECTION=24
|
||||||
VIA=25
|
WITH=25
|
||||||
MATERIALIZE=26
|
USING=26
|
||||||
IF=27
|
VIA=27
|
||||||
ABSENT=28
|
MATERIALIZE=28
|
||||||
ON=29
|
IF=29
|
||||||
POLICY=30
|
ABSENT=30
|
||||||
DEFAULT=31
|
ON=31
|
||||||
SOURCE=32
|
POLICY=32
|
||||||
REPOSITORY=33
|
DEFAULT=33
|
||||||
COMMIT=34
|
SOURCE=34
|
||||||
REVISION=35
|
REPOSITORY=35
|
||||||
ID=36
|
COMMIT=36
|
||||||
DOC=37
|
REVISION=37
|
||||||
MODE=38
|
ID=38
|
||||||
EMITS=39
|
DOC=39
|
||||||
RECEIVER=40
|
MODE=40
|
||||||
REQUIRES=41
|
EMITS=41
|
||||||
ANY=42
|
RECEIVER=42
|
||||||
GET=43
|
REQUIRES=43
|
||||||
SET=44
|
ANY=44
|
||||||
WATCH=45
|
GET=45
|
||||||
START=46
|
SET=46
|
||||||
STOP=47
|
WATCH=47
|
||||||
READ=48
|
START=48
|
||||||
WRITE=49
|
STOP=49
|
||||||
RESOLVE=50
|
READ=50
|
||||||
CONNECT=51
|
WRITE=51
|
||||||
DISCONNECT=52
|
RESOLVE=52
|
||||||
CALL=53
|
CONNECT=53
|
||||||
WATCH_START=54
|
DISCONNECT=54
|
||||||
WATCH_STOP=55
|
CALL=55
|
||||||
SUBSCRIBE=56
|
WATCH_START=56
|
||||||
UNSUBSCRIBE=57
|
WATCH_STOP=57
|
||||||
OPTIMISTIC_REGISTER=58
|
SUBSCRIBE=58
|
||||||
CRDT=59
|
UNSUBSCRIBE=59
|
||||||
OPTIONAL_ONE=60
|
OPTIMISTIC_REGISTER=60
|
||||||
EXACTLY_ONE=61
|
CRDT=61
|
||||||
MANY_UNIQUE=62
|
OPTIONAL_ONE=62
|
||||||
MANY=63
|
EXACTLY_ONE=63
|
||||||
ORDERED=64
|
MANY_UNIQUE=64
|
||||||
UNIT=65
|
MANY=65
|
||||||
WATCH_HANDLE=66
|
ORDERED=66
|
||||||
MESSAGE=67
|
UNIT=67
|
||||||
ATOM_REF=68
|
WATCH_HANDLE=68
|
||||||
INTERFACE_REF=69
|
MESSAGE=69
|
||||||
OPTIONAL=70
|
ATOM_REF=70
|
||||||
LIST=71
|
INTERFACE_REF=71
|
||||||
BOOL=72
|
OPTIONAL=72
|
||||||
BYTES=73
|
LIST=73
|
||||||
DOUBLE=74
|
BOOL=74
|
||||||
INT32=75
|
BYTES=75
|
||||||
INT64=76
|
DOUBLE=76
|
||||||
STRING=77
|
INT32=77
|
||||||
UINT32=78
|
INT64=78
|
||||||
UINT64=79
|
STRING=79
|
||||||
TRUE=80
|
UINT32=80
|
||||||
FALSE=81
|
UINT64=81
|
||||||
NULL=82
|
TRUE=82
|
||||||
ARROW=83
|
FALSE=83
|
||||||
COLON=84
|
NULL=84
|
||||||
SEMI=85
|
ARROW=85
|
||||||
COMMA=86
|
COLON=86
|
||||||
DOT=87
|
SEMI=87
|
||||||
LBRACE=88
|
COMMA=88
|
||||||
RBRACE=89
|
DOT=89
|
||||||
LBRACK=90
|
LBRACE=90
|
||||||
RBRACK=91
|
RBRACE=91
|
||||||
LPAREN=92
|
LBRACK=92
|
||||||
RPAREN=93
|
RBRACK=93
|
||||||
LT=94
|
LPAREN=94
|
||||||
GT=95
|
RPAREN=95
|
||||||
INTEGER=96
|
LT=96
|
||||||
JSON_NUMBER=97
|
GT=97
|
||||||
IDENTIFIER=98
|
INTEGER=98
|
||||||
STRING_LITERAL=99
|
JSON_NUMBER=99
|
||||||
LINE_COMMENT=100
|
IDENTIFIER=100
|
||||||
BLOCK_COMMENT=101
|
STRING_LITERAL=101
|
||||||
WS=102
|
LINE_COMMENT=102
|
||||||
|
BLOCK_COMMENT=103
|
||||||
|
WS=104
|
||||||
'workspace'=1
|
'workspace'=1
|
||||||
'import'=2
|
'fragment'=2
|
||||||
'external'=3
|
'import'=3
|
||||||
'atom'=4
|
'external'=4
|
||||||
'interface'=5
|
'atom'=5
|
||||||
'interfaces'=6
|
'interface'=6
|
||||||
'package'=7
|
'interfaces'=7
|
||||||
'value'=8
|
'package'=8
|
||||||
'relation'=9
|
'value'=9
|
||||||
'operation'=10
|
'relation'=10
|
||||||
'function'=11
|
'operation'=11
|
||||||
'constructor'=12
|
'function'=12
|
||||||
'constructs'=13
|
'constructor'=13
|
||||||
'conform'=14
|
'constructs'=14
|
||||||
'as'=15
|
'input'=15
|
||||||
'bind'=16
|
'conform'=16
|
||||||
'to'=17
|
'as'=17
|
||||||
'private'=18
|
'bind'=18
|
||||||
'shared'=19
|
'to'=19
|
||||||
'state'=20
|
'private'=20
|
||||||
'edge'=21
|
'shared'=21
|
||||||
'projection'=22
|
'state'=22
|
||||||
'with'=23
|
'edge'=23
|
||||||
'using'=24
|
'projection'=24
|
||||||
'via'=25
|
'with'=25
|
||||||
'materialize'=26
|
'using'=26
|
||||||
'if'=27
|
'via'=27
|
||||||
'absent'=28
|
'materialize'=28
|
||||||
'on'=29
|
'if'=29
|
||||||
'policy'=30
|
'absent'=30
|
||||||
'default'=31
|
'on'=31
|
||||||
'source'=32
|
'policy'=32
|
||||||
'repository'=33
|
'default'=33
|
||||||
'commit'=34
|
'source'=34
|
||||||
'revision'=35
|
'repository'=35
|
||||||
'id'=36
|
'commit'=36
|
||||||
'doc'=37
|
'revision'=37
|
||||||
'mode'=38
|
'id'=38
|
||||||
'emits'=39
|
'doc'=39
|
||||||
'receiver'=40
|
'mode'=40
|
||||||
'requires'=41
|
'emits'=41
|
||||||
'any'=42
|
'receiver'=42
|
||||||
'get'=43
|
'requires'=43
|
||||||
'set'=44
|
'any'=44
|
||||||
'watch'=45
|
'get'=45
|
||||||
'start'=46
|
'set'=46
|
||||||
'stop'=47
|
'watch'=47
|
||||||
'read'=48
|
'start'=48
|
||||||
'write'=49
|
'stop'=49
|
||||||
'resolve'=50
|
'read'=50
|
||||||
'connect'=51
|
'write'=51
|
||||||
'disconnect'=52
|
'resolve'=52
|
||||||
'call'=53
|
'connect'=53
|
||||||
'watch-start'=54
|
'disconnect'=54
|
||||||
'watch-stop'=55
|
'call'=55
|
||||||
'subscribe'=56
|
'watch-start'=56
|
||||||
'unsubscribe'=57
|
'watch-stop'=57
|
||||||
'optimistic-register'=58
|
'subscribe'=58
|
||||||
'crdt'=59
|
'unsubscribe'=59
|
||||||
'optional-one'=60
|
'optimistic-register'=60
|
||||||
'exactly-one'=61
|
'crdt'=61
|
||||||
'many-unique'=62
|
'optional-one'=62
|
||||||
'many'=63
|
'exactly-one'=63
|
||||||
'ordered'=64
|
'many-unique'=64
|
||||||
'unit'=65
|
'many'=65
|
||||||
'watch-handle'=66
|
'ordered'=66
|
||||||
'message'=67
|
'unit'=67
|
||||||
'atom-ref'=68
|
'watch-handle'=68
|
||||||
'interface-ref'=69
|
'message'=69
|
||||||
'optional'=70
|
'atom-ref'=70
|
||||||
'list'=71
|
'interface-ref'=71
|
||||||
'bool'=72
|
'optional'=72
|
||||||
'bytes'=73
|
'list'=73
|
||||||
'double'=74
|
'bool'=74
|
||||||
'int32'=75
|
'bytes'=75
|
||||||
'int64'=76
|
'double'=76
|
||||||
'string'=77
|
'int32'=77
|
||||||
'uint32'=78
|
'int64'=78
|
||||||
'uint64'=79
|
'string'=79
|
||||||
'true'=80
|
'uint32'=80
|
||||||
'false'=81
|
'uint64'=81
|
||||||
'null'=82
|
'true'=82
|
||||||
'->'=83
|
'false'=83
|
||||||
':'=84
|
'null'=84
|
||||||
';'=85
|
'->'=85
|
||||||
','=86
|
':'=86
|
||||||
'.'=87
|
';'=87
|
||||||
'{'=88
|
','=88
|
||||||
'}'=89
|
'.'=89
|
||||||
'['=90
|
'{'=90
|
||||||
']'=91
|
'}'=91
|
||||||
'('=92
|
'['=92
|
||||||
')'=93
|
']'=93
|
||||||
'<'=94
|
'('=94
|
||||||
'>'=95
|
')'=95
|
||||||
|
'<'=96
|
||||||
|
'>'=97
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,197 +1,201 @@
|
|||||||
WORKSPACE=1
|
WORKSPACE=1
|
||||||
IMPORT=2
|
FRAGMENT=2
|
||||||
EXTERNAL=3
|
IMPORT=3
|
||||||
ATOM=4
|
EXTERNAL=4
|
||||||
INTERFACE=5
|
ATOM=5
|
||||||
INTERFACES=6
|
INTERFACE=6
|
||||||
PACKAGE=7
|
INTERFACES=7
|
||||||
VALUE=8
|
PACKAGE=8
|
||||||
RELATION=9
|
VALUE=9
|
||||||
OPERATION=10
|
RELATION=10
|
||||||
FUNCTION=11
|
OPERATION=11
|
||||||
CONSTRUCTOR=12
|
FUNCTION=12
|
||||||
CONSTRUCTS=13
|
CONSTRUCTOR=13
|
||||||
CONFORM=14
|
CONSTRUCTS=14
|
||||||
AS=15
|
INPUT=15
|
||||||
BIND=16
|
CONFORM=16
|
||||||
TO=17
|
AS=17
|
||||||
PRIVATE=18
|
BIND=18
|
||||||
SHARED=19
|
TO=19
|
||||||
STATE=20
|
PRIVATE=20
|
||||||
EDGE=21
|
SHARED=21
|
||||||
PROJECTION=22
|
STATE=22
|
||||||
WITH=23
|
EDGE=23
|
||||||
USING=24
|
PROJECTION=24
|
||||||
VIA=25
|
WITH=25
|
||||||
MATERIALIZE=26
|
USING=26
|
||||||
IF=27
|
VIA=27
|
||||||
ABSENT=28
|
MATERIALIZE=28
|
||||||
ON=29
|
IF=29
|
||||||
POLICY=30
|
ABSENT=30
|
||||||
DEFAULT=31
|
ON=31
|
||||||
SOURCE=32
|
POLICY=32
|
||||||
REPOSITORY=33
|
DEFAULT=33
|
||||||
COMMIT=34
|
SOURCE=34
|
||||||
REVISION=35
|
REPOSITORY=35
|
||||||
ID=36
|
COMMIT=36
|
||||||
DOC=37
|
REVISION=37
|
||||||
MODE=38
|
ID=38
|
||||||
EMITS=39
|
DOC=39
|
||||||
RECEIVER=40
|
MODE=40
|
||||||
REQUIRES=41
|
EMITS=41
|
||||||
ANY=42
|
RECEIVER=42
|
||||||
GET=43
|
REQUIRES=43
|
||||||
SET=44
|
ANY=44
|
||||||
WATCH=45
|
GET=45
|
||||||
START=46
|
SET=46
|
||||||
STOP=47
|
WATCH=47
|
||||||
READ=48
|
START=48
|
||||||
WRITE=49
|
STOP=49
|
||||||
RESOLVE=50
|
READ=50
|
||||||
CONNECT=51
|
WRITE=51
|
||||||
DISCONNECT=52
|
RESOLVE=52
|
||||||
CALL=53
|
CONNECT=53
|
||||||
WATCH_START=54
|
DISCONNECT=54
|
||||||
WATCH_STOP=55
|
CALL=55
|
||||||
SUBSCRIBE=56
|
WATCH_START=56
|
||||||
UNSUBSCRIBE=57
|
WATCH_STOP=57
|
||||||
OPTIMISTIC_REGISTER=58
|
SUBSCRIBE=58
|
||||||
CRDT=59
|
UNSUBSCRIBE=59
|
||||||
OPTIONAL_ONE=60
|
OPTIMISTIC_REGISTER=60
|
||||||
EXACTLY_ONE=61
|
CRDT=61
|
||||||
MANY_UNIQUE=62
|
OPTIONAL_ONE=62
|
||||||
MANY=63
|
EXACTLY_ONE=63
|
||||||
ORDERED=64
|
MANY_UNIQUE=64
|
||||||
UNIT=65
|
MANY=65
|
||||||
WATCH_HANDLE=66
|
ORDERED=66
|
||||||
MESSAGE=67
|
UNIT=67
|
||||||
ATOM_REF=68
|
WATCH_HANDLE=68
|
||||||
INTERFACE_REF=69
|
MESSAGE=69
|
||||||
OPTIONAL=70
|
ATOM_REF=70
|
||||||
LIST=71
|
INTERFACE_REF=71
|
||||||
BOOL=72
|
OPTIONAL=72
|
||||||
BYTES=73
|
LIST=73
|
||||||
DOUBLE=74
|
BOOL=74
|
||||||
INT32=75
|
BYTES=75
|
||||||
INT64=76
|
DOUBLE=76
|
||||||
STRING=77
|
INT32=77
|
||||||
UINT32=78
|
INT64=78
|
||||||
UINT64=79
|
STRING=79
|
||||||
TRUE=80
|
UINT32=80
|
||||||
FALSE=81
|
UINT64=81
|
||||||
NULL=82
|
TRUE=82
|
||||||
ARROW=83
|
FALSE=83
|
||||||
COLON=84
|
NULL=84
|
||||||
SEMI=85
|
ARROW=85
|
||||||
COMMA=86
|
COLON=86
|
||||||
DOT=87
|
SEMI=87
|
||||||
LBRACE=88
|
COMMA=88
|
||||||
RBRACE=89
|
DOT=89
|
||||||
LBRACK=90
|
LBRACE=90
|
||||||
RBRACK=91
|
RBRACE=91
|
||||||
LPAREN=92
|
LBRACK=92
|
||||||
RPAREN=93
|
RBRACK=93
|
||||||
LT=94
|
LPAREN=94
|
||||||
GT=95
|
RPAREN=95
|
||||||
INTEGER=96
|
LT=96
|
||||||
JSON_NUMBER=97
|
GT=97
|
||||||
IDENTIFIER=98
|
INTEGER=98
|
||||||
STRING_LITERAL=99
|
JSON_NUMBER=99
|
||||||
LINE_COMMENT=100
|
IDENTIFIER=100
|
||||||
BLOCK_COMMENT=101
|
STRING_LITERAL=101
|
||||||
WS=102
|
LINE_COMMENT=102
|
||||||
|
BLOCK_COMMENT=103
|
||||||
|
WS=104
|
||||||
'workspace'=1
|
'workspace'=1
|
||||||
'import'=2
|
'fragment'=2
|
||||||
'external'=3
|
'import'=3
|
||||||
'atom'=4
|
'external'=4
|
||||||
'interface'=5
|
'atom'=5
|
||||||
'interfaces'=6
|
'interface'=6
|
||||||
'package'=7
|
'interfaces'=7
|
||||||
'value'=8
|
'package'=8
|
||||||
'relation'=9
|
'value'=9
|
||||||
'operation'=10
|
'relation'=10
|
||||||
'function'=11
|
'operation'=11
|
||||||
'constructor'=12
|
'function'=12
|
||||||
'constructs'=13
|
'constructor'=13
|
||||||
'conform'=14
|
'constructs'=14
|
||||||
'as'=15
|
'input'=15
|
||||||
'bind'=16
|
'conform'=16
|
||||||
'to'=17
|
'as'=17
|
||||||
'private'=18
|
'bind'=18
|
||||||
'shared'=19
|
'to'=19
|
||||||
'state'=20
|
'private'=20
|
||||||
'edge'=21
|
'shared'=21
|
||||||
'projection'=22
|
'state'=22
|
||||||
'with'=23
|
'edge'=23
|
||||||
'using'=24
|
'projection'=24
|
||||||
'via'=25
|
'with'=25
|
||||||
'materialize'=26
|
'using'=26
|
||||||
'if'=27
|
'via'=27
|
||||||
'absent'=28
|
'materialize'=28
|
||||||
'on'=29
|
'if'=29
|
||||||
'policy'=30
|
'absent'=30
|
||||||
'default'=31
|
'on'=31
|
||||||
'source'=32
|
'policy'=32
|
||||||
'repository'=33
|
'default'=33
|
||||||
'commit'=34
|
'source'=34
|
||||||
'revision'=35
|
'repository'=35
|
||||||
'id'=36
|
'commit'=36
|
||||||
'doc'=37
|
'revision'=37
|
||||||
'mode'=38
|
'id'=38
|
||||||
'emits'=39
|
'doc'=39
|
||||||
'receiver'=40
|
'mode'=40
|
||||||
'requires'=41
|
'emits'=41
|
||||||
'any'=42
|
'receiver'=42
|
||||||
'get'=43
|
'requires'=43
|
||||||
'set'=44
|
'any'=44
|
||||||
'watch'=45
|
'get'=45
|
||||||
'start'=46
|
'set'=46
|
||||||
'stop'=47
|
'watch'=47
|
||||||
'read'=48
|
'start'=48
|
||||||
'write'=49
|
'stop'=49
|
||||||
'resolve'=50
|
'read'=50
|
||||||
'connect'=51
|
'write'=51
|
||||||
'disconnect'=52
|
'resolve'=52
|
||||||
'call'=53
|
'connect'=53
|
||||||
'watch-start'=54
|
'disconnect'=54
|
||||||
'watch-stop'=55
|
'call'=55
|
||||||
'subscribe'=56
|
'watch-start'=56
|
||||||
'unsubscribe'=57
|
'watch-stop'=57
|
||||||
'optimistic-register'=58
|
'subscribe'=58
|
||||||
'crdt'=59
|
'unsubscribe'=59
|
||||||
'optional-one'=60
|
'optimistic-register'=60
|
||||||
'exactly-one'=61
|
'crdt'=61
|
||||||
'many-unique'=62
|
'optional-one'=62
|
||||||
'many'=63
|
'exactly-one'=63
|
||||||
'ordered'=64
|
'many-unique'=64
|
||||||
'unit'=65
|
'many'=65
|
||||||
'watch-handle'=66
|
'ordered'=66
|
||||||
'message'=67
|
'unit'=67
|
||||||
'atom-ref'=68
|
'watch-handle'=68
|
||||||
'interface-ref'=69
|
'message'=69
|
||||||
'optional'=70
|
'atom-ref'=70
|
||||||
'list'=71
|
'interface-ref'=71
|
||||||
'bool'=72
|
'optional'=72
|
||||||
'bytes'=73
|
'list'=73
|
||||||
'double'=74
|
'bool'=74
|
||||||
'int32'=75
|
'bytes'=75
|
||||||
'int64'=76
|
'double'=76
|
||||||
'string'=77
|
'int32'=77
|
||||||
'uint32'=78
|
'int64'=78
|
||||||
'uint64'=79
|
'string'=79
|
||||||
'true'=80
|
'uint32'=80
|
||||||
'false'=81
|
'uint64'=81
|
||||||
'null'=82
|
'true'=82
|
||||||
'->'=83
|
'false'=83
|
||||||
':'=84
|
'null'=84
|
||||||
';'=85
|
'->'=85
|
||||||
','=86
|
':'=86
|
||||||
'.'=87
|
';'=87
|
||||||
'{'=88
|
','=88
|
||||||
'}'=89
|
'.'=89
|
||||||
'['=90
|
'{'=90
|
||||||
']'=91
|
'}'=91
|
||||||
'('=92
|
'['=92
|
||||||
')'=93
|
']'=93
|
||||||
'<'=94
|
'('=94
|
||||||
'>'=95
|
')'=95
|
||||||
|
'<'=96
|
||||||
|
'>'=97
|
||||||
|
|||||||
@@ -5,126 +5,128 @@ import { Token } from "antlr4ng";
|
|||||||
|
|
||||||
export class QuixosCapabilityLexer extends antlr.Lexer {
|
export class QuixosCapabilityLexer extends antlr.Lexer {
|
||||||
public static readonly WORKSPACE = 1;
|
public static readonly WORKSPACE = 1;
|
||||||
public static readonly IMPORT = 2;
|
public static readonly FRAGMENT = 2;
|
||||||
public static readonly EXTERNAL = 3;
|
public static readonly IMPORT = 3;
|
||||||
public static readonly ATOM = 4;
|
public static readonly EXTERNAL = 4;
|
||||||
public static readonly INTERFACE = 5;
|
public static readonly ATOM = 5;
|
||||||
public static readonly INTERFACES = 6;
|
public static readonly INTERFACE = 6;
|
||||||
public static readonly PACKAGE = 7;
|
public static readonly INTERFACES = 7;
|
||||||
public static readonly VALUE = 8;
|
public static readonly PACKAGE = 8;
|
||||||
public static readonly RELATION = 9;
|
public static readonly VALUE = 9;
|
||||||
public static readonly OPERATION = 10;
|
public static readonly RELATION = 10;
|
||||||
public static readonly FUNCTION = 11;
|
public static readonly OPERATION = 11;
|
||||||
public static readonly CONSTRUCTOR = 12;
|
public static readonly FUNCTION = 12;
|
||||||
public static readonly CONSTRUCTS = 13;
|
public static readonly CONSTRUCTOR = 13;
|
||||||
public static readonly CONFORM = 14;
|
public static readonly CONSTRUCTS = 14;
|
||||||
public static readonly AS = 15;
|
public static readonly INPUT = 15;
|
||||||
public static readonly BIND = 16;
|
public static readonly CONFORM = 16;
|
||||||
public static readonly TO = 17;
|
public static readonly AS = 17;
|
||||||
public static readonly PRIVATE = 18;
|
public static readonly BIND = 18;
|
||||||
public static readonly SHARED = 19;
|
public static readonly TO = 19;
|
||||||
public static readonly STATE = 20;
|
public static readonly PRIVATE = 20;
|
||||||
public static readonly EDGE = 21;
|
public static readonly SHARED = 21;
|
||||||
public static readonly PROJECTION = 22;
|
public static readonly STATE = 22;
|
||||||
public static readonly WITH = 23;
|
public static readonly EDGE = 23;
|
||||||
public static readonly USING = 24;
|
public static readonly PROJECTION = 24;
|
||||||
public static readonly VIA = 25;
|
public static readonly WITH = 25;
|
||||||
public static readonly MATERIALIZE = 26;
|
public static readonly USING = 26;
|
||||||
public static readonly IF = 27;
|
public static readonly VIA = 27;
|
||||||
public static readonly ABSENT = 28;
|
public static readonly MATERIALIZE = 28;
|
||||||
public static readonly ON = 29;
|
public static readonly IF = 29;
|
||||||
public static readonly POLICY = 30;
|
public static readonly ABSENT = 30;
|
||||||
public static readonly DEFAULT = 31;
|
public static readonly ON = 31;
|
||||||
public static readonly SOURCE = 32;
|
public static readonly POLICY = 32;
|
||||||
public static readonly REPOSITORY = 33;
|
public static readonly DEFAULT = 33;
|
||||||
public static readonly COMMIT = 34;
|
public static readonly SOURCE = 34;
|
||||||
public static readonly REVISION = 35;
|
public static readonly REPOSITORY = 35;
|
||||||
public static readonly ID = 36;
|
public static readonly COMMIT = 36;
|
||||||
public static readonly DOC = 37;
|
public static readonly REVISION = 37;
|
||||||
public static readonly MODE = 38;
|
public static readonly ID = 38;
|
||||||
public static readonly EMITS = 39;
|
public static readonly DOC = 39;
|
||||||
public static readonly RECEIVER = 40;
|
public static readonly MODE = 40;
|
||||||
public static readonly REQUIRES = 41;
|
public static readonly EMITS = 41;
|
||||||
public static readonly ANY = 42;
|
public static readonly RECEIVER = 42;
|
||||||
public static readonly GET = 43;
|
public static readonly REQUIRES = 43;
|
||||||
public static readonly SET = 44;
|
public static readonly ANY = 44;
|
||||||
public static readonly WATCH = 45;
|
public static readonly GET = 45;
|
||||||
public static readonly START = 46;
|
public static readonly SET = 46;
|
||||||
public static readonly STOP = 47;
|
public static readonly WATCH = 47;
|
||||||
public static readonly READ = 48;
|
public static readonly START = 48;
|
||||||
public static readonly WRITE = 49;
|
public static readonly STOP = 49;
|
||||||
public static readonly RESOLVE = 50;
|
public static readonly READ = 50;
|
||||||
public static readonly CONNECT = 51;
|
public static readonly WRITE = 51;
|
||||||
public static readonly DISCONNECT = 52;
|
public static readonly RESOLVE = 52;
|
||||||
public static readonly CALL = 53;
|
public static readonly CONNECT = 53;
|
||||||
public static readonly WATCH_START = 54;
|
public static readonly DISCONNECT = 54;
|
||||||
public static readonly WATCH_STOP = 55;
|
public static readonly CALL = 55;
|
||||||
public static readonly SUBSCRIBE = 56;
|
public static readonly WATCH_START = 56;
|
||||||
public static readonly UNSUBSCRIBE = 57;
|
public static readonly WATCH_STOP = 57;
|
||||||
public static readonly OPTIMISTIC_REGISTER = 58;
|
public static readonly SUBSCRIBE = 58;
|
||||||
public static readonly CRDT = 59;
|
public static readonly UNSUBSCRIBE = 59;
|
||||||
public static readonly OPTIONAL_ONE = 60;
|
public static readonly OPTIMISTIC_REGISTER = 60;
|
||||||
public static readonly EXACTLY_ONE = 61;
|
public static readonly CRDT = 61;
|
||||||
public static readonly MANY_UNIQUE = 62;
|
public static readonly OPTIONAL_ONE = 62;
|
||||||
public static readonly MANY = 63;
|
public static readonly EXACTLY_ONE = 63;
|
||||||
public static readonly ORDERED = 64;
|
public static readonly MANY_UNIQUE = 64;
|
||||||
public static readonly UNIT = 65;
|
public static readonly MANY = 65;
|
||||||
public static readonly WATCH_HANDLE = 66;
|
public static readonly ORDERED = 66;
|
||||||
public static readonly MESSAGE = 67;
|
public static readonly UNIT = 67;
|
||||||
public static readonly ATOM_REF = 68;
|
public static readonly WATCH_HANDLE = 68;
|
||||||
public static readonly INTERFACE_REF = 69;
|
public static readonly MESSAGE = 69;
|
||||||
public static readonly OPTIONAL = 70;
|
public static readonly ATOM_REF = 70;
|
||||||
public static readonly LIST = 71;
|
public static readonly INTERFACE_REF = 71;
|
||||||
public static readonly BOOL = 72;
|
public static readonly OPTIONAL = 72;
|
||||||
public static readonly BYTES = 73;
|
public static readonly LIST = 73;
|
||||||
public static readonly DOUBLE = 74;
|
public static readonly BOOL = 74;
|
||||||
public static readonly INT32 = 75;
|
public static readonly BYTES = 75;
|
||||||
public static readonly INT64 = 76;
|
public static readonly DOUBLE = 76;
|
||||||
public static readonly STRING = 77;
|
public static readonly INT32 = 77;
|
||||||
public static readonly UINT32 = 78;
|
public static readonly INT64 = 78;
|
||||||
public static readonly UINT64 = 79;
|
public static readonly STRING = 79;
|
||||||
public static readonly TRUE = 80;
|
public static readonly UINT32 = 80;
|
||||||
public static readonly FALSE = 81;
|
public static readonly UINT64 = 81;
|
||||||
public static readonly NULL = 82;
|
public static readonly TRUE = 82;
|
||||||
public static readonly ARROW = 83;
|
public static readonly FALSE = 83;
|
||||||
public static readonly COLON = 84;
|
public static readonly NULL = 84;
|
||||||
public static readonly SEMI = 85;
|
public static readonly ARROW = 85;
|
||||||
public static readonly COMMA = 86;
|
public static readonly COLON = 86;
|
||||||
public static readonly DOT = 87;
|
public static readonly SEMI = 87;
|
||||||
public static readonly LBRACE = 88;
|
public static readonly COMMA = 88;
|
||||||
public static readonly RBRACE = 89;
|
public static readonly DOT = 89;
|
||||||
public static readonly LBRACK = 90;
|
public static readonly LBRACE = 90;
|
||||||
public static readonly RBRACK = 91;
|
public static readonly RBRACE = 91;
|
||||||
public static readonly LPAREN = 92;
|
public static readonly LBRACK = 92;
|
||||||
public static readonly RPAREN = 93;
|
public static readonly RBRACK = 93;
|
||||||
public static readonly LT = 94;
|
public static readonly LPAREN = 94;
|
||||||
public static readonly GT = 95;
|
public static readonly RPAREN = 95;
|
||||||
public static readonly INTEGER = 96;
|
public static readonly LT = 96;
|
||||||
public static readonly JSON_NUMBER = 97;
|
public static readonly GT = 97;
|
||||||
public static readonly IDENTIFIER = 98;
|
public static readonly INTEGER = 98;
|
||||||
public static readonly STRING_LITERAL = 99;
|
public static readonly JSON_NUMBER = 99;
|
||||||
public static readonly LINE_COMMENT = 100;
|
public static readonly IDENTIFIER = 100;
|
||||||
public static readonly BLOCK_COMMENT = 101;
|
public static readonly STRING_LITERAL = 101;
|
||||||
public static readonly WS = 102;
|
public static readonly LINE_COMMENT = 102;
|
||||||
|
public static readonly BLOCK_COMMENT = 103;
|
||||||
|
public static readonly WS = 104;
|
||||||
|
|
||||||
public static readonly channelNames = [
|
public static readonly channelNames = [
|
||||||
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
|
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
|
||||||
];
|
];
|
||||||
|
|
||||||
public static readonly literalNames = [
|
public static readonly literalNames = [
|
||||||
null, "'workspace'", "'import'", "'external'", "'atom'", "'interface'",
|
null, "'workspace'", "'fragment'", "'import'", "'external'", "'atom'",
|
||||||
"'interfaces'", "'package'", "'value'", "'relation'", "'operation'",
|
"'interface'", "'interfaces'", "'package'", "'value'", "'relation'",
|
||||||
"'function'", "'constructor'", "'constructs'", "'conform'", "'as'",
|
"'operation'", "'function'", "'constructor'", "'constructs'", "'input'",
|
||||||
"'bind'", "'to'", "'private'", "'shared'", "'state'", "'edge'",
|
"'conform'", "'as'", "'bind'", "'to'", "'private'", "'shared'",
|
||||||
"'projection'", "'with'", "'using'", "'via'", "'materialize'", "'if'",
|
"'state'", "'edge'", "'projection'", "'with'", "'using'", "'via'",
|
||||||
"'absent'", "'on'", "'policy'", "'default'", "'source'", "'repository'",
|
"'materialize'", "'if'", "'absent'", "'on'", "'policy'", "'default'",
|
||||||
"'commit'", "'revision'", "'id'", "'doc'", "'mode'", "'emits'",
|
"'source'", "'repository'", "'commit'", "'revision'", "'id'", "'doc'",
|
||||||
"'receiver'", "'requires'", "'any'", "'get'", "'set'", "'watch'",
|
"'mode'", "'emits'", "'receiver'", "'requires'", "'any'", "'get'",
|
||||||
"'start'", "'stop'", "'read'", "'write'", "'resolve'", "'connect'",
|
"'set'", "'watch'", "'start'", "'stop'", "'read'", "'write'", "'resolve'",
|
||||||
"'disconnect'", "'call'", "'watch-start'", "'watch-stop'", "'subscribe'",
|
"'connect'", "'disconnect'", "'call'", "'watch-start'", "'watch-stop'",
|
||||||
"'unsubscribe'", "'optimistic-register'", "'crdt'", "'optional-one'",
|
"'subscribe'", "'unsubscribe'", "'optimistic-register'", "'crdt'",
|
||||||
"'exactly-one'", "'many-unique'", "'many'", "'ordered'", "'unit'",
|
"'optional-one'", "'exactly-one'", "'many-unique'", "'many'", "'ordered'",
|
||||||
"'watch-handle'", "'message'", "'atom-ref'", "'interface-ref'",
|
"'unit'", "'watch-handle'", "'message'", "'atom-ref'", "'interface-ref'",
|
||||||
"'optional'", "'list'", "'bool'", "'bytes'", "'double'", "'int32'",
|
"'optional'", "'list'", "'bool'", "'bytes'", "'double'", "'int32'",
|
||||||
"'int64'", "'string'", "'uint32'", "'uint64'", "'true'", "'false'",
|
"'int64'", "'string'", "'uint32'", "'uint64'", "'true'", "'false'",
|
||||||
"'null'", "'->'", "':'", "';'", "','", "'.'", "'{'", "'}'", "'['",
|
"'null'", "'->'", "':'", "';'", "','", "'.'", "'{'", "'}'", "'['",
|
||||||
@@ -132,15 +134,15 @@ export class QuixosCapabilityLexer extends antlr.Lexer {
|
|||||||
];
|
];
|
||||||
|
|
||||||
public static readonly symbolicNames = [
|
public static readonly symbolicNames = [
|
||||||
null, "WORKSPACE", "IMPORT", "EXTERNAL", "ATOM", "INTERFACE", "INTERFACES",
|
null, "WORKSPACE", "FRAGMENT", "IMPORT", "EXTERNAL", "ATOM", "INTERFACE",
|
||||||
"PACKAGE", "VALUE", "RELATION", "OPERATION", "FUNCTION", "CONSTRUCTOR",
|
"INTERFACES", "PACKAGE", "VALUE", "RELATION", "OPERATION", "FUNCTION",
|
||||||
"CONSTRUCTS", "CONFORM", "AS", "BIND", "TO", "PRIVATE", "SHARED",
|
"CONSTRUCTOR", "CONSTRUCTS", "INPUT", "CONFORM", "AS", "BIND", "TO",
|
||||||
"STATE", "EDGE", "PROJECTION", "WITH", "USING", "VIA", "MATERIALIZE",
|
"PRIVATE", "SHARED", "STATE", "EDGE", "PROJECTION", "WITH", "USING",
|
||||||
"IF", "ABSENT", "ON", "POLICY", "DEFAULT", "SOURCE", "REPOSITORY",
|
"VIA", "MATERIALIZE", "IF", "ABSENT", "ON", "POLICY", "DEFAULT",
|
||||||
"COMMIT", "REVISION", "ID", "DOC", "MODE", "EMITS", "RECEIVER",
|
"SOURCE", "REPOSITORY", "COMMIT", "REVISION", "ID", "DOC", "MODE",
|
||||||
"REQUIRES", "ANY", "GET", "SET", "WATCH", "START", "STOP", "READ",
|
"EMITS", "RECEIVER", "REQUIRES", "ANY", "GET", "SET", "WATCH", "START",
|
||||||
"WRITE", "RESOLVE", "CONNECT", "DISCONNECT", "CALL", "WATCH_START",
|
"STOP", "READ", "WRITE", "RESOLVE", "CONNECT", "DISCONNECT", "CALL",
|
||||||
"WATCH_STOP", "SUBSCRIBE", "UNSUBSCRIBE", "OPTIMISTIC_REGISTER",
|
"WATCH_START", "WATCH_STOP", "SUBSCRIBE", "UNSUBSCRIBE", "OPTIMISTIC_REGISTER",
|
||||||
"CRDT", "OPTIONAL_ONE", "EXACTLY_ONE", "MANY_UNIQUE", "MANY", "ORDERED",
|
"CRDT", "OPTIONAL_ONE", "EXACTLY_ONE", "MANY_UNIQUE", "MANY", "ORDERED",
|
||||||
"UNIT", "WATCH_HANDLE", "MESSAGE", "ATOM_REF", "INTERFACE_REF",
|
"UNIT", "WATCH_HANDLE", "MESSAGE", "ATOM_REF", "INTERFACE_REF",
|
||||||
"OPTIONAL", "LIST", "BOOL", "BYTES", "DOUBLE", "INT32", "INT64",
|
"OPTIONAL", "LIST", "BOOL", "BYTES", "DOUBLE", "INT32", "INT64",
|
||||||
@@ -155,15 +157,15 @@ export class QuixosCapabilityLexer extends antlr.Lexer {
|
|||||||
];
|
];
|
||||||
|
|
||||||
public static readonly ruleNames = [
|
public static readonly ruleNames = [
|
||||||
"WORKSPACE", "IMPORT", "EXTERNAL", "ATOM", "INTERFACE", "INTERFACES",
|
"WORKSPACE", "FRAGMENT", "IMPORT", "EXTERNAL", "ATOM", "INTERFACE",
|
||||||
"PACKAGE", "VALUE", "RELATION", "OPERATION", "FUNCTION", "CONSTRUCTOR",
|
"INTERFACES", "PACKAGE", "VALUE", "RELATION", "OPERATION", "FUNCTION",
|
||||||
"CONSTRUCTS", "CONFORM", "AS", "BIND", "TO", "PRIVATE", "SHARED",
|
"CONSTRUCTOR", "CONSTRUCTS", "INPUT", "CONFORM", "AS", "BIND", "TO",
|
||||||
"STATE", "EDGE", "PROJECTION", "WITH", "USING", "VIA", "MATERIALIZE",
|
"PRIVATE", "SHARED", "STATE", "EDGE", "PROJECTION", "WITH", "USING",
|
||||||
"IF", "ABSENT", "ON", "POLICY", "DEFAULT", "SOURCE", "REPOSITORY",
|
"VIA", "MATERIALIZE", "IF", "ABSENT", "ON", "POLICY", "DEFAULT",
|
||||||
"COMMIT", "REVISION", "ID", "DOC", "MODE", "EMITS", "RECEIVER",
|
"SOURCE", "REPOSITORY", "COMMIT", "REVISION", "ID", "DOC", "MODE",
|
||||||
"REQUIRES", "ANY", "GET", "SET", "WATCH", "START", "STOP", "READ",
|
"EMITS", "RECEIVER", "REQUIRES", "ANY", "GET", "SET", "WATCH", "START",
|
||||||
"WRITE", "RESOLVE", "CONNECT", "DISCONNECT", "CALL", "WATCH_START",
|
"STOP", "READ", "WRITE", "RESOLVE", "CONNECT", "DISCONNECT", "CALL",
|
||||||
"WATCH_STOP", "SUBSCRIBE", "UNSUBSCRIBE", "OPTIMISTIC_REGISTER",
|
"WATCH_START", "WATCH_STOP", "SUBSCRIBE", "UNSUBSCRIBE", "OPTIMISTIC_REGISTER",
|
||||||
"CRDT", "OPTIONAL_ONE", "EXACTLY_ONE", "MANY_UNIQUE", "MANY", "ORDERED",
|
"CRDT", "OPTIONAL_ONE", "EXACTLY_ONE", "MANY_UNIQUE", "MANY", "ORDERED",
|
||||||
"UNIT", "WATCH_HANDLE", "MESSAGE", "ATOM_REF", "INTERFACE_REF",
|
"UNIT", "WATCH_HANDLE", "MESSAGE", "ATOM_REF", "INTERFACE_REF",
|
||||||
"OPTIONAL", "LIST", "BOOL", "BYTES", "DOUBLE", "INT32", "INT64",
|
"OPTIONAL", "LIST", "BOOL", "BYTES", "DOUBLE", "INT32", "INT64",
|
||||||
@@ -193,7 +195,7 @@ export class QuixosCapabilityLexer extends antlr.Lexer {
|
|||||||
public get modeNames(): string[] { return QuixosCapabilityLexer.modeNames; }
|
public get modeNames(): string[] { return QuixosCapabilityLexer.modeNames; }
|
||||||
|
|
||||||
public static readonly _serializedATN: number[] = [
|
public static readonly _serializedATN: number[] = [
|
||||||
4,0,102,957,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,
|
4,0,104,976,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,
|
||||||
2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,
|
2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,
|
||||||
13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,
|
13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,
|
||||||
19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,
|
19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,
|
||||||
@@ -209,331 +211,338 @@ export class QuixosCapabilityLexer extends antlr.Lexer {
|
|||||||
84,2,85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,2,
|
84,2,85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,2,
|
||||||
91,7,91,2,92,7,92,2,93,7,93,2,94,7,94,2,95,7,95,2,96,7,96,2,97,7,
|
91,7,91,2,92,7,92,2,93,7,93,2,94,7,94,2,95,7,95,2,96,7,96,2,97,7,
|
||||||
97,2,98,7,98,2,99,7,99,2,100,7,100,2,101,7,101,2,102,7,102,2,103,
|
97,2,98,7,98,2,99,7,99,2,100,7,100,2,101,7,101,2,102,7,102,2,103,
|
||||||
7,103,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,
|
7,103,2,104,7,104,2,105,7,105,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
|
||||||
1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,
|
0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,
|
||||||
3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,
|
2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1,
|
||||||
5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,
|
5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,
|
||||||
7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,
|
6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,
|
||||||
9,1,9,1,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,
|
8,1,8,1,8,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,
|
||||||
1,10,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,
|
1,10,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,11,1,11,
|
||||||
1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,13,1,13,
|
1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,
|
||||||
1,13,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,15,1,15,1,15,1,15,
|
1,12,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,14,
|
||||||
1,15,1,16,1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,18,
|
1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,
|
||||||
1,18,1,18,1,18,1,18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,20,
|
1,16,1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,18,1,18,1,18,1,19,1,19,
|
||||||
1,20,1,20,1,20,1,20,1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,21,
|
1,19,1,19,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,20,1,20,1,20,1,20,
|
||||||
1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,23,1,23,1,23,1,23,1,23,1,23,
|
1,21,1,21,1,21,1,21,1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,23,1,23,
|
||||||
1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,
|
1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,
|
||||||
1,25,1,25,1,25,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,27,1,27,
|
1,24,1,25,1,25,1,25,1,25,1,25,1,25,1,26,1,26,1,26,1,26,1,27,1,27,
|
||||||
1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,30,1,30,1,30,
|
1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,
|
||||||
1,30,1,30,1,30,1,30,1,30,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,32,
|
1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,31,1,31,1,31,
|
||||||
1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,33,1,33,1,33,
|
1,31,1,31,1,31,1,31,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,33,
|
||||||
1,33,1,33,1,33,1,33,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,
|
1,33,1,33,1,33,1,33,1,33,1,33,1,34,1,34,1,34,1,34,1,34,1,34,1,34,
|
||||||
1,35,1,35,1,35,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,37,1,38,
|
1,34,1,34,1,34,1,34,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,36,1,36,
|
||||||
1,38,1,38,1,38,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,39,1,39,1,39,
|
1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,38,1,38,1,38,
|
||||||
1,39,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,41,1,41,1,41,
|
1,38,1,39,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,40,1,40,1,41,
|
||||||
1,41,1,42,1,42,1,42,1,42,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,
|
1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,1,42,1,42,1,42,1,42,1,42,
|
||||||
1,44,1,44,1,45,1,45,1,45,1,45,1,45,1,45,1,46,1,46,1,46,1,46,1,46,
|
1,42,1,42,1,42,1,42,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,45,
|
||||||
1,47,1,47,1,47,1,47,1,47,1,48,1,48,1,48,1,48,1,48,1,48,1,49,1,49,
|
1,45,1,45,1,45,1,46,1,46,1,46,1,46,1,46,1,46,1,47,1,47,1,47,1,47,
|
||||||
1,49,1,49,1,49,1,49,1,49,1,49,1,50,1,50,1,50,1,50,1,50,1,50,1,50,
|
1,47,1,47,1,48,1,48,1,48,1,48,1,48,1,49,1,49,1,49,1,49,1,49,1,50,
|
||||||
1,50,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,52,
|
1,50,1,50,1,50,1,50,1,50,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,
|
||||||
1,52,1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,
|
1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,
|
||||||
1,53,1,53,1,53,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,
|
1,53,1,53,1,53,1,53,1,53,1,53,1,54,1,54,1,54,1,54,1,54,1,55,1,55,
|
||||||
1,54,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,56,1,56,
|
1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,56,1,56,1,56,
|
||||||
1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,57,1,57,1,57,
|
1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,57,1,57,1,57,1,57,1,57,
|
||||||
1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,1,57,
|
1,57,1,57,1,57,1,57,1,57,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,
|
||||||
1,57,1,57,1,57,1,57,1,58,1,58,1,58,1,58,1,58,1,59,1,59,1,59,1,59,
|
1,58,1,58,1,58,1,58,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,
|
||||||
1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,60,1,60,1,60,1,60,
|
1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,60,1,60,
|
||||||
1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,61,1,61,1,61,1,61,1,61,
|
1,60,1,60,1,60,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,
|
||||||
1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,62,1,62,1,62,1,62,1,62,1,63,
|
1,61,1,61,1,61,1,62,1,62,1,62,1,62,1,62,1,62,1,62,1,62,1,62,1,62,
|
||||||
1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,64,1,64,1,64,1,64,1,64,1,65,
|
1,62,1,62,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,
|
||||||
1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,66,
|
1,63,1,64,1,64,1,64,1,64,1,64,1,65,1,65,1,65,1,65,1,65,1,65,1,65,
|
||||||
1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,67,1,67,1,67,1,67,1,67,1,67,
|
1,65,1,66,1,66,1,66,1,66,1,66,1,67,1,67,1,67,1,67,1,67,1,67,1,67,
|
||||||
1,67,1,67,1,67,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,
|
1,67,1,67,1,67,1,67,1,67,1,67,1,68,1,68,1,68,1,68,1,68,1,68,1,68,
|
||||||
1,68,1,68,1,68,1,68,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,
|
1,68,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,70,1,70,1,70,
|
||||||
1,70,1,70,1,70,1,70,1,70,1,71,1,71,1,71,1,71,1,71,1,72,1,72,1,72,
|
1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,71,1,71,
|
||||||
1,72,1,72,1,72,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,74,1,74,1,74,
|
1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,72,1,72,1,72,1,72,1,72,1,73,
|
||||||
1,74,1,74,1,74,1,75,1,75,1,75,1,75,1,75,1,75,1,76,1,76,1,76,1,76,
|
1,73,1,73,1,73,1,73,1,74,1,74,1,74,1,74,1,74,1,74,1,75,1,75,1,75,
|
||||||
1,76,1,76,1,76,1,77,1,77,1,77,1,77,1,77,1,77,1,77,1,78,1,78,1,78,
|
1,75,1,75,1,75,1,75,1,76,1,76,1,76,1,76,1,76,1,76,1,77,1,77,1,77,
|
||||||
1,78,1,78,1,78,1,78,1,79,1,79,1,79,1,79,1,79,1,80,1,80,1,80,1,80,
|
1,77,1,77,1,77,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,79,1,79,1,79,
|
||||||
1,80,1,80,1,81,1,81,1,81,1,81,1,81,1,82,1,82,1,82,1,83,1,83,1,84,
|
1,79,1,79,1,79,1,79,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,81,1,81,
|
||||||
1,84,1,85,1,85,1,86,1,86,1,87,1,87,1,88,1,88,1,89,1,89,1,90,1,90,
|
1,81,1,81,1,81,1,82,1,82,1,82,1,82,1,82,1,82,1,83,1,83,1,83,1,83,
|
||||||
1,91,1,91,1,92,1,92,1,93,1,93,1,94,1,94,1,95,3,95,858,8,95,1,95,
|
1,83,1,84,1,84,1,84,1,85,1,85,1,86,1,86,1,87,1,87,1,88,1,88,1,89,
|
||||||
4,95,861,8,95,11,95,12,95,862,1,96,3,96,866,8,96,1,96,1,96,1,96,
|
1,89,1,90,1,90,1,91,1,91,1,92,1,92,1,93,1,93,1,94,1,94,1,95,1,95,
|
||||||
5,96,871,8,96,10,96,12,96,874,9,96,3,96,876,8,96,1,96,1,96,4,96,
|
1,96,1,96,1,97,3,97,877,8,97,1,97,4,97,880,8,97,11,97,12,97,881,
|
||||||
880,8,96,11,96,12,96,881,3,96,884,8,96,1,96,1,96,3,96,888,8,96,1,
|
1,98,3,98,885,8,98,1,98,1,98,1,98,5,98,890,8,98,10,98,12,98,893,
|
||||||
96,4,96,891,8,96,11,96,12,96,892,3,96,895,8,96,1,97,1,97,5,97,899,
|
9,98,3,98,895,8,98,1,98,1,98,4,98,899,8,98,11,98,12,98,900,3,98,
|
||||||
8,97,10,97,12,97,902,9,97,1,98,1,98,1,98,5,98,907,8,98,10,98,12,
|
903,8,98,1,98,1,98,3,98,907,8,98,1,98,4,98,910,8,98,11,98,12,98,
|
||||||
98,910,9,98,1,98,1,98,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,3,
|
911,3,98,914,8,98,1,99,1,99,5,99,918,8,99,10,99,12,99,921,9,99,1,
|
||||||
99,922,8,99,1,100,1,100,1,101,1,101,1,101,1,101,5,101,930,8,101,
|
100,1,100,1,100,5,100,926,8,100,10,100,12,100,929,9,100,1,100,1,
|
||||||
10,101,12,101,933,9,101,1,101,1,101,1,102,1,102,1,102,1,102,5,102,
|
100,1,101,1,101,1,101,1,101,1,101,1,101,1,101,1,101,3,101,941,8,
|
||||||
941,8,102,10,102,12,102,944,9,102,1,102,1,102,1,102,1,102,1,102,
|
101,1,102,1,102,1,103,1,103,1,103,1,103,5,103,949,8,103,10,103,12,
|
||||||
1,103,4,103,952,8,103,11,103,12,103,953,1,103,1,103,1,942,0,104,
|
103,952,9,103,1,103,1,103,1,104,1,104,1,104,1,104,5,104,960,8,104,
|
||||||
1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,
|
10,104,12,104,963,9,104,1,104,1,104,1,104,1,104,1,104,1,105,4,105,
|
||||||
27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,
|
971,8,105,11,105,12,105,972,1,105,1,105,1,961,0,106,1,1,3,2,5,3,
|
||||||
49,25,51,26,53,27,55,28,57,29,59,30,61,31,63,32,65,33,67,34,69,35,
|
7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,
|
||||||
71,36,73,37,75,38,77,39,79,40,81,41,83,42,85,43,87,44,89,45,91,46,
|
31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,
|
||||||
93,47,95,48,97,49,99,50,101,51,103,52,105,53,107,54,109,55,111,56,
|
53,27,55,28,57,29,59,30,61,31,63,32,65,33,67,34,69,35,71,36,73,37,
|
||||||
113,57,115,58,117,59,119,60,121,61,123,62,125,63,127,64,129,65,131,
|
75,38,77,39,79,40,81,41,83,42,85,43,87,44,89,45,91,46,93,47,95,48,
|
||||||
66,133,67,135,68,137,69,139,70,141,71,143,72,145,73,147,74,149,75,
|
97,49,99,50,101,51,103,52,105,53,107,54,109,55,111,56,113,57,115,
|
||||||
151,76,153,77,155,78,157,79,159,80,161,81,163,82,165,83,167,84,169,
|
58,117,59,119,60,121,61,123,62,125,63,127,64,129,65,131,66,133,67,
|
||||||
85,171,86,173,87,175,88,177,89,179,90,181,91,183,92,185,93,187,94,
|
135,68,137,69,139,70,141,71,143,72,145,73,147,74,149,75,151,76,153,
|
||||||
189,95,191,96,193,97,195,98,197,99,199,0,201,0,203,100,205,101,207,
|
77,155,78,157,79,159,80,161,81,163,82,165,83,167,84,169,85,171,86,
|
||||||
102,1,0,11,1,0,48,57,1,0,49,57,2,0,69,69,101,101,2,0,43,43,45,45,
|
173,87,175,88,177,89,179,90,181,91,183,92,185,93,187,94,189,95,191,
|
||||||
3,0,65,90,95,95,97,122,4,0,48,57,65,90,95,95,97,122,4,0,10,10,13,
|
96,193,97,195,98,197,99,199,100,201,101,203,0,205,0,207,102,209,
|
||||||
13,34,34,92,92,8,0,34,34,47,47,92,92,98,98,102,102,110,110,114,114,
|
103,211,104,1,0,11,1,0,48,57,1,0,49,57,2,0,69,69,101,101,2,0,43,
|
||||||
116,116,3,0,48,57,65,70,97,102,2,0,10,10,13,13,3,0,9,10,13,13,32,
|
43,45,45,3,0,65,90,95,95,97,122,4,0,48,57,65,90,95,95,97,122,4,0,
|
||||||
32,971,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,
|
10,10,13,13,34,34,92,92,8,0,34,34,47,47,92,92,98,98,102,102,110,
|
||||||
0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,
|
110,114,114,116,116,3,0,48,57,65,70,97,102,2,0,10,10,13,13,3,0,9,
|
||||||
0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,
|
10,13,13,32,32,990,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,
|
||||||
0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,
|
0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,
|
||||||
0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,
|
0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,
|
||||||
0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,
|
0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,
|
||||||
0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,
|
0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,
|
||||||
0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,
|
0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,
|
||||||
0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,
|
0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,
|
||||||
0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,
|
0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,
|
||||||
0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,
|
0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,
|
||||||
1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,1,0,0,0,0,117,1,0,0,0,
|
0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,
|
||||||
0,119,1,0,0,0,0,121,1,0,0,0,0,123,1,0,0,0,0,125,1,0,0,0,0,127,1,
|
0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1,
|
||||||
0,0,0,0,129,1,0,0,0,0,131,1,0,0,0,0,133,1,0,0,0,0,135,1,0,0,0,0,
|
0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,1,0,0,0,0,
|
||||||
137,1,0,0,0,0,139,1,0,0,0,0,141,1,0,0,0,0,143,1,0,0,0,0,145,1,0,
|
117,1,0,0,0,0,119,1,0,0,0,0,121,1,0,0,0,0,123,1,0,0,0,0,125,1,0,
|
||||||
0,0,0,147,1,0,0,0,0,149,1,0,0,0,0,151,1,0,0,0,0,153,1,0,0,0,0,155,
|
0,0,0,127,1,0,0,0,0,129,1,0,0,0,0,131,1,0,0,0,0,133,1,0,0,0,0,135,
|
||||||
1,0,0,0,0,157,1,0,0,0,0,159,1,0,0,0,0,161,1,0,0,0,0,163,1,0,0,0,
|
1,0,0,0,0,137,1,0,0,0,0,139,1,0,0,0,0,141,1,0,0,0,0,143,1,0,0,0,
|
||||||
0,165,1,0,0,0,0,167,1,0,0,0,0,169,1,0,0,0,0,171,1,0,0,0,0,173,1,
|
0,145,1,0,0,0,0,147,1,0,0,0,0,149,1,0,0,0,0,151,1,0,0,0,0,153,1,
|
||||||
0,0,0,0,175,1,0,0,0,0,177,1,0,0,0,0,179,1,0,0,0,0,181,1,0,0,0,0,
|
0,0,0,0,155,1,0,0,0,0,157,1,0,0,0,0,159,1,0,0,0,0,161,1,0,0,0,0,
|
||||||
183,1,0,0,0,0,185,1,0,0,0,0,187,1,0,0,0,0,189,1,0,0,0,0,191,1,0,
|
163,1,0,0,0,0,165,1,0,0,0,0,167,1,0,0,0,0,169,1,0,0,0,0,171,1,0,
|
||||||
0,0,0,193,1,0,0,0,0,195,1,0,0,0,0,197,1,0,0,0,0,203,1,0,0,0,0,205,
|
0,0,0,173,1,0,0,0,0,175,1,0,0,0,0,177,1,0,0,0,0,179,1,0,0,0,0,181,
|
||||||
1,0,0,0,0,207,1,0,0,0,1,209,1,0,0,0,3,219,1,0,0,0,5,226,1,0,0,0,
|
1,0,0,0,0,183,1,0,0,0,0,185,1,0,0,0,0,187,1,0,0,0,0,189,1,0,0,0,
|
||||||
7,235,1,0,0,0,9,240,1,0,0,0,11,250,1,0,0,0,13,261,1,0,0,0,15,269,
|
0,191,1,0,0,0,0,193,1,0,0,0,0,195,1,0,0,0,0,197,1,0,0,0,0,199,1,
|
||||||
1,0,0,0,17,275,1,0,0,0,19,284,1,0,0,0,21,294,1,0,0,0,23,303,1,0,
|
0,0,0,0,201,1,0,0,0,0,207,1,0,0,0,0,209,1,0,0,0,0,211,1,0,0,0,1,
|
||||||
0,0,25,315,1,0,0,0,27,326,1,0,0,0,29,334,1,0,0,0,31,337,1,0,0,0,
|
213,1,0,0,0,3,223,1,0,0,0,5,232,1,0,0,0,7,239,1,0,0,0,9,248,1,0,
|
||||||
33,342,1,0,0,0,35,345,1,0,0,0,37,353,1,0,0,0,39,360,1,0,0,0,41,366,
|
0,0,11,253,1,0,0,0,13,263,1,0,0,0,15,274,1,0,0,0,17,282,1,0,0,0,
|
||||||
1,0,0,0,43,371,1,0,0,0,45,382,1,0,0,0,47,387,1,0,0,0,49,393,1,0,
|
19,288,1,0,0,0,21,297,1,0,0,0,23,307,1,0,0,0,25,316,1,0,0,0,27,328,
|
||||||
0,0,51,397,1,0,0,0,53,409,1,0,0,0,55,412,1,0,0,0,57,419,1,0,0,0,
|
1,0,0,0,29,339,1,0,0,0,31,345,1,0,0,0,33,353,1,0,0,0,35,356,1,0,
|
||||||
59,422,1,0,0,0,61,429,1,0,0,0,63,437,1,0,0,0,65,444,1,0,0,0,67,455,
|
0,0,37,361,1,0,0,0,39,364,1,0,0,0,41,372,1,0,0,0,43,379,1,0,0,0,
|
||||||
1,0,0,0,69,462,1,0,0,0,71,471,1,0,0,0,73,474,1,0,0,0,75,478,1,0,
|
45,385,1,0,0,0,47,390,1,0,0,0,49,401,1,0,0,0,51,406,1,0,0,0,53,412,
|
||||||
0,0,77,483,1,0,0,0,79,489,1,0,0,0,81,498,1,0,0,0,83,507,1,0,0,0,
|
1,0,0,0,55,416,1,0,0,0,57,428,1,0,0,0,59,431,1,0,0,0,61,438,1,0,
|
||||||
85,511,1,0,0,0,87,515,1,0,0,0,89,519,1,0,0,0,91,525,1,0,0,0,93,531,
|
0,0,63,441,1,0,0,0,65,448,1,0,0,0,67,456,1,0,0,0,69,463,1,0,0,0,
|
||||||
1,0,0,0,95,536,1,0,0,0,97,541,1,0,0,0,99,547,1,0,0,0,101,555,1,0,
|
71,474,1,0,0,0,73,481,1,0,0,0,75,490,1,0,0,0,77,493,1,0,0,0,79,497,
|
||||||
0,0,103,563,1,0,0,0,105,574,1,0,0,0,107,579,1,0,0,0,109,591,1,0,
|
1,0,0,0,81,502,1,0,0,0,83,508,1,0,0,0,85,517,1,0,0,0,87,526,1,0,
|
||||||
0,0,111,602,1,0,0,0,113,612,1,0,0,0,115,624,1,0,0,0,117,644,1,0,
|
0,0,89,530,1,0,0,0,91,534,1,0,0,0,93,538,1,0,0,0,95,544,1,0,0,0,
|
||||||
0,0,119,649,1,0,0,0,121,662,1,0,0,0,123,674,1,0,0,0,125,686,1,0,
|
97,550,1,0,0,0,99,555,1,0,0,0,101,560,1,0,0,0,103,566,1,0,0,0,105,
|
||||||
0,0,127,691,1,0,0,0,129,699,1,0,0,0,131,704,1,0,0,0,133,717,1,0,
|
574,1,0,0,0,107,582,1,0,0,0,109,593,1,0,0,0,111,598,1,0,0,0,113,
|
||||||
0,0,135,725,1,0,0,0,137,734,1,0,0,0,139,748,1,0,0,0,141,757,1,0,
|
610,1,0,0,0,115,621,1,0,0,0,117,631,1,0,0,0,119,643,1,0,0,0,121,
|
||||||
0,0,143,762,1,0,0,0,145,767,1,0,0,0,147,773,1,0,0,0,149,780,1,0,
|
663,1,0,0,0,123,668,1,0,0,0,125,681,1,0,0,0,127,693,1,0,0,0,129,
|
||||||
0,0,151,786,1,0,0,0,153,792,1,0,0,0,155,799,1,0,0,0,157,806,1,0,
|
705,1,0,0,0,131,710,1,0,0,0,133,718,1,0,0,0,135,723,1,0,0,0,137,
|
||||||
0,0,159,813,1,0,0,0,161,818,1,0,0,0,163,824,1,0,0,0,165,829,1,0,
|
736,1,0,0,0,139,744,1,0,0,0,141,753,1,0,0,0,143,767,1,0,0,0,145,
|
||||||
0,0,167,832,1,0,0,0,169,834,1,0,0,0,171,836,1,0,0,0,173,838,1,0,
|
776,1,0,0,0,147,781,1,0,0,0,149,786,1,0,0,0,151,792,1,0,0,0,153,
|
||||||
0,0,175,840,1,0,0,0,177,842,1,0,0,0,179,844,1,0,0,0,181,846,1,0,
|
799,1,0,0,0,155,805,1,0,0,0,157,811,1,0,0,0,159,818,1,0,0,0,161,
|
||||||
0,0,183,848,1,0,0,0,185,850,1,0,0,0,187,852,1,0,0,0,189,854,1,0,
|
825,1,0,0,0,163,832,1,0,0,0,165,837,1,0,0,0,167,843,1,0,0,0,169,
|
||||||
0,0,191,857,1,0,0,0,193,865,1,0,0,0,195,896,1,0,0,0,197,903,1,0,
|
848,1,0,0,0,171,851,1,0,0,0,173,853,1,0,0,0,175,855,1,0,0,0,177,
|
||||||
0,0,199,913,1,0,0,0,201,923,1,0,0,0,203,925,1,0,0,0,205,936,1,0,
|
857,1,0,0,0,179,859,1,0,0,0,181,861,1,0,0,0,183,863,1,0,0,0,185,
|
||||||
0,0,207,951,1,0,0,0,209,210,5,119,0,0,210,211,5,111,0,0,211,212,
|
865,1,0,0,0,187,867,1,0,0,0,189,869,1,0,0,0,191,871,1,0,0,0,193,
|
||||||
5,114,0,0,212,213,5,107,0,0,213,214,5,115,0,0,214,215,5,112,0,0,
|
873,1,0,0,0,195,876,1,0,0,0,197,884,1,0,0,0,199,915,1,0,0,0,201,
|
||||||
215,216,5,97,0,0,216,217,5,99,0,0,217,218,5,101,0,0,218,2,1,0,0,
|
922,1,0,0,0,203,932,1,0,0,0,205,942,1,0,0,0,207,944,1,0,0,0,209,
|
||||||
0,219,220,5,105,0,0,220,221,5,109,0,0,221,222,5,112,0,0,222,223,
|
955,1,0,0,0,211,970,1,0,0,0,213,214,5,119,0,0,214,215,5,111,0,0,
|
||||||
5,111,0,0,223,224,5,114,0,0,224,225,5,116,0,0,225,4,1,0,0,0,226,
|
215,216,5,114,0,0,216,217,5,107,0,0,217,218,5,115,0,0,218,219,5,
|
||||||
227,5,101,0,0,227,228,5,120,0,0,228,229,5,116,0,0,229,230,5,101,
|
112,0,0,219,220,5,97,0,0,220,221,5,99,0,0,221,222,5,101,0,0,222,
|
||||||
0,0,230,231,5,114,0,0,231,232,5,110,0,0,232,233,5,97,0,0,233,234,
|
2,1,0,0,0,223,224,5,102,0,0,224,225,5,114,0,0,225,226,5,97,0,0,226,
|
||||||
5,108,0,0,234,6,1,0,0,0,235,236,5,97,0,0,236,237,5,116,0,0,237,238,
|
227,5,103,0,0,227,228,5,109,0,0,228,229,5,101,0,0,229,230,5,110,
|
||||||
5,111,0,0,238,239,5,109,0,0,239,8,1,0,0,0,240,241,5,105,0,0,241,
|
0,0,230,231,5,116,0,0,231,4,1,0,0,0,232,233,5,105,0,0,233,234,5,
|
||||||
242,5,110,0,0,242,243,5,116,0,0,243,244,5,101,0,0,244,245,5,114,
|
109,0,0,234,235,5,112,0,0,235,236,5,111,0,0,236,237,5,114,0,0,237,
|
||||||
0,0,245,246,5,102,0,0,246,247,5,97,0,0,247,248,5,99,0,0,248,249,
|
238,5,116,0,0,238,6,1,0,0,0,239,240,5,101,0,0,240,241,5,120,0,0,
|
||||||
5,101,0,0,249,10,1,0,0,0,250,251,5,105,0,0,251,252,5,110,0,0,252,
|
241,242,5,116,0,0,242,243,5,101,0,0,243,244,5,114,0,0,244,245,5,
|
||||||
253,5,116,0,0,253,254,5,101,0,0,254,255,5,114,0,0,255,256,5,102,
|
110,0,0,245,246,5,97,0,0,246,247,5,108,0,0,247,8,1,0,0,0,248,249,
|
||||||
0,0,256,257,5,97,0,0,257,258,5,99,0,0,258,259,5,101,0,0,259,260,
|
5,97,0,0,249,250,5,116,0,0,250,251,5,111,0,0,251,252,5,109,0,0,252,
|
||||||
5,115,0,0,260,12,1,0,0,0,261,262,5,112,0,0,262,263,5,97,0,0,263,
|
10,1,0,0,0,253,254,5,105,0,0,254,255,5,110,0,0,255,256,5,116,0,0,
|
||||||
264,5,99,0,0,264,265,5,107,0,0,265,266,5,97,0,0,266,267,5,103,0,
|
256,257,5,101,0,0,257,258,5,114,0,0,258,259,5,102,0,0,259,260,5,
|
||||||
0,267,268,5,101,0,0,268,14,1,0,0,0,269,270,5,118,0,0,270,271,5,97,
|
97,0,0,260,261,5,99,0,0,261,262,5,101,0,0,262,12,1,0,0,0,263,264,
|
||||||
0,0,271,272,5,108,0,0,272,273,5,117,0,0,273,274,5,101,0,0,274,16,
|
5,105,0,0,264,265,5,110,0,0,265,266,5,116,0,0,266,267,5,101,0,0,
|
||||||
1,0,0,0,275,276,5,114,0,0,276,277,5,101,0,0,277,278,5,108,0,0,278,
|
267,268,5,114,0,0,268,269,5,102,0,0,269,270,5,97,0,0,270,271,5,99,
|
||||||
279,5,97,0,0,279,280,5,116,0,0,280,281,5,105,0,0,281,282,5,111,0,
|
0,0,271,272,5,101,0,0,272,273,5,115,0,0,273,14,1,0,0,0,274,275,5,
|
||||||
0,282,283,5,110,0,0,283,18,1,0,0,0,284,285,5,111,0,0,285,286,5,112,
|
112,0,0,275,276,5,97,0,0,276,277,5,99,0,0,277,278,5,107,0,0,278,
|
||||||
0,0,286,287,5,101,0,0,287,288,5,114,0,0,288,289,5,97,0,0,289,290,
|
279,5,97,0,0,279,280,5,103,0,0,280,281,5,101,0,0,281,16,1,0,0,0,
|
||||||
5,116,0,0,290,291,5,105,0,0,291,292,5,111,0,0,292,293,5,110,0,0,
|
282,283,5,118,0,0,283,284,5,97,0,0,284,285,5,108,0,0,285,286,5,117,
|
||||||
293,20,1,0,0,0,294,295,5,102,0,0,295,296,5,117,0,0,296,297,5,110,
|
0,0,286,287,5,101,0,0,287,18,1,0,0,0,288,289,5,114,0,0,289,290,5,
|
||||||
0,0,297,298,5,99,0,0,298,299,5,116,0,0,299,300,5,105,0,0,300,301,
|
101,0,0,290,291,5,108,0,0,291,292,5,97,0,0,292,293,5,116,0,0,293,
|
||||||
5,111,0,0,301,302,5,110,0,0,302,22,1,0,0,0,303,304,5,99,0,0,304,
|
294,5,105,0,0,294,295,5,111,0,0,295,296,5,110,0,0,296,20,1,0,0,0,
|
||||||
305,5,111,0,0,305,306,5,110,0,0,306,307,5,115,0,0,307,308,5,116,
|
297,298,5,111,0,0,298,299,5,112,0,0,299,300,5,101,0,0,300,301,5,
|
||||||
0,0,308,309,5,114,0,0,309,310,5,117,0,0,310,311,5,99,0,0,311,312,
|
114,0,0,301,302,5,97,0,0,302,303,5,116,0,0,303,304,5,105,0,0,304,
|
||||||
5,116,0,0,312,313,5,111,0,0,313,314,5,114,0,0,314,24,1,0,0,0,315,
|
305,5,111,0,0,305,306,5,110,0,0,306,22,1,0,0,0,307,308,5,102,0,0,
|
||||||
316,5,99,0,0,316,317,5,111,0,0,317,318,5,110,0,0,318,319,5,115,0,
|
308,309,5,117,0,0,309,310,5,110,0,0,310,311,5,99,0,0,311,312,5,116,
|
||||||
0,319,320,5,116,0,0,320,321,5,114,0,0,321,322,5,117,0,0,322,323,
|
0,0,312,313,5,105,0,0,313,314,5,111,0,0,314,315,5,110,0,0,315,24,
|
||||||
5,99,0,0,323,324,5,116,0,0,324,325,5,115,0,0,325,26,1,0,0,0,326,
|
1,0,0,0,316,317,5,99,0,0,317,318,5,111,0,0,318,319,5,110,0,0,319,
|
||||||
327,5,99,0,0,327,328,5,111,0,0,328,329,5,110,0,0,329,330,5,102,0,
|
320,5,115,0,0,320,321,5,116,0,0,321,322,5,114,0,0,322,323,5,117,
|
||||||
0,330,331,5,111,0,0,331,332,5,114,0,0,332,333,5,109,0,0,333,28,1,
|
0,0,323,324,5,99,0,0,324,325,5,116,0,0,325,326,5,111,0,0,326,327,
|
||||||
0,0,0,334,335,5,97,0,0,335,336,5,115,0,0,336,30,1,0,0,0,337,338,
|
5,114,0,0,327,26,1,0,0,0,328,329,5,99,0,0,329,330,5,111,0,0,330,
|
||||||
5,98,0,0,338,339,5,105,0,0,339,340,5,110,0,0,340,341,5,100,0,0,341,
|
331,5,110,0,0,331,332,5,115,0,0,332,333,5,116,0,0,333,334,5,114,
|
||||||
32,1,0,0,0,342,343,5,116,0,0,343,344,5,111,0,0,344,34,1,0,0,0,345,
|
0,0,334,335,5,117,0,0,335,336,5,99,0,0,336,337,5,116,0,0,337,338,
|
||||||
346,5,112,0,0,346,347,5,114,0,0,347,348,5,105,0,0,348,349,5,118,
|
5,115,0,0,338,28,1,0,0,0,339,340,5,105,0,0,340,341,5,110,0,0,341,
|
||||||
0,0,349,350,5,97,0,0,350,351,5,116,0,0,351,352,5,101,0,0,352,36,
|
342,5,112,0,0,342,343,5,117,0,0,343,344,5,116,0,0,344,30,1,0,0,0,
|
||||||
1,0,0,0,353,354,5,115,0,0,354,355,5,104,0,0,355,356,5,97,0,0,356,
|
345,346,5,99,0,0,346,347,5,111,0,0,347,348,5,110,0,0,348,349,5,102,
|
||||||
357,5,114,0,0,357,358,5,101,0,0,358,359,5,100,0,0,359,38,1,0,0,0,
|
0,0,349,350,5,111,0,0,350,351,5,114,0,0,351,352,5,109,0,0,352,32,
|
||||||
360,361,5,115,0,0,361,362,5,116,0,0,362,363,5,97,0,0,363,364,5,116,
|
1,0,0,0,353,354,5,97,0,0,354,355,5,115,0,0,355,34,1,0,0,0,356,357,
|
||||||
0,0,364,365,5,101,0,0,365,40,1,0,0,0,366,367,5,101,0,0,367,368,5,
|
5,98,0,0,357,358,5,105,0,0,358,359,5,110,0,0,359,360,5,100,0,0,360,
|
||||||
100,0,0,368,369,5,103,0,0,369,370,5,101,0,0,370,42,1,0,0,0,371,372,
|
36,1,0,0,0,361,362,5,116,0,0,362,363,5,111,0,0,363,38,1,0,0,0,364,
|
||||||
5,112,0,0,372,373,5,114,0,0,373,374,5,111,0,0,374,375,5,106,0,0,
|
365,5,112,0,0,365,366,5,114,0,0,366,367,5,105,0,0,367,368,5,118,
|
||||||
375,376,5,101,0,0,376,377,5,99,0,0,377,378,5,116,0,0,378,379,5,105,
|
0,0,368,369,5,97,0,0,369,370,5,116,0,0,370,371,5,101,0,0,371,40,
|
||||||
0,0,379,380,5,111,0,0,380,381,5,110,0,0,381,44,1,0,0,0,382,383,5,
|
1,0,0,0,372,373,5,115,0,0,373,374,5,104,0,0,374,375,5,97,0,0,375,
|
||||||
119,0,0,383,384,5,105,0,0,384,385,5,116,0,0,385,386,5,104,0,0,386,
|
376,5,114,0,0,376,377,5,101,0,0,377,378,5,100,0,0,378,42,1,0,0,0,
|
||||||
46,1,0,0,0,387,388,5,117,0,0,388,389,5,115,0,0,389,390,5,105,0,0,
|
379,380,5,115,0,0,380,381,5,116,0,0,381,382,5,97,0,0,382,383,5,116,
|
||||||
390,391,5,110,0,0,391,392,5,103,0,0,392,48,1,0,0,0,393,394,5,118,
|
0,0,383,384,5,101,0,0,384,44,1,0,0,0,385,386,5,101,0,0,386,387,5,
|
||||||
0,0,394,395,5,105,0,0,395,396,5,97,0,0,396,50,1,0,0,0,397,398,5,
|
100,0,0,387,388,5,103,0,0,388,389,5,101,0,0,389,46,1,0,0,0,390,391,
|
||||||
109,0,0,398,399,5,97,0,0,399,400,5,116,0,0,400,401,5,101,0,0,401,
|
5,112,0,0,391,392,5,114,0,0,392,393,5,111,0,0,393,394,5,106,0,0,
|
||||||
402,5,114,0,0,402,403,5,105,0,0,403,404,5,97,0,0,404,405,5,108,0,
|
394,395,5,101,0,0,395,396,5,99,0,0,396,397,5,116,0,0,397,398,5,105,
|
||||||
0,405,406,5,105,0,0,406,407,5,122,0,0,407,408,5,101,0,0,408,52,1,
|
0,0,398,399,5,111,0,0,399,400,5,110,0,0,400,48,1,0,0,0,401,402,5,
|
||||||
0,0,0,409,410,5,105,0,0,410,411,5,102,0,0,411,54,1,0,0,0,412,413,
|
119,0,0,402,403,5,105,0,0,403,404,5,116,0,0,404,405,5,104,0,0,405,
|
||||||
5,97,0,0,413,414,5,98,0,0,414,415,5,115,0,0,415,416,5,101,0,0,416,
|
50,1,0,0,0,406,407,5,117,0,0,407,408,5,115,0,0,408,409,5,105,0,0,
|
||||||
417,5,110,0,0,417,418,5,116,0,0,418,56,1,0,0,0,419,420,5,111,0,0,
|
409,410,5,110,0,0,410,411,5,103,0,0,411,52,1,0,0,0,412,413,5,118,
|
||||||
420,421,5,110,0,0,421,58,1,0,0,0,422,423,5,112,0,0,423,424,5,111,
|
0,0,413,414,5,105,0,0,414,415,5,97,0,0,415,54,1,0,0,0,416,417,5,
|
||||||
0,0,424,425,5,108,0,0,425,426,5,105,0,0,426,427,5,99,0,0,427,428,
|
109,0,0,417,418,5,97,0,0,418,419,5,116,0,0,419,420,5,101,0,0,420,
|
||||||
5,121,0,0,428,60,1,0,0,0,429,430,5,100,0,0,430,431,5,101,0,0,431,
|
421,5,114,0,0,421,422,5,105,0,0,422,423,5,97,0,0,423,424,5,108,0,
|
||||||
432,5,102,0,0,432,433,5,97,0,0,433,434,5,117,0,0,434,435,5,108,0,
|
0,424,425,5,105,0,0,425,426,5,122,0,0,426,427,5,101,0,0,427,56,1,
|
||||||
0,435,436,5,116,0,0,436,62,1,0,0,0,437,438,5,115,0,0,438,439,5,111,
|
0,0,0,428,429,5,105,0,0,429,430,5,102,0,0,430,58,1,0,0,0,431,432,
|
||||||
0,0,439,440,5,117,0,0,440,441,5,114,0,0,441,442,5,99,0,0,442,443,
|
5,97,0,0,432,433,5,98,0,0,433,434,5,115,0,0,434,435,5,101,0,0,435,
|
||||||
5,101,0,0,443,64,1,0,0,0,444,445,5,114,0,0,445,446,5,101,0,0,446,
|
436,5,110,0,0,436,437,5,116,0,0,437,60,1,0,0,0,438,439,5,111,0,0,
|
||||||
447,5,112,0,0,447,448,5,111,0,0,448,449,5,115,0,0,449,450,5,105,
|
439,440,5,110,0,0,440,62,1,0,0,0,441,442,5,112,0,0,442,443,5,111,
|
||||||
0,0,450,451,5,116,0,0,451,452,5,111,0,0,452,453,5,114,0,0,453,454,
|
0,0,443,444,5,108,0,0,444,445,5,105,0,0,445,446,5,99,0,0,446,447,
|
||||||
5,121,0,0,454,66,1,0,0,0,455,456,5,99,0,0,456,457,5,111,0,0,457,
|
5,121,0,0,447,64,1,0,0,0,448,449,5,100,0,0,449,450,5,101,0,0,450,
|
||||||
458,5,109,0,0,458,459,5,109,0,0,459,460,5,105,0,0,460,461,5,116,
|
451,5,102,0,0,451,452,5,97,0,0,452,453,5,117,0,0,453,454,5,108,0,
|
||||||
0,0,461,68,1,0,0,0,462,463,5,114,0,0,463,464,5,101,0,0,464,465,5,
|
0,454,455,5,116,0,0,455,66,1,0,0,0,456,457,5,115,0,0,457,458,5,111,
|
||||||
118,0,0,465,466,5,105,0,0,466,467,5,115,0,0,467,468,5,105,0,0,468,
|
0,0,458,459,5,117,0,0,459,460,5,114,0,0,460,461,5,99,0,0,461,462,
|
||||||
469,5,111,0,0,469,470,5,110,0,0,470,70,1,0,0,0,471,472,5,105,0,0,
|
5,101,0,0,462,68,1,0,0,0,463,464,5,114,0,0,464,465,5,101,0,0,465,
|
||||||
472,473,5,100,0,0,473,72,1,0,0,0,474,475,5,100,0,0,475,476,5,111,
|
466,5,112,0,0,466,467,5,111,0,0,467,468,5,115,0,0,468,469,5,105,
|
||||||
0,0,476,477,5,99,0,0,477,74,1,0,0,0,478,479,5,109,0,0,479,480,5,
|
0,0,469,470,5,116,0,0,470,471,5,111,0,0,471,472,5,114,0,0,472,473,
|
||||||
111,0,0,480,481,5,100,0,0,481,482,5,101,0,0,482,76,1,0,0,0,483,484,
|
5,121,0,0,473,70,1,0,0,0,474,475,5,99,0,0,475,476,5,111,0,0,476,
|
||||||
5,101,0,0,484,485,5,109,0,0,485,486,5,105,0,0,486,487,5,116,0,0,
|
477,5,109,0,0,477,478,5,109,0,0,478,479,5,105,0,0,479,480,5,116,
|
||||||
487,488,5,115,0,0,488,78,1,0,0,0,489,490,5,114,0,0,490,491,5,101,
|
0,0,480,72,1,0,0,0,481,482,5,114,0,0,482,483,5,101,0,0,483,484,5,
|
||||||
0,0,491,492,5,99,0,0,492,493,5,101,0,0,493,494,5,105,0,0,494,495,
|
118,0,0,484,485,5,105,0,0,485,486,5,115,0,0,486,487,5,105,0,0,487,
|
||||||
5,118,0,0,495,496,5,101,0,0,496,497,5,114,0,0,497,80,1,0,0,0,498,
|
488,5,111,0,0,488,489,5,110,0,0,489,74,1,0,0,0,490,491,5,105,0,0,
|
||||||
499,5,114,0,0,499,500,5,101,0,0,500,501,5,113,0,0,501,502,5,117,
|
491,492,5,100,0,0,492,76,1,0,0,0,493,494,5,100,0,0,494,495,5,111,
|
||||||
0,0,502,503,5,105,0,0,503,504,5,114,0,0,504,505,5,101,0,0,505,506,
|
0,0,495,496,5,99,0,0,496,78,1,0,0,0,497,498,5,109,0,0,498,499,5,
|
||||||
5,115,0,0,506,82,1,0,0,0,507,508,5,97,0,0,508,509,5,110,0,0,509,
|
111,0,0,499,500,5,100,0,0,500,501,5,101,0,0,501,80,1,0,0,0,502,503,
|
||||||
510,5,121,0,0,510,84,1,0,0,0,511,512,5,103,0,0,512,513,5,101,0,0,
|
5,101,0,0,503,504,5,109,0,0,504,505,5,105,0,0,505,506,5,116,0,0,
|
||||||
513,514,5,116,0,0,514,86,1,0,0,0,515,516,5,115,0,0,516,517,5,101,
|
506,507,5,115,0,0,507,82,1,0,0,0,508,509,5,114,0,0,509,510,5,101,
|
||||||
0,0,517,518,5,116,0,0,518,88,1,0,0,0,519,520,5,119,0,0,520,521,5,
|
0,0,510,511,5,99,0,0,511,512,5,101,0,0,512,513,5,105,0,0,513,514,
|
||||||
97,0,0,521,522,5,116,0,0,522,523,5,99,0,0,523,524,5,104,0,0,524,
|
5,118,0,0,514,515,5,101,0,0,515,516,5,114,0,0,516,84,1,0,0,0,517,
|
||||||
90,1,0,0,0,525,526,5,115,0,0,526,527,5,116,0,0,527,528,5,97,0,0,
|
518,5,114,0,0,518,519,5,101,0,0,519,520,5,113,0,0,520,521,5,117,
|
||||||
528,529,5,114,0,0,529,530,5,116,0,0,530,92,1,0,0,0,531,532,5,115,
|
0,0,521,522,5,105,0,0,522,523,5,114,0,0,523,524,5,101,0,0,524,525,
|
||||||
0,0,532,533,5,116,0,0,533,534,5,111,0,0,534,535,5,112,0,0,535,94,
|
5,115,0,0,525,86,1,0,0,0,526,527,5,97,0,0,527,528,5,110,0,0,528,
|
||||||
1,0,0,0,536,537,5,114,0,0,537,538,5,101,0,0,538,539,5,97,0,0,539,
|
529,5,121,0,0,529,88,1,0,0,0,530,531,5,103,0,0,531,532,5,101,0,0,
|
||||||
540,5,100,0,0,540,96,1,0,0,0,541,542,5,119,0,0,542,543,5,114,0,0,
|
532,533,5,116,0,0,533,90,1,0,0,0,534,535,5,115,0,0,535,536,5,101,
|
||||||
543,544,5,105,0,0,544,545,5,116,0,0,545,546,5,101,0,0,546,98,1,0,
|
0,0,536,537,5,116,0,0,537,92,1,0,0,0,538,539,5,119,0,0,539,540,5,
|
||||||
0,0,547,548,5,114,0,0,548,549,5,101,0,0,549,550,5,115,0,0,550,551,
|
97,0,0,540,541,5,116,0,0,541,542,5,99,0,0,542,543,5,104,0,0,543,
|
||||||
5,111,0,0,551,552,5,108,0,0,552,553,5,118,0,0,553,554,5,101,0,0,
|
94,1,0,0,0,544,545,5,115,0,0,545,546,5,116,0,0,546,547,5,97,0,0,
|
||||||
554,100,1,0,0,0,555,556,5,99,0,0,556,557,5,111,0,0,557,558,5,110,
|
547,548,5,114,0,0,548,549,5,116,0,0,549,96,1,0,0,0,550,551,5,115,
|
||||||
0,0,558,559,5,110,0,0,559,560,5,101,0,0,560,561,5,99,0,0,561,562,
|
0,0,551,552,5,116,0,0,552,553,5,111,0,0,553,554,5,112,0,0,554,98,
|
||||||
5,116,0,0,562,102,1,0,0,0,563,564,5,100,0,0,564,565,5,105,0,0,565,
|
1,0,0,0,555,556,5,114,0,0,556,557,5,101,0,0,557,558,5,97,0,0,558,
|
||||||
566,5,115,0,0,566,567,5,99,0,0,567,568,5,111,0,0,568,569,5,110,0,
|
559,5,100,0,0,559,100,1,0,0,0,560,561,5,119,0,0,561,562,5,114,0,
|
||||||
0,569,570,5,110,0,0,570,571,5,101,0,0,571,572,5,99,0,0,572,573,5,
|
0,562,563,5,105,0,0,563,564,5,116,0,0,564,565,5,101,0,0,565,102,
|
||||||
116,0,0,573,104,1,0,0,0,574,575,5,99,0,0,575,576,5,97,0,0,576,577,
|
1,0,0,0,566,567,5,114,0,0,567,568,5,101,0,0,568,569,5,115,0,0,569,
|
||||||
5,108,0,0,577,578,5,108,0,0,578,106,1,0,0,0,579,580,5,119,0,0,580,
|
570,5,111,0,0,570,571,5,108,0,0,571,572,5,118,0,0,572,573,5,101,
|
||||||
581,5,97,0,0,581,582,5,116,0,0,582,583,5,99,0,0,583,584,5,104,0,
|
0,0,573,104,1,0,0,0,574,575,5,99,0,0,575,576,5,111,0,0,576,577,5,
|
||||||
0,584,585,5,45,0,0,585,586,5,115,0,0,586,587,5,116,0,0,587,588,5,
|
110,0,0,577,578,5,110,0,0,578,579,5,101,0,0,579,580,5,99,0,0,580,
|
||||||
97,0,0,588,589,5,114,0,0,589,590,5,116,0,0,590,108,1,0,0,0,591,592,
|
581,5,116,0,0,581,106,1,0,0,0,582,583,5,100,0,0,583,584,5,105,0,
|
||||||
5,119,0,0,592,593,5,97,0,0,593,594,5,116,0,0,594,595,5,99,0,0,595,
|
0,584,585,5,115,0,0,585,586,5,99,0,0,586,587,5,111,0,0,587,588,5,
|
||||||
596,5,104,0,0,596,597,5,45,0,0,597,598,5,115,0,0,598,599,5,116,0,
|
110,0,0,588,589,5,110,0,0,589,590,5,101,0,0,590,591,5,99,0,0,591,
|
||||||
0,599,600,5,111,0,0,600,601,5,112,0,0,601,110,1,0,0,0,602,603,5,
|
592,5,116,0,0,592,108,1,0,0,0,593,594,5,99,0,0,594,595,5,97,0,0,
|
||||||
115,0,0,603,604,5,117,0,0,604,605,5,98,0,0,605,606,5,115,0,0,606,
|
595,596,5,108,0,0,596,597,5,108,0,0,597,110,1,0,0,0,598,599,5,119,
|
||||||
607,5,99,0,0,607,608,5,114,0,0,608,609,5,105,0,0,609,610,5,98,0,
|
0,0,599,600,5,97,0,0,600,601,5,116,0,0,601,602,5,99,0,0,602,603,
|
||||||
0,610,611,5,101,0,0,611,112,1,0,0,0,612,613,5,117,0,0,613,614,5,
|
5,104,0,0,603,604,5,45,0,0,604,605,5,115,0,0,605,606,5,116,0,0,606,
|
||||||
110,0,0,614,615,5,115,0,0,615,616,5,117,0,0,616,617,5,98,0,0,617,
|
607,5,97,0,0,607,608,5,114,0,0,608,609,5,116,0,0,609,112,1,0,0,0,
|
||||||
618,5,115,0,0,618,619,5,99,0,0,619,620,5,114,0,0,620,621,5,105,0,
|
610,611,5,119,0,0,611,612,5,97,0,0,612,613,5,116,0,0,613,614,5,99,
|
||||||
0,621,622,5,98,0,0,622,623,5,101,0,0,623,114,1,0,0,0,624,625,5,111,
|
0,0,614,615,5,104,0,0,615,616,5,45,0,0,616,617,5,115,0,0,617,618,
|
||||||
0,0,625,626,5,112,0,0,626,627,5,116,0,0,627,628,5,105,0,0,628,629,
|
5,116,0,0,618,619,5,111,0,0,619,620,5,112,0,0,620,114,1,0,0,0,621,
|
||||||
5,109,0,0,629,630,5,105,0,0,630,631,5,115,0,0,631,632,5,116,0,0,
|
622,5,115,0,0,622,623,5,117,0,0,623,624,5,98,0,0,624,625,5,115,0,
|
||||||
632,633,5,105,0,0,633,634,5,99,0,0,634,635,5,45,0,0,635,636,5,114,
|
0,625,626,5,99,0,0,626,627,5,114,0,0,627,628,5,105,0,0,628,629,5,
|
||||||
0,0,636,637,5,101,0,0,637,638,5,103,0,0,638,639,5,105,0,0,639,640,
|
98,0,0,629,630,5,101,0,0,630,116,1,0,0,0,631,632,5,117,0,0,632,633,
|
||||||
5,115,0,0,640,641,5,116,0,0,641,642,5,101,0,0,642,643,5,114,0,0,
|
5,110,0,0,633,634,5,115,0,0,634,635,5,117,0,0,635,636,5,98,0,0,636,
|
||||||
643,116,1,0,0,0,644,645,5,99,0,0,645,646,5,114,0,0,646,647,5,100,
|
637,5,115,0,0,637,638,5,99,0,0,638,639,5,114,0,0,639,640,5,105,0,
|
||||||
0,0,647,648,5,116,0,0,648,118,1,0,0,0,649,650,5,111,0,0,650,651,
|
0,640,641,5,98,0,0,641,642,5,101,0,0,642,118,1,0,0,0,643,644,5,111,
|
||||||
5,112,0,0,651,652,5,116,0,0,652,653,5,105,0,0,653,654,5,111,0,0,
|
0,0,644,645,5,112,0,0,645,646,5,116,0,0,646,647,5,105,0,0,647,648,
|
||||||
654,655,5,110,0,0,655,656,5,97,0,0,656,657,5,108,0,0,657,658,5,45,
|
5,109,0,0,648,649,5,105,0,0,649,650,5,115,0,0,650,651,5,116,0,0,
|
||||||
0,0,658,659,5,111,0,0,659,660,5,110,0,0,660,661,5,101,0,0,661,120,
|
651,652,5,105,0,0,652,653,5,99,0,0,653,654,5,45,0,0,654,655,5,114,
|
||||||
1,0,0,0,662,663,5,101,0,0,663,664,5,120,0,0,664,665,5,97,0,0,665,
|
0,0,655,656,5,101,0,0,656,657,5,103,0,0,657,658,5,105,0,0,658,659,
|
||||||
666,5,99,0,0,666,667,5,116,0,0,667,668,5,108,0,0,668,669,5,121,0,
|
5,115,0,0,659,660,5,116,0,0,660,661,5,101,0,0,661,662,5,114,0,0,
|
||||||
0,669,670,5,45,0,0,670,671,5,111,0,0,671,672,5,110,0,0,672,673,5,
|
662,120,1,0,0,0,663,664,5,99,0,0,664,665,5,114,0,0,665,666,5,100,
|
||||||
101,0,0,673,122,1,0,0,0,674,675,5,109,0,0,675,676,5,97,0,0,676,677,
|
0,0,666,667,5,116,0,0,667,122,1,0,0,0,668,669,5,111,0,0,669,670,
|
||||||
5,110,0,0,677,678,5,121,0,0,678,679,5,45,0,0,679,680,5,117,0,0,680,
|
5,112,0,0,670,671,5,116,0,0,671,672,5,105,0,0,672,673,5,111,0,0,
|
||||||
681,5,110,0,0,681,682,5,105,0,0,682,683,5,113,0,0,683,684,5,117,
|
673,674,5,110,0,0,674,675,5,97,0,0,675,676,5,108,0,0,676,677,5,45,
|
||||||
0,0,684,685,5,101,0,0,685,124,1,0,0,0,686,687,5,109,0,0,687,688,
|
0,0,677,678,5,111,0,0,678,679,5,110,0,0,679,680,5,101,0,0,680,124,
|
||||||
5,97,0,0,688,689,5,110,0,0,689,690,5,121,0,0,690,126,1,0,0,0,691,
|
1,0,0,0,681,682,5,101,0,0,682,683,5,120,0,0,683,684,5,97,0,0,684,
|
||||||
692,5,111,0,0,692,693,5,114,0,0,693,694,5,100,0,0,694,695,5,101,
|
685,5,99,0,0,685,686,5,116,0,0,686,687,5,108,0,0,687,688,5,121,0,
|
||||||
0,0,695,696,5,114,0,0,696,697,5,101,0,0,697,698,5,100,0,0,698,128,
|
0,688,689,5,45,0,0,689,690,5,111,0,0,690,691,5,110,0,0,691,692,5,
|
||||||
1,0,0,0,699,700,5,117,0,0,700,701,5,110,0,0,701,702,5,105,0,0,702,
|
101,0,0,692,126,1,0,0,0,693,694,5,109,0,0,694,695,5,97,0,0,695,696,
|
||||||
703,5,116,0,0,703,130,1,0,0,0,704,705,5,119,0,0,705,706,5,97,0,0,
|
5,110,0,0,696,697,5,121,0,0,697,698,5,45,0,0,698,699,5,117,0,0,699,
|
||||||
706,707,5,116,0,0,707,708,5,99,0,0,708,709,5,104,0,0,709,710,5,45,
|
700,5,110,0,0,700,701,5,105,0,0,701,702,5,113,0,0,702,703,5,117,
|
||||||
0,0,710,711,5,104,0,0,711,712,5,97,0,0,712,713,5,110,0,0,713,714,
|
0,0,703,704,5,101,0,0,704,128,1,0,0,0,705,706,5,109,0,0,706,707,
|
||||||
5,100,0,0,714,715,5,108,0,0,715,716,5,101,0,0,716,132,1,0,0,0,717,
|
5,97,0,0,707,708,5,110,0,0,708,709,5,121,0,0,709,130,1,0,0,0,710,
|
||||||
718,5,109,0,0,718,719,5,101,0,0,719,720,5,115,0,0,720,721,5,115,
|
711,5,111,0,0,711,712,5,114,0,0,712,713,5,100,0,0,713,714,5,101,
|
||||||
0,0,721,722,5,97,0,0,722,723,5,103,0,0,723,724,5,101,0,0,724,134,
|
0,0,714,715,5,114,0,0,715,716,5,101,0,0,716,717,5,100,0,0,717,132,
|
||||||
1,0,0,0,725,726,5,97,0,0,726,727,5,116,0,0,727,728,5,111,0,0,728,
|
1,0,0,0,718,719,5,117,0,0,719,720,5,110,0,0,720,721,5,105,0,0,721,
|
||||||
729,5,109,0,0,729,730,5,45,0,0,730,731,5,114,0,0,731,732,5,101,0,
|
722,5,116,0,0,722,134,1,0,0,0,723,724,5,119,0,0,724,725,5,97,0,0,
|
||||||
0,732,733,5,102,0,0,733,136,1,0,0,0,734,735,5,105,0,0,735,736,5,
|
725,726,5,116,0,0,726,727,5,99,0,0,727,728,5,104,0,0,728,729,5,45,
|
||||||
110,0,0,736,737,5,116,0,0,737,738,5,101,0,0,738,739,5,114,0,0,739,
|
0,0,729,730,5,104,0,0,730,731,5,97,0,0,731,732,5,110,0,0,732,733,
|
||||||
740,5,102,0,0,740,741,5,97,0,0,741,742,5,99,0,0,742,743,5,101,0,
|
5,100,0,0,733,734,5,108,0,0,734,735,5,101,0,0,735,136,1,0,0,0,736,
|
||||||
0,743,744,5,45,0,0,744,745,5,114,0,0,745,746,5,101,0,0,746,747,5,
|
737,5,109,0,0,737,738,5,101,0,0,738,739,5,115,0,0,739,740,5,115,
|
||||||
102,0,0,747,138,1,0,0,0,748,749,5,111,0,0,749,750,5,112,0,0,750,
|
0,0,740,741,5,97,0,0,741,742,5,103,0,0,742,743,5,101,0,0,743,138,
|
||||||
751,5,116,0,0,751,752,5,105,0,0,752,753,5,111,0,0,753,754,5,110,
|
1,0,0,0,744,745,5,97,0,0,745,746,5,116,0,0,746,747,5,111,0,0,747,
|
||||||
0,0,754,755,5,97,0,0,755,756,5,108,0,0,756,140,1,0,0,0,757,758,5,
|
748,5,109,0,0,748,749,5,45,0,0,749,750,5,114,0,0,750,751,5,101,0,
|
||||||
108,0,0,758,759,5,105,0,0,759,760,5,115,0,0,760,761,5,116,0,0,761,
|
0,751,752,5,102,0,0,752,140,1,0,0,0,753,754,5,105,0,0,754,755,5,
|
||||||
142,1,0,0,0,762,763,5,98,0,0,763,764,5,111,0,0,764,765,5,111,0,0,
|
110,0,0,755,756,5,116,0,0,756,757,5,101,0,0,757,758,5,114,0,0,758,
|
||||||
765,766,5,108,0,0,766,144,1,0,0,0,767,768,5,98,0,0,768,769,5,121,
|
759,5,102,0,0,759,760,5,97,0,0,760,761,5,99,0,0,761,762,5,101,0,
|
||||||
0,0,769,770,5,116,0,0,770,771,5,101,0,0,771,772,5,115,0,0,772,146,
|
0,762,763,5,45,0,0,763,764,5,114,0,0,764,765,5,101,0,0,765,766,5,
|
||||||
1,0,0,0,773,774,5,100,0,0,774,775,5,111,0,0,775,776,5,117,0,0,776,
|
102,0,0,766,142,1,0,0,0,767,768,5,111,0,0,768,769,5,112,0,0,769,
|
||||||
777,5,98,0,0,777,778,5,108,0,0,778,779,5,101,0,0,779,148,1,0,0,0,
|
770,5,116,0,0,770,771,5,105,0,0,771,772,5,111,0,0,772,773,5,110,
|
||||||
780,781,5,105,0,0,781,782,5,110,0,0,782,783,5,116,0,0,783,784,5,
|
0,0,773,774,5,97,0,0,774,775,5,108,0,0,775,144,1,0,0,0,776,777,5,
|
||||||
51,0,0,784,785,5,50,0,0,785,150,1,0,0,0,786,787,5,105,0,0,787,788,
|
108,0,0,777,778,5,105,0,0,778,779,5,115,0,0,779,780,5,116,0,0,780,
|
||||||
5,110,0,0,788,789,5,116,0,0,789,790,5,54,0,0,790,791,5,52,0,0,791,
|
146,1,0,0,0,781,782,5,98,0,0,782,783,5,111,0,0,783,784,5,111,0,0,
|
||||||
152,1,0,0,0,792,793,5,115,0,0,793,794,5,116,0,0,794,795,5,114,0,
|
784,785,5,108,0,0,785,148,1,0,0,0,786,787,5,98,0,0,787,788,5,121,
|
||||||
0,795,796,5,105,0,0,796,797,5,110,0,0,797,798,5,103,0,0,798,154,
|
0,0,788,789,5,116,0,0,789,790,5,101,0,0,790,791,5,115,0,0,791,150,
|
||||||
1,0,0,0,799,800,5,117,0,0,800,801,5,105,0,0,801,802,5,110,0,0,802,
|
1,0,0,0,792,793,5,100,0,0,793,794,5,111,0,0,794,795,5,117,0,0,795,
|
||||||
803,5,116,0,0,803,804,5,51,0,0,804,805,5,50,0,0,805,156,1,0,0,0,
|
796,5,98,0,0,796,797,5,108,0,0,797,798,5,101,0,0,798,152,1,0,0,0,
|
||||||
806,807,5,117,0,0,807,808,5,105,0,0,808,809,5,110,0,0,809,810,5,
|
799,800,5,105,0,0,800,801,5,110,0,0,801,802,5,116,0,0,802,803,5,
|
||||||
116,0,0,810,811,5,54,0,0,811,812,5,52,0,0,812,158,1,0,0,0,813,814,
|
51,0,0,803,804,5,50,0,0,804,154,1,0,0,0,805,806,5,105,0,0,806,807,
|
||||||
5,116,0,0,814,815,5,114,0,0,815,816,5,117,0,0,816,817,5,101,0,0,
|
5,110,0,0,807,808,5,116,0,0,808,809,5,54,0,0,809,810,5,52,0,0,810,
|
||||||
817,160,1,0,0,0,818,819,5,102,0,0,819,820,5,97,0,0,820,821,5,108,
|
156,1,0,0,0,811,812,5,115,0,0,812,813,5,116,0,0,813,814,5,114,0,
|
||||||
0,0,821,822,5,115,0,0,822,823,5,101,0,0,823,162,1,0,0,0,824,825,
|
0,814,815,5,105,0,0,815,816,5,110,0,0,816,817,5,103,0,0,817,158,
|
||||||
5,110,0,0,825,826,5,117,0,0,826,827,5,108,0,0,827,828,5,108,0,0,
|
1,0,0,0,818,819,5,117,0,0,819,820,5,105,0,0,820,821,5,110,0,0,821,
|
||||||
828,164,1,0,0,0,829,830,5,45,0,0,830,831,5,62,0,0,831,166,1,0,0,
|
822,5,116,0,0,822,823,5,51,0,0,823,824,5,50,0,0,824,160,1,0,0,0,
|
||||||
0,832,833,5,58,0,0,833,168,1,0,0,0,834,835,5,59,0,0,835,170,1,0,
|
825,826,5,117,0,0,826,827,5,105,0,0,827,828,5,110,0,0,828,829,5,
|
||||||
0,0,836,837,5,44,0,0,837,172,1,0,0,0,838,839,5,46,0,0,839,174,1,
|
116,0,0,829,830,5,54,0,0,830,831,5,52,0,0,831,162,1,0,0,0,832,833,
|
||||||
0,0,0,840,841,5,123,0,0,841,176,1,0,0,0,842,843,5,125,0,0,843,178,
|
5,116,0,0,833,834,5,114,0,0,834,835,5,117,0,0,835,836,5,101,0,0,
|
||||||
1,0,0,0,844,845,5,91,0,0,845,180,1,0,0,0,846,847,5,93,0,0,847,182,
|
836,164,1,0,0,0,837,838,5,102,0,0,838,839,5,97,0,0,839,840,5,108,
|
||||||
1,0,0,0,848,849,5,40,0,0,849,184,1,0,0,0,850,851,5,41,0,0,851,186,
|
0,0,840,841,5,115,0,0,841,842,5,101,0,0,842,166,1,0,0,0,843,844,
|
||||||
1,0,0,0,852,853,5,60,0,0,853,188,1,0,0,0,854,855,5,62,0,0,855,190,
|
5,110,0,0,844,845,5,117,0,0,845,846,5,108,0,0,846,847,5,108,0,0,
|
||||||
1,0,0,0,856,858,5,45,0,0,857,856,1,0,0,0,857,858,1,0,0,0,858,860,
|
847,168,1,0,0,0,848,849,5,45,0,0,849,850,5,62,0,0,850,170,1,0,0,
|
||||||
1,0,0,0,859,861,7,0,0,0,860,859,1,0,0,0,861,862,1,0,0,0,862,860,
|
0,851,852,5,58,0,0,852,172,1,0,0,0,853,854,5,59,0,0,854,174,1,0,
|
||||||
1,0,0,0,862,863,1,0,0,0,863,192,1,0,0,0,864,866,5,45,0,0,865,864,
|
0,0,855,856,5,44,0,0,856,176,1,0,0,0,857,858,5,46,0,0,858,178,1,
|
||||||
1,0,0,0,865,866,1,0,0,0,866,875,1,0,0,0,867,876,5,48,0,0,868,872,
|
0,0,0,859,860,5,123,0,0,860,180,1,0,0,0,861,862,5,125,0,0,862,182,
|
||||||
7,1,0,0,869,871,7,0,0,0,870,869,1,0,0,0,871,874,1,0,0,0,872,870,
|
1,0,0,0,863,864,5,91,0,0,864,184,1,0,0,0,865,866,5,93,0,0,866,186,
|
||||||
1,0,0,0,872,873,1,0,0,0,873,876,1,0,0,0,874,872,1,0,0,0,875,867,
|
1,0,0,0,867,868,5,40,0,0,868,188,1,0,0,0,869,870,5,41,0,0,870,190,
|
||||||
1,0,0,0,875,868,1,0,0,0,876,883,1,0,0,0,877,879,5,46,0,0,878,880,
|
1,0,0,0,871,872,5,60,0,0,872,192,1,0,0,0,873,874,5,62,0,0,874,194,
|
||||||
7,0,0,0,879,878,1,0,0,0,880,881,1,0,0,0,881,879,1,0,0,0,881,882,
|
1,0,0,0,875,877,5,45,0,0,876,875,1,0,0,0,876,877,1,0,0,0,877,879,
|
||||||
1,0,0,0,882,884,1,0,0,0,883,877,1,0,0,0,883,884,1,0,0,0,884,894,
|
1,0,0,0,878,880,7,0,0,0,879,878,1,0,0,0,880,881,1,0,0,0,881,879,
|
||||||
1,0,0,0,885,887,7,2,0,0,886,888,7,3,0,0,887,886,1,0,0,0,887,888,
|
1,0,0,0,881,882,1,0,0,0,882,196,1,0,0,0,883,885,5,45,0,0,884,883,
|
||||||
1,0,0,0,888,890,1,0,0,0,889,891,7,0,0,0,890,889,1,0,0,0,891,892,
|
1,0,0,0,884,885,1,0,0,0,885,894,1,0,0,0,886,895,5,48,0,0,887,891,
|
||||||
1,0,0,0,892,890,1,0,0,0,892,893,1,0,0,0,893,895,1,0,0,0,894,885,
|
7,1,0,0,888,890,7,0,0,0,889,888,1,0,0,0,890,893,1,0,0,0,891,889,
|
||||||
1,0,0,0,894,895,1,0,0,0,895,194,1,0,0,0,896,900,7,4,0,0,897,899,
|
1,0,0,0,891,892,1,0,0,0,892,895,1,0,0,0,893,891,1,0,0,0,894,886,
|
||||||
7,5,0,0,898,897,1,0,0,0,899,902,1,0,0,0,900,898,1,0,0,0,900,901,
|
1,0,0,0,894,887,1,0,0,0,895,902,1,0,0,0,896,898,5,46,0,0,897,899,
|
||||||
1,0,0,0,901,196,1,0,0,0,902,900,1,0,0,0,903,908,5,34,0,0,904,907,
|
7,0,0,0,898,897,1,0,0,0,899,900,1,0,0,0,900,898,1,0,0,0,900,901,
|
||||||
3,199,99,0,905,907,8,6,0,0,906,904,1,0,0,0,906,905,1,0,0,0,907,910,
|
1,0,0,0,901,903,1,0,0,0,902,896,1,0,0,0,902,903,1,0,0,0,903,913,
|
||||||
1,0,0,0,908,906,1,0,0,0,908,909,1,0,0,0,909,911,1,0,0,0,910,908,
|
1,0,0,0,904,906,7,2,0,0,905,907,7,3,0,0,906,905,1,0,0,0,906,907,
|
||||||
1,0,0,0,911,912,5,34,0,0,912,198,1,0,0,0,913,921,5,92,0,0,914,922,
|
1,0,0,0,907,909,1,0,0,0,908,910,7,0,0,0,909,908,1,0,0,0,910,911,
|
||||||
7,7,0,0,915,916,5,117,0,0,916,917,3,201,100,0,917,918,3,201,100,
|
1,0,0,0,911,909,1,0,0,0,911,912,1,0,0,0,912,914,1,0,0,0,913,904,
|
||||||
0,918,919,3,201,100,0,919,920,3,201,100,0,920,922,1,0,0,0,921,914,
|
1,0,0,0,913,914,1,0,0,0,914,198,1,0,0,0,915,919,7,4,0,0,916,918,
|
||||||
1,0,0,0,921,915,1,0,0,0,922,200,1,0,0,0,923,924,7,8,0,0,924,202,
|
7,5,0,0,917,916,1,0,0,0,918,921,1,0,0,0,919,917,1,0,0,0,919,920,
|
||||||
1,0,0,0,925,926,5,47,0,0,926,927,5,47,0,0,927,931,1,0,0,0,928,930,
|
1,0,0,0,920,200,1,0,0,0,921,919,1,0,0,0,922,927,5,34,0,0,923,926,
|
||||||
8,9,0,0,929,928,1,0,0,0,930,933,1,0,0,0,931,929,1,0,0,0,931,932,
|
3,203,101,0,924,926,8,6,0,0,925,923,1,0,0,0,925,924,1,0,0,0,926,
|
||||||
1,0,0,0,932,934,1,0,0,0,933,931,1,0,0,0,934,935,6,101,0,0,935,204,
|
929,1,0,0,0,927,925,1,0,0,0,927,928,1,0,0,0,928,930,1,0,0,0,929,
|
||||||
1,0,0,0,936,937,5,47,0,0,937,938,5,42,0,0,938,942,1,0,0,0,939,941,
|
927,1,0,0,0,930,931,5,34,0,0,931,202,1,0,0,0,932,940,5,92,0,0,933,
|
||||||
9,0,0,0,940,939,1,0,0,0,941,944,1,0,0,0,942,943,1,0,0,0,942,940,
|
941,7,7,0,0,934,935,5,117,0,0,935,936,3,205,102,0,936,937,3,205,
|
||||||
1,0,0,0,943,945,1,0,0,0,944,942,1,0,0,0,945,946,5,42,0,0,946,947,
|
102,0,937,938,3,205,102,0,938,939,3,205,102,0,939,941,1,0,0,0,940,
|
||||||
5,47,0,0,947,948,1,0,0,0,948,949,6,102,0,0,949,206,1,0,0,0,950,952,
|
933,1,0,0,0,940,934,1,0,0,0,941,204,1,0,0,0,942,943,7,8,0,0,943,
|
||||||
7,10,0,0,951,950,1,0,0,0,952,953,1,0,0,0,953,951,1,0,0,0,953,954,
|
206,1,0,0,0,944,945,5,47,0,0,945,946,5,47,0,0,946,950,1,0,0,0,947,
|
||||||
1,0,0,0,954,955,1,0,0,0,955,956,6,103,0,0,956,208,1,0,0,0,18,0,857,
|
949,8,9,0,0,948,947,1,0,0,0,949,952,1,0,0,0,950,948,1,0,0,0,950,
|
||||||
862,865,872,875,881,883,887,892,894,900,906,908,921,931,942,953,
|
951,1,0,0,0,951,953,1,0,0,0,952,950,1,0,0,0,953,954,6,103,0,0,954,
|
||||||
1,6,0,0
|
208,1,0,0,0,955,956,5,47,0,0,956,957,5,42,0,0,957,961,1,0,0,0,958,
|
||||||
|
960,9,0,0,0,959,958,1,0,0,0,960,963,1,0,0,0,961,962,1,0,0,0,961,
|
||||||
|
959,1,0,0,0,962,964,1,0,0,0,963,961,1,0,0,0,964,965,5,42,0,0,965,
|
||||||
|
966,5,47,0,0,966,967,1,0,0,0,967,968,6,104,0,0,968,210,1,0,0,0,969,
|
||||||
|
971,7,10,0,0,970,969,1,0,0,0,971,972,1,0,0,0,972,970,1,0,0,0,972,
|
||||||
|
973,1,0,0,0,973,974,1,0,0,0,974,975,6,105,0,0,975,212,1,0,0,0,18,
|
||||||
|
0,876,881,884,891,894,900,902,906,911,913,919,925,927,940,950,961,
|
||||||
|
972,1,0,1,0
|
||||||
];
|
];
|
||||||
|
|
||||||
private static __ATN: antlr.ATN;
|
private static __ATN: antlr.ATN;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,8 @@ import { AbstractParseTreeVisitor } from "antlr4ng";
|
|||||||
|
|
||||||
|
|
||||||
import { DocumentContext } from "./QuixosCapabilityParser.js";
|
import { DocumentContext } from "./QuixosCapabilityParser.js";
|
||||||
|
import { FragmentDeclContext } from "./QuixosCapabilityParser.js";
|
||||||
|
import { SourceImportDeclContext } from "./QuixosCapabilityParser.js";
|
||||||
import { WorkspaceDeclContext } from "./QuixosCapabilityParser.js";
|
import { WorkspaceDeclContext } from "./QuixosCapabilityParser.js";
|
||||||
import { WorkspaceItemContext } from "./QuixosCapabilityParser.js";
|
import { WorkspaceItemContext } from "./QuixosCapabilityParser.js";
|
||||||
import { ResourceImportDeclContext } from "./QuixosCapabilityParser.js";
|
import { ResourceImportDeclContext } from "./QuixosCapabilityParser.js";
|
||||||
@@ -74,6 +76,18 @@ export class QuixosCapabilityVisitor<Result> extends AbstractParseTreeVisitor<Re
|
|||||||
* @return the visitor result
|
* @return the visitor result
|
||||||
*/
|
*/
|
||||||
visitDocument?: (ctx: DocumentContext) => Result;
|
visitDocument?: (ctx: DocumentContext) => Result;
|
||||||
|
/**
|
||||||
|
* Visit a parse tree produced by `QuixosCapabilityParser.fragmentDecl`.
|
||||||
|
* @param ctx the parse tree
|
||||||
|
* @return the visitor result
|
||||||
|
*/
|
||||||
|
visitFragmentDecl?: (ctx: FragmentDeclContext) => Result;
|
||||||
|
/**
|
||||||
|
* Visit a parse tree produced by `QuixosCapabilityParser.sourceImportDecl`.
|
||||||
|
* @param ctx the parse tree
|
||||||
|
* @return the visitor result
|
||||||
|
*/
|
||||||
|
visitSourceImportDecl?: (ctx: SourceImportDeclContext) => Result;
|
||||||
/**
|
/**
|
||||||
* Visit a parse tree produced by `QuixosCapabilityParser.workspaceDecl`.
|
* Visit a parse tree produced by `QuixosCapabilityParser.workspaceDecl`.
|
||||||
* @param ctx the parse tree
|
* @param ctx the parse tree
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ const checkoutName = (kind: string, repository: string, commit: string) => {
|
|||||||
export const createGitCapabilityResolver = async (options: {
|
export const createGitCapabilityResolver = async (options: {
|
||||||
checkoutRoot: string;
|
checkoutRoot: string;
|
||||||
snapshotMap?: string;
|
snapshotMap?: string;
|
||||||
|
snapshotOnly?: boolean;
|
||||||
}): Promise<CapabilityRepositoryResolver> => {
|
}): Promise<CapabilityRepositoryResolver> => {
|
||||||
await mkdir(options.checkoutRoot, { recursive: true });
|
await mkdir(options.checkoutRoot, { recursive: true });
|
||||||
const checkoutRoot = await realpath(options.checkoutRoot);
|
const checkoutRoot = await realpath(options.checkoutRoot);
|
||||||
@@ -52,6 +53,7 @@ export const createGitCapabilityResolver = async (options: {
|
|||||||
const key = sourceKey(kind, source.repository, source.commit);
|
const key = sourceKey(kind, source.repository, source.commit);
|
||||||
const snapshot = snapshots.get(key);
|
const snapshot = snapshots.get(key);
|
||||||
if (snapshot) return { directory: snapshot };
|
if (snapshot) return { directory: snapshot };
|
||||||
|
if (options.snapshotOnly) throw new Error(`No offline snapshot for ${kind} ${source.repository}@${source.commit}`);
|
||||||
const existing = checkouts.get(key);
|
const existing = checkouts.get(key);
|
||||||
if (existing) return await existing;
|
if (existing) return await existing;
|
||||||
const pending = (async () => {
|
const pending = (async () => {
|
||||||
|
|||||||
@@ -1,2 +1,5 @@
|
|||||||
export * from "./parser.js";
|
export * from "./parser.js";
|
||||||
export * from "./assembly.js";
|
export * from "./assembly.js";
|
||||||
|
export * from "./source.js";
|
||||||
|
export * from "./source-loader.js";
|
||||||
|
export * from "./scaffold.js";
|
||||||
|
|||||||
@@ -724,7 +724,8 @@ const lowerDependencyPort = (
|
|||||||
? {
|
? {
|
||||||
id,
|
id,
|
||||||
displayName: name,
|
displayName: name,
|
||||||
requirement: { kind: "constructor", atomId },
|
requirement: { kind: "constructor", atomId,
|
||||||
|
...(context.valueType() ? { inputType: lowerValueType(state, context.valueType()) } : {}) },
|
||||||
}
|
}
|
||||||
: undefined;
|
: undefined;
|
||||||
};
|
};
|
||||||
@@ -1678,22 +1679,22 @@ const lowerWorkspace = (
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const parseDocument = (
|
export const parseDocument = (
|
||||||
source: string,
|
source: string,
|
||||||
fileName: string,
|
fileName: string,
|
||||||
): { tree: DocumentContext; diagnostics: CapabilitySourceDiagnostic[] } => {
|
): { tree: DocumentContext; tokens: CommonTokenStream; diagnostics: CapabilitySourceDiagnostic[] } => {
|
||||||
const diagnostics: CapabilitySourceDiagnostic[] = [];
|
const diagnostics: CapabilitySourceDiagnostic[] = [];
|
||||||
const listener = new SyntaxErrorListener(fileName, diagnostics);
|
const listener = new SyntaxErrorListener(fileName, diagnostics);
|
||||||
const lexer = new QuixosCapabilityLexer(CharStream.fromString(source));
|
const lexer = new QuixosCapabilityLexer(CharStream.fromString(source));
|
||||||
lexer.removeErrorListeners();
|
lexer.removeErrorListeners();
|
||||||
lexer.addErrorListener(listener);
|
lexer.addErrorListener(listener);
|
||||||
const parser = new QuixosCapabilityParser(
|
const tokens = new CommonTokenStream(lexer);
|
||||||
new CommonTokenStream(lexer),
|
const parser = new QuixosCapabilityParser(tokens);
|
||||||
);
|
|
||||||
parser.removeErrorListeners();
|
parser.removeErrorListeners();
|
||||||
parser.addErrorListener(listener);
|
parser.addErrorListener(listener);
|
||||||
const tree = parser.document();
|
const tree = parser.document();
|
||||||
return { tree, diagnostics };
|
tokens.fill();
|
||||||
|
return { tree, tokens, diagnostics };
|
||||||
};
|
};
|
||||||
|
|
||||||
const newLoweringState = (
|
const newLoweringState = (
|
||||||
@@ -1945,6 +1946,11 @@ export const compileCapabilitySource = (
|
|||||||
}
|
}
|
||||||
|
|
||||||
const state = newLoweringState(fileName, diagnostics);
|
const state = newLoweringState(fileName, diagnostics);
|
||||||
|
for (const item of workspaceContext.workspaceItem()) {
|
||||||
|
if (item.sourceImportDecl()) loweringIssue(state, item, "unresolved-source-import",
|
||||||
|
"Local imports require the workspace repository compiler");
|
||||||
|
}
|
||||||
|
if (diagnostics.length) return { ok: false, diagnostics };
|
||||||
const lowered = lowerWorkspace(state, workspaceContext, environment);
|
const lowered = lowerWorkspace(state, workspaceContext, environment);
|
||||||
if (diagnostics.length > 0) {
|
if (diagnostics.length > 0) {
|
||||||
return { ok: false, diagnostics };
|
return { ok: false, diagnostics };
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import { writeFile } from "node:fs/promises";
|
import { writeFile } from "node:fs/promises";
|
||||||
import process from "node:process";
|
import process from "node:process";
|
||||||
|
import { bindingSchema } from "../bindings/index.js";
|
||||||
import {
|
import {
|
||||||
compileCapabilityResourceRepository,
|
compileCapabilityResourceRepository,
|
||||||
type ResolvedCapabilityResource,
|
type ResolvedCapabilityResource,
|
||||||
@@ -10,7 +11,7 @@ import { createGitCapabilityResolver } from "./git-resolver.js";
|
|||||||
|
|
||||||
const usage = `usage: quixos-resource-compile --root DIRECTORY --kind interface|package
|
const usage = `usage: quixos-resource-compile --root DIRECTORY --kind interface|package
|
||||||
--repository URL --commit GIT_REV --checkout-root DIRECTORY
|
--repository URL --commit GIT_REV --checkout-root DIRECTORY
|
||||||
[--snapshot-map PATH] [--graph-out PATH]
|
[--snapshot-map PATH] [--snapshot-only true] [--graph-out PATH] [--schema-out PATH]
|
||||||
|
|
||||||
Resolves a standalone resource's recursive dependency-lock graph, validates
|
Resolves a standalone resource's recursive dependency-lock graph, validates
|
||||||
its interface.qx or package.qx manifest, and emits the checked resource as JSON.`;
|
its interface.qx or package.qx manifest, and emits the checked resource as JSON.`;
|
||||||
@@ -21,6 +22,7 @@ const parseArgs = (args: string[]) => {
|
|||||||
const key = args[index];
|
const key = args[index];
|
||||||
const value = args[index + 1];
|
const value = args[index + 1];
|
||||||
if (!key?.startsWith("--") || !value) throw new Error(usage);
|
if (!key?.startsWith("--") || !value) throw new Error(usage);
|
||||||
|
if (!["--root", "--kind", "--repository", "--commit", "--checkout-root", "--snapshot-map", "--snapshot-only", "--graph-out", "--schema-out"].includes(key) || values.has(key)) throw new Error(usage);
|
||||||
values.set(key, value);
|
values.set(key, value);
|
||||||
}
|
}
|
||||||
const rootDirectory = values.get("--root");
|
const rootDirectory = values.get("--root");
|
||||||
@@ -35,6 +37,7 @@ const parseArgs = (args: string[]) => {
|
|||||||
if (!/^([0-9a-f]{40}|[0-9a-f]{64})$/.test(commit)) {
|
if (!/^([0-9a-f]{40}|[0-9a-f]{64})$/.test(commit)) {
|
||||||
throw new Error("--commit must be a full Git object ID");
|
throw new Error("--commit must be a full Git object ID");
|
||||||
}
|
}
|
||||||
|
if (values.has("--snapshot-only") && values.get("--snapshot-only") !== "true") throw new Error("--snapshot-only accepts true");
|
||||||
return {
|
return {
|
||||||
rootDirectory,
|
rootDirectory,
|
||||||
kind,
|
kind,
|
||||||
@@ -42,7 +45,9 @@ const parseArgs = (args: string[]) => {
|
|||||||
commit,
|
commit,
|
||||||
checkoutRoot,
|
checkoutRoot,
|
||||||
snapshotMap: values.get("--snapshot-map"),
|
snapshotMap: values.get("--snapshot-map"),
|
||||||
|
snapshotOnly: values.get("--snapshot-only") === "true",
|
||||||
graphOut: values.get("--graph-out"),
|
graphOut: values.get("--graph-out"),
|
||||||
|
schemaOut: values.get("--schema-out"),
|
||||||
} as const;
|
} as const;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -70,6 +75,7 @@ const main = async () => {
|
|||||||
const resolveResource = await createGitCapabilityResolver({
|
const resolveResource = await createGitCapabilityResolver({
|
||||||
checkoutRoot: options.checkoutRoot,
|
checkoutRoot: options.checkoutRoot,
|
||||||
snapshotMap: options.snapshotMap,
|
snapshotMap: options.snapshotMap,
|
||||||
|
snapshotOnly: options.snapshotOnly,
|
||||||
});
|
});
|
||||||
const compiled = await compileCapabilityResourceRepository({
|
const compiled = await compileCapabilityResourceRepository({
|
||||||
rootDirectory: options.rootDirectory,
|
rootDirectory: options.rootDirectory,
|
||||||
@@ -92,6 +98,7 @@ const main = async () => {
|
|||||||
resources: compiled.resources.map(graphEntry),
|
resources: compiled.resources.map(graphEntry),
|
||||||
}, null, 2)}\n`);
|
}, null, 2)}\n`);
|
||||||
}
|
}
|
||||||
|
if (options.schemaOut) await writeFile(options.schemaOut, `${JSON.stringify(bindingSchema(compiled), null, 2)}\n`);
|
||||||
process.stdout.write(`${JSON.stringify(compiled.resource, null, 2)}\n`);
|
process.stdout.write(`${JSON.stringify(compiled.resource, null, 2)}\n`);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
import { lstat, open, rename, unlink } from "node:fs/promises";
|
||||||
|
import path from "node:path";
|
||||||
|
import { randomUUID } from "node:crypto";
|
||||||
|
import { addWorkspaceImport } from "./source.js";
|
||||||
|
import { readQxSource } from "./source-loader.js";
|
||||||
|
import { compileWorkspaceRepository, type CapabilityRepositoryResolver } from "./assembly.js";
|
||||||
|
|
||||||
|
export const planAtomScaffold = (workspace: string, name: string, id: string) => {
|
||||||
|
if (!/^[A-Z][A-Za-z0-9]*$/.test(name)) throw new Error("Atom name must be PascalCase");
|
||||||
|
if (!id.trim()) throw new Error("Atom ID must not be empty");
|
||||||
|
const fileName = `${name}.qx`;
|
||||||
|
return {
|
||||||
|
before: workspace,
|
||||||
|
workspace: addWorkspaceImport(workspace, fileName),
|
||||||
|
fileName,
|
||||||
|
fragment: `fragment {\n atom ${name} id ${JSON.stringify(id)};\n}\n`,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Validate an in-memory proposal before creating files. Never replace a fragment. */
|
||||||
|
export const scaffoldAtom = async (options: {
|
||||||
|
root: string; name: string; id: string; write: boolean; resolveResource: CapabilityRepositoryResolver;
|
||||||
|
}) => {
|
||||||
|
const before = await readQxSource(options.root, "workspace.qx");
|
||||||
|
const plan = planAtomScaffold(before, options.name, options.id);
|
||||||
|
const fragmentPath = path.join(options.root, plan.fileName);
|
||||||
|
try {
|
||||||
|
await lstat(fragmentPath);
|
||||||
|
throw new Error(`Scaffold target already exists: ${plan.fileName}`);
|
||||||
|
} catch (error) {
|
||||||
|
if ((error as NodeJS.ErrnoException).code !== "ENOENT") throw error;
|
||||||
|
}
|
||||||
|
const observed = new Map<string, string>();
|
||||||
|
await compileWorkspaceRepository({ rootDirectory: options.root, resolveResource: options.resolveResource,
|
||||||
|
readSource: async (name) => {
|
||||||
|
if (name === "workspace.qx") return plan.workspace;
|
||||||
|
if (name === plan.fileName) return plan.fragment;
|
||||||
|
const text = await readQxSource(options.root, name);
|
||||||
|
observed.set(name, text);
|
||||||
|
return text;
|
||||||
|
} });
|
||||||
|
if (!options.write) return plan;
|
||||||
|
const workspacePath = path.join(options.root, "workspace.qx");
|
||||||
|
const temporary = path.join(options.root, `.qx-scaffold-${randomUUID()}.tmp`);
|
||||||
|
let createdFragment = false;
|
||||||
|
let createdTemporary = false;
|
||||||
|
try {
|
||||||
|
const fragment = await open(fragmentPath, "wx");
|
||||||
|
createdFragment = true;
|
||||||
|
try { await fragment.writeFile(plan.fragment); } finally { await fragment.close(); }
|
||||||
|
const file = await open(temporary, "wx", (await lstat(workspacePath)).mode);
|
||||||
|
createdTemporary = true;
|
||||||
|
try { await file.writeFile(plan.workspace); } finally { await file.close(); }
|
||||||
|
observed.set("workspace.qx", before);
|
||||||
|
for (const [name, text] of observed) {
|
||||||
|
if (await readQxSource(options.root, name) !== text) throw new Error(`QX source changed during scaffolding: ${name}`);
|
||||||
|
}
|
||||||
|
await rename(temporary, workspacePath);
|
||||||
|
createdTemporary = false;
|
||||||
|
createdFragment = false;
|
||||||
|
} finally {
|
||||||
|
if (createdTemporary) await unlink(temporary);
|
||||||
|
if (createdFragment) await unlink(fragmentPath);
|
||||||
|
}
|
||||||
|
return plan;
|
||||||
|
};
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
import { lstat, readFile } from "node:fs/promises";
|
||||||
|
import path from "node:path";
|
||||||
|
import { parseQx, validateQxImportPath, walkSyntax } from "./source.js";
|
||||||
|
|
||||||
|
export const readQxSource = async (root: string, name: string) => {
|
||||||
|
validateQxImportPath(name);
|
||||||
|
let current = path.resolve(root);
|
||||||
|
const segments = name.split("/");
|
||||||
|
for (const [index, segment] of segments.entries()) {
|
||||||
|
current = path.join(current, segment);
|
||||||
|
const stat = await lstat(current);
|
||||||
|
if (stat.isSymbolicLink() || (index === segments.length - 1 ? !stat.isFile() : !stat.isDirectory()))
|
||||||
|
throw new Error(`QX imports must be ordinary files beneath ordinary directories: ${name}`);
|
||||||
|
}
|
||||||
|
return readFile(current, "utf8");
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Local imports share one workspace scope; paths are always repository-relative. */
|
||||||
|
export const resolveQxSources = async (
|
||||||
|
read: (name: string) => Promise<string>, entry = "workspace.qx",
|
||||||
|
) => {
|
||||||
|
const files = new Map<string, string>();
|
||||||
|
const active: string[] = [];
|
||||||
|
const visited = new Set<string>();
|
||||||
|
const segments: { start: number; end: number; fileName: string; sourceStart: number }[] = [];
|
||||||
|
let source = "";
|
||||||
|
const append = (fileName: string, text: string, sourceStart: number) => {
|
||||||
|
segments.push({ start: source.length, end: source.length + text.length, fileName, sourceStart });
|
||||||
|
source += text;
|
||||||
|
};
|
||||||
|
const visit = async (name: string, root: boolean) => {
|
||||||
|
validateQxImportPath(name);
|
||||||
|
if (active.includes(name)) throw new Error(`QX import cycle: ${[...active, name].join(" -> ")}`);
|
||||||
|
if (visited.has(name)) return;
|
||||||
|
const text = await read(name);
|
||||||
|
const syntax = parseQx(text, name);
|
||||||
|
if (syntax.diagnostics.length) throw new Error(syntax.diagnostics.map((d) =>
|
||||||
|
`${name}:${d.line}:${d.column + 1}: ${d.message}`).join("\n"));
|
||||||
|
const declaration = syntax.root.children[0]!;
|
||||||
|
if (declaration.kind !== (root ? "workspaceDecl" : "fragmentDecl"))
|
||||||
|
throw new Error(`${name}: expected ${root ? "workspace" : "fragment"} document`);
|
||||||
|
files.set(name, text);
|
||||||
|
active.push(name);
|
||||||
|
visited.add(name);
|
||||||
|
const braces = syntax.tokens.filter((token) => !token.trivia);
|
||||||
|
let cursor = root ? 0 : braces.find((token) => token.kind === "LBRACE")!.end;
|
||||||
|
const end = root ? text.length : braces.filter((token) => token.kind === "RBRACE").at(-1)!.start;
|
||||||
|
for (const node of walkSyntax(declaration)) {
|
||||||
|
if (node.kind !== "sourceImportDecl") continue;
|
||||||
|
append(name, text.slice(cursor, node.start), cursor);
|
||||||
|
const literal = node.children.find((child) => child.kind === "stringLiteral")!;
|
||||||
|
// Separators prevent adjacent tokens/comments joining across files.
|
||||||
|
append(name, "\n", node.start);
|
||||||
|
await visit(JSON.parse(text.slice(literal.start, literal.end)), false);
|
||||||
|
append(name, "\n", node.end);
|
||||||
|
cursor = node.end;
|
||||||
|
}
|
||||||
|
append(name, text.slice(cursor, end), cursor);
|
||||||
|
active.pop();
|
||||||
|
};
|
||||||
|
await visit(entry, true);
|
||||||
|
return {
|
||||||
|
source, sourceFiles: [...files.keys()], files,
|
||||||
|
originalPosition(line: number, column: number) {
|
||||||
|
const lines = source.split("\n");
|
||||||
|
const offset = lines.slice(0, line - 1).reduce((sum, value) => sum + value.length + 1, 0) +
|
||||||
|
[...(lines[line - 1] ?? "")].slice(0, column).join("").length;
|
||||||
|
const segment = segments.find((entry) => entry.start <= offset && entry.end > offset);
|
||||||
|
if (!segment) return { fileName: entry, line, column };
|
||||||
|
const prefix = files.get(segment.fileName)!.slice(0, segment.sourceStart + offset - segment.start);
|
||||||
|
return { fileName: segment.fileName, line: prefix.split("\n").length,
|
||||||
|
column: prefix.length - prefix.lastIndexOf("\n") - 1 };
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export const loadQxSources = (root: string) => resolveQxSources((name) => readQxSource(root, name));
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
import { ParserRuleContext } from "antlr4ng";
|
||||||
|
import { parseDocument } from "./parser.js";
|
||||||
|
import { QuixosCapabilityParser } from "./generated/QuixosCapabilityParser.js";
|
||||||
|
|
||||||
|
/** Offsets and columns use UTF-16, as do JavaScript and LSP. End is exclusive. */
|
||||||
|
export type SourceRange = { start: number; end: number };
|
||||||
|
export type SourceEdit = SourceRange & { text: string };
|
||||||
|
export type SyntaxNode = SourceRange & { kind: string; children: SyntaxNode[] };
|
||||||
|
|
||||||
|
export const parseQx = (source: string, fileName = "<memory>") => {
|
||||||
|
const parsed = parseDocument(source, fileName);
|
||||||
|
// ANTLR indexes Unicode code points; editors index UTF-16 code units.
|
||||||
|
const offsets = [0];
|
||||||
|
for (const character of source) offsets.push(offsets[offsets.length - 1]! + character.length);
|
||||||
|
const offset = (index: number) => offsets[Math.max(0, index)] ?? source.length;
|
||||||
|
const node = (context: ParserRuleContext): SyntaxNode => ({
|
||||||
|
kind: QuixosCapabilityParser.ruleNames[context.ruleIndex]!,
|
||||||
|
start: offset(context.start?.start ?? 0),
|
||||||
|
end: offset((context.stop?.stop ?? -1) + 1),
|
||||||
|
children: context.children.flatMap((child) => child instanceof ParserRuleContext ? [node(child)] : []),
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
source, fileName,
|
||||||
|
root: node(parsed.tree),
|
||||||
|
diagnostics: parsed.diagnostics.map((diagnostic) => {
|
||||||
|
const line = source.split("\n")[diagnostic.line - 1] ?? "";
|
||||||
|
return { ...diagnostic, column: [...line].slice(0, diagnostic.column).join("").length };
|
||||||
|
}),
|
||||||
|
tokens: parsed.tokens.getTokens().filter((token) => token.type !== -1).map((token) => ({
|
||||||
|
kind: QuixosCapabilityParser.symbolicNames[token.type] ?? "token",
|
||||||
|
start: offset(token.start), end: offset(token.stop + 1),
|
||||||
|
text: token.text ?? "", trivia: token.channel !== 0,
|
||||||
|
})),
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Edits refer to one immutable source snapshot; overlapping edits are errors. */
|
||||||
|
export const applySourceEdits = (source: string, edits: readonly SourceEdit[]) => {
|
||||||
|
const sorted = [...edits].sort((a, b) => a.start - b.start || a.end - b.end);
|
||||||
|
let end = 0;
|
||||||
|
let previousStart = -1;
|
||||||
|
let result = "";
|
||||||
|
for (const edit of sorted) {
|
||||||
|
if (!Number.isInteger(edit.start) || !Number.isInteger(edit.end) ||
|
||||||
|
edit.start < end || edit.start === previousStart || edit.end < edit.start || edit.end > source.length) {
|
||||||
|
throw new Error("Invalid or overlapping source edits");
|
||||||
|
}
|
||||||
|
result += source.slice(end, edit.start) + edit.text;
|
||||||
|
end = edit.end;
|
||||||
|
previousStart = edit.start;
|
||||||
|
}
|
||||||
|
return result + source.slice(end);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const walkSyntax = function* (node: SyntaxNode): Generator<SyntaxNode> {
|
||||||
|
yield node;
|
||||||
|
for (const child of node.children) yield* walkSyntax(child);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const lintQx = (source: string, fileName = "<memory>") => {
|
||||||
|
const syntax = parseQx(source, fileName);
|
||||||
|
const diagnostics = syntax.diagnostics.map((entry) => ({ ...entry, severity: "error" as "error" | "warning" }));
|
||||||
|
if (diagnostics.length) return diagnostics;
|
||||||
|
const seen = new Set<string>();
|
||||||
|
for (const node of walkSyntax(syntax.root)) {
|
||||||
|
if (node.kind !== "sourceImportDecl") continue;
|
||||||
|
const literal = node.children.find((child) => child.kind === "stringLiteral")!;
|
||||||
|
const importPath: string = JSON.parse(source.slice(literal.start, literal.end));
|
||||||
|
let message: string | undefined;
|
||||||
|
let code = "invalid-source-import";
|
||||||
|
try { validateQxImportPath(importPath); } catch (error) { message = (error as Error).message; }
|
||||||
|
if (!message && seen.has(importPath)) { code = "duplicate-source-import"; message = `Repeated local import ${importPath}`; }
|
||||||
|
seen.add(importPath);
|
||||||
|
if (message) {
|
||||||
|
const prefix = source.slice(0, node.start);
|
||||||
|
diagnostics.push({ phase: "syntax", code, message, fileName,
|
||||||
|
line: prefix.split("\n").length, column: prefix.length - prefix.lastIndexOf("\n") - 1,
|
||||||
|
severity: code === "duplicate-source-import" ? "warning" : "error" });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return diagnostics;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Conservative formatter: indentation only, preserving strings and comments verbatim. */
|
||||||
|
export const formatQx = (source: string) => {
|
||||||
|
const syntax = parseQx(source);
|
||||||
|
if (syntax.diagnostics.length) throw new Error("Cannot format QX with syntax errors");
|
||||||
|
const edits: SourceEdit[] = [];
|
||||||
|
let depth = 0;
|
||||||
|
let lineStart = 0;
|
||||||
|
for (const token of syntax.tokens) {
|
||||||
|
if (token.kind === "WS") continue;
|
||||||
|
lineStart = source.lastIndexOf("\n", token.start - 1) + 1;
|
||||||
|
if (/^[ \t]*$/.test(source.slice(lineStart, token.start))) {
|
||||||
|
const indentation = " ".repeat(Math.max(0, depth - (token.kind === "RBRACE" ? 1 : 0)));
|
||||||
|
if (source.slice(lineStart, token.start) !== indentation)
|
||||||
|
edits.push({ start: lineStart, end: token.start, text: indentation });
|
||||||
|
}
|
||||||
|
if (!token.trivia) {
|
||||||
|
if (token.kind === "LBRACE") depth++;
|
||||||
|
if (token.kind === "RBRACE") depth--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return applySourceEdits(source, edits);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const addWorkspaceImport = (source: string, importPath: string) => {
|
||||||
|
validateQxImportPath(importPath);
|
||||||
|
const syntax = parseQx(source);
|
||||||
|
if (syntax.diagnostics.length || syntax.root.children[0]?.kind !== "workspaceDecl")
|
||||||
|
throw new Error("Expected a syntactically valid workspace");
|
||||||
|
for (const node of walkSyntax(syntax.root)) {
|
||||||
|
if (node.kind === "sourceImportDecl") {
|
||||||
|
const literal = node.children.find((child) => child.kind === "stringLiteral")!;
|
||||||
|
if (JSON.parse(source.slice(literal.start, literal.end)) === importPath) return source;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const brace = syntax.tokens.find((token) => token.kind === "LBRACE")!;
|
||||||
|
const newline = source.includes("\r\n") ? "\r\n" : "\n";
|
||||||
|
return applySourceEdits(source, [{ start: brace.end, end: brace.end,
|
||||||
|
text: `${newline} import ${JSON.stringify(importPath)};` }]);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const validateQxImportPath = (value: string) => {
|
||||||
|
if (!/^(?:[A-Za-z0-9_-][A-Za-z0-9_.-]*\/)*[A-Za-z0-9_-][A-Za-z0-9_.-]*\.qx$/.test(value) ||
|
||||||
|
value.split("/").some((part) => part === "." || part === ".."))
|
||||||
|
throw new Error(`Invalid repository-relative QX import path: ${value}`);
|
||||||
|
};
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
import { readFile, writeFile } from "node:fs/promises";
|
||||||
|
import { parseQx, formatQx, lintQx } from "./source.js";
|
||||||
|
import { scaffoldAtom } from "./scaffold.js";
|
||||||
|
import { createGitCapabilityResolver } from "./git-resolver.js";
|
||||||
|
|
||||||
|
const main = async () => {
|
||||||
|
const [command, ...args] = process.argv.slice(2);
|
||||||
|
if (command === "scaffold-atom") {
|
||||||
|
const [root, name, id, ...flags] = args;
|
||||||
|
if (!root || !name || !id || flags.some((flag) => flag !== "--write")) throw new Error("usage: quixos-qx scaffold-atom ROOT NAME ID [--write]");
|
||||||
|
const resolveResource = await createGitCapabilityResolver({ checkoutRoot: `${root}/.quixos/resource-checkouts` });
|
||||||
|
const plan = await scaffoldAtom({ root, name, id, write: flags.includes("--write"), resolveResource });
|
||||||
|
process.stdout.write(`${JSON.stringify(plan, null, 2)}\n`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const [file, flag, ...rest] = args;
|
||||||
|
if (!file || rest.length || (flag && flag !== "--write") || !["parse", "lint", "format"].includes(command ?? "") ||
|
||||||
|
(flag && command !== "format")) throw new Error("usage: quixos-qx parse|lint|format FILE [--write (format only)]");
|
||||||
|
const source = await readFile(file, "utf8");
|
||||||
|
if (command === "format") {
|
||||||
|
const formatted = formatQx(source);
|
||||||
|
if (flag) await writeFile(file, formatted); else process.stdout.write(formatted);
|
||||||
|
} else {
|
||||||
|
const result = command === "parse" ? parseQx(source, file) : lintQx(source, file);
|
||||||
|
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
||||||
|
if (Array.isArray(result) ? result.some((entry) => entry.severity === "error") : result.diagnostics.length) process.exitCode = 1;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
main().catch((error: unknown) => { console.error(error instanceof Error ? error.message : error); process.exitCode = 1; });
|
||||||
@@ -245,7 +245,7 @@ export type DependencyPortRequirement =
|
|||||||
kind: "interface";
|
kind: "interface";
|
||||||
interfaceRevisionId: InterfaceRevisionId;
|
interfaceRevisionId: InterfaceRevisionId;
|
||||||
}
|
}
|
||||||
| { kind: "constructor"; atomId: AtomId };
|
| { kind: "constructor"; atomId: AtomId; inputType?: ValueType };
|
||||||
|
|
||||||
export interface DependencyPort {
|
export interface DependencyPort {
|
||||||
id: DependencyPortId;
|
id: DependencyPortId;
|
||||||
|
|||||||
@@ -928,6 +928,7 @@ const validatePackages = (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "constructor":
|
case "constructor":
|
||||||
|
if (port.requirement.inputType) validateValueType(issues, port.requirement.inputType, `${portPath}.requirement.inputType`, indexes);
|
||||||
if (!indexes.atoms.has(port.requirement.atomId)) {
|
if (!indexes.atoms.has(port.requirement.atomId)) {
|
||||||
issue(
|
issue(
|
||||||
issues,
|
issues,
|
||||||
@@ -1260,6 +1261,14 @@ const validateBoundDependencies = (
|
|||||||
`Atom ${requirement.atomId} has no constructor binding`,
|
`Atom ${requirement.atomId} has no constructor binding`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (requirement.inputType) {
|
||||||
|
const selected = params.indexes.constructors.get(requirement.atomId);
|
||||||
|
const implementation = selected ? params.indexes.packages.get(selected.packageRevisionId)?.exports.get(selected.exportId) : undefined;
|
||||||
|
if (implementation && !valueTypesEqual(requirement.inputType, implementation.inputType)) {
|
||||||
|
issue(issues, "invalid-dependency-binding", `${path}.binding.atomId`,
|
||||||
|
`Constructor port requires input ${typeLabel(requirement.inputType)}, but selected constructor accepts ${typeLabel(implementation.inputType)}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
import assert from "node:assert/strict";
|
||||||
|
import test from "node:test";
|
||||||
|
import { compileCapabilityResourceSource } from "../src/capability-language/parser.js";
|
||||||
|
import { generateTypeScriptBindings, type BindingSchema } from "../src/bindings/index.js";
|
||||||
|
const source = { repository: "https://example.test/p.git", commit: "1".repeat(40) };
|
||||||
|
const schemaFor = (body: string): BindingSchema => {
|
||||||
|
const compiled = compileCapabilityResourceSource(`external atom Thing id "thing"; package Demo id "demo" revision "demo@1" { ${body} }`, { source });
|
||||||
|
assert.equal(compiled.ok, true, JSON.stringify(compiled.diagnostics));
|
||||||
|
if (!compiled.ok || compiled.resource.kind !== "package") throw new Error("expected package");
|
||||||
|
return { format: "quixos-bindings", version: 1, interfaces: [], packages: [compiled.resource.revision] };
|
||||||
|
};
|
||||||
|
test("generator uses exact IDs, restricted ports, nominal references, and lossless scalar types", () => {
|
||||||
|
const schema = schemaFor('operation run id "run-id" : list<int64> -> optional<atom-ref<Thing>> mode call receiver atom Thing requires { state payload id "payload-id" : bytes [read]; };');
|
||||||
|
const generated = generateTypeScriptBindings(schema, "demo@1");
|
||||||
|
assert.match(generated, /Array<bigint>/);
|
||||||
|
assert.match(generated, /Promise<Uint8Array>/);
|
||||||
|
assert.match(generated, /QxObjectRef<"atom:thing">/);
|
||||||
|
assert.doesNotMatch(generated, /"set":/);
|
||||||
|
assert.match(generated, /"run-id": bindQxHandler/);
|
||||||
|
assert.equal(generateTypeScriptBindings(schema, "demo@1"), generated);
|
||||||
|
});
|
||||||
|
test("missing external types and constructor signatures fail generation", () => {
|
||||||
|
const schema = schemaFor('function run id "run" : unit -> message "example.Payload";');
|
||||||
|
assert.throws(() => generateTypeScriptBindings(schema, "demo@1"), /Missing TypeScript message binding/);
|
||||||
|
assert.match(generateTypeScriptBindings(schema, "demo@1", { messages: { "example.Payload": { module: "./payload.js", export: "payload" } } }), /BindingValue<typeof message0>/);
|
||||||
|
const constructor = schemaFor('function run id "run" : unit -> unit requires { constructor thing id "ctor" : Thing; };');
|
||||||
|
assert.throws(() => generateTypeScriptBindings(constructor, "demo@1"), /explicit input contract/);
|
||||||
|
const typed = schemaFor('function run id "run" : unit -> unit requires { constructor thing id "ctor" : Thing input string; };');
|
||||||
|
assert.match(generateTypeScriptBindings(typed, "demo@1"), /construct.*input: string/);
|
||||||
|
});
|
||||||
@@ -28,6 +28,18 @@ const expectIssue = (
|
|||||||
assert.equal(compileWorkspaceRevision(workspace).ok, false);
|
assert.equal(compileWorkspaceRevision(workspace).ok, false);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test("constructor dependency input contracts match the selected constructor", () => {
|
||||||
|
const workspace = makeValidCapabilityWorkspace();
|
||||||
|
const port = workspace.packageImports.flatMap((pkg) => pkg.exports).flatMap((entry) => entry.dependencyPorts)
|
||||||
|
.find((port) => port.requirement.kind === "constructor")!;
|
||||||
|
assert.equal(port.requirement.kind, "constructor");
|
||||||
|
if (port.requirement.kind !== "constructor") return;
|
||||||
|
port.requirement.inputType = valueType.unit;
|
||||||
|
assert.deepEqual(validateWorkspaceRevision(workspace), []);
|
||||||
|
port.requirement.inputType = valueType.string;
|
||||||
|
expectIssue(workspace, "invalid-dependency-binding");
|
||||||
|
});
|
||||||
|
|
||||||
const conformance = (
|
const conformance = (
|
||||||
workspace: WorkspaceRevision,
|
workspace: WorkspaceRevision,
|
||||||
identity: Pick<(typeof workspace.conformances)[number], "atomId" | "interfaceRevisionId">,
|
identity: Pick<(typeof workspace.conformances)[number], "atomId" | "interfaceRevisionId">,
|
||||||
|
|||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
external atom Thing id "atom:example:thing";
|
||||||
|
|
||||||
|
package TypedExample id "package:typed-example" revision "package:typed-example@1" {
|
||||||
|
constructor createThing id "export:typed-example:create" constructs Thing : unit;
|
||||||
|
operation payloadGet id "export:typed-example:payload" : unit -> bytes mode call receiver atom Thing requires {
|
||||||
|
state payload id "port:typed-example:payload" : bytes [read];
|
||||||
|
};
|
||||||
|
}
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
quixos-lock version 1 {
|
||||||
|
quixos source {
|
||||||
|
repository "https://example.test/quixos.git";
|
||||||
|
commit "1111111111111111111111111111111111111111";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
import assert from "node:assert/strict";
|
||||||
|
import test from "node:test";
|
||||||
|
import { mkdtemp, writeFile, readFile, rm, symlink } from "node:fs/promises";
|
||||||
|
import os from "node:os";
|
||||||
|
import path from "node:path";
|
||||||
|
import { parseQx, formatQx, lintQx, applySourceEdits, addWorkspaceImport, walkSyntax,
|
||||||
|
resolveQxSources, readQxSource, compileCapabilitySource, scaffoldAtom, compileWorkspaceRepository } from "../src/capability-language/index.js";
|
||||||
|
|
||||||
|
const workspace = `workspace Test id "w" revision "w@1" commit "${"1".repeat(40)}" {\n// keep 🐈 comment\n}\n`;
|
||||||
|
test("lint reports invalid and redundant imports without resolving repositories", () => {
|
||||||
|
const source = workspace.replace("}\n", 'import "a.qx"; import "a.qx"; import "../bad.qx";\n}\n');
|
||||||
|
assert.deepEqual(lintQx(source).map((entry) => [entry.code, entry.severity]), [
|
||||||
|
["duplicate-source-import", "warning"], ["invalid-source-import", "error"],
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
test("lossless tokens, UTF-16 ranges, and safe source edits", () => {
|
||||||
|
const text = workspace.replace("}\n", 'atom Cat id "🐈";\n}\n');
|
||||||
|
const parsed = parseQx(text);
|
||||||
|
assert.deepEqual(parsed.diagnostics, []);
|
||||||
|
assert.equal(parsed.tokens.map((token) => token.text).join(""), text);
|
||||||
|
const atom = [...walkSyntax(parsed.root)].find((node) => node.kind === "atomDecl")!;
|
||||||
|
assert.equal(text.slice(atom.start, atom.end), 'atom Cat id "🐈";');
|
||||||
|
assert.equal(applySourceEdits(text, [{ ...atom, text: 'atom Dog id "dog";' }]), text.replace('atom Cat id "🐈";', 'atom Dog id "dog";'));
|
||||||
|
assert.throws(() => applySourceEdits(text, [{ start: 0, end: 4, text: "" }, { start: 3, end: 7, text: "" }]), /overlapping/);
|
||||||
|
assert.throws(() => applySourceEdits(text, [{ start: -1, end: 0, text: "" }]), /Invalid/);
|
||||||
|
});
|
||||||
|
test("formatting preserves comments and strings, is idempotent, and rejects invalid source", () => {
|
||||||
|
const text = workspace.replace("}\n", 'atom Cat id "{ cat }"; /* multiline\n unchanged */\n}\n');
|
||||||
|
const formatted = formatQx(text);
|
||||||
|
assert.match(formatted, / atom Cat id "\{ cat \}"; \/\* multiline\n unchanged \*\//);
|
||||||
|
assert.equal(formatQx(formatted), formatted);
|
||||||
|
assert.deepEqual(parseQx(formatted).diagnostics, []);
|
||||||
|
assert.throws(() => formatQx("workspace {"), /syntax errors/);
|
||||||
|
});
|
||||||
|
test("imports preserve root text, deduplicate diamonds, reject cycles, and compile together", async () => {
|
||||||
|
const root = addWorkspaceImport(addWorkspaceImport(workspace, "a.qx"), "b.qx");
|
||||||
|
assert.equal(addWorkspaceImport(root, "a.qx"), root);
|
||||||
|
assert.match(root, /keep 🐈 comment/);
|
||||||
|
const files: Record<string, string> = { "workspace.qx": root,
|
||||||
|
"a.qx": 'fragment { import "shared.qx"; atom A id "a"; }',
|
||||||
|
"b.qx": 'fragment { import "shared.qx"; atom B id "b"; }',
|
||||||
|
"shared.qx": 'fragment { atom Shared id "shared"; }' };
|
||||||
|
const result = await resolveQxSources(async (name) => files[name]!);
|
||||||
|
assert.equal(result.sourceFiles.length, 4);
|
||||||
|
const compiled = compileCapabilitySource(result.source);
|
||||||
|
assert.equal(compiled.ok, true, JSON.stringify(compiled.diagnostics));
|
||||||
|
if (compiled.ok) assert.equal(compiled.workspace.atoms.length, 3);
|
||||||
|
const unresolved = compileCapabilitySource(root);
|
||||||
|
assert.equal(unresolved.ok, false);
|
||||||
|
assert.match(JSON.stringify(unresolved.diagnostics), /unresolved-source-import/);
|
||||||
|
files["shared.qx"] = 'fragment { import "a.qx"; }';
|
||||||
|
await assert.rejects(resolveQxSources(async (name) => files[name]!), /cycle/);
|
||||||
|
assert.throws(() => addWorkspaceImport(workspace, "../x.qx"), /Invalid/);
|
||||||
|
});
|
||||||
|
test("repository scaffolding validates before writing and refuses duplicates and symlinks", async (t) => {
|
||||||
|
const root = await mkdtemp(path.join(os.tmpdir(), "qx-scaffold-"));
|
||||||
|
t.after(() => rm(root, { recursive: true, force: true }));
|
||||||
|
await writeFile(path.join(root, "workspace.qx"), workspace);
|
||||||
|
await writeFile(path.join(root, "quixos.lock"), `quixos-lock version 1 { quixos source { repository "https://example.test/q.git"; commit "${"1".repeat(40)}"; } }`);
|
||||||
|
const resolveResource = async (): Promise<never> => { throw new Error("unexpected resource"); };
|
||||||
|
const options = { root, name: "Cat", id: "cat", write: false, resolveResource };
|
||||||
|
await scaffoldAtom(options);
|
||||||
|
assert.equal(await readFile(path.join(root, "workspace.qx"), "utf8"), workspace);
|
||||||
|
await assert.rejects(readFile(path.join(root, "Cat.qx")), /ENOENT/);
|
||||||
|
await scaffoldAtom({ ...options, write: true });
|
||||||
|
const compiled = await compileWorkspaceRepository({ rootDirectory: root, resolveResource });
|
||||||
|
assert.equal(compiled.workspace.atoms[0]!.id, "cat");
|
||||||
|
await assert.rejects(scaffoldAtom({ ...options, write: true }), /already exists/);
|
||||||
|
await assert.rejects(scaffoldAtom({ ...options, name: "Other", write: true }), /Duplicate|duplicate/);
|
||||||
|
await assert.rejects(readFile(path.join(root, "Other.qx")), /ENOENT/);
|
||||||
|
await symlink(path.join(root, "Cat.qx"), path.join(root, "link.qx"));
|
||||||
|
await assert.rejects(readQxSource(root, "link.qx"), /ordinary files/);
|
||||||
|
});
|
||||||
|
test("lowering diagnostics map to the imported file", async () => {
|
||||||
|
const files: Record<string, string> = { "workspace.qx": addWorkspaceImport(workspace, "bad.qx"),
|
||||||
|
"bad.qx": 'fragment {\n conform Missing as Nope {}\n}' };
|
||||||
|
const sources = await resolveQxSources(async (name) => files[name]!);
|
||||||
|
const compiled = compileCapabilitySource(sources.source);
|
||||||
|
assert.equal(compiled.ok, false);
|
||||||
|
const diagnostic = compiled.diagnostics[0]!;
|
||||||
|
const position = sources.originalPosition(diagnostic.line, diagnostic.column);
|
||||||
|
assert.equal(position.fileName, "bad.qx");
|
||||||
|
assert.equal(position.line, 2);
|
||||||
|
});
|
||||||
@@ -52,8 +52,10 @@ __metadata:
|
|||||||
typescript: "npm:^7.0.2"
|
typescript: "npm:^7.0.2"
|
||||||
bin:
|
bin:
|
||||||
quixos-capability-compile: dist/src/capability-language/cli.js
|
quixos-capability-compile: dist/src/capability-language/cli.js
|
||||||
|
quixos-codegen-ts: dist/src/bindings/cli.js
|
||||||
quixos-descriptor-check: dist/src/descriptor-check.js
|
quixos-descriptor-check: dist/src/descriptor-check.js
|
||||||
quixos-lock-check: dist/src/resource-lock/cli.js
|
quixos-lock-check: dist/src/resource-lock/cli.js
|
||||||
|
quixos-qx: dist/src/capability-language/tool-cli.js
|
||||||
quixos-resource-compile: dist/src/capability-language/resource-cli.js
|
quixos-resource-compile: dist/src/capability-language/resource-cli.js
|
||||||
quixos-workspace-compile: dist/src/capability-language/workspace-cli.js
|
quixos-workspace-compile: dist/src/capability-language/workspace-cli.js
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
|
|||||||
Reference in New Issue
Block a user