import * as TSU from "@panyam/tsutils";
import * as G from "galore";
import * as TLEX from "tlex";
import { Literal, Note, Atom, Rest, Space, Group } from "./core";
import { Notation, Command, CmdParam } from "./notation";
import { Block } from "./block";
export declare class BlockCommand extends Command {
    readonly innerCommand: Command;
    readonly blockCommands: Command[];
    constructor(innerCommand: Command, blockCommands: Command[]);
    get name(): string;
    private createBlock;
    debugValue(): any;
    applyToNotation(notation: Notation): void;
    applyToBlock(container: Block): void;
}
export declare class Parser {
    errors: (TLEX.TokenizerError | G.ParseError)[];
    metadata: any;
    readonly commands: Command[];
    private blockStartStack;
    protected ruleHandlers: {
        newFraction: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => TSU.Num.Fraction;
        newGroup: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => Group;
        litWithCaret: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => Note;
        litWithPreEmb: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => Literal;
        litWithPostEmb: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => Literal;
        litToAtom: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => any;
        newSpace: (_rule: G.Rule, _parent: G.PTNode, ..._children: G.PTNode[]) => Space;
        newRest: (_rule: G.Rule, _parent: G.PTNode, ..._children: G.PTNode[]) => Rest;
        newDoubleSpace: (_rule: G.Rule, _parent: G.PTNode, ..._children: G.PTNode[]) => Space;
        newSilentSpace: (_rule: G.Rule, _parent: G.PTNode, ..._children: G.PTNode[]) => Space;
        applyPreMarker: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => Atom;
        applyPostMarker: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => Atom;
        applyDuration: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => Atom;
        newArray: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => any[];
        concatAtoms: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => any;
        newParam: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => {
            key: any;
            value: any;
        };
        newParamList: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => any[];
        concatParamList: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => any;
        beginBlock: (_rule: G.Rule, _parent: G.PTNode, ..._children: G.PTNode[]) => null;
        endBlock: (_rule: G.Rule, _parent: G.PTNode, ..._children: G.PTNode[]) => Command[];
        nullBlock: (_rule: G.Rule, _parent: G.PTNode, ..._children: G.PTNode[]) => null;
        newCommandWithBlock: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => Command;
        appendAtoms: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => null;
        prependFrontMatter: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => any;
        appendCommand: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => null;
        appendRoleSelector: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => null;
        insertEmbedding: (rule: G.Rule, parent: G.PTNode, ...children: G.PTNode[]) => null;
    };
    constructor(_config?: any);
    createCommand(name: string, params: CmdParam[]): Command;
    addCommand(cmd: Command): void;
    parse(input: string): any;
    parseAndBuild(input: string): [Notation, G.ParseError[]];
    parseEmbelishment(value: string): [any, boolean];
}
