ohm-js 16.3.4 → 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.
- package/dist/dist/built-in-rules.d.ts +2 -0
- package/dist/dist/ohm-grammar.d.ts +2 -0
- package/dist/dist/operations-and-attributes.d.ts +2 -0
- package/dist/ohm.esm.js +1 -1
- package/dist/ohm.js +1 -1
- package/dist/ohm.min.js +1 -1
- package/dist/src/Builder.d.ts +25 -0
- package/dist/src/CaseInsensitiveTerminal.d.ts +15 -0
- package/dist/src/Failure.d.ts +22 -0
- package/dist/src/Grammar.d.ts +66 -0
- package/dist/src/GrammarDecl.d.ts +23 -0
- package/dist/src/InputStream.d.ts +16 -0
- package/dist/src/Interval.d.ts +29 -0
- package/dist/src/MatchResult.d.ts +20 -0
- package/dist/src/MatchState.d.ts +57 -0
- package/dist/src/Matcher.d.ts +15 -0
- package/dist/src/Namespace.d.ts +8 -0
- package/dist/src/PosInfo.d.ts +17 -0
- package/dist/src/Semantics.d.ts +49 -0
- package/dist/src/Trace.d.ts +23 -0
- package/dist/src/deferredInit.d.ts +1 -0
- package/dist/src/errors.d.ts +25 -0
- package/dist/src/grammarDeferredInit.d.ts +1 -0
- package/dist/src/main.d.ts +13 -0
- package/dist/src/makeRecipe.d.ts +1 -0
- package/dist/src/nodes.d.ts +40 -0
- package/dist/src/ohm-cmd.d.ts +2 -0
- package/dist/src/pexprs-allowsSkippingPrecedingSpace.d.ts +1 -0
- package/dist/src/pexprs-assertAllApplicationsAreValid.d.ts +1 -0
- package/dist/src/pexprs-assertChoicesHaveUniformArity.d.ts +1 -0
- package/dist/src/pexprs-assertIteratedExprsAreNotNullable.d.ts +1 -0
- package/dist/src/pexprs-eval.d.ts +1 -0
- package/dist/src/pexprs-getArity.d.ts +1 -0
- package/dist/src/pexprs-introduceParams.d.ts +1 -0
- package/dist/src/pexprs-isNullable.d.ts +1 -0
- package/dist/src/pexprs-main.d.ts +83 -0
- package/dist/src/pexprs-outputRecipe.d.ts +1 -0
- package/dist/src/pexprs-substituteParams.d.ts +1 -0
- package/dist/src/pexprs-toArgumentNameList.d.ts +1 -0
- package/dist/src/pexprs-toDisplayString.d.ts +1 -0
- package/dist/src/pexprs-toFailure.d.ts +1 -0
- package/dist/src/pexprs-toString.d.ts +1 -0
- package/dist/src/pexprs.d.ts +2 -0
- package/dist/src/semanticsDeferredInit.d.ts +1 -0
- package/dist/src/util.d.ts +15 -0
- package/dist/src/version.d.ts +2 -0
- package/dist/third_party/UnicodeCategories.d.ts +13 -0
- package/index.d.ts +54 -1
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const Lu: RegExp;
|
|
2
|
+
export const Ll: RegExp;
|
|
3
|
+
export const Lt: RegExp;
|
|
4
|
+
export const Lm: RegExp;
|
|
5
|
+
export const Lo: RegExp;
|
|
6
|
+
export const Nl: RegExp;
|
|
7
|
+
export const Nd: RegExp;
|
|
8
|
+
export const Mn: RegExp;
|
|
9
|
+
export const Mc: RegExp;
|
|
10
|
+
export const Pc: RegExp;
|
|
11
|
+
export const Zs: RegExp;
|
|
12
|
+
export const L: RegExp;
|
|
13
|
+
export const Ltmo: RegExp;
|
package/index.d.ts
CHANGED
|
@@ -5,6 +5,33 @@ export = ohm;
|
|
|
5
5
|
declare namespace ohm {
|
|
6
6
|
const ohmGrammar: Grammar;
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Constructors for parsing expressions (aka pexprs). (Except for `any`
|
|
10
|
+
* and `end`, which are not constructors but singleton instances.)
|
|
11
|
+
*/
|
|
12
|
+
const pexprs: {
|
|
13
|
+
PExpr: typeof PExpr;
|
|
14
|
+
Terminal: typeof Terminal;
|
|
15
|
+
Range: typeof Range;
|
|
16
|
+
Param: typeof Param;
|
|
17
|
+
Alt: typeof Alt;
|
|
18
|
+
Extend: typeof Extend;
|
|
19
|
+
Splice: typeof Splice;
|
|
20
|
+
Seq: typeof Seq;
|
|
21
|
+
Iter: typeof Iter;
|
|
22
|
+
Star: typeof Star;
|
|
23
|
+
Plus: typeof Plus;
|
|
24
|
+
Opt: typeof Opt;
|
|
25
|
+
Not: typeof Not;
|
|
26
|
+
Lookahead: typeof Lookahead;
|
|
27
|
+
Lex: typeof Lex;
|
|
28
|
+
Apply: typeof Apply;
|
|
29
|
+
UnicodeChar: typeof UnicodeChar;
|
|
30
|
+
CaseInsensitiveTerminal: typeof CaseInsensitiveTerminal;
|
|
31
|
+
any: PExpr;
|
|
32
|
+
end: PExpr;
|
|
33
|
+
};
|
|
34
|
+
|
|
8
35
|
/**
|
|
9
36
|
* Instantiate the Grammar defined by source. If specified, namespace is
|
|
10
37
|
* the Namespace to use when resolving external references in the grammar.
|
|
@@ -98,7 +125,33 @@ declare namespace ohm {
|
|
|
98
125
|
extendSemantics(superSemantics: Semantics): Semantics;
|
|
99
126
|
}
|
|
100
127
|
|
|
101
|
-
|
|
128
|
+
class PExpr {
|
|
129
|
+
getArity(): number;
|
|
130
|
+
isNullable(): boolean;
|
|
131
|
+
toString(): string;
|
|
132
|
+
toDisplayString(): string;
|
|
133
|
+
}
|
|
134
|
+
class Terminal extends PExpr {}
|
|
135
|
+
class Range extends PExpr {}
|
|
136
|
+
class Param extends PExpr {}
|
|
137
|
+
class Alt extends PExpr {
|
|
138
|
+
terms: PExpr[];
|
|
139
|
+
}
|
|
140
|
+
class Extend extends Alt {}
|
|
141
|
+
class Splice extends Alt {}
|
|
142
|
+
class Seq extends PExpr {
|
|
143
|
+
factors: PExpr[];
|
|
144
|
+
}
|
|
145
|
+
class Iter extends PExpr {}
|
|
146
|
+
class Star extends Iter {}
|
|
147
|
+
class Plus extends Iter {}
|
|
148
|
+
class Opt extends Iter {}
|
|
149
|
+
class Not extends PExpr {}
|
|
150
|
+
class Lookahead extends PExpr {}
|
|
151
|
+
class Lex extends PExpr {}
|
|
152
|
+
class Apply extends PExpr {}
|
|
153
|
+
class UnicodeChar extends PExpr {}
|
|
154
|
+
class CaseInsensitiveTerminal extends PExpr {}
|
|
102
155
|
|
|
103
156
|
/**
|
|
104
157
|
* Matcher objects are used to incrementally match a changing input
|