/** * Copyright (c) 2017-2022 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose * @author Panagiotis Tourlas * @author Koya Sakuma * * Adapted from MolQL project */ import * as P from '../../mol-util/monadic-parser.js'; import { Expression } from '../language/expression.js'; import { KeywordDict, PropertyDict, FunctionDict, OperatorList } from './types.js'; import { escapeRegExp } from '../../mol-util/string.js'; export { escapeRegExp }; export declare function prefix(opParser: P.MonadicParser, nextParser: P.MonadicParser, mapFn: any): P.MonadicParser; export declare function postfix(opParser: P.MonadicParser, nextParser: P.MonadicParser, mapFn: any): any; export declare function binaryRight(opParser: P.MonadicParser, nextParser: P.MonadicParser, mapFn: any): P.MonadicParser; export declare function binaryLeft(opParser: P.MonadicParser, nextParser: P.MonadicParser, mapFn: any): any; /** * combine operators of decreasing binding strength */ export declare function combineOperators(opList: any[], rule: P.MonadicParser): any; export declare function infixOp(re: RegExp, group?: number): P.MonadicParser; export declare function prefixOp(re: RegExp, group?: number): P.MonadicParser; export declare function postfixOp(re: RegExp, group?: number): P.MonadicParser; export declare function ofOp(name: string, short?: string): P.MonadicParser; export declare function makeError(msg: string): () => never; export declare function andExpr(selections: any[]): any; export declare function orExpr(selections: any[]): any; export declare function testExpr(property: any, args: any): Expression; export declare function invertExpr(selection: Expression): Expression; export declare function strLenSortFn(a: string, b: string): 1 | -1; export declare function getPropertyRules(properties: PropertyDict): { [name: string]: P.MonadicParser; }; export declare function getNamedPropertyRules(properties: PropertyDict): P.MonadicParser[]; export declare function getKeywordRules(keywords: KeywordDict): P.MonadicParser[]; export declare function getFunctionRules(functions: FunctionDict, argRule: P.MonadicParser): P.MonadicParser[]; export declare function getPropertyNameRules(properties: PropertyDict, lookahead: RegExp): P.MonadicParser[]; export declare function getReservedWords(properties: PropertyDict, keywords: KeywordDict, operators: OperatorList, functions?: FunctionDict): string[]; export declare function atomNameSet(ids: string[]): Expression; export declare function asAtoms(e: Expression): Expression; export declare function wrapValue(property: any, value: any, sstrucDict?: any): any; export declare function testLevel(property: any): "entity-test" | "chain-test" | "residue-test" | "atom-test"; export declare function valuesTest(property: any, values: any[]): Expression | undefined; export declare function resnameExpr(resnameList: string[]): Expression;