import { NSourceIncrement } from "@cafetextual/nlist/dist/src/nsource/NSourceIncremet"; import GrammarTest from '../testsuite/GrammarTest'; import GrammarTestSrc from '../testsuite/GrammarTestSrc'; import ParseConfig from './ParseConfig'; import Breakpoint from '../parsertooling/breakpoint/Breakpoint'; /** * Parse Request, encapsulate request for parsing * * * * op : NSourceIncrement * - incremental operations (NListOp) wrapped in NSourceIncrement to manage versioning * - * * incremental: bookean * * debug? : { * enable:boolean * breakpoints:Array // <--- breakpoints reference a version * * } * * * ParseResponse { * srcVersion:string <--- the version of the source document * * incrementalResult:IncrementalParseResult { * incremental:boolean * complete:boolean * start:int * end:int * annotations:Array<(int, AAnotation )> * } * * result:ParseResult { * * } * * break?: { * stack:Array * * * } * * * * * } * * * * * * */ export declare type ParseAction = 'parse' | 'parse-incremental' | 'debug-start' | 'debug-cont' | 'debug-disable' | 'debug-step' | 'debug-step-line'; /** * * Encapsulates an essentially RESTful api for parse requests * * composes /w NSourceIncrement - which wraps * * */ export default class ParseRequest { constructor(href?: string, op?: NSourceIncrement, action?: ParseAction, config?: ParseConfig); docURI: string; href: string; src: Array; grammarURI: string; ruleName: string; op: NSourceIncrement; config: ParseConfig; action: ParseAction; } /** * * Send completely new source * */ export declare function createReplaceTestSource(gtest: GrammarTest, testSrc: GrammarTestSrc, src: Array): ParseRequest; /** * Create an incremental update action */ export declare function createIncremental(gtest: GrammarTest, testSrc: GrammarTestSrc, op: NSourceIncrement, config?: ParseConfig): ParseRequest; export declare function createDebug(gtest: GrammarTest, testSrc: GrammarTestSrc, src: Array | NSourceIncrement, breakpoints: Array): ParseRequest; export declare function toHRef(gtest: GrammarTest, src: GrammarTestSrc): string;