declare class PContext { readonly x: string; pos: number; epos: number; headpos: number; ptree: PTree | null; state: PState | null; readonly memos: PMemo[]; constructor(inputs: string, pos: number, epos: number); } export declare type PFunc = (px: PContext) => boolean; export declare const keyRange: (chars: string, ranges: string) => string; declare type trie = string[] | { [key: string]: string[] | string; }; export declare const match_trie: (px: PContext, d: trie) => boolean; declare class PMemo { key: number; pos: number; treeState: boolean; prev: PTree | null; ptree: PTree | null; result: boolean; constructor(); } declare class PTree { readonly prev: PTree | null; readonly tag: string; readonly spos: number; readonly epos: number; readonly child: PTree | null; constructor(prev: PTree | null, tag: string, spos: number, epos: number, child: PTree | null); isEdge(): boolean; dump(inputs: string): string; } declare class PState { sid: number; val: any; prev: PState | null; constructor(sid: number, val: any, prev: PState | null); } export declare type Position = { position: number; column: number; row: number; }; export declare class ParseTree { static readonly EMPTY: ParseTree[]; tag_: string; inputs_: string; spos_: number; epos_: number; urn_: string; subs_: ParseTree[]; constructor(tag: string, inputs?: string, spos?: number, epos?: number, urn?: string); getTag(): string; is(tag: string): boolean; has(key: string | number): boolean; isEmpty(): boolean; private newEmpty; get(key: string | number): ParseTree; set(key: string, t: ParseTree): void; get2(key: number | string, key2: number | string, perror?: (s: string) => void): ParseTree; getNodeSize(): number; subNodes(): ParseTree[]; append(t: ParseTree, edge?: string): void; isSyntaxError(): boolean; getPosition(): Position; getEndPosition(): Position; length(): number; keys(): string[]; getToken(key?: string | number): string; trim(shift?: number, end_shift?: number): ParseTree; toString(): string; protected strOut(sb: string[]): void; message(msg?: string): string; } export declare const quote: (s: string) => string; export declare type Parser = (inputs: string, options?: any) => ParseTree; export declare class PAsm { static pRule: (peg: { [key: string]: PFunc; }, name: string, e: PFunc) => void; static pEmpty: () => PFunc; static pFail: () => PFunc; static pAny: () => PFunc; static pSkip: () => PFunc; static pChar: (text: string) => PFunc; static pRange: (chars: string, ranges?: string) => (px: PContext) => boolean; static pRef: (generated: any, uname: string) => any; static pMemo: (pf: PFunc, mp: number, mpsize: number) => (px: PContext) => boolean; static pAnd: (pf: PFunc) => (px: PContext) => boolean; static pNot: (pf: PFunc) => (px: PContext) => boolean; static pMany: (pf: PFunc) => (px: PContext) => boolean; static pOneMany: (pf: PFunc) => (px: PContext) => boolean; static pOption: (pf: PFunc) => (px: PContext) => boolean; static pSeq: (...pfs: PFunc[]) => (px: PContext) => boolean; static pSeq2: (pf: PFunc, pf2: PFunc) => (px: PContext) => boolean; static pSeq3: (pf: PFunc, pf2: PFunc, pf3: PFunc) => (px: PContext) => boolean; static pSeq4: (pf: PFunc, pf2: PFunc, pf3: PFunc, pf4: PFunc) => (px: PContext) => boolean; static pOre: (...pfs: PFunc[]) => (px: PContext) => boolean; static pOre2: (pf: PFunc, pf2: PFunc) => (px: PContext) => boolean; static pOre3: (pf: PFunc, pf2: PFunc, pf3: PFunc) => (px: PContext) => boolean; static pOre4: (pf: PFunc, pf2: PFunc, pf3: PFunc, pf4: PFunc) => (px: PContext) => boolean; static pDict: (words: string) => (px: PContext) => boolean; static pNode: (pf: PFunc, tag: string, shift: number) => (px: PContext) => boolean; static pEdge: (edge: string, pf: PFunc, shift: number) => PFunc; static pFold: (edge: string, pf: PFunc, tag: string, shift: number) => (px: PContext) => boolean; static pAbs: (pf: PFunc) => (px: PContext) => boolean; static pSymbol: (pf: PFunc, sid: number) => (px: PContext) => boolean; static pScope: (pf: PFunc) => (px: PContext) => boolean; static pExists: (sid: number) => (px: PContext) => boolean; static pMatch: (sid: number) => (px: PContext) => boolean; static pAndChar: (text: string) => (px: PContext) => boolean; static pNotChar: (text: string) => (px: PContext) => boolean; static pOptionChar: (text: string) => (px: PContext) => boolean; static pManyChar: (text: string) => (px: PContext) => boolean; static pOneManyChar: (text: string) => (px: PContext) => boolean; static pAndRange: (chars: string, ranges?: string) => (px: PContext) => boolean; static pNotRange: (chars: string, ranges?: string) => (px: PContext) => boolean; static pOptionRange: (chars: string, ranges?: string) => (px: PContext) => boolean; static pManyRange: (chars: string, ranges?: string) => (px: PContext) => boolean; static pOneManyRange: (chars: string, ranges?: string) => (px: PContext) => boolean; static pDef: (name: string, pf: PFunc) => (px: PContext) => boolean; static pIn: (name: string) => (px: PContext) => boolean; static generate: (generated: { [key: string]: PFunc; }, start: string) => Parser; static example: (generated: { [key: string]: PFunc; }, start: string, input: string) => void; } export declare const generate: (generated: { [key: string]: PFunc; }, start: string) => Parser; export declare const TPEG: (peg?: any) => any; export {};