minigrace
Version:
A compiler for the Grace programming language
574 lines (572 loc) • 30.4 kB
JavaScript
let gracecode_regularExpression_sourceFile = "/Users/black/Development/mg/gracelang/minigrace/regularExpression.grace";
let gracecode_regularExpression_sha256 = "f13d6f9552bf332ddfb0eaecf0c4292606cee1d93e069370cf1b4fd56c51ca22";
let gracecode_regularExpression_minigraceRevision = "b57591d29fc5ee5270d114920bf671367b8c3ecb";
let gracecode_regularExpression_minigraceGeneration = "5171";
if (typeof gctCache !== "undefined")
gctCache["regularExpression"] = "dialect:\n standard\nfreshScopes:\n $101\n $102\nmethodTypes:$100:\n fromString(regExString:String)modifiers(modifiers:String) \u2192 Unknown\nmethodTypes:$101:\n allMatches(text:String) \u2192 Unknown\n firstMatchingPosition(text:String)ifNone(noMatchBlock:Unknown) \u2192 Unknown\n firstMatchingString(text:String)ifNone(noMatchBlock:Unknown) \u2192 Unknown\n matches(text:String) \u2192 Unknown\nmodules:\n standard\npath:\n /Users/black/Development/mg/gracelang/minigrace/regularExpression.grace\nscope:$100:\n MatchResult type\n RegExError Unknown (def) $scope_done public\n SyntaxError Unknown (def) $scope_done public\n asDebugString String (go) $scope_string\n asString String (go) $scope_string\n basicAsString String (go) $scope_string\n fromString(1) Unknown (mth) $scope_done\n fromString(1)modifiers(1) Unknown (mth) $101\n isMe(1) Boolean (go) $scope_boolean\n myIdentityHash Number (go) $scope_number\nscope:$101:\n allMatches(1) Unknown (mth) $scope_done\n asDebugString String (go) $scope_string\n asString Unknown (def) $scope_string public\n basicAsString String (go) $scope_string\n firstMatchingPosition(1)ifNone(1) Unknown (mth) $scope_done\n firstMatchingString(1)ifNone(1) Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n matchResult(1)at(1) Unknown (mth) $102 confidential\n matches(1) Unknown (mth) $scope_done\n myIdentityHash Number (go) $scope_number\nscope:$102:\n asDebugString String (go) $scope_string\n asString String (go) $scope_string\n basicAsString String (go) $scope_string\n group(1) Unknown (mth) $scope_done\n isMe(1) Boolean (go) $scope_boolean\n myIdentityHash Number (go) $scope_number\n position Unknown (def) $scopeEmpty public\n stringSeq Unknown (def) $scopeEmpty\n whole Unknown (mth) $scope_done\nself:\n $100\ntypedec:$100.MatchResult:\n type MatchResult = interface {\n position\n group(i)\n whole}\ntypes:\n $100.MatchResult\n";
if (typeof originalSourceLines !== "undefined") {
originalSourceLines["regularExpression"] = [
"dialect \"standard\"",
"// A regular exprsssion module for Grace. Implemented with JS regular expressions",
"",
"method fromString(regExString) {",
" // Returns a new regular expression based on regEx with no modifiers",
" fromString(regExString) modifiers \"\"",
"}",
"",
"def RegExError is public = ProgrammingError.refine \"RegExError\"",
"",
"def SyntaxError is public = RegExError.refine \"SyntaxError\"",
"",
"class fromString(regExString:String) modifiers(modifiers:String) {",
" native \"js\" code ‹",
" try {",
" this._value = new RegExp(var_regExString._value, var_modifiers._value);",
" } catch (ex) {",
" if (ex.name == \"SyntaxError\") raiseException(var_SyntaxError, ex.message);",
" else raiseException(var_RegExError, ex.toString());",
" }",
" ›",
" def asString is public = \"regular expression {regExString}\"",
" ",
" method matches(text:String) {",
" // answers true if I match text, and false if I do not",
" native \"js\" code ",
" ‹this._value.lastIndex = 0;",
" return (this._value.test(var_text._value) ? GraceTrue : GraceFalse)›",
" }",
" method firstMatchingPosition(text:String) ifNone(noMatchBlock) {",
" // answers the index of the first substring of text that matches me",
" def matchPosn = native \"js\" code ",
" ‹this._value.lastIndex = 0;",
" result = new GraceNum(var_text._value.search(this._value) + 1)›",
" if (matchPosn == 0) then {",
" noMatchBlock.apply",
" } else {",
" matchPosn",
" }",
" }",
" method firstMatchingString(text:String) ifNone(noMatchBlock) {",
" // answers the first substring of text that matches me",
" native \"js\" code ",
" ‹this._value.lastIndex = 0;",
" const matchStr = this._value.exec(var_text._value);",
" if (matchStr) { return new GraceString(matchStr[0]); }›",
" noMatchBlock.apply",
" }",
" method allMatches(text:String) {",
" // answers a collection containing all the substrings of text that match me",
" // Each element is a matchResult(_)at(_) object that describes one match",
" ",
" // apb: my first implementation used the String.matchAll method, but in Chrome",
" // this appeared not to work.",
" def matchList = list.empty",
" native \"js\" code",
" ‹const patt = this._value;",
" patt.lastIndex = 0; // start at the beginning",
" var res;",
" while(res = patt.exec(var_text._value)) {",
" request(var_matchList, \"add(1)\", [1],",
" selfRequest(this, \"matchResult(1)at(1)\", [1, 1], ",
" new GraceList(res.map(elt => ",
" elt ? new GraceString(elt) : new GraceString(\"\"))),",
" new GraceNum(res.index + 1)));",
" if (! patt.global) break; // not global regex, so we are done.",
" patt.lastIndex = res.index + 1 // otherwise, overlapping matches are missed",
" }› ",
" matchList",
" }",
" ",
" class matchResult(strings) at (index) is confidential {",
" def stringSeq = strings",
" def position is public = index // the index at which the matching text starts",
" method group(i) { ",
" // returns the i_th matching group, or raises BoundsError if there is none",
" stringSeq.at(i + 1)",
" }",
" method whole {",
" // returns the whole of the matching text",
" stringSeq.first",
" }",
" }",
"}",
"",
"type MatchResult = interface {",
" position // the index at which the matching text starts",
" group(i) // i is an integer; returns the text matching the i_th parenthesized matching group, ",
" // or raises BoundsError if there is no such group.",
" whole // returns the whole of the matching text",
"}",
"" ];
}
function gracecode_regularExpression() {
importedModules["regularExpression"] = this;
const var_$module = this;
this.definitionModule = "regularExpression";
this.definitionLine = 1;
setLineNumber(1); // compilenode dialect
// Dialect "standard"
const var_$dialect = do_import("standard", gracecode_standard);
this.outer = var_$dialect;
this.closureKeys = this.closureKeys || [];
this.closureKeys.push("outer_regularExpression_1");
this.outer_regularExpression_1 = var_$dialect;
var func0 = function(argcv, var_regExString) { // method fromString(_), line 4
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 1) && (numArgs !== 1)) {
raiseTypeArgError("fromString(_)", 0, numArgs - 1);
}
setLineNumber(6); // compilenode string
var call1 = selfRequest(var_$module, "fromString(1)modifiers(1)", [1, 1], var_regExString, GraceEmptyString);
return call1;
}; // end of method fromString(_)
this.methods["fromString(1)"] = func0;
func0.methodName = "fromString(1)";
func0.paramCounts = [1];
func0.paramNames = ["regExString"];
func0.definitionLine = 4;
func0.definitionModule = "regularExpression";
var func2 = function(argcv, var_regExString, var_modifiers) { // method fromString(_)modifiers(_), line 13
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 2) && (numArgs !== 2)) {
raiseTypeArgError("fromString(_)modifiers(_)", 0, numArgs - 2);
}
setLineNumber(13); // compilenode member
var call3 = selfRequest(var_$dialect, "String", [0]);
assertTypeOrMsg(var_regExString, call3, "argument 1 in request of `fromString(_)modifiers(_)`", "String");
var call4 = selfRequest(var_$dialect, "String", [0]);
assertTypeOrMsg(var_modifiers, call4, "argument 2 in request of `fromString(_)modifiers(_)`", "String");
var ouc = emptyGraceObject("fromString(_)modifiers(_)", "regularExpression", 13);
var ouc_init = this.methods["fromString(1)modifiers(1)$build(3)"].call(this, null, var_regExString, var_modifiers, ouc, [], []);
ouc_init.call(ouc);
return ouc;
}; // end of method fromString(_)modifiers(_)
var call5 = selfRequest(var_$dialect, "String", [0]);
var call6 = selfRequest(var_$dialect, "String", [0]);
func2.paramTypes = [call5, call6];
this.methods["fromString(1)modifiers(1)"] = func2;
func2.methodName = "fromString(1)modifiers(1)";
func2.paramCounts = [1, 1];
func2.paramNames = ["regExString", "modifiers"];
func2.definitionLine = 13;
func2.definitionModule = "regularExpression";
var func7 = function(argcv, var_regExString, var_modifiers, inheritingObject, aliases, exclusions) { // method fromString(_)modifiers(_)$build(_,_,_), line 13
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 4;
if ((numArgs > 2) && (numArgs !== 2)) {
raiseTypeArgError("fromString(_)modifiers(_)", 0, numArgs - 2);
}
var call8 = selfRequest(var_$dialect, "String", [0]);
assertTypeOrMsg(var_regExString, call8, "argument 1 in request of `fromString(_)modifiers(_)`", "String");
var call9 = selfRequest(var_$dialect, "String", [0]);
assertTypeOrMsg(var_modifiers, call9, "argument 2 in request of `fromString(_)modifiers(_)`", "String");
var obj10_build = function(ignore, var_regExString, var_modifiers, outerObj, aliases, exclusions) {
this.closureKeys = this.closureKeys || [];
this.closureKeys.push("outer_regularExpression_13");
this.outer_regularExpression_13 = outerObj;
const inheritedExclusions = { };
for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) {
const exMeth = exclusions[eix];
inheritedExclusions[exMeth] = this.methods[exMeth]; };
this.data.asString = undefined;
var reader11_asString = function() { // reader method asString
if (this.data.asString === undefined) raiseUninitializedVariable("asString");
return this.data.asString;
};
reader11_asString.isDef = true;
this.methods["asString"] = reader11_asString;
var func12 = function(argcv, var_text) { // method matches(_), line 24
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 1) && (numArgs !== 1)) {
raiseTypeArgError("matches(_)", 0, numArgs - 1);
}
setLineNumber(24); // compilenode member
var call13 = selfRequest(var_$dialect, "String", [0]);
assertTypeOrMsg(var_text, call13, "argument to request of `matches(_)`", "String");
setLineNumber(26); // compilenode call
var result = GraceDone; // start native code from line 26
this._value.lastIndex = 0;
return (this._value.test(var_text._value) ? GraceTrue : GraceFalse) // end native code insertion
return result;
}; // end of method matches(_)
setLineNumber(24); // compilenode member
var call15 = selfRequest(var_$dialect, "String", [0]);
func12.paramTypes = [call15];
this.methods["matches(1)"] = func12;
func12.methodName = "matches(1)";
func12.paramCounts = [1];
func12.paramNames = ["text"];
func12.definitionLine = 24;
func12.definitionModule = "regularExpression";
var func16 = function(argcv, var_text, var_noMatchBlock) { // method firstMatchingPosition(_)ifNone(_), line 30
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 2) && (numArgs !== 2)) {
raiseTypeArgError("firstMatchingPosition(_)ifNone(_)", 0, numArgs - 2);
}
setLineNumber(30); // compilenode member
var call17 = selfRequest(var_$dialect, "String", [0]);
assertTypeOrMsg(var_text, call17, "argument 1 in request of `firstMatchingPosition(_)ifNone(_)`", "String");
setLineNumber(32); // compilenode call
var result = GraceDone; // start native code from line 32
this._value.lastIndex = 0;
result = new GraceNum(var_text._value.search(this._value) + 1) // end native code insertion
var var_matchPosn = result;
var if19 = GraceDone;
setLineNumber(35); // compilenode num
// call case 4: other requests
if (var_matchPosn === undefined) raiseUninitializedVariable("matchPosn");
var term20 = request(var_matchPosn, "==(1)", [1], new GraceNum(0));
if (Grace_isTrue(term20)) {
setLineNumber(36); // compilenode member
// call case 4: other requests
var call21 = request(var_noMatchBlock, "apply", [0]);
if19 = call21;
} else {
if (var_matchPosn === undefined) raiseUninitializedVariable("matchPosn");
if19 = var_matchPosn;
}
return if19;
}; // end of method firstMatchingPosition(_)ifNone(_)
setLineNumber(30); // compilenode member
var call22 = selfRequest(var_$dialect, "String", [0]);
func16.paramTypes = [call22, type_Unknown];
this.methods["firstMatchingPosition(1)ifNone(1)"] = func16;
func16.methodName = "firstMatchingPosition(1)ifNone(1)";
func16.paramCounts = [1, 1];
func16.paramNames = ["text", "noMatchBlock"];
func16.definitionLine = 30;
func16.definitionModule = "regularExpression";
var func23 = function(argcv, var_text, var_noMatchBlock) { // method firstMatchingString(_)ifNone(_), line 41
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 2) && (numArgs !== 2)) {
raiseTypeArgError("firstMatchingString(_)ifNone(_)", 0, numArgs - 2);
}
setLineNumber(41); // compilenode member
var call24 = selfRequest(var_$dialect, "String", [0]);
assertTypeOrMsg(var_text, call24, "argument 1 in request of `firstMatchingString(_)ifNone(_)`", "String");
setLineNumber(43); // compilenode call
var result = GraceDone; // start native code from line 43
this._value.lastIndex = 0;
const matchStr = this._value.exec(var_text._value);
if (matchStr) { return new GraceString(matchStr[0]); } // end native code insertion
setLineNumber(47); // compilenode member
// call case 4: other requests
var call26 = request(var_noMatchBlock, "apply", [0]);
return call26;
}; // end of method firstMatchingString(_)ifNone(_)
setLineNumber(41); // compilenode member
var call27 = selfRequest(var_$dialect, "String", [0]);
func23.paramTypes = [call27, type_Unknown];
this.methods["firstMatchingString(1)ifNone(1)"] = func23;
func23.methodName = "firstMatchingString(1)ifNone(1)";
func23.paramCounts = [1, 1];
func23.paramNames = ["text", "noMatchBlock"];
func23.definitionLine = 41;
func23.definitionModule = "regularExpression";
var func28 = function(argcv, var_text) { // method allMatches(_), line 49
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 1) && (numArgs !== 1)) {
raiseTypeArgError("allMatches(_)", 0, numArgs - 1);
}
setLineNumber(49); // compilenode member
var call29 = selfRequest(var_$dialect, "String", [0]);
assertTypeOrMsg(var_text, call29, "argument to request of `allMatches(_)`", "String");
setLineNumber(55); // compilenode member
// call case 4: other requests
var call31 = selfRequest(var_$dialect, "list", [0]);
var call30 = request(call31, "empty", [0]);
var var_matchList = call30;
setLineNumber(56); // compilenode call
var result = GraceDone; // start native code from line 56
const patt = this._value;
patt.lastIndex = 0; // start at the beginning
var res;
while(res = patt.exec(var_text._value)) {
request(var_matchList, "add(1)", [1],
selfRequest(this, "matchResult(1)at(1)", [1, 1],
new GraceList(res.map(elt =>
elt ? new GraceString(elt) : new GraceString(""))),
new GraceNum(res.index + 1)));
if (! patt.global) break; // not global regex, so we are done.
patt.lastIndex = res.index + 1 // otherwise, overlapping matches are missed
} // end native code insertion
if (var_matchList === undefined) raiseUninitializedVariable("matchList");
return var_matchList;
}; // end of method allMatches(_)
setLineNumber(49); // compilenode member
var call33 = selfRequest(var_$dialect, "String", [0]);
func28.paramTypes = [call33];
this.methods["allMatches(1)"] = func28;
func28.methodName = "allMatches(1)";
func28.paramCounts = [1];
func28.paramNames = ["text"];
func28.definitionLine = 49;
func28.definitionModule = "regularExpression";
var func34 = function(argcv, var_strings, var_index) { // method matchResult(_)at(_), line 72
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 2) && (numArgs !== 2)) {
raiseTypeArgError("matchResult(_)at(_)", 0, numArgs - 2);
}
var ouc = emptyGraceObject("fromString(_)modifiers(_).matchResult(_)at(_)", "regularExpression", 72);
var ouc_init = this.methods["matchResult(1)at(1)$build(3)"].call(this, null, var_strings, var_index, ouc, [], []);
ouc_init.call(ouc);
return ouc;
}; // end of method matchResult(_)at(_)
func34.confidential = true;
this.methods["matchResult(1)at(1)"] = func34;
func34.methodName = "matchResult(1)at(1)";
func34.paramCounts = [1, 1];
func34.paramNames = ["strings", "index"];
func34.definitionLine = 72;
func34.definitionModule = "regularExpression";
var func35 = function(argcv, var_strings, var_index, inheritingObject, aliases, exclusions) { // method matchResult(_)at(_)$build(_,_,_), line 72
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 4;
if ((numArgs > 2) && (numArgs !== 2)) {
raiseTypeArgError("matchResult(_)at(_)", 0, numArgs - 2);
}
var obj36_build = function(ignore, var_strings, var_index, outerObj, aliases, exclusions) {
this.closureKeys = this.closureKeys || [];
this.closureKeys.push("outer_regularExpression_72");
this.outer_regularExpression_72 = outerObj;
const inheritedExclusions = { };
for (var eix = 0, eLen = exclusions.length; eix < eLen; eix ++) {
const exMeth = exclusions[eix];
inheritedExclusions[exMeth] = this.methods[exMeth]; };
this.data.stringSeq = undefined;
var reader37_stringSeq = function() { // reader method stringSeq
if (this.data.stringSeq === undefined) raiseUninitializedVariable("stringSeq");
return this.data.stringSeq;
};
reader37_stringSeq.isDef = true;
reader37_stringSeq.confidential = true;
this.methods["stringSeq"] = reader37_stringSeq;
this.data.position = undefined;
var reader38_position = function() { // reader method position
if (this.data.position === undefined) raiseUninitializedVariable("position");
return this.data.position;
};
reader38_position.isDef = true;
this.methods["position"] = reader38_position;
var func39 = function(argcv, var_i) { // method group(_), line 75
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 1) && (numArgs !== 1)) {
raiseTypeArgError("group(_)", 0, numArgs - 1);
}
setLineNumber(77); // compilenode num
// call case 4: other requests
var sum41 = request(var_i, "+(1)", [1], new GraceNum(1));
// call case 4: other requests
var call42 = selfRequest(this, "stringSeq", [0]);
var call40 = request(call42, "at(1)", [1], sum41);
return call40;
}; // end of method group(_)
this.methods["group(1)"] = func39;
func39.methodName = "group(1)";
func39.paramCounts = [1];
func39.paramNames = ["i"];
func39.definitionLine = 75;
func39.definitionModule = "regularExpression";
var func43 = function(argcv) { // method whole, line 79
var returnTarget = invocationCount;
invocationCount++;
const numArgs = arguments.length - 1;
if ((numArgs > 0) && (numArgs !== 0)) {
raiseTypeArgError("whole", 0, numArgs - 0);
}
setLineNumber(81); // compilenode member
// call case 4: other requests
var call45 = selfRequest(this, "stringSeq", [0]);
var call44 = request(call45, "first", [0]);
return call44;
}; // end of method whole
this.methods["whole"] = func43;
func43.methodName = "whole";
func43.paramCounts = [0];
func43.paramNames = [];
func43.definitionLine = 79;
func43.definitionModule = "regularExpression";
const overridenByAliases = { };
for (let aix = 0, aLen = aliases.length; aix < aLen; aix ++) {
const a = aliases[aix];
const newNm = a.newName;
const oldNm = a.oldName;
overridenByAliases[newNm] = this.methods[newNm];
const m = confidentialVersion(overridenByAliases[oldNm] || this.methods[oldNm], newNm);
m.definitionLine = 72;
m.definitionModule = "regularExpression";
this.methods[newNm] = m;
}
for (let exName in inheritedExclusions) {
if (inheritedExclusions.hasOwnProperty(exName)) {
if (inheritedExclusions[exName]) {
this.methods[exName] = inheritedExclusions[exName];
} else {
delete this.methods[exName];
}
}
}
var obj36_init = function() { // init of object on line 72
this.data.stringSeq = var_strings;
this.data.position = var_index;
};
return obj36_init; // from compileBuildAndInitFunctions(_)inMethod(_)
};
var obj36_init = obj36_build.call(inheritingObject, null, var_strings, var_index, this, aliases, exclusions);
return obj36_init; // from compileBuildMethodFor(_)withObjCon(_)inside(_)
}; // end of method matchResult(_)at(_)$build(_,_,_)
func35.confidential = true;
this.methods["matchResult(1)at(1)$build(3)"] = func35;
func35.methodName = "matchResult(1)at(1)$build(3)";
func35.paramCounts = [1, 1];
func35.paramNames = ["strings", "index"];
func35.definitionLine = 72;
func35.definitionModule = "regularExpression";
const overridenByAliases = { };
for (let aix = 0, aLen = aliases.length; aix < aLen; aix ++) {
const a = aliases[aix];
const newNm = a.newName;
const oldNm = a.oldName;
overridenByAliases[newNm] = this.methods[newNm];
const m = confidentialVersion(overridenByAliases[oldNm] || this.methods[oldNm], newNm);
m.definitionLine = 13;
m.definitionModule = "regularExpression";
this.methods[newNm] = m;
}
for (let exName in inheritedExclusions) {
if (inheritedExclusions.hasOwnProperty(exName)) {
if (inheritedExclusions[exName]) {
this.methods[exName] = inheritedExclusions[exName];
} else {
delete this.methods[exName];
}
}
}
var obj10_init = function() { // init of object on line 13
setLineNumber(14); // compilenode call
var result = GraceDone; // start native code from line 14
try {
this._value = new RegExp(var_regExString._value, var_modifiers._value);
} catch (ex) {
if (ex.name == "SyntaxError") raiseException(var_SyntaxError, ex.message);
else raiseException(var_RegExError, ex.toString());
}
// end native code insertion
setLineNumber(22); // compilenode string
// call case 4: other requests
// call case 4: other requests
var string49 = new GraceString("regular expression ");
var concat48 = request(string49, "++(1)", [1], var_regExString);
var concat47 = request(concat48, "++(1)", [1], GraceEmptyString);
this.data.asString = concat47;
};
return obj10_init; // from compileBuildAndInitFunctions(_)inMethod(_)
};
var obj10_init = obj10_build.call(inheritingObject, null, var_regExString, var_modifiers, this, aliases, exclusions);
return obj10_init; // from compileBuildMethodFor(_)withObjCon(_)inside(_)
}; // end of method fromString(_)modifiers(_)$build(_,_,_)
setLineNumber(13); // compilenode member
var call50 = selfRequest(var_$dialect, "String", [0]);
var call51 = selfRequest(var_$dialect, "String", [0]);
func7.paramTypes = [call50, call51];
this.methods["fromString(1)modifiers(1)$build(3)"] = func7;
func7.methodName = "fromString(1)modifiers(1)$build(3)";
func7.paramCounts = [1, 1];
func7.paramNames = ["regExString", "modifiers"];
func7.definitionLine = 13;
func7.definitionModule = "regularExpression";
setLineNumber(86); // compilenode typedec
// Type decl MatchResult
var func53 = function(argcv) { // method MatchResult, line 1
var returnTarget = invocationCount;
invocationCount++;
setLineNumber(86); // compilenode interfaceliteral
// interface literal
var iface54 = new GraceInterface("MatchResult");
sig55 = () => {
return new GraceSignature("position", [], [], [], type_Unknown);
}
sig56 = () => {
return new GraceSignature("group(1)", ["i"], [], [type_Unknown], type_Unknown);
}
sig57 = () => {
return new GraceSignature("whole", [], [], [], type_Unknown);
}
iface54.typeMethods = {
"position": sig55
, "group(1)": sig56
, "whole": sig57
};
return iface54;
}; // end of method MatchResult
function memofunc53(argcv) {
if (! this.data["memo$MatchResult"]) // parameterless memo function
this.data["memo$MatchResult"] = func53.call(this, argcv);
return this.data["memo$MatchResult"];
};
this.methods["MatchResult"] = memofunc53;
memofunc53.methodName = "MatchResult";
memofunc53.paramCounts = [0];
memofunc53.paramNames = [];
memofunc53.definitionLine = 1;
memofunc53.definitionModule = "regularExpression";
func53.methodName = "MatchResult";
func53.paramCounts = [0];
func53.paramNames = [];
func53.definitionLine = 1;
func53.definitionModule = "regularExpression";
setLineNumber(9); // compilenode string
var string59 = new GraceString("RegExError");
// call case 4: other requests
var call60 = selfRequest(var_$dialect, "ProgrammingError", [0]);
var call58 = request(call60, "refine(1)", [1], string59);
var var_RegExError = call58;
var reader61_RegExError = function() { // reader method RegExError
if (var_RegExError === undefined) raiseUninitializedVariable("RegExError");
return var_RegExError;
};
reader61_RegExError.isDef = true;
this.methods["RegExError"] = reader61_RegExError;
setLineNumber(11); // compilenode string
var string63 = new GraceString("SyntaxError");
// call case 4: other requests
if (var_RegExError === undefined) raiseUninitializedVariable("RegExError");
var call62 = request(var_RegExError, "refine(1)", [1], string63);
var var_SyntaxError = call62;
var reader64_SyntaxError = function() { // reader method SyntaxError
if (var_SyntaxError === undefined) raiseUninitializedVariable("SyntaxError");
return var_SyntaxError;
};
reader64_SyntaxError.isDef = true;
this.methods["SyntaxError"] = reader64_SyntaxError;
return this;
}
if (typeof global !== "undefined")
global.gracecode_regularExpression = gracecode_regularExpression;
if (typeof window !== "undefined")
window.gracecode_regularExpression = gracecode_regularExpression;
gracecode_regularExpression.definitionModule = "regularExpression";
gracecode_regularExpression.sourceFile = gracecode_regularExpression_sourceFile;
gracecode_regularExpression.sha256 = gracecode_regularExpression_sha256;
gracecode_regularExpression.minigraceRevision = gracecode_regularExpression_minigraceRevision;
gracecode_regularExpression.minigraceGeneration = gracecode_regularExpression_minigraceGeneration;
gracecode_regularExpression.imports = [ ["standard", "5016aa3a5b2e0d35a67289d21c1e41cf8d73bef931ceea7b35f6a8b10a1386cf"] ];
gracecode_regularExpression.definitionLine = 1;