/** * Parser based on at most 3 state table driven DFA table (designed for between 1->3 regular * states + terminus, which is always the 0 state), for 8bit symbol sets (such as UTF8 or ASCII) * * These have 2 bit table entries. */ export default abstract class ParsingDfa4Table { protected readonly table_: Uint32Array; /** * Construct the DFA table with a maximum state count, which allows limited length arrays. * * @param maximumState The maximum state value, shouldn't be more than 3. */ constructor(maximumState?: number); /** * Specify a range of transition bytes from one state to another. * another state. * * @param fromState The state to transition from. * @param begin The beginning of the range of byte values. * Can be a single character string or number. * @param end The ending of the range of byte values (inclusive). * Can be a single character string or number. * @param value The state to transition to. * @return {void} */ protected range(fromState: number, begin: number | string, end: number | string, value: number): void; /** * Specify a transition byte from one state to another. * another state. * * @param fromState The state to transition from. * @param entry The byte value to transition on. * @param value The state to transition to. * @return {void} */ protected set(fromState: number, entry: number | string | Uint8Array, value: number): void; /** * Get the value of a given state for a given value. * * Useful for using this for mappings. Will cause an exception if out of bounds. * * @param value The byte value to lookup. * @param state The state to get the value for. * @return {number} The table value given a state and input byte */ get(value: number, state: number): number; /** * Match a byte run against the DFA. * * @param buffer The buffer to read from. * @param validTerminusFlags What states are terminus (as flags) * @param cursor The position in the buffer to start the match from. * @param endCursor The last possible position in the buffer to find the match. * @param state The initial state to start on. * @return {number | undefined} The position in the buffer of the end of the match, * or undefined if none found. */ protected match(buffer: Uint8Array, validTerminusFlags: number, cursor: number, endCursor: number, state: number): number | undefined; } //# sourceMappingURL=parsing_dfa_4table.d.ts.map