occam-verify-cli 1.0.662 → 1.0.664
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.swcrc +3 -0
- package/lib/abbreviations.js +10 -10
- package/lib/action/help.js +27 -2
- package/lib/action/verify.js +33 -205
- package/lib/action/version.js +6 -6
- package/lib/commands.js +4 -4
- package/lib/constants.js +16 -16
- package/lib/context/ephemeral.js +337 -540
- package/lib/context/file/nominal.js +545 -1040
- package/lib/context/liminal.js +159 -325
- package/lib/context/literal.js +34 -138
- package/lib/context/nominal.js +29 -124
- package/lib/context/scoped.js +163 -325
- package/lib/context/synthetic.js +31 -126
- package/lib/context.js +230 -482
- package/lib/defaults.js +8 -8
- package/lib/element/assertion/contained.js +159 -299
- package/lib/element/assertion/defined.js +145 -279
- package/lib/element/assertion/property.js +132 -266
- package/lib/element/assertion/satisfies.js +108 -239
- package/lib/element/assertion/subproof.js +88 -207
- package/lib/element/assertion/type.js +132 -262
- package/lib/element/assertion.js +17 -156
- package/lib/element/assumption.js +187 -386
- package/lib/element/combinator/bracketed.js +19 -142
- package/lib/element/combinator.js +65 -228
- package/lib/element/conclusion.js +72 -370
- package/lib/element/constructor/bracketed.js +34 -157
- package/lib/element/constructor.js +81 -253
- package/lib/element/declaration/combinator.js +41 -286
- package/lib/element/declaration/complexType.js +184 -452
- package/lib/element/declaration/constructor.js +69 -323
- package/lib/element/declaration/metavariable.js +70 -317
- package/lib/element/declaration/simpleType.js +117 -378
- package/lib/element/declaration/typePrefix.js +54 -299
- package/lib/element/declaration/variable.js +74 -328
- package/lib/element/declaration.js +3 -114
- package/lib/element/deduction.js +76 -378
- package/lib/element/derivation.js +31 -340
- package/lib/element/equality.js +152 -347
- package/lib/element/equivalence.js +160 -385
- package/lib/element/equivalences.js +132 -356
- package/lib/element/error.js +16 -290
- package/lib/element/frame.js +210 -418
- package/lib/element/hypothesis.js +56 -354
- package/lib/element/judgement.js +120 -305
- package/lib/element/label.js +62 -236
- package/lib/element/metaType.js +35 -200
- package/lib/element/metavariable.js +249 -459
- package/lib/element/parameter.js +39 -202
- package/lib/element/procedureCall.js +74 -381
- package/lib/element/procedureReference.js +27 -186
- package/lib/element/proof.js +38 -349
- package/lib/element/proofAssertion/premise.js +174 -466
- package/lib/element/proofAssertion/step.js +144 -495
- package/lib/element/proofAssertion/supposition.js +170 -466
- package/lib/element/proofAssertion.js +47 -195
- package/lib/element/property.js +36 -201
- package/lib/element/propertyRelation.js +62 -223
- package/lib/element/reference.js +173 -378
- package/lib/element/rule.js +178 -673
- package/lib/element/section.js +47 -356
- package/lib/element/signature.js +96 -264
- package/lib/element/statement.js +195 -395
- package/lib/element/subDerivation.js +32 -341
- package/lib/element/subproof.js +73 -448
- package/lib/element/substitution/frame.js +114 -257
- package/lib/element/substitution/reference.js +108 -248
- package/lib/element/substitution/statement.js +223 -397
- package/lib/element/substitution/term.js +123 -266
- package/lib/element/substitution.js +97 -296
- package/lib/element/term.js +139 -339
- package/lib/element/topLevelAssertion/axiom.js +153 -459
- package/lib/element/topLevelAssertion/conjecture.js +24 -295
- package/lib/element/topLevelAssertion/lemma.js +22 -289
- package/lib/element/topLevelAssertion/theorem.js +24 -295
- package/lib/element/topLevelAssertion.js +218 -718
- package/lib/element/topLevelMetaAssertion/metaLemma.js +24 -290
- package/lib/element/topLevelMetaAssertion/metatheorem.js +24 -290
- package/lib/element/topLevelMetaAssertion.js +109 -509
- package/lib/element/type.js +198 -435
- package/lib/element/typePrefix.js +27 -186
- package/lib/element/variable.js +119 -308
- package/lib/elements.js +4 -4
- package/lib/index.js +4 -4
- package/lib/main.js +18 -18
- package/lib/messages.js +2 -2
- package/lib/metaTypeNames.js +4 -4
- package/lib/metaTypes.js +10 -10
- package/lib/node/argument.js +15 -109
- package/lib/node/assertion/contained.js +33 -130
- package/lib/node/assertion/defined.js +29 -123
- package/lib/node/assertion/property.js +18 -112
- package/lib/node/assertion/satisfies.js +14 -105
- package/lib/node/assertion/subproof.js +10 -98
- package/lib/node/assertion/type.js +14 -105
- package/lib/node/assertion.js +5 -89
- package/lib/node/assumption.js +12 -103
- package/lib/node/body/axiom.js +5 -89
- package/lib/node/body/conjecture.js +5 -89
- package/lib/node/body/lemma.js +5 -89
- package/lib/node/body/metaLemma.js +5 -89
- package/lib/node/body/metatheorem.js +5 -89
- package/lib/node/body/rule.js +26 -126
- package/lib/node/body/theorem.js +5 -89
- package/lib/node/body.js +15 -109
- package/lib/node/combinator.js +9 -97
- package/lib/node/conclusion.js +12 -103
- package/lib/node/constructor.js +9 -97
- package/lib/node/declaration/combinator.js +10 -98
- package/lib/node/declaration/complexType.js +53 -162
- package/lib/node/declaration/constructor.js +29 -123
- package/lib/node/declaration/metavariable.js +18 -112
- package/lib/node/declaration/property.js +26 -123
- package/lib/node/declaration/simpleType.js +52 -158
- package/lib/node/declaration/typePrefix.js +14 -105
- package/lib/node/declaration/variable.js +33 -130
- package/lib/node/declaration.js +5 -89
- package/lib/node/deduction.js +12 -103
- package/lib/node/derivation.js +12 -125
- package/lib/node/document.js +5 -89
- package/lib/node/equality.js +17 -111
- package/lib/node/equivalence.js +9 -97
- package/lib/node/equivalences.js +5 -89
- package/lib/node/error.js +5 -89
- package/lib/node/frame.js +26 -123
- package/lib/node/header/axiom.js +10 -98
- package/lib/node/header/conjecture.js +5 -89
- package/lib/node/header/lemma.js +5 -89
- package/lib/node/header/metaLemma.js +5 -89
- package/lib/node/header/metatheorem.js +5 -89
- package/lib/node/header/rule.js +5 -89
- package/lib/node/header/theorem.js +5 -89
- package/lib/node/header.js +30 -130
- package/lib/node/hypothesis.js +12 -103
- package/lib/node/judgement.js +15 -109
- package/lib/node/label.js +9 -97
- package/lib/node/labels.js +9 -97
- package/lib/node/metaArgument.js +9 -97
- package/lib/node/metaType.js +16 -104
- package/lib/node/metavariable.js +23 -117
- package/lib/node/parameter.js +32 -123
- package/lib/node/parenthesisedLabel.js +9 -97
- package/lib/node/parenthesisedLabels.js +12 -103
- package/lib/node/placeholder.js +5 -89
- package/lib/node/procedureCall.js +15 -109
- package/lib/node/procedureReference.js +16 -104
- package/lib/node/proof.js +9 -97
- package/lib/node/proofAssertion/premise.js +10 -98
- package/lib/node/proofAssertion/step.js +32 -132
- package/lib/node/proofAssertion/supposition.js +10 -98
- package/lib/node/proofAssertion.js +12 -103
- package/lib/node/property.js +15 -106
- package/lib/node/propertyRelation.js +15 -109
- package/lib/node/qualification.js +12 -103
- package/lib/node/reference.js +9 -97
- package/lib/node/rule.js +26 -129
- package/lib/node/section.js +22 -122
- package/lib/node/signature.js +9 -97
- package/lib/node/statement.js +93 -238
- package/lib/node/subDerivation.js +12 -125
- package/lib/node/subproof.js +18 -115
- package/lib/node/substitution/frame.js +22 -119
- package/lib/node/substitution/reference.js +22 -119
- package/lib/node/substitution/statement.js +42 -151
- package/lib/node/substitution/term.js +22 -119
- package/lib/node/substitution.js +5 -89
- package/lib/node/term.js +51 -160
- package/lib/node/topLevelAssertion/axiom.js +8 -105
- package/lib/node/topLevelAssertion/conjecture.js +8 -105
- package/lib/node/topLevelAssertion/lemma.js +8 -105
- package/lib/node/topLevelAssertion/theorem.js +8 -105
- package/lib/node/topLevelAssertion.js +29 -135
- package/lib/node/topLevelMetaAssertion/metaLemma.js +8 -105
- package/lib/node/topLevelMetaAssertion/metatheorem.js +8 -105
- package/lib/node/topLevelMetaAssertion.js +25 -128
- package/lib/node/type.js +43 -140
- package/lib/node/typePrefix.js +16 -104
- package/lib/node/types.js +9 -97
- package/lib/node/variable.js +16 -104
- package/lib/nominal/lexer.js +3 -68
- package/lib/nominal/parser.js +7 -85
- package/lib/nonTerminalNodeMap.js +171 -101
- package/lib/options.js +6 -6
- package/lib/preamble.js +62 -62
- package/lib/prepare.js +4 -4
- package/lib/process/assign.js +20 -20
- package/lib/process/equate.js +39 -117
- package/lib/process/instantiate.js +10 -9
- package/lib/process/unify.js +199 -325
- package/lib/process/validate.js +87 -195
- package/lib/process/verify.js +263 -786
- package/lib/ruleNames.js +84 -84
- package/lib/tokenTypes.js +3 -3
- package/lib/utilities/bnf.js +7 -7
- package/lib/utilities/brackets.js +18 -18
- package/lib/utilities/clock.js +8 -8
- package/lib/utilities/context.js +23 -191
- package/lib/utilities/element.js +276 -276
- package/lib/utilities/equivalence.js +7 -7
- package/lib/utilities/fileContext.js +9 -9
- package/lib/utilities/instance.js +14 -14
- package/lib/utilities/json.js +211 -211
- package/lib/utilities/releaseContext.js +19 -147
- package/lib/utilities/statement.js +10 -10
- package/lib/utilities/string.js +47 -47
- package/lib/utilities/substitutions.js +19 -19
- package/lib/utilities/type.js +5 -5
- package/lib/utilities/unification.js +196 -426
- package/lib/utilities/validation.js +72 -72
- package/package.json +1 -1
package/lib/node/variable.js
CHANGED
|
@@ -8,111 +8,23 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return VariableNode;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
throw new TypeError("Cannot call a class as a function");
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function _defineProperties(target, props) {
|
|
28
|
-
for(var i = 0; i < props.length; i++){
|
|
29
|
-
var descriptor = props[i];
|
|
30
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
31
|
-
descriptor.configurable = true;
|
|
32
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
33
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
37
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
38
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
39
|
-
return Constructor;
|
|
40
|
-
}
|
|
41
|
-
function _get_prototype_of(o) {
|
|
42
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
43
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
44
|
-
};
|
|
45
|
-
return _get_prototype_of(o);
|
|
46
|
-
}
|
|
47
|
-
function _inherits(subClass, superClass) {
|
|
48
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
49
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
11
|
+
const _occamlanguages = require("occam-languages");
|
|
12
|
+
class VariableNode extends _occamlanguages.NonTerminalNode {
|
|
13
|
+
getVariableIdentifier() {
|
|
14
|
+
let variableIdentifier;
|
|
15
|
+
this.someChildNode((childNode)=>{
|
|
16
|
+
const childNodeTerminalNode = childNode.isTerminalNode();
|
|
17
|
+
if (childNodeTerminalNode) {
|
|
18
|
+
const terminalNode = childNode, content = terminalNode.getContent();
|
|
19
|
+
variableIdentifier = content; ///
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return variableIdentifier;
|
|
50
24
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
value: subClass,
|
|
54
|
-
writable: true,
|
|
55
|
-
configurable: true
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
59
|
-
}
|
|
60
|
-
function _possible_constructor_return(self, call) {
|
|
61
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
62
|
-
return call;
|
|
25
|
+
static fromRuleNameChildNodesOpacityAndPrecedence(ruleName, childNodes, opacity, precedence) {
|
|
26
|
+
return _occamlanguages.NonTerminalNode.fromRuleNameChildNodesOpacityAndPrecedence(VariableNode, ruleName, childNodes, opacity, precedence);
|
|
63
27
|
}
|
|
64
|
-
return _assert_this_initialized(self);
|
|
65
|
-
}
|
|
66
|
-
function _set_prototype_of(o, p) {
|
|
67
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
68
|
-
o.__proto__ = p;
|
|
69
|
-
return o;
|
|
70
|
-
};
|
|
71
|
-
return _set_prototype_of(o, p);
|
|
72
|
-
}
|
|
73
|
-
function _type_of(obj) {
|
|
74
|
-
"@swc/helpers - typeof";
|
|
75
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
76
28
|
}
|
|
77
|
-
function _is_native_reflect_construct() {
|
|
78
|
-
try {
|
|
79
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
80
|
-
} catch (_) {}
|
|
81
|
-
return (_is_native_reflect_construct = function() {
|
|
82
|
-
return !!result;
|
|
83
|
-
})();
|
|
84
|
-
}
|
|
85
|
-
var VariableNode = /*#__PURE__*/ function(NonTerminalNode) {
|
|
86
|
-
_inherits(VariableNode, NonTerminalNode);
|
|
87
|
-
function VariableNode() {
|
|
88
|
-
_class_call_check(this, VariableNode);
|
|
89
|
-
return _call_super(this, VariableNode, arguments);
|
|
90
|
-
}
|
|
91
|
-
_create_class(VariableNode, [
|
|
92
|
-
{
|
|
93
|
-
key: "getVariableIdentifier",
|
|
94
|
-
value: function getVariableIdentifier() {
|
|
95
|
-
var variableIdentifier;
|
|
96
|
-
this.someChildNode(function(childNode) {
|
|
97
|
-
var childNodeTerminalNode = childNode.isTerminalNode();
|
|
98
|
-
if (childNodeTerminalNode) {
|
|
99
|
-
var terminalNode = childNode, content = terminalNode.getContent();
|
|
100
|
-
variableIdentifier = content; ///
|
|
101
|
-
return true;
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
return variableIdentifier;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
], [
|
|
108
|
-
{
|
|
109
|
-
key: "fromRuleNameChildNodesOpacityAndPrecedence",
|
|
110
|
-
value: function fromRuleNameChildNodesOpacityAndPrecedence(ruleName, childNodes, opacity, precedence) {
|
|
111
|
-
return _occamlanguages.NonTerminalNode.fromRuleNameChildNodesOpacityAndPrecedence(VariableNode, ruleName, childNodes, opacity, precedence);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
]);
|
|
115
|
-
return VariableNode;
|
|
116
|
-
}(_occamlanguages.NonTerminalNode);
|
|
117
29
|
|
|
118
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ub2RlL3ZhcmlhYmxlLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgeyBOb25UZXJtaW5hbE5vZGUgfSBmcm9tIFwib2NjYW0tbGFuZ3VhZ2VzXCI7XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFZhcmlhYmxlTm9kZSBleHRlbmRzIE5vblRlcm1pbmFsTm9kZSB7XG4gIGdldFZhcmlhYmxlSWRlbnRpZmllcigpIHtcbiAgICBsZXQgdmFyaWFibGVJZGVudGlmaWVyO1xuXG4gICAgdGhpcy5zb21lQ2hpbGROb2RlKChjaGlsZE5vZGUpID0+
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ub2RlL3ZhcmlhYmxlLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgeyBOb25UZXJtaW5hbE5vZGUgfSBmcm9tIFwib2NjYW0tbGFuZ3VhZ2VzXCI7XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFZhcmlhYmxlTm9kZSBleHRlbmRzIE5vblRlcm1pbmFsTm9kZSB7XG4gIGdldFZhcmlhYmxlSWRlbnRpZmllcigpIHtcbiAgICBsZXQgdmFyaWFibGVJZGVudGlmaWVyO1xuXG4gICAgdGhpcy5zb21lQ2hpbGROb2RlKChjaGlsZE5vZGUpID0+IHtcbiAgICAgIGNvbnN0IGNoaWxkTm9kZVRlcm1pbmFsTm9kZSA9IGNoaWxkTm9kZS5pc1Rlcm1pbmFsTm9kZSgpO1xuXG4gICAgICBpZiAoY2hpbGROb2RlVGVybWluYWxOb2RlKSB7XG4gICAgICAgIGNvbnN0IHRlcm1pbmFsTm9kZSA9IGNoaWxkTm9kZSwgLy8vXG4gICAgICAgICAgICAgIGNvbnRlbnQgPSB0ZXJtaW5hbE5vZGUuZ2V0Q29udGVudCgpO1xuXG4gICAgICAgIHZhcmlhYmxlSWRlbnRpZmllciA9IGNvbnRlbnQ7IC8vL1xuXG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgfVxuICAgIH0pO1xuXG4gICAgcmV0dXJuIHZhcmlhYmxlSWRlbnRpZmllcjtcbiAgfVxuXG4gIHN0YXRpYyBmcm9tUnVsZU5hbWVDaGlsZE5vZGVzT3BhY2l0eUFuZFByZWNlZGVuY2UocnVsZU5hbWUsIGNoaWxkTm9kZXMsIG9wYWNpdHksIHByZWNlZGVuY2UpIHsgcmV0dXJuIE5vblRlcm1pbmFsTm9kZS5mcm9tUnVsZU5hbWVDaGlsZE5vZGVzT3BhY2l0eUFuZFByZWNlZGVuY2UoVmFyaWFibGVOb2RlLCBydWxlTmFtZSwgY2hpbGROb2Rlcywgb3BhY2l0eSwgcHJlY2VkZW5jZSk7IH1cbn1cbiJdLCJuYW1lcyI6WyJWYXJpYWJsZU5vZGUiLCJOb25UZXJtaW5hbE5vZGUiLCJnZXRWYXJpYWJsZUlkZW50aWZpZXIiLCJ2YXJpYWJsZUlkZW50aWZpZXIiLCJzb21lQ2hpbGROb2RlIiwiY2hpbGROb2RlIiwiY2hpbGROb2RlVGVybWluYWxOb2RlIiwiaXNUZXJtaW5hbE5vZGUiLCJ0ZXJtaW5hbE5vZGUiLCJjb250ZW50IiwiZ2V0Q29udGVudCIsImZyb21SdWxlTmFtZUNoaWxkTm9kZXNPcGFjaXR5QW5kUHJlY2VkZW5jZSIsInJ1bGVOYW1lIiwiY2hpbGROb2RlcyIsIm9wYWNpdHkiLCJwcmVjZWRlbmNlIl0sIm1hcHBpbmdzIjoiQUFBQTs7OzsrQkFJQTs7O2VBQXFCQTs7O2dDQUZXO0FBRWpCLE1BQU1BLHFCQUFxQkMsK0JBQWU7SUFDdkRDLHdCQUF3QjtRQUN0QixJQUFJQztRQUVKLElBQUksQ0FBQ0MsYUFBYSxDQUFDLENBQUNDO1lBQ2xCLE1BQU1DLHdCQUF3QkQsVUFBVUUsY0FBYztZQUV0RCxJQUFJRCx1QkFBdUI7Z0JBQ3pCLE1BQU1FLGVBQWVILFdBQ2ZJLFVBQVVELGFBQWFFLFVBQVU7Z0JBRXZDUCxxQkFBcUJNLFNBQVMsR0FBRztnQkFFakMsT0FBTztZQUNUO1FBQ0Y7UUFFQSxPQUFPTjtJQUNUO0lBRUEsT0FBT1EsMkNBQTJDQyxRQUFRLEVBQUVDLFVBQVUsRUFBRUMsT0FBTyxFQUFFQyxVQUFVLEVBQUU7UUFBRSxPQUFPZCwrQkFBZSxDQUFDVSwwQ0FBMEMsQ0FBQ1gsY0FBY1ksVUFBVUMsWUFBWUMsU0FBU0M7SUFBYTtBQUM3TiJ9
|
package/lib/nominal/lexer.js
CHANGED
|
@@ -8,73 +8,8 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return NominalLexer;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
if (self === void 0) {
|
|
14
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
15
|
-
}
|
|
16
|
-
return self;
|
|
17
|
-
}
|
|
18
|
-
function _call_super(_this, derived, args) {
|
|
19
|
-
derived = _get_prototype_of(derived);
|
|
20
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
21
|
-
}
|
|
22
|
-
function _class_call_check(instance, Constructor) {
|
|
23
|
-
if (!(instance instanceof Constructor)) {
|
|
24
|
-
throw new TypeError("Cannot call a class as a function");
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function _get_prototype_of(o) {
|
|
28
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
29
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
30
|
-
};
|
|
31
|
-
return _get_prototype_of(o);
|
|
32
|
-
}
|
|
33
|
-
function _inherits(subClass, superClass) {
|
|
34
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
35
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
36
|
-
}
|
|
37
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
38
|
-
constructor: {
|
|
39
|
-
value: subClass,
|
|
40
|
-
writable: true,
|
|
41
|
-
configurable: true
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
11
|
+
const _occamgrammars = require("occam-grammars");
|
|
12
|
+
class NominalLexer extends _occamgrammars.NominalLexer {
|
|
45
13
|
}
|
|
46
|
-
function _possible_constructor_return(self, call) {
|
|
47
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
48
|
-
return call;
|
|
49
|
-
}
|
|
50
|
-
return _assert_this_initialized(self);
|
|
51
|
-
}
|
|
52
|
-
function _set_prototype_of(o, p) {
|
|
53
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
54
|
-
o.__proto__ = p;
|
|
55
|
-
return o;
|
|
56
|
-
};
|
|
57
|
-
return _set_prototype_of(o, p);
|
|
58
|
-
}
|
|
59
|
-
function _type_of(obj) {
|
|
60
|
-
"@swc/helpers - typeof";
|
|
61
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
62
|
-
}
|
|
63
|
-
function _is_native_reflect_construct() {
|
|
64
|
-
try {
|
|
65
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
66
|
-
} catch (_) {}
|
|
67
|
-
return (_is_native_reflect_construct = function() {
|
|
68
|
-
return !!result;
|
|
69
|
-
})();
|
|
70
|
-
}
|
|
71
|
-
var NominalLexer = /*#__PURE__*/ function(NominalLexerBase) {
|
|
72
|
-
_inherits(NominalLexer, NominalLexerBase);
|
|
73
|
-
function NominalLexer() {
|
|
74
|
-
_class_call_check(this, NominalLexer);
|
|
75
|
-
return _call_super(this, NominalLexer, arguments);
|
|
76
|
-
}
|
|
77
|
-
return NominalLexer;
|
|
78
|
-
}(_occamgrammars.NominalLexer);
|
|
79
14
|
|
|
80
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ub21pbmFsL2xleGVyLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgeyBOb21pbmFsTGV4ZXIgYXMgTm9taW5hbExleGVyQmFzZSB9IGZyb20gXCJvY2NhbS1ncmFtbWFyc1wiO1xuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBOb21pbmFsTGV4ZXIgZXh0ZW5kcyBOb21pbmFsTGV4ZXJCYXNlIHt9XG4iXSwibmFtZXMiOlsiTm9taW5hbExleGVyIiwiTm9taW5hbExleGVyQmFzZSJdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7K0JBSUE7OztlQUFxQkE7OzsrQkFGNEI7QUFFbEMsTUFBTUEscUJBQXFCQywyQkFBZ0I7QUFBRSJ9
|
package/lib/nominal/parser.js
CHANGED
|
@@ -8,95 +8,17 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return NominalParser;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
function _assert_this_initialized(self) {
|
|
15
|
-
if (self === void 0) {
|
|
16
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
17
|
-
}
|
|
18
|
-
return self;
|
|
19
|
-
}
|
|
20
|
-
function _call_super(_this, derived, args) {
|
|
21
|
-
derived = _get_prototype_of(derived);
|
|
22
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
23
|
-
}
|
|
24
|
-
function _class_call_check(instance, Constructor) {
|
|
25
|
-
if (!(instance instanceof Constructor)) {
|
|
26
|
-
throw new TypeError("Cannot call a class as a function");
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function _define_property(obj, key, value) {
|
|
30
|
-
if (key in obj) {
|
|
31
|
-
Object.defineProperty(obj, key, {
|
|
32
|
-
value: value,
|
|
33
|
-
enumerable: true,
|
|
34
|
-
configurable: true,
|
|
35
|
-
writable: true
|
|
36
|
-
});
|
|
37
|
-
} else {
|
|
38
|
-
obj[key] = value;
|
|
39
|
-
}
|
|
40
|
-
return obj;
|
|
41
|
-
}
|
|
42
|
-
function _get_prototype_of(o) {
|
|
43
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
44
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
45
|
-
};
|
|
46
|
-
return _get_prototype_of(o);
|
|
47
|
-
}
|
|
48
|
-
function _inherits(subClass, superClass) {
|
|
49
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
50
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
51
|
-
}
|
|
52
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
53
|
-
constructor: {
|
|
54
|
-
value: subClass,
|
|
55
|
-
writable: true,
|
|
56
|
-
configurable: true
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
60
|
-
}
|
|
11
|
+
const _occamlanguages = require("occam-languages");
|
|
12
|
+
const _occamgrammars = require("occam-grammars");
|
|
13
|
+
const _nonTerminalNodeMap = /*#__PURE__*/ _interop_require_default(require("../nonTerminalNodeMap"));
|
|
61
14
|
function _interop_require_default(obj) {
|
|
62
15
|
return obj && obj.__esModule ? obj : {
|
|
63
16
|
default: obj
|
|
64
17
|
};
|
|
65
18
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
return _assert_this_initialized(self);
|
|
71
|
-
}
|
|
72
|
-
function _set_prototype_of(o, p) {
|
|
73
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
74
|
-
o.__proto__ = p;
|
|
75
|
-
return o;
|
|
76
|
-
};
|
|
77
|
-
return _set_prototype_of(o, p);
|
|
78
|
-
}
|
|
79
|
-
function _type_of(obj) {
|
|
80
|
-
"@swc/helpers - typeof";
|
|
81
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
19
|
+
class NominalParser extends _occamgrammars.NominalParser {
|
|
20
|
+
static NonTerminalNodeMap = _nonTerminalNodeMap.default;
|
|
21
|
+
static defaultNonTerminalNode = _occamlanguages.NonTerminalNode;
|
|
82
22
|
}
|
|
83
|
-
function _is_native_reflect_construct() {
|
|
84
|
-
try {
|
|
85
|
-
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
86
|
-
} catch (_) {}
|
|
87
|
-
return (_is_native_reflect_construct = function() {
|
|
88
|
-
return !!result;
|
|
89
|
-
})();
|
|
90
|
-
}
|
|
91
|
-
var NominalParser = /*#__PURE__*/ function(NominalParserBase) {
|
|
92
|
-
_inherits(NominalParser, NominalParserBase);
|
|
93
|
-
function NominalParser() {
|
|
94
|
-
_class_call_check(this, NominalParser);
|
|
95
|
-
return _call_super(this, NominalParser, arguments);
|
|
96
|
-
}
|
|
97
|
-
return NominalParser;
|
|
98
|
-
}(_occamgrammars.NominalParser);
|
|
99
|
-
_define_property(NominalParser, "NonTerminalNodeMap", _nonTerminalNodeMap.default);
|
|
100
|
-
_define_property(NominalParser, "defaultNonTerminalNode", _occamlanguages.NonTerminalNode);
|
|
101
23
|
|
|
102
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ub21pbmFsL3BhcnNlci5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuaW1wb3J0IHsgTm9uVGVybWluYWxOb2RlIH0gZnJvbSBcIm9jY2FtLWxhbmd1YWdlc1wiO1xuaW1wb3J0IHsgTm9taW5hbFBhcnNlciBhcyBOb21pbmFsUGFyc2VyQmFzZSB9IGZyb20gXCJvY2NhbS1ncmFtbWFyc1wiO1xuXG5pbXBvcnQgTm9uVGVybWluYWxOb2RlTWFwIGZyb20gXCIuLi9ub25UZXJtaW5hbE5vZGVNYXBcIjtcblxuZXhwb3J0IGRlZmF1bHQgY2xhc3MgTm9taW5hbFBhcnNlciBleHRlbmRzIE5vbWluYWxQYXJzZXJCYXNlIHtcbiAgc3RhdGljIE5vblRlcm1pbmFsTm9kZU1hcCA9IE5vblRlcm1pbmFsTm9kZU1hcDtcblxuICBzdGF0aWMgZGVmYXVsdE5vblRlcm1pbmFsTm9kZSA9IE5vblRlcm1pbmFsTm9kZTtcbn1cbiJdLCJuYW1lcyI6WyJOb21pbmFsUGFyc2VyIiwiTm9taW5hbFBhcnNlckJhc2UiLCJOb25UZXJtaW5hbE5vZGVNYXAiLCJkZWZhdWx0Tm9uVGVybWluYWxOb2RlIiwiTm9uVGVybWluYWxOb2RlIl0sIm1hcHBpbmdzIjoiQUFBQTs7OzsrQkFPQTs7O2VBQXFCQTs7O2dDQUxXOytCQUNtQjsyRUFFcEI7Ozs7OztBQUVoQixNQUFNQSxzQkFBc0JDLDRCQUFpQjtJQUMxRCxPQUFPQyxxQkFBcUJBLDJCQUFrQixDQUFDO0lBRS9DLE9BQU9DLHlCQUF5QkMsK0JBQWUsQ0FBQztBQUNsRCJ9
|