ohm-js 16.3.2 → 16.4.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.
Files changed (52) hide show
  1. package/dist/dist/built-in-rules.d.ts +2 -0
  2. package/dist/dist/ohm-grammar.d.ts +2 -0
  3. package/dist/dist/operations-and-attributes.d.ts +2 -0
  4. package/dist/ohm.esm.js +21 -20
  5. package/dist/ohm.js +7 -7
  6. package/dist/ohm.min.js +1 -1
  7. package/dist/src/Builder.d.ts +25 -0
  8. package/dist/src/CaseInsensitiveTerminal.d.ts +15 -0
  9. package/dist/src/Failure.d.ts +22 -0
  10. package/dist/src/Grammar.d.ts +66 -0
  11. package/dist/src/GrammarDecl.d.ts +23 -0
  12. package/dist/src/InputStream.d.ts +16 -0
  13. package/dist/src/Interval.d.ts +29 -0
  14. package/dist/src/MatchResult.d.ts +20 -0
  15. package/dist/src/MatchState.d.ts +57 -0
  16. package/dist/src/Matcher.d.ts +15 -0
  17. package/dist/src/Namespace.d.ts +8 -0
  18. package/dist/src/PosInfo.d.ts +17 -0
  19. package/dist/src/Semantics.d.ts +49 -0
  20. package/dist/src/Trace.d.ts +23 -0
  21. package/dist/src/deferredInit.d.ts +1 -0
  22. package/dist/src/errors.d.ts +25 -0
  23. package/dist/src/grammarDeferredInit.d.ts +1 -0
  24. package/dist/src/main.d.ts +13 -0
  25. package/dist/src/makeRecipe.d.ts +1 -0
  26. package/dist/src/nodes.d.ts +40 -0
  27. package/dist/src/ohm-cmd.d.ts +2 -0
  28. package/dist/src/pexprs-allowsSkippingPrecedingSpace.d.ts +1 -0
  29. package/dist/src/pexprs-assertAllApplicationsAreValid.d.ts +1 -0
  30. package/dist/src/pexprs-assertChoicesHaveUniformArity.d.ts +1 -0
  31. package/dist/src/pexprs-assertIteratedExprsAreNotNullable.d.ts +1 -0
  32. package/dist/src/pexprs-eval.d.ts +1 -0
  33. package/dist/src/pexprs-getArity.d.ts +1 -0
  34. package/dist/src/pexprs-introduceParams.d.ts +1 -0
  35. package/dist/src/pexprs-isNullable.d.ts +1 -0
  36. package/dist/src/pexprs-main.d.ts +83 -0
  37. package/dist/src/pexprs-outputRecipe.d.ts +1 -0
  38. package/dist/src/pexprs-substituteParams.d.ts +1 -0
  39. package/dist/src/pexprs-toArgumentNameList.d.ts +1 -0
  40. package/dist/src/pexprs-toDisplayString.d.ts +1 -0
  41. package/dist/src/pexprs-toFailure.d.ts +1 -0
  42. package/dist/src/pexprs-toString.d.ts +1 -0
  43. package/dist/src/pexprs.d.ts +2 -0
  44. package/dist/src/semanticsDeferredInit.d.ts +1 -0
  45. package/dist/src/util.d.ts +15 -0
  46. package/dist/src/version.d.ts +2 -0
  47. package/dist/third_party/UnicodeCategories.d.ts +13 -0
  48. package/index.d.ts +57 -4
  49. package/package.json +16 -15
  50. package/src/Grammar.js +1 -1
  51. package/src/errors.js +2 -2
  52. package/src/main.js +2 -2
@@ -0,0 +1,25 @@
1
+ export = Builder;
2
+ declare function Builder(): void;
3
+ declare class Builder {
4
+ currentDecl: null;
5
+ currentRuleName: null;
6
+ newGrammar(name: any): GrammarDecl;
7
+ grammar(metaInfo: any, name: any, superGrammar: any, defaultStartRule: any, rules: any): Grammar;
8
+ terminal(x: any): import("./pexprs-main").Terminal;
9
+ range(from: any, to: any): import("./pexprs-main").Range;
10
+ param(index: any): import("./pexprs-main").Param;
11
+ alt(...termArgs: any[]): any;
12
+ seq(...factorArgs: any[]): any;
13
+ star(expr: any): import("./pexprs-main").Star;
14
+ plus(expr: any): import("./pexprs-main").Plus;
15
+ opt(expr: any): import("./pexprs-main").Opt;
16
+ not(expr: any): import("./pexprs-main").Not;
17
+ la(expr: any): import("./pexprs-main").Lookahead;
18
+ lookahead(expr: any): import("./pexprs-main").Lookahead;
19
+ lex(expr: any): import("./pexprs-main").Lex;
20
+ app(ruleName: any, optParams: any): import("./pexprs-main").Apply;
21
+ splice(beforeTerms: any, afterTerms: any): import("./pexprs-main").Splice;
22
+ fromRecipe(recipe: any): any;
23
+ }
24
+ import GrammarDecl = require("./GrammarDecl");
25
+ import Grammar = require("./Grammar");
@@ -0,0 +1,15 @@
1
+ export = CaseInsensitiveTerminal;
2
+ declare class CaseInsensitiveTerminal extends PExpr {
3
+ constructor(param: any);
4
+ obj: any;
5
+ _getString(state: any): any;
6
+ allowsSkippingPrecedingSpace(): boolean;
7
+ eval(state: any): boolean;
8
+ getArity(): number;
9
+ substituteParams(actuals: any): CaseInsensitiveTerminal;
10
+ toDisplayString(): string;
11
+ toFailure(grammar: any): Failure;
12
+ _isNullable(grammar: any, memo: any): any;
13
+ }
14
+ import { PExpr } from "./pexprs-main";
15
+ import Failure = require("./Failure");
@@ -0,0 +1,22 @@
1
+ export = Failure;
2
+ declare function Failure(pexpr: any, text: any, type: any): void;
3
+ declare class Failure {
4
+ constructor(pexpr: any, text: any, type: any);
5
+ pexpr: any;
6
+ text: any;
7
+ type: any;
8
+ fluffy: boolean;
9
+ getPExpr(): any;
10
+ getText(): any;
11
+ getType(): any;
12
+ isDescription(): boolean;
13
+ isStringTerminal(): boolean;
14
+ isCode(): boolean;
15
+ isFluffy(): boolean;
16
+ makeFluffy(): void;
17
+ clearFluffy(): void;
18
+ subsumes(that: any): any;
19
+ toString(): any;
20
+ clone(): Failure;
21
+ toKey(): string;
22
+ }
@@ -0,0 +1,66 @@
1
+ export = Grammar;
2
+ declare function Grammar(name: any, superGrammar: any, rules: any, optDefaultStartRule: any): void;
3
+ declare class Grammar {
4
+ constructor(name: any, superGrammar: any, rules: any, optDefaultStartRule: any);
5
+ name: any;
6
+ superGrammar: any;
7
+ rules: any;
8
+ defaultStartRule: any;
9
+ matcher(): Matcher;
10
+ isBuiltIn(): boolean;
11
+ equals(g: any): boolean;
12
+ match(input: any, optStartApplication: any): any;
13
+ trace(input: any, optStartApplication: any): any;
14
+ createSemantics(): {
15
+ (matchResult: any): {
16
+ [x: string]: any;
17
+ _semantics: this;
18
+ };
19
+ addOperation(signature: any, actionDict: any): any;
20
+ extendOperation(name: any, actionDict: any): any;
21
+ addAttribute(name: any, actionDict: any): any;
22
+ extendAttribute(name: any, actionDict: any): any;
23
+ _getActionDict(operationOrAttributeName: any): any;
24
+ _remove(operationOrAttributeName: any): any;
25
+ getOperationNames(): string[];
26
+ getAttributeNames(): string[];
27
+ getGrammar(): any;
28
+ toRecipe(semanticsOnly: any): string;
29
+ toString: any;
30
+ _getSemantics(): Semantics;
31
+ };
32
+ extendSemantics(superSemantics: any): {
33
+ (matchResult: any): {
34
+ [x: string]: any;
35
+ _semantics: this;
36
+ };
37
+ addOperation(signature: any, actionDict: any): any;
38
+ extendOperation(name: any, actionDict: any): any;
39
+ addAttribute(name: any, actionDict: any): any;
40
+ extendAttribute(name: any, actionDict: any): any;
41
+ _getActionDict(operationOrAttributeName: any): any;
42
+ _remove(operationOrAttributeName: any): any;
43
+ getOperationNames(): string[];
44
+ getAttributeNames(): string[];
45
+ getGrammar(): any;
46
+ toRecipe(semanticsOnly: any): string;
47
+ toString: any;
48
+ _getSemantics(): Semantics;
49
+ };
50
+ _checkTopDownActionDict(what: any, name: any, actionDict: any): void;
51
+ _topDownActionArity(actionName: any): any;
52
+ _inheritsFrom(grammar: any): boolean;
53
+ toRecipe(superGrammarExpr?: any): any;
54
+ toOperationActionDictionaryTemplate(): any;
55
+ toAttributeActionDictionaryTemplate(): any;
56
+ _toOperationOrAttributeActionDictionaryTemplate(): any;
57
+ addSemanticActionTemplate(ruleName: any, body: any, sb: any): void;
58
+ parseApplication(str: any): any;
59
+ }
60
+ declare namespace Grammar {
61
+ export { initApplicationParser, ProtoBuiltInRules };
62
+ }
63
+ import Matcher = require("./Matcher");
64
+ import Semantics = require("./Semantics");
65
+ declare function initApplicationParser(grammar: any, builderFn: any): void;
66
+ declare var ProtoBuiltInRules: Grammar;
@@ -0,0 +1,23 @@
1
+ export = GrammarDecl;
2
+ declare function GrammarDecl(name: any): void;
3
+ declare class GrammarDecl {
4
+ constructor(name: any);
5
+ name: any;
6
+ sourceInterval(startIdx: any, endIdx: any): import("./Interval");
7
+ ensureSuperGrammar(): any;
8
+ ensureSuperGrammarRuleForOverriding(name: any, source: any): any;
9
+ installOverriddenOrExtendedRule(name: any, formals: any, body: any, source: any): GrammarDecl;
10
+ install(name: any, formals: any, body: any, description: any, source: any): GrammarDecl;
11
+ withSuperGrammar(superGrammar: any): GrammarDecl;
12
+ superGrammar: any;
13
+ rules: any;
14
+ defaultStartRule: any;
15
+ withDefaultStartRule(ruleName: any): GrammarDecl;
16
+ withSource(source: any): GrammarDecl;
17
+ source: import("./Interval");
18
+ build(): Grammar;
19
+ define(name: any, formals: any, body: any, description: any, source: any): GrammarDecl;
20
+ override(name: any, formals: any, body: any, descIgnored: any, source: any): GrammarDecl;
21
+ extend(name: any, formals: any, fragment: any, descIgnored: any, source: any): GrammarDecl;
22
+ }
23
+ import Grammar = require("./Grammar");
@@ -0,0 +1,16 @@
1
+ export = InputStream;
2
+ declare function InputStream(source: any): void;
3
+ declare class InputStream {
4
+ constructor(source: any);
5
+ source: any;
6
+ pos: number;
7
+ examinedLength: number;
8
+ atEnd(): boolean;
9
+ next(): any;
10
+ nextCharCode(): any;
11
+ nextCodePoint(): any;
12
+ matchString(s: any, optIgnoreCase: any): boolean;
13
+ sourceSlice(startIdx: any, endIdx: any): any;
14
+ interval(startIdx: any, optEndIdx: any): Interval;
15
+ }
16
+ import Interval = require("./Interval");
@@ -0,0 +1,29 @@
1
+ export = Interval;
2
+ declare function Interval(sourceString: any, startIdx: any, endIdx: any): void;
3
+ declare class Interval {
4
+ constructor(sourceString: any, startIdx: any, endIdx: any);
5
+ sourceString: any;
6
+ startIdx: any;
7
+ endIdx: any;
8
+ coverageWith(...intervals: any[]): Interval;
9
+ collapsedLeft(): Interval;
10
+ collapsedRight(): Interval;
11
+ getLineAndColumn(): {
12
+ offset: any;
13
+ lineNum: number;
14
+ colNum: number;
15
+ line: any;
16
+ prevLine: any;
17
+ nextLine: any;
18
+ toString: (...ranges: any[]) => any;
19
+ };
20
+ getLineAndColumnMessage(): any;
21
+ minus(that: any): Interval[];
22
+ relativeTo(that: any): Interval;
23
+ trimmed(): Interval;
24
+ subInterval(offset: any, len: any): Interval;
25
+ }
26
+ declare namespace Interval {
27
+ export { coverage };
28
+ }
29
+ declare function coverage(firstInterval: any, ...intervals: any[]): Interval;
@@ -0,0 +1,20 @@
1
+ export = MatchResult;
2
+ declare function MatchResult(matcher: any, input: any, startExpr: any, cst: any, cstOffset: any, rightmostFailurePosition: any, optRecordedFailures: any): void;
3
+ declare class MatchResult {
4
+ constructor(matcher: any, input: any, startExpr: any, cst: any, cstOffset: any, rightmostFailurePosition: any, optRecordedFailures: any);
5
+ matcher: any;
6
+ input: any;
7
+ startExpr: any;
8
+ _cst: any;
9
+ _cstOffset: any;
10
+ _rightmostFailurePosition: any;
11
+ _rightmostFailures: any;
12
+ succeeded(): boolean;
13
+ failed(): boolean;
14
+ getRightmostFailurePosition(): any;
15
+ getRightmostFailures(): any;
16
+ toString(): string;
17
+ getExpectedText(): any;
18
+ getInterval(): Interval;
19
+ }
20
+ import Interval = require("./Interval");
@@ -0,0 +1,57 @@
1
+ export = MatchState;
2
+ declare function MatchState(matcher: any, startExpr: any, optPositionToRecordFailures: any): void;
3
+ declare class MatchState {
4
+ constructor(matcher: any, startExpr: any, optPositionToRecordFailures: any);
5
+ matcher: any;
6
+ startExpr: any;
7
+ grammar: any;
8
+ input: any;
9
+ inputStream: InputStream;
10
+ memoTable: any;
11
+ _bindings: any[];
12
+ _bindingOffsets: any[];
13
+ _applicationStack: any[];
14
+ _posStack: number[];
15
+ inLexifiedContextStack: boolean[];
16
+ rightmostFailurePosition: number;
17
+ _rightmostFailurePositionStack: any[];
18
+ _recordedFailuresStack: any[];
19
+ positionToRecordFailures: any;
20
+ recordedFailures: any;
21
+ posToOffset(pos: any): number;
22
+ enterApplication(posInfo: any, app: any): void;
23
+ exitApplication(posInfo: any, optNode: any): void;
24
+ enterLexifiedContext(): void;
25
+ exitLexifiedContext(): void;
26
+ currentApplication(): any;
27
+ inSyntacticContext(): any;
28
+ inLexifiedContext(): boolean;
29
+ skipSpaces(): number;
30
+ skipSpacesIfInSyntacticContext(): number;
31
+ maybeSkipSpacesBefore(expr: any): number;
32
+ pushBinding(node: any, origPos: any): void;
33
+ popBinding(): void;
34
+ numBindings(): number;
35
+ truncateBindings(newLength: any): void;
36
+ getCurrentPosInfo(): any;
37
+ getPosInfo(pos: any): any;
38
+ processFailure(pos: any, expr: any): void;
39
+ recordFailure(failure: any, shouldCloneIfNew: any): void;
40
+ recordFailures(failures: any, shouldCloneIfNew: any): void;
41
+ cloneRecordedFailures(): any;
42
+ getRightmostFailurePosition(): number;
43
+ _getRightmostFailureOffset(): number;
44
+ getMemoizedTraceEntry(pos: any, expr: any): any;
45
+ getTraceEntry(pos: any, expr: any, succeeded: any, bindings: any): any;
46
+ isTracing(): boolean;
47
+ hasNecessaryInfo(memoRec: any): boolean;
48
+ useMemoizedResult(origPos: any, memoRec: any): boolean;
49
+ eval(expr: any): any;
50
+ trace: any;
51
+ getMatchResult(): MatchResult;
52
+ getTrace(): any;
53
+ pushFailuresInfo(): void;
54
+ popFailuresInfo(): void;
55
+ }
56
+ import InputStream = require("./InputStream");
57
+ import MatchResult = require("./MatchResult");
@@ -0,0 +1,15 @@
1
+ export = Matcher;
2
+ declare function Matcher(grammar: any): void;
3
+ declare class Matcher {
4
+ constructor(grammar: any);
5
+ grammar: any;
6
+ memoTable: any[];
7
+ input: string;
8
+ getInput(): string;
9
+ setInput(str: any): Matcher;
10
+ replaceInputRange(startIdx: any, endIdx: any, str: any): Matcher;
11
+ match(optStartApplicationStr: any): any;
12
+ trace(optStartApplicationStr: any): any;
13
+ _match(startExpr: any, tracing: any, optPositionToRecordFailures: any): any;
14
+ _getStartExpr(optStartApplicationStr: any): import("./pexprs-main").Seq;
15
+ }
@@ -0,0 +1,8 @@
1
+ export = Namespace;
2
+ declare function Namespace(): void;
3
+ declare namespace Namespace {
4
+ function asNamespace(objOrNamespace: any): any;
5
+ function createNamespace(optProps: any): any;
6
+ function extend(namespace: any, optProps: any): any;
7
+ function toString(ns: any): any;
8
+ }
@@ -0,0 +1,17 @@
1
+ export = PosInfo;
2
+ declare function PosInfo(): void;
3
+ declare class PosInfo {
4
+ applicationMemoKeyStack: any[];
5
+ memo: {};
6
+ maxExaminedLength: number;
7
+ maxRightmostFailureOffset: number;
8
+ currentLeftRecursion: any;
9
+ isActive(application: any): boolean;
10
+ enter(application: any): void;
11
+ exit(): void;
12
+ startLeftRecursion(headApplication: any, memoRec: any): void;
13
+ endLeftRecursion(): void;
14
+ shouldUseMemoizedResult(memoRec: any): boolean;
15
+ memoize(memoKey: any, memoRec: any): any;
16
+ clearObsoleteEntries(pos: any, invalidatedIdx: any): void;
17
+ }
@@ -0,0 +1,49 @@
1
+ export = Semantics;
2
+ declare function Semantics(grammar: any, superSemantics: any): void;
3
+ declare class Semantics {
4
+ constructor(grammar: any, superSemantics: any);
5
+ grammar: any;
6
+ checkedActionDicts: boolean;
7
+ Wrapper: {
8
+ new (node: any, sourceInterval: any, baseInterval: any): {
9
+ [x: string]: any;
10
+ _semantics: this;
11
+ };
12
+ [x: string]: any;
13
+ };
14
+ super: any;
15
+ operations: any;
16
+ attributes: any;
17
+ attributeKeys: any;
18
+ toString(): string;
19
+ checkActionDictsIfHaventAlready(): void;
20
+ checkActionDicts(): void;
21
+ toRecipe(semanticsOnly: any): string;
22
+ addOperationOrAttribute(type: any, signature: any, actionDict: any): void;
23
+ extendOperationOrAttribute(type: any, name: any, actionDict: any): void;
24
+ assertNewName(name: any, type: any): void;
25
+ wrap(node: any, source: any, optBaseInterval: any): {
26
+ [x: string]: any;
27
+ _semantics: this;
28
+ };
29
+ }
30
+ declare namespace Semantics {
31
+ function createSemantics(grammar: any, optSuperSemantics: any): {
32
+ (matchResult: any): {
33
+ [x: string]: any;
34
+ _semantics: this;
35
+ };
36
+ addOperation(signature: any, actionDict: any): any;
37
+ extendOperation(name: any, actionDict: any): any;
38
+ addAttribute(name: any, actionDict: any): any;
39
+ extendAttribute(name: any, actionDict: any): any;
40
+ _getActionDict(operationOrAttributeName: any): any;
41
+ _remove(operationOrAttributeName: any): any;
42
+ getOperationNames(): string[];
43
+ getAttributeNames(): string[];
44
+ getGrammar(): any;
45
+ toRecipe(semanticsOnly: any): string;
46
+ toString: any;
47
+ _getSemantics(): Semantics;
48
+ };
49
+ }
@@ -0,0 +1,23 @@
1
+ export = Trace;
2
+ declare function Trace(input: any, pos1: any, pos2: any, expr: any, succeeded: any, bindings: any, optChildren: any): void;
3
+ declare class Trace {
4
+ constructor(input: any, pos1: any, pos2: any, expr: any, succeeded: any, bindings: any, optChildren: any);
5
+ input: any;
6
+ pos: any;
7
+ pos1: any;
8
+ pos2: any;
9
+ source: Interval;
10
+ expr: any;
11
+ bindings: any;
12
+ children: any;
13
+ terminatingLREntry: Trace;
14
+ _flags: number;
15
+ SKIP: {};
16
+ get displayString(): any;
17
+ clone(): Trace;
18
+ cloneWithExpr(expr: any): Trace;
19
+ recordLRTermination(ruleBodyTrace: any, value: any): void;
20
+ walk(visitorObjOrFn: any, optThisArg: any): void;
21
+ toString(): any;
22
+ }
23
+ import Interval = require("./Interval");
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ export function applicationOfSyntacticRuleFromLexicalContext(ruleName: any, applyExpr: any): Error;
2
+ export function applySyntacticWithLexicalRuleApplication(applyExpr: any): Error;
3
+ export function cannotExtendUndeclaredRule(ruleName: any, grammarName: any, optSource: any): Error;
4
+ export function cannotOverrideUndeclaredRule(ruleName: any, grammarName: any, optSource: any): Error;
5
+ export function duplicateGrammarDeclaration(grammar: any, namespace: any): Error;
6
+ export function duplicateParameterNames(ruleName: any, duplicates: any, source: any): Error;
7
+ export function duplicatePropertyNames(duplicates: any): Error;
8
+ export function duplicateRuleDeclaration(ruleName: any, grammarName: any, declGrammarName: any, optSource: any): Error;
9
+ export function inconsistentArity(ruleName: any, expected: any, actual: any, expr: any): Error;
10
+ export function incorrectArgumentType(expectedType: any, expr: any): Error;
11
+ export function intervalSourcesDontMatch(): Error;
12
+ export function invalidCodePoint(applyWrapper: any): Error;
13
+ export function invalidConstructorCall(grammar: any, ctorName: any, children: any): Error;
14
+ export function invalidParameter(ruleName: any, expr: any): Error;
15
+ export function grammarSyntaxError(matchFailure: any): Error;
16
+ export function kleeneExprHasNullableOperand(kleeneExpr: any, applicationStack: any): Error;
17
+ export function missingSemanticAction(ctorName: any, name: any, type: any, stack: any): Error;
18
+ export function multipleSuperSplices(expr: any): Error;
19
+ export function undeclaredGrammar(grammarName: any, namespace: any, interval: any): Error;
20
+ export function undeclaredRule(ruleName: any, grammarName: any, optInterval: any): Error;
21
+ export function unnecessaryExperimentalApplySyntactic(applyExpr: any): Error;
22
+ export function wrongNumberOfArguments(ruleName: any, expected: any, actual: any, expr: any): Error;
23
+ export function wrongNumberOfParameters(ruleName: any, expected: any, actual: any, source: any): Error;
24
+ export declare function throwErrors(errors: any): void;
25
+ export declare function throwErrors(errors: any): void;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ export const ohmGrammar: any;
2
+ export function grammar(source: any, optNamespace: any): any;
3
+ export function grammars(source: any, optNamespace: any): any;
4
+ export function grammarFromScriptElement(optNode: any): void;
5
+ export function grammarsFromScriptElements(optNodeOrNodeList: any): void;
6
+ import { makeRecipe } from "./makeRecipe";
7
+ import pexprs = require("./pexprs");
8
+ import util = require("./util");
9
+ import version = require("./version");
10
+ declare function buildGrammar(match: any, namespace: any, optOhmGrammarForTesting: any): any;
11
+ export declare const createNamespace: (optProps: any) => any;
12
+ export const ohmGrammar: any;
13
+ export { makeRecipe, pexprs, util, version, buildGrammar as _buildGrammar };
@@ -0,0 +1 @@
1
+ export function makeRecipe(recipe: any): any;
@@ -0,0 +1,40 @@
1
+ export class Node {
2
+ constructor(matchLength: any);
3
+ matchLength: any;
4
+ get ctorName(): void;
5
+ numChildren(): any;
6
+ childAt(idx: any): any;
7
+ indexOfChild(arg: any): any;
8
+ hasChildren(): boolean;
9
+ hasNoChildren(): boolean;
10
+ onlyChild(): any;
11
+ firstChild(): any;
12
+ lastChild(): any;
13
+ childBefore(child: any): any;
14
+ childAfter(child: any): any;
15
+ isTerminal(): boolean;
16
+ isNonterminal(): boolean;
17
+ isIteration(): boolean;
18
+ isOptional(): boolean;
19
+ }
20
+ export class TerminalNode extends Node {
21
+ get ctorName(): string;
22
+ get primitiveValue(): void;
23
+ }
24
+ export class NonterminalNode extends Node {
25
+ constructor(ruleName: any, children: any, childOffsets: any, matchLength: any);
26
+ ruleName: any;
27
+ children: any;
28
+ childOffsets: any;
29
+ get ctorName(): any;
30
+ isLexical(): boolean;
31
+ isSyntactic(): boolean;
32
+ }
33
+ export class IterationNode extends Node {
34
+ constructor(children: any, childOffsets: any, matchLength: any, isOptional: any);
35
+ children: any;
36
+ childOffsets: any;
37
+ optional: any;
38
+ get ctorName(): string;
39
+ isOptional(): any;
40
+ }
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,83 @@
1
+ export class PExpr {
2
+ withSource(interval: any): PExpr;
3
+ source: any;
4
+ }
5
+ export const any: any;
6
+ export const end: any;
7
+ export class Terminal extends PExpr {
8
+ constructor(obj: any);
9
+ obj: any;
10
+ }
11
+ export class Range extends PExpr {
12
+ constructor(from: any, to: any);
13
+ from: any;
14
+ to: any;
15
+ matchCodePoint: boolean;
16
+ }
17
+ export class Param extends PExpr {
18
+ constructor(index: any);
19
+ index: any;
20
+ }
21
+ export class Alt extends PExpr {
22
+ constructor(terms: any);
23
+ terms: any;
24
+ }
25
+ export class Extend extends Alt {
26
+ constructor(superGrammar: any, name: any, body: any);
27
+ superGrammar: any;
28
+ name: any;
29
+ body: any;
30
+ }
31
+ export class Splice extends Alt {
32
+ constructor(superGrammar: any, ruleName: any, beforeTerms: any, afterTerms: any);
33
+ superGrammar: any;
34
+ ruleName: any;
35
+ expansionPos: any;
36
+ }
37
+ export class Seq extends PExpr {
38
+ constructor(factors: any);
39
+ factors: any;
40
+ }
41
+ export class Iter extends PExpr {
42
+ constructor(expr: any);
43
+ expr: any;
44
+ }
45
+ export class Star extends Iter {
46
+ operator: string;
47
+ minNumMatches: number;
48
+ maxNumMatches: number;
49
+ }
50
+ export class Plus extends Iter {
51
+ operator: string;
52
+ minNumMatches: number;
53
+ maxNumMatches: number;
54
+ }
55
+ export class Opt extends Iter {
56
+ operator: string;
57
+ minNumMatches: number;
58
+ maxNumMatches: number;
59
+ }
60
+ export class Not extends PExpr {
61
+ constructor(expr: any);
62
+ expr: any;
63
+ }
64
+ export class Lookahead extends PExpr {
65
+ constructor(expr: any);
66
+ expr: any;
67
+ }
68
+ export class Lex extends PExpr {
69
+ constructor(expr: any);
70
+ expr: any;
71
+ }
72
+ export class Apply extends PExpr {
73
+ constructor(ruleName: any, args?: any[]);
74
+ ruleName: any;
75
+ args: any[];
76
+ isSyntactic(): boolean;
77
+ toMemoKey(): any;
78
+ }
79
+ export class UnicodeChar extends PExpr {
80
+ constructor(category: any);
81
+ category: any;
82
+ pattern: any;
83
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ declare const _exports: typeof import("./pexprs-main");
2
+ export = _exports;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ export function awaitBuiltInRules(cb: any): void;
2
+ export function announceBuiltInRules(grammar: any): void;
3
+ export function getLineAndColumn(str: any, offset: any): {
4
+ offset: any;
5
+ lineNum: number;
6
+ colNum: number;
7
+ line: any;
8
+ prevLine: any;
9
+ nextLine: any;
10
+ toString: typeof lineAndColumnToMessage;
11
+ };
12
+ export function getLineAndColumnMessage(str: any, offset: any, ...ranges: any[]): any;
13
+ export function uniqueId(prefix: any): string;
14
+ declare function lineAndColumnToMessage(...ranges: any[]): any;
15
+ export {};
@@ -0,0 +1,2 @@
1
+ declare const _exports: any;
2
+ export = _exports;