UNPKG

@scinorandex/sparse

Version:

Yet another parser generator

13 lines (12 loc) 594 B
import { Slex } from "@scinorandex/slex"; import { Result } from "../utils/Result"; import { GrammarToken, GrammarTokenMetadata, GrammarTokenType, Production } from "./common"; export declare const grammarLexerGenerator: Slex<GrammarTokenType, GrammarTokenMetadata>; interface LexerInterface { peekNextToken(): GrammarToken; getNextToken(): GrammarToken; hasNextToken(): boolean; } export declare const tryBuildProductions: (lexer: LexerInterface | string) => Result<Production[]>; export declare const buildProductions: (lexer: LexerInterface | string) => Production[]; export {};