UNPKG

918 BTypeScriptView Raw
1import type { Production, RightHandSide, OneOfList } from 'grammarkdown';
2import type { Node as EcmarkdownNode } from 'ecmarkdown';
3import { Grammar as GrammarFile } from 'grammarkdown';
4export declare function getProductions(grammar: GrammarFile): Map<string, {
5 production: Production;
6 rhses: (RightHandSide | OneOfList)[];
7}>;
8export declare function rhsMatches(a: RightHandSide | OneOfList, b: RightHandSide | OneOfList): boolean;
9export declare function getLocationInGrammar(grammar: GrammarFile, pos: number): {
10 line: number;
11 column: number;
12};
13export declare function collectNonterminalsFromGrammar(grammar: GrammarFile): {
14 name: string;
15 loc: {
16 line: number;
17 column: number;
18 };
19}[];
20export declare function collectNonterminalsFromEmd(emdNode: EcmarkdownNode | EcmarkdownNode[]): {
21 name: string;
22 loc: {
23 line: number;
24 column: number;
25 };
26}[];