pegisland
Version:
General PEG-based parser supporting island grammars with lake symbols
33 lines • 1.4 kB
TypeScript
import { IParseTree } from './ParseTree';
import { IParsingExpression } from './ParsingExpression';
import { BaseParsingEnv } from './IParsingEnv';
import { Rule } from './Rule';
import { Position } from './Position';
import { Peg } from './Peg';
import { PikaParsingEnv } from './PikaParser';
export declare class BottomUpParsingEnv extends BaseParsingEnv<Rule> {
private peg;
private readonly createHeap;
private readonly parentsMap;
constructor(s: string, peg: Peg);
parseString(s: string, start: string): [IParseTree, Position] | Error;
parseRule(rule: Rule, pos: Position): [IParseTree, Position] | null;
parse(pe: IParsingExpression, pos: Position): [IParseTree, Position] | null;
private fillMemoTable;
private fillMemoEntry;
private grow;
}
export declare function isGrowing(result: [IParseTree, Position] | null, oldResult: [IParseTree, Position] | null): boolean;
export declare function getTopLevelExpressions(peg: Peg): IParsingExpression[];
export declare class BottomUpParserBase {
private peg;
private ParsingEnvCtor;
constructor(peg: Peg, ParsingEnvCtor: {
new (s: string, peg: Peg): BottomUpParsingEnv | PikaParsingEnv;
});
parse(s: string, start?: string): IParseTree | Error;
}
export declare class BottomUpParser extends BottomUpParserBase {
constructor(peg: Peg);
}
//# sourceMappingURL=BottomUpParser.d.ts.map