@weborigami/language 0.0.72 → 0.1.0

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.
@@ -192,7 +192,7 @@ function peg$parse(input, options) {
192
192
  var peg$FAILED = {};
193
193
  var peg$source = options.grammarSource;
194
194
 
195
- var peg$startRuleFunctions = { __: peg$parse__, absoluteFilePath: peg$parseabsoluteFilePath, args: peg$parseargs, array: peg$parsearray, arrayEntries: peg$parsearrayEntries, arrayEntry: peg$parsearrayEntry, callTarget: peg$parsecallTarget, closingBrace: peg$parseclosingBrace, closingBracket: peg$parseclosingBracket, closingParen: peg$parseclosingParen, comment: peg$parsecomment, digits: peg$parsedigits, doubleArrow: peg$parsedoubleArrow, doubleQuoteString: peg$parsedoubleQuoteString, doubleQuoteStringChar: peg$parsedoubleQuoteStringChar, ellipsis: peg$parseellipsis, escapedChar: peg$parseescapedChar, expr: peg$parseexpr, expression: peg$parseexpression, float: peg$parsefloat, functionComposition: peg$parsefunctionComposition, group: peg$parsegroup, guillemetString: peg$parseguillemetString, guillemetStringChar: peg$parseguillemetStringChar, host: peg$parsehost, identifier: peg$parseidentifier, identifierChar: peg$parseidentifierChar, identifierList: peg$parseidentifierList, implicitParensArgs: peg$parseimplicitParensArgs, inlineSpace: peg$parseinlineSpace, integer: peg$parseinteger, lambda: peg$parselambda, leadingSlashPath: peg$parseleadingSlashPath, list: peg$parselist, multiLineComment: peg$parsemultiLineComment, newLine: peg$parsenewLine, number: peg$parsenumber, object: peg$parseobject, objectEntries: peg$parseobjectEntries, objectEntry: peg$parseobjectEntry, objectGetter: peg$parseobjectGetter, objectHiddenKey: peg$parseobjectHiddenKey, objectKey: peg$parseobjectKey, objectProperty: peg$parseobjectProperty, objectShorthandProperty: peg$parseobjectShorthandProperty, objectPublicKey: peg$parseobjectPublicKey, parameterizedLambda: peg$parseparameterizedLambda, parensArgs: peg$parseparensArgs, pipeline: peg$parsepipeline, path: peg$parsepath, pathElement: peg$parsepathElement, pathKeyChar: peg$parsepathKeyChar, pathTail: peg$parsepathTail, protocolCall: peg$parseprotocolCall, protocol: peg$parseprotocol, reservedProtocol: peg$parsereservedProtocol, scopeReference: peg$parsescopeReference, scopeTraverse: peg$parsescopeTraverse, separator: peg$parseseparator, shebang: peg$parseshebang, sign: peg$parsesign, singleArrow: peg$parsesingleArrow, singleLineComment: peg$parsesingleLineComment, singleQuoteString: peg$parsesingleQuoteString, singleQuoteStringChar: peg$parsesingleQuoteStringChar, spread: peg$parsespread, step: peg$parsestep, start: peg$parsestart, string: peg$parsestring, taggedTemplate: peg$parsetaggedTemplate, templateDocument: peg$parsetemplateDocument, templateDocumentChar: peg$parsetemplateDocumentChar, templateDocumentContents: peg$parsetemplateDocumentContents, templateDocumentText: peg$parsetemplateDocumentText, templateLiteral: peg$parsetemplateLiteral, templateLiteralChar: peg$parsetemplateLiteralChar, templateLiteralContents: peg$parsetemplateLiteralContents, templateLiteralText: peg$parsetemplateLiteralText, templateSubstitution: peg$parsetemplateSubstitution, textChar: peg$parsetextChar, whitespaceWithNewLine: peg$parsewhitespaceWithNewLine };
195
+ var peg$startRuleFunctions = { __: peg$parse__, absoluteFilePath: peg$parseabsoluteFilePath, args: peg$parseargs, array: peg$parsearray, arrayEntries: peg$parsearrayEntries, arrayEntry: peg$parsearrayEntry, callTarget: peg$parsecallTarget, closingBrace: peg$parseclosingBrace, closingBracket: peg$parseclosingBracket, closingParen: peg$parseclosingParen, comment: peg$parsecomment, digits: peg$parsedigits, doubleArrow: peg$parsedoubleArrow, doubleQuoteString: peg$parsedoubleQuoteString, doubleQuoteStringChar: peg$parsedoubleQuoteStringChar, doubleSlashPath: peg$parsedoubleSlashPath, ellipsis: peg$parseellipsis, escapedChar: peg$parseescapedChar, expression: peg$parseexpression, float: peg$parsefloat, functionComposition: peg$parsefunctionComposition, functionReference: peg$parsefunctionReference, group: peg$parsegroup, guillemetString: peg$parseguillemetString, guillemetStringChar: peg$parseguillemetStringChar, homeTree: peg$parsehomeTree, host: peg$parsehost, identifier: peg$parseidentifier, identifierChar: peg$parseidentifierChar, identifierList: peg$parseidentifierList, implicitParensArgs: peg$parseimplicitParensArgs, inlineSpace: peg$parseinlineSpace, integer: peg$parseinteger, lambda: peg$parselambda, leadingSlashPath: peg$parseleadingSlashPath, list: peg$parselist, multiLineComment: peg$parsemultiLineComment, namespace: peg$parsenamespace, namespacePath: peg$parsenamespacePath, newLine: peg$parsenewLine, number: peg$parsenumber, object: peg$parseobject, objectEntries: peg$parseobjectEntries, objectEntry: peg$parseobjectEntry, objectGetter: peg$parseobjectGetter, objectHiddenKey: peg$parseobjectHiddenKey, objectKey: peg$parseobjectKey, objectProperty: peg$parseobjectProperty, objectShorthandProperty: peg$parseobjectShorthandProperty, objectPublicKey: peg$parseobjectPublicKey, parameterizedLambda: peg$parseparameterizedLambda, parensArgs: peg$parseparensArgs, path: peg$parsepath, pathElement: peg$parsepathElement, pathKeyChar: peg$parsepathKeyChar, pathTail: peg$parsepathTail, pipeline: peg$parsepipeline, pipelineStep: peg$parsepipelineStep, program: peg$parseprogram, scopeReference: peg$parsescopeReference, scopeTraverse: peg$parsescopeTraverse, separator: peg$parseseparator, shebang: peg$parseshebang, sign: peg$parsesign, singleArrow: peg$parsesingleArrow, singleLineComment: peg$parsesingleLineComment, singleQuoteString: peg$parsesingleQuoteString, singleQuoteStringChar: peg$parsesingleQuoteStringChar, spread: peg$parsespread, start: peg$parsestart, string: peg$parsestring, taggedTemplate: peg$parsetaggedTemplate, templateDocument: peg$parsetemplateDocument, templateDocumentChar: peg$parsetemplateDocumentChar, templateDocumentContents: peg$parsetemplateDocumentContents, templateDocumentText: peg$parsetemplateDocumentText, templateLiteral: peg$parsetemplateLiteral, templateLiteralChar: peg$parsetemplateLiteralChar, templateLiteralContents: peg$parsetemplateLiteralContents, templateLiteralText: peg$parsetemplateLiteralText, templateSubstitution: peg$parsetemplateSubstitution, textChar: peg$parsetextChar, value: peg$parsevalue, whitespaceWithNewLine: peg$parsewhitespaceWithNewLine };
196
196
  var peg$startRuleFunction = peg$parse__;
197
197
 
198
198
  var peg$c0 = "//";
@@ -217,39 +217,34 @@ function peg$parse(input, options) {
217
217
  var peg$c19 = "(";
218
218
  var peg$c20 = "\xAB";
219
219
  var peg$c21 = "\xBB";
220
- var peg$c22 = ":";
221
- var peg$c23 = "-";
222
- var peg$c24 = ">";
223
- var peg$c25 = "=";
224
- var peg$c26 = "/";
225
- var peg$c27 = "/*";
226
- var peg$c28 = "*/";
227
- var peg$c29 = "\n";
228
- var peg$c30 = "\r\n";
229
- var peg$c31 = "\r";
230
- var peg$c32 = "{";
231
- var peg$c33 = "explore";
232
- var peg$c34 = "https";
233
- var peg$c35 = "http";
234
- var peg$c36 = "new";
235
- var peg$c37 = "package";
236
- var peg$c38 = "treehttps";
237
- var peg$c39 = "treehttp";
238
- var peg$c40 = "tree";
239
- var peg$c41 = ",";
240
- var peg$c42 = "#!";
241
- var peg$c43 = "\u2192";
242
- var peg$c44 = "->";
243
- var peg$c45 = "'";
244
- var peg$c46 = "`";
245
- var peg$c47 = "${";
220
+ var peg$c22 = "~";
221
+ var peg$c23 = ":";
222
+ var peg$c24 = "/";
223
+ var peg$c25 = "-";
224
+ var peg$c26 = ">";
225
+ var peg$c27 = "=";
226
+ var peg$c28 = "/*";
227
+ var peg$c29 = "*/";
228
+ var peg$c30 = "@";
229
+ var peg$c31 = "\n";
230
+ var peg$c32 = "\r\n";
231
+ var peg$c33 = "\r";
232
+ var peg$c34 = "{";
233
+ var peg$c35 = ",";
234
+ var peg$c36 = "#!";
235
+ var peg$c37 = "\u2192";
236
+ var peg$c38 = "->";
237
+ var peg$c39 = "'";
238
+ var peg$c40 = "`";
239
+ var peg$c41 = "${";
246
240
 
247
241
  var peg$r0 = /^[0-9]/;
248
242
  var peg$r1 = /^[^(){}[\]<>\-=,\/:`"'\xAB\xBB\\ \u2192\u21D2\t\n\r]/;
249
243
  var peg$r2 = /^[ \t]/;
250
- var peg$r3 = /^[^(){}[\],:\/\\ \t\n\r]/;
251
- var peg$r4 = /^[^\n\r]/;
252
- var peg$r5 = /^[+\-]/;
244
+ var peg$r3 = /^[A-Za-z]/;
245
+ var peg$r4 = /^[^(){}[\],:\/\\ \t\n\r]/;
246
+ var peg$r5 = /^[^\n\r]/;
247
+ var peg$r6 = /^[+\-]/;
253
248
 
254
249
  var peg$e0 = peg$otherExpectation("absolute file path");
255
250
  var peg$e1 = peg$literalExpectation("//", false);
@@ -278,71 +273,63 @@ function peg$parse(input, options) {
278
273
  var peg$e24 = peg$literalExpectation("\\t", false);
279
274
  var peg$e25 = peg$literalExpectation("\\v", false);
280
275
  var peg$e26 = peg$literalExpectation("\\", false);
281
- var peg$e27 = peg$otherExpectation("Origami expression");
282
- var peg$e28 = peg$otherExpectation("floating-point number");
283
- var peg$e29 = peg$literalExpectation(".", false);
284
- var peg$e30 = peg$otherExpectation("function composition");
285
- var peg$e31 = peg$otherExpectation("parenthetical group");
286
- var peg$e32 = peg$literalExpectation("(", false);
287
- var peg$e33 = peg$otherExpectation("guillemet string");
288
- var peg$e34 = peg$literalExpectation("\xAB", false);
289
- var peg$e35 = peg$literalExpectation("\xBB", false);
276
+ var peg$e27 = peg$otherExpectation("floating-point number");
277
+ var peg$e28 = peg$literalExpectation(".", false);
278
+ var peg$e29 = peg$otherExpectation("function composition");
279
+ var peg$e30 = peg$otherExpectation("parenthetical group");
280
+ var peg$e31 = peg$literalExpectation("(", false);
281
+ var peg$e32 = peg$otherExpectation("guillemet string");
282
+ var peg$e33 = peg$literalExpectation("\xAB", false);
283
+ var peg$e34 = peg$literalExpectation("\xBB", false);
284
+ var peg$e35 = peg$literalExpectation("~", false);
290
285
  var peg$e36 = peg$otherExpectation("HTTP/HTTPS host");
291
286
  var peg$e37 = peg$literalExpectation(":", false);
292
- var peg$e38 = peg$otherExpectation("identifier");
293
- var peg$e39 = peg$classExpectation(["(", ")", "{", "}", "[", "]", "<", ">", "-", "=", ",", "/", ":", "`", "\"", "'", "\xAB", "\xBB", "\\", " ", "\u2192", "\u21D2", "\t", "\n", "\r"], true, false);
294
- var peg$e40 = peg$literalExpectation("-", false);
295
- var peg$e41 = peg$literalExpectation(">", false);
296
- var peg$e42 = peg$otherExpectation("arguments with implicit parentheses");
297
- var peg$e43 = peg$classExpectation([" ", "\t"], false, false);
298
- var peg$e44 = peg$otherExpectation("integer");
299
- var peg$e45 = peg$otherExpectation("lambda function");
300
- var peg$e46 = peg$literalExpectation("=", false);
301
- var peg$e47 = peg$otherExpectation("path with a leading slash");
302
- var peg$e48 = peg$literalExpectation("/", false);
287
+ var peg$e38 = peg$literalExpectation("/", false);
288
+ var peg$e39 = peg$otherExpectation("identifier");
289
+ var peg$e40 = peg$classExpectation(["(", ")", "{", "}", "[", "]", "<", ">", "-", "=", ",", "/", ":", "`", "\"", "'", "\xAB", "\xBB", "\\", " ", "\u2192", "\u21D2", "\t", "\n", "\r"], true, false);
290
+ var peg$e41 = peg$literalExpectation("-", false);
291
+ var peg$e42 = peg$literalExpectation(">", false);
292
+ var peg$e43 = peg$otherExpectation("arguments with implicit parentheses");
293
+ var peg$e44 = peg$classExpectation([" ", "\t"], false, false);
294
+ var peg$e45 = peg$otherExpectation("integer");
295
+ var peg$e46 = peg$otherExpectation("lambda function");
296
+ var peg$e47 = peg$literalExpectation("=", false);
297
+ var peg$e48 = peg$otherExpectation("path with a leading slash");
303
298
  var peg$e49 = peg$otherExpectation("list");
304
299
  var peg$e50 = peg$literalExpectation("/*", false);
305
300
  var peg$e51 = peg$literalExpectation("*/", false);
306
- var peg$e52 = peg$literalExpectation("\n", false);
307
- var peg$e53 = peg$literalExpectation("\r\n", false);
308
- var peg$e54 = peg$literalExpectation("\r", false);
309
- var peg$e55 = peg$otherExpectation("number");
310
- var peg$e56 = peg$otherExpectation("object literal");
311
- var peg$e57 = peg$literalExpectation("{", false);
312
- var peg$e58 = peg$otherExpectation("object getter");
313
- var peg$e59 = peg$otherExpectation("object key");
314
- var peg$e60 = peg$otherExpectation("object property");
315
- var peg$e61 = peg$otherExpectation("object identifier");
316
- var peg$e62 = peg$otherExpectation("function arguments in parentheses");
317
- var peg$e63 = peg$otherExpectation("slash-separated path");
318
- var peg$e64 = peg$classExpectation(["(", ")", "{", "}", "[", "]", ",", ":", "/", "\\", " ", "\t", "\n", "\r"], true, false);
319
- var peg$e65 = peg$otherExpectation("function call using protocol: syntax");
320
- var peg$e66 = peg$otherExpectation("protocol");
321
- var peg$e67 = peg$otherExpectation("reserved protocol");
322
- var peg$e68 = peg$literalExpectation("explore", false);
323
- var peg$e69 = peg$literalExpectation("https", false);
324
- var peg$e70 = peg$literalExpectation("http", false);
325
- var peg$e71 = peg$literalExpectation("new", false);
326
- var peg$e72 = peg$literalExpectation("package", false);
327
- var peg$e73 = peg$literalExpectation("treehttps", false);
328
- var peg$e74 = peg$literalExpectation("treehttp", false);
329
- var peg$e75 = peg$literalExpectation("tree", false);
330
- var peg$e76 = peg$otherExpectation("scope reference");
331
- var peg$e77 = peg$literalExpectation(",", false);
332
- var peg$e78 = peg$literalExpectation("#!", false);
333
- var peg$e79 = peg$classExpectation(["\n", "\r"], true, false);
334
- var peg$e80 = peg$classExpectation(["+", "-"], false, false);
335
- var peg$e81 = peg$literalExpectation("\u2192", false);
336
- var peg$e82 = peg$literalExpectation("->", false);
337
- var peg$e83 = peg$otherExpectation("single quote string");
338
- var peg$e84 = peg$literalExpectation("'", false);
339
- var peg$e85 = peg$otherExpectation("string");
340
- var peg$e86 = peg$literalExpectation("`", false);
341
- var peg$e87 = peg$otherExpectation("template");
342
- var peg$e88 = peg$literalExpectation("${", false);
343
- var peg$e89 = peg$otherExpectation("template text");
344
- var peg$e90 = peg$otherExpectation("template literal");
345
- var peg$e91 = peg$otherExpectation("template substitution");
301
+ var peg$e52 = peg$literalExpectation("@", false);
302
+ var peg$e53 = peg$classExpectation([["A", "Z"], ["a", "z"]], false, false);
303
+ var peg$e54 = peg$literalExpectation("\n", false);
304
+ var peg$e55 = peg$literalExpectation("\r\n", false);
305
+ var peg$e56 = peg$literalExpectation("\r", false);
306
+ var peg$e57 = peg$otherExpectation("number");
307
+ var peg$e58 = peg$otherExpectation("object literal");
308
+ var peg$e59 = peg$literalExpectation("{", false);
309
+ var peg$e60 = peg$otherExpectation("object getter");
310
+ var peg$e61 = peg$otherExpectation("object key");
311
+ var peg$e62 = peg$otherExpectation("object property");
312
+ var peg$e63 = peg$otherExpectation("object identifier");
313
+ var peg$e64 = peg$otherExpectation("function arguments in parentheses");
314
+ var peg$e65 = peg$otherExpectation("slash-separated path");
315
+ var peg$e66 = peg$classExpectation(["(", ")", "{", "}", "[", "]", ",", ":", "/", "\\", " ", "\t", "\n", "\r"], true, false);
316
+ var peg$e67 = peg$otherExpectation("Origami program");
317
+ var peg$e68 = peg$otherExpectation("scope reference");
318
+ var peg$e69 = peg$literalExpectation(",", false);
319
+ var peg$e70 = peg$literalExpectation("#!", false);
320
+ var peg$e71 = peg$classExpectation(["\n", "\r"], true, false);
321
+ var peg$e72 = peg$classExpectation(["+", "-"], false, false);
322
+ var peg$e73 = peg$literalExpectation("\u2192", false);
323
+ var peg$e74 = peg$literalExpectation("->", false);
324
+ var peg$e75 = peg$otherExpectation("single quote string");
325
+ var peg$e76 = peg$literalExpectation("'", false);
326
+ var peg$e77 = peg$otherExpectation("string");
327
+ var peg$e78 = peg$literalExpectation("`", false);
328
+ var peg$e79 = peg$otherExpectation("template");
329
+ var peg$e80 = peg$literalExpectation("${", false);
330
+ var peg$e81 = peg$otherExpectation("template text");
331
+ var peg$e82 = peg$otherExpectation("template literal");
332
+ var peg$e83 = peg$otherExpectation("template substitution");
346
333
 
347
334
  var peg$f0 = function() {
348
335
  return null;
@@ -371,147 +358,168 @@ function peg$parse(input, options) {
371
358
  var peg$f8 = function(chars) {
372
359
  return annotate([ops.literal, chars.join("")], location());
373
360
  };
374
- var peg$f9 = function() { return "\0"; };
375
- var peg$f10 = function() { return "\b"; };
376
- var peg$f11 = function() { return "\f"; };
377
- var peg$f12 = function() { return "\n"; };
378
- var peg$f13 = function() { return "\r"; };
379
- var peg$f14 = function() { return "\t"; };
380
- var peg$f15 = function() { return "\v"; };
381
- var peg$f16 = function() {
361
+ var peg$f9 = function(host, path) {
362
+ return annotate([host, ...(path ?? [])], location());
363
+ };
364
+ var peg$f10 = function() { return "\0"; };
365
+ var peg$f11 = function() { return "\b"; };
366
+ var peg$f12 = function() { return "\f"; };
367
+ var peg$f13 = function() { return "\n"; };
368
+ var peg$f14 = function() { return "\r"; };
369
+ var peg$f15 = function() { return "\t"; };
370
+ var peg$f16 = function() { return "\v"; };
371
+ var peg$f17 = function() {
382
372
  return annotate([ops.literal, parseFloat(text())], location());
383
373
  };
384
- var peg$f17 = function(target, chain, end) {
374
+ var peg$f18 = function(target, chain, end) {
385
375
  if (end) {
386
376
  chain.push(end);
387
377
  }
388
378
  return annotate(makeFunctionCall(target, chain, location()), location());
389
379
  };
390
- var peg$f18 = function(target, chain, end) {
380
+ var peg$f19 = function(target, chain, end) {
391
381
  if (end) {
392
382
  chain.push(end);
393
383
  }
394
384
  return annotate(makeFunctionCall(target, chain, location()), location());
395
385
  };
396
- var peg$f19 = function(expr) {
397
- return annotate(expr, location());
386
+ var peg$f20 = function(ref) {
387
+ // If the reference looks like a builtin name, we treat it as a builtin
388
+ // reference, otherwise it's a regular scope reference. We can't make this
389
+ // distinction in the grammar.
390
+ const name = ref[1];
391
+ const builtinRegex = /^[A-Za-z][A-Za-z0-9]*$/;
392
+ const op = builtinRegex.test(name) ? ops.builtin : ops.scope;
393
+ return annotate([op, name], location());
398
394
  };
399
- var peg$f20 = function(chars) {
395
+ var peg$f21 = function(pipeline) {
396
+ return annotate(pipeline, location());
397
+ };
398
+ var peg$f22 = function(chars) {
400
399
  return annotate([ops.literal, chars.join("")], location());
401
400
  };
402
- var peg$f21 = function(identifier, port) {
401
+ var peg$f23 = function() {
402
+ return annotate([ops.homeTree], location());
403
+ };
404
+ var peg$f24 = function(identifier, port, slash) {
403
405
  const portText = port ? `:${port[1]}` : "";
404
- const hostText = identifier + portText;
406
+ const slashText = slash ? "/" : "";
407
+ const hostText = identifier + portText + slashText;
405
408
  return annotate([ops.literal, hostText], location());
406
409
  };
407
- var peg$f22 = function(chars) { return chars.join(""); };
408
- var peg$f23 = function(list) {
410
+ var peg$f25 = function(chars) { return chars.join(""); };
411
+ var peg$f26 = function(list) {
409
412
  return annotate(list, location());
410
413
  };
411
- var peg$f24 = function(args) {
412
- /* Stuff */
413
- return annotate(args, location());
414
- };
415
- var peg$f25 = function() {
414
+ var peg$f27 = function() {
416
415
  return annotate([ops.literal, parseInt(text())], location());
417
416
  };
418
- var peg$f26 = function(expr) {
419
- return annotate([ops.lambda, ["_"], expr], location());
417
+ var peg$f28 = function(pipeline) {
418
+ return annotate([ops.lambda, ["_"], pipeline], location());
420
419
  };
421
- var peg$f27 = function(path) {
420
+ var peg$f29 = function(path) {
422
421
  return annotate(path ?? [], location());
423
422
  };
424
- var peg$f28 = function(list) {
425
- return annotate(list, location());
423
+ var peg$f30 = function(values) {
424
+ return annotate(values, location());
425
+ };
426
+ var peg$f31 = function() { return null; };
427
+ var peg$f32 = function(at, chars) {
428
+ return annotate([ops.builtin, (at ?? "") + chars.join("") + ":"], location());
429
+ };
430
+ var peg$f33 = function(fn, path) {
431
+ return annotate(makeFunctionCall(fn, [path], location()), location());
432
+ };
433
+ var peg$f34 = function(fn, path) {
434
+ return annotate(makeFunctionCall(fn, [path], location()), location());
426
435
  };
427
- var peg$f29 = function() { return null; };
428
- var peg$f30 = function(entries) {
436
+ var peg$f35 = function(entries) {
429
437
  return annotate(makeObject(entries ?? [], ops.object), location());
430
438
  };
431
- var peg$f31 = function(entries) {
439
+ var peg$f36 = function(entries) {
432
440
  return annotate(entries, location());
433
441
  };
434
- var peg$f32 = function(key, value) {
435
- return annotate(makeProperty(key, [ops.getter, value]), location());
442
+ var peg$f37 = function(key, pipeline) {
443
+ return annotate(
444
+ makeProperty(key, annotate([ops.getter, pipeline], location())),
445
+ location()
446
+ );
436
447
  };
437
- var peg$f33 = function(hiddenKey) { return hiddenKey.join(""); };
438
- var peg$f34 = function(key, value) {
439
- return annotate(makeProperty(key, value), location());
448
+ var peg$f38 = function(hiddenKey) { return hiddenKey.join(""); };
449
+ var peg$f39 = function(key, pipeline) {
450
+ return annotate(makeProperty(key, pipeline), location());
440
451
  };
441
- var peg$f35 = function(key) {
452
+ var peg$f40 = function(key) {
442
453
  return annotate([key, [ops.inherited, key]], location());
443
454
  };
444
- var peg$f36 = function(identifier, slash) {
455
+ var peg$f41 = function(identifier, slash) {
445
456
  return identifier + (slash ?? "");
446
457
  };
447
- var peg$f37 = function(string) {
458
+ var peg$f42 = function(string) {
448
459
  // Remove `ops.literal` from the string code
449
460
  return string[1];
450
461
  };
451
- var peg$f38 = function(parameters, expr) {
452
- return annotate([ops.lambda, parameters ?? [], expr], location());
462
+ var peg$f43 = function(parameters, pipeline) {
463
+ return annotate([ops.lambda, parameters ?? [], pipeline], location());
453
464
  };
454
- var peg$f39 = function(list) {
465
+ var peg$f44 = function(list) {
455
466
  return annotate(list ?? [undefined], location());
456
467
  };
457
- var peg$f40 = function(steps) {
458
- return annotate(makePipeline(steps), location());
459
- };
460
- var peg$f41 = function(head, tail) {
468
+ var peg$f45 = function(head, tail) {
461
469
  let path = tail ? [...head, tail] : head;
462
470
  // Remove parts for consecutive slashes
463
471
  path = path.filter((part) => part[1] !== "/");
464
472
  return annotate(path, location());
465
473
  };
466
- var peg$f42 = function(chars) {
474
+ var peg$f46 = function(head, tail) {
475
+ let path = tail ? [...head, tail] : head;
476
+ // Remove parts for consecutive slashes
477
+ path = path.filter((part) => part[1] !== "/");
478
+ return annotate(path, location());
479
+ };
480
+ var peg$f47 = function(chars) {
467
481
  return annotate([ops.literal, chars.join("") + "/"], location());
468
482
  };
469
- var peg$f43 = function(chars) {
483
+ var peg$f48 = function(chars) {
470
484
  return annotate([ops.literal, chars.join("")], location());
471
485
  };
472
- var peg$f44 = function(protocol, host, path) {
473
- return annotate([protocol, host, ...(path ?? [])], location());
486
+ var peg$f49 = function(head, tail) {
487
+ return tail.length === 0
488
+ ? head
489
+ : annotate(makePipeline([head, ...tail]), location());
474
490
  };
475
- var peg$f45 = function() { return ops.explorableSite; };
476
- var peg$f46 = function() { return ops.https; };
477
- var peg$f47 = function() { return ops.http; };
478
- var peg$f48 = function() { return ops.constructor; };
479
- var peg$f49 = function() { return [ops.scope, "@package"] };
480
- var peg$f50 = function() { return ops.treeHttps; };
481
- var peg$f51 = function() { return ops.treeHttp; };
482
- var peg$f52 = function() { return ops.treeHttps; };
483
- var peg$f53 = function(key) {
491
+ var peg$f50 = function(key) {
484
492
  return annotate([ops.scope, key], location());
485
493
  };
486
- var peg$f54 = function(ref, path) {
494
+ var peg$f51 = function(ref, path) {
487
495
  const head = [ops.scope, `${ ref[1] }/`];
488
496
  head.location = ref.location;
489
- return annotate([ops.traverse, head, ...path], location());
497
+ return annotate([ops.traverse, head, ...(path ?? [])], location());
490
498
  };
491
- var peg$f55 = function() { return null; };
492
- var peg$f56 = function() { return null; };
493
- var peg$f57 = function(chars) {
499
+ var peg$f52 = function() { return null; };
500
+ var peg$f53 = function() { return null; };
501
+ var peg$f54 = function(chars) {
494
502
  return annotate([ops.literal, chars.join("")], location());
495
503
  };
496
- var peg$f58 = function(expr) {
497
- return annotate([ops.spread, expr], location());
504
+ var peg$f55 = function(value) {
505
+ return annotate([ops.spread, value], location());
498
506
  };
499
- var peg$f59 = function(tag, contents) {
507
+ var peg$f56 = function(tag, contents) {
500
508
  return annotate(makeTemplate(tag, contents[0], contents[1]), location());
501
509
  };
502
- var peg$f60 = function(contents) {
510
+ var peg$f57 = function(contents) {
503
511
  return annotate([ops.lambda, ["_"], contents], location());
504
512
  };
505
- var peg$f61 = function(head, tail) {
513
+ var peg$f58 = function(head, tail) {
506
514
  return annotate(makeTemplate(ops.template, head, tail), location());
507
515
  };
508
- var peg$f62 = function(chars) {
516
+ var peg$f59 = function(chars) {
509
517
  return chars.join("");
510
518
  };
511
- var peg$f63 = function(contents) {
519
+ var peg$f60 = function(contents) {
512
520
  return annotate(makeTemplate(ops.template, contents[0], contents[1]), location());
513
521
  };
514
- var peg$f64 = function(chars) {
522
+ var peg$f61 = function(chars) {
515
523
  return chars.join("");
516
524
  };
517
525
  var peg$currPos = options.peg$currPos | 0;
@@ -872,22 +880,19 @@ function peg$parse(input, options) {
872
880
  peg$silentFails++;
873
881
  s0 = peg$parseabsoluteFilePath();
874
882
  if (s0 === peg$FAILED) {
875
- s0 = peg$parsearray();
883
+ s0 = peg$parsescopeTraverse();
876
884
  if (s0 === peg$FAILED) {
877
- s0 = peg$parseobject();
885
+ s0 = peg$parsearray();
878
886
  if (s0 === peg$FAILED) {
879
- s0 = peg$parselambda();
887
+ s0 = peg$parseobject();
880
888
  if (s0 === peg$FAILED) {
881
- s0 = peg$parseparameterizedLambda();
889
+ s0 = peg$parsegroup();
882
890
  if (s0 === peg$FAILED) {
883
- s0 = peg$parseprotocolCall();
891
+ s0 = peg$parsenamespacePath();
884
892
  if (s0 === peg$FAILED) {
885
- s0 = peg$parsegroup();
893
+ s0 = peg$parsenamespace();
886
894
  if (s0 === peg$FAILED) {
887
- s0 = peg$parsescopeTraverse();
888
- if (s0 === peg$FAILED) {
889
- s0 = peg$parsescopeReference();
890
- }
895
+ s0 = peg$parsefunctionReference();
891
896
  }
892
897
  }
893
898
  }
@@ -1155,6 +1160,38 @@ function peg$parse(input, options) {
1155
1160
  return s0;
1156
1161
  }
1157
1162
 
1163
+ function peg$parsedoubleSlashPath() {
1164
+ var s0, s1, s2, s3;
1165
+
1166
+ s0 = peg$currPos;
1167
+ if (input.substr(peg$currPos, 2) === peg$c0) {
1168
+ s1 = peg$c0;
1169
+ peg$currPos += 2;
1170
+ } else {
1171
+ s1 = peg$FAILED;
1172
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
1173
+ }
1174
+ if (s1 !== peg$FAILED) {
1175
+ s2 = peg$parsehost();
1176
+ if (s2 !== peg$FAILED) {
1177
+ s3 = peg$parsepath();
1178
+ if (s3 === peg$FAILED) {
1179
+ s3 = null;
1180
+ }
1181
+ peg$savedPos = s0;
1182
+ s0 = peg$f9(s2, s3);
1183
+ } else {
1184
+ peg$currPos = s0;
1185
+ s0 = peg$FAILED;
1186
+ }
1187
+ } else {
1188
+ peg$currPos = s0;
1189
+ s0 = peg$FAILED;
1190
+ }
1191
+
1192
+ return s0;
1193
+ }
1194
+
1158
1195
  function peg$parseellipsis() {
1159
1196
  var s0;
1160
1197
 
@@ -1192,7 +1229,7 @@ function peg$parse(input, options) {
1192
1229
  }
1193
1230
  if (s1 !== peg$FAILED) {
1194
1231
  peg$savedPos = s0;
1195
- s1 = peg$f9();
1232
+ s1 = peg$f10();
1196
1233
  }
1197
1234
  s0 = s1;
1198
1235
  if (s0 === peg$FAILED) {
@@ -1206,7 +1243,7 @@ function peg$parse(input, options) {
1206
1243
  }
1207
1244
  if (s1 !== peg$FAILED) {
1208
1245
  peg$savedPos = s0;
1209
- s1 = peg$f10();
1246
+ s1 = peg$f11();
1210
1247
  }
1211
1248
  s0 = s1;
1212
1249
  if (s0 === peg$FAILED) {
@@ -1220,7 +1257,7 @@ function peg$parse(input, options) {
1220
1257
  }
1221
1258
  if (s1 !== peg$FAILED) {
1222
1259
  peg$savedPos = s0;
1223
- s1 = peg$f11();
1260
+ s1 = peg$f12();
1224
1261
  }
1225
1262
  s0 = s1;
1226
1263
  if (s0 === peg$FAILED) {
@@ -1234,7 +1271,7 @@ function peg$parse(input, options) {
1234
1271
  }
1235
1272
  if (s1 !== peg$FAILED) {
1236
1273
  peg$savedPos = s0;
1237
- s1 = peg$f12();
1274
+ s1 = peg$f13();
1238
1275
  }
1239
1276
  s0 = s1;
1240
1277
  if (s0 === peg$FAILED) {
@@ -1248,7 +1285,7 @@ function peg$parse(input, options) {
1248
1285
  }
1249
1286
  if (s1 !== peg$FAILED) {
1250
1287
  peg$savedPos = s0;
1251
- s1 = peg$f13();
1288
+ s1 = peg$f14();
1252
1289
  }
1253
1290
  s0 = s1;
1254
1291
  if (s0 === peg$FAILED) {
@@ -1262,7 +1299,7 @@ function peg$parse(input, options) {
1262
1299
  }
1263
1300
  if (s1 !== peg$FAILED) {
1264
1301
  peg$savedPos = s0;
1265
- s1 = peg$f14();
1302
+ s1 = peg$f15();
1266
1303
  }
1267
1304
  s0 = s1;
1268
1305
  if (s0 === peg$FAILED) {
@@ -1276,7 +1313,7 @@ function peg$parse(input, options) {
1276
1313
  }
1277
1314
  if (s1 !== peg$FAILED) {
1278
1315
  peg$savedPos = s0;
1279
- s1 = peg$f15();
1316
+ s1 = peg$f16();
1280
1317
  }
1281
1318
  s0 = s1;
1282
1319
  if (s0 === peg$FAILED) {
@@ -1322,37 +1359,19 @@ function peg$parse(input, options) {
1322
1359
  return s0;
1323
1360
  }
1324
1361
 
1325
- function peg$parseexpr() {
1326
- var s0;
1327
-
1328
- s0 = peg$parsepipeline();
1329
-
1330
- return s0;
1331
- }
1332
-
1333
1362
  function peg$parseexpression() {
1334
- var s0, s1, s2, s3, s4;
1363
+ var s0, s1, s2, s3;
1335
1364
 
1336
- peg$silentFails++;
1337
1365
  s0 = peg$currPos;
1338
- s1 = peg$parseshebang();
1339
- if (s1 === peg$FAILED) {
1340
- s1 = null;
1341
- }
1342
- s2 = peg$parse__();
1343
- s3 = peg$parsepipeline();
1344
- if (s3 !== peg$FAILED) {
1345
- s4 = peg$parse__();
1346
- s0 = s3;
1366
+ s1 = peg$parse__();
1367
+ s2 = peg$parsepipeline();
1368
+ if (s2 !== peg$FAILED) {
1369
+ s3 = peg$parse__();
1370
+ s0 = s2;
1347
1371
  } else {
1348
1372
  peg$currPos = s0;
1349
1373
  s0 = peg$FAILED;
1350
1374
  }
1351
- peg$silentFails--;
1352
- if (s0 === peg$FAILED) {
1353
- s1 = peg$FAILED;
1354
- if (peg$silentFails === 0) { peg$fail(peg$e27); }
1355
- }
1356
1375
 
1357
1376
  return s0;
1358
1377
  }
@@ -1375,13 +1394,13 @@ function peg$parse(input, options) {
1375
1394
  peg$currPos++;
1376
1395
  } else {
1377
1396
  s3 = peg$FAILED;
1378
- if (peg$silentFails === 0) { peg$fail(peg$e29); }
1397
+ if (peg$silentFails === 0) { peg$fail(peg$e28); }
1379
1398
  }
1380
1399
  if (s3 !== peg$FAILED) {
1381
1400
  s4 = peg$parsedigits();
1382
1401
  if (s4 !== peg$FAILED) {
1383
1402
  peg$savedPos = s0;
1384
- s0 = peg$f16();
1403
+ s0 = peg$f17();
1385
1404
  } else {
1386
1405
  peg$currPos = s0;
1387
1406
  s0 = peg$FAILED;
@@ -1393,7 +1412,7 @@ function peg$parse(input, options) {
1393
1412
  peg$silentFails--;
1394
1413
  if (s0 === peg$FAILED) {
1395
1414
  s1 = peg$FAILED;
1396
- if (peg$silentFails === 0) { peg$fail(peg$e28); }
1415
+ if (peg$silentFails === 0) { peg$fail(peg$e27); }
1397
1416
  }
1398
1417
 
1399
1418
  return s0;
@@ -1422,7 +1441,7 @@ function peg$parse(input, options) {
1422
1441
  s3 = null;
1423
1442
  }
1424
1443
  peg$savedPos = s0;
1425
- s0 = peg$f17(s1, s2, s3);
1444
+ s0 = peg$f18(s1, s2, s3);
1426
1445
  } else {
1427
1446
  peg$currPos = s0;
1428
1447
  s0 = peg$FAILED;
@@ -1444,7 +1463,7 @@ function peg$parse(input, options) {
1444
1463
  s3 = peg$parseimplicitParensArgs();
1445
1464
  if (s3 !== peg$FAILED) {
1446
1465
  peg$savedPos = s0;
1447
- s0 = peg$f18(s1, s2, s3);
1466
+ s0 = peg$f19(s1, s2, s3);
1448
1467
  } else {
1449
1468
  peg$currPos = s0;
1450
1469
  s0 = peg$FAILED;
@@ -1457,8 +1476,22 @@ function peg$parse(input, options) {
1457
1476
  peg$silentFails--;
1458
1477
  if (s0 === peg$FAILED) {
1459
1478
  s1 = peg$FAILED;
1460
- if (peg$silentFails === 0) { peg$fail(peg$e30); }
1479
+ if (peg$silentFails === 0) { peg$fail(peg$e29); }
1480
+ }
1481
+
1482
+ return s0;
1483
+ }
1484
+
1485
+ function peg$parsefunctionReference() {
1486
+ var s0, s1;
1487
+
1488
+ s0 = peg$currPos;
1489
+ s1 = peg$parsescopeReference();
1490
+ if (s1 !== peg$FAILED) {
1491
+ peg$savedPos = s0;
1492
+ s1 = peg$f20(s1);
1461
1493
  }
1494
+ s0 = s1;
1462
1495
 
1463
1496
  return s0;
1464
1497
  }
@@ -1473,7 +1506,7 @@ function peg$parse(input, options) {
1473
1506
  peg$currPos++;
1474
1507
  } else {
1475
1508
  s1 = peg$FAILED;
1476
- if (peg$silentFails === 0) { peg$fail(peg$e32); }
1509
+ if (peg$silentFails === 0) { peg$fail(peg$e31); }
1477
1510
  }
1478
1511
  if (s1 !== peg$FAILED) {
1479
1512
  s2 = peg$parse__();
@@ -1483,7 +1516,7 @@ function peg$parse(input, options) {
1483
1516
  s5 = peg$parseclosingParen();
1484
1517
  if (s5 !== peg$FAILED) {
1485
1518
  peg$savedPos = s0;
1486
- s0 = peg$f19(s3);
1519
+ s0 = peg$f21(s3);
1487
1520
  } else {
1488
1521
  peg$currPos = s0;
1489
1522
  s0 = peg$FAILED;
@@ -1499,7 +1532,7 @@ function peg$parse(input, options) {
1499
1532
  peg$silentFails--;
1500
1533
  if (s0 === peg$FAILED) {
1501
1534
  s1 = peg$FAILED;
1502
- if (peg$silentFails === 0) { peg$fail(peg$e31); }
1535
+ if (peg$silentFails === 0) { peg$fail(peg$e30); }
1503
1536
  }
1504
1537
 
1505
1538
  return s0;
@@ -1515,7 +1548,7 @@ function peg$parse(input, options) {
1515
1548
  peg$currPos++;
1516
1549
  } else {
1517
1550
  s1 = peg$FAILED;
1518
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
1551
+ if (peg$silentFails === 0) { peg$fail(peg$e33); }
1519
1552
  }
1520
1553
  if (s1 !== peg$FAILED) {
1521
1554
  s2 = [];
@@ -1529,11 +1562,11 @@ function peg$parse(input, options) {
1529
1562
  peg$currPos++;
1530
1563
  } else {
1531
1564
  s3 = peg$FAILED;
1532
- if (peg$silentFails === 0) { peg$fail(peg$e35); }
1565
+ if (peg$silentFails === 0) { peg$fail(peg$e34); }
1533
1566
  }
1534
1567
  if (s3 !== peg$FAILED) {
1535
1568
  peg$savedPos = s0;
1536
- s0 = peg$f20(s2);
1569
+ s0 = peg$f22(s2);
1537
1570
  } else {
1538
1571
  peg$currPos = s0;
1539
1572
  s0 = peg$FAILED;
@@ -1545,7 +1578,7 @@ function peg$parse(input, options) {
1545
1578
  peg$silentFails--;
1546
1579
  if (s0 === peg$FAILED) {
1547
1580
  s1 = peg$FAILED;
1548
- if (peg$silentFails === 0) { peg$fail(peg$e33); }
1581
+ if (peg$silentFails === 0) { peg$fail(peg$e32); }
1549
1582
  }
1550
1583
 
1551
1584
  return s0;
@@ -1562,7 +1595,7 @@ function peg$parse(input, options) {
1562
1595
  peg$currPos++;
1563
1596
  } else {
1564
1597
  s2 = peg$FAILED;
1565
- if (peg$silentFails === 0) { peg$fail(peg$e35); }
1598
+ if (peg$silentFails === 0) { peg$fail(peg$e34); }
1566
1599
  }
1567
1600
  if (s2 === peg$FAILED) {
1568
1601
  s2 = peg$parsenewLine();
@@ -1590,6 +1623,26 @@ function peg$parse(input, options) {
1590
1623
  return s0;
1591
1624
  }
1592
1625
 
1626
+ function peg$parsehomeTree() {
1627
+ var s0, s1;
1628
+
1629
+ s0 = peg$currPos;
1630
+ if (input.charCodeAt(peg$currPos) === 126) {
1631
+ s1 = peg$c22;
1632
+ peg$currPos++;
1633
+ } else {
1634
+ s1 = peg$FAILED;
1635
+ if (peg$silentFails === 0) { peg$fail(peg$e35); }
1636
+ }
1637
+ if (s1 !== peg$FAILED) {
1638
+ peg$savedPos = s0;
1639
+ s1 = peg$f23();
1640
+ }
1641
+ s0 = s1;
1642
+
1643
+ return s0;
1644
+ }
1645
+
1593
1646
  function peg$parsehost() {
1594
1647
  var s0, s1, s2, s3, s4;
1595
1648
 
@@ -1599,7 +1652,7 @@ function peg$parse(input, options) {
1599
1652
  if (s1 !== peg$FAILED) {
1600
1653
  s2 = peg$currPos;
1601
1654
  if (input.charCodeAt(peg$currPos) === 58) {
1602
- s3 = peg$c22;
1655
+ s3 = peg$c23;
1603
1656
  peg$currPos++;
1604
1657
  } else {
1605
1658
  s3 = peg$FAILED;
@@ -1620,8 +1673,18 @@ function peg$parse(input, options) {
1620
1673
  if (s2 === peg$FAILED) {
1621
1674
  s2 = null;
1622
1675
  }
1676
+ if (input.charCodeAt(peg$currPos) === 47) {
1677
+ s3 = peg$c24;
1678
+ peg$currPos++;
1679
+ } else {
1680
+ s3 = peg$FAILED;
1681
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
1682
+ }
1683
+ if (s3 === peg$FAILED) {
1684
+ s3 = null;
1685
+ }
1623
1686
  peg$savedPos = s0;
1624
- s0 = peg$f21(s1, s2);
1687
+ s0 = peg$f24(s1, s2, s3);
1625
1688
  } else {
1626
1689
  peg$currPos = s0;
1627
1690
  s0 = peg$FAILED;
@@ -1652,13 +1715,13 @@ function peg$parse(input, options) {
1652
1715
  }
1653
1716
  if (s1 !== peg$FAILED) {
1654
1717
  peg$savedPos = s0;
1655
- s1 = peg$f22(s1);
1718
+ s1 = peg$f25(s1);
1656
1719
  }
1657
1720
  s0 = s1;
1658
1721
  peg$silentFails--;
1659
1722
  if (s0 === peg$FAILED) {
1660
1723
  s1 = peg$FAILED;
1661
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
1724
+ if (peg$silentFails === 0) { peg$fail(peg$e39); }
1662
1725
  }
1663
1726
 
1664
1727
  return s0;
@@ -1672,26 +1735,26 @@ function peg$parse(input, options) {
1672
1735
  peg$currPos++;
1673
1736
  } else {
1674
1737
  s0 = peg$FAILED;
1675
- if (peg$silentFails === 0) { peg$fail(peg$e39); }
1738
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
1676
1739
  }
1677
1740
  if (s0 === peg$FAILED) {
1678
1741
  s0 = peg$currPos;
1679
1742
  if (input.charCodeAt(peg$currPos) === 45) {
1680
- s1 = peg$c23;
1743
+ s1 = peg$c25;
1681
1744
  peg$currPos++;
1682
1745
  } else {
1683
1746
  s1 = peg$FAILED;
1684
- if (peg$silentFails === 0) { peg$fail(peg$e40); }
1747
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
1685
1748
  }
1686
1749
  if (s1 !== peg$FAILED) {
1687
1750
  s2 = peg$currPos;
1688
1751
  peg$silentFails++;
1689
1752
  if (input.charCodeAt(peg$currPos) === 62) {
1690
- s3 = peg$c24;
1753
+ s3 = peg$c26;
1691
1754
  peg$currPos++;
1692
1755
  } else {
1693
1756
  s3 = peg$FAILED;
1694
- if (peg$silentFails === 0) { peg$fail(peg$e41); }
1757
+ if (peg$silentFails === 0) { peg$fail(peg$e42); }
1695
1758
  }
1696
1759
  peg$silentFails--;
1697
1760
  if (s3 === peg$FAILED) {
@@ -1753,7 +1816,7 @@ function peg$parse(input, options) {
1753
1816
  s2 = null;
1754
1817
  }
1755
1818
  peg$savedPos = s0;
1756
- s0 = peg$f23(s1);
1819
+ s0 = peg$f26(s1);
1757
1820
  } else {
1758
1821
  peg$currPos = s0;
1759
1822
  s0 = peg$FAILED;
@@ -1763,7 +1826,7 @@ function peg$parse(input, options) {
1763
1826
  }
1764
1827
 
1765
1828
  function peg$parseimplicitParensArgs() {
1766
- var s0, s1, s2, s3, s4, s5;
1829
+ var s0, s1, s2;
1767
1830
 
1768
1831
  peg$silentFails++;
1769
1832
  s0 = peg$currPos;
@@ -1778,38 +1841,9 @@ function peg$parse(input, options) {
1778
1841
  s1 = peg$FAILED;
1779
1842
  }
1780
1843
  if (s1 !== peg$FAILED) {
1781
- s2 = peg$currPos;
1782
- s3 = [];
1783
- s4 = peg$parsestep();
1784
- while (s4 !== peg$FAILED) {
1785
- s3.push(s4);
1786
- s4 = peg$currPos;
1787
- s5 = peg$parseseparator();
1788
- if (s5 !== peg$FAILED) {
1789
- s5 = peg$parsestep();
1790
- if (s5 === peg$FAILED) {
1791
- peg$currPos = s4;
1792
- s4 = peg$FAILED;
1793
- } else {
1794
- s4 = s5;
1795
- }
1796
- } else {
1797
- s4 = s5;
1798
- }
1799
- }
1800
- if (s3.length < 1) {
1801
- peg$currPos = s2;
1802
- s2 = peg$FAILED;
1803
- } else {
1804
- s2 = s3;
1805
- }
1844
+ s2 = peg$parselist();
1806
1845
  if (s2 !== peg$FAILED) {
1807
- s3 = peg$parseseparator();
1808
- if (s3 === peg$FAILED) {
1809
- s3 = null;
1810
- }
1811
- peg$savedPos = s0;
1812
- s0 = peg$f24(s2);
1846
+ s0 = s2;
1813
1847
  } else {
1814
1848
  peg$currPos = s0;
1815
1849
  s0 = peg$FAILED;
@@ -1821,7 +1855,7 @@ function peg$parse(input, options) {
1821
1855
  peg$silentFails--;
1822
1856
  if (s0 === peg$FAILED) {
1823
1857
  s1 = peg$FAILED;
1824
- if (peg$silentFails === 0) { peg$fail(peg$e42); }
1858
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
1825
1859
  }
1826
1860
 
1827
1861
  return s0;
@@ -1835,7 +1869,7 @@ function peg$parse(input, options) {
1835
1869
  peg$currPos++;
1836
1870
  } else {
1837
1871
  s0 = peg$FAILED;
1838
- if (peg$silentFails === 0) { peg$fail(peg$e43); }
1872
+ if (peg$silentFails === 0) { peg$fail(peg$e44); }
1839
1873
  }
1840
1874
 
1841
1875
  return s0;
@@ -1853,7 +1887,7 @@ function peg$parse(input, options) {
1853
1887
  s2 = peg$parsedigits();
1854
1888
  if (s2 !== peg$FAILED) {
1855
1889
  peg$savedPos = s0;
1856
- s0 = peg$f25();
1890
+ s0 = peg$f27();
1857
1891
  } else {
1858
1892
  peg$currPos = s0;
1859
1893
  s0 = peg$FAILED;
@@ -1861,7 +1895,7 @@ function peg$parse(input, options) {
1861
1895
  peg$silentFails--;
1862
1896
  if (s0 === peg$FAILED) {
1863
1897
  s1 = peg$FAILED;
1864
- if (peg$silentFails === 0) { peg$fail(peg$e44); }
1898
+ if (peg$silentFails === 0) { peg$fail(peg$e45); }
1865
1899
  }
1866
1900
 
1867
1901
  return s0;
@@ -1873,18 +1907,18 @@ function peg$parse(input, options) {
1873
1907
  peg$silentFails++;
1874
1908
  s0 = peg$currPos;
1875
1909
  if (input.charCodeAt(peg$currPos) === 61) {
1876
- s1 = peg$c25;
1910
+ s1 = peg$c27;
1877
1911
  peg$currPos++;
1878
1912
  } else {
1879
1913
  s1 = peg$FAILED;
1880
- if (peg$silentFails === 0) { peg$fail(peg$e46); }
1914
+ if (peg$silentFails === 0) { peg$fail(peg$e47); }
1881
1915
  }
1882
1916
  if (s1 !== peg$FAILED) {
1883
1917
  s2 = peg$parse__();
1884
1918
  s3 = peg$parsepipeline();
1885
1919
  if (s3 !== peg$FAILED) {
1886
1920
  peg$savedPos = s0;
1887
- s0 = peg$f26(s3);
1921
+ s0 = peg$f28(s3);
1888
1922
  } else {
1889
1923
  peg$currPos = s0;
1890
1924
  s0 = peg$FAILED;
@@ -1896,7 +1930,7 @@ function peg$parse(input, options) {
1896
1930
  peg$silentFails--;
1897
1931
  if (s0 === peg$FAILED) {
1898
1932
  s1 = peg$FAILED;
1899
- if (peg$silentFails === 0) { peg$fail(peg$e45); }
1933
+ if (peg$silentFails === 0) { peg$fail(peg$e46); }
1900
1934
  }
1901
1935
 
1902
1936
  return s0;
@@ -1908,16 +1942,19 @@ function peg$parse(input, options) {
1908
1942
  peg$silentFails++;
1909
1943
  s0 = peg$currPos;
1910
1944
  if (input.charCodeAt(peg$currPos) === 47) {
1911
- s1 = peg$c26;
1945
+ s1 = peg$c24;
1912
1946
  peg$currPos++;
1913
1947
  } else {
1914
1948
  s1 = peg$FAILED;
1915
- if (peg$silentFails === 0) { peg$fail(peg$e48); }
1949
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
1916
1950
  }
1917
1951
  if (s1 !== peg$FAILED) {
1918
1952
  s2 = peg$parsepath();
1953
+ if (s2 === peg$FAILED) {
1954
+ s2 = null;
1955
+ }
1919
1956
  peg$savedPos = s0;
1920
- s0 = peg$f27(s2);
1957
+ s0 = peg$f29(s2);
1921
1958
  } else {
1922
1959
  peg$currPos = s0;
1923
1960
  s0 = peg$FAILED;
@@ -1925,7 +1962,7 @@ function peg$parse(input, options) {
1925
1962
  peg$silentFails--;
1926
1963
  if (s0 === peg$FAILED) {
1927
1964
  s1 = peg$FAILED;
1928
- if (peg$silentFails === 0) { peg$fail(peg$e47); }
1965
+ if (peg$silentFails === 0) { peg$fail(peg$e48); }
1929
1966
  }
1930
1967
 
1931
1968
  return s0;
@@ -1938,13 +1975,13 @@ function peg$parse(input, options) {
1938
1975
  s0 = peg$currPos;
1939
1976
  s1 = peg$currPos;
1940
1977
  s2 = [];
1941
- s3 = peg$parsepipeline();
1978
+ s3 = peg$parsevalue();
1942
1979
  while (s3 !== peg$FAILED) {
1943
1980
  s2.push(s3);
1944
1981
  s3 = peg$currPos;
1945
1982
  s4 = peg$parseseparator();
1946
1983
  if (s4 !== peg$FAILED) {
1947
- s4 = peg$parsepipeline();
1984
+ s4 = peg$parsevalue();
1948
1985
  if (s4 === peg$FAILED) {
1949
1986
  peg$currPos = s3;
1950
1987
  s3 = peg$FAILED;
@@ -1967,7 +2004,7 @@ function peg$parse(input, options) {
1967
2004
  s2 = null;
1968
2005
  }
1969
2006
  peg$savedPos = s0;
1970
- s0 = peg$f28(s1);
2007
+ s0 = peg$f30(s1);
1971
2008
  } else {
1972
2009
  peg$currPos = s0;
1973
2010
  s0 = peg$FAILED;
@@ -1985,8 +2022,8 @@ function peg$parse(input, options) {
1985
2022
  var s0, s1, s2, s3, s4, s5;
1986
2023
 
1987
2024
  s0 = peg$currPos;
1988
- if (input.substr(peg$currPos, 2) === peg$c27) {
1989
- s1 = peg$c27;
2025
+ if (input.substr(peg$currPos, 2) === peg$c28) {
2026
+ s1 = peg$c28;
1990
2027
  peg$currPos += 2;
1991
2028
  } else {
1992
2029
  s1 = peg$FAILED;
@@ -1997,8 +2034,8 @@ function peg$parse(input, options) {
1997
2034
  s3 = peg$currPos;
1998
2035
  s4 = peg$currPos;
1999
2036
  peg$silentFails++;
2000
- if (input.substr(peg$currPos, 2) === peg$c28) {
2001
- s5 = peg$c28;
2037
+ if (input.substr(peg$currPos, 2) === peg$c29) {
2038
+ s5 = peg$c29;
2002
2039
  peg$currPos += 2;
2003
2040
  } else {
2004
2041
  s5 = peg$FAILED;
@@ -2035,8 +2072,8 @@ function peg$parse(input, options) {
2035
2072
  s3 = peg$currPos;
2036
2073
  s4 = peg$currPos;
2037
2074
  peg$silentFails++;
2038
- if (input.substr(peg$currPos, 2) === peg$c28) {
2039
- s5 = peg$c28;
2075
+ if (input.substr(peg$currPos, 2) === peg$c29) {
2076
+ s5 = peg$c29;
2040
2077
  peg$currPos += 2;
2041
2078
  } else {
2042
2079
  s5 = peg$FAILED;
@@ -2069,8 +2106,8 @@ function peg$parse(input, options) {
2069
2106
  s3 = peg$FAILED;
2070
2107
  }
2071
2108
  }
2072
- if (input.substr(peg$currPos, 2) === peg$c28) {
2073
- s3 = peg$c28;
2109
+ if (input.substr(peg$currPos, 2) === peg$c29) {
2110
+ s3 = peg$c29;
2074
2111
  peg$currPos += 2;
2075
2112
  } else {
2076
2113
  s3 = peg$FAILED;
@@ -2078,7 +2115,88 @@ function peg$parse(input, options) {
2078
2115
  }
2079
2116
  if (s3 !== peg$FAILED) {
2080
2117
  peg$savedPos = s0;
2081
- s0 = peg$f29();
2118
+ s0 = peg$f31();
2119
+ } else {
2120
+ peg$currPos = s0;
2121
+ s0 = peg$FAILED;
2122
+ }
2123
+ } else {
2124
+ peg$currPos = s0;
2125
+ s0 = peg$FAILED;
2126
+ }
2127
+
2128
+ return s0;
2129
+ }
2130
+
2131
+ function peg$parsenamespace() {
2132
+ var s0, s1, s2, s3;
2133
+
2134
+ s0 = peg$currPos;
2135
+ if (input.charCodeAt(peg$currPos) === 64) {
2136
+ s1 = peg$c30;
2137
+ peg$currPos++;
2138
+ } else {
2139
+ s1 = peg$FAILED;
2140
+ if (peg$silentFails === 0) { peg$fail(peg$e52); }
2141
+ }
2142
+ if (s1 === peg$FAILED) {
2143
+ s1 = null;
2144
+ }
2145
+ s2 = [];
2146
+ s3 = input.charAt(peg$currPos);
2147
+ if (peg$r3.test(s3)) {
2148
+ peg$currPos++;
2149
+ } else {
2150
+ s3 = peg$FAILED;
2151
+ if (peg$silentFails === 0) { peg$fail(peg$e53); }
2152
+ }
2153
+ if (s3 !== peg$FAILED) {
2154
+ while (s3 !== peg$FAILED) {
2155
+ s2.push(s3);
2156
+ s3 = input.charAt(peg$currPos);
2157
+ if (peg$r3.test(s3)) {
2158
+ peg$currPos++;
2159
+ } else {
2160
+ s3 = peg$FAILED;
2161
+ if (peg$silentFails === 0) { peg$fail(peg$e53); }
2162
+ }
2163
+ }
2164
+ } else {
2165
+ s2 = peg$FAILED;
2166
+ }
2167
+ if (s2 !== peg$FAILED) {
2168
+ if (input.charCodeAt(peg$currPos) === 58) {
2169
+ s3 = peg$c23;
2170
+ peg$currPos++;
2171
+ } else {
2172
+ s3 = peg$FAILED;
2173
+ if (peg$silentFails === 0) { peg$fail(peg$e37); }
2174
+ }
2175
+ if (s3 !== peg$FAILED) {
2176
+ peg$savedPos = s0;
2177
+ s0 = peg$f32(s1, s2);
2178
+ } else {
2179
+ peg$currPos = s0;
2180
+ s0 = peg$FAILED;
2181
+ }
2182
+ } else {
2183
+ peg$currPos = s0;
2184
+ s0 = peg$FAILED;
2185
+ }
2186
+
2187
+ return s0;
2188
+ }
2189
+
2190
+ function peg$parsenamespacePath() {
2191
+ var s0, s1, s2;
2192
+
2193
+ s0 = peg$currPos;
2194
+ s1 = peg$parsenamespace();
2195
+ if (s1 !== peg$FAILED) {
2196
+ s2 = peg$parsedoubleSlashPath();
2197
+ if (s2 !== peg$FAILED) {
2198
+ peg$savedPos = s0;
2199
+ s0 = peg$f33(s1, s2);
2082
2200
  } else {
2083
2201
  peg$currPos = s0;
2084
2202
  s0 = peg$FAILED;
@@ -2087,6 +2205,23 @@ function peg$parse(input, options) {
2087
2205
  peg$currPos = s0;
2088
2206
  s0 = peg$FAILED;
2089
2207
  }
2208
+ if (s0 === peg$FAILED) {
2209
+ s0 = peg$currPos;
2210
+ s1 = peg$parsenamespace();
2211
+ if (s1 !== peg$FAILED) {
2212
+ s2 = peg$parsepath();
2213
+ if (s2 !== peg$FAILED) {
2214
+ peg$savedPos = s0;
2215
+ s0 = peg$f34(s1, s2);
2216
+ } else {
2217
+ peg$currPos = s0;
2218
+ s0 = peg$FAILED;
2219
+ }
2220
+ } else {
2221
+ peg$currPos = s0;
2222
+ s0 = peg$FAILED;
2223
+ }
2224
+ }
2090
2225
 
2091
2226
  return s0;
2092
2227
  }
@@ -2095,27 +2230,27 @@ function peg$parse(input, options) {
2095
2230
  var s0;
2096
2231
 
2097
2232
  if (input.charCodeAt(peg$currPos) === 10) {
2098
- s0 = peg$c29;
2233
+ s0 = peg$c31;
2099
2234
  peg$currPos++;
2100
2235
  } else {
2101
2236
  s0 = peg$FAILED;
2102
- if (peg$silentFails === 0) { peg$fail(peg$e52); }
2237
+ if (peg$silentFails === 0) { peg$fail(peg$e54); }
2103
2238
  }
2104
2239
  if (s0 === peg$FAILED) {
2105
- if (input.substr(peg$currPos, 2) === peg$c30) {
2106
- s0 = peg$c30;
2240
+ if (input.substr(peg$currPos, 2) === peg$c32) {
2241
+ s0 = peg$c32;
2107
2242
  peg$currPos += 2;
2108
2243
  } else {
2109
2244
  s0 = peg$FAILED;
2110
- if (peg$silentFails === 0) { peg$fail(peg$e53); }
2245
+ if (peg$silentFails === 0) { peg$fail(peg$e55); }
2111
2246
  }
2112
2247
  if (s0 === peg$FAILED) {
2113
2248
  if (input.charCodeAt(peg$currPos) === 13) {
2114
- s0 = peg$c31;
2249
+ s0 = peg$c33;
2115
2250
  peg$currPos++;
2116
2251
  } else {
2117
2252
  s0 = peg$FAILED;
2118
- if (peg$silentFails === 0) { peg$fail(peg$e54); }
2253
+ if (peg$silentFails === 0) { peg$fail(peg$e56); }
2119
2254
  }
2120
2255
  }
2121
2256
  }
@@ -2134,7 +2269,7 @@ function peg$parse(input, options) {
2134
2269
  peg$silentFails--;
2135
2270
  if (s0 === peg$FAILED) {
2136
2271
  s1 = peg$FAILED;
2137
- if (peg$silentFails === 0) { peg$fail(peg$e55); }
2272
+ if (peg$silentFails === 0) { peg$fail(peg$e57); }
2138
2273
  }
2139
2274
 
2140
2275
  return s0;
@@ -2146,11 +2281,11 @@ function peg$parse(input, options) {
2146
2281
  peg$silentFails++;
2147
2282
  s0 = peg$currPos;
2148
2283
  if (input.charCodeAt(peg$currPos) === 123) {
2149
- s1 = peg$c32;
2284
+ s1 = peg$c34;
2150
2285
  peg$currPos++;
2151
2286
  } else {
2152
2287
  s1 = peg$FAILED;
2153
- if (peg$silentFails === 0) { peg$fail(peg$e57); }
2288
+ if (peg$silentFails === 0) { peg$fail(peg$e59); }
2154
2289
  }
2155
2290
  if (s1 !== peg$FAILED) {
2156
2291
  s2 = peg$parse__();
@@ -2162,7 +2297,7 @@ function peg$parse(input, options) {
2162
2297
  s5 = peg$parseclosingBrace();
2163
2298
  if (s5 !== peg$FAILED) {
2164
2299
  peg$savedPos = s0;
2165
- s0 = peg$f30(s3);
2300
+ s0 = peg$f35(s3);
2166
2301
  } else {
2167
2302
  peg$currPos = s0;
2168
2303
  s0 = peg$FAILED;
@@ -2174,7 +2309,7 @@ function peg$parse(input, options) {
2174
2309
  peg$silentFails--;
2175
2310
  if (s0 === peg$FAILED) {
2176
2311
  s1 = peg$FAILED;
2177
- if (peg$silentFails === 0) { peg$fail(peg$e56); }
2312
+ if (peg$silentFails === 0) { peg$fail(peg$e58); }
2178
2313
  }
2179
2314
 
2180
2315
  return s0;
@@ -2215,7 +2350,7 @@ function peg$parse(input, options) {
2215
2350
  s2 = null;
2216
2351
  }
2217
2352
  peg$savedPos = s0;
2218
- s0 = peg$f31(s1);
2353
+ s0 = peg$f36(s1);
2219
2354
  } else {
2220
2355
  peg$currPos = s0;
2221
2356
  s0 = peg$FAILED;
@@ -2250,18 +2385,18 @@ function peg$parse(input, options) {
2250
2385
  if (s1 !== peg$FAILED) {
2251
2386
  s2 = peg$parse__();
2252
2387
  if (input.charCodeAt(peg$currPos) === 61) {
2253
- s3 = peg$c25;
2388
+ s3 = peg$c27;
2254
2389
  peg$currPos++;
2255
2390
  } else {
2256
2391
  s3 = peg$FAILED;
2257
- if (peg$silentFails === 0) { peg$fail(peg$e46); }
2392
+ if (peg$silentFails === 0) { peg$fail(peg$e47); }
2258
2393
  }
2259
2394
  if (s3 !== peg$FAILED) {
2260
2395
  s4 = peg$parse__();
2261
2396
  s5 = peg$parsepipeline();
2262
2397
  if (s5 !== peg$FAILED) {
2263
2398
  peg$savedPos = s0;
2264
- s0 = peg$f32(s1, s5);
2399
+ s0 = peg$f37(s1, s5);
2265
2400
  } else {
2266
2401
  peg$currPos = s0;
2267
2402
  s0 = peg$FAILED;
@@ -2277,7 +2412,7 @@ function peg$parse(input, options) {
2277
2412
  peg$silentFails--;
2278
2413
  if (s0 === peg$FAILED) {
2279
2414
  s1 = peg$FAILED;
2280
- if (peg$silentFails === 0) { peg$fail(peg$e58); }
2415
+ if (peg$silentFails === 0) { peg$fail(peg$e60); }
2281
2416
  }
2282
2417
 
2283
2418
  return s0;
@@ -2293,7 +2428,7 @@ function peg$parse(input, options) {
2293
2428
  peg$currPos++;
2294
2429
  } else {
2295
2430
  s2 = peg$FAILED;
2296
- if (peg$silentFails === 0) { peg$fail(peg$e32); }
2431
+ if (peg$silentFails === 0) { peg$fail(peg$e31); }
2297
2432
  }
2298
2433
  if (s2 !== peg$FAILED) {
2299
2434
  s3 = peg$parseobjectPublicKey();
@@ -2322,7 +2457,7 @@ function peg$parse(input, options) {
2322
2457
  }
2323
2458
  if (s1 !== peg$FAILED) {
2324
2459
  peg$savedPos = s0;
2325
- s1 = peg$f33(s1);
2460
+ s1 = peg$f38(s1);
2326
2461
  }
2327
2462
  s0 = s1;
2328
2463
 
@@ -2340,7 +2475,7 @@ function peg$parse(input, options) {
2340
2475
  peg$silentFails--;
2341
2476
  if (s0 === peg$FAILED) {
2342
2477
  s1 = peg$FAILED;
2343
- if (peg$silentFails === 0) { peg$fail(peg$e59); }
2478
+ if (peg$silentFails === 0) { peg$fail(peg$e61); }
2344
2479
  }
2345
2480
 
2346
2481
  return s0;
@@ -2355,7 +2490,7 @@ function peg$parse(input, options) {
2355
2490
  if (s1 !== peg$FAILED) {
2356
2491
  s2 = peg$parse__();
2357
2492
  if (input.charCodeAt(peg$currPos) === 58) {
2358
- s3 = peg$c22;
2493
+ s3 = peg$c23;
2359
2494
  peg$currPos++;
2360
2495
  } else {
2361
2496
  s3 = peg$FAILED;
@@ -2366,7 +2501,7 @@ function peg$parse(input, options) {
2366
2501
  s5 = peg$parsepipeline();
2367
2502
  if (s5 !== peg$FAILED) {
2368
2503
  peg$savedPos = s0;
2369
- s0 = peg$f34(s1, s5);
2504
+ s0 = peg$f39(s1, s5);
2370
2505
  } else {
2371
2506
  peg$currPos = s0;
2372
2507
  s0 = peg$FAILED;
@@ -2382,7 +2517,7 @@ function peg$parse(input, options) {
2382
2517
  peg$silentFails--;
2383
2518
  if (s0 === peg$FAILED) {
2384
2519
  s1 = peg$FAILED;
2385
- if (peg$silentFails === 0) { peg$fail(peg$e60); }
2520
+ if (peg$silentFails === 0) { peg$fail(peg$e62); }
2386
2521
  }
2387
2522
 
2388
2523
  return s0;
@@ -2396,13 +2531,13 @@ function peg$parse(input, options) {
2396
2531
  s1 = peg$parseobjectPublicKey();
2397
2532
  if (s1 !== peg$FAILED) {
2398
2533
  peg$savedPos = s0;
2399
- s1 = peg$f35(s1);
2534
+ s1 = peg$f40(s1);
2400
2535
  }
2401
2536
  s0 = s1;
2402
2537
  peg$silentFails--;
2403
2538
  if (s0 === peg$FAILED) {
2404
2539
  s1 = peg$FAILED;
2405
- if (peg$silentFails === 0) { peg$fail(peg$e61); }
2540
+ if (peg$silentFails === 0) { peg$fail(peg$e63); }
2406
2541
  }
2407
2542
 
2408
2543
  return s0;
@@ -2415,17 +2550,17 @@ function peg$parse(input, options) {
2415
2550
  s1 = peg$parseidentifier();
2416
2551
  if (s1 !== peg$FAILED) {
2417
2552
  if (input.charCodeAt(peg$currPos) === 47) {
2418
- s2 = peg$c26;
2553
+ s2 = peg$c24;
2419
2554
  peg$currPos++;
2420
2555
  } else {
2421
2556
  s2 = peg$FAILED;
2422
- if (peg$silentFails === 0) { peg$fail(peg$e48); }
2557
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
2423
2558
  }
2424
2559
  if (s2 === peg$FAILED) {
2425
2560
  s2 = null;
2426
2561
  }
2427
2562
  peg$savedPos = s0;
2428
- s0 = peg$f36(s1, s2);
2563
+ s0 = peg$f41(s1, s2);
2429
2564
  } else {
2430
2565
  peg$currPos = s0;
2431
2566
  s0 = peg$FAILED;
@@ -2435,7 +2570,7 @@ function peg$parse(input, options) {
2435
2570
  s1 = peg$parsestring();
2436
2571
  if (s1 !== peg$FAILED) {
2437
2572
  peg$savedPos = s0;
2438
- s1 = peg$f37(s1);
2573
+ s1 = peg$f42(s1);
2439
2574
  }
2440
2575
  s0 = s1;
2441
2576
  }
@@ -2452,7 +2587,7 @@ function peg$parse(input, options) {
2452
2587
  peg$currPos++;
2453
2588
  } else {
2454
2589
  s1 = peg$FAILED;
2455
- if (peg$silentFails === 0) { peg$fail(peg$e32); }
2590
+ if (peg$silentFails === 0) { peg$fail(peg$e31); }
2456
2591
  }
2457
2592
  if (s1 !== peg$FAILED) {
2458
2593
  s2 = peg$parse__();
@@ -2476,7 +2611,7 @@ function peg$parse(input, options) {
2476
2611
  s9 = peg$parsepipeline();
2477
2612
  if (s9 !== peg$FAILED) {
2478
2613
  peg$savedPos = s0;
2479
- s0 = peg$f38(s3, s9);
2614
+ s0 = peg$f43(s3, s9);
2480
2615
  } else {
2481
2616
  peg$currPos = s0;
2482
2617
  s0 = peg$FAILED;
@@ -2507,7 +2642,7 @@ function peg$parse(input, options) {
2507
2642
  peg$currPos++;
2508
2643
  } else {
2509
2644
  s1 = peg$FAILED;
2510
- if (peg$silentFails === 0) { peg$fail(peg$e32); }
2645
+ if (peg$silentFails === 0) { peg$fail(peg$e31); }
2511
2646
  }
2512
2647
  if (s1 !== peg$FAILED) {
2513
2648
  s2 = peg$parse__();
@@ -2525,7 +2660,7 @@ function peg$parse(input, options) {
2525
2660
  }
2526
2661
  if (s5 !== peg$FAILED) {
2527
2662
  peg$savedPos = s0;
2528
- s0 = peg$f39(s3);
2663
+ s0 = peg$f44(s3);
2529
2664
  } else {
2530
2665
  peg$currPos = s0;
2531
2666
  s0 = peg$FAILED;
@@ -2537,69 +2672,14 @@ function peg$parse(input, options) {
2537
2672
  peg$silentFails--;
2538
2673
  if (s0 === peg$FAILED) {
2539
2674
  s1 = peg$FAILED;
2540
- if (peg$silentFails === 0) { peg$fail(peg$e62); }
2541
- }
2542
-
2543
- return s0;
2544
- }
2545
-
2546
- function peg$parsepipeline() {
2547
- var s0, s1, s2, s3, s4, s5, s6, s7, s8;
2548
-
2549
- s0 = peg$currPos;
2550
- s1 = peg$currPos;
2551
- s2 = peg$currPos;
2552
- s3 = [];
2553
- s4 = peg$parsestep();
2554
- while (s4 !== peg$FAILED) {
2555
- s3.push(s4);
2556
- s4 = peg$currPos;
2557
- s5 = peg$currPos;
2558
- s6 = peg$parse__();
2559
- s7 = peg$parsesingleArrow();
2560
- if (s7 !== peg$FAILED) {
2561
- s8 = peg$parse__();
2562
- s6 = [s6, s7, s8];
2563
- s5 = s6;
2564
- } else {
2565
- peg$currPos = s5;
2566
- s5 = peg$FAILED;
2567
- }
2568
- if (s5 !== peg$FAILED) {
2569
- s5 = peg$parsestep();
2570
- if (s5 === peg$FAILED) {
2571
- peg$currPos = s4;
2572
- s4 = peg$FAILED;
2573
- } else {
2574
- s4 = s5;
2575
- }
2576
- } else {
2577
- s4 = s5;
2578
- }
2579
- }
2580
- if (s3.length < 1) {
2581
- peg$currPos = s2;
2582
- s2 = peg$FAILED;
2583
- } else {
2584
- s2 = s3;
2585
- }
2586
- if (s2 !== peg$FAILED) {
2587
- s1 = s2;
2588
- } else {
2589
- peg$currPos = s1;
2590
- s1 = peg$FAILED;
2591
- }
2592
- if (s1 !== peg$FAILED) {
2593
- peg$savedPos = s0;
2594
- s1 = peg$f40(s1);
2675
+ if (peg$silentFails === 0) { peg$fail(peg$e64); }
2595
2676
  }
2596
- s0 = s1;
2597
2677
 
2598
2678
  return s0;
2599
2679
  }
2600
2680
 
2601
2681
  function peg$parsepath() {
2602
- var s0, s1, s2;
2682
+ var s0, s1, s2, s3;
2603
2683
 
2604
2684
  peg$silentFails++;
2605
2685
  s0 = peg$currPos;
@@ -2610,14 +2690,45 @@ function peg$parse(input, options) {
2610
2690
  s2 = peg$parsepathElement();
2611
2691
  }
2612
2692
  s2 = peg$parsepathTail();
2613
- if (s2 === peg$FAILED) {
2614
- s2 = null;
2693
+ if (s2 !== peg$FAILED) {
2694
+ peg$savedPos = s0;
2695
+ s0 = peg$f45(s1, s2);
2696
+ } else {
2697
+ peg$currPos = s0;
2698
+ s0 = peg$FAILED;
2699
+ }
2700
+ if (s0 === peg$FAILED) {
2701
+ s0 = peg$currPos;
2702
+ s1 = peg$currPos;
2703
+ s2 = [];
2704
+ s3 = peg$parsepathElement();
2705
+ while (s3 !== peg$FAILED) {
2706
+ s2.push(s3);
2707
+ s3 = peg$parsepathElement();
2708
+ }
2709
+ if (s2.length < 1) {
2710
+ peg$currPos = s1;
2711
+ s1 = peg$FAILED;
2712
+ } else {
2713
+ s1 = s2;
2714
+ }
2715
+ if (s1 !== peg$FAILED) {
2716
+ s2 = peg$parsepathTail();
2717
+ if (s2 === peg$FAILED) {
2718
+ s2 = null;
2719
+ }
2720
+ peg$savedPos = s0;
2721
+ s0 = peg$f46(s1, s2);
2722
+ } else {
2723
+ peg$currPos = s0;
2724
+ s0 = peg$FAILED;
2725
+ }
2615
2726
  }
2616
- peg$savedPos = s0;
2617
- s0 = peg$f41(s1, s2);
2618
2727
  peg$silentFails--;
2619
- s1 = peg$FAILED;
2620
- if (peg$silentFails === 0) { peg$fail(peg$e63); }
2728
+ if (s0 === peg$FAILED) {
2729
+ s1 = peg$FAILED;
2730
+ if (peg$silentFails === 0) { peg$fail(peg$e65); }
2731
+ }
2621
2732
 
2622
2733
  return s0;
2623
2734
  }
@@ -2633,15 +2744,15 @@ function peg$parse(input, options) {
2633
2744
  s2 = peg$parsepathKeyChar();
2634
2745
  }
2635
2746
  if (input.charCodeAt(peg$currPos) === 47) {
2636
- s2 = peg$c26;
2747
+ s2 = peg$c24;
2637
2748
  peg$currPos++;
2638
2749
  } else {
2639
2750
  s2 = peg$FAILED;
2640
- if (peg$silentFails === 0) { peg$fail(peg$e48); }
2751
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
2641
2752
  }
2642
2753
  if (s2 !== peg$FAILED) {
2643
2754
  peg$savedPos = s0;
2644
- s0 = peg$f42(s1);
2755
+ s0 = peg$f47(s1);
2645
2756
  } else {
2646
2757
  peg$currPos = s0;
2647
2758
  s0 = peg$FAILED;
@@ -2654,11 +2765,11 @@ function peg$parse(input, options) {
2654
2765
  var s0;
2655
2766
 
2656
2767
  s0 = input.charAt(peg$currPos);
2657
- if (peg$r3.test(s0)) {
2768
+ if (peg$r4.test(s0)) {
2658
2769
  peg$currPos++;
2659
2770
  } else {
2660
2771
  s0 = peg$FAILED;
2661
- if (peg$silentFails === 0) { peg$fail(peg$e64); }
2772
+ if (peg$silentFails === 0) { peg$fail(peg$e66); }
2662
2773
  }
2663
2774
  if (s0 === peg$FAILED) {
2664
2775
  s0 = peg$parseescapedChar();
@@ -2683,217 +2794,94 @@ function peg$parse(input, options) {
2683
2794
  }
2684
2795
  if (s1 !== peg$FAILED) {
2685
2796
  peg$savedPos = s0;
2686
- s1 = peg$f43(s1);
2797
+ s1 = peg$f48(s1);
2687
2798
  }
2688
2799
  s0 = s1;
2689
2800
 
2690
2801
  return s0;
2691
2802
  }
2692
2803
 
2693
- function peg$parseprotocolCall() {
2694
- var s0, s1, s2, s3, s4, s5;
2804
+ function peg$parsepipeline() {
2805
+ var s0, s1, s2, s3, s4, s5, s6, s7;
2695
2806
 
2696
- peg$silentFails++;
2697
2807
  s0 = peg$currPos;
2698
- s1 = peg$parseprotocol();
2808
+ s1 = peg$parsevalue();
2699
2809
  if (s1 !== peg$FAILED) {
2700
- if (input.charCodeAt(peg$currPos) === 58) {
2701
- s2 = peg$c22;
2702
- peg$currPos++;
2703
- } else {
2704
- s2 = peg$FAILED;
2705
- if (peg$silentFails === 0) { peg$fail(peg$e37); }
2706
- }
2707
- if (s2 !== peg$FAILED) {
2708
- s3 = [];
2709
- if (input.charCodeAt(peg$currPos) === 47) {
2710
- s4 = peg$c26;
2711
- peg$currPos++;
2810
+ s2 = [];
2811
+ s3 = peg$currPos;
2812
+ s4 = peg$parse__();
2813
+ s5 = peg$parsesingleArrow();
2814
+ if (s5 !== peg$FAILED) {
2815
+ s6 = peg$parse__();
2816
+ s7 = peg$parsepipelineStep();
2817
+ if (s7 !== peg$FAILED) {
2818
+ s3 = s7;
2712
2819
  } else {
2713
- s4 = peg$FAILED;
2714
- if (peg$silentFails === 0) { peg$fail(peg$e48); }
2820
+ peg$currPos = s3;
2821
+ s3 = peg$FAILED;
2715
2822
  }
2716
- while (s4 !== peg$FAILED) {
2717
- s3.push(s4);
2718
- if (s3.length >= 2) {
2719
- s4 = peg$FAILED;
2823
+ } else {
2824
+ peg$currPos = s3;
2825
+ s3 = peg$FAILED;
2826
+ }
2827
+ while (s3 !== peg$FAILED) {
2828
+ s2.push(s3);
2829
+ s3 = peg$currPos;
2830
+ s4 = peg$parse__();
2831
+ s5 = peg$parsesingleArrow();
2832
+ if (s5 !== peg$FAILED) {
2833
+ s6 = peg$parse__();
2834
+ s7 = peg$parsepipelineStep();
2835
+ if (s7 !== peg$FAILED) {
2836
+ s3 = s7;
2720
2837
  } else {
2721
- if (input.charCodeAt(peg$currPos) === 47) {
2722
- s4 = peg$c26;
2723
- peg$currPos++;
2724
- } else {
2725
- s4 = peg$FAILED;
2726
- if (peg$silentFails === 0) { peg$fail(peg$e48); }
2727
- }
2728
- }
2729
- }
2730
- s4 = peg$parsehost();
2731
- if (s4 !== peg$FAILED) {
2732
- s5 = peg$parseleadingSlashPath();
2733
- if (s5 === peg$FAILED) {
2734
- s5 = null;
2838
+ peg$currPos = s3;
2839
+ s3 = peg$FAILED;
2735
2840
  }
2736
- peg$savedPos = s0;
2737
- s0 = peg$f44(s1, s4, s5);
2738
2841
  } else {
2739
- peg$currPos = s0;
2740
- s0 = peg$FAILED;
2842
+ peg$currPos = s3;
2843
+ s3 = peg$FAILED;
2741
2844
  }
2742
- } else {
2743
- peg$currPos = s0;
2744
- s0 = peg$FAILED;
2745
2845
  }
2846
+ peg$savedPos = s0;
2847
+ s0 = peg$f49(s1, s2);
2746
2848
  } else {
2747
2849
  peg$currPos = s0;
2748
2850
  s0 = peg$FAILED;
2749
2851
  }
2750
- peg$silentFails--;
2751
- if (s0 === peg$FAILED) {
2752
- s1 = peg$FAILED;
2753
- if (peg$silentFails === 0) { peg$fail(peg$e65); }
2754
- }
2755
2852
 
2756
2853
  return s0;
2757
2854
  }
2758
2855
 
2759
- function peg$parseprotocol() {
2760
- var s0, s1;
2856
+ function peg$parsepipelineStep() {
2857
+ var s0;
2761
2858
 
2762
- peg$silentFails++;
2763
- s0 = peg$parsereservedProtocol();
2764
- if (s0 === peg$FAILED) {
2765
- s0 = peg$parsescopeReference();
2766
- }
2767
- peg$silentFails--;
2859
+ s0 = peg$parselambda();
2768
2860
  if (s0 === peg$FAILED) {
2769
- s1 = peg$FAILED;
2770
- if (peg$silentFails === 0) { peg$fail(peg$e66); }
2861
+ s0 = peg$parseparameterizedLambda();
2862
+ if (s0 === peg$FAILED) {
2863
+ s0 = peg$parsecallTarget();
2864
+ }
2771
2865
  }
2772
2866
 
2773
2867
  return s0;
2774
2868
  }
2775
2869
 
2776
- function peg$parsereservedProtocol() {
2777
- var s0, s1;
2870
+ function peg$parseprogram() {
2871
+ var s0, s1, s2;
2778
2872
 
2779
2873
  peg$silentFails++;
2780
2874
  s0 = peg$currPos;
2781
- if (input.substr(peg$currPos, 7) === peg$c33) {
2782
- s1 = peg$c33;
2783
- peg$currPos += 7;
2784
- } else {
2785
- s1 = peg$FAILED;
2786
- if (peg$silentFails === 0) { peg$fail(peg$e68); }
2787
- }
2788
- if (s1 !== peg$FAILED) {
2789
- peg$savedPos = s0;
2790
- s1 = peg$f45();
2875
+ s1 = peg$parseshebang();
2876
+ if (s1 === peg$FAILED) {
2877
+ s1 = null;
2791
2878
  }
2792
- s0 = s1;
2793
- if (s0 === peg$FAILED) {
2794
- s0 = peg$currPos;
2795
- if (input.substr(peg$currPos, 5) === peg$c34) {
2796
- s1 = peg$c34;
2797
- peg$currPos += 5;
2798
- } else {
2799
- s1 = peg$FAILED;
2800
- if (peg$silentFails === 0) { peg$fail(peg$e69); }
2801
- }
2802
- if (s1 !== peg$FAILED) {
2803
- peg$savedPos = s0;
2804
- s1 = peg$f46();
2805
- }
2806
- s0 = s1;
2807
- if (s0 === peg$FAILED) {
2808
- s0 = peg$currPos;
2809
- if (input.substr(peg$currPos, 4) === peg$c35) {
2810
- s1 = peg$c35;
2811
- peg$currPos += 4;
2812
- } else {
2813
- s1 = peg$FAILED;
2814
- if (peg$silentFails === 0) { peg$fail(peg$e70); }
2815
- }
2816
- if (s1 !== peg$FAILED) {
2817
- peg$savedPos = s0;
2818
- s1 = peg$f47();
2819
- }
2820
- s0 = s1;
2821
- if (s0 === peg$FAILED) {
2822
- s0 = peg$currPos;
2823
- if (input.substr(peg$currPos, 3) === peg$c36) {
2824
- s1 = peg$c36;
2825
- peg$currPos += 3;
2826
- } else {
2827
- s1 = peg$FAILED;
2828
- if (peg$silentFails === 0) { peg$fail(peg$e71); }
2829
- }
2830
- if (s1 !== peg$FAILED) {
2831
- peg$savedPos = s0;
2832
- s1 = peg$f48();
2833
- }
2834
- s0 = s1;
2835
- if (s0 === peg$FAILED) {
2836
- s0 = peg$currPos;
2837
- if (input.substr(peg$currPos, 7) === peg$c37) {
2838
- s1 = peg$c37;
2839
- peg$currPos += 7;
2840
- } else {
2841
- s1 = peg$FAILED;
2842
- if (peg$silentFails === 0) { peg$fail(peg$e72); }
2843
- }
2844
- if (s1 !== peg$FAILED) {
2845
- peg$savedPos = s0;
2846
- s1 = peg$f49();
2847
- }
2848
- s0 = s1;
2849
- if (s0 === peg$FAILED) {
2850
- s0 = peg$currPos;
2851
- if (input.substr(peg$currPos, 9) === peg$c38) {
2852
- s1 = peg$c38;
2853
- peg$currPos += 9;
2854
- } else {
2855
- s1 = peg$FAILED;
2856
- if (peg$silentFails === 0) { peg$fail(peg$e73); }
2857
- }
2858
- if (s1 !== peg$FAILED) {
2859
- peg$savedPos = s0;
2860
- s1 = peg$f50();
2861
- }
2862
- s0 = s1;
2863
- if (s0 === peg$FAILED) {
2864
- s0 = peg$currPos;
2865
- if (input.substr(peg$currPos, 8) === peg$c39) {
2866
- s1 = peg$c39;
2867
- peg$currPos += 8;
2868
- } else {
2869
- s1 = peg$FAILED;
2870
- if (peg$silentFails === 0) { peg$fail(peg$e74); }
2871
- }
2872
- if (s1 !== peg$FAILED) {
2873
- peg$savedPos = s0;
2874
- s1 = peg$f51();
2875
- }
2876
- s0 = s1;
2877
- if (s0 === peg$FAILED) {
2878
- s0 = peg$currPos;
2879
- if (input.substr(peg$currPos, 4) === peg$c40) {
2880
- s1 = peg$c40;
2881
- peg$currPos += 4;
2882
- } else {
2883
- s1 = peg$FAILED;
2884
- if (peg$silentFails === 0) { peg$fail(peg$e75); }
2885
- }
2886
- if (s1 !== peg$FAILED) {
2887
- peg$savedPos = s0;
2888
- s1 = peg$f52();
2889
- }
2890
- s0 = s1;
2891
- }
2892
- }
2893
- }
2894
- }
2895
- }
2896
- }
2879
+ s2 = peg$parseexpression();
2880
+ if (s2 !== peg$FAILED) {
2881
+ s0 = s2;
2882
+ } else {
2883
+ peg$currPos = s0;
2884
+ s0 = peg$FAILED;
2897
2885
  }
2898
2886
  peg$silentFails--;
2899
2887
  if (s0 === peg$FAILED) {
@@ -2912,13 +2900,13 @@ function peg$parse(input, options) {
2912
2900
  s1 = peg$parseidentifier();
2913
2901
  if (s1 !== peg$FAILED) {
2914
2902
  peg$savedPos = s0;
2915
- s1 = peg$f53(s1);
2903
+ s1 = peg$f50(s1);
2916
2904
  }
2917
2905
  s0 = s1;
2918
2906
  peg$silentFails--;
2919
2907
  if (s0 === peg$FAILED) {
2920
2908
  s1 = peg$FAILED;
2921
- if (peg$silentFails === 0) { peg$fail(peg$e76); }
2909
+ if (peg$silentFails === 0) { peg$fail(peg$e68); }
2922
2910
  }
2923
2911
 
2924
2912
  return s0;
@@ -2931,16 +2919,19 @@ function peg$parse(input, options) {
2931
2919
  s1 = peg$parsescopeReference();
2932
2920
  if (s1 !== peg$FAILED) {
2933
2921
  if (input.charCodeAt(peg$currPos) === 47) {
2934
- s2 = peg$c26;
2922
+ s2 = peg$c24;
2935
2923
  peg$currPos++;
2936
2924
  } else {
2937
2925
  s2 = peg$FAILED;
2938
- if (peg$silentFails === 0) { peg$fail(peg$e48); }
2926
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
2939
2927
  }
2940
2928
  if (s2 !== peg$FAILED) {
2941
2929
  s3 = peg$parsepath();
2930
+ if (s3 === peg$FAILED) {
2931
+ s3 = null;
2932
+ }
2942
2933
  peg$savedPos = s0;
2943
- s0 = peg$f54(s1, s3);
2934
+ s0 = peg$f51(s1, s3);
2944
2935
  } else {
2945
2936
  peg$currPos = s0;
2946
2937
  s0 = peg$FAILED;
@@ -2959,11 +2950,11 @@ function peg$parse(input, options) {
2959
2950
  s0 = peg$currPos;
2960
2951
  s1 = peg$parse__();
2961
2952
  if (input.charCodeAt(peg$currPos) === 44) {
2962
- s2 = peg$c41;
2953
+ s2 = peg$c35;
2963
2954
  peg$currPos++;
2964
2955
  } else {
2965
2956
  s2 = peg$FAILED;
2966
- if (peg$silentFails === 0) { peg$fail(peg$e77); }
2957
+ if (peg$silentFails === 0) { peg$fail(peg$e69); }
2967
2958
  }
2968
2959
  if (s2 !== peg$FAILED) {
2969
2960
  s3 = peg$parse__();
@@ -2984,34 +2975,34 @@ function peg$parse(input, options) {
2984
2975
  var s0, s1, s2, s3;
2985
2976
 
2986
2977
  s0 = peg$currPos;
2987
- if (input.substr(peg$currPos, 2) === peg$c42) {
2988
- s1 = peg$c42;
2978
+ if (input.substr(peg$currPos, 2) === peg$c36) {
2979
+ s1 = peg$c36;
2989
2980
  peg$currPos += 2;
2990
2981
  } else {
2991
2982
  s1 = peg$FAILED;
2992
- if (peg$silentFails === 0) { peg$fail(peg$e78); }
2983
+ if (peg$silentFails === 0) { peg$fail(peg$e70); }
2993
2984
  }
2994
2985
  if (s1 !== peg$FAILED) {
2995
2986
  s2 = [];
2996
2987
  s3 = input.charAt(peg$currPos);
2997
- if (peg$r4.test(s3)) {
2988
+ if (peg$r5.test(s3)) {
2998
2989
  peg$currPos++;
2999
2990
  } else {
3000
2991
  s3 = peg$FAILED;
3001
- if (peg$silentFails === 0) { peg$fail(peg$e79); }
2992
+ if (peg$silentFails === 0) { peg$fail(peg$e71); }
3002
2993
  }
3003
2994
  while (s3 !== peg$FAILED) {
3004
2995
  s2.push(s3);
3005
2996
  s3 = input.charAt(peg$currPos);
3006
- if (peg$r4.test(s3)) {
2997
+ if (peg$r5.test(s3)) {
3007
2998
  peg$currPos++;
3008
2999
  } else {
3009
3000
  s3 = peg$FAILED;
3010
- if (peg$silentFails === 0) { peg$fail(peg$e79); }
3001
+ if (peg$silentFails === 0) { peg$fail(peg$e71); }
3011
3002
  }
3012
3003
  }
3013
3004
  peg$savedPos = s0;
3014
- s0 = peg$f55();
3005
+ s0 = peg$f52();
3015
3006
  } else {
3016
3007
  peg$currPos = s0;
3017
3008
  s0 = peg$FAILED;
@@ -3024,11 +3015,11 @@ function peg$parse(input, options) {
3024
3015
  var s0;
3025
3016
 
3026
3017
  s0 = input.charAt(peg$currPos);
3027
- if (peg$r5.test(s0)) {
3018
+ if (peg$r6.test(s0)) {
3028
3019
  peg$currPos++;
3029
3020
  } else {
3030
3021
  s0 = peg$FAILED;
3031
- if (peg$silentFails === 0) { peg$fail(peg$e80); }
3022
+ if (peg$silentFails === 0) { peg$fail(peg$e72); }
3032
3023
  }
3033
3024
 
3034
3025
  return s0;
@@ -3038,19 +3029,19 @@ function peg$parse(input, options) {
3038
3029
  var s0;
3039
3030
 
3040
3031
  if (input.charCodeAt(peg$currPos) === 8594) {
3041
- s0 = peg$c43;
3032
+ s0 = peg$c37;
3042
3033
  peg$currPos++;
3043
3034
  } else {
3044
3035
  s0 = peg$FAILED;
3045
- if (peg$silentFails === 0) { peg$fail(peg$e81); }
3036
+ if (peg$silentFails === 0) { peg$fail(peg$e73); }
3046
3037
  }
3047
3038
  if (s0 === peg$FAILED) {
3048
- if (input.substr(peg$currPos, 2) === peg$c44) {
3049
- s0 = peg$c44;
3039
+ if (input.substr(peg$currPos, 2) === peg$c38) {
3040
+ s0 = peg$c38;
3050
3041
  peg$currPos += 2;
3051
3042
  } else {
3052
3043
  s0 = peg$FAILED;
3053
- if (peg$silentFails === 0) { peg$fail(peg$e82); }
3044
+ if (peg$silentFails === 0) { peg$fail(peg$e74); }
3054
3045
  }
3055
3046
  }
3056
3047
 
@@ -3071,24 +3062,24 @@ function peg$parse(input, options) {
3071
3062
  if (s1 !== peg$FAILED) {
3072
3063
  s2 = [];
3073
3064
  s3 = input.charAt(peg$currPos);
3074
- if (peg$r4.test(s3)) {
3065
+ if (peg$r5.test(s3)) {
3075
3066
  peg$currPos++;
3076
3067
  } else {
3077
3068
  s3 = peg$FAILED;
3078
- if (peg$silentFails === 0) { peg$fail(peg$e79); }
3069
+ if (peg$silentFails === 0) { peg$fail(peg$e71); }
3079
3070
  }
3080
3071
  while (s3 !== peg$FAILED) {
3081
3072
  s2.push(s3);
3082
3073
  s3 = input.charAt(peg$currPos);
3083
- if (peg$r4.test(s3)) {
3074
+ if (peg$r5.test(s3)) {
3084
3075
  peg$currPos++;
3085
3076
  } else {
3086
3077
  s3 = peg$FAILED;
3087
- if (peg$silentFails === 0) { peg$fail(peg$e79); }
3078
+ if (peg$silentFails === 0) { peg$fail(peg$e71); }
3088
3079
  }
3089
3080
  }
3090
3081
  peg$savedPos = s0;
3091
- s0 = peg$f56();
3082
+ s0 = peg$f53();
3092
3083
  } else {
3093
3084
  peg$currPos = s0;
3094
3085
  s0 = peg$FAILED;
@@ -3103,11 +3094,11 @@ function peg$parse(input, options) {
3103
3094
  peg$silentFails++;
3104
3095
  s0 = peg$currPos;
3105
3096
  if (input.charCodeAt(peg$currPos) === 39) {
3106
- s1 = peg$c45;
3097
+ s1 = peg$c39;
3107
3098
  peg$currPos++;
3108
3099
  } else {
3109
3100
  s1 = peg$FAILED;
3110
- if (peg$silentFails === 0) { peg$fail(peg$e84); }
3101
+ if (peg$silentFails === 0) { peg$fail(peg$e76); }
3111
3102
  }
3112
3103
  if (s1 !== peg$FAILED) {
3113
3104
  s2 = [];
@@ -3117,15 +3108,15 @@ function peg$parse(input, options) {
3117
3108
  s3 = peg$parsesingleQuoteStringChar();
3118
3109
  }
3119
3110
  if (input.charCodeAt(peg$currPos) === 39) {
3120
- s3 = peg$c45;
3111
+ s3 = peg$c39;
3121
3112
  peg$currPos++;
3122
3113
  } else {
3123
3114
  s3 = peg$FAILED;
3124
- if (peg$silentFails === 0) { peg$fail(peg$e84); }
3115
+ if (peg$silentFails === 0) { peg$fail(peg$e76); }
3125
3116
  }
3126
3117
  if (s3 !== peg$FAILED) {
3127
3118
  peg$savedPos = s0;
3128
- s0 = peg$f57(s2);
3119
+ s0 = peg$f54(s2);
3129
3120
  } else {
3130
3121
  peg$currPos = s0;
3131
3122
  s0 = peg$FAILED;
@@ -3137,7 +3128,7 @@ function peg$parse(input, options) {
3137
3128
  peg$silentFails--;
3138
3129
  if (s0 === peg$FAILED) {
3139
3130
  s1 = peg$FAILED;
3140
- if (peg$silentFails === 0) { peg$fail(peg$e83); }
3131
+ if (peg$silentFails === 0) { peg$fail(peg$e75); }
3141
3132
  }
3142
3133
 
3143
3134
  return s0;
@@ -3150,11 +3141,11 @@ function peg$parse(input, options) {
3150
3141
  s1 = peg$currPos;
3151
3142
  peg$silentFails++;
3152
3143
  if (input.charCodeAt(peg$currPos) === 39) {
3153
- s2 = peg$c45;
3144
+ s2 = peg$c39;
3154
3145
  peg$currPos++;
3155
3146
  } else {
3156
3147
  s2 = peg$FAILED;
3157
- if (peg$silentFails === 0) { peg$fail(peg$e84); }
3148
+ if (peg$silentFails === 0) { peg$fail(peg$e76); }
3158
3149
  }
3159
3150
  if (s2 === peg$FAILED) {
3160
3151
  s2 = peg$parsenewLine();
@@ -3188,10 +3179,10 @@ function peg$parse(input, options) {
3188
3179
  s0 = peg$currPos;
3189
3180
  s1 = peg$parseellipsis();
3190
3181
  if (s1 !== peg$FAILED) {
3191
- s2 = peg$parsepipeline();
3182
+ s2 = peg$parsevalue();
3192
3183
  if (s2 !== peg$FAILED) {
3193
3184
  peg$savedPos = s0;
3194
- s0 = peg$f58(s2);
3185
+ s0 = peg$f55(s2);
3195
3186
  } else {
3196
3187
  peg$currPos = s0;
3197
3188
  s0 = peg$FAILED;
@@ -3204,53 +3195,6 @@ function peg$parse(input, options) {
3204
3195
  return s0;
3205
3196
  }
3206
3197
 
3207
- function peg$parsestep() {
3208
- var s0;
3209
-
3210
- s0 = peg$parsenumber();
3211
- if (s0 === peg$FAILED) {
3212
- s0 = peg$parsefunctionComposition();
3213
- if (s0 === peg$FAILED) {
3214
- s0 = peg$parseabsoluteFilePath();
3215
- if (s0 === peg$FAILED) {
3216
- s0 = peg$parsearray();
3217
- if (s0 === peg$FAILED) {
3218
- s0 = peg$parseobject();
3219
- if (s0 === peg$FAILED) {
3220
- s0 = peg$parselambda();
3221
- if (s0 === peg$FAILED) {
3222
- s0 = peg$parseparameterizedLambda();
3223
- if (s0 === peg$FAILED) {
3224
- s0 = peg$parsetemplateLiteral();
3225
- if (s0 === peg$FAILED) {
3226
- s0 = peg$parsestring();
3227
- if (s0 === peg$FAILED) {
3228
- s0 = peg$parsegroup();
3229
- if (s0 === peg$FAILED) {
3230
- s0 = peg$parseprotocolCall();
3231
- if (s0 === peg$FAILED) {
3232
- s0 = peg$parsetaggedTemplate();
3233
- if (s0 === peg$FAILED) {
3234
- s0 = peg$parsescopeTraverse();
3235
- if (s0 === peg$FAILED) {
3236
- s0 = peg$parsescopeReference();
3237
- }
3238
- }
3239
- }
3240
- }
3241
- }
3242
- }
3243
- }
3244
- }
3245
- }
3246
- }
3247
- }
3248
- }
3249
- }
3250
-
3251
- return s0;
3252
- }
3253
-
3254
3198
  function peg$parsestart() {
3255
3199
  var s0;
3256
3200
 
@@ -3273,7 +3217,7 @@ function peg$parse(input, options) {
3273
3217
  peg$silentFails--;
3274
3218
  if (s0 === peg$FAILED) {
3275
3219
  s1 = peg$FAILED;
3276
- if (peg$silentFails === 0) { peg$fail(peg$e85); }
3220
+ if (peg$silentFails === 0) { peg$fail(peg$e77); }
3277
3221
  }
3278
3222
 
3279
3223
  return s0;
@@ -3286,24 +3230,24 @@ function peg$parse(input, options) {
3286
3230
  s1 = peg$parsecallTarget();
3287
3231
  if (s1 !== peg$FAILED) {
3288
3232
  if (input.charCodeAt(peg$currPos) === 96) {
3289
- s2 = peg$c46;
3233
+ s2 = peg$c40;
3290
3234
  peg$currPos++;
3291
3235
  } else {
3292
3236
  s2 = peg$FAILED;
3293
- if (peg$silentFails === 0) { peg$fail(peg$e86); }
3237
+ if (peg$silentFails === 0) { peg$fail(peg$e78); }
3294
3238
  }
3295
3239
  if (s2 !== peg$FAILED) {
3296
3240
  s3 = peg$parsetemplateLiteralContents();
3297
3241
  if (input.charCodeAt(peg$currPos) === 96) {
3298
- s4 = peg$c46;
3242
+ s4 = peg$c40;
3299
3243
  peg$currPos++;
3300
3244
  } else {
3301
3245
  s4 = peg$FAILED;
3302
- if (peg$silentFails === 0) { peg$fail(peg$e86); }
3246
+ if (peg$silentFails === 0) { peg$fail(peg$e78); }
3303
3247
  }
3304
3248
  if (s4 !== peg$FAILED) {
3305
3249
  peg$savedPos = s0;
3306
- s0 = peg$f59(s1, s3);
3250
+ s0 = peg$f56(s1, s3);
3307
3251
  } else {
3308
3252
  peg$currPos = s0;
3309
3253
  s0 = peg$FAILED;
@@ -3327,11 +3271,11 @@ function peg$parse(input, options) {
3327
3271
  s0 = peg$currPos;
3328
3272
  s1 = peg$parsetemplateDocumentContents();
3329
3273
  peg$savedPos = s0;
3330
- s1 = peg$f60(s1);
3274
+ s1 = peg$f57(s1);
3331
3275
  s0 = s1;
3332
3276
  peg$silentFails--;
3333
3277
  s1 = peg$FAILED;
3334
- if (peg$silentFails === 0) { peg$fail(peg$e87); }
3278
+ if (peg$silentFails === 0) { peg$fail(peg$e79); }
3335
3279
 
3336
3280
  return s0;
3337
3281
  }
@@ -3342,12 +3286,12 @@ function peg$parse(input, options) {
3342
3286
  s0 = peg$currPos;
3343
3287
  s1 = peg$currPos;
3344
3288
  peg$silentFails++;
3345
- if (input.substr(peg$currPos, 2) === peg$c47) {
3346
- s2 = peg$c47;
3289
+ if (input.substr(peg$currPos, 2) === peg$c41) {
3290
+ s2 = peg$c41;
3347
3291
  peg$currPos += 2;
3348
3292
  } else {
3349
3293
  s2 = peg$FAILED;
3350
- if (peg$silentFails === 0) { peg$fail(peg$e88); }
3294
+ if (peg$silentFails === 0) { peg$fail(peg$e80); }
3351
3295
  }
3352
3296
  peg$silentFails--;
3353
3297
  if (s2 === peg$FAILED) {
@@ -3402,7 +3346,7 @@ function peg$parse(input, options) {
3402
3346
  }
3403
3347
  }
3404
3348
  peg$savedPos = s0;
3405
- s0 = peg$f61(s1, s2);
3349
+ s0 = peg$f58(s1, s2);
3406
3350
 
3407
3351
  return s0;
3408
3352
  }
@@ -3419,11 +3363,11 @@ function peg$parse(input, options) {
3419
3363
  s2 = peg$parsetemplateDocumentChar();
3420
3364
  }
3421
3365
  peg$savedPos = s0;
3422
- s1 = peg$f62(s1);
3366
+ s1 = peg$f59(s1);
3423
3367
  s0 = s1;
3424
3368
  peg$silentFails--;
3425
3369
  s1 = peg$FAILED;
3426
- if (peg$silentFails === 0) { peg$fail(peg$e89); }
3370
+ if (peg$silentFails === 0) { peg$fail(peg$e81); }
3427
3371
 
3428
3372
  return s0;
3429
3373
  }
@@ -3434,24 +3378,24 @@ function peg$parse(input, options) {
3434
3378
  peg$silentFails++;
3435
3379
  s0 = peg$currPos;
3436
3380
  if (input.charCodeAt(peg$currPos) === 96) {
3437
- s1 = peg$c46;
3381
+ s1 = peg$c40;
3438
3382
  peg$currPos++;
3439
3383
  } else {
3440
3384
  s1 = peg$FAILED;
3441
- if (peg$silentFails === 0) { peg$fail(peg$e86); }
3385
+ if (peg$silentFails === 0) { peg$fail(peg$e78); }
3442
3386
  }
3443
3387
  if (s1 !== peg$FAILED) {
3444
3388
  s2 = peg$parsetemplateLiteralContents();
3445
3389
  if (input.charCodeAt(peg$currPos) === 96) {
3446
- s3 = peg$c46;
3390
+ s3 = peg$c40;
3447
3391
  peg$currPos++;
3448
3392
  } else {
3449
3393
  s3 = peg$FAILED;
3450
- if (peg$silentFails === 0) { peg$fail(peg$e86); }
3394
+ if (peg$silentFails === 0) { peg$fail(peg$e78); }
3451
3395
  }
3452
3396
  if (s3 !== peg$FAILED) {
3453
3397
  peg$savedPos = s0;
3454
- s0 = peg$f63(s2);
3398
+ s0 = peg$f60(s2);
3455
3399
  } else {
3456
3400
  peg$currPos = s0;
3457
3401
  s0 = peg$FAILED;
@@ -3463,7 +3407,7 @@ function peg$parse(input, options) {
3463
3407
  peg$silentFails--;
3464
3408
  if (s0 === peg$FAILED) {
3465
3409
  s1 = peg$FAILED;
3466
- if (peg$silentFails === 0) { peg$fail(peg$e90); }
3410
+ if (peg$silentFails === 0) { peg$fail(peg$e82); }
3467
3411
  }
3468
3412
 
3469
3413
  return s0;
@@ -3476,19 +3420,19 @@ function peg$parse(input, options) {
3476
3420
  s1 = peg$currPos;
3477
3421
  peg$silentFails++;
3478
3422
  if (input.charCodeAt(peg$currPos) === 96) {
3479
- s2 = peg$c46;
3423
+ s2 = peg$c40;
3480
3424
  peg$currPos++;
3481
3425
  } else {
3482
3426
  s2 = peg$FAILED;
3483
- if (peg$silentFails === 0) { peg$fail(peg$e86); }
3427
+ if (peg$silentFails === 0) { peg$fail(peg$e78); }
3484
3428
  }
3485
3429
  if (s2 === peg$FAILED) {
3486
- if (input.substr(peg$currPos, 2) === peg$c47) {
3487
- s2 = peg$c47;
3430
+ if (input.substr(peg$currPos, 2) === peg$c41) {
3431
+ s2 = peg$c41;
3488
3432
  peg$currPos += 2;
3489
3433
  } else {
3490
3434
  s2 = peg$FAILED;
3491
- if (peg$silentFails === 0) { peg$fail(peg$e88); }
3435
+ if (peg$silentFails === 0) { peg$fail(peg$e80); }
3492
3436
  }
3493
3437
  }
3494
3438
  peg$silentFails--;
@@ -3560,38 +3504,36 @@ function peg$parse(input, options) {
3560
3504
  s2 = peg$parsetemplateLiteralChar();
3561
3505
  }
3562
3506
  peg$savedPos = s0;
3563
- s1 = peg$f64(s1);
3507
+ s1 = peg$f61(s1);
3564
3508
  s0 = s1;
3565
3509
 
3566
3510
  return s0;
3567
3511
  }
3568
3512
 
3569
3513
  function peg$parsetemplateSubstitution() {
3570
- var s0, s1, s2, s3, s4, s5;
3514
+ var s0, s1, s2, s3;
3571
3515
 
3572
3516
  peg$silentFails++;
3573
3517
  s0 = peg$currPos;
3574
- if (input.substr(peg$currPos, 2) === peg$c47) {
3575
- s1 = peg$c47;
3518
+ if (input.substr(peg$currPos, 2) === peg$c41) {
3519
+ s1 = peg$c41;
3576
3520
  peg$currPos += 2;
3577
3521
  } else {
3578
3522
  s1 = peg$FAILED;
3579
- if (peg$silentFails === 0) { peg$fail(peg$e88); }
3523
+ if (peg$silentFails === 0) { peg$fail(peg$e80); }
3580
3524
  }
3581
3525
  if (s1 !== peg$FAILED) {
3582
- s2 = peg$parse__();
3583
- s3 = peg$parsepipeline();
3584
- if (s3 !== peg$FAILED) {
3585
- s4 = peg$parse__();
3526
+ s2 = peg$parseexpression();
3527
+ if (s2 !== peg$FAILED) {
3586
3528
  if (input.charCodeAt(peg$currPos) === 125) {
3587
- s5 = peg$c2;
3529
+ s3 = peg$c2;
3588
3530
  peg$currPos++;
3589
3531
  } else {
3590
- s5 = peg$FAILED;
3532
+ s3 = peg$FAILED;
3591
3533
  if (peg$silentFails === 0) { peg$fail(peg$e6); }
3592
3534
  }
3593
- if (s5 !== peg$FAILED) {
3594
- s0 = s3;
3535
+ if (s3 !== peg$FAILED) {
3536
+ s0 = s2;
3595
3537
  } else {
3596
3538
  peg$currPos = s0;
3597
3539
  s0 = peg$FAILED;
@@ -3607,7 +3549,7 @@ function peg$parse(input, options) {
3607
3549
  peg$silentFails--;
3608
3550
  if (s0 === peg$FAILED) {
3609
3551
  s1 = peg$FAILED;
3610
- if (peg$silentFails === 0) { peg$fail(peg$e91); }
3552
+ if (peg$silentFails === 0) { peg$fail(peg$e83); }
3611
3553
  }
3612
3554
 
3613
3555
  return s0;
@@ -3630,6 +3572,59 @@ function peg$parse(input, options) {
3630
3572
  return s0;
3631
3573
  }
3632
3574
 
3575
+ function peg$parsevalue() {
3576
+ var s0;
3577
+
3578
+ s0 = peg$parsenumber();
3579
+ if (s0 === peg$FAILED) {
3580
+ s0 = peg$parseparameterizedLambda();
3581
+ if (s0 === peg$FAILED) {
3582
+ s0 = peg$parsefunctionComposition();
3583
+ if (s0 === peg$FAILED) {
3584
+ s0 = peg$parsetaggedTemplate();
3585
+ if (s0 === peg$FAILED) {
3586
+ s0 = peg$parsenamespacePath();
3587
+ if (s0 === peg$FAILED) {
3588
+ s0 = peg$parseabsoluteFilePath();
3589
+ if (s0 === peg$FAILED) {
3590
+ s0 = peg$parsearray();
3591
+ if (s0 === peg$FAILED) {
3592
+ s0 = peg$parseobject();
3593
+ if (s0 === peg$FAILED) {
3594
+ s0 = peg$parselambda();
3595
+ if (s0 === peg$FAILED) {
3596
+ s0 = peg$parsetemplateLiteral();
3597
+ if (s0 === peg$FAILED) {
3598
+ s0 = peg$parsestring();
3599
+ if (s0 === peg$FAILED) {
3600
+ s0 = peg$parsegroup();
3601
+ if (s0 === peg$FAILED) {
3602
+ s0 = peg$parsehomeTree();
3603
+ if (s0 === peg$FAILED) {
3604
+ s0 = peg$parsescopeTraverse();
3605
+ if (s0 === peg$FAILED) {
3606
+ s0 = peg$parsenamespace();
3607
+ if (s0 === peg$FAILED) {
3608
+ s0 = peg$parsescopeReference();
3609
+ }
3610
+ }
3611
+ }
3612
+ }
3613
+ }
3614
+ }
3615
+ }
3616
+ }
3617
+ }
3618
+ }
3619
+ }
3620
+ }
3621
+ }
3622
+ }
3623
+ }
3624
+
3625
+ return s0;
3626
+ }
3627
+
3633
3628
  function peg$parsewhitespaceWithNewLine() {
3634
3629
  var s0, s1, s2, s3, s4;
3635
3630
 
@@ -3701,15 +3696,17 @@ const peg$allowedStartRules = [
3701
3696
  "doubleArrow",
3702
3697
  "doubleQuoteString",
3703
3698
  "doubleQuoteStringChar",
3699
+ "doubleSlashPath",
3704
3700
  "ellipsis",
3705
3701
  "escapedChar",
3706
- "expr",
3707
3702
  "expression",
3708
3703
  "float",
3709
3704
  "functionComposition",
3705
+ "functionReference",
3710
3706
  "group",
3711
3707
  "guillemetString",
3712
3708
  "guillemetStringChar",
3709
+ "homeTree",
3713
3710
  "host",
3714
3711
  "identifier",
3715
3712
  "identifierChar",
@@ -3721,6 +3718,8 @@ const peg$allowedStartRules = [
3721
3718
  "leadingSlashPath",
3722
3719
  "list",
3723
3720
  "multiLineComment",
3721
+ "namespace",
3722
+ "namespacePath",
3724
3723
  "newLine",
3725
3724
  "number",
3726
3725
  "object",
@@ -3734,14 +3733,13 @@ const peg$allowedStartRules = [
3734
3733
  "objectPublicKey",
3735
3734
  "parameterizedLambda",
3736
3735
  "parensArgs",
3737
- "pipeline",
3738
3736
  "path",
3739
3737
  "pathElement",
3740
3738
  "pathKeyChar",
3741
3739
  "pathTail",
3742
- "protocolCall",
3743
- "protocol",
3744
- "reservedProtocol",
3740
+ "pipeline",
3741
+ "pipelineStep",
3742
+ "program",
3745
3743
  "scopeReference",
3746
3744
  "scopeTraverse",
3747
3745
  "separator",
@@ -3752,7 +3750,6 @@ const peg$allowedStartRules = [
3752
3750
  "singleQuoteString",
3753
3751
  "singleQuoteStringChar",
3754
3752
  "spread",
3755
- "step",
3756
3753
  "start",
3757
3754
  "string",
3758
3755
  "taggedTemplate",
@@ -3766,6 +3763,7 @@ const peg$allowedStartRules = [
3766
3763
  "templateLiteralText",
3767
3764
  "templateSubstitution",
3768
3765
  "textChar",
3766
+ "value",
3769
3767
  "whitespaceWithNewLine"
3770
3768
  ];
3771
3769