import type { ParserRuleContext, Token } from 'antlr4';
import { default as CypherParser, FunctionNameContext, ProcedureNameContext, StatementOrCommandContext, StatementsOrCommandsContext } from './generated-parser/CypherCmdParser';
import { SyntaxDiagnostic } from './syntaxValidation/syntaxValidation';
import { CypherVersion } from './types';
export interface ParsedStatement {
    command: ParsedCommand;
    parser: CypherParser;
    tokens: Token[];
    ctx: StatementsOrCommandsContext;
    syntaxErrors: SyntaxDiagnostic[];
    cypherVersionError: SyntaxDiagnostic | undefined;
    stopNode: ParserRuleContext;
    collectedLabelOrRelTypes: LabelOrRelType[];
    collectedVariables: string[];
    collectedParameters: ParsedParameter[];
    collectedFunctions: ParsedFunction[];
    collectedProcedures: ParsedProcedure[];
    cypherVersion?: CypherVersion;
}
export interface ParsingResult {
    query: string;
    statementsParsing: ParsedStatement[];
}
export interface ParsingScaffolding {
    query: string;
    statementsScaffolding: StatementParsingScaffolding[];
}
export interface StatementParsingScaffolding {
    parser: CypherParser;
    tokens: Token[];
}
export declare enum LabelType {
    nodeLabelType = "Label",
    relLabelType = "Relationship type",
    unknown = "Label or relationship type"
}
export type HasPosition = {
    line: number;
    column: number;
    offsets: {
        start: number;
        end: number;
    };
};
export type LabelOrRelType = HasPosition & {
    labelType: LabelType;
    labelText: string;
    couldCreateNewLabel: boolean;
};
export type ParsedParameter = HasPosition & {
    name: string;
    rawText: string;
};
export type ParsedFunction = HasPosition & {
    name: string;
    rawText: string;
};
export type ParsedProcedure = ParsedFunction;
export declare function createParsingScaffolding(query: string): ParsingScaffolding;
export declare function parseStatementsStrs(query: string): string[];
export declare function parse(query: string): StatementOrCommandContext[];
export declare function createParsingResult(query: string, consoleCommandsEnabled: boolean): ParsingResult;
export declare function parseParameters(query: string, consoleCommandsEnabled: boolean): string[];
export declare function getMethodName(ctx: ProcedureNameContext | FunctionNameContext): string;
type CypherCmd = {
    type: 'cypher';
    query: string;
};
type RuleTokens = {
    start: Token;
    stop: Token;
};
export type ParsedCypherCmd = CypherCmd & RuleTokens;
export type ParsedCommandNoPosition = {
    type: 'cypher';
    statement: string;
} | {
    type: 'use';
    database?: string;
} | {
    type: 'clear';
} | {
    type: 'history';
} | {
    type: 'set-parameters';
    parameters: {
        name: string;
        expression: string;
    }[];
} | {
    type: 'list-parameters';
} | {
    type: 'clear-parameters';
} | {
    type: 'connect';
} | {
    type: 'disconnect';
} | {
    type: 'server';
    operation: string;
} | {
    type: 'welcome';
} | {
    type: 'parse-error';
} | {
    type: 'sysinfo';
} | {
    type: 'style';
    operation?: 'reset';
} | {
    type: 'play';
} | {
    type: 'access-mode';
    operation?: string;
};
export type ParsedCommand = ParsedCommandNoPosition & RuleTokens;
declare class ParserWrapper {
    parsingResult?: ParsingResult;
    parse(query: string, consoleCommandsEnabled?: boolean): ParsingResult;
    clearCache(): void;
}
export declare const parserWrapper: ParserWrapper;
export {};
