14 lines
552 B
TypeScript
14 lines
552 B
TypeScript
import { IRule, Parser as _Parser } from '../Parser';
|
|
import { IGrammarParserOptions } from './types';
|
|
declare namespace BNF {
|
|
const RULES: IRule[];
|
|
const defaultParser: _Parser;
|
|
function emit(parser: Parser): string;
|
|
function getRules(source: string, parser?: _Parser): IRule[];
|
|
function Transform(source: TemplateStringsArray, subParser?: _Parser): IRule[];
|
|
class Parser extends _Parser {
|
|
constructor(source: string, options?: Partial<IGrammarParserOptions>);
|
|
emitSource(): string;
|
|
}
|
|
}
|
|
export default BNF;
|