net.akehurst.language-agl-processor
Version:
7,195 lines • 395 kB
TypeScript
type Nullable<T> = T | null | undefined
export declare interface KtList<E> /* extends Collection<E> */ {
asJsReadonlyArrayView(): ReadonlyArray<E>;
readonly __doNotUseOrImplementIt: {
readonly "kotlin.collections.KtList": unique symbol;
};
}
export declare const KtList: {
getInstance(): {
fromJsArray<E>(array: ReadonlyArray<E>): KtList<E>;
};
};
export declare interface KtMutableList<E> extends KtList<E>/*, MutableCollection<E> */ {
asJsArrayView(): Array<E>;
readonly __doNotUseOrImplementIt: {
readonly "kotlin.collections.KtMutableList": unique symbol;
} & KtList<E>["__doNotUseOrImplementIt"];
}
export declare const KtMutableList: {
getInstance(): {
fromJsArray<E>(array: ReadonlyArray<E>): KtMutableList<E>;
};
};
export declare interface KtMutableMap<K, V> extends KtMap<K, V> {
asJsMapView(): Map<K, V>;
readonly __doNotUseOrImplementIt: {
readonly "kotlin.collections.KtMutableMap": unique symbol;
} & KtMap<K, V>["__doNotUseOrImplementIt"];
}
export declare const KtMutableMap: {
getInstance(): {
fromJsMap<K, V>(map: ReadonlyMap<K, V>): KtMutableMap<K, V>;
};
};
export declare interface KtMap<K, V> {
asJsReadonlyMapView(): ReadonlyMap<K, V>;
readonly __doNotUseOrImplementIt: {
readonly "kotlin.collections.KtMap": unique symbol;
};
}
export declare const KtMap: {
getInstance(): {
fromJsMap<K, V>(map: ReadonlyMap<K, V>): KtMap<K, V>;
};
};
export declare interface KtMutableSet<E> extends KtSet<E>/*, MutableCollection<E> */ {
asJsSetView(): Set<E>;
readonly __doNotUseOrImplementIt: {
readonly "kotlin.collections.KtMutableSet": unique symbol;
} & KtSet<E>["__doNotUseOrImplementIt"];
}
export declare const KtMutableSet: {
getInstance(): {
fromJsSet<E>(set: ReadonlySet<E>): KtMutableSet<E>;
};
};
export declare interface KtSet<E> /* extends Collection<E> */ {
asJsReadonlySetView(): ReadonlySet<E>;
readonly __doNotUseOrImplementIt: {
readonly "kotlin.collections.KtSet": unique symbol;
};
}
export declare const KtSet: {
getInstance(): {
fromJsSet<E>(set: ReadonlySet<E>): KtSet<E>;
};
};
export declare const BuildConfig: {
getInstance(): {
get version(): string;
get buildStamp(): string;
get buildDate(): string;
get buildTime(): string;
};
};
export declare function regexMatcher(pattern: string): RegexMatcher;
export declare class RegexValueProvider {
constructor(pattern: string, anyChar: any/* Char */);
get anyChar(): any/* Char */;
get matcher(): RegexMatcher;
provide(): string;
static get Companion(): {
get PRINTABLE_ASCII(): KtList<any/* Char */>;
};
}
export declare abstract class RegexEngineKind {
private constructor();
static get PLATFORM(): RegexEngineKind & {
get name(): "PLATFORM";
get ordinal(): 0;
};
static get AGL(): RegexEngineKind & {
get name(): "AGL";
get ordinal(): 1;
};
get name(): "PLATFORM" | "AGL";
get ordinal(): 0 | 1;
static values(): Array<RegexEngineKind>;
static valueOf(value: string): RegexEngineKind;
}
export declare interface RegexMatcher {
match(text: any/* CharSequence */, startPosition?: number): Nullable<MatchResult>;
matchAt(text: string, atPosition: number): Nullable<MatchResult>;
matchesAt(text: string, atPosition: number): boolean;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.regex.api.RegexMatcher": unique symbol;
};
}
export declare interface Regex {
matchesAt(text: string, atPosition: number): boolean;
matchAt(text: string, atPosition: number): Nullable<MatchResult>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.regex.api.Regex": unique symbol;
};
}
export declare interface RegexEngine {
readonly kind: RegexEngineKind;
createFor(pattern: string): Regex;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.regex.api.RegexEngine": unique symbol;
};
}
export declare interface MatchResult {
readonly matchedText: string;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.regex.api.MatchResult": unique symbol;
};
}
export declare class RegexPlatform implements Regex {
constructor(value: any/* Regex */);
get value(): any/* Regex */;
matchAt(text: string, atPosition: number): Nullable<MatchResult>;
matchesAt(text: string, atPosition: number): boolean;
copy(value?: any/* Regex */): RegexPlatform;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: Regex["__doNotUseOrImplementIt"];
}
export declare class RegexAgl implements Regex {
constructor(value: RegexMatcher);
get value(): RegexMatcher;
matchAt(text: string, atPosition: number): Nullable<RegexMatcher.MatchResultAgl>;
matchesAt(text: string, atPosition: number): boolean;
copy(value?: RegexMatcher): RegexAgl;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: Regex["__doNotUseOrImplementIt"];
}
export declare const RegexEnginePlatform: {
getInstance(): {
get kind(): RegexEngineKind;
createFor(pattern: string): Regex;
readonly __doNotUseOrImplementIt: RegexEngine["__doNotUseOrImplementIt"];
} & RegexEngine;
};
export declare const RegexEngineAgl: {
getInstance(): {
get kind(): RegexEngineKind;
createFor(pattern: string): Regex;
readonly __doNotUseOrImplementIt: RegexEngine["__doNotUseOrImplementIt"];
} & RegexEngine;
};
export declare function cached<IN, OUT>(initializer: (p0: IN) => OUT): CachedValue<IN, OUT>;
export declare class CachedValue<IN, OUT> {
constructor(initializer: (p0: IN) => OUT);
get initializer(): (p0: IN) => OUT;
set initializer(value: (p0: IN) => OUT);
get(key: IN): Nullable<OUT>;
set(key: IN, value: OUT): void;
reset(key: IN): void;
resetAll(): void;
}
export declare interface MapNonNull<K, V> extends KtMap<K, V> {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.kotlinx.collections.MapNonNull": unique symbol;
} & KtMap<K, V>["__doNotUseOrImplementIt"];
}
export declare interface MutableMapNonNull<K, V> extends MapNonNull<K, V>, KtMutableMap<K, V> {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.kotlinx.collections.MutableMapNonNull": unique symbol;
} & MapNonNull<K, V>["__doNotUseOrImplementIt"] & KtMutableMap<K, V>["__doNotUseOrImplementIt"];
}
export declare class MutableMapNonNullDefault<K, V> implements MutableMapNonNull<K, V>, KtMutableMap<K, V> {
constructor(map: KtMutableMap<K, V>);
asJsReadonlyMapView(): ReadonlyMap<K, V>;
asJsMapView(): Map<K, V>;
readonly __doNotUseOrImplementIt: MutableMapNonNull<K, V>["__doNotUseOrImplementIt"] & KtMutableMap<K, V>["__doNotUseOrImplementIt"];
}
export declare class Stack<T> {
constructor();
get elements(): KtList<T>;
clear(): void;
push(element: T): void;
pop(): T;
peek(): T;
}
export declare function transitveClosure<T>(_this_: KtSet<T>, _function: (p0: T) => KtSet<T>): KtSet<T>;
export declare class ClassReflection<T extends any> {
constructor(kclass: any/* KClass<T> */);
get kclass(): any/* KClass<T> */;
get isAbstract(): boolean;
get allPropertyNames(): KtList<string>;
get allMemberFunctions(): KtList<any/* KFunction<UnknownType *> */>;
get qualifiedName(): string;
get isEnum(): boolean;
get isObject(): boolean;
construct(constructorArgs: Array<Nullable<any>>): T;
isSupertypeOf<S extends any>(subtype: any/* KClass<S> */): boolean;
allPropertyNamesFor(self: T): KtList<string>;
isPropertyMutable(propertyName: string): boolean;
getProperty(self: T, propertyName: string): Nullable<any>;
setProperty(self: T, propertyName: string, value: Nullable<any>): void;
enumValues<E extends unknown/* Enum<E> */>(): KtList<E>;
enumValueOf<E extends unknown/* Enum<E> */>(name: string): Nullable<E>;
call(self: T, methodName: string, args: Array<Nullable<any>>): Nullable<any>;
static get Companion(): {
get metadata(): string;
};
}
export declare const BuildConfig: {
getInstance(): {
get version(): string;
get buildStamp(): string;
get buildDate(): string;
get buildTime(): string;
};
};
export declare const KotlinxReflectForModule: {
getInstance(): {
registerUsedClasses(): void;
};
};
export declare class AutomatonForMinimal {
constructor(runtimeRuleSet: RuntimeRuleSet, userGoalRule: RuntimeRule);
get runtimeRuleSet(): RuntimeRuleSet;
get userGoalRule(): RuntimeRule;
get number(): number;
get states(): any/* MutableCollection<StateForMinimal> */;
get goalRule(): RuntimeRule;
get startState(): StateForMinimal;
get usedRules(): KtSet<RuntimeRule>;
get usedTerminals(): KtSet<RuntimeRule>;
createState(rp: RulePositionRuntime): StateForMinimal;
usedAutomatonToString(withStates?: boolean): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
static get Companion(): {
get nextNumber(): number;
set nextNumber(value: number);
merge(trans: KtSet<TransitionForMinimal>): KtSet<TransitionForMinimal>;
};
}
export declare class StateForMinimal {
constructor(automaton: AutomatonForMinimal, number: number, rp: RulePositionRuntime);
get automaton(): AutomatonForMinimal;
get number(): number;
get rp(): RulePositionRuntime;
get outCompleteTransitionsByCtx(): KtMutableMap<any/* Pair<StateForMinimal, StateForMinimal> */, KtSet<TransitionForMinimal>>;
get outIncompleteTransitionsByCtx(): KtMutableMap<StateForMinimal, KtSet<TransitionForMinimal>>;
get allOutTransition(): KtSet<TransitionForMinimal>;
outCompleteTransForCtx(key: any/* Pair<StateForMinimal, StateForMinimal> */): Nullable<KtSet<TransitionForMinimal>>;
outIncompleteTransForCtx(ctx: StateForMinimal): Nullable<KtSet<TransitionForMinimal>>;
addOutCompleteTrans(key: any/* Pair<StateForMinimal, StateForMinimal> */, trans: KtSet<TransitionForMinimal>): void;
addOutIncompleteTrans(key: StateForMinimal, trans: KtSet<TransitionForMinimal>): void;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
}
export declare class TransitionForMinimal {
constructor(source: StateForMinimal, target: StateForMinimal, action: ParseAction, lh: LookaheadSetPart, up: LookaheadSetPart);
get source(): StateForMinimal;
get target(): StateForMinimal;
get action(): ParseAction;
get lh(): LookaheadSetPart;
get up(): LookaheadSetPart;
get context(): KtSet<StateForMinimal>;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
copy(source?: StateForMinimal, target?: StateForMinimal, action?: ParseAction, lh?: LookaheadSetPart, up?: LookaheadSetPart): TransitionForMinimal;
}
export declare class GSSNodeForMinimal {
constructor(state: StateForMinimal, rlh: LookaheadSetPart, sp: number, nip: number);
get state(): StateForMinimal;
get rlh(): LookaheadSetPart;
get sp(): number;
get nip(): number;
get nibs(): number;
set nibs(value: number);
get isGoal(): boolean;
get isComplete(): boolean;
get isEmptyMatch(): boolean;
copy(state?: StateForMinimal, rlh?: LookaheadSetPart, sp?: number, nip?: number): GSSNodeForMinimal;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare class CompleteNodeForMinimal implements SpptDataNode {
constructor(rule: RuntimeRule, startPosition: number, nextInputPosition: number, nextInputNoSkip: number, option: any/* OptionNum */, dynamicPriority: KtList<number>);
get rule(): RuntimeRule;
get startPosition(): number;
get nextInputPosition(): number;
get nextInputNoSkip(): number;
get option(): any/* OptionNum */;
get dynamicPriority(): KtList<number>;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: SpptDataNode["__doNotUseOrImplementIt"];
}
export declare class MinimalParser {
private constructor();
get automaton(): AutomatonForMinimal;
get isSkip(): boolean;
get skipAutomaton(): Nullable<AutomatonForMinimal>;
get ss(): StateForMinimal;
get sppf(): TreeDataGrowing<GSSNodeForMinimal, CompleteNodeForMinimal>;
set sppf(value: TreeDataGrowing<GSSNodeForMinimal, CompleteNodeForMinimal>);
get gss(): GraphStructuredStack<GSSNodeForMinimal>;
get skipTerms(): KtSet<RuntimeRule>;
get skipParser(): Nullable<MinimalParser>;
get embedded(): KtMutableMap<any/* Pair<RuntimeRuleSet, RuntimeRule> */, MinimalParser>;
get sentence(): Nullable<Sentence>;
set sentence(value: Nullable<Sentence>);
get scanner(): ScannerOnDemand;
parse(sentenceText: string): TreeData;
reset(): void;
clearCache(): void;
cachePossibleContext(rp: RulePositionRuntime, ctx: RulePositionRuntime): void;
cacheFirstTerminalInContext(ctx: RulePositionRuntime, rp: RulePositionRuntime, fti: FirstTerminalInfo): void;
cacheParentInContext(ctx: RulePositionRuntime, cr: RuntimeRule, pn: KtSet<ParentNext>): void;
static get Companion(): {
get TRACE(): boolean;
parser(goalRuleName: string, runtimeRuleSet: RuntimeRuleSet): MinimalParser;
setFirstChildForParent(_this_: TreeDataGrowing<GSSNodeForMinimal, CompleteNodeForMinimal>, parent: GSSNodeForMinimal, child: CompleteNodeForMinimal): void;
};
}
export declare abstract class AutomatonKind {
private constructor();
static get LOOKAHEAD_NONE(): AutomatonKind & {
get name(): "LOOKAHEAD_NONE";
get ordinal(): 0;
};
static get LOOKAHEAD_SIMPLE(): AutomatonKind & {
get name(): "LOOKAHEAD_SIMPLE";
get ordinal(): 1;
};
static get LOOKAHEAD_1(): AutomatonKind & {
get name(): "LOOKAHEAD_1";
get ordinal(): 2;
};
get name(): "LOOKAHEAD_NONE" | "LOOKAHEAD_SIMPLE" | "LOOKAHEAD_1";
get ordinal(): 0 | 1 | 2;
static values(): Array<AutomatonKind>;
static valueOf(value: string): AutomatonKind;
}
export declare interface Automaton {
asString(withStates?: boolean): string;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.automaton.api.Automaton": unique symbol;
};
}
export declare abstract class ParseAction {
private constructor();
static get HEIGHT(): ParseAction & {
get name(): "HEIGHT";
get ordinal(): 0;
};
static get GRAFT(): ParseAction & {
get name(): "GRAFT";
get ordinal(): 1;
};
static get WIDTH(): ParseAction & {
get name(): "WIDTH";
get ordinal(): 2;
};
static get GOAL(): ParseAction & {
get name(): "GOAL";
get ordinal(): 3;
};
static get EMBED(): ParseAction & {
get name(): "EMBED";
get ordinal(): 4;
};
get name(): "HEIGHT" | "GRAFT" | "WIDTH" | "GOAL" | "EMBED";
get ordinal(): 0 | 1 | 2 | 3 | 4;
static values(): Array<ParseAction>;
static valueOf(value: string): ParseAction;
}
export declare interface TransitionBuilder {
ctx(stateNumbers: Int32Array): void;
source(stateNumber: number): void;
target(stateNumber: number): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.automaton.api.TransitionBuilder": unique symbol;
};
}
export declare function aut(rrs: RuleSet, automatonKind: AutomatonKind, userGoalRule: string, isSkip: boolean, init: (p0: any/* AutomatonBuilder */) => void): Automaton;
export declare class Lookahead {
constructor(guard: any/* LookaheadSet */, up: any/* LookaheadSet */);
get guard(): any/* LookaheadSet */;
get up(): any/* LookaheadSet */;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
static get Companion(): {
get EMPTY(): Lookahead;
merge(automaton: ParserStateSet, initial: KtSet<Lookahead>): KtSet<Lookahead>;
};
}
export declare class ParserState {
constructor(number: any/* StateNumber */, rulePositions: KtList<RulePositionRuntime>, stateSet: ParserStateSet);
get number(): any/* StateNumber */;
get rulePositions(): KtList<RulePositionRuntime>;
get stateSet(): ParserStateSet;
get outTransitions(): TransitionCache;
get runtimeRules(): KtList<RuntimeRule>;
get runtimeRulesAsSet(): KtSet<RuntimeRule>;
get optionList(): KtList<any/* OptionNum */>;
get priorityList(): KtList<number>;
get isChoice(): boolean;
get isOptional(): boolean;
get isList(): boolean;
get firstRule(): RuntimeRule;
get isLeaf(): boolean;
get isAtEnd(): boolean;
get isNotAtEnd(): boolean;
get isGoal(): boolean;
transitionsGoal(previous: ParserState): KtList<Transition>;
transitionsInComplete(previous: ParserState): KtList<Transition>;
transitionsComplete(previous: ParserState, prevPrev: ParserState): KtList<Transition>;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
static get Companion(): {
lhs(_this_: LookaheadSetPart, stateSet: ParserStateSet): any/* LookaheadSet */;
};
}
export declare class ParserStateSet implements Automaton {
constructor(number: number, runtimeRuleSet: RuntimeRuleSet, userGoalRule: RuntimeRule, isSkip: boolean, automatonKind: AutomatonKind, preBuilt: boolean);
get number(): number;
get runtimeRuleSet(): RuntimeRuleSet;
get userGoalRule(): RuntimeRule;
get isSkip(): boolean;
get automatonKind(): AutomatonKind;
get preBuilt(): boolean;
set preBuilt(value: boolean);
get usedRules(): KtSet<RuntimeRule>;
get usedTerminalRules(): KtSet<RuntimeRule>;
get usedNonTerminalRules(): KtSet<RuntimeRule>;
get firstTerminals(): KtSet<RuntimeRule>;
get embeddedRuntimeRuleSet(): KtSet<RuntimeRuleSet>;
get allBuiltStates(): KtList<ParserState>;
get allBuiltTransitions(): KtSet<Transition>;
get goalRule(): RuntimeRule;
get startRulePosition(): RulePositionRuntime;
get finishRulePosition(): RulePositionRuntime;
get startState(): ParserState;
get finishState(): ParserState;
precedenceRulesFor(sourceState: ParserState): Nullable<RuntimePreferenceRule>;
build(): ParserStateSet;
hashCode(): number;
equals(other: Nullable<any>): boolean;
asString(withStates?: boolean): string;
usedAutomatonToString(withStates?: boolean): string;
toString(): string;
readonly __doNotUseOrImplementIt: Automaton["__doNotUseOrImplementIt"];
}
export declare interface RuntimeGuard {
execute(numNonSkipChildren: number): boolean;
expectedWhenFailed(numNonSkipChildren: number): KtSet<RuntimeRule>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.automaton.leftcorner.RuntimeGuard": unique symbol;
};
}
export declare class Transition {
constructor(from: ParserState, to: ParserState, action: ParseAction, lookahead: KtSet<Lookahead>);
get from(): ParserState;
get to(): ParserState;
get action(): ParseAction;
get lookahead(): KtSet<Lookahead>;
get context(): KtSet<TransitionPrevInfoKey>;
get runtimeGuard(): RuntimeGuard;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
}
export declare namespace Transition {
abstract class Companion extends _objects_.net$akehurst$language$automaton$leftcorner$Transition$Companion {
private constructor();
get DefaultRuntimeGuard(): {
execute(numNonSkipChildren: number): boolean;
expectedWhenFailed(numNonSkipChildren: number): KtSet<RuntimeRule>;
toString(): string;
readonly __doNotUseOrImplementIt: RuntimeGuard["__doNotUseOrImplementIt"];
} & RuntimeGuard;
}
namespace Companion {
class ToEndMultiGraftRuntimeGuard implements RuntimeGuard {
constructor(trans: Transition);
get trans(): Transition;
get rhs(): RuntimeRuleRhsListSimple;
get min(): number;
get max(): number;
execute(numNonSkipChildren: number): boolean;
expectedWhenFailed(numNonSkipChildren: number): KtSet<RuntimeRule>;
toString(): string;
readonly __doNotUseOrImplementIt: RuntimeGuard["__doNotUseOrImplementIt"];
}
class ToItemMultiGraftRuntimeGuard implements RuntimeGuard {
constructor(trans: Transition);
get trans(): Transition;
get rhs(): RuntimeRuleRhsListSimple;
get min(): number;
get max(): number;
execute(numNonSkipChildren: number): boolean;
expectedWhenFailed(numNonSkipChildren: number): KtSet<RuntimeRule>;
toString(): string;
readonly __doNotUseOrImplementIt: RuntimeGuard["__doNotUseOrImplementIt"];
}
class ToEndSListGraftRuntimeGuard implements RuntimeGuard {
constructor(trans: Transition);
get trans(): Transition;
get rhs(): RuntimeRuleRhsList;
get min(): number;
get max(): number;
execute(numNonSkipChildren: number): boolean;
expectedWhenFailed(numNonSkipChildren: number): KtSet<RuntimeRule>;
toString(): string;
readonly __doNotUseOrImplementIt: RuntimeGuard["__doNotUseOrImplementIt"];
}
class ToItemSListGraftRuntimeGuard implements RuntimeGuard {
constructor(trans: Transition);
get trans(): Transition;
get rhs(): RuntimeRuleRhsList;
get min(): number;
get max(): number;
execute(numNonSkipChildren: number): boolean;
expectedWhenFailed(numNonSkipChildren: number): KtSet<RuntimeRule>;
toString(): string;
readonly __doNotUseOrImplementIt: RuntimeGuard["__doNotUseOrImplementIt"];
}
class ToSeparatorSListGraftRuntimeGuard implements RuntimeGuard {
constructor(trans: Transition);
get trans(): Transition;
get rhs(): RuntimeRuleRhsList;
get min(): number;
get max(): number;
execute(numNonSkipChildren: number): boolean;
expectedWhenFailed(numNonSkipChildren: number): KtSet<RuntimeRule>;
toString(): string;
readonly __doNotUseOrImplementIt: RuntimeGuard["__doNotUseOrImplementIt"];
}
}
}
declare namespace _objects_ {
const net$akehurst$language$automaton$leftcorner$Transition$Companion: {
runtimeGuardFor(trans: Transition): RuntimeGuard;
} & {
new(): any;
};
}
export declare interface TransitionCache {
readonly allBuiltTransitions: KtSet<Transition>;
readonly allPrevious: KtSet<TransitionPrevInfoKey>;
createTransitionForComplete(previous: ParserState, prevPrev: ParserState, from: ParserState, action: ParseAction, to: ParserState, lookahead: KtSet<Lookahead>): void;
createTransitionForIncomplete(previous: ParserState, from: ParserState, action: ParseAction, to: ParserState, lookahead: KtSet<Lookahead>): void;
addTransitionForIncomplete(previous: ParserState, tr: Transition): Transition;
addTransitionForComplete(previous: ParserState, prevPrev: ParserState, tr: Transition): Transition;
findTransitionForCompleteByPrevious(previous: ParserState, prevPrev: ParserState): Nullable<KtList<Transition>>;
findTransitionForIncompleteByPrevious(previous: ParserState): Nullable<KtList<Transition>>;
findTransitionByKey(key: TransitionPrevInfoKey): Nullable<KtList<Transition>>;
previousFor(transition: Transition): KtList<TransitionPrevInfoKey>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.automaton.leftcorner.TransitionCache": unique symbol;
};
}
export declare interface TransitionPrevInfoKey {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.automaton.leftcorner.TransitionPrevInfoKey": unique symbol;
};
}
export declare class CompleteKey implements TransitionPrevInfoKey {
constructor(previous: ParserState, prevPrev: ParserState);
get previous(): ParserState;
get prevPrev(): ParserState;
toString(): string;
copy(previous?: ParserState, prevPrev?: ParserState): CompleteKey;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: TransitionPrevInfoKey["__doNotUseOrImplementIt"];
}
export declare class IncompleteKey implements TransitionPrevInfoKey {
constructor(previous: ParserState);
get previous(): ParserState;
toString(): string;
copy(previous?: ParserState): IncompleteKey;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: TransitionPrevInfoKey["__doNotUseOrImplementIt"];
}
export declare class TransitionCacheLC1 implements TransitionCache {
constructor();
get allBuiltTransitions(): KtSet<Transition>;
get allPrevious(): KtSet<TransitionPrevInfoKey>;
addTransitionForComplete(previous: ParserState, prevPrev: ParserState, tr: Transition): Transition;
addTransitionForIncomplete(previous: ParserState, tr: Transition): Transition;
findTransitionForCompleteByPrevious(previous: ParserState, prevPrev: ParserState): Nullable<KtList<Transition>>;
findTransitionForIncompleteByPrevious(previous: ParserState): Nullable<KtList<Transition>>;
findTransitionByKey(key: TransitionPrevInfoKey): Nullable<KtList<Transition>>;
previousFor(transition: Transition): KtList<TransitionPrevInfoKey>;
createTransitionForComplete(previous: ParserState, prevPrev: ParserState, from: ParserState, action: ParseAction, to: ParserState, lookahead: KtSet<Lookahead>): void;
createTransitionForIncomplete(previous: ParserState, from: ParserState, action: ParseAction, to: ParserState, lookahead: KtSet<Lookahead>): void;
readonly __doNotUseOrImplementIt: TransitionCache["__doNotUseOrImplementIt"];
static get Companion(): {
};
}
export declare class LookaheadSetPart {
constructor(includesRT: boolean, includesEOT: boolean, matchANY: boolean, content: KtSet<RuntimeRule>);
get includesRT(): boolean;
get includesEOT(): boolean;
get matchANY(): boolean;
get content(): KtSet<RuntimeRule>;
get regex(): any/* Regex */;
get fullContent(): KtSet<RuntimeRule>;
get isEmpty(): boolean;
get isNotEmpty(): boolean;
resolve(eotLookahead: LookaheadSetPart, runtimeLookahead: LookaheadSetPart): LookaheadSetPart;
intersect(lookahead: LookaheadSetPart): LookaheadSetPart;
union(lhs: LookaheadSetPart): LookaheadSetPart;
unionContent(additionalContent: KtSet<RuntimeRule>): LookaheadSetPart;
containsAll(other: LookaheadSetPart): boolean;
toString(): string;
copy(includesRT?: boolean, includesEOT?: boolean, matchANY?: boolean, content?: KtSet<RuntimeRule>): LookaheadSetPart;
hashCode(): number;
equals(other: Nullable<any>): boolean;
static get Companion(): {
get EMPTY(): LookaheadSetPart;
get RT(): LookaheadSetPart;
get ANY(): LookaheadSetPart;
get EOT(): LookaheadSetPart;
createFromRuntimeRules(fullContent: KtSet<RuntimeRule>): LookaheadSetPart;
unionAll(_this_: any/* Collection<LookaheadSetPart> */): LookaheadSetPart;
};
}
export declare class FirstTerminalInfo {
constructor(terminalRule: RuntimeRule, parentExpectedAt: LookaheadSetPart);
get terminalRule(): RuntimeRule;
get parentExpectedAt(): LookaheadSetPart;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
copy(terminalRule?: RuntimeRule, parentExpectedAt?: LookaheadSetPart): FirstTerminalInfo;
}
export declare class ParentNext {
constructor(firstPosition: boolean, rulePosition: RulePositionRuntime, expectedAt: LookaheadSetPart, parentExpectedAt: LookaheadSetPart);
get firstPosition(): boolean;
get rulePosition(): RulePositionRuntime;
get expectedAt(): LookaheadSetPart;
get parentExpectedAt(): LookaheadSetPart;
copy(firstPosition?: boolean, rulePosition?: RulePositionRuntime, expectedAt?: LookaheadSetPart, parentExpectedAt?: LookaheadSetPart): ParentNext;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare abstract class LanguageIssueKind {
private constructor();
static get ERROR(): LanguageIssueKind & {
get name(): "ERROR";
get ordinal(): 0;
};
static get WARNING(): LanguageIssueKind & {
get name(): "WARNING";
get ordinal(): 1;
};
static get INFORMATION(): LanguageIssueKind & {
get name(): "INFORMATION";
get ordinal(): 2;
};
get name(): "ERROR" | "WARNING" | "INFORMATION";
get ordinal(): 0 | 1 | 2;
static values(): Array<LanguageIssueKind>;
static valueOf(value: string): LanguageIssueKind;
}
export declare abstract class LanguageProcessorPhase {
private constructor();
static get GRAMMAR(): LanguageProcessorPhase & {
get name(): "GRAMMAR";
get ordinal(): 0;
};
static get SCAN(): LanguageProcessorPhase & {
get name(): "SCAN";
get ordinal(): 1;
};
static get PARSE(): LanguageProcessorPhase & {
get name(): "PARSE";
get ordinal(): 2;
};
static get SYNTAX_ANALYSIS(): LanguageProcessorPhase & {
get name(): "SYNTAX_ANALYSIS";
get ordinal(): 3;
};
static get SEMANTIC_ANALYSIS(): LanguageProcessorPhase & {
get name(): "SEMANTIC_ANALYSIS";
get ordinal(): 4;
};
static get INTERPRET(): LanguageProcessorPhase & {
get name(): "INTERPRET";
get ordinal(): 5;
};
static get GENERATE(): LanguageProcessorPhase & {
get name(): "GENERATE";
get ordinal(): 6;
};
static get FORMAT(): LanguageProcessorPhase & {
get name(): "FORMAT";
get ordinal(): 7;
};
static get ALL(): LanguageProcessorPhase & {
get name(): "ALL";
get ordinal(): 8;
};
get name(): "GRAMMAR" | "SCAN" | "PARSE" | "SYNTAX_ANALYSIS" | "SEMANTIC_ANALYSIS" | "INTERPRET" | "GENERATE" | "FORMAT" | "ALL";
get ordinal(): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
static values(): Array<LanguageProcessorPhase>;
static valueOf(value: string): LanguageProcessorPhase;
}
export declare class LanguageIssue {
constructor(kind: LanguageIssueKind, phase: LanguageProcessorPhase, location: Nullable<InputLocation>, message: string, data?: Nullable<any>);
get kind(): LanguageIssueKind;
get phase(): LanguageProcessorPhase;
get location(): Nullable<InputLocation>;
get message(): string;
get data(): Nullable<any>;
copy(kind?: LanguageIssueKind, phase?: LanguageProcessorPhase, location?: Nullable<InputLocation>, message?: string, data?: Nullable<any>): LanguageIssue;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare interface IssueCollection<T extends any> /* extends Collection<T> */ {
readonly all: KtSet<T>;
readonly errors: KtList<T>;
readonly warnings: KtList<T>;
readonly informations: KtList<T>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.issues.api.IssueCollection": unique symbol;
};
}
export declare function plus(_this_: IssueCollection<LanguageIssue>, other: IssueCollection<LanguageIssue>): IssueHolder;
export declare class IssueHolder implements IssueCollection<LanguageIssue> {
constructor(defaultPhase?: LanguageProcessorPhase, issues?: any/* Iterable<LanguageIssue> */);
get all(): KtSet<LanguageIssue>;
get errors(): KtList<LanguageIssue>;
get warnings(): KtList<LanguageIssue>;
get informations(): KtList<LanguageIssue>;
clear(): void;
raise(kind: LanguageIssueKind, phase: LanguageProcessorPhase, location: Nullable<InputLocation>, message: string, data?: Nullable<any>): void;
info(location: Nullable<InputLocation>, message: string, data?: Nullable<any>): void;
warn(location: Nullable<InputLocation>, message: string, data?: Nullable<any>): void;
error(location: Nullable<InputLocation>, message: string, data?: Nullable<any>): void;
addAll(issues: any/* Iterable<LanguageIssue> */): void;
addAllFrom(other: IssueCollection<LanguageIssue>): void;
toString(): string;
readonly __doNotUseOrImplementIt: IssueCollection<LanguageIssue>["__doNotUseOrImplementIt"];
}
export declare const SentenceIdentityFunctionNull: {
getInstance(): {
invoke(): Nullable<any>;
readonly __doNotUseOrImplementIt: SentenceIdentityFunction["__doNotUseOrImplementIt"];
} & SentenceIdentityFunction;
};
export declare class ParseOptionsDefault implements ParseOptions {
constructor(enabled?: boolean, goalRuleName?: Nullable<string>, sentenceIdentity?: SentenceIdentityFunction, reportErrors?: boolean, reportGrammarAmbiguities?: boolean, cacheSkip?: boolean);
get enabled(): boolean;
set enabled(value: boolean);
get goalRuleName(): Nullable<string>;
set goalRuleName(value: Nullable<string>);
get sentenceIdentity(): SentenceIdentityFunction;
set sentenceIdentity(value: SentenceIdentityFunction);
get reportErrors(): boolean;
set reportErrors(value: boolean);
get reportGrammarAmbiguities(): boolean;
set reportGrammarAmbiguities(value: boolean);
get cacheSkip(): boolean;
set cacheSkip(value: boolean);
clone(): ParseOptionsDefault;
readonly __doNotUseOrImplementIt: ParseOptions["__doNotUseOrImplementIt"];
}
export declare class ParseResultDefault implements ParseResult {
constructor(sppt: Nullable<SharedPackedParseTree>, issues: IssueCollection<LanguageIssue>);
get sppt(): Nullable<SharedPackedParseTree>;
get issues(): IssueCollection<LanguageIssue>;
copy(sppt?: Nullable<SharedPackedParseTree>, issues?: IssueCollection<LanguageIssue>): ParseResultDefault;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: ParseResult["__doNotUseOrImplementIt"];
}
export declare class ParseFailureRuntime implements ParseFailure {
constructor(failedSpines: KtList<RuntimeSpine>);
get failedSpines(): KtList<RuntimeSpine>;
get expectedTerminals(): KtSet<Rule>;
get expected(): KtSet<string>;
message(sentence: Sentence, location: InputLocation): string;
copy(failedSpines?: KtList<RuntimeSpine>): ParseFailureRuntime;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: ParseFailure["__doNotUseOrImplementIt"];
}
export declare class ExpectedAtResultDefault implements ExpectedAtResult {
constructor(usedPosition: number, spines: KtSet<RuntimeSpine>);
get usedPosition(): number;
get spines(): KtSet<RuntimeSpine>;
copy(usedPosition?: number, spines?: KtSet<RuntimeSpine>): ExpectedAtResultDefault;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: ExpectedAtResult["__doNotUseOrImplementIt"];
}
export declare class LeftCornerParser implements Parser {
constructor(scanner: Scanner, ruleSet: RuleSet);
get scanner(): Scanner;
get automatonKind(): AutomatonKind;
get ruleSet(): RuleSet;
get runtimeDataIsEmpty(): boolean;
reset(): void;
interrupt(message: string): void;
buildFor(goalRuleName: string): void;
parseForGoal(goalRuleName: string, sentenceText: string): ParseResult;
parse(sentenceText: string, options: ParseOptions): ParseResult;
expectedAt(sentenceText: string, position: number, options: ParseOptions): ExpectedAtResult;
expectedTerminalsAt(sentenceText: string, position: number, options: ParseOptions): KtSet<Rule>;
readonly __doNotUseOrImplementIt: Parser["__doNotUseOrImplementIt"];
}
export declare interface RuleSet {
readonly nonSkipTerminals: KtList<Rule>;
readonly terminals: KtList<Rule>;
readonly embeddedTerminals: KtList<RuntimeRule>;
automatonFor(goalRuleName: string, automatonKind: AutomatonKind): Automaton;
usedAutomatonFor(goalRuleName: string): Automaton;
addPreBuiltFor(userGoalRuleName: string, automaton: Automaton): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.parser.api.RuleSet": unique symbol;
};
}
export declare interface Rule {
readonly tag: string;
readonly isSkip: boolean;
readonly isPseudo: boolean;
readonly isTerminal: boolean;
readonly isEndOfText: boolean;
readonly isEmptyTerminal: boolean;
readonly isEmptyListTerminal: boolean;
readonly isLiteral: boolean;
readonly isPattern: boolean;
readonly isEmbedded: boolean;
readonly isChoice: boolean;
readonly isChoiceAmbiguous: boolean;
readonly isList: boolean;
readonly isListSimple: boolean;
readonly isListSeparated: boolean;
readonly isOptional: boolean;
readonly isListOptional: boolean;
readonly rhsItems: KtList<KtList<Rule>>;
readonly unescapedTerminalValue: string;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.parser.api.Rule": unique symbol;
};
}
export declare interface PrefRule {
readonly contextRule: Rule;
readonly options: KtList<PrefOption>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.parser.api.PrefRule": unique symbol;
};
}
export declare abstract class Assoc {
private constructor();
static get NONE(): Assoc & {
get name(): "NONE";
get ordinal(): 0;
};
static get LEFT(): Assoc & {
get name(): "LEFT";
get ordinal(): 1;
};
static get RIGHT(): Assoc & {
get name(): "RIGHT";
get ordinal(): 2;
};
get name(): "NONE" | "LEFT" | "RIGHT";
get ordinal(): 0 | 1 | 2;
static values(): Array<Assoc>;
static valueOf(value: string): Assoc;
}
export declare interface PrefOption {
readonly precedence: number;
readonly spine: KtList<Rule>;
readonly option: any/* OptionNum */;
readonly operators: KtSet<Rule>;
readonly associativity: Assoc;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.parser.api.PrefOption": unique symbol;
};
}
export declare interface RulePosition {
readonly rule: Rule;
readonly option: any/* OptionNum */;
readonly position: number;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.parser.api.RulePosition": unique symbol;
};
}
export declare const RulePosition: {
getInstance(): {
get START_OF_RULE(): number;
get END_OF_RULE(): number;
get OPTION_NONE(): any/* OptionNum */;
get OPTION_OPTIONAL_ITEM(): any/* OptionNum */;
get OPTION_OPTIONAL_EMPTY(): any/* OptionNum */;
get OPTION_MULTI_ITEM(): any/* OptionNum */;
get OPTION_MULTI_EMPTY(): any/* OptionNum */;
get OPTION_SLIST_ITEM_OR_SEPERATOR(): any/* OptionNum */;
get OPTION_SLIST_EMPTY(): any/* OptionNum */;
get POSITION_MULIT_ITEM(): number;
get POSITION_SLIST_SEPARATOR(): number;
get POSITION_SLIST_ITEM(): number;
};
};
export declare interface RuntimeSpine {
readonly expectedNextTerminals: KtSet<Rule>;
readonly elements: KtList<RulePosition>;
readonly nextChildNumber: number;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.parser.api.RuntimeSpine": unique symbol;
};
}
export declare interface ExpectedAtResult {
readonly usedPosition: number;
readonly spines: KtSet<RuntimeSpine>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.parser.api.ExpectedAtResult": unique symbol;
};
}
export declare interface SentenceIdentityFunction {
invoke(): Nullable<any>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.parser.api.SentenceIdentityFunction": unique symbol;
};
}
export declare interface ParseOptions {
enabled: boolean;
goalRuleName: Nullable<string>;
sentenceIdentity: SentenceIdentityFunction;
reportErrors: boolean;
reportGrammarAmbiguities: boolean;
cacheSkip: boolean;
clone(): ParseOptions;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.parser.api.ParseOptions": unique symbol;
};
}
export declare interface ParseResult {
readonly sppt: Nullable<SharedPackedParseTree>;
readonly issues: IssueCollection<LanguageIssue>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.parser.api.ParseResult": unique symbol;
};
}
export declare class ParserTerminatedException /* extends RuntimeException */ {
constructor();
}
export declare interface Parser {
readonly ruleSet: RuleSet;
reset(): void;
interrupt(message: string): void;
buildFor(goalRuleName: string): void;
parseForGoal(goalRuleName: string, sentenceText: string): ParseResult;
parse(sentenceText: string, options: ParseOptions): ParseResult;
expectedAt(sentenceText: string, position: number, options: ParseOptions): ExpectedAtResult;
expectedTerminalsAt(sentenceText: string, position: number, options: ParseOptions): KtSet<Rule>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.parser.api.Parser": unique symbol;
};
}
export declare interface ParseFailure {
readonly failedSpines: KtList<RuntimeSpine>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.parser.api.ParseFailure": unique symbol;
};
}
export declare interface ConcatenationBuilder {
empty(): void;
emptyList(): void;
literal(value: string): void;
pattern(pattern: string): void;
ref(name: string): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.parser.api.ConcatenationBuilder": unique symbol;
};
}
export declare interface ChoiceBuilder {
concatenation(init: (p0: ConcatenationBuilder) => void): void;
ref(ruleName: string): void;
literal(value: string): void;
pattern(pattern: string): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.parser.api.ChoiceBuilder": unique symbol;
};
}
export declare interface PrecedenceBuilder {
left(spine: KtList<string>, operatorRuleNames: KtSet<string>): void;
leftOption(spine: KtList<string>, option: any/* OptionNum */, operatorRuleNames: KtSet<string>): void;
right(spine: KtList<string>, operatorRuleNames: KtSet<string>): void;
rightOption(spine: KtList<string>, option: any/* OptionNum */, operatorRuleNames: KtSet<string>): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.parser.api.PrecedenceBuilder": unique symbol;
};
}
export declare const IssueMessage: {
getInstance(): {
get PARSER_WONT_STOP(): string;
};
};
export declare class GraphStructuredStack<E> {
constructor(_growingHeadHeap: any/* BinaryHeap<E, E> */, previous: KtMutableMap<E, KtMutableSet<E>>, count: KtMutableMap<E, number>);
get _growingHeadHeap(): any/* BinaryHeap<E, E> */;
static new_net_akehurst_language_agl_runtime_graph_GraphStructuredStack<E>(headHeap: any/* BinaryHeap<E, E> */): GraphStructuredStack<E>;
get roots(): KtList<E>;
get isEmpty(): boolean;
get numberOfHeads(): number;
get hasNextHead(): boolean;
get peekFirstHead(): Nullable<E>;
get heads(): KtList<E>;
extractRoot(): E;
clear(): void;
root(head: E): boolean;
pushTriple(cur: E, prev: Nullable<E>, rhd: Nullable<E>): void;
push(currentHead: E, nextHead: E): void;
contains(head: E): boolean;
peekPrevious(head: E): KtSet<E>;
pop(head: E): KtSet<E>;
snapshotFor(head: E): Nullable<KtMap<E, KtSet<E>>>;
dropStack(head: E, ifDropped: (p0: E) => void): boolean;
toString(): string;
}
export declare class RuleOption {
constructor(runtimeRule: RuntimeRule, option: any/* OptionNum */);
get runtimeRule(): RuntimeRule;
get option(): any/* OptionNum */;
get isGoal(): boolean;
toString(): string;
copy(runtimeRule?: RuntimeRule, option?: any/* OptionNum */): RuleOption;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare class RulePositionRuntime implements RulePosition {
constructor(rule: RuntimeRule, option: any/* OptionNum */, position: number);
get rule(): RuntimeRule;
get option(): any/* OptionNum */;
get position(): number;
get identity(): RuleOption;
get isAtStart(): boolean;
get isAtEnd(): boolean;
get isGoal(): boolean;
get isTerminal(): boolean;
get isEmbedded(): boolean;
get items(): KtSet<RuntimeRule>;
atEnd(): RulePositionRuntime;
next(): KtSet<RulePositionRuntime>;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: RulePosition["__doNotUseOrImplementIt"];
}
export declare class RuntimePreferenceRule implements PrefRule {
constructor(contextRule: RuntimeRule, options: KtList<RuntimePreferenceRule.RuntimePreferenceOption>);
get contextRule(): RuntimeRule;
get options(): KtList<RuntimePreferenceRule.RuntimePreferenceOption>;
readonly __doNotUseOrImplementIt: PrefRule["__doNotUseOrImplementIt"];
}
export declare namespace RuntimePreferenceRule {
class RuntimePreferenceOption implements PrefOption {
constructor(precedence: number, spine: KtList<RuntimeRule>, option: any/* OptionNum */, operators: KtSet<RuntimeRule>, associativity: Assoc);
get precedence(): number;
get spine(): KtList<RuntimeRule>;
get option(): any/* OptionNum */;
get operators(): KtSet<RuntimeRule>;
get associativity(): Assoc;
copy(precedence?: number, spine?: KtList<RuntimeRule>, option?: any/* OptionNum */, operators?: KtSet<RuntimeRule>, associativity?: Assoc): RuntimePreferenceRule.RuntimePreferenceOption;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: PrefOption["__doNotUseOrImplementIt"];
}
}
export declare class RuntimeRule implements Rule {
constructor(runtimeRuleSetNumber: number, ruleNumber: number, name: Nullable<string>, isSkip: boolean, isPseudo: boolean);
get runtimeRuleSetNumber(): number;
get ruleNumber(): number;
get name(): Nullable<string>;
get isSkip(): boolean;
get isPseudo(): boolean;
setRhs(value: RuntimeRuleRhs): void;
get rhs(): RuntimeRuleRhs;
get isExplicitlyNamed(): boolean;
get tag(): string;
get isGoal(): boolean;
get isEndOfText(): boolean;
get isEmptyTerminal(): boolean;
get isEmptyListTerminal(): boolean;
get isEmbedded(): boolean;
get isPattern(): boolean;
get isLiteral(): boolean;
get isTerminal(): boolean;
get isNonTerminal(): boolean;
get isChoice(): boolean;
get isChoiceAmbiguous(): boolean;
get isOptional(): boolean;
get isListOptional(): boolean;
get isList(): boolean;
get isListSimple(): boolean;
get isListSeparated(): boolean;
get rhsItems(): KtList<KtList<Rule>>;
get unescapedTerminalValue(): string;
get asString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: Rule["__doNotUseOrImplementIt"];
}
export declare abstract class RuntimeRuleKind {
private constructor();
static get GOAL(): RuntimeRuleKind & {
get name(): "GOAL";
get ordinal(): 0;
};
static get NON_TERMINAL(): RuntimeRuleKind & {
get name(): "NON_TERMINAL";
get ordinal(): 1;
};
static get TERMINAL(): RuntimeRuleKind & {
get name(): "TERMINAL";
get ordinal(): 2;
};
static get EMBEDDED(): RuntimeRuleKind & {
get name(): "EMBEDDED";
get ordinal(): 3;
};
get name(): "GOAL" | "NON_TERMINAL" | "TERMINAL" | "EMBEDDED";
get ordinal(): 0 | 1 | 2 | 3;
static values(): Array<RuntimeRuleKind>;
static valueOf(value: string): RuntimeRuleKind;
}
export declare abstract class RuntimeRuleRhsItemsKind {
private constructor();
static get EMPTY(): RuntimeRuleRhsItemsKind & {
get name(): "EMPTY";
get ordinal(): 0;
};
static get CONCATENATION(): RuntimeRuleRhsItemsKind & {
get name(): "CONCATENATION";
get ordinal(): 1;
};
static get CHOICE(): RuntimeRuleRhsItemsKind & {
get name(): "CHOICE";
get ordinal(): 2;
};
static get LIST(): RuntimeRuleRhsItemsKind & {
get name(): "LIST";
get ordinal(): 3;
};
get name(): "EMPTY" | "CONCATENATION" | "CHOICE" | "LIST";
get ordinal(): 0 | 1 | 2 | 3;
static values(): Array<RuntimeRuleRhsItemsKind>;
static valueOf(value: string): RuntimeRuleRhsItemsKind;
}
export declare abstract class RuntimeRuleListKind {
private constructor();
static get MULTI(): RuntimeRuleListKind & {
get name(): "MULTI";
get ordinal(): 0;
};
static get SEPARATED_LIST(): RuntimeRuleListKind & {
get name(): "SEPARATED_LIST";
get ordinal(): 1;
};
static get LEFT_ASSOCIATIVE_LIST(): RuntimeRuleListKind & {
get name(): "LEFT_ASSOCIATIVE_LIST";
get ordinal(): 2;
};
static get RIGHT_ASSOCIATIVE_LIST(): RuntimeRuleListKind & {
get name(): "RIGHT_ASSOCIATIVE_LIST";
get ordinal(): 3;
};
static get UNORDERED(): RuntimeRuleListKind & {
get name(): "UNORDERED";
get ordinal(): 4;
};
get name(): "MULTI" | "SEPARATED_LIST" | "LEFT_ASSOCIATIVE_LIST" | "RIGHT_ASSOCIATIVE_LIST" | "UNORDERED";
get ordinal(): 0 | 1 | 2 | 3 | 4;
static values(): Array<RuntimeRuleListKind>;
static valueOf(value: string): RuntimeRuleListKind;
}
export declare abstract class RuntimeRuleChoiceKind {
private constructor();
static get NONE(): RuntimeRuleChoiceKind & {
get name(): "NONE";
get ordinal(): 0;
};
static get AMBIGUOUS(): RuntimeRuleChoiceKind & {
get name(): "AMBIGUOUS";
get ordinal(): 1;
};
static get LONGEST_PRIORITY(): RuntimeRuleChoiceKind & {
get name(): "LONGEST_PRIORITY";
get ordinal(): 2;
};
static get PRIORITY_LONGEST(): RuntimeRuleChoiceKind & {
get name(): "PRIORITY_LONGEST";
get ordinal(): 3;
};
get name(): "NONE" | "AMBIGUOUS" | "LONGEST_PRIORITY" | "PRIORITY_LONGEST";
get ordinal(): 0 | 1 | 2 | 3;
static values(): Array<RuntimeRuleChoiceKind>;
static valueOf(value: string): RuntimeRuleChoiceKind;
}
export declare abstract class RuntimeRuleRhs {
protected constructor(rule: RuntimeRule);
get rule(): RuntimeRule;
abstract get rhsItems(): KtList<KtList<Rule>>;
abstract get rulePositionsNotAtStart(): KtSet<RulePositionRuntime>;
abstract get rulePositionsAtStart(): KtSet<RulePositionRuntime>;
get asString(): string;
abstract rhsItemsAt(option: any/* OptionNum */, position: number): KtSet<RuntimeRule>;
abstract nextRulePositions(current: RulePositionRuntime): KtSet<RulePositionRuntime>;
abstract clone(clonedRules: KtMap<string, RuntimeRule>): RuntimeRuleRhs;
}
export declare abstract class RuntimeRuleRhsTerminal extends RuntimeRuleRhs {
protected constructor(rule: RuntimeRule);
abstract get matchable(): Nullable<Matchable>;
get rhsItems(): KtList<KtList<Rule>>;
get rulePositionsNotAtStart(): KtSet<RulePositionRuntime>;
get rulePositionsAtStart(): KtSet<RulePositionRuntime>;
rhsItemsAt(option: any/* OptionNum */, position: number): KtSet<RuntimeRule>;
nextRulePositions(current: RulePositionRuntime): KtSet<RulePositionRuntime>;
}
export declare class RuntimeRuleRhsEmpty extends RuntimeRuleRhsTerminal {
constructor(rule: RuntimeRule);
get matchable(): Nullable<never>;
clone(clonedRules: KtMap<string, RuntimeRule>): RuntimeRuleRhs;
toString(): string;
}
export declare class RuntimeRuleRhsEmptyList extends RuntimeRuleRhsTerminal {
constructor(rule: RuntimeRule);
get matchable(): Nullable<never>;
clone(clonedRules: KtMap<string, RuntimeRule>): RuntimeRuleRhs;
toString(): string;
}
export declare class RuntimeRuleRhsCommonTerminal extends RuntimeRuleRhsTerminal {
constructor(rule: RuntimeRule);
get matchable(): Matchable;
clone(clonedRules: KtMap<string, RuntimeRule>): RuntimeRuleRhs;
toString(): string;
}
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare class RuntimeRuleRhsPattern extends RuntimeRuleRhsTerminal {
constructor(rule: RuntimeRule, patternUnescaped: string);
get patternUnescaped(): string;
get matchable(): Matchable;
clone(clonedRules: KtMap<string, RuntimeRule>): RuntimeRuleRhs;
toString(): string;
static get Companion(): {
unescape(literalEscaped: string): string;
};
}
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare class RuntimeRuleRhsLiteral extends RuntimeRuleRhsTerminal {
constructor(rule: RuntimeRule, literalUnescaped: string);
get literalUnescaped(): string;
get matchable(): Matchable;
clone(clonedRules: KtMap<string, RuntimeRule>): RuntimeRuleRhs;
toString(): string;
static get Companion(): {
unescape(literalEscaped: string): string;
};
}
export declare class RuntimeRuleRhsEmbedded extends RuntimeRuleRhsTerminal {
constructor(rule: RuntimeRule, embeddedRuntimeRuleSet: RuntimeRuleSet, embeddedStartRule: RuntimeRule);
get embeddedRuntimeRuleSet(): RuntimeRuleSet;
get embeddedStartRule(): RuntimeRule;
get matchable(): Nullable<never>;
clone(clonedRules: KtMap<string, RuntimeRule>): RuntimeRuleRhs;
get asString(): string;
toString(): string;
}
export declare abstract class RuntimeRuleRhsNonTerminal extends RuntimeRuleRhs {
protected constructor(rule: RuntimeRule);
}
export declare class RuntimeRuleRhsGoal extends RuntimeRuleRhsNonTerminal {
constructor(rule: RuntimeRule, userGoalRuleItem: RuntimeRule);
get userGoalRuleItem(): RuntimeRule;
get rhsItems(): KtList<KtList<RuntimeRule>>;
get rulePositionsNotAtStart(): KtSet<RulePositionRuntime>;
get rulePositionsAtStart(): KtSet<RulePositionRuntime>;
rhsItemsAt(option: any/* OptionNum */, position: number): KtSet<RuntimeRule>;
nextRulePositions(current: RulePositionRuntime): KtSet<RulePositionRuntime>;
clone(clonedRules: KtMap<string, RuntimeRule>): RuntimeRuleRhs;
toString(): string;
}
export declare class RuntimeRuleRhsConcatenation extends RuntimeRuleRhsNonTerminal {
constructor(rule: RuntimeRule, concatItems: KtList<RuntimeRule>);
get concatItems(): KtList<RuntimeRule>;
get rhsItems(): KtList<KtList<RuntimeRule>>;
get rulePositionsNotAtStart(): KtSet<RulePositionRuntime>;
get rulePositionsAtStart(): KtSet<RulePositionRuntime>;
rhsItemsAt(option: any/* OptionNum */, position: number): KtSet<RuntimeRule>;
nextRulePositions(current: RulePositionRuntime): KtSet<RulePositionRuntime>;
clone(clonedRules: KtMap<string, RuntimeRule>): RuntimeRuleRhs;
get asString(): string;
toString(): string;
}
export declare class RuntimeRuleRhsChoice extends RuntimeRuleRhsNonTerminal {
constructor(rule: RuntimeRule, choiceKind: RuntimeRuleChoiceKind, options: KtList<RuntimeRuleRhs>);
get choiceKind(): RuntimeRuleChoiceKind;
get options(): KtList<RuntimeRuleRhs>;
get rhsItems(): KtList<KtList<Rule>>;
get rulePositionsNotAtStart(): KtSet<RulePositionRuntime>;
rhsItemsAt(option: any/* OptionNum */, position: number): KtSet<RuntimeRule>;
get rulePositionsAtStart(): KtSet<RulePositionRuntime>;
nextRulePositions(current: RulePositionRuntime): KtSet<RulePositionRuntime>;
clone(clonedRules: KtMap<string, RuntimeRule>): RuntimeRuleRhs;
get asString(): string;
toString(): string;
}
export declare class RuntimeRuleRhsOptional extends RuntimeRuleRhsNonTerminal {
constructor(rule: RuntimeRule, optionalItem: RuntimeRule);
get optionalItem(): RuntimeRule;
get rhsItems(): KtList<KtList<Rule>>;
get rulePositionsAtStart(): KtSet<RulePositionRuntime>;
get rulePositionsNotAtStart(): KtSet<RulePositionRuntime>;
rhsItemsAt(option: any/* OptionNum */, position: number): KtSet<RuntimeRule>;
nextRulePositions(current: RulePositionRuntime): KtSet<RulePositionRuntime>;
clone(clonedRules: KtMap<string, RuntimeRule>): RuntimeRuleRhs;
toString(): string;
}
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare abstract class RuntimeRuleRhsList extends RuntimeRuleRhsNonTerminal {
protected constructor(rule: RuntimeRule);
abstract get min(): number;
abstract get max(): number;
static get Companion(): {
get MULTIPLICITY_N(): number;
};
}
export declare class RuntimeRuleRhsListSimple extends RuntimeRuleRhsList {
constructor(rule: RuntimeRule, min: number, max: number, repeatedRhsItem: RuntimeRule);
get min(): number;
get max(): number;
get repeatedRhsItem(): RuntimeRule;
get rhsItems(): KtList<KtList<Rule>>;
get rulePositionsAtStart(): KtSet<RulePositionRuntime>;
get rulePositionsNotAtStart(): KtSet<RulePositionRuntime>;
rhsItemsAt(option: any/* OptionNum */, position: number): KtSet<RuntimeRule>;
nextRulePositions(current: RulePositionRuntime): KtSet<RulePositionRuntime>;
clone(clonedRules: KtMap<string, RuntimeRule>): RuntimeRuleRhs;
toString(): string;
}
export declare class RuntimeRuleRhsListSeparated extends RuntimeRuleRhsList {
constructor(rule: RuntimeRule, min: number, max: number, repeatedRhsItem: RuntimeRule, separatorRhsItem: RuntimeRule);
get min(): number;
get max(): number;
get repeatedRhsItem(): RuntimeRule;
get separatorRhsItem(): RuntimeRule;
get rhsItems(): KtList<KtList<Rule>>;
get rulePositionsAtStart(): KtSet<RulePositionRuntime>;
get rulePositionsNotAtStart(): KtSet<RulePositionRuntime>;
rhsItemsAt(option: any/* OptionNum */, position: number): KtSet<RuntimeRule>;
nextRulePositions(current: RulePositionRuntime): KtSet<RulePositionRuntime>;
clone(clonedRules: KtMap<string, RuntimeRule>): RuntimeRuleRhs;
toString(): string;
}
export declare class RuntimeRuleSet implements RuleSet {
constructor(number: number, qualifiedName: string, runtimeRules: KtList<RuntimeRule>, precedenceRules: KtList<PrefRule>);
get number(): number;
get qualifiedName(): string;
get runtimeRules(): KtList<RuntimeRule>;
get precedenceRules(): KtList<PrefRule>;
get goalRuleFor(): (KtMap<RuntimeRule, RuntimeRule> & KtMutableMap<RuntimeRule, RuntimeRule>)/* LazyMutableMapNonNull<RuntimeRule, RuntimeRule> */;
get skipRules(): KtList<RuntimeRule>;
get skipTerminals(): KtSet<RuntimeRule>;
get nonSkipRules(): Array<RuntimeRule>;
get nonSkipTerminals(): KtList<RuntimeRule>;
get terminals(): KtList<RuntimeRule>;
get embeddedTerminals(): KtList<RuntimeRule>;
automatonFor(goalRuleName: string, automatonKind: AutomatonKind): Automaton;
usedAutomatonFor(goalRuleName: string): Automaton;
buildFor(userGoalRuleName: string, automatonKind: AutomatonKind): ParserStateSet;
addPreBuiltFor(userGoalRuleName: string, automaton: Automaton): void;
fetchStateSetFor(userGoalRule: RuntimeRule, automatonKind: AutomatonKind): ParserStateSet;
findEmbeddedRuleSets(found?: KtSet<RuntimeRuleSet>): KtSet<RuntimeRuleSet>;
findRuntimeRule(tag: string): RuntimeRule;
findTerminalRule(tag: string): RuntimeRule;
usedAutomatonToString(userGoalRuleName: string, withStates?: boolean): string;
calcUsedRules(rule: RuntimeRule, used?: KtMutableSet<RuntimeRule>, done?: any /*BooleanArray*/): KtSet<RuntimeRule>;
clone(): RuntimeRuleSet;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: RuleSet["__doNotUseOrImplementIt"];
static get Companion(): {
get nextRuntimeRuleSetNumber(): number;
set nextRuntimeRuleSetNumber(value: number);
get numberForGrammar(): (KtMap<string, number> & KtMutableMap<string, number>)/* LazyMutableMapNonNull<string, number> */;
get NO_RRS(): number;
get GOAL_RULE_NUMBER(): number;
get EOT_RULE_NUMBER(): number;
get SKIP_RULE_NUMBER(): number;
get SKIP_CHOICE_RULE_NUMBER(): number;
get RUNTIME_LOOKAHEAD_RULE_NUMBER(): number;
get ANY_LOOKAHEAD_RULE_NUMBER(): number;
get UNDEFINED_LOOKAHEAD_RULE_NUMBER(): number;
get EMPTY_RULE_NUMBER(): number;
get EMPTY_LIST_RULE_NUMBER(): number;
get END_OF_TEXT_TAG(): string;
get GOAL_TAG(): string;
get SKIP_MULTI_TAG(): string;
get SKIP_CHOICE_RULE_TAG(): string;
get RUNTIME_LOOKAHEAD_RULE_TAG(): string;
get ANY_LOOKAHEAD_RULE_TAG(): string;
get UNDEFINED_LOOKAHEAD_RULE_TAG(): string;
get EMPTY_RULE_TAG(): string;
get EMPTY_LIST_RULE_TAG(): string;
get END_OF_TEXT(): RuntimeRule;
get USE_RUNTIME_LOOKAHEAD(): RuntimeRule;
get ANY_LOOKAHEAD(): RuntimeRule;
get UNDEFINED_RULE(): RuntimeRule;
get EMPTY(): RuntimeRule;
get EMPTY_LIST(): RuntimeRule;
};
}
export declare function ruleSet(name: string, init: (p0: any/* RuleSetBuilder */) => void): RuleSet;
export declare interface ScanResult {
readonly tokensByLine: KtList<KtList<LeafData>>;
readonly allTokens: KtList<LeafData>;
readonly issues: IssueCollection<LanguageIssue>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.scanner.api.ScanResult": unique symbol;
};
}
export declare abstract class ScannerKind {
private constructor();
static get OnDemand(): ScannerKind & {
get name(): "OnDemand";
get ordinal(): 0;
};
static get Classic(): ScannerKind & {
get name(): "Classic";
get ordinal(): 1;
};
get name(): "OnDemand" | "Classic";
get ordinal(): 0 | 1;
static values(): Array<ScannerKind>;
static valueOf(value: string): ScannerKind;
}
export declare interface Scanner {
readonly kind: ScannerKind;
readonly regexEngine: RegexEngine;
readonly matchables: KtList<Matchable>;
reset(): void;
isEnd(sentence: Sentence, position: number): boolean;
isLookingAt(sentence: Sentence, position: number, terminalRule: Rule): boolean;
matchedLength(sentence: Sentence, position: number, terminalRule: Rule): number;
findOrTryCreateLeaf(sentence: Sentence, position: number, terminalRule: Rule): Nullable<SpptDataNode>;
scan(sentence: Sentence, options?: Nullable<ScanOptions>): ScanResult;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.scanner.api.Scanner": unique symbol;
};
}
export declare interface ScanOptions {
enabled: boolean;
resultsByLine: boolean;
startAtPosition: number;
offsetPosition: number;
clone(): ScanOptions;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.scanner.api.ScanOptions": unique symbol;
};
}
export declare abstract class MatchableKind {
private constructor();
static get EOT(): MatchableKind & {
get name(): "EOT";
get ordinal(): 0;
};
static get LITERAL(): MatchableKind & {
get name(): "LITERAL";
get ordinal(): 1;
};
static get REGEX(): MatchableKind & {
get name(): "REGEX";
get ordinal(): 2;
};
get name(): "EOT" | "LITERAL" | "REGEX";
get ordinal(): 0 | 1 | 2;
static values(): Array<MatchableKind>;
static valueOf(value: string): MatchableKind;
}
export declare class Matchable {
constructor(ruleSetNumber: number, ruleNumber: number, tag: string, expression: string, kind: MatchableKind);
get ruleSetNumber(): number;
get ruleNumber(): number;
get tag(): string;
get expression(): string;
get kind(): MatchableKind;
using(regexEngine: RegexEngine): Matchable;
isLookingAt(sentence: Sentence, atPosition: number): boolean;
matchedLength(sentence: Sentence, atPosition: number): number;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare class ScanOptionsDefault implements ScanOptions {
constructor(enabled?: boolean, resultsByLine?: boolean, startAtPosition?: number, offsetPosition?: number);
get enabled(): boolean;
set enabled(value: boolean);
get resultsByLine(): boolean;
set resultsByLine(value: boolean);
get startAtPosition(): number;
set startAtPosition(value: number);
get offsetPosition(): number;
set offsetPosition(value: number);
clone(): ScanOptionsDefault;
readonly __doNotUseOrImplementIt: ScanOptions["__doNotUseOrImplementIt"];
}
export declare class ScanResultDefault implements ScanResult {
constructor(tokensByLine: KtList<KtList<LeafData>>, issues: IssueCollection<LanguageIssue>);
get tokensByLine(): KtList<KtList<LeafData>>;
get issues(): IssueCollection<LanguageIssue>;
get allTokens(): KtList<LeafData>;
copy(tokensByLine?: KtList<KtList<LeafData>>, issues?: IssueCollection<LanguageIssue>): ScanResultDefault;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: ScanResult["__doNotUseOrImplementIt"];
}
export declare class ScanByLineEndState {
constructor(tokens: KtList<LeafData>, eolPosition: number, leftOverText: string);
get tokens(): KtList<LeafData>;
get eolPosition(): number;
get leftOverText(): string;
copy(tokens?: KtList<LeafData>, eolPosition?: number, leftOverText?: string): ScanByLineEndState;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare abstract class ScannerAbstract implements Scanner {
constructor(regexEngine: RegexEngine);
get regexEngine(): RegexEngine;
abstract get validTerminals(): KtList<Rule>;
get matchables(): KtList<Matchable>;
isEnd(sentence: Sentence, position: number): boolean;
matchedLength(sentence: Sentence, position: number, terminalRule: Rule): number;
scan(sentence: Sentence, options?: Nullable<ScanOptions>): ScanResult;
scanByLine(previousState: ScanByLineEndState, sentence: Sentence, offsetPosition: number): ScanByLineEndState;
abstract get kind(): ScannerKind;
abstract reset(): void;
abstract isLookingAt(sentence: Sentence, position: number, terminalRule: Rule): boolean;
abstract findOrTryCreateLeaf(sentence: Sentence, position: number, terminalRule: Rule): Nullable<SpptDataNode>;
readonly __doNotUseOrImplementIt: Scanner["__doNotUseOrImplementIt"];
}
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare class ScannerClassic extends ScannerAbstract {
constructor(regexEngine: RegexEngine, terminals: KtList<Rule>);
get validTerminals(): KtList<Rule>;
get kind(): ScannerKind;
reset(): void;
isEnd(sentence: Sentence, position: number): boolean;
isLookingAt(sentence: Sentence, position: number, terminalRule: Rule): boolean;
findOrTryCreateLeaf(sentence: Sentence, position: number, terminalRule: Rule): Nullable<CompleteTreeDataNode>;
scan(sentence: Sentence, options?: Nullable<ScanOptions>): ScanResult;
static get Companion(): {
get LEAF_NONE(): CompleteTreeDataNode;
};
}
export declare class ScannerFromMatchables extends ScannerAbstract {
constructor(regexEngine: RegexEngine | undefined, _matchables: () => KtList<Matchable>);
get matchables(): KtList<Matchable>;
get kind(): ScannerKind;
get validTerminals(): KtList<Rule>;
reset(): void;
isLookingAt(sentence: Sentence, position: number, terminalRule: Rule): boolean;
findOrTryCreateLeaf(sentence: Sentence, position: number, terminalRule: Rule): CompleteTreeDataNode;
scan(sentence: Sentence, options?: Nullable<ScanOptions>): ScanResult;
}
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare class ScannerOnDemand extends ScannerAbstract {
constructor(regexEngine: RegexEngine, terminals: KtList<Rule>);
get validTerminals(): KtList<Rule>;
get kind(): ScannerKind;
reset(): void;
isLookingAt(sentence: Sentence, position: number, terminalRule: Rule): boolean;
findOrTryCreateLeaf(sentence: Sentence, position: number, terminalRule: Rule): Nullable<CompleteTreeDataNode>;
scan(sentence: Sentence, options?: Nullable<ScanOptions>): ScanResult;
static get Companion(): {
get END_OF_TEXT(): string;
get LEAF_NONE(): CompleteTreeDataNode;
};
}
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare class SentenceDefault extends SentenceAbstract {
constructor(text: string, identity: Nullable<any>);
get text(): string;
get eolPositions(): KtList<number>;
static get Companion(): {
get EOL_PATTERN(): any/* Regex */;
eolPositions(text: string): KtList<number>;
};
}
export declare abstract class SentenceAbstract implements Sentence {
constructor(identity: Nullable<any>);
get identity(): Nullable<any>;
abstract get text(): string;
abstract get eolPositions(): KtList<number>;
textAt(position: number, length: number): string;
positionOfLine(line: number): number;
locationInLine(line: number, position: number, length: number): InputLocation;
locationFor(position: number, length: number): InputLocation;
contextInText(position: number): string;
readonly __doNotUseOrImplementIt: Sentence["__doNotUseOrImplementIt"];
static get Companion(): {
get contextSize(): number;
};
}
export declare interface Sentence {
readonly text: string;
textAt(position: number, length: number): string;
positionOfLine(line: number): number;
locationInLine(line: number, position: number, length: number): InputLocation;
locationFor(position: number, length: number): InputLocation;
contextInText(position: number): string;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.sentence.api.Sentence": unique symbol;
};
}
export declare class InputLocation {
constructor(position: number, column: number, line: number, length: number, sentenceIdentity: Nullable<any>);
get position(): number;
get column(): number;
get line(): number;
get length(): number;
set length(value: number);
get sentenceIdentity(): Nullable<any>;
get endPosition(): number;
copy(position?: number, column?: number, line?: number, length?: number, sentenceIdentity?: Nullable<any>): InputLocation;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare interface SPPTBranch extends SPPTNode {
readonly childrenAlternatives: KtMap<number, KtList<SPPTNode>>;
readonly children: KtList<SPPTNode>;
readonly nonSkipChildren: KtList<SPPTNode>;
nonSkipChild(index: number): SPPTNode;
branchChild(index: number): SPPTBranch;
readonly branchNonSkipChildren: KtList<SPPTBranch>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.sppt.api.SPPTBranch": unique symbol;
} & SPPTNode["__doNotUseOrImplementIt"];
}
export declare interface SPPTLeaf extends SPPTNode {
readonly isPattern: boolean;
readonly isLiteral: boolean;
readonly isExplicitlyNamed: boolean;
readonly tagList: KtList<string>;
readonly eolPositions: KtList<number>;
readonly metaTags: KtList<string>;
setTags(arg: KtList<string>): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.sppt.api.SPPTLeaf": unique symbol;
} & SPPTNode["__doNotUseOrImplementIt"];
}
export declare interface SPPTNode {
readonly name: string;
readonly runtimeRuleSetNumber: number;
readonly runtimeRuleNumber: number;
readonly option: number;
readonly location: InputLocation;
readonly lastLeaf: SPPTLeaf;
readonly startPosition: number;
readonly matchedTextLength: number;
readonly nextInputPosition: number;
readonly priority: number;
readonly matchedText: string;
readonly nonSkipMatchedText: string;
readonly numberOfLines: number;
readonly isEmptyLeaf: boolean;
readonly isEmptyMatch: boolean;
readonly isLeaf: boolean;
readonly isOptional: boolean;
readonly isList: boolean;
readonly isEmbedded: boolean;
readonly isBranch: boolean;
readonly isSkip: boolean;
readonly asLeaf: SPPTLeaf;
readonly asBranch: SPPTBranch;
parent: Nullable<SPPTBranch>;
tree: Nullable<SharedPackedParseTree>;
contains(other: SPPTNode): boolean;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.sppt.api.SPPTNode": unique symbol;
};
}
export declare interface SPPTParser {
readonly tree: SharedPackedParseTree;
clear(): void;
parse(treeAsString: string, addTree?: boolean): SharedPackedParseTree;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.sppt.api.SPPTParser": unique symbol;
};
}
export declare interface SpptDataNode {
readonly rule: Rule;
readonly startPosition: number;
readonly nextInputPosition: number;
readonly nextInputNoSkip: number;
readonly option: any/* OptionNum */;
readonly dynamicPriority: KtList<number>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.sppt.api.SpptDataNode": unique symbol;
};
}
export declare class ChildInfo {
constructor(propertyIndex: number, index: number, total: number);
get propertyIndex(): number;
get index(): number;
get total(): number;
copy(propertyIndex?: number, index?: number, total?: number): ChildInfo;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare class AltInfo {
constructor(option: any/* OptionNum */, index: number, totalMatched: number);
get option(): any/* OptionNum */;
get index(): number;
get totalMatched(): number;
copy(option?: any/* OptionNum */, index?: number, totalMatched?: number): AltInfo;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare class ParsePath {
constructor(segments?: KtList<string>);
get segments(): KtList<string>;
plus(segment: string): ParsePath;
toString(): string;
copy(segments?: KtList<string>): ParsePath;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare interface SpptDataNodeInfo {
readonly path: ParsePath;
readonly node: SpptDataNode;
readonly parentAlt: AltInfo;
readonly alt: AltInfo;
readonly child: ChildInfo;
readonly numChildrenAlternatives: KtMap<any/* OptionNum */, number>;
readonly totalChildrenFromAllAlternatives: number;
readonly numSkipChildren: number;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.sppt.api.SpptDataNodeInfo": unique symbol;
};
}
export declare interface PathFunction {
invoke(): KtList<SpptDataNode>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.sppt.api.PathFunction": unique symbol;
};
}
export declare interface SpptWalker {
beginTree(): void;
endTree(): void;
skip(startPosition: number, nextInputPosition: number): void;
leaf(nodeInfo: SpptDataNodeInfo): void;
beginBranch(nodeInfo: SpptDataNodeInfo): void;
endBranch(nodeInfo: SpptDataNodeInfo): void;
beginEmbedded(nodeInfo: SpptDataNodeInfo): void;
endEmbedded(nodeInfo: SpptDataNodeInfo): void;
treeError(msg: string, path: PathFunction): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.sppt.api.SpptWalker": unique symbol;
};
}
export declare class LeafData {
constructor(name: string, isPattern: boolean, position: number, length: number, tagList: KtList<string>);
get name(): string;
get isPattern(): boolean;
get position(): number;
get length(): number;
get tagList(): KtList<string>;
get metaTags(): KtList<string>;
copy(name?: string, isPattern?: boolean, position?: number, length?: number, tagList?: KtList<string>): LeafData;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare interface TreeData {
readonly root: Nullable<SpptDataNode>;
readonly userRoot: SpptDataNode;
readonly initialSkip: Nullable<TreeData>;
readonly isEmpty: boolean;
skipDataAfter(node: SpptDataNode): Nullable<TreeData>;
childrenFor(node: SpptDataNode): KtList<any/* Pair<OptionNum, KtList<SpptDataNode>> */>;
embeddedFor(node: SpptDataNode): Nullable<TreeData>;
traverseTreeDepthFirst(callback: SpptWalker, skipDataAsTree: boolean): void;
preferred(node: SpptDataNode): Nullable<SpptDataNode>;
skipNodesAfter(node: SpptDataNode): KtList<SpptDataNode>;
matches(other: TreeData): boolean;
start(initialSkipData: Nullable<TreeData>): void;
setRootTo(root: SpptDataNode): void;
setUserGoalChildrenAfterInitialSkip(nug: SpptDataNode, userGoalChildren: KtList<SpptDataNode>): void;
setChildren(parent: SpptDataNode, completeChildren: KtList<SpptDataNode>, isAlternative: boolean): void;
setSkipDataAfter(leafNodeIndex: SpptDataNode, skipData: TreeData): void;
setEmbeddedTreeFor(n: SpptDataNode, treeData: TreeData): void;
remove(node: SpptDataNode): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.sppt.api.TreeData": unique symbol;
};
}
export declare interface SharedPackedParseTree {
readonly asSentence: string;
readonly countTrees: number;
readonly toStringAll: string;
readonly treeData: TreeData;
readonly seasons: number;
readonly maxNumHeads: number;
traverseTreeDepthFirst(callback: SpptWalker, skipDataAsTree: boolean): void;
tokensByLineAll(): KtList<KtList<LeafData>>;
tokensByLine(line: number): KtList<LeafData>;
toStringAllWithIndent(indentIncrement: string, skipDataAsTree?: boolean): string;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.sppt.api.SharedPackedParseTree": unique symbol;
};
}
export declare interface SharedPackedParseTreeVisitor<T, A> {
visitTree(target: SharedPackedParseTree, arg: A): T;
visitLeaf(target: SPPTLeaf, arg: A): T;
visitBranch(target: SPPTBranch, arg: A): T;
visitNode(target: SPPTNode, arg: A): T;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.sppt.api.SharedPackedParseTreeVisitor": unique symbol;
};
}
export declare class SPPTFromTreeData implements SharedPackedParseTree {
constructor(treeData: TreeData, sentence: Sentence, seasons: number, maxNumHeads: number);
get treeData(): TreeData;
get sentence(): Sentence;
get seasons(): number;
get maxNumHeads(): number;
get asSentence(): string;
get countTrees(): number;
get toStringAll(): string;
traverseTreeDepthFirst(callback: SpptWalker, skipDataAsTree: boolean): void;
tokensByLineAll(): KtList<KtList<LeafData>>;
tokensByLine(line: number): KtList<LeafData>;
toStringAllWithIndent(indentIncrement: string, skipDataAsTree?: boolean): string;
matches(other: SPPTFromTreeData): boolean;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: SharedPackedParseTree["__doNotUseOrImplementIt"];
}
export declare class SPPTParserDefault implements SPPTParser {
constructor(rootRuleSet: RuleSet, embeddedRuntimeRuleSets?: KtMap<string, RuntimeRuleSet>);
get rootRuleSet(): RuleSet;
get embeddedRuntimeRuleSets(): KtMap<string, RuntimeRuleSet>;
get tree(): SharedPackedParseTree;
set tree(value: SharedPackedParseTree);
clear(): void;
parse(treeAsString: string, addTree?: boolean): SharedPackedParseTree;
addTree(treeString: string): SharedPackedParseTree;
readonly __doNotUseOrImplementIt: SPPTParser["__doNotUseOrImplementIt"];
}
export declare function matchedTextNoSkip(_this_: Sentence, node: SpptDataNode): string;
export declare function locationForNode(_this_: Sentence, node: SpptDataNode): InputLocation;
export declare class SpptWalkerToString implements SpptWalker {
constructor(sentence: Sentence, indentDelta: string);
get sentence(): Sentence;
get indentDelta(): string;
get output(): string;
beginTree(): void;
endTree(): void;
skip(startPosition: number, nextInputPosition: number): void;
leaf(nodeInfo: SpptDataNodeInfo): void;
beginBranch(nodeInfo: SpptDataNodeInfo): void;
endBranch(nodeInfo: SpptDataNodeInfo): void;
beginEmbedded(nodeInfo: SpptDataNodeInfo): void;
endEmbedded(nodeInfo: SpptDataNodeInfo): void;
treeError(msg: string, path: PathFunction): void;
readonly __doNotUseOrImplementIt: SpptWalker["__doNotUseOrImplementIt"];
}
export declare class PreferredNode {
constructor(rule: Rule, startPosition: number);
get rule(): Rule;
get startPosition(): number;
toString(): string;
copy(rule?: Rule, startPosition?: number): PreferredNode;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare class CompleteTreeDataNode implements SpptDataNode {
constructor(rule: Rule, startPosition: number, nextInputPosition: number, nextInputNoSkip: number, option: any/* OptionNum */, dynamicPriority: KtList<number>);
get rule(): Rule;
get startPosition(): number;
get nextInputPosition(): number;
get nextInputNoSkip(): number;
get option(): any/* OptionNum */;
get dynamicPriority(): KtList<number>;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: SpptDataNode["__doNotUseOrImplementIt"];
}
export declare function treeData(forStateSetNumber: number): TreeData;
export declare class TreeDataComplete implements TreeData {
constructor(forStateSetNumber: number);
get forStateSetNumber(): number;
get isEmpty(): boolean;
get completeChildren(): KtMap<SpptDataNode, KtMap<any/* OptionNum */, KtList<SpptDataNode>>>;
get root(): Nullable<SpptDataNode>;
set root(value: Nullable<SpptDataNode>);
get initialSkip(): Nullable<TreeData>;
set initialSkip(value: Nullable<TreeData>);
get userRoot(): SpptDataNode;
setUserGoalChildrenAfterInitialSkip(nug: SpptDataNode, userGoalChildren: KtList<SpptDataNode>): void;
childrenFor(node: SpptDataNode): KtList<any/* Pair<OptionNum, KtList<SpptDataNode>> */>;
skipDataAfter(node: SpptDataNode): Nullable<TreeData>;
embeddedFor(node: SpptDataNode): Nullable<TreeData>;
skipNodesAfter(node: SpptDataNode): KtList<SpptDataNode>;
reset(): void;
preferred(node: SpptDataNode): Nullable<SpptDataNode>;
setRootTo(root: SpptDataNode): void;
start(initialSkipData: Nullable<TreeData>): void;
remove(node: SpptDataNode): void;
setChildren(parent: SpptDataNode, completeChildren: KtList<SpptDataNode>, isAlternative: boolean): void;
setSkipDataAfter(leafNodeIndex: SpptDataNode, skipData: TreeData): void;
setEmbeddedTreeFor(n: SpptDataNode, treeData: TreeData): void;
traverseTreeDepthFirst(callback: SpptWalker, skipDataAsTree: boolean): void;
matches(other: TreeData): boolean;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: TreeData["__doNotUseOrImplementIt"];
static get Companion(): {
};
}
export declare class CompleteKey {
constructor(rule: Rule, startPosition: number, nextInputPosition: number);
get rule(): Rule;
get startPosition(): number;
get nextInputPosition(): number;
copy(rule?: Rule, startPosition?: number, nextInputPosition?: number): CompleteKey;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare class TreeDataComplete2 implements TreeData {
constructor(forStateSetNumber: number);
get forStateSetNumber(): number;
get isEmpty(): boolean;
get completeChildren(): KtMap<SpptDataNode, KtMap<any/* OptionNum */, KtList<SpptDataNode>>>;
get root(): Nullable<SpptDataNode>;
set root(value: Nullable<SpptDataNode>);
get initialSkip(): Nullable<TreeData>;
set initialSkip(value: Nullable<TreeData>);
get userRoot(): SpptDataNode;
setUserGoalChildrenAfterInitialSkip(nug: SpptDataNode, userGoalChildren: KtList<SpptDataNode>): void;
childrenFor(node: SpptDataNode): KtList<any/* Pair<OptionNum, KtList<SpptDataNode>> */>;
skipDataAfter(node: SpptDataNode): Nullable<TreeData>;
embeddedFor(node: SpptDataNode): Nullable<TreeData>;
skipNodesAfter(node: SpptDataNode): KtList<SpptDataNode>;
get _complete(): (KtMap<SpptDataNode, KtMutableMap<any/* OptionNum */, KtList<SpptDataNode>>> & KtMutableMap<SpptDataNode, KtMutableMap<any/* OptionNum */, KtList<SpptDataNode>>>)/* HashMap<SpptDataNode, KtMutableMap<OptionNum, KtList<SpptDataNode>>> */;
get _preferred(): (KtMap<PreferredNode, SpptDataNode> & KtMutableMap<PreferredNode, SpptDataNode>)/* HashMap<PreferredNode, SpptDataNode> */;
get _skipDataAfter(): (KtMap<SpptDataNode, TreeData> & KtMutableMap<SpptDataNode, TreeData>)/* HashMap<SpptDataNode, TreeData> */;
get _embeddedFor(): (KtMap<SpptDataNode, TreeData> & KtMutableMap<SpptDataNode, TreeData>)/* HashMap<SpptDataNode, TreeData> */;
reset(): void;
preferred(node: SpptDataNode): Nullable<SpptDataNode>;
setRootTo(root: SpptDataNode): void;
start(initialSkipData: Nullable<TreeData>): void;
remove(node: SpptDataNode): void;
setChildren(parent: SpptDataNode, completeChildren: KtList<SpptDataNode>, isAlternative: boolean): void;
setSkipDataAfter(leafNodeIndex: SpptDataNode, skipData: TreeData): void;
setEmbeddedTreeFor(n: SpptDataNode, treeData: TreeData): void;
traverseTreeDepthFirst(callback: SpptWalker, skipDataAsTree: boolean): void;
matches(other: TreeData): boolean;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: TreeData["__doNotUseOrImplementIt"];
static get Companion(): {
};
}
export declare class TreeDataGrowing<GN, CN extends SpptDataNode> {
constructor(forStateSetNumber: number);
get forStateSetNumber(): number;
get isClean(): boolean;
get isEmpty(): boolean;
get complete(): TreeData;
get growingChildren(): KtMap<GN, KtList<CN>>;
preferred(node: CN): Nullable<CN>;
initialise(gni: GN, initialSkipData: Nullable<TreeData>): void;
removeTreeComplete(node: CN): void;
removeTreeGrowing(node: GN): void;
setEmbeddedChild(parent: SpptDataNode, child: SpptDataNode, embeddedTreeData: TreeData): void;
setFirstChildForComplete(parent: CN, child: CN, isAlternative: boolean): void;
setFirstChildForGrowing(parent: GN, child: CN): void;
setNextChildForCompleteParent(oldParent: GN, newParent: CN, nextChild: CN, isAlternative: boolean): void;
setNextChildForGrowingParent(oldParent: GN, newParent: GN, nextChild: CN): void;
inGrowingParentChildAt(parent: GN, childIndex: number): Nullable<CN>;
setUserGoalChildrenAfterInitialSkip(nug: CN, userGoalChildren: KtList<CN>): void;
setSkipDataAfter(leafNodeIndex: CN, skipData: TreeData): void;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
}
export declare function debug(indentDelta: Debug.IndentDelta, lazyMessage: () => string): void;
export declare const Debug: {
getInstance(): typeof __NonExistentDebug;
};
declare abstract class __NonExistentDebug extends _objects_.net$akehurst$language$agl$util$Debug {
private constructor();
}
declare namespace __NonExistentDebug {
abstract class IndentDelta {
private constructor();
static get NONE(): Debug.IndentDelta & {
get name(): "NONE";
get ordinal(): 0;
};
static get INC_BEFORE(): Debug.IndentDelta & {
get name(): "INC_BEFORE";
get ordinal(): 1;
};
static get INC_AFTER(): Debug.IndentDelta & {
get name(): "INC_AFTER";
get ordinal(): 2;
};
static get DEC_BEFORE(): Debug.IndentDelta & {
get name(): "DEC_BEFORE";
get ordinal(): 3;
};
static get DEC_AFTER(): Debug.IndentDelta & {
get name(): "DEC_AFTER";
get ordinal(): 4;
};
get name(): "NONE" | "INC_BEFORE" | "INC_AFTER" | "DEC_BEFORE" | "DEC_AFTER";
get ordinal(): 0 | 1 | 2 | 3 | 4;
static values(): Array<Debug.IndentDelta>;
static valueOf(value: string): Debug.IndentDelta;
}
}
declare namespace _objects_ {
const net$akehurst$language$agl$util$Debug: {
get CHECK(): boolean;
get OUTPUT_SM_BUILD(): boolean;
get OUTPUT_RUNTIME_BUILD(): boolean;
get OUTPUT_RUNTIME(): boolean;
get OUTPUT_TREE_DATA(): boolean;
debug(indentDelta: Debug.IndentDelta, lazyMessage: () => string): void;
} & {
new(): any;
};
}
export declare function cached<V>(initializer: () => V): CachedValue<V>;
export declare class CachedValue<V> {
constructor(initializer: () => V);
get value(): V;
set value(value: V);
get resetAction(): (p0: V) => void;
set resetAction(value: (p0: V) => void);
reset(): void;
static get Companion(): {
};
}
export declare const BuildConfig: {
getInstance(): {
get version(): string;
get buildStamp(): string;
get buildDate(): string;
get buildTime(): string;
};
};
export declare const KotlinxReflectForModule: {
getInstance(): {
registerUsedClasses(): void;
};
};
export declare const Agl: {
getInstance(): {
get version(): string;
get buildStamp(): string;
get registry(): LanguageRegistry;
configurationEmpty<AsmType extends any, ContextType extends any>(): LanguageProcessorConfiguration<AsmType, ContextType>;
configurationBase<AsmType extends any, ContextType extends any>(): LanguageProcessorConfiguration<AsmType, ContextType>;
configurationFromLanguageObject<AsmType extends any, ContextType extends any>(languageObject: LanguageObject<AsmType, ContextType>): LanguageProcessorConfiguration<AsmType, ContextType>;
configurationSimple(): LanguageProcessorConfiguration<Asm, ContextWithScope<any, any>>;
configuration<AsmType extends any, ContextType extends any>(base: LanguageProcessorConfiguration<AsmType, ContextType> | undefined, init: (p0: LanguageProcessorConfigurationBuilder<AsmType, ContextType>) => void): LanguageProcessorConfiguration<AsmType, ContextType>;
parseOptions(base: ParseOptions | undefined, init: (p0: ParseOptionsBuilder) => void): ParseOptions;
options<AsmType extends any, ContextType extends any>(base: ProcessOptions<AsmType, ContextType> | undefined, init: (p0: ProcessOptionsBuilder<AsmType, ContextType>) => void): ProcessOptions<AsmType, ContextType>;
processorFromGrammar<AsmType extends any, ContextType extends any>(grammarModel: GrammarModel, configuration?: Nullable<LanguageProcessorConfiguration<AsmType, ContextType>>): LanguageProcessor<AsmType, ContextType>;
processorFromStringSimple(grammarDefinitionStr: PublicValueType/* GrammarString */, typeStr?: Nullable<PublicValueType>/* Nullable<TypesString> */, transformStr?: Nullable<PublicValueType>/* Nullable<TransformString> */, referenceStr?: Nullable<PublicValueType>/* Nullable<CrossReferenceString> */, styleStr?: Nullable<PublicValueType>/* Nullable<StyleString> */, formatterModelStr?: Nullable<PublicValueType>/* Nullable<FormatString> */, configurationBase?: LanguageProcessorConfiguration<Asm, ContextWithScope<any, any>>, grammarAglOptions?: Nullable<ProcessOptions<GrammarModel, ContextWithScope<any, any>>>): LanguageProcessorResult<Asm, ContextWithScope<any, any>>;
processorFromStringSimpleJava(grammarDefinitionStr: string, typeModelStr?: Nullable<string>, transformStr?: Nullable<string>, crossReferenceModelStr?: Nullable<string>, styleModelStr?: Nullable<string>, formatterModelStr?: Nullable<string>, configurationBase?: LanguageProcessorConfiguration<Asm, ContextWithScope<any, any>>, grammarAglOptions?: Nullable<ProcessOptions<GrammarModel, ContextWithScope<any, any>>>): LanguageProcessorResult<Asm, ContextWithScope<any, any>>;
processorFromString<AsmType extends any, ContextType extends any>(grammarDefinitionStr: string, configuration?: Nullable<LanguageProcessorConfiguration<AsmType, ContextType>>, aglOptions?: Nullable<ProcessOptions<GrammarModel, ContextWithScope<any, any>>>): LanguageProcessorResult<AsmType, ContextType>;
processorFromGeneratedCode<AsmType extends any, ContextType extends any>(generated: LanguageObjectAbstract<AsmType, ContextType>): LanguageProcessor<AsmType, ContextType>;
fromString<AsmType extends any, ContextType extends any>(proc: LanguageProcessor<AsmType, ContextType>, aglOptions: ProcessOptions<AsmType, ContextType>, sentence: string): ProcessResult<AsmType>;
grammarFromString<AsmType extends any, ContextType extends any>(sentence: Nullable<string>, aglOptions?: Nullable<ProcessOptions<GrammarModel, ContextWithScope<any, any>>>): ProcessResult<GrammarModel>;
languageDefinitionFromString<AsmType extends any, ContextType extends any>(identity: PublicValueType/* LanguageIdentity */, grammarDefinitionStr?: Nullable<PublicValueType>/* Nullable<GrammarString> */, typeStr?: Nullable<PublicValueType>/* Nullable<TypesString> */, transformStr?: Nullable<PublicValueType>/* Nullable<TransformString> */, referenceStr?: Nullable<PublicValueType>/* Nullable<CrossReferenceString> */, styleStr?: Nullable<PublicValueType>/* Nullable<StyleString> */, formatterModelStr?: Nullable<PublicValueType>/* Nullable<FormatString> */, configurationBase?: LanguageProcessorConfiguration<AsmType, ContextType>, grammarAglOptions?: Nullable<ProcessOptions<GrammarModel, ContextWithScope<any, any>>>): LanguageDefinition<AsmType, ContextType>;
languageDefinitionFromStringSimple(identity: PublicValueType/* LanguageIdentity */, grammarDefinitionStr?: Nullable<PublicValueType>/* Nullable<GrammarString> */, typeStr?: Nullable<PublicValueType>/* Nullable<TypesString> */, transformStr?: Nullable<PublicValueType>/* Nullable<TransformString> */, referenceStr?: Nullable<PublicValueType>/* Nullable<CrossReferenceString> */, styleStr?: Nullable<PublicValueType>/* Nullable<StyleString> */, formatterModelStr?: Nullable<PublicValueType>/* Nullable<FormatString> */, configurationBase?: LanguageProcessorConfiguration<Asm, ContextWithScope<any, any>>, grammarAglOptions?: Nullable<ProcessOptions<GrammarModel, ContextWithScope<any, any>>>): LanguageDefinition<Asm, ContextWithScope<any, any>>;
};
};
export declare class Expansion {
constructor(ruleItem: RuleItem, name: Nullable<string>, list: string);
get ruleItem(): RuleItem;
get name(): Nullable<string>;
get list(): string;
copy(ruleItem?: RuleItem, name?: Nullable<string>, list?: string): Expansion;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare abstract class CompletionProviderAbstract<AsmType extends any, ContextType extends any> implements CompletionProvider<AsmType, ContextType> {
constructor();
provide(nextExpected: KtSet<Spine>, options: CompletionProviderOptions<ContextType>): KtList<CompletionItem>;
readonly __doNotUseOrImplementIt: CompletionProvider<AsmType, ContextType>["__doNotUseOrImplementIt"];
static get Companion(): {
defaultSortAndFilter(items: KtList<CompletionItem>): KtList<CompletionItem>;
expansionToCompletionItem(expansions: KtList<Expansion>): KtList<CompletionItem>;
provideDefaultForSpine<ContextType extends any>(spine: Spine, options: CompletionProviderOptions<ContextType>): KtList<CompletionItem>;
provideExpansionsForSpine<ContextType extends any>(spine: Spine, options: CompletionProviderOptions<ContextType>): KtList<Expansion>;
provideForConcatenations<ContextType extends any>(concatenations: KtSet<Concatenation>, options: CompletionProviderOptions<ContextType>): KtList<Expansion>;
provideForRuleItems<ContextType extends any>(ruleItems: KtSet<RuleItem>, options: CompletionProviderOptions<ContextType>): KtList<Expansion>;
provideExpansionsForRuleItem<ContextType extends any>(curDepth: number, ruleItems: KtSet<RuleItem>, options: CompletionProviderOptions<ContextType>): KtList<Expansion>;
expand<ContextType extends any>(curDepth: number, ri: RuleItem, options: CompletionProviderOptions<ContextType>): KtList<Expansion>;
expandItem<ContextType extends any>(curDepth: number, item: RuleItem, options: CompletionProviderOptions<ContextType>): KtList<Expansion>;
textFor<ContextType extends any>(item: RuleItem, options: CompletionProviderOptions<ContextType>): Expansion;
provideForTangibles<ContextType extends any>(tangibles: KtSet<TangibleItem>, options: CompletionProviderOptions<ContextType>): KtList<CompletionItem>;
provideForTangible<ContextType extends any>(tangibleItem: TangibleItem, options: CompletionProviderOptions<ContextType>): KtList<CompletionItem>;
};
}
export declare class AutomatonToKotlin {
constructor();
}
export declare abstract class FormatterAbstract<AsmType> implements Formatter<AsmType> {
constructor();
abstract get formatModel(): AglFormatModel;
abstract format(formatSetName: PossiblyQualifiedName, asm: AsmType): FormatResult;
readonly __doNotUseOrImplementIt: Formatter<AsmType>["__doNotUseOrImplementIt"];
}
export declare abstract class LanguageDefinitionAbstract<AsmType extends any, ContextType extends any> implements LanguageDefinition<AsmType, ContextType> {
constructor(argGrammarModel: GrammarModel, argBuildForDefaultGoal: boolean);
abstract get identity(): PublicValueType/* LanguageIdentity */;
get grammarModel(): Nullable<GrammarModel>;
set grammarModel(value: Nullable<GrammarModel>);
get targetGrammar(): Nullable<Grammar>;
abstract get isModifiable(): boolean;
get targetGrammarName(): Nullable<PossiblyQualifiedName & PublicValueType>/* Nullable<SimpleName> */;
set targetGrammarName(value: Nullable<PossiblyQualifiedName & PublicValueType>/* Nullable<SimpleName> */);
get defaultGoalRule(): Nullable<PublicValueType>/* Nullable<GrammarRuleName> */;
set defaultGoalRule(value: Nullable<PublicValueType>/* Nullable<GrammarRuleName> */);
get typesModel(): Nullable<TypeModel>;
get transformModel(): Nullable<TransformModel>;
get crossReferenceModel(): Nullable<CrossReferenceModel>;
get syntaxAnalyser(): Nullable<SyntaxAnalyser<AsmType>>;
get semanticAnalyser(): Nullable<SemanticAnalyser<AsmType, ContextType>>;
get formatter(): Nullable<Formatter<AsmType>>;
get issues(): IssueCollection<LanguageIssue>;
get processor(): Nullable<LanguageProcessor<AsmType, ContextType>>;
get styleModel(): Nullable<AglStyleModel>;
get processorObservers(): KtMutableList<(p0: Nullable<LanguageProcessor<AsmType, ContextType>>, p1: Nullable<LanguageProcessor<AsmType, ContextType>>) => void>;
get grammarStrObservers(): KtMutableList<(p0: Nullable<PublicValueType>/* Nullable<GrammarString> */, p1: Nullable<PublicValueType>/* Nullable<GrammarString> */) => void>;
get grammarObservers(): KtMutableList<(p0: Nullable<GrammarModel>, p1: Nullable<GrammarModel>) => void>;
get typeModelStrObservers(): KtMutableList<(p0: Nullable<PublicValueType>/* Nullable<TypesString> */, p1: Nullable<PublicValueType>/* Nullable<TypesString> */) => void>;
get asmTransformStrObservers(): KtMutableList<(p0: Nullable<PublicValueType>/* Nullable<TransformString> */, p1: Nullable<PublicValueType>/* Nullable<TransformString> */) => void>;
get crossReferenceStrObservers(): KtMutableList<(p0: Nullable<PublicValueType>/* Nullable<CrossReferenceString> */, p1: Nullable<PublicValueType>/* Nullable<CrossReferenceString> */) => void>;
get formatterStrObservers(): KtMutableList<(p0: Nullable<PublicValueType>/* Nullable<FormatString> */, p1: Nullable<PublicValueType>/* Nullable<FormatString> */) => void>;
get styleStrObservers(): KtMutableList<(p0: Nullable<PublicValueType>/* Nullable<StyleString> */, p1: Nullable<PublicValueType>/* Nullable<StyleString> */) => void>;
toString(): string;
protected get _processor_cache(): CachedValue<Nullable<LanguageProcessor<AsmType, ContextType>>>;
protected get _style_cache(): CachedValue<Nullable<AglStyleModel>>;
protected get _issues(): IssueHolder;
protected set _issues(value: IssueHolder);
protected get _styleResolver(): Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<AglStyleModel>>;
protected set _styleResolver(value: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<AglStyleModel>>);
abstract get grammarString(): Nullable<PublicValueType>/* Nullable<GrammarString> */;
abstract get typesString(): Nullable<PublicValueType>/* Nullable<TypesString> */;
abstract get transformString(): Nullable<PublicValueType>/* Nullable<TransformString> */;
abstract get crossReferenceString(): Nullable<PublicValueType>/* Nullable<CrossReferenceString> */;
abstract get configuration(): LanguageProcessorConfiguration<AsmType, ContextType>;
abstract set configuration(value: LanguageProcessorConfiguration<AsmType, ContextType>);
abstract get formatString(): Nullable<PublicValueType>/* Nullable<FormatString> */;
abstract get styleString(): Nullable<PublicValueType>/* Nullable<StyleString> */;
update(grammarString?: Nullable<PublicValueType>/* Nullable<GrammarString> */, typesString?: Nullable<PublicValueType>/* Nullable<TypesString> */, transformString?: Nullable<PublicValueType>/* Nullable<TransformString> */, crossReferenceString?: Nullable<PublicValueType>/* Nullable<CrossReferenceString> */, styleString?: Nullable<PublicValueType>/* Nullable<StyleString> */, formatString?: Nullable<PublicValueType>/* Nullable<FormatString> */): void;
readonly __doNotUseOrImplementIt: LanguageDefinition<AsmType, ContextType>["__doNotUseOrImplementIt"];
}
export declare function contextFromGrammarRegistry(registry?: GrammarRegistry): ContextWithScope<any, any>;
export declare interface AglLanguages {
readonly baseLanguageIdentity: PublicValueType/* LanguageIdentity */;
readonly expressionsLanguageIdentity: PublicValueType/* LanguageIdentity */;
readonly grammarLanguageIdentity: PublicValueType/* LanguageIdentity */;
readonly typesLanguageIdentity: PublicValueType/* LanguageIdentity */;
readonly crossReferenceLanguageIdentity: PublicValueType/* LanguageIdentity */;
readonly transformLanguageIdentity: PublicValueType/* LanguageIdentity */;
readonly styleLanguageIdentity: PublicValueType/* LanguageIdentity */;
readonly formatLanguageIdentity: PublicValueType/* LanguageIdentity */;
readonly base: LanguageDefinition<any, SentenceContext>;
readonly expressions: LanguageDefinition<Expression, ContextWithScope<any, any>>;
readonly grammar: LanguageDefinition<GrammarModel, ContextWithScope<any, any>>;
readonly types: LanguageDefinition<TypeModel, ContextWithScope<any, any>>;
readonly crossReference: LanguageDefinition<CrossReferenceModel, ContextFromTypeModel>;
readonly transform: LanguageDefinition<TransformModel, ContextFromGrammarAndTypeModel>;
readonly style: LanguageDefinition<AglStyleModel, ContextWithScope<any, any>>;
readonly format: LanguageDefinition<AglFormatModel, ContextWithScope<any, any>>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.agl.processor.AglLanguages": unique symbol;
};
}
export declare class LanguageRegistryDefault implements LanguageRegistry {
constructor();
get languages(): KtMap<PublicValueType/* LanguageIdentity */, LanguageDefinition<any /*UnknownType **/, any /*UnknownType **/>>;
get grammars(): KtList<Grammar>;
get agl(): AglLanguages;
registerFromDefinition<AsmType extends any, ContextType extends any>(definition: LanguageDefinition<AsmType, ContextType>): LanguageDefinition<AsmType, ContextType>;
register<AsmType extends any, ContextType extends any>(identity: PublicValueType/* LanguageIdentity */, aglOptions: Nullable<ProcessOptions<GrammarModel, ContextWithScope<any, any>>>, buildForDefaultGoal: boolean, configuration: LanguageProcessorConfiguration<AsmType, ContextType>): LanguageDefinition<AsmType, ContextType>;
registerFromLanguageObject<AsmType extends any, ContextType extends any>(languageObject: LanguageObject<AsmType, ContextType>): LanguageDefinition<AsmType, ContextType>;
unregister(identity: PublicValueType/* LanguageIdentity */): void;
findOrNull<AsmType extends any, ContextType extends any>(identity: PublicValueType/* LanguageIdentity */): Nullable<LanguageDefinition<AsmType, ContextType>>;
findWithNamespaceOrNull<AsmType extends any, ContextType extends any>(localNamespace: string, nameOrQName: string): Nullable<LanguageDefinition<AsmType, ContextType>>;
createLanguageDefinition<AsmType extends any, ContextType extends any>(identity: PublicValueType/* LanguageIdentity */, aglOptions: Nullable<ProcessOptions<GrammarModel, ContextWithScope<any, any>>>, configuration: Nullable<LanguageProcessorConfiguration<AsmType, ContextType>>): LanguageDefinition<AsmType, ContextType>;
findOrPlaceholder<AsmType extends any, ContextType extends any>(identity: PublicValueType/* LanguageIdentity */, aglOptions?: Nullable<ProcessOptions<GrammarModel, ContextWithScope<any, any>>>, configuration?: Nullable<LanguageProcessorConfiguration<AsmType, ContextType>>): LanguageDefinition<AsmType, ContextType>;
findGrammarOrNullByQualifiedName(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */): Nullable<Grammar>;
findGrammarOrNull(localNamespace: Namespace<Grammar>, nameOrQName: PossiblyQualifiedName): Nullable<Grammar>;
registerGrammar(grammar: Grammar): void;
unregisterGrammar(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */): void;
readonly __doNotUseOrImplementIt: LanguageRegistry["__doNotUseOrImplementIt"];
}
export declare class LanguageProcessorConfigurationBuilder<AsmType extends any, ContextType extends any> {
constructor(base: LanguageProcessorConfiguration<AsmType, ContextType>);
get base(): LanguageProcessorConfiguration<AsmType, ContextType>;
targetGrammarName(value: Nullable<string>): void;
defaultGoalRuleName(value: Nullable<string>): void;
grammarString(value: Nullable<PublicValueType>/* Nullable<GrammarString> */): void;
typesString(value: Nullable<PublicValueType>/* Nullable<TypesString> */): void;
transformString(value: Nullable<PublicValueType>/* Nullable<TransformString> */): void;
crossReferenceString(value: Nullable<PublicValueType>/* Nullable<CrossReferenceString> */): void;
styleString(value: Nullable<PublicValueType>/* Nullable<StyleString> */): void;
formatString(value: Nullable<PublicValueType>/* Nullable<FormatString> */): void;
scanner(scannerKind: ScannerKind, regexEngineKind: RegexEngineKind): void;
scannerResolver(func: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<Scanner>>): void;
parserResolver(func: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<Parser>>): void;
transformResolver(func: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<TransformModel>>): void;
typesResolver(func: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<TypeModel>>): void;
crossReferenceResolver(func: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<CrossReferenceModel>>): void;
syntaxAnalyserResolver(func: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<SyntaxAnalyser<AsmType>>>): void;
syntaxAnalyserResolverResult(func: () => SyntaxAnalyser<AsmType>): void;
semanticAnalyserResolver(value: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<SemanticAnalyser<AsmType, ContextType>>>): void;
semanticAnalyserResolverResult(func: () => SemanticAnalyser<AsmType, ContextType>): void;
formatResolver(func: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<AglFormatModel>>): void;
styleResolver(func: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<AglStyleModel>>): void;
completionProvider(value: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<CompletionProvider<AsmType, ContextType>>>): void;
build(): LanguageProcessorConfiguration<AsmType, ContextType>;
}
export declare class ProcessOptionsDefault<AsmType extends any, ContextType extends any> implements ProcessOptions<AsmType, ContextType> {
constructor(scan?: ScanOptions, parse?: ParseOptions, syntaxAnalysis?: SyntaxAnalysisOptions<AsmType>, semanticAnalysis?: SemanticAnalysisOptions<ContextType>, completionProvider?: CompletionProviderOptions<ContextType>);
get scan(): ScanOptions;
get parse(): ParseOptions;
get syntaxAnalysis(): SyntaxAnalysisOptions<AsmType>;
get semanticAnalysis(): SemanticAnalysisOptions<ContextType>;
get completionProvider(): CompletionProviderOptions<ContextType>;
clone(): ProcessOptionsDefault<AsmType, ContextType>;
readonly __doNotUseOrImplementIt: ProcessOptions<AsmType, ContextType>["__doNotUseOrImplementIt"];
}
export declare class SyntaxAnalysisOptionsDefault<AsmType extends any> implements SyntaxAnalysisOptions<AsmType> {
constructor(enabled?: boolean);
get enabled(): boolean;
set enabled(value: boolean);
clone(): SyntaxAnalysisOptionsDefault<AsmType>;
readonly __doNotUseOrImplementIt: SyntaxAnalysisOptions<AsmType>["__doNotUseOrImplementIt"];
}
export declare class SemanticAnalysisOptionsDefault<ContextType extends any> implements SemanticAnalysisOptions<ContextType> {
constructor(enabled?: boolean, locationMap?: LocationMap, context?: Nullable<ContextType>, buildScope?: boolean, replaceIfItemAlreadyExistsInScope?: boolean, ifItemAlreadyExistsInScopeIssueKind?: Nullable<LanguageIssueKind>, checkReferences?: boolean, resolveReferences?: boolean, other?: KtMap<string, any>);
get enabled(): boolean;
set enabled(value: boolean);
get locationMap(): LocationMap;
set locationMap(value: LocationMap);
get context(): Nullable<ContextType>;
set context(value: Nullable<ContextType>);
get buildScope(): boolean;
set buildScope(value: boolean);
get replaceIfItemAlreadyExistsInScope(): boolean;
set replaceIfItemAlreadyExistsInScope(value: boolean);
get ifItemAlreadyExistsInScopeIssueKind(): Nullable<LanguageIssueKind>;
set ifItemAlreadyExistsInScopeIssueKind(value: Nullable<LanguageIssueKind>);
get checkReferences(): boolean;
set checkReferences(value: boolean);
get resolveReferences(): boolean;
set resolveReferences(value: boolean);
get other(): KtMap<string, any>;
clone(): SemanticAnalysisOptionsDefault<ContextType>;
readonly __doNotUseOrImplementIt: SemanticAnalysisOptions<ContextType>["__doNotUseOrImplementIt"];
}
export declare class CompletionProviderOptionsDefault<ContextType extends any> implements CompletionProviderOptions<ContextType> {
constructor(context?: Nullable<ContextType>, depth?: number, path?: KtList<any/* Pair<number, number> */>, showOptionalItems?: boolean, provideValuesForPatternTerminals?: boolean, other?: KtMap<string, any>);
get context(): Nullable<ContextType>;
set context(value: Nullable<ContextType>);
get depth(): number;
set depth(value: number);
get path(): KtList<any/* Pair<number, number> */>;
set path(value: KtList<any/* Pair<number, number> */>);
get showOptionalItems(): boolean;
set showOptionalItems(value: boolean);
get provideValuesForPatternTerminals(): boolean;
set provideValuesForPatternTerminals(value: boolean);
get other(): KtMap<string, any>;
clone(): CompletionProviderOptionsDefault<ContextType>;
readonly __doNotUseOrImplementIt: CompletionProviderOptions<ContextType>["__doNotUseOrImplementIt"];
}
export declare class ScanOptionsBuilder {
constructor(base: ScanOptions);
enabled(value: boolean): void;
resultsByLine(value: boolean): void;
build(): ScanOptions;
}
export declare class ParseOptionsBuilder {
constructor(base: ParseOptions);
enabled(value: boolean): void;
goalRuleName(value: Nullable<string>): void;
sentenceIdentity(func: SentenceIdentityFunction): void;
reportErrors(value: boolean): void;
reportGrammarAmbiguities(value: boolean): void;
cacheSkip(value: boolean): void;
build(): ParseOptions;
}
export declare class ProcessOptionsBuilder<AsmType extends any, ContextType extends any> {
constructor(base: ProcessOptions<AsmType, ContextType>);
scan(init: (p0: ScanOptionsBuilder) => void): void;
parse(init: (p0: ParseOptionsBuilder) => void): void;
syntaxAnalysis(init: (p0: SyntaxAnalysisOptionsBuilder<AsmType, ContextType>) => void): void;
semanticAnalysis(init: (p0: SemanticAnalysisOptionsBuilder<AsmType, ContextType>) => void): void;
completionProvider(init: (p0: CompletionProviderOptionsBuilder<AsmType, ContextType>) => void): void;
build(): ProcessOptions<AsmType, ContextType>;
}
export declare class SyntaxAnalysisOptionsBuilder<AsmType extends any, ContextType extends any> {
constructor(base: SyntaxAnalysisOptions<AsmType>);
enabled(value: boolean): void;
build(): SyntaxAnalysisOptions<AsmType>;
}
export declare class SemanticAnalysisOptionsBuilder<AsmType extends any, ContextType extends any> {
constructor(base: SemanticAnalysisOptions<ContextType>);
enabled(value: boolean): void;
locationMap(value: LocationMap): void;
context(value: Nullable<ContextType>): void;
buildScope(value: boolean): void;
replaceIfItemAlreadyExistsInScope(value: boolean): void;
ifItemAlreadyExistsInScopeIssueKind(value: Nullable<LanguageIssueKind>): void;
checkReferences(value: boolean): void;
resolveReferences(value: boolean): void;
option(key: string, value: any): void;
build(): SemanticAnalysisOptions<ContextType>;
}
export declare class CompletionProviderOptionsBuilder<AsmType extends any, ContextType extends any> {
constructor(base: CompletionProviderOptions<ContextType>);
context(value: Nullable<ContextType>): void;
depth(value: number): void;
path(value: KtList<any/* Pair<number, number> */>): void;
showOptionalItems(value: boolean): void;
provideValuesForPatternTerminals(value: boolean): void;
option(key: string, value: any): void;
build(): CompletionProviderOptions<ContextType>;
}
export declare class LanguageProcessorResult<AsmType extends any, ContextType extends any> {
constructor(processor: Nullable<LanguageProcessor<AsmType, ContextType>>, issues: IssueCollection<LanguageIssue>);
get processor(): Nullable<LanguageProcessor<AsmType, ContextType>>;
get issues(): IssueCollection<LanguageIssue>;
}
export declare class SyntaxAnalysisResultDefault<AsmType extends any> implements SyntaxAnalysisResult<AsmType> {
constructor(asm: Nullable<AsmType>, issues: IssueCollection<LanguageIssue>, locationMap: LocationMap);
get asm(): Nullable<AsmType>;
get issues(): IssueCollection<LanguageIssue>;
get locationMap(): LocationMap;
copy(asm?: Nullable<AsmType>, issues?: IssueCollection<LanguageIssue>, locationMap?: LocationMap): SyntaxAnalysisResultDefault<AsmType>;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: SyntaxAnalysisResult<AsmType>["__doNotUseOrImplementIt"];
}
export declare class SemanticAnalysisResultDefault implements SemanticAnalysisResult {
constructor(resolvedReferences: KtList<ResolvedReference>, issues: IssueCollection<LanguageIssue>);
get resolvedReferences(): KtList<ResolvedReference>;
get issues(): IssueCollection<LanguageIssue>;
copy(resolvedReferences?: KtList<ResolvedReference>, issues?: IssueCollection<LanguageIssue>): SemanticAnalysisResultDefault;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: SemanticAnalysisResult["__doNotUseOrImplementIt"];
}
export declare class ProcessResultDefault<AsmType extends any> implements ProcessResult<AsmType> {
constructor(asm: Nullable<AsmType>, parse?: Nullable<ParseResult>, syntaxAnalysis?: Nullable<SyntaxAnalysisResult<AsmType>>, semanticAnalysis?: Nullable<SemanticAnalysisResult>, processIssues?: IssueCollection<LanguageIssue>);
get asm(): Nullable<AsmType>;
get parse(): Nullable<ParseResult>;
get syntaxAnalysis(): Nullable<SyntaxAnalysisResult<AsmType>>;
get semanticAnalysis(): Nullable<SemanticAnalysisResult>;
get processIssues(): IssueCollection<LanguageIssue>;
get allIssues(): IssueCollection<LanguageIssue>;
copy(asm?: Nullable<AsmType>, parse?: Nullable<ParseResult>, syntaxAnalysis?: Nullable<SyntaxAnalysisResult<AsmType>>, semanticAnalysis?: Nullable<SemanticAnalysisResult>, processIssues?: IssueCollection<LanguageIssue>): ProcessResultDefault<AsmType>;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: ProcessResult<AsmType>["__doNotUseOrImplementIt"];
}
export declare class FormatResultDefault implements FormatResult {
constructor(sentence: Nullable<string>, issues: IssueCollection<LanguageIssue>);
get sentence(): Nullable<string>;
get issues(): IssueCollection<LanguageIssue>;
copy(sentence?: Nullable<string>, issues?: IssueCollection<LanguageIssue>): FormatResultDefault;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: FormatResult["__doNotUseOrImplementIt"];
}
export declare class ExpectedAtResultDefault implements ExpectedAtResult {
constructor(offset: number, items: KtList<CompletionItem>, issues: IssueCollection<LanguageIssue>);
get offset(): number;
get items(): KtList<CompletionItem>;
get issues(): IssueCollection<LanguageIssue>;
copy(offset?: number, items?: KtList<CompletionItem>, issues?: IssueCollection<LanguageIssue>): ExpectedAtResultDefault;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: ExpectedAtResult["__doNotUseOrImplementIt"];
}
export declare class ContextFromTypeModelReference implements SentenceContext {
constructor(languageDefinitionId: PublicValueType/* LanguageIdentity */);
get languageDefinitionId(): PublicValueType/* LanguageIdentity */;
readonly __doNotUseOrImplementIt: SentenceContext["__doNotUseOrImplementIt"];
}
export declare class ContextFromTypeModel implements SentenceContext {
constructor(typeModel: TypeModel);
get typeModel(): TypeModel;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: SentenceContext["__doNotUseOrImplementIt"];
}
export declare function contextFromTypeModel(typeModel: TypeModel): ContextWithScope<any, any>;
export declare class CompletionProviderSimple extends CompletionProviderAbstract<Asm, ContextWithScope<any, any>> {
constructor(targetGrammar: Grammar, grammar2TypeModel: Grammar2TypeModelMapping, typeModel: TypeModel, crossReferenceModel: CrossReferenceModel);
get targetGrammar(): Grammar;
get grammar2TypeModel(): Grammar2TypeModelMapping;
get typeModel(): TypeModel;
get crossReferenceModel(): CrossReferenceModel;
get targetNamespace(): GrammarTypeNamespaceSimple;
provide(nextExpected: KtSet<Spine>, options: CompletionProviderOptions<ContextWithScope<any, any>>): KtList<CompletionItem>;
typeFor(rule: GrammarRule): Nullable<TypeInstance>;
}
export declare interface CreateScopedItem<ItemType, ItemInScopeType> {
invoke(qualifiedName: KtList<string>, item: ItemType, location: Nullable<InputLocation>): ItemInScopeType;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.agl.simple.CreateScopedItem": unique symbol;
};
}
export declare interface ResolveScopedItem<ItemType, ItemInScopeType> {
invoke(itemInScope: ItemInScopeType): Nullable<ItemType>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.agl.simple.ResolveScopedItem": unique symbol;
};
}
export declare class CreateScopedItemDefault<ItemType extends any, ItemInScopeType extends any> implements CreateScopedItem<ItemType, ItemInScopeType> {
constructor();
invoke(qualifiedName: KtList<string>, item: ItemType, location: Nullable<InputLocation>): ItemInScopeType;
readonly __doNotUseOrImplementIt: CreateScopedItem<ItemType, ItemInScopeType>["__doNotUseOrImplementIt"];
}
export declare class ResolveScopedItemDefault<ItemType extends any, ItemInScopeType extends any> implements ResolveScopedItem<ItemType, ItemInScopeType> {
constructor();
invoke(itemInScope: ItemInScopeType): Nullable<ItemType>;
readonly __doNotUseOrImplementIt: ResolveScopedItem<ItemType, ItemInScopeType>["__doNotUseOrImplementIt"];
}
export declare const NULL_SENTENCE_IDENTIFIER: {
getInstance(): {
toString(): string;
};
};
export declare class ContextWithScope<ItemType extends any, ItemInScopeType extends any> implements SentenceContext {
constructor(createScopedItem?: CreateScopedItem<ItemType, ItemInScopeType>, resolveScopedItem?: ResolveScopedItem<ItemType, ItemInScopeType>);
get createScopedItem(): CreateScopedItem<ItemType, ItemInScopeType>;
get resolveScopedItem(): ResolveScopedItem<ItemType, ItemInScopeType>;
get scopeForSentence(): KtMutableMap<any, ScopeSimple<ItemInScopeType>>;
get isEmpty(): boolean;
clear(): void;
newScopeForSentence(sentenceIdentity: Nullable<any>): Scope<ItemInScopeType>;
getScopeForSentenceOrNull(sentenceIdentity: Nullable<any>): Nullable<Scope<ItemInScopeType>>;
addToScope(sentenceIdentity: Nullable<any>, qualifiedName: KtList<string>, itemTypeName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, location: Nullable<InputLocation>, item: ItemInScopeType): void;
findItemsConformingTo(conformsToFunc: (p0: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */) => boolean): KtList<ItemInScope<ItemInScopeType>>;
findItemsNamedConformingTo(name: string, conformsToFunc: (p0: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */) => boolean): KtList<ItemInScope<ItemInScopeType>>;
findItemsByQualifiedNameConformingTo(qname: KtList<string>, conformsToFunc: (p0: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */) => boolean): KtList<ItemInScope<ItemInScopeType>>;
asString(indent?: Indent): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: SentenceContext["__doNotUseOrImplementIt"];
}
export declare class ContextFromGrammarAndTypeModel implements SentenceContext {
constructor(grammarModel: GrammarModel, typeModel: TypeModel);
get grammarModel(): GrammarModel;
get typeModel(): TypeModel;
copy(grammarModel?: GrammarModel, typeModel?: TypeModel): ContextFromGrammarAndTypeModel;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: SentenceContext["__doNotUseOrImplementIt"];
}
export declare class ReferenceExpressionContext<ItemInScopeType> {
constructor(element: AsmValue, scope: Scope<ItemInScopeType>);
get element(): AsmValue;
get scope(): Scope<ItemInScopeType>;
copy(element?: AsmValue, scope?: Scope<ItemInScopeType>): ReferenceExpressionContext<ItemInScopeType>;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare class ReferenceResolverSimple<ItemInScopeType extends any> implements AsmTreeWalker {
constructor(typeModel: TypeModel, crossReferenceModel: CrossReferenceModel, context: ContextWithScope<any, ItemInScopeType>, sentenceIdentity: Nullable<any>, identifyingValueInFor: (p0: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, p1: AsmStructure) => Nullable<any>, resolveFunction: Nullable<ResolveScopedItem<any, ItemInScopeType>>, _locationMap: LocationMap, _issues: IssueHolder);
get typeModel(): TypeModel;
get crossReferenceModel(): CrossReferenceModel;
get context(): ContextWithScope<any, ItemInScopeType>;
get sentenceIdentity(): Nullable<any>;
get identifyingValueInFor(): (p0: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, p1: AsmStructure) => Nullable<any>;
get resolveFunction(): Nullable<ResolveScopedItem<any, ItemInScopeType>>;
get resolvedReferences(): KtMutableList<ResolvedReference>;
beforeRoot(root: AsmValue): void;
afterRoot(root: AsmValue): void;
onNothing(owningProperty: Nullable<AsmStructureProperty>, value: AsmNothing): void;
onPrimitive(owningProperty: Nullable<AsmStructureProperty>, value: AsmPrimitive): void;
beforeStructure(owningProperty: Nullable<AsmStructureProperty>, value: AsmStructure): void;
onProperty(owner: AsmStructure, property: AsmStructureProperty): void;
afterStructure(owningProperty: Nullable<AsmStructureProperty>, value: AsmStructure): void;
beforeList(owningProperty: Nullable<AsmStructureProperty>, value: AsmList): void;
afterList(owningProperty: Nullable<AsmStructureProperty>, value: AsmList): void;
readonly __doNotUseOrImplementIt: AsmTreeWalker["__doNotUseOrImplementIt"];
}
export declare class ScopeCreator<ItemInScopeType extends any> implements AsmTreeWalker {
constructor(typeModel: TypeModel, crossReferenceModel: CrossReferenceModel, context: ContextWithScope<any, ItemInScopeType>, sentenceIdentity: Nullable<any>, replaceIfItemAlreadyExistsInScope: boolean, ifItemAlreadyExistsInScopeIssueKind: Nullable<LanguageIssueKind>, identifyingValueInFor: (p0: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, p1: AsmStructure) => Nullable<any>, locationMap: LocationMap, issues: IssueHolder);
get typeModel(): TypeModel;
get crossReferenceModel(): CrossReferenceModel;
get context(): ContextWithScope<any, ItemInScopeType>;
get sentenceIdentity(): Nullable<any>;
get replaceIfItemAlreadyExistsInScope(): boolean;
set replaceIfItemAlreadyExistsInScope(value: boolean);
get ifItemAlreadyExistsInScopeIssueKind(): Nullable<LanguageIssueKind>;
set ifItemAlreadyExistsInScopeIssueKind(value: Nullable<LanguageIssueKind>);
get identifyingValueInFor(): (p0: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, p1: AsmStructure) => Nullable<any>;
get locationMap(): LocationMap;
get issues(): IssueHolder;
get currentScope(): any/* MutableStack<Scope<ItemInScopeType>> */;
beforeRoot(root: AsmValue): void;
afterRoot(root: AsmValue): void;
onNothing(owningProperty: Nullable<AsmStructureProperty>, value: AsmNothing): void;
onPrimitive(owningProperty: Nullable<AsmStructureProperty>, value: AsmPrimitive): void;
beforeStructure(owningProperty: Nullable<AsmStructureProperty>, value: AsmStructure): void;
onProperty(owner: AsmStructure, property: AsmStructureProperty): void;
afterStructure(owningProperty: Nullable<AsmStructureProperty>, value: AsmStructure): void;
beforeList(owningProperty: Nullable<AsmStructureProperty>, value: AsmList): void;
afterList(owningProperty: Nullable<AsmStructureProperty>, value: AsmList): void;
readonly __doNotUseOrImplementIt: AsmTreeWalker["__doNotUseOrImplementIt"];
}
export declare class SemanticAnalyserSimple implements SemanticAnalyser<Asm, ContextWithScope<any, any>> {
constructor(typeModel: TypeModel, crossReferenceModel: CrossReferenceModel);
get typeModel(): TypeModel;
get crossReferenceModel(): CrossReferenceModel;
clear(): void;
analyse(sentenceIdentity: Nullable<any>, asm: Asm, locationMap: Nullable<LocationMap> | undefined, options: SemanticAnalysisOptions<ContextWithScope<any, any>>): SemanticAnalysisResult;
readonly __doNotUseOrImplementIt: SemanticAnalyser<Asm, ContextWithScope<any, any>>["__doNotUseOrImplementIt"];
static get Companion(): {
identifyingValueInFor(interpreter: ExpressionsInterpreterOverTypedObject<AsmValue>, crossReferenceModel: CrossReferenceModel, inScopeForTypeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, self: AsmStructure): Nullable<any>;
};
}
export declare class SyntaxAnalyserSimple extends SyntaxAnalyserFromAsmTransformAbstract<Asm, AsmValue> {
constructor(typeModel: TypeModel, asmTransformModel: TransformModel, relevantTrRuleSet: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */);
get embeddedSyntaxAnalyser(): KtMap<(PossiblyQualifiedName & PublicValueType)/* QualifiedName */, SyntaxAnalyser<Asm>>;
clear<T extends any>(done?: KtSet<SyntaxAnalyser<T>>): void;
}
export declare interface Grammar2TypeModelMapping {
typeNameFor(rule: GrammarRule): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
propertyNameFor(context: Grammar, ruleItem: RuleItem, ruleItemType: TypeDefinition): PublicValueType/* PropertyName */;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.agl.simple.Grammar2TypeModelMapping": unique symbol;
};
}
export declare function lower(_this_: string): string;
export declare class TypeModelFromGrammarConfigurationDefault implements Grammar2TypeModelMapping {
constructor();
typeNameFor(rule: GrammarRule): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
propertyNameFor(context: Grammar, ruleItem: RuleItem, ruleItemType: TypeDefinition): PublicValueType/* PropertyName */;
readonly __doNotUseOrImplementIt: Grammar2TypeModelMapping["__doNotUseOrImplementIt"];
}
export declare function contextAsmSimple(createScopedItem?: CreateScopedItem<any, any>, resolveScopedItem?: ResolveScopedItem<any, any>, init?: (p0: ContextBuilder) => void): ContextWithScope<any, any>;
export declare function contextAsmSimpleWithAsmPath(map?: KtMutableMap<string, any>, init?: (p0: ContextBuilder) => void): ContextWithScope<any, any>;
export declare class ContextBuilder {
constructor(createScopedItem: CreateScopedItem<any, any>, resolveScopedItem: ResolveScopedItem<any, any>);
forSentence(id: Nullable<any>, init?: (p0: ScopeBuilder<any>) => void): void;
build(): ContextWithScope<any, any>;
}
export declare class ScopeBuilder<ItemInScopeType extends any> {
constructor(_scope: ScopeSimple<ItemInScopeType>, _createScopedItem: CreateScopedItem<any, ItemInScopeType>, _resolveScopedItem: ResolveScopedItem<any, ItemInScopeType>);
item(id: string, qualifiedTypeName: string, location: Nullable<any>, itemInScope: ItemInScopeType): void;
scope(forReferenceInParent: string, forTypeName: string, init?: (p0: ScopeBuilder<ItemInScopeType>) => void): void;
scopedItem(id: string, qualifiedTypeName: string, location: Nullable<any>, itemInScope: ItemInScopeType, init?: (p0: ScopeBuilder<ItemInScopeType>) => void): void;
build(): void;
}
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare abstract class SyntaxAnalyserByMethodRegistrationAbstract<AsmType extends any> extends SyntaxAnalyserFromTreeDataAbstract<AsmType> {
constructor();
abstract registerHandlers(): void;
get asm(): AsmType;
walkTree(sentence: Sentence, treeData: TreeData, skipDataAsTree: boolean): void;
protected register<T>(handler: any/* KFunction3<SpptDataNodeInfo, KtList<Nullable<any>>, Sentence, Nullable<T>> */): void;
protected registerFor<T>(branchName: string, handler: any/* KFunction3<SpptDataNodeInfo, KtList<Nullable<any>>, Sentence, Nullable<T>> */): void;
protected registerForBeginHandler<T>(branchName: string, handler: any/* KFunction3<SpptDataNodeInfo, KtList<Nullable<any>>, Sentence, Nullable<T>> */): void;
clear<T extends any>(done?: KtSet<SyntaxAnalyser<T>>): void;
static get Companion(): {
};
}
export declare class NodeTrRules {
constructor(forNode: TransformationRule, forChildren: TransformationRule);
get forNode(): TransformationRule;
get forChildren(): TransformationRule;
static new_net_akehurst_language_agl_syntaxAnalyser_NodeTrRules(t: TransformationRule): NodeTrRules;
copy(forNode?: TransformationRule, forChildren?: TransformationRule): NodeTrRules;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare class DownData2 {
constructor(path: ParsePath, trRule: NodeTrRules);
get path(): ParsePath;
get trRule(): NodeTrRules;
copy(path?: ParsePath, trRule?: NodeTrRules): DownData2;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare class ChildData<AsmValueType extends any> {
constructor(nodeInfo: SpptDataNodeInfo, value: Nullable<TypedObject<AsmValueType>>);
get nodeInfo(): SpptDataNodeInfo;
get value(): Nullable<TypedObject<AsmValueType>>;
copy(nodeInfo?: SpptDataNodeInfo, value?: Nullable<TypedObject<AsmValueType>>): ChildData<AsmValueType>;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare abstract class SyntaxAnalyserFromAsmTransformAbstract<AsmType extends any, AsmValueType extends any> extends SyntaxAnalyserFromTreeDataAbstract<AsmType> {
constructor(_typeModel: TypeModel, asmTransformModel: TransformModel, relevantTrRuleSet: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, asmFactory: AsmFactory<AsmType, AsmValueType>);
get asmTransformModel(): TransformModel;
get relevantTrRuleSet(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get asmFactory(): AsmFactory<AsmType, AsmValueType>;
get typeModel(): TypeModel;
get asm(): AsmType;
get relevantRuleSet(): TransformRuleSet;
get _trf(): AsmTransformInterpreter<AsmValueType>;
clear<T extends any>(done?: KtSet<SyntaxAnalyser<T>>): void;
walkTree(sentence: Sentence, treeData: TreeData, skipDataAsTree: boolean): void;
static get Companion(): {
get CONFIGURATION_KEY_AGL_SCOPE_MODEL(): string;
};
}
export declare class LocationMapDefault implements LocationMap {
constructor();
clear(): void;
get(obj: Nullable<any>): Nullable<InputLocation>;
getByPath(obj: Nullable<any>, path: ParsePath): Nullable<InputLocation>;
add(path: ParsePath, obj: any, location: InputLocation): void;
readonly __doNotUseOrImplementIt: LocationMap["__doNotUseOrImplementIt"];
}
export declare abstract class SyntaxAnalyserFromTreeDataAbstract<AsmType extends any> implements SyntaxAnalyser<AsmType> {
constructor();
get locationMap(): LocationMapDefault;
get issues(): IssueHolder;
abstract get asm(): AsmType;
get extendsSyntaxAnalyser(): KtMap<(PossiblyQualifiedName & PublicValueType)/* QualifiedName */, SyntaxAnalyser<any /*UnknownType **/>>;
get embeddedSyntaxAnalyser(): KtMap<(PossiblyQualifiedName & PublicValueType)/* QualifiedName */, SyntaxAnalyser<any /*UnknownType **/>>;
setLocationFor(obj: any, nodeInfo: SpptDataNodeInfo, sentence: Sentence): void;
setEmbeddedSyntaxAnalyser(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, sa: SyntaxAnalyser<AsmType>): void;
clear<T extends any>(done?: KtSet<SyntaxAnalyser<T>>): void;
transform(sppt: SharedPackedParseTree, mapToGrammar: (p0: number, p1: number) => Nullable<RuleItem>): SyntaxAnalysisResult<AsmType>;
abstract walkTree(sentence: Sentence, treeData: TreeData, skipDataAsTree: boolean): void;
locationForNode(sentence: Sentence, node: SpptDataNode): InputLocation;
readonly __doNotUseOrImplementIt: SyntaxAnalyser<AsmType>["__doNotUseOrImplementIt"];
}
export declare class SyntaxAnalyserGeneratorKotlin {
constructor();
generateFor(grammar: Grammar): string;
}
export declare class NodeTypes {
constructor(forNode: TypeInstance, forChildren: TypeInstance);
get forNode(): TypeInstance;
get forChildren(): TypeInstance;
static new_net_akehurst_language_agl_syntaxAnalyser_NodeTypes(t: TypeInstance): NodeTypes;
copy(forNode?: TypeInstance, forChildren?: TypeInstance): NodeTypes;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare class DownData {
constructor(path: AsmPath, typeUse: NodeTypes);
get path(): AsmPath;
get typeUse(): NodeTypes;
copy(path?: AsmPath, typeUse?: NodeTypes): DownData;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare class ChildDataAny {
constructor(nodeInfo: SpptDataNodeInfo, value: Nullable<any>);
get nodeInfo(): SpptDataNodeInfo;
get value(): Nullable<any>;
copy(nodeInfo?: SpptDataNodeInfo, value?: Nullable<any>): ChildDataAny;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare abstract class SyntaxAnalyserSimpleStreamPushAbstract<AsmType extends any> extends SyntaxAnalyserFromTreeDataAbstract<AsmType> {
constructor(grammarNamespaceQualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, typeModel: TypeModel, scopeModel: CrossReferenceModel);
get grammarNamespaceQualifiedName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get typeModel(): TypeModel;
get scopeModel(): CrossReferenceModel;
abstract startAsm(): void;
abstract finishAsm(): void;
abstract primitive(type: PrimitiveType, value: Nullable<string>): void;
abstract startList(): void;
abstract finishList(): void;
abstract startListSeparated(): void;
abstract finishListSeparated(): void;
abstract listElement(): void;
abstract startAsmElement(path: AsmPath, type: DataType): void;
abstract finishAsmElement(path: AsmPath, type: DataType): void;
abstract startTuple(): void;
abstract finishTuple(path: AsmPath): void;
abstract startProperty(declaration: PropertyDeclaration, isRef: boolean): void;
abstract finishProperty(declaration: PropertyDeclaration, isRef: boolean): void;
walkTree(sentence: Sentence, treeData: TreeData, skipDataAsTree: boolean): void;
clear<T extends any>(done?: KtSet<SyntaxAnalyser<T>>): void;
static get Companion(): {
get CONFIGURATION_KEY_AGL_SCOPE_MODEL(): string;
};
}
export declare interface AsmFactory<AsmType extends any, AsmValueType extends any> extends ObjectGraph<AsmValueType> {
constructAsm(): AsmType;
rootList(asm: AsmType): KtList<AsmValueType>;
addRoot(asm: AsmType, root: AsmValueType): boolean;
removeRoot(asm: AsmType, root: AsmValueType): boolean;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.syntaxAnalyser.AsmFactory": unique symbol;
} & ObjectGraph<AsmValueType>["__doNotUseOrImplementIt"];
}
export declare interface AsmWalker<AsmType extends any, AsmValueType extends any, AsmStructureType extends AsmValueType, PropertyType, ListValueType> {
beforeRoot(root: AsmValueType): void;
afterRoot(root: AsmValueType): void;
onNothing(owningProperty: Nullable<PropertyType>, value: AsmValueType): void;
onPrimitive(owningProperty: Nullable<PropertyType>, value: AsmValueType): void;
beforeStructure(owningProperty: Nullable<PropertyType>, value: AsmStructureType): void;
onProperty(owner: AsmStructureType, property: PropertyType): void;
afterStructure(owningProperty: Nullable<PropertyType>, value: AsmStructureType): void;
beforeList(owningProperty: Nullable<PropertyType>, value: ListValueType): void;
afterList(owningProperty: Nullable<PropertyType>, value: ListValueType): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.syntaxAnalyser.AsmWalker": unique symbol;
};
}
export declare interface LocationMap {
clear(): void;
add(path: ParsePath, obj: any, location: InputLocation): void;
get(obj: Nullable<any>): Nullable<InputLocation>;
getByPath(obj: Nullable<any>, path: ParsePath): Nullable<InputLocation>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.syntaxAnalyser.LocationMap": unique symbol;
};
}
export declare interface SyntaxAnalyser<AsmType extends any> {
readonly locationMap: LocationMap;
readonly extendsSyntaxAnalyser: KtMap<(PossiblyQualifiedName & PublicValueType)/* QualifiedName */, SyntaxAnalyser<any /*UnknownType **/>>;
readonly embeddedSyntaxAnalyser: KtMap<(PossiblyQualifiedName & PublicValueType)/* QualifiedName */, SyntaxAnalyser<any /*UnknownType **/>>;
clear<T extends any>(done?: KtSet<SyntaxAnalyser<T>>): void;
transform(sppt: SharedPackedParseTree, mapToGrammar: (p0: number, p1: number) => Nullable<RuleItem>): SyntaxAnalysisResult<AsmType>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.syntaxAnalyser.SyntaxAnalyser": unique symbol;
};
}
export declare abstract class CompletionItemKind {
private constructor();
static get PATTERN(): CompletionItemKind & {
get name(): "PATTERN";
get ordinal(): 0;
};
static get LITERAL(): CompletionItemKind & {
get name(): "LITERAL";
get ordinal(): 1;
};
static get SEGMENT(): CompletionItemKind & {
get name(): "SEGMENT";
get ordinal(): 2;
};
static get REFERRED(): CompletionItemKind & {
get name(): "REFERRED";
get ordinal(): 3;
};
get name(): "PATTERN" | "LITERAL" | "SEGMENT" | "REFERRED";
get ordinal(): 0 | 1 | 2 | 3;
static values(): Array<CompletionItemKind>;
static valueOf(value: string): CompletionItemKind;
}
export declare class CompletionItem {
constructor(kind: CompletionItemKind, label: string, text: string);
get kind(): CompletionItemKind;
get label(): string;
get text(): string;
get id(): Nullable<number>;
set id(value: Nullable<number>);
get description(): string;
set description(value: string);
copy(kind?: CompletionItemKind, label?: string, text?: string): CompletionItem;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare interface SpineNode {
readonly rule: GrammarRule;
readonly nextChildNumber: number;
readonly nextExpectedItems: KtSet<RuleItem>;
readonly expectedNextLeafNonTerminalOrTerminal: KtSet<TangibleItem>;
readonly nextExpectedConcatenation: KtSet<Concatenation>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.processor.SpineNode": unique symbol;
};
}
export declare interface Spine {
readonly expectedNextLeafNonTerminalOrTerminal: KtSet<TangibleItem>;
readonly expectedNextRuleItems: KtSet<RuleItem>;
readonly elements: KtList<SpineNode>;
readonly nextChildNumber: number;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.processor.Spine": unique symbol;
};
}
export declare interface CompletionProvider<AsmType extends any, ContextType extends any> {
provide(nextExpected: KtSet<Spine>, options: CompletionProviderOptions<ContextType>): KtList<CompletionItem>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.processor.CompletionProvider": unique symbol;
};
}
export declare interface Formatter<AsmType> {
readonly formatModel: AglFormatModel;
format(formatSetName: PossiblyQualifiedName, asm: AsmType): FormatResult;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.processor.Formatter": unique symbol;
};
}
export declare interface GrammarRegistry {
readonly grammars: KtList<Grammar>;
registerGrammar(grammar: Grammar): void;
findGrammarOrNull(localNamespace: Namespace<Grammar>, nameOrQName: PossiblyQualifiedName): Nullable<Grammar>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.processor.GrammarRegistry": unique symbol;
};
}
export declare interface LanguageRegistry extends GrammarRegistry {
readonly agl: AglLanguages;
readonly languages: KtMap<PublicValueType/* LanguageIdentity */, LanguageDefinition<any /*UnknownType **/, any /*UnknownType **/>>;
register<AsmType extends any, ContextType extends any>(identity: PublicValueType/* LanguageIdentity */, aglOptions: Nullable<ProcessOptions<GrammarModel, ContextWithScope<any, any>>>, buildForDefaultGoal: boolean, configuration: LanguageProcessorConfiguration<AsmType, ContextType>): LanguageDefinition<AsmType, ContextType>;
unregister(identity: PublicValueType/* LanguageIdentity */): void;
findOrNull<AsmType extends any, ContextType extends any>(identity: PublicValueType/* LanguageIdentity */): Nullable<LanguageDefinition<AsmType, ContextType>>;
findOrPlaceholder<AsmType extends any, ContextType extends any>(identity: PublicValueType/* LanguageIdentity */, aglOptions?: Nullable<ProcessOptions<GrammarModel, ContextWithScope<any, any>>>, configuration?: Nullable<LanguageProcessorConfiguration<AsmType, ContextType>>): LanguageDefinition<AsmType, ContextType>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.processor.LanguageRegistry": unique symbol;
} & GrammarRegistry["__doNotUseOrImplementIt"];
}
export declare interface LanguageDefinition<AsmType extends any, ContextType extends any> {
readonly identity: PublicValueType/* LanguageIdentity */;
readonly isModifiable: boolean;
readonly grammarString: Nullable<PublicValueType>/* Nullable<GrammarString> */;
readonly grammarModel: Nullable<GrammarModel>;
readonly targetGrammar: Nullable<Grammar>;
readonly targetGrammarName: Nullable<PossiblyQualifiedName & PublicValueType>/* Nullable<SimpleName> */;
readonly defaultGoalRule: Nullable<PublicValueType>/* Nullable<GrammarRuleName> */;
readonly typesString: Nullable<PublicValueType>/* Nullable<TypesString> */;
readonly typesModel: Nullable<TypeModel>;
readonly transformString: Nullable<PublicValueType>/* Nullable<TransformString> */;
readonly transformModel: Nullable<TransformModel>;
readonly crossReferenceString: Nullable<PublicValueType>/* Nullable<CrossReferenceString> */;
readonly crossReferenceModel: Nullable<CrossReferenceModel>;
configuration: LanguageProcessorConfiguration<AsmType, ContextType>;
readonly syntaxAnalyser: Nullable<SyntaxAnalyser<AsmType>>;
readonly semanticAnalyser: Nullable<SemanticAnalyser<AsmType, ContextType>>;
readonly formatString: Nullable<PublicValueType>/* Nullable<FormatString> */;
readonly formatter: Nullable<Formatter<AsmType>>;
readonly processor: Nullable<LanguageProcessor<AsmType, ContextType>>;
readonly styleString: Nullable<PublicValueType>/* Nullable<StyleString> */;
readonly styleModel: Nullable<AglStyleModel>;
readonly issues: IssueCollection<LanguageIssue>;
readonly processorObservers: KtMutableList<(p0: Nullable<LanguageProcessor<AsmType, ContextType>>, p1: Nullable<LanguageProcessor<AsmType, ContextType>>) => void>;
readonly grammarStrObservers: KtMutableList<(p0: Nullable<PublicValueType>/* Nullable<GrammarString> */, p1: Nullable<PublicValueType>/* Nullable<GrammarString> */) => void>;
readonly grammarObservers: KtMutableList<(p0: Nullable<GrammarModel>, p1: Nullable<GrammarModel>) => void>;
readonly typeModelStrObservers: KtMutableList<(p0: Nullable<PublicValueType>/* Nullable<TypesString> */, p1: Nullable<PublicValueType>/* Nullable<TypesString> */) => void>;
readonly asmTransformStrObservers: KtMutableList<(p0: Nullable<PublicValueType>/* Nullable<TransformString> */, p1: Nullable<PublicValueType>/* Nullable<TransformString> */) => void>;
readonly crossReferenceStrObservers: KtMutableList<(p0: Nullable<PublicValueType>/* Nullable<CrossReferenceString> */, p1: Nullable<PublicValueType>/* Nullable<CrossReferenceString> */) => void>;
readonly formatterStrObservers: KtMutableList<(p0: Nullable<PublicValueType>/* Nullable<FormatString> */, p1: Nullable<PublicValueType>/* Nullable<FormatString> */) => void>;
readonly styleStrObservers: KtMutableList<(p0: Nullable<PublicValueType>/* Nullable<StyleString> */, p1: Nullable<PublicValueType>/* Nullable<StyleString> */) => void>;
update(grammarString?: Nullable<PublicValueType>/* Nullable<GrammarString> */, typesString?: Nullable<PublicValueType>/* Nullable<TypesString> */, transformString?: Nullable<PublicValueType>/* Nullable<TransformString> */, crossReferenceString?: Nullable<PublicValueType>/* Nullable<CrossReferenceString> */, styleString?: Nullable<PublicValueType>/* Nullable<StyleString> */, formatString?: Nullable<PublicValueType>/* Nullable<FormatString> */): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.processor.LanguageDefinition": unique symbol;
};
}
export declare interface LanguageProcessor<AsmType extends any, ContextType extends any> {
readonly configuration: LanguageProcessorConfiguration<AsmType, ContextType>;
readonly issues: IssueCollection<LanguageIssue>;
readonly grammarModel: Nullable<GrammarModel>;
readonly targetGrammar: Nullable<Grammar>;
readonly targetRuleSet: Nullable<RuleSet>;
readonly scanner: Nullable<Scanner>;
readonly spptParser: SPPTParser;
readonly parser: Nullable<Parser>;
readonly baseTypeModel: TypeModel;
readonly typesModel: TypeModel;
readonly transformModel: TransformModel;
readonly targetTransformRuleSet: TransformRuleSet;
readonly crossReferenceModel: CrossReferenceModel;
readonly formatModel: Nullable<AglFormatModel>;
readonly syntaxAnalyser: Nullable<SyntaxAnalyser<AsmType>>;
readonly semanticAnalyser: Nullable<SemanticAnalyser<AsmType, ContextType>>;
readonly formatter: Nullable<Formatter<AsmType>>;
readonly completionProvider: Nullable<CompletionProvider<AsmType, ContextType>>;
interrupt(message: string): void;
parseOptionsDefault(): ParseOptions;
optionsDefault(): ProcessOptions<AsmType, ContextType>;
buildFor(options?: Nullable<ParseOptions>): LanguageProcessor<AsmType, ContextType>;
usedAutomatonFor(goalRuleName: string): Automaton;
scan(sentence: string, options?: Nullable<ScanOptions>): ScanResult;
parse(sentence: string, options?: Nullable<ParseOptions>): ParseResult;
syntaxAnalysis(sppt: SharedPackedParseTree, options?: Nullable<ProcessOptions<AsmType, ContextType>>): SyntaxAnalysisResult<AsmType>;
semanticAnalysis(asm: AsmType, options?: Nullable<ProcessOptions<AsmType, ContextType>>): SemanticAnalysisResult;
process(sentence: string, options?: Nullable<ProcessOptions<AsmType, ContextType>>): ProcessResult<AsmType>;
format(sentence: string, options?: Nullable<ProcessOptions<AsmType, ContextType>>): FormatResult;
formatAsm(asm: AsmType, options?: Nullable<ProcessOptions<AsmType, ContextType>>): FormatResult;
expectedTerminalsAt(sentence: string, position: number, options?: Nullable<ProcessOptions<AsmType, ContextType>>): ExpectedAtResult;
expectedItemsAt(sentence: string, position: number, options?: Nullable<ProcessOptions<AsmType, ContextType>>): ExpectedAtResult;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.processor.LanguageProcessor": unique symbol;
};
}
export declare interface LanguageProcessorConfiguration<AsmType extends any, ContextType extends any> {
readonly targetGrammarName: Nullable<PossiblyQualifiedName & PublicValueType>/* Nullable<SimpleName> */;
readonly defaultGoalRuleName: Nullable<PublicValueType>/* Nullable<GrammarRuleName> */;
readonly regexEngineKind: RegexEngineKind;
readonly scannerKind: ScannerKind;
readonly grammarString: Nullable<PublicValueType>/* Nullable<GrammarString> */;
readonly typesString: Nullable<PublicValueType>/* Nullable<TypesString> */;
readonly transformString: Nullable<PublicValueType>/* Nullable<TransformString> */;
readonly crossReferenceString: Nullable<PublicValueType>/* Nullable<CrossReferenceString> */;
readonly styleString: Nullable<PublicValueType>/* Nullable<StyleString> */;
readonly formatString: Nullable<PublicValueType>/* Nullable<FormatString> */;
readonly scannerResolver: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<Scanner>>;
readonly parserResolver: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<Parser>>;
readonly typesResolver: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<TypeModel>>;
readonly transformResolver: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<TransformModel>>;
readonly crossReferenceResolver: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<CrossReferenceModel>>;
readonly syntaxAnalyserResolver: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<SyntaxAnalyser<AsmType>>>;
readonly semanticAnalyserResolver: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<SemanticAnalyser<AsmType, ContextType>>>;
readonly styleResolver: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<AglStyleModel>>;
readonly formatResolver: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<AglFormatModel>>;
readonly completionProviderResolver: Nullable<(p0: LanguageProcessor<AsmType, ContextType>) => ProcessResult<CompletionProvider<AsmType, ContextType>>>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.processor.LanguageProcessorConfiguration": unique symbol;
};
}
export declare abstract class ParserKind {
private constructor();
static get GLC(): ParserKind & {
get name(): "GLC";
get ordinal(): 0;
};
get name(): "GLC";
get ordinal(): 0;
static values(): Array<ParserKind>;
static valueOf(value: string): ParserKind;
}
export declare interface LanguageObject<AsmType extends any, ContextType extends any> {
readonly identity: PublicValueType/* LanguageIdentity */;
readonly grammarString: string;
readonly typesString: string;
readonly kompositeString: string;
readonly asmTransformString: string;
readonly crossReferenceString: string;
readonly styleString: string;
readonly formatString: string;
readonly grammarModel: GrammarModel;
readonly typesModel: TypeModel;
readonly kompositeModel: TypeModel;
readonly asmTransformModel: TransformModel;
readonly crossReferenceModel: CrossReferenceModel;
readonly styleModel: AglStyleModel;
readonly formatModel: AglFormatModel;
readonly defaultTargetGrammar: Grammar;
readonly defaultTargetGoalRule: string;
readonly syntaxAnalyser: Nullable<SyntaxAnalyser<AsmType>>;
readonly semanticAnalyser: Nullable<SemanticAnalyser<AsmType, ContextType>>;
readonly completionProvider: Nullable<CompletionProvider<AsmType, ContextType>>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.processor.LanguageObject": unique symbol;
};
}
export declare abstract class LanguageObjectAbstract<AsmType extends any, ContextType extends any> implements LanguageObject<AsmType, ContextType> {
constructor();
get kompositeModel(): TypeModel;
get grammarString(): string;
get typesString(): string;
get kompositeString(): string;
get asmTransformString(): string;
get crossReferenceString(): string;
get styleString(): string;
get formatString(): string;
get ruleSet(): RuleSet;
get mapToGrammar(): (p0: number, p1: number) => RuleItem;
get automata(): KtMap<string, Automaton>;
get syntaxAnalyser(): Nullable<SyntaxAnalyser<AsmType>>;
get semanticAnalyser(): Nullable<SemanticAnalyser<AsmType, ContextType>>;
abstract get identity(): PublicValueType/* LanguageIdentity */;
abstract get grammarModel(): GrammarModel;
abstract get typesModel(): TypeModel;
abstract get asmTransformModel(): TransformModel;
abstract get crossReferenceModel(): CrossReferenceModel;
abstract get styleModel(): AglStyleModel;
abstract get formatModel(): AglFormatModel;
abstract get defaultTargetGrammar(): Grammar;
abstract get defaultTargetGoalRule(): string;
abstract get completionProvider(): Nullable<CompletionProvider<AsmType, ContextType>>;
readonly __doNotUseOrImplementIt: LanguageObject<AsmType, ContextType>["__doNotUseOrImplementIt"];
static get Companion(): {
get GOAL_RULE(): number;
get OP_NONE(): any/* OptionNum */;
get SR(): number;
get ER(): number;
get WIDTH(): ParseAction;
get HEIGHT(): ParseAction;
get GRAFT(): ParseAction;
get GOAL(): ParseAction;
};
}
export declare interface SyntaxAnalysisOptions<AsmType extends any> {
enabled: boolean;
clone(): SyntaxAnalysisOptions<AsmType>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.processor.SyntaxAnalysisOptions": unique symbol;
};
}
export declare interface SemanticAnalysisOptions<ContextType extends any> {
enabled: boolean;
locationMap: LocationMap;
context: Nullable<ContextType>;
buildScope: boolean;
replaceIfItemAlreadyExistsInScope: boolean;
ifItemAlreadyExistsInScopeIssueKind: Nullable<LanguageIssueKind>;
checkReferences: boolean;
resolveReferences: boolean;
readonly other: KtMap<string, any>;
clone(): SemanticAnalysisOptions<ContextType>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.processor.SemanticAnalysisOptions": unique symbol;
};
}
export declare interface CompletionProviderOptions<ContextType extends any> {
context: Nullable<ContextType>;
depth: number;
path: KtList<any/* Pair<number, number> */>;
showOptionalItems: boolean;
provideValuesForPatternTerminals: boolean;
readonly other: KtMap<string, any>;
clone(): CompletionProviderOptions<ContextType>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.processor.CompletionProviderOptions": unique symbol;
};
}
export declare interface ProcessOptions<AsmType extends any, ContextType extends any> {
readonly scan: ScanOptions;
readonly parse: ParseOptions;
readonly syntaxAnalysis: SyntaxAnalysisOptions<AsmType>;
readonly semanticAnalysis: SemanticAnalysisOptions<ContextType>;
readonly completionProvider: CompletionProviderOptions<ContextType>;
clone(): ProcessOptions<AsmType, ContextType>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.processor.ProcessOptions": unique symbol;
};
}
export declare interface SyntaxAnalysisResult<AsmType extends any> {
readonly asm: Nullable<AsmType>;
readonly issues: IssueCollection<LanguageIssue>;
readonly locationMap: LocationMap;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.processor.SyntaxAnalysisResult": unique symbol;
};
}
export declare class ResolvedReference {
constructor(source: Nullable<any>, sourceLocation: Nullable<InputLocation>, target: Nullable<any>, targetLocation: Nullable<InputLocation>);
get source(): Nullable<any>;
get sourceLocation(): Nullable<InputLocation>;
get target(): Nullable<any>;
get targetLocation(): Nullable<InputLocation>;
copy(source?: Nullable<any>, sourceLocation?: Nullable<InputLocation>, target?: Nullable<any>, targetLocation?: Nullable<InputLocation>): ResolvedReference;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare interface SemanticAnalysisResult {
readonly resolvedReferences: KtList<ResolvedReference>;
readonly issues: IssueCollection<LanguageIssue>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.processor.SemanticAnalysisResult": unique symbol;
};
}
export declare interface ProcessResult<AsmType extends any> {
readonly asm: Nullable<AsmType>;
readonly parse: Nullable<ParseResult>;
readonly syntaxAnalysis: Nullable<SyntaxAnalysisResult<AsmType>>;
readonly semanticAnalysis: Nullable<SemanticAnalysisResult>;
readonly processIssues: IssueCollection<LanguageIssue>;
readonly allIssues: IssueCollection<LanguageIssue>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.processor.ProcessResult": unique symbol;
};
}
export declare interface FormatResult {
readonly sentence: Nullable<string>;
readonly issues: IssueCollection<LanguageIssue>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.processor.FormatResult": unique symbol;
};
}
export declare interface ExpectedAtResult {
readonly offset: number;
readonly items: KtList<CompletionItem>;
readonly issues: IssueCollection<LanguageIssue>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.processor.ExpectedAtResult": unique symbol;
};
}
export declare interface SemanticAnalyser<AsmType extends any, ContextType extends any> {
clear(): void;
analyse(sentenceIdentity: Nullable<any>, asm: AsmType, locationMap: Nullable<LocationMap> | undefined, options: SemanticAnalysisOptions<ContextType>): SemanticAnalysisResult;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.semanticAnalyser.SemanticAnalyser": unique symbol;
};
}
export declare interface SentenceContext {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.api.semanticAnalyser.SentenceContext": unique symbol;
};
}
export declare interface AsmPath {
readonly value: string;
readonly segments: KtList<string>;
readonly parent: Nullable<AsmPath>;
plus(segment: string): AsmPath;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.asm.api.AsmPath": unique symbol;
};
}
export declare interface Asm {
readonly root: KtList<AsmValue>;
readonly elementIndex: KtMap<AsmPath, AsmStructure>;
addToIndex(value: AsmStructure): void;
traverseDepthFirst(callback: AsmTreeWalker): void;
asString(currentIndent?: string, indentIncrement?: string): string;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.asm.api.Asm": unique symbol;
};
}
export declare interface AsmValue {
readonly qualifiedTypeName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
readonly typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
asString(currentIndent?: string, indentIncrement?: string): string;
equalTo(other: AsmValue): boolean;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.asm.api.AsmValue": unique symbol;
};
}
export declare interface AsmNothing extends AsmValue {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.asm.api.AsmNothing": unique symbol;
} & AsmValue["__doNotUseOrImplementIt"];
}
export declare interface AsmAny extends AsmValue {
readonly value: any;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.asm.api.AsmAny": unique symbol;
} & AsmValue["__doNotUseOrImplementIt"];
}
export declare interface AsmPrimitive extends AsmValue {
readonly value: any;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.asm.api.AsmPrimitive": unique symbol;
} & AsmValue["__doNotUseOrImplementIt"];
}
export declare interface AsmReference {
readonly reference: string;
readonly value: Nullable<AsmStructure>;
resolveAs(value: Nullable<AsmStructure>): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.asm.api.AsmReference": unique symbol;
};
}
export declare interface AsmStructure extends AsmValue {
readonly parsePath: string;
semanticPath: Nullable<AsmPath>;
readonly property: KtMap<PublicValueType/* PropertyValueName */, AsmStructureProperty>;
readonly propertyOrdered: KtList<AsmStructureProperty>;
readonly children: KtList<AsmValue>;
hasProperty(name: PublicValueType/* PropertyValueName */): boolean;
getProperty(name: PublicValueType/* PropertyValueName */): AsmValue;
getPropertyOrNothing(name: PublicValueType/* PropertyValueName */): AsmValue;
setProperty(name: PublicValueType/* PropertyValueName */, value: AsmValue, childIndex: number): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.asm.api.AsmStructure": unique symbol;
} & AsmValue["__doNotUseOrImplementIt"];
}
export declare interface AsmStructureProperty {
readonly name: PublicValueType/* PropertyValueName */;
readonly value: AsmValue;
readonly index: number;
readonly isReference: boolean;
convertToReferenceTo(referredValue: Nullable<AsmStructure>): void;
equalTo(other: AsmStructureProperty): boolean;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.asm.api.AsmStructureProperty": unique symbol;
};
}
export declare interface AsmList extends AsmValue {
readonly elements: KtList<AsmValue>;
readonly isEmpty: boolean;
readonly isNotEmpty: boolean;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.asm.api.AsmList": unique symbol;
} & AsmValue["__doNotUseOrImplementIt"];
}
export declare interface AsmListSeparated extends AsmList {
readonly elements: KtList<AsmValue>/* ListSeparated<AsmValue, AsmValue, AsmValue> */;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.asm.api.AsmListSeparated": unique symbol;
} & AsmList["__doNotUseOrImplementIt"];
}
export declare interface AsmLambda extends AsmValue {
invoke(args: KtMap<string, AsmValue>): AsmValue;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.asm.api.AsmLambda": unique symbol;
} & AsmValue["__doNotUseOrImplementIt"];
}
export declare interface AsmTreeWalker {
beforeRoot(root: AsmValue): void;
afterRoot(root: AsmValue): void;
onNothing(owningProperty: Nullable<AsmStructureProperty>, value: AsmNothing): void;
onPrimitive(owningProperty: Nullable<AsmStructureProperty>, value: AsmPrimitive): void;
beforeStructure(owningProperty: Nullable<AsmStructureProperty>, value: AsmStructure): void;
onProperty(owner: AsmStructure, property: AsmStructureProperty): void;
afterStructure(owningProperty: Nullable<AsmStructureProperty>, value: AsmStructure): void;
beforeList(owningProperty: Nullable<AsmStructureProperty>, value: AsmList): void;
afterList(owningProperty: Nullable<AsmStructureProperty>, value: AsmList): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.asm.api.AsmTreeWalker": unique symbol;
};
}
export declare const AglAsm: {
getInstance(): {
get komposite(): string;
get typeModel(): TypeModel;
};
};
export declare class AsmPathSimple implements AsmPath {
constructor(value: string);
get value(): string;
get segments(): KtList<string>;
get parent(): Nullable<AsmPath>;
plus(segment: string): AsmPathSimple;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: AsmPath["__doNotUseOrImplementIt"];
static get Companion(): {
get SEPARATOR(): string;
get ROOT(): AsmPathSimple;
};
}
export declare class AsmSimple implements Asm {
constructor();
get root(): KtList<AsmValue>;
get elementIndex(): KtMutableMap<AsmPath, AsmStructure>;
addRoot(root: AsmValue): boolean;
removeRoot(root: any): boolean;
createStructure(parsePath: string, typeName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */): AsmStructureSimple;
addToIndex(value: AsmStructure): void;
traverseDepthFirst(callback: AsmTreeWalker): void;
asString(currentIndent?: string, indentIncrement?: string): string;
readonly __doNotUseOrImplementIt: Asm["__doNotUseOrImplementIt"];
}
export declare abstract class AsmValueAbstract implements AsmValue {
constructor();
get typeName(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
abstract get qualifiedTypeName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
asString(currentIndent?: string, indentIncrement?: string): string;
abstract equalTo(other: AsmValue): boolean;
readonly __doNotUseOrImplementIt: AsmValue["__doNotUseOrImplementIt"];
}
export declare const AsmNothingSimple: {
getInstance(): {
get qualifiedTypeName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
asString(currentIndent?: string, indentIncrement?: string): string;
equalTo(other: AsmValue): boolean;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: AsmValueAbstract["__doNotUseOrImplementIt"] & AsmNothing["__doNotUseOrImplementIt"];
} & AsmValueAbstract & AsmNothing;
};
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare class AsmAnySimple extends AsmValueAbstract implements AsmAny {
constructor(value: any);
get value(): any;
get qualifiedTypeName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
asString(currentIndent?: string, indentIncrement?: string): string;
equalTo(other: AsmValue): boolean;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: AsmValueAbstract["__doNotUseOrImplementIt"] & AsmAny["__doNotUseOrImplementIt"];
static get Companion(): {
stdAny(value: any): AsmAnySimple;
};
}
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare class AsmPrimitiveSimple extends AsmValueAbstract implements AsmPrimitive {
constructor(qualifiedTypeName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, value: any);
get qualifiedTypeName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get value(): any;
asString(currentIndent?: string, indentIncrement?: string): string;
equalTo(other: AsmValue): boolean;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: AsmValueAbstract["__doNotUseOrImplementIt"] & AsmPrimitive["__doNotUseOrImplementIt"];
static get Companion(): {
stdString(value: string): AsmPrimitiveSimple;
stdBoolean(value: boolean): AsmPrimitiveSimple;
stdInteger(value: any/* Long */): AsmPrimitiveSimple;
stdReal(value: number): AsmPrimitiveSimple;
};
}
export declare class AsmReferenceSimple extends AsmValueAbstract implements AsmReference {
constructor(reference: string, value: Nullable<AsmStructure>);
get reference(): string;
get value(): Nullable<AsmStructure>;
set value(value: Nullable<AsmStructure>);
get qualifiedTypeName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
resolveAs(value: Nullable<AsmStructure>): void;
asString(currentIndent?: string, indentIncrement?: string): string;
equalTo(other: AsmValue): boolean;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: AsmValueAbstract["__doNotUseOrImplementIt"] & AsmReference["__doNotUseOrImplementIt"];
}
export declare class AsmStructureSimple extends AsmValueAbstract implements AsmStructure {
constructor(qualifiedTypeName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */);
get qualifiedTypeName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get parsePath(): string;
set parsePath(value: string);
get semanticPath(): Nullable<AsmPath>;
set semanticPath(value: Nullable<AsmPath>);
get property(): KtMap<PublicValueType/* PropertyValueName */, AsmStructureProperty>;
get propertyOrdered(): KtList<AsmStructureProperty>;
get children(): KtList<AsmStructureSimple>;
hasProperty(name: PublicValueType/* PropertyValueName */): boolean;
getPropertyAsStringOrNull(name: PublicValueType/* PropertyValueName */): Nullable<string>;
getPropertyAsAsmElementOrNull(name: PublicValueType/* PropertyValueName */): Nullable<AsmStructureSimple>;
getPropertyAsReferenceOrNull(name: PublicValueType/* PropertyValueName */): Nullable<AsmReferenceSimple>;
getPropertyAsListOrNull(name: PublicValueType/* PropertyValueName */): Nullable<KtList<any>>;
getPropertyOrNothing(name: PublicValueType/* PropertyValueName */): AsmValue;
getProperty(name: PublicValueType/* PropertyValueName */): AsmValue;
getPropertyAsString(name: PublicValueType/* PropertyValueName */): string;
getPropertyAsAsmElement(name: PublicValueType/* PropertyValueName */): AsmStructureSimple;
getPropertyAsReference(name: PublicValueType/* PropertyValueName */): AsmReferenceSimple;
getPropertyAsList(name: PublicValueType/* PropertyValueName */): KtList<any>;
getPropertyAsListOfElement(name: PublicValueType/* PropertyValueName */): KtList<AsmStructureSimple>;
setProperty(name: PublicValueType/* PropertyValueName */, value: AsmValue, childIndex: number): void;
addAllProperty(value: KtList<AsmStructurePropertySimple>): void;
asString(currentIndent?: string, indentIncrement?: string): string;
equalTo(other: AsmValue): boolean;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: AsmValueAbstract["__doNotUseOrImplementIt"] & AsmStructure["__doNotUseOrImplementIt"];
}
export declare class AsmStructurePropertySimple implements AsmStructureProperty {
constructor(name: PublicValueType/* PropertyValueName */, index: number, value: AsmValue);
get name(): PublicValueType/* PropertyValueName */;
get index(): number;
get value(): AsmValue;
set value(value: AsmValue);
get isReference(): boolean;
convertToReferenceTo(referredValue: Nullable<AsmStructure>): void;
equalTo(other: AsmStructureProperty): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: AsmStructureProperty["__doNotUseOrImplementIt"];
static get Companion(): {
get TO_STRING_MAX_LEN(): number;
};
}
export declare class AsmListSimple extends AsmValueAbstract implements AsmList {
constructor(elements: KtList<AsmValue>);
get elements(): KtList<AsmValue>;
get qualifiedTypeName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get isEmpty(): boolean;
get isNotEmpty(): boolean;
asString(currentIndent?: string, indentIncrement?: string): string;
equalTo(other: AsmValue): boolean;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: AsmValueAbstract["__doNotUseOrImplementIt"] & AsmList["__doNotUseOrImplementIt"];
}
export declare class AsmListSeparatedSimple extends AsmValueAbstract implements AsmListSeparated {
constructor(elements: KtList<AsmValue>/* ListSeparated<AsmValue, AsmValue, AsmValue> */);
get elements(): KtList<AsmValue>/* ListSeparated<AsmValue, AsmValue, AsmValue> */;
get qualifiedTypeName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get isEmpty(): boolean;
get isNotEmpty(): boolean;
asString(currentIndent?: string, indentIncrement?: string): string;
equalTo(other: AsmValue): boolean;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: AsmValueAbstract["__doNotUseOrImplementIt"] & AsmListSeparated["__doNotUseOrImplementIt"];
}
export declare class AsmLambdaSimple extends AsmValueAbstract implements AsmLambda {
constructor(lambda: (p0: AsmValue) => AsmValue);
get lambda(): (p0: AsmValue) => AsmValue;
get qualifiedTypeName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
invoke(args: KtMap<string, AsmValue>): AsmValue;
equalTo(other: AsmValue): boolean;
asString(currentIndent?: string, indentIncrement?: string): string;
readonly __doNotUseOrImplementIt: AsmValueAbstract["__doNotUseOrImplementIt"] & AsmLambda["__doNotUseOrImplementIt"];
}
export declare function asmSimple(typeModel: TypeModel | undefined, defaultNamespace: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */ | undefined, crossReferenceModel: CrossReferenceModel | undefined, sentenceId: Nullable<any> | undefined, context: Nullable<ContextWithScope<any, any>> | undefined, resolveReferences: boolean | undefined, failIfIssues: boolean | undefined, resolvedReferences: KtMutableList<ResolvedReference> | undefined, init: (p0: AsmSimpleBuilder) => void): Asm;
export declare class AsmSimpleBuilder {
constructor(_typeModel: TypeModel, _defaultNamespace: TypeNamespace, _crossReferenceModel: CrossReferenceModel, _sentenceId: Nullable<any>, _context: Nullable<ContextWithScope<any, any>>, resolveReferences: boolean, failIfIssues: boolean, resolvedReferences: KtMutableList<ResolvedReference>);
string(value: string): void;
element(typeName: string, init: (p0: AsmElementSimpleBuilder) => void): AsmStructure;
tuple(init: (p0: AsmElementSimpleBuilder) => void): AsmStructure;
listOfString(items: Array<string>): AsmList;
list(init: (p0: ListAsmElementSimpleBuilder) => void): AsmList;
build(): AsmSimple;
}
export declare class AsmElementSimpleBuilder {
constructor(_typeModel: TypeModel, _defaultNamespace: TypeNamespace, _crossReferenceModel: CrossReferenceModel, _context: Nullable<ContextWithScope<any, any>>, _scopeMap: KtMutableMap<AsmPath, ScopeSimple<any>>, _asm: AsmSimple, _identifyingValueInFor: (p0: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, p1: AsmStructure) => Nullable<any>, _asmPath: AsmPath, _typeName: string, _isRoot: boolean, _parentScope: Nullable<ScopeSimple<any>>);
propertyUnnamedString(value: Nullable<string>): void;
propertyString(name: string, value: Nullable<string>): void;
propertyNothing(name: string): void;
propertyUnnamedElement(typeName: string, init: (p0: AsmElementSimpleBuilder) => void): AsmStructure;
propertyTuple(name: string, tupleTypeId: Nullable<number> | undefined, init: (p0: AsmElementSimpleBuilder) => void): AsmStructure;
propertyElement(name: string, init: (p0: AsmElementSimpleBuilder) => void): AsmStructure;
propertyElementExplicitType(name: string, typeName: string, init: (p0: AsmElementSimpleBuilder) => void): AsmStructure;
propertyUnnamedListOfString(list: KtList<string>): void;
propertyListOfString(name: string, list: KtList<string>): void;
propertyUnnamedListOfElement(init: (p0: ListAsmElementSimpleBuilder) => void): AsmList;
propertyListOfElement(name: string, init: (p0: ListAsmElementSimpleBuilder) => void): AsmList;
reference(name: string, elementReference: string): void;
build(): AsmStructure;
}
export declare class ListAsmElementSimpleBuilder {
constructor(_typeModel: TypeModel, _defaultNamespace: TypeNamespace, _crossReferenceModel: CrossReferenceModel, _context: Nullable<ContextWithScope<any, any>>, _scopeMap: KtMutableMap<AsmPath, ScopeSimple<any>>, _asm: AsmSimple, _asmPath: AsmPath, _parentScope: Nullable<ScopeSimple<any>>, _identifyingValueInFor: (p0: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, p1: AsmStructure) => Nullable<any>);
string(value: string): void;
list(init: (p0: ListAsmElementSimpleBuilder) => void): void;
element(typeName: string, init: (p0: AsmElementSimpleBuilder) => void): AsmStructure;
tuple(init: (p0: AsmElementSimpleBuilder) => void): AsmStructure;
build(): AsmList;
}
export declare class OptionHolderDefault implements OptionHolder {
constructor(parent?: Nullable<OptionHolder>, options?: KtMap<string, string>);
get parent(): Nullable<OptionHolder>;
set parent(value: Nullable<OptionHolder>);
get options(): KtMap<string, string>;
get(name: string): Nullable<string>;
clone(parent: Nullable<OptionHolder>): OptionHolder;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: OptionHolder["__doNotUseOrImplementIt"];
}
export declare abstract class ModelAbstract<NT extends Namespace<DT>, DT extends Definition<DT>> implements Model<NT, DT> {
constructor(namespace: KtList<NT>, options: OptionHolder);
get options(): OptionHolder;
get allDefinitions(): KtList<DT>;
get isEmpty(): boolean;
get namespace(): KtList<NT>;
findNamespaceOrNull(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */): Nullable<Namespace<DT>>;
findFirstDefinitionByPossiblyQualifiedNameOrNull(pqn: PossiblyQualifiedName): Nullable<DT>;
findDefinitionByQualifiedNameOrNull(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */): Nullable<DT>;
findFirstDefinitionByNameOrNull(simpleName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<DT>;
resolveReference(reference: DefinitionReference<DT>): Nullable<DT>;
connectionNamespaceOptionHolderParentsToThis(): void;
addNamespace(value: NT): void;
asString(indent?: Indent): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
abstract get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
readonly __doNotUseOrImplementIt: Model<NT, DT>["__doNotUseOrImplementIt"];
}
export declare abstract class NamespaceAbstract<DT extends Definition<DT>> implements Namespace<DT> {
constructor(options: OptionHolder, argImport: KtList<PublicValueType/* Import */>);
get options(): OptionHolder;
get definition(): KtList<DT>;
get definitionByName(): KtMap<(PossiblyQualifiedName & PublicValueType)/* SimpleName */, DT>;
protected get _importedNamespaces(): KtMutableMap<(PossiblyQualifiedName & PublicValueType)/* QualifiedName */, Nullable<Namespace<DT>>>;
protected get _definition(): (KtMap<(PossiblyQualifiedName & PublicValueType)/* SimpleName */, DT> & KtMutableMap<(PossiblyQualifiedName & PublicValueType)/* SimpleName */, DT>)/* LinkedHashMap<SimpleName, DT> */;
get import(): KtList<PublicValueType/* Import */>;
resolveImports(model: Model<Namespace<DT>, DT>): void;
findDefinitionOrNull(simpleName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<DT>;
findOwnedDefinitionOrNull(simpleName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<DT>;
connectionDefinitionOptionHolderParentsToThis(): void;
addImport(value: PublicValueType/* Import */): void;
addDefinition(value: DT): void;
asString(indent?: Indent): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
addAllDefinition(value: any/* Iterable<DT> */): void;
abstract get qualifiedName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
readonly __doNotUseOrImplementIt: Namespace<DT>["__doNotUseOrImplementIt"];
}
export declare abstract class DefinitionAbstract<DT extends Definition<DT>> implements Definition<DT> {
constructor();
get qualifiedName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
asString(indent?: Indent): string;
abstract get namespace(): Namespace<DT>;
abstract get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
abstract get options(): OptionHolder;
readonly __doNotUseOrImplementIt: Definition<DT>["__doNotUseOrImplementIt"];
}
export declare class ModelDefault extends ModelAbstract<NamespaceDefault, DefinitionDefault> {
constructor(name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, options: OptionHolder, namespace?: KtList<NamespaceDefault>);
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
asString(indent?: Indent): string;
}
export declare class NamespaceDefault extends NamespaceAbstract<DefinitionDefault> {
constructor(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, options: OptionHolder, _import: KtList<PublicValueType/* Import */>);
get qualifiedName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
asString(indent?: Indent): string;
}
export declare class DefinitionDefault extends DefinitionAbstract<DefinitionDefault> {
constructor(namespace: Namespace<DefinitionDefault>, name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, options?: OptionHolder);
get namespace(): Namespace<DefinitionDefault>;
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get options(): OptionHolder;
asString(indent?: Indent): string;
}
export declare interface PossiblyQualifiedName {
readonly value: string;
readonly simpleName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
asQualifiedName(namespace: Nullable<PossiblyQualifiedName & PublicValueType>/* Nullable<QualifiedName> */): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.base.api.PossiblyQualifiedName": unique symbol;
};
}
export declare const PossiblyQualifiedName: {
getInstance(): {
};
};
export declare interface PublicValueType {
readonly value: any;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.base.api.PublicValueType": unique symbol;
};
}
export declare class Indent {
constructor(value?: string, increment?: string);
get value(): string;
get increment(): string;
get inc(): Indent;
toString(): string;
}
export declare interface Formatable {
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.base.api.Formatable": unique symbol;
};
}
export declare interface OptionHolder {
parent: Nullable<OptionHolder>;
get(name: string): Nullable<string>;
clone(parent: Nullable<OptionHolder>): OptionHolder;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.base.api.OptionHolder": unique symbol;
};
}
export declare interface Model<NT extends Namespace<DT>, DT extends Definition<DT>> extends Formatable {
readonly name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
readonly options: OptionHolder;
readonly namespace: KtList<NT>;
readonly allDefinitions: KtList<DT>;
readonly isEmpty: boolean;
findNamespaceOrNull(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */): Nullable<Namespace<DT>>;
findDefinitionByQualifiedNameOrNull(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */): Nullable<DT>;
findFirstDefinitionByNameOrNull(simpleName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<DT>;
findFirstDefinitionByPossiblyQualifiedNameOrNull(pqn: PossiblyQualifiedName): Nullable<DT>;
resolveReference(reference: DefinitionReference<DT>): Nullable<DT>;
addNamespace(value: NT): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.base.api.Model": unique symbol;
} & Formatable["__doNotUseOrImplementIt"];
}
export declare interface Namespace<DT extends Definition<DT>> extends Formatable {
readonly qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
readonly options: OptionHolder;
readonly import: KtList<PublicValueType/* Import */>;
readonly definition: KtList<DT>;
readonly definitionByName: KtMap<(PossiblyQualifiedName & PublicValueType)/* SimpleName */, DT>;
resolveImports(model: Model<Namespace<DT>, DT>): void;
findDefinitionOrNull(simpleName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<DT>;
findOwnedDefinitionOrNull(simpleName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<DT>;
addImport(value: PublicValueType/* Import */): void;
addDefinition(value: DT): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.base.api.Namespace": unique symbol;
} & Formatable["__doNotUseOrImplementIt"];
}
export declare interface DefinitionReference<DT extends Definition<DT>> {
readonly localNamespace: Namespace<DT>;
readonly nameOrQName: PossiblyQualifiedName;
resolved: Nullable<DT>;
resolveAs(resolved: DT): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.base.api.DefinitionReference": unique symbol;
};
}
export declare interface Definition<DT extends Definition<DT>> extends Formatable {
readonly namespace: Namespace<DT>;
readonly name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
readonly qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
readonly options: OptionHolder;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.base.api.Definition": unique symbol;
} & Formatable["__doNotUseOrImplementIt"];
}
export declare const AglBase: {
getInstance(): {
get NAMESPACE_NAME(): string;
get NAME(): string;
get identity(): PublicValueType/* LanguageIdentity */;
get grammarString(): string;
get kompositeString(): string;
get styleString(): string;
get grammarModel(): GrammarModel;
get typesModel(): TypeModel;
get asmTransformModel(): TransformModel;
get crossReferenceModel(): CrossReferenceModel;
get formatModel(): AglFormatModel;
get styleModel(): AglStyleModel;
get defaultTargetGoalRule(): string;
get defaultTargetGrammar(): Grammar;
get syntaxAnalyser(): Nullable<SyntaxAnalyser<any>>;
get semanticAnalyser(): Nullable<SemanticAnalyser<any, SentenceContext>>;
get completionProvider(): Nullable<CompletionProvider<any, SentenceContext>>;
toString(): string;
} & LanguageObjectAbstract<any, SentenceContext>;
};
export declare class BaseSemanticAnalyser implements SemanticAnalyser<any, SentenceContext> {
constructor();
clear(): void;
analyse(sentenceIdentity: Nullable<any>, asm: any, locationMap: Nullable<LocationMap> | undefined, options: SemanticAnalysisOptions<SentenceContext>): SemanticAnalysisResult;
readonly __doNotUseOrImplementIt: SemanticAnalyser<any, SentenceContext>["__doNotUseOrImplementIt"];
}
export declare class BaseSyntaxAnalyser extends SyntaxAnalyserByMethodRegistrationAbstract<any> {
constructor();
registerHandlers(): void;
clear<T extends any>(done?: KtSet<SyntaxAnalyser<T>>): void;
}
export declare class BaseCompletionProvider implements CompletionProvider<any, SentenceContext> {
constructor();
provide(nextExpected: KtSet<Spine>, options: CompletionProviderOptions<SentenceContext>): KtList<CompletionItem>;
readonly __doNotUseOrImplementIt: CompletionProvider<any, SentenceContext>["__doNotUseOrImplementIt"];
}
export declare interface Expression {
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.Expression": unique symbol;
};
}
export declare interface RootExpression extends Expression {
readonly name: string;
readonly isNothing: boolean;
readonly isSelf: boolean;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.RootExpression": unique symbol;
} & Expression["__doNotUseOrImplementIt"];
}
export declare interface LiteralExpression extends Expression {
readonly qualifiedTypeName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
readonly value: any;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.LiteralExpression": unique symbol;
} & Expression["__doNotUseOrImplementIt"];
}
export declare interface CreateObjectExpression extends Expression {
readonly possiblyQualifiedTypeName: PossiblyQualifiedName;
readonly constructorArguments: KtList<AssignmentStatement>;
readonly propertyAssignments: KtList<AssignmentStatement>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.CreateObjectExpression": unique symbol;
} & Expression["__doNotUseOrImplementIt"];
}
export declare interface CreateTupleExpression extends Expression {
readonly propertyAssignments: KtList<AssignmentStatement>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.CreateTupleExpression": unique symbol;
} & Expression["__doNotUseOrImplementIt"];
}
export declare interface OnExpression extends Expression {
readonly expression: Expression;
readonly propertyAssignments: KtList<AssignmentStatement>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.OnExpression": unique symbol;
} & Expression["__doNotUseOrImplementIt"];
}
export declare interface NavigationExpression extends Expression {
readonly start: Expression;
readonly parts: KtList<NavigationPart>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.NavigationExpression": unique symbol;
} & Expression["__doNotUseOrImplementIt"];
}
export declare interface NavigationPart {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.NavigationPart": unique symbol;
};
}
export declare interface PropertyCall extends NavigationPart {
readonly propertyName: string;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.PropertyCall": unique symbol;
} & NavigationPart["__doNotUseOrImplementIt"];
}
export declare interface MethodCall extends NavigationPart {
readonly methodName: string;
readonly arguments: KtList<Expression>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.MethodCall": unique symbol;
} & NavigationPart["__doNotUseOrImplementIt"];
}
export declare interface LambdaExpression extends Expression {
readonly expression: Expression;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.LambdaExpression": unique symbol;
} & Expression["__doNotUseOrImplementIt"];
}
export declare interface IndexOperation extends NavigationPart {
readonly indices: KtList<Expression>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.IndexOperation": unique symbol;
} & NavigationPart["__doNotUseOrImplementIt"];
}
export declare interface AssignmentStatement {
readonly lhsPropertyName: string;
readonly lhsGrammarRuleIndex: Nullable<number>;
readonly rhs: Expression;
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.AssignmentStatement": unique symbol;
};
}
export declare interface WithExpression extends Expression {
readonly withContext: Expression;
readonly expression: Expression;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.WithExpression": unique symbol;
} & Expression["__doNotUseOrImplementIt"];
}
export declare interface WhenExpression extends Expression {
readonly options: KtList<WhenOption>;
readonly elseOption: WhenOptionElse;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.WhenExpression": unique symbol;
} & Expression["__doNotUseOrImplementIt"];
}
export declare interface WhenOption {
readonly condition: Expression;
readonly expression: Expression;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.WhenOption": unique symbol;
};
}
export declare interface WhenOptionElse {
readonly expression: Expression;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.WhenOptionElse": unique symbol;
};
}
export declare interface InfixExpression extends Expression {
readonly expressions: KtList<Expression>;
readonly operators: KtList<string>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.InfixExpression": unique symbol;
} & Expression["__doNotUseOrImplementIt"];
}
export declare interface CastExpression extends Expression {
readonly expression: Expression;
readonly targetType: TypeReference;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.CastExpression": unique symbol;
} & Expression["__doNotUseOrImplementIt"];
}
export declare interface TypeTestExpression extends Expression {
readonly expression: Expression;
readonly targetType: TypeReference;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.TypeTestExpression": unique symbol;
} & Expression["__doNotUseOrImplementIt"];
}
export declare interface TypeReference {
readonly possiblyQualifiedName: PossiblyQualifiedName;
readonly typeArguments: KtList<TypeReference>;
readonly isNullable: boolean;
asString(indent: Indent, imports: KtList<PublicValueType/* Import */>): string;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.TypeReference": unique symbol;
};
}
export declare interface GroupExpression extends Expression {
readonly expression: Expression;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.api.GroupExpression": unique symbol;
} & Expression["__doNotUseOrImplementIt"];
}
export declare abstract class ExpressionAbstract implements Expression {
constructor();
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
readonly __doNotUseOrImplementIt: Expression["__doNotUseOrImplementIt"];
}
export declare class CreateTupleExpressionDefault extends ExpressionAbstract implements CreateTupleExpression {
constructor(propertyAssignments: KtList<AssignmentStatement>);
get propertyAssignments(): KtList<AssignmentStatement>;
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
toString(): string;
copy(propertyAssignments?: KtList<AssignmentStatement>): CreateTupleExpressionDefault;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: ExpressionAbstract["__doNotUseOrImplementIt"] & CreateTupleExpression["__doNotUseOrImplementIt"];
}
export declare class CreateObjectExpressionDefault extends ExpressionAbstract implements CreateObjectExpression {
constructor(possiblyQualifiedTypeName: PossiblyQualifiedName, constructorArguments: KtList<AssignmentStatement>);
get possiblyQualifiedTypeName(): PossiblyQualifiedName;
get constructorArguments(): KtList<AssignmentStatement>;
get propertyAssignments(): KtList<AssignmentStatement>;
set propertyAssignments(value: KtList<AssignmentStatement>);
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
toString(): string;
copy(possiblyQualifiedTypeName?: PossiblyQualifiedName, constructorArguments?: KtList<AssignmentStatement>): CreateObjectExpressionDefault;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: ExpressionAbstract["__doNotUseOrImplementIt"] & CreateObjectExpression["__doNotUseOrImplementIt"];
}
export declare class WithExpressionDefault extends ExpressionAbstract implements WithExpression {
constructor(withContext: Expression, expression: Expression);
get withContext(): Expression;
get expression(): Expression;
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
toString(): string;
readonly __doNotUseOrImplementIt: ExpressionAbstract["__doNotUseOrImplementIt"] & WithExpression["__doNotUseOrImplementIt"];
}
export declare class WhenExpressionDefault extends ExpressionAbstract implements WhenExpression {
constructor(options: KtList<WhenOption>, elseOption: WhenOptionElse);
get options(): KtList<WhenOption>;
get elseOption(): WhenOptionElse;
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
toString(): string;
readonly __doNotUseOrImplementIt: ExpressionAbstract["__doNotUseOrImplementIt"] & WhenExpression["__doNotUseOrImplementIt"];
}
export declare class WhenOptionDefault implements WhenOption {
constructor(condition: Expression, expression: Expression);
get condition(): Expression;
get expression(): Expression;
toString(): string;
readonly __doNotUseOrImplementIt: WhenOption["__doNotUseOrImplementIt"];
}
export declare class WhenOptionElseDefault implements WhenOptionElse {
constructor(expression: Expression);
get expression(): Expression;
toString(): string;
readonly __doNotUseOrImplementIt: WhenOptionElse["__doNotUseOrImplementIt"];
}
export declare class OnExpressionDefault extends ExpressionAbstract implements OnExpression {
constructor(expression: Expression);
get expression(): Expression;
get propertyAssignments(): KtList<AssignmentStatement>;
set propertyAssignments(value: KtList<AssignmentStatement>);
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
readonly __doNotUseOrImplementIt: ExpressionAbstract["__doNotUseOrImplementIt"] & OnExpression["__doNotUseOrImplementIt"];
}
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare class RootExpressionDefault extends ExpressionAbstract implements RootExpression {
constructor(name: string);
get name(): string;
get isNothing(): boolean;
get isSelf(): boolean;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
copy(name?: string): RootExpressionDefault;
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
readonly __doNotUseOrImplementIt: ExpressionAbstract["__doNotUseOrImplementIt"] & RootExpression["__doNotUseOrImplementIt"];
static get Companion(): {
get NOTHING(): RootExpressionDefault;
get SELF(): RootExpressionDefault;
get ERROR(): RootExpressionDefault;
};
}
export declare class LiteralExpressionDefault extends ExpressionAbstract implements LiteralExpression {
constructor(qualifiedTypeName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, value: any);
get qualifiedTypeName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get value(): any;
toString(): string;
copy(qualifiedTypeName?: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, value?: any): LiteralExpressionDefault;
hashCode(): number;
equals(other: Nullable<any>): boolean;
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
readonly __doNotUseOrImplementIt: ExpressionAbstract["__doNotUseOrImplementIt"] & LiteralExpression["__doNotUseOrImplementIt"];
}
export declare class NavigationExpressionDefault extends ExpressionAbstract implements NavigationExpression {
constructor(start: Expression, parts: KtList<NavigationPart>);
get start(): Expression;
get parts(): KtList<NavigationPart>;
toString(): string;
copy(start?: Expression, parts?: KtList<NavigationPart>): NavigationExpressionDefault;
hashCode(): number;
equals(other: Nullable<any>): boolean;
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
readonly __doNotUseOrImplementIt: ExpressionAbstract["__doNotUseOrImplementIt"] & NavigationExpression["__doNotUseOrImplementIt"];
}
export declare class PropertyCallDefault implements PropertyCall {
constructor(propertyName: string);
get propertyName(): string;
toString(): string;
copy(propertyName?: string): PropertyCallDefault;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: PropertyCall["__doNotUseOrImplementIt"];
}
export declare class MethodCallDefault implements MethodCall {
constructor(methodName: string, arguments: KtList<Expression>);
get methodName(): string;
get arguments(): KtList<Expression>;
toString(): string;
copy(methodName?: string, arguments?: KtList<Expression>): MethodCallDefault;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: MethodCall["__doNotUseOrImplementIt"];
}
export declare class LambdaExpressionDefault implements LambdaExpression {
constructor(expression: Expression);
get expression(): Expression;
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
toString(): string;
copy(expression?: Expression): LambdaExpressionDefault;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: LambdaExpression["__doNotUseOrImplementIt"];
}
export declare class IndexOperationDefault implements IndexOperation {
constructor(indices: KtList<Expression>);
get indices(): KtList<Expression>;
toString(): string;
copy(indices?: KtList<Expression>): IndexOperationDefault;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: IndexOperation["__doNotUseOrImplementIt"];
}
export declare class AssignmentStatementDefault implements AssignmentStatement {
constructor(lhsPropertyName: string, lhsGrammarRuleIndex: Nullable<number>, rhs: Expression);
get lhsPropertyName(): string;
get lhsGrammarRuleIndex(): Nullable<number>;
get rhs(): Expression;
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
toString(): string;
readonly __doNotUseOrImplementIt: AssignmentStatement["__doNotUseOrImplementIt"];
}
export declare class InfixExpressionDefault implements InfixExpression {
constructor(expressions: KtList<Expression>, operators: KtList<string>);
get expressions(): KtList<Expression>;
get operators(): KtList<string>;
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
toString(): string;
readonly __doNotUseOrImplementIt: InfixExpression["__doNotUseOrImplementIt"];
}
export declare class CastExpressionDefault implements CastExpression {
constructor(expression: Expression, targetType: TypeReference);
get expression(): Expression;
get targetType(): TypeReference;
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
toString(): string;
readonly __doNotUseOrImplementIt: CastExpression["__doNotUseOrImplementIt"];
}
export declare class TypeTestExpressionDefault implements TypeTestExpression {
constructor(expression: Expression, targetType: TypeReference);
get expression(): Expression;
get targetType(): TypeReference;
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
toString(): string;
readonly __doNotUseOrImplementIt: TypeTestExpression["__doNotUseOrImplementIt"];
}
export declare class TypeReferenceDefault implements TypeReference {
constructor(possiblyQualifiedName: PossiblyQualifiedName, typeArguments: KtList<TypeReference>, isNullable: boolean);
get possiblyQualifiedName(): PossiblyQualifiedName;
get typeArguments(): KtList<TypeReference>;
get isNullable(): boolean;
asString(indent: Indent, imports: KtList<PublicValueType/* Import */>): string;
toString(): string;
copy(possiblyQualifiedName?: PossiblyQualifiedName, typeArguments?: KtList<TypeReference>, isNullable?: boolean): TypeReferenceDefault;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: TypeReference["__doNotUseOrImplementIt"];
}
export declare class GroupExpressionDefault implements GroupExpression {
constructor(expression: Expression);
get expression(): Expression;
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
toString(): string;
readonly __doNotUseOrImplementIt: GroupExpression["__doNotUseOrImplementIt"];
}
export declare const AglExpressions: {
getInstance(): {
get NAMESPACE_NAME(): string;
get NAME(): string;
get identity(): PublicValueType/* LanguageIdentity */;
get grammarString(): string;
get kompositeString(): string;
get styleString(): string;
get grammarModel(): GrammarModel;
get typesModel(): TypeModel;
get asmTransformModel(): TransformModel;
get crossReferenceModel(): CrossReferenceModel;
get formatModel(): AglFormatModel;
get styleModel(): AglStyleModel;
get defaultTargetGrammar(): Grammar;
get defaultTargetGoalRule(): string;
get syntaxAnalyser(): ExpressionsSyntaxAnalyser;
get semanticAnalyser(): ExpressionsSemanticAnalyser;
get completionProvider(): ExpressionsCompletionProvider;
toString(): string;
} & LanguageObjectAbstract<Expression, ContextWithScope<any, any>>;
};
export declare function objectInstance(_this_: SingletonType): any;
export declare function constructDataType(_this_: DataType, constructorArgs: Array<Nullable<any>>): any;
export declare function constructValueType(_this_: ValueType, value: any): any;
export declare function get(_this_: PropertyDeclaration, obj: any): Nullable<any>;
export declare function set(_this_: PropertyDeclaration, obj: any, value: Nullable<any>): void;
export declare function valueOf<E extends unknown/* Enum<E> */>(_this_: EnumType, name: string): Nullable<any>/* Nullable<Enum<E>> */;
export declare class ExpressionTypeResolver {
constructor(typeModel: TypeModel, contextNamespace: TypeNamespace, issues: IssueHolder);
get typeModel(): TypeModel;
get contextNamespace(): TypeNamespace;
get issues(): IssueHolder;
typeFor(expression: Expression, self: TypeInstance): TypeInstance;
typeOfExpressionStr(expression: string, self: TypeDefinition): TypeInstance;
typeOfExpressionFor(_this_: Expression, self: TypeInstance): TypeInstance;
typeOfLiteralExpressionFor(_this_: LiteralExpression, self: TypeInstance): TypeInstance;
typeOfRootExpressionFor(_this_: RootExpression, self: TypeInstance): TypeInstance;
typeOfNavigationExpressionFor(_this_: NavigationExpression, self: TypeInstance): TypeInstance;
typeOfNavigationPartFor(_this_: NavigationPart, self: TypeInstance): TypeInstance;
lastPropertyDeclarationFor(expr: NavigationExpression, self: TypeInstance): Nullable<PropertyDeclaration>;
typeOfPropertyCallFor(_this_: PropertyCall, self: Nullable<TypeInstance>): TypeInstance;
typeOfMethodCallFor(_this_: MethodCall, self: Nullable<TypeInstance>): TypeInstance;
typeOfIndexOperationFor(_this_: IndexOperation, self: Nullable<TypeInstance>): TypeInstance;
typeOfWithExpressionFor(_this_: WithExpression, self: TypeInstance): TypeInstance;
typeOfWhenExpressionFor(_this_: WhenExpression, self: TypeInstance): TypeInstance;
typeOfInfixExpressionFor(_this_: InfixExpression, self: TypeInstance): TypeInstance;
typeOfCreateObjectExpressionFor(_this_: CreateObjectExpression, self: TypeInstance): TypeInstance;
typeOfCreateTupleExpressionFor(_this_: CreateTupleExpression, self: TypeInstance): TypeInstance;
typeOfOnExpressionFor(_this_: OnExpression, self: TypeInstance): TypeInstance;
typeOfLambdaExpressionFor(_this_: LambdaExpression, self: TypeInstance): TypeInstance;
typeOfCastExpressionFor(_this_: CastExpression, self: TypeInstance): TypeInstance;
typeOfGroupExpressionFor(_this_: GroupExpression, self: TypeInstance): TypeInstance;
typeOfTypeReference(_this_: TypeReference): TypeInstance;
commonSuperTypeOf(types: KtList<TypeInstance>): TypeInstance;
}
export declare class ExpressionsCompletionProvider extends CompletionProviderAbstract<Expression, ContextWithScope<any, any>> {
constructor();
}
export declare class EvaluationContext<SelfType extends any> {
constructor(parent: Nullable<EvaluationContext<SelfType>>, namedValues: KtMap<string, TypedObject<SelfType>>);
get parent(): Nullable<EvaluationContext<SelfType>>;
get namedValues(): KtMap<string, TypedObject<SelfType>>;
get self(): Nullable<TypedObject<SelfType>>;
getOrInParent(name: string): Nullable<TypedObject<SelfType>>;
child(namedValues: KtMap<string, TypedObject<SelfType>>): EvaluationContext<SelfType>;
toString(): string;
copy(parent?: Nullable<EvaluationContext<SelfType>>, namedValues?: KtMap<string, TypedObject<SelfType>>): EvaluationContext<SelfType>;
hashCode(): number;
equals(other: Nullable<any>): boolean;
static get Companion(): {
of<SelfType extends any>(namedValues: KtMap<string, TypedObject<SelfType>>, parent?: Nullable<EvaluationContext<SelfType>>): EvaluationContext<SelfType>;
ofSelf<SelfType extends any>(self: TypedObject<SelfType>): EvaluationContext<SelfType>;
};
}
export declare interface TypedObject<SelfType extends any> {
readonly self: SelfType;
readonly type: TypeInstance;
asString(): string;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.processor.TypedObject": unique symbol;
};
}
export declare interface ObjectGraph<SelfType extends any> {
typeModel: TypeModel;
typeFor(obj: Nullable<SelfType>): TypeInstance;
toTypedObject(obj: Nullable<SelfType>): TypedObject<SelfType>;
nothing(): TypedObject<SelfType>;
any(value: any): TypedObject<SelfType>;
createPrimitiveValue(qualifiedTypeName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, value: any): TypedObject<SelfType>;
createStructureValue(possiblyQualifiedTypeName: PossiblyQualifiedName, constructorArgs: KtMap<string, TypedObject<SelfType>>): TypedObject<SelfType>;
createCollection(qualifiedTypeName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, collection: any/* Iterable<TypedObject<SelfType>> */): TypedObject<SelfType>;
createTupleValue(typeArgs: KtList<TypeArgumentNamed>): TypedObject<SelfType>;
createLambdaValue(lambda: (p0: TypedObject<SelfType>) => TypedObject<SelfType>): TypedObject<SelfType>;
valueOf(value: TypedObject<SelfType>): any;
getIndex(tobj: TypedObject<SelfType>, index: number): TypedObject<SelfType>;
getProperty(tobj: TypedObject<SelfType>, propertyName: string): TypedObject<SelfType>;
setProperty(tobj: TypedObject<SelfType>, propertyName: string, value: TypedObject<SelfType>): void;
executeMethod(tobj: TypedObject<SelfType>, methodName: string, args: KtList<TypedObject<SelfType>>): TypedObject<SelfType>;
cast(tobj: TypedObject<SelfType>, newType: TypeInstance): TypedObject<SelfType>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.expressions.processor.ObjectGraph": unique symbol;
};
}
export declare class ExpressionsInterpreterOverTypedObject<SelfType extends any> {
constructor(objectGraph: ObjectGraph<SelfType>, issues: IssueHolder);
get objectGraph(): ObjectGraph<SelfType>;
get issues(): IssueHolder;
get typeModel(): TypeModel;
evaluateStr(evc: EvaluationContext<SelfType>, expression: string): TypedObject<SelfType>;
evaluateExpression(evc: EvaluationContext<SelfType>, expression: Expression): TypedObject<SelfType>;
evaluateTypeReference(typeReference: TypeReference): TypeInstance;
}
export declare class ExpressionsSemanticAnalyser implements SemanticAnalyser<Expression, ContextWithScope<any, any>> {
constructor();
clear(): void;
analyse(sentenceIdentity: Nullable<any>, asm: Expression, locationMap: Nullable<LocationMap> | undefined, options: SemanticAnalysisOptions<ContextWithScope<any, any>>): SemanticAnalysisResult;
readonly __doNotUseOrImplementIt: SemanticAnalyser<Expression, ContextWithScope<any, any>>["__doNotUseOrImplementIt"];
}
export declare class ExpressionsSyntaxAnalyser extends SyntaxAnalyserByMethodRegistrationAbstract<Expression> {
constructor();
get extendsSyntaxAnalyser(): KtMap<(PossiblyQualifiedName & PublicValueType)/* QualifiedName */, SyntaxAnalyser<any /*UnknownType **/>>;
registerHandlers(): void;
clear<T extends any>(done?: KtSet<SyntaxAnalyser<T>>): void;
}
export declare namespace ExpressionsSyntaxAnalyser {
class PropertyValue {
constructor(asmObject: any, value: string);
get asmObject(): any;
get value(): string;
copy(asmObject?: any, value?: string): ExpressionsSyntaxAnalyser.PropertyValue;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
}
export declare const StdLibPrimitiveExecutions: {
getInstance(): {
get property(): KtMap<TypeDefinition, KtMap<PropertyDeclaration, (p0: AsmValue, p1: PropertyDeclaration) => AsmValue>>;
get method(): KtMap<TypeDefinition, KtMap<MethodDeclaration, (p0: AsmValue, p1: MethodDeclaration, p2: KtList<TypedObject<AsmValue>>) => AsmValue>>;
};
};
export declare class TypedObjectAsmValue implements TypedObject<AsmValue> {
constructor(type: TypeInstance, self: AsmValue);
get type(): TypeInstance;
get self(): AsmValue;
asString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: TypedObject<AsmValue>["__doNotUseOrImplementIt"];
}
export declare const StdLibPrimitiveExecutionsForReflection: {
getInstance(): {
get property(): KtMap<TypeDefinition, KtMap<PropertyDeclaration, (p0: any, p1: PropertyDeclaration) => any>>;
get method(): KtMap<TypeDefinition, KtMap<MethodDeclaration, (p0: any, p1: MethodDeclaration, p2: KtList<TypedObject<any>>) => any>>;
};
};
export declare class TypedObjectAny<SelfType extends any> implements TypedObject<SelfType> {
constructor(type: TypeInstance, self: SelfType);
get type(): TypeInstance;
get self(): SelfType;
asString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: TypedObject<SelfType>["__doNotUseOrImplementIt"];
}
export declare class ObjectGraphByReflection<SelfType extends any> implements ObjectGraph<SelfType> {
constructor(typeModel: TypeModel, issues: IssueHolder);
get typeModel(): TypeModel;
set typeModel(value: TypeModel);
get issues(): IssueHolder;
untyped(typedObj: TypedObject<SelfType>): any;
untypedAny(possiblyTypedObject: Nullable<any>): any;
typeFor(obj: Nullable<SelfType>): TypeInstance;
toTypedObject(obj: Nullable<SelfType>): TypedObject<SelfType>;
nothing(): TypedObject<SelfType>;
any(value: any): TypedObject<SelfType>;
createPrimitiveValue(qualifiedTypeName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, value: any): TypedObject<SelfType>;
createTupleValue(typeArgs: KtList<TypeArgumentNamed>): TypedObject<SelfType>;
createStructureValue(possiblyQualifiedTypeName: PossiblyQualifiedName, constructorArgs: KtMap<string, TypedObject<SelfType>>): TypedObject<SelfType>;
createCollection(qualifiedTypeName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, collection: any/* Iterable<TypedObject<SelfType>> */): TypedObject<SelfType>;
createLambdaValue(lambda: (p0: TypedObject<SelfType>) => TypedObject<SelfType>): TypedObject<SelfType>;
valueOf(value: TypedObject<SelfType>): any;
getIndex(tobj: TypedObject<SelfType>, index: number): TypedObject<SelfType>;
getProperty(tobj: TypedObject<SelfType>, propertyName: string): TypedObject<SelfType>;
setProperty(tobj: TypedObject<SelfType>, propertyName: string, value: TypedObject<SelfType>): void;
executeMethod(tobj: TypedObject<SelfType>, methodName: string, args: KtList<TypedObject<SelfType>>): TypedObject<SelfType>;
cast(tobj: TypedObject<SelfType>, newType: TypeInstance): TypedObject<SelfType>;
readonly __doNotUseOrImplementIt: ObjectGraph<SelfType>["__doNotUseOrImplementIt"];
}
export declare function formatModel(name: string, init: (p0: FormatModelBuilder) => void): AglFormatModel;
export declare class FormatModelBuilder {
constructor(name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */);
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
rule(forTypeName: string, init: (p0: FormatExpressionBuilder) => void): void;
build(): AglFormatModel;
}
export declare class FormatExpressionBuilder {
constructor(_asm: AsmSimple);
literalString(value: string): void;
build(): AsmStructure;
}
export declare interface AglFormatModel extends Model<FormatNamespace, FormatSet> {
readonly defaultWhiteSpace: string;
readonly rules: KtMap<(PossiblyQualifiedName & PublicValueType)/* SimpleName */, AglFormatRule>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.formatter.api.AglFormatModel": unique symbol;
} & Model<FormatNamespace, FormatSet>["__doNotUseOrImplementIt"];
}
export declare interface FormatNamespace extends Namespace<FormatSet> {
readonly formatSet: KtList<FormatSet>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.formatter.api.FormatNamespace": unique symbol;
} & Namespace<FormatSet>["__doNotUseOrImplementIt"];
}
export declare interface FormatSetReference {
readonly localNamespace: FormatNamespace;
readonly nameOrQName: PossiblyQualifiedName;
readonly resolved: Nullable<FormatSet>;
resolveAs(resolved: FormatSet): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.formatter.api.FormatSetReference": unique symbol;
};
}
export declare interface FormatSet extends Definition<FormatSet> {
readonly namespace: FormatNamespace;
readonly extends: KtList<FormatSetReference>;
readonly rules: KtList<AglFormatRule>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.formatter.api.FormatSet": unique symbol;
} & Definition<FormatSet>["__doNotUseOrImplementIt"];
}
export declare interface AglFormatRule {
readonly forTypeName: TypeReference;
readonly formatExpression: FormatExpression;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.formatter.api.AglFormatRule": unique symbol;
};
}
export declare interface FormatExpression extends Expression {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.formatter.api.FormatExpression": unique symbol;
} & Expression["__doNotUseOrImplementIt"];
}
export declare interface FormatExpressionExpression extends FormatExpression {
readonly expression: Expression;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.formatter.api.FormatExpressionExpression": unique symbol;
} & FormatExpression["__doNotUseOrImplementIt"];
}
export declare interface FormatExpressionTemplate extends FormatExpression {
readonly content: KtList<TemplateElement>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.formatter.api.FormatExpressionTemplate": unique symbol;
} & FormatExpression["__doNotUseOrImplementIt"];
}
export declare interface FormatExpressionWhen extends FormatExpression {
readonly options: KtList<FormatWhenOption>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.formatter.api.FormatExpressionWhen": unique symbol;
} & FormatExpression["__doNotUseOrImplementIt"];
}
export declare interface FormatWhenOption extends WhenOption {
readonly format: FormatExpression;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.formatter.api.FormatWhenOption": unique symbol;
} & WhenOption["__doNotUseOrImplementIt"];
}
export declare interface FormatWhenOptionElse extends WhenOptionElse {
readonly format: FormatExpression;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.formatter.api.FormatWhenOptionElse": unique symbol;
} & WhenOptionElse["__doNotUseOrImplementIt"];
}
export declare interface TemplateElement {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.formatter.api.TemplateElement": unique symbol;
};
}
export declare interface TemplateElementText extends TemplateElement {
readonly text: string;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.formatter.api.TemplateElementText": unique symbol;
} & TemplateElement["__doNotUseOrImplementIt"];
}
export declare interface TemplateElementExpressionProperty extends TemplateElement {
readonly propertyName: string;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.formatter.api.TemplateElementExpressionProperty": unique symbol;
} & TemplateElement["__doNotUseOrImplementIt"];
}
export declare interface TemplateElementExpressionList extends TemplateElement {
readonly listPropertyName: string;
readonly separator: string;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.formatter.api.TemplateElementExpressionList": unique symbol;
} & TemplateElement["__doNotUseOrImplementIt"];
}
export declare interface TemplateElementExpressionEmbedded extends TemplateElement {
readonly expression: FormatExpression;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.formatter.api.TemplateElementExpressionEmbedded": unique symbol;
} & TemplateElement["__doNotUseOrImplementIt"];
}
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare class AglFormatModelDefault extends ModelAbstract<FormatNamespace, FormatSet> implements AglFormatModel {
constructor(name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, options?: OptionHolder, namespaces?: KtList<FormatNamespace>);
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get defaultWhiteSpace(): string;
get rules(): KtMutableMap<(PossiblyQualifiedName & PublicValueType)/* SimpleName */, AglFormatRule>;
addRule(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): void;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: AglFormatModel["__doNotUseOrImplementIt"] & ModelAbstract<FormatNamespace, FormatSet>["__doNotUseOrImplementIt"];
static get Companion(): {
fromGrammar(grammarModel: GrammarModel, typeModel: TypeModel): ProcessResult<AglFormatModel>;
fromString(context: ContextWithScope<any, any>, formatModelStr: PublicValueType/* FormatString */): ProcessResult<AglFormatModel>;
};
}
export declare class AglFormatNamespaceDefault extends NamespaceAbstract<FormatSet> implements FormatNamespace {
constructor(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, options?: OptionHolder, _import?: KtList<PublicValueType/* Import */>);
get qualifiedName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get formatSet(): KtList<FormatSet>;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: FormatNamespace["__doNotUseOrImplementIt"] & NamespaceAbstract<FormatSet>["__doNotUseOrImplementIt"];
}
export declare class FormatSetReferenceDefault implements FormatSetReference {
constructor(localNamespace: FormatNamespace, nameOrQName: PossiblyQualifiedName);
get localNamespace(): FormatNamespace;
get nameOrQName(): PossiblyQualifiedName;
get resolved(): Nullable<FormatSet>;
set resolved(value: Nullable<FormatSet>);
resolveAs(resolved: FormatSet): void;
readonly __doNotUseOrImplementIt: FormatSetReference["__doNotUseOrImplementIt"];
}
export declare class FormatSetDefault extends DefinitionAbstract<FormatSet> implements FormatSet {
constructor(namespace: FormatNamespace, name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, _extends: KtList<FormatSetReference>, options: OptionHolder | undefined, rules: KtList<AglFormatRule>);
get namespace(): FormatNamespace;
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get extends(): KtList<FormatSetReference>;
get options(): OptionHolder;
get rules(): KtList<AglFormatRule>;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: FormatSet["__doNotUseOrImplementIt"] & DefinitionAbstract<FormatSet>["__doNotUseOrImplementIt"];
}
export declare class AglFormatRuleDefault implements AglFormatRule {
constructor(forTypeName: TypeReference, formatExpression: FormatExpression);
get forTypeName(): TypeReference;
get formatExpression(): FormatExpression;
readonly __doNotUseOrImplementIt: AglFormatRule["__doNotUseOrImplementIt"];
}
export declare class FormatExpressionWhenDefault implements FormatExpressionWhen {
constructor(options: KtList<FormatWhenOption>);
get options(): KtList<FormatWhenOption>;
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
readonly __doNotUseOrImplementIt: FormatExpressionWhen["__doNotUseOrImplementIt"];
}
export declare class FormatWhenOptionDefault implements FormatWhenOption {
constructor(condition: Expression, format: FormatExpression);
get condition(): Expression;
get format(): FormatExpression;
get expression(): Expression;
readonly __doNotUseOrImplementIt: FormatWhenOption["__doNotUseOrImplementIt"];
}
export declare class FormatWhenOptionElseDefault implements FormatWhenOptionElse {
constructor(format: FormatExpression);
get format(): FormatExpression;
get expression(): Expression;
readonly __doNotUseOrImplementIt: FormatWhenOptionElse["__doNotUseOrImplementIt"];
}
export declare class FormatExpressionExpressionDefault implements FormatExpressionExpression {
constructor(expression: Expression);
get expression(): Expression;
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
readonly __doNotUseOrImplementIt: FormatExpressionExpression["__doNotUseOrImplementIt"];
}
export declare class FormatExpressionTemplateDefault implements FormatExpressionTemplate {
constructor(content: KtList<TemplateElement>);
get content(): KtList<TemplateElement>;
asString(indent: Indent, imports?: KtList<PublicValueType/* Import */>): string;
readonly __doNotUseOrImplementIt: FormatExpressionTemplate["__doNotUseOrImplementIt"];
}
export declare class TemplateElementTextDefault implements TemplateElementText {
constructor(text: string);
get text(): string;
toString(): string;
readonly __doNotUseOrImplementIt: TemplateElementText["__doNotUseOrImplementIt"];
}
export declare class TemplateElementExpressionPropertyDefault implements TemplateElementExpressionProperty {
constructor(propertyName: string);
get propertyName(): string;
toString(): string;
readonly __doNotUseOrImplementIt: TemplateElementExpressionProperty["__doNotUseOrImplementIt"];
}
export declare class TemplateElementExpressionListDefault implements TemplateElementExpressionList {
constructor(listPropertyName: string, separator: string);
get listPropertyName(): string;
get separator(): string;
toString(): string;
readonly __doNotUseOrImplementIt: TemplateElementExpressionList["__doNotUseOrImplementIt"];
}
export declare class TemplateElementExpressionEmbeddedDefault implements TemplateElementExpressionEmbedded {
constructor(expression: FormatExpression);
get expression(): FormatExpression;
toString(): string;
readonly __doNotUseOrImplementIt: TemplateElementExpressionEmbedded["__doNotUseOrImplementIt"];
}
export declare const AglFormat: {
getInstance(): {
get NAMESPACE_NAME(): string;
get NAME(): string;
get goalRuleName(): string;
get identity(): PublicValueType/* LanguageIdentity */;
get grammarString(): string;
get grammarModel(): GrammarModel;
get komposite(): string;
get typesModel(): TypeModel;
get asmTransformModel(): TransformModel;
get crossReferenceModel(): CrossReferenceModel;
get styleModel(): AglStyleModel;
get formatModel(): AglFormatModel;
get defaultTargetGrammar(): Grammar;
get defaultTargetGoalRule(): string;
get syntaxAnalyser(): Nullable<SyntaxAnalyser<AglFormatModel>>;
get semanticAnalyser(): Nullable<SemanticAnalyser<AglFormatModel, ContextWithScope<any, any>>>;
get completionProvider(): Nullable<CompletionProvider<AglFormatModel, ContextWithScope<any, any>>>;
} & LanguageObjectAbstract<AglFormatModel, ContextWithScope<any, any>>;
};
export declare class AglFormatCompletionProvider extends CompletionProviderAbstract<AglFormatModel, ContextWithScope<any, any>> {
constructor();
}
export declare class AglFormatSemanticAnalyser implements SemanticAnalyser<AglFormatModel, ContextWithScope<any, any>> {
constructor();
clear(): void;
analyse(sentenceIdentity: Nullable<any>, asm: AglFormatModel, locationMap: Nullable<LocationMap> | undefined, options: SemanticAnalysisOptions<ContextWithScope<any, any>>): SemanticAnalysisResult;
readonly __doNotUseOrImplementIt: SemanticAnalyser<AglFormatModel, ContextWithScope<any, any>>["__doNotUseOrImplementIt"];
}
export declare class FormatterOverAsmSimple implements Formatter<Asm> {
constructor(formatModel: AglFormatModel, typeModel: TypeModel, issues: IssueHolder);
get formatModel(): AglFormatModel;
get typeModel(): TypeModel;
get issues(): IssueHolder;
format(formatSetName: PossiblyQualifiedName, asm: Asm): FormatResult;
readonly __doNotUseOrImplementIt: Formatter<Asm>["__doNotUseOrImplementIt"];
}
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare class FormatterOverTypedObject<SelfType extends any> extends ExpressionsInterpreterOverTypedObject<SelfType> implements Formatter<SelfType> {
constructor(formatModel: AglFormatModel, objectGraph: ObjectGraph<SelfType>, issues: IssueHolder);
get formatModel(): AglFormatModel;
findRuleFor(type: TypeInstance): Nullable<AglFormatRule>;
format(formatSetName: PossiblyQualifiedName, asm: SelfType): FormatResult;
evaluateExpression(evc: EvaluationContext<SelfType>, expression: Expression): TypedObject<SelfType>;
readonly __doNotUseOrImplementIt: Formatter<SelfType>["__doNotUseOrImplementIt"];
static get Companion(): {
get prefixMatchPattern(): any/* Regex */;
};
}
export declare class GrammarModelDefault extends ModelAbstract<GrammarNamespace, Grammar> implements GrammarModel {
constructor(name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, options?: OptionHolder, namespace?: KtList<GrammarNamespace>);
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
get primary(): Nullable<Grammar>;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: GrammarModel["__doNotUseOrImplementIt"] & ModelAbstract<GrammarNamespace, Grammar>["__doNotUseOrImplementIt"];
}
/** @deprecated Just use a GrammarModel */
export declare function asGrammarModel(_this_: Grammar): GrammarModel;
export declare class GrammarNamespaceDefault extends NamespaceAbstract<Grammar> implements GrammarNamespace {
constructor(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, options?: OptionHolder, _import?: KtList<PublicValueType/* Import */>);
get qualifiedName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: GrammarNamespace["__doNotUseOrImplementIt"] & NamespaceAbstract<Grammar>["__doNotUseOrImplementIt"];
}
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare class GrammarDefault extends GrammarAbstract {
constructor(namespace: GrammarNamespace, name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, options: OptionHolder);
get defaultGoalRule(): GrammarRule;
findAllResolvedEmbeddedGrammars(found?: KtSet<Grammar>): KtSet<Grammar>;
asString(indent?: Indent): string;
static get Companion(): {
fromString(): void;
};
}
export declare class GrammarReferenceDefault implements GrammarReference {
constructor(localNamespace: Namespace<Grammar>, nameOrQName: PossiblyQualifiedName);
get localNamespace(): Namespace<Grammar>;
get nameOrQName(): PossiblyQualifiedName;
get resolved(): Nullable<Grammar>;
set resolved(value: Nullable<Grammar>);
resolveAs(resolved: Grammar): void;
copy(localNamespace?: Namespace<Grammar>, nameOrQName?: PossiblyQualifiedName): GrammarReferenceDefault;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: GrammarReference["__doNotUseOrImplementIt"];
}
export declare abstract class GrammarAbstract implements Grammar {
constructor(namespace: GrammarNamespace, name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, options: OptionHolder);
get namespace(): GrammarNamespace;
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get options(): OptionHolder;
get selfReference(): GrammarReferenceDefault;
get qualifiedName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get extends(): KtMutableList<GrammarReference>;
get grammarRule(): KtMutableList<GrammarRule>;
get preferenceRule(): KtMutableList<PreferenceRule>;
get allGrammarReferencesInRules(): KtList<GrammarReference>;
get extendsResolved(): KtList<Grammar>;
get allExtends(): KtSet<GrammarReference>/* OrderedSet<GrammarReference> */;
get allExtendsResolved(): KtSet<Grammar>/* OrderedSet<Grammar> */;
get directInheritedGrammarRule(): KtList<GrammarRule>;
get allGrammarRule(): KtList<GrammarRule>;
get directInheritedResolvedGrammarRule(): KtSet<GrammarRule>/* OrderedSet<GrammarRule> */;
get allInheritedResolvedGrammarRule(): KtSet<GrammarRule>/* OrderedSet<GrammarRule> */;
get resolvedGrammarRule(): KtSet<GrammarRule>/* OrderedSet<GrammarRule> */;
get allResolvedGrammarRule(): KtSet<GrammarRule>/* OrderedSet<GrammarRule> */;
get allResolvedTerminal(): KtSet<Terminal>;
get allResolvedSkipTerminal(): KtSet<Terminal>;
get allResolvedNonTerminalRule(): KtSet<GrammarRule>;
get allResolvedPreferenceRuleRule(): KtSet<PreferenceRule>/* OrderedSet<PreferenceRule> */;
get allResolvedEmbeddedRules(): KtSet<Embedded>;
get allResolvedEmbeddedGrammars(): KtSet<Grammar>;
findOwnedGrammarRuleOrNull(ruleName: PublicValueType/* GrammarRuleName */): Nullable<GrammarRule>;
findAllSuperGrammarRule(ruleName: PublicValueType/* GrammarRuleName */): KtList<GrammarRule>;
findAllGrammarRuleList(ruleName: PublicValueType/* GrammarRuleName */): KtList<GrammarRule>;
findAllResolvedGrammarRule(ruleName: PublicValueType/* GrammarRuleName */): Nullable<GrammarRule>;
findAllResolvedTerminalRule(terminalPattern: string): Terminal;
findAllResolvedEmbeddedGrammars(found?: KtSet<Grammar>): KtSet<Grammar>;
asString(indent?: Indent): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
abstract get defaultGoalRule(): GrammarRule;
readonly __doNotUseOrImplementIt: Grammar["__doNotUseOrImplementIt"];
}
export declare abstract class GrammarItemAbstract implements GrammarItem {
constructor();
abstract get grammar(): Grammar;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: GrammarItem["__doNotUseOrImplementIt"];
}
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare abstract class GrammarRuleAbstract extends GrammarItemAbstract implements GrammarRule {
constructor();
get qualifiedName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get isOneEmbedded(): boolean;
get compressedLeaf(): Terminal;
abstract get grammar(): Grammar;
asString(indent?: Indent): string;
abstract get name(): PublicValueType/* GrammarRuleName */;
abstract get isOverride(): boolean;
abstract get isSkip(): boolean;
abstract get isLeaf(): boolean;
abstract get rhs(): RuleItem;
readonly __doNotUseOrImplementIt: GrammarItemAbstract["__doNotUseOrImplementIt"] & GrammarRule["__doNotUseOrImplementIt"];
}
export declare namespace GrammarRuleAbstract {
abstract class Companion extends _objects_.net$akehurst$language$grammar$asm$GrammarRuleAbstract$Companion {
private constructor();
}
namespace Companion {
class CompressedLeafRule extends RuleItemAbstract implements Terminal {
constructor(id: string, value: string, isPattern: boolean);
get id(): string;
get value(): string;
get isPattern(): boolean;
get isLiteral(): boolean;
get allTerminal(): KtSet<Terminal>;
get allNonTerminal(): KtSet<NonTerminal>;
get allEmbedded(): KtSet<Embedded>;
get firstTerminal(): KtSet<Terminal>;
get firstTangible(): KtSet<TangibleItem>;
get firstTangibleRecursive(): KtSet<Terminal>;
get firstConcatenationRecursive(): KtSet<Concatenation>;
setOwningRule(rule: GrammarRule, indices: KtList<number>): void;
subItem(index: number): RuleItem;
itemsForChild(childNumber: number): KtSet<RuleItem>;
readonly __doNotUseOrImplementIt: Terminal["__doNotUseOrImplementIt"] & RuleItemAbstract["__doNotUseOrImplementIt"];
}
}
}
declare namespace _objects_ {
const net$akehurst$language$grammar$asm$GrammarRuleAbstract$Companion: {
compressRuleItem(compressedName: string, item: RuleItem): GrammarRuleAbstract.Companion.CompressedLeafRule;
} & {
new(): any;
};
}
export declare class NormalRuleDefault extends GrammarRuleAbstract implements NormalRule {
constructor(grammar: Grammar, name: PublicValueType/* GrammarRuleName */, isSkip: boolean, isLeaf: boolean);
get grammar(): Grammar;
get name(): PublicValueType/* GrammarRuleName */;
get isSkip(): boolean;
get isLeaf(): boolean;
get isOverride(): boolean;
get rhs(): RuleItem;
set rhs(value: RuleItem);
asString(indent?: Indent): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: GrammarRuleAbstract["__doNotUseOrImplementIt"] & NormalRule["__doNotUseOrImplementIt"];
}
export declare class OverrideRuleDefault extends GrammarRuleAbstract implements OverrideRule {
constructor(grammar: Grammar, name: PublicValueType/* GrammarRuleName */, isSkip: boolean, isLeaf: boolean, overrideKind: OverrideKind);
get grammar(): Grammar;
get name(): PublicValueType/* GrammarRuleName */;
get isSkip(): boolean;
get isLeaf(): boolean;
get overrideKind(): OverrideKind;
get isOverride(): boolean;
get overriddenRhs(): RuleItem;
set overriddenRhs(value: RuleItem);
get rhs(): RuleItem;
asString(indent?: Indent): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
copy(grammar?: Grammar, name?: PublicValueType/* GrammarRuleName */, isSkip?: boolean, isLeaf?: boolean, overrideKind?: OverrideKind): OverrideRuleDefault;
readonly __doNotUseOrImplementIt: GrammarRuleAbstract["__doNotUseOrImplementIt"] & OverrideRule["__doNotUseOrImplementIt"];
}
export declare class PreferenceRuleDefault extends GrammarItemAbstract implements PreferenceRule {
constructor(grammar: Grammar, forItem: SimpleItem, optionList: KtList<PreferenceOption>);
get grammar(): Grammar;
get forItem(): SimpleItem;
get optionList(): KtList<PreferenceOption>;
asString(indent?: Indent): string;
toString(): string;
copy(grammar?: Grammar, forItem?: SimpleItem, optionList?: KtList<PreferenceOption>): PreferenceRuleDefault;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: GrammarItemAbstract["__doNotUseOrImplementIt"] & PreferenceRule["__doNotUseOrImplementIt"];
}
export declare class PreferenceOptionDefault implements PreferenceOption {
constructor(spine: Spine, choiceIndicator: ChoiceIndicator, choiceNumber: number, onTerminals: KtList<SimpleItem>, associativity: Associativity);
get spine(): Spine;
get choiceIndicator(): ChoiceIndicator;
get choiceNumber(): number;
get onTerminals(): KtList<SimpleItem>;
get associativity(): Associativity;
asString(indent?: Indent): string;
copy(spine?: Spine, choiceIndicator?: ChoiceIndicator, choiceNumber?: number, onTerminals?: KtList<SimpleItem>, associativity?: Associativity): PreferenceOptionDefault;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: PreferenceOption["__doNotUseOrImplementIt"];
}
export declare class SpineDefault implements Spine {
constructor(parts: KtList<NonTerminal>);
get parts(): KtList<NonTerminal>;
copy(parts?: KtList<NonTerminal>): SpineDefault;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: Spine["__doNotUseOrImplementIt"];
}
export declare abstract class RuleItemAbstract implements RuleItem {
protected constructor();
protected get _owningRule(): Nullable<GrammarRule>;
protected set _owningRule(value: Nullable<GrammarRule>);
get owningRule(): GrammarRule;
get index(): Nullable<KtList<number>>;
set index(value: Nullable<KtList<number>>);
abstract get allTerminal(): KtSet<Terminal>;
abstract get allNonTerminal(): KtSet<NonTerminal>;
abstract get allEmbedded(): KtSet<Embedded>;
abstract get firstTerminal(): KtSet<Terminal>;
abstract get firstTangible(): KtSet<TangibleItem>;
abstract get firstTangibleRecursive(): KtSet<TangibleItem>;
abstract get firstConcatenationRecursive(): KtSet<Concatenation>;
abstract subItem(index: number): RuleItem;
abstract itemsForChild(childNumber: number): KtSet<RuleItem>;
abstract setOwningRule(rule: GrammarRule, indices: KtList<number>): void;
readonly __doNotUseOrImplementIt: RuleItem["__doNotUseOrImplementIt"];
}
export declare class ConcatenationDefault extends RuleItemAbstract implements Concatenation {
constructor(items: KtList<RuleItem>);
get items(): KtList<RuleItem>;
get allTerminal(): KtSet<Terminal>;
get allNonTerminal(): KtSet<NonTerminal>;
get allEmbedded(): KtSet<Embedded>;
get firstTerminal(): KtSet<Terminal>;
get firstTangible(): KtSet<TangibleItem>;
get firstTangibleRecursive(): KtSet<TangibleItem>;
get firstConcatenationRecursive(): KtSet<Concatenation>;
setOwningRule(rule: GrammarRule, indices: KtList<number>): void;
subItem(index: number): RuleItem;
itemsForChild(childNumber: number): KtSet<RuleItem>;
toString(): string;
readonly __doNotUseOrImplementIt: RuleItemAbstract["__doNotUseOrImplementIt"] & Concatenation["__doNotUseOrImplementIt"];
}
export declare abstract class ChoiceAbstract extends RuleItemAbstract implements Choice {
protected constructor(alternative: KtList<RuleItem>);
get alternative(): KtList<RuleItem>;
get allTerminal(): KtSet<Terminal>;
get allNonTerminal(): KtSet<NonTerminal>;
get allEmbedded(): KtSet<Embedded>;
get firstTerminal(): KtSet<Terminal>;
get firstTangible(): KtSet<TangibleItem>;
get firstTangibleRecursive(): KtSet<TangibleItem>;
get firstConcatenationRecursive(): KtSet<Concatenation>;
setOwningRule(rule: GrammarRule, indices: KtList<number>): void;
subItem(index: number): RuleItem;
itemsForChild(childNumber: number): KtSet<RuleItem>;
toString(): string;
readonly __doNotUseOrImplementIt: RuleItemAbstract["__doNotUseOrImplementIt"] & Choice["__doNotUseOrImplementIt"];
}
export declare class ChoiceLongestDefault extends ChoiceAbstract implements ChoiceLongest {
constructor(alternative: KtList<RuleItem>);
get alternative(): KtList<RuleItem>;
readonly __doNotUseOrImplementIt: ChoiceAbstract["__doNotUseOrImplementIt"] & ChoiceLongest["__doNotUseOrImplementIt"];
}
export declare class ChoicePriorityDefault extends ChoiceAbstract implements ChoicePriority {
constructor(alternative: KtList<RuleItem>);
get alternative(): KtList<RuleItem>;
readonly __doNotUseOrImplementIt: ChoiceAbstract["__doNotUseOrImplementIt"] & ChoicePriority["__doNotUseOrImplementIt"];
}
export declare class ChoiceAmbiguousDefault extends ChoiceAbstract implements ChoiceAmbiguous {
constructor(alternative: KtList<RuleItem>);
get alternative(): KtList<RuleItem>;
readonly __doNotUseOrImplementIt: ChoiceAbstract["__doNotUseOrImplementIt"] & ChoiceAmbiguous["__doNotUseOrImplementIt"];
}
export declare abstract class ConcatenationItemAbstract extends RuleItemAbstract implements ConcatenationItem {
protected constructor();
abstract get allEmbedded(): KtSet<Embedded>;
abstract get firstTerminal(): KtSet<Terminal>;
abstract get firstTangible(): KtSet<TangibleItem>;
abstract get firstTangibleRecursive(): KtSet<TangibleItem>;
abstract get firstConcatenationRecursive(): KtSet<Concatenation>;
abstract subItem(index: number): RuleItem;
abstract itemsForChild(childNumber: number): KtSet<RuleItem>;
abstract setOwningRule(rule: GrammarRule, indices: KtList<number>): void;
readonly __doNotUseOrImplementIt: RuleItemAbstract["__doNotUseOrImplementIt"] & ConcatenationItem["__doNotUseOrImplementIt"];
}
export declare class OptionalItemDefault extends ConcatenationItemAbstract implements OptionalItem {
constructor(item: RuleItem);
get item(): RuleItem;
get allTerminal(): KtSet<Terminal>;
get allNonTerminal(): KtSet<NonTerminal>;
get allEmbedded(): KtSet<Embedded>;
get firstTerminal(): KtSet<Terminal>;
get firstTangible(): KtSet<TangibleItem>;
get firstTangibleRecursive(): KtSet<TangibleItem>;
get firstConcatenationRecursive(): KtSet<Concatenation>;
setOwningRule(rule: GrammarRule, indices: KtList<number>): void;
subItem(index: number): RuleItem;
itemsForChild(childNumber: number): KtSet<RuleItem>;
toString(): string;
readonly __doNotUseOrImplementIt: ConcatenationItemAbstract["__doNotUseOrImplementIt"] & OptionalItem["__doNotUseOrImplementIt"];
}
export declare abstract class SimpleItemAbstract extends ConcatenationItemAbstract implements SimpleItem {
protected constructor();
abstract get allEmbedded(): KtSet<Embedded>;
abstract get firstTerminal(): KtSet<Terminal>;
abstract get firstTangible(): KtSet<TangibleItem>;
abstract get firstTangibleRecursive(): KtSet<TangibleItem>;
abstract get firstConcatenationRecursive(): KtSet<Concatenation>;
abstract subItem(index: number): RuleItem;
abstract itemsForChild(childNumber: number): KtSet<RuleItem>;
abstract setOwningRule(rule: GrammarRule, indices: KtList<number>): void;
readonly __doNotUseOrImplementIt: ConcatenationItemAbstract["__doNotUseOrImplementIt"] & SimpleItem["__doNotUseOrImplementIt"];
}
export declare class GroupDefault extends SimpleItemAbstract implements Group {
constructor(groupedContent: RuleItem);
get groupedContent(): RuleItem;
get allTerminal(): KtSet<Terminal>;
get allNonTerminal(): KtSet<NonTerminal>;
get allEmbedded(): KtSet<Embedded>;
get firstTerminal(): KtSet<Terminal>;
get firstTangible(): KtSet<TangibleItem>;
get firstTangibleRecursive(): KtSet<TangibleItem>;
get firstConcatenationRecursive(): KtSet<Concatenation>;
setOwningRule(rule: GrammarRule, indices: KtList<number>): void;
subItem(index: number): RuleItem;
itemsForChild(childNumber: number): KtSet<RuleItem>;
toString(): string;
readonly __doNotUseOrImplementIt: SimpleItemAbstract["__doNotUseOrImplementIt"] & Group["__doNotUseOrImplementIt"];
}
export declare abstract class TangibleItemAbstract extends SimpleItemAbstract implements TangibleItem {
protected constructor();
get firstTangible(): KtSet<TangibleItem>;
itemsForChild(childNumber: number): KtSet<RuleItem>;
abstract get allEmbedded(): KtSet<Embedded>;
abstract get firstTerminal(): KtSet<Terminal>;
abstract get firstTangibleRecursive(): KtSet<TangibleItem>;
abstract get firstConcatenationRecursive(): KtSet<Concatenation>;
abstract subItem(index: number): RuleItem;
abstract setOwningRule(rule: GrammarRule, indices: KtList<number>): void;
readonly __doNotUseOrImplementIt: SimpleItemAbstract["__doNotUseOrImplementIt"] & TangibleItem["__doNotUseOrImplementIt"];
}
export declare class EmptyRuleDefault extends TangibleItemAbstract implements EmptyRule {
constructor();
get allTerminal(): KtSet<Terminal>;
get allNonTerminal(): KtSet<NonTerminal>;
get allEmbedded(): KtSet<Embedded>;
get firstTerminal(): KtSet<Terminal>;
get firstTangibleRecursive(): KtSet<Terminal>;
get firstConcatenationRecursive(): KtSet<Concatenation>;
setOwningRule(rule: GrammarRule, indices: KtList<number>): void;
subItem(index: number): RuleItem;
toString(): string;
readonly __doNotUseOrImplementIt: TangibleItemAbstract["__doNotUseOrImplementIt"] & EmptyRule["__doNotUseOrImplementIt"];
}
export declare class TerminalDefault extends TangibleItemAbstract implements Terminal {
constructor(value: string, isPattern: boolean);
get value(): string;
get isPattern(): boolean;
get id(): string;
get isLiteral(): boolean;
get allTerminal(): KtSet<Terminal>;
get allNonTerminal(): KtSet<NonTerminal>;
get allEmbedded(): KtSet<Embedded>;
get firstTerminal(): KtSet<Terminal>;
get firstTangibleRecursive(): KtSet<Terminal>;
get firstConcatenationRecursive(): KtSet<Concatenation>;
setOwningRule(rule: GrammarRule, indices: KtList<number>): void;
subItem(index: number): RuleItem;
toString(): string;
readonly __doNotUseOrImplementIt: TangibleItemAbstract["__doNotUseOrImplementIt"] & Terminal["__doNotUseOrImplementIt"];
}
export declare class NonTerminalDefault extends TangibleItemAbstract implements NonTerminal {
constructor(targetGrammar: Nullable<GrammarReference>, ruleReference: PublicValueType/* GrammarRuleName */);
get targetGrammar(): Nullable<GrammarReference>;
get ruleReference(): PublicValueType/* GrammarRuleName */;
get allTerminal(): KtSet<Terminal>;
get allNonTerminal(): KtSet<NonTerminal>;
get allEmbedded(): KtSet<Embedded>;
get firstTerminal(): KtSet<Terminal>;
get firstTangibleRecursive(): KtSet<TangibleItem>;
get firstConcatenationRecursive(): KtSet<Concatenation>;
referencedRuleOrNull(targetGrammar: Grammar): Nullable<GrammarRule>;
referencedRule(targetGrammar: Grammar): GrammarRule;
setOwningRule(rule: GrammarRule, indices: KtList<number>): void;
subItem(index: number): RuleItem;
toString(): string;
readonly __doNotUseOrImplementIt: TangibleItemAbstract["__doNotUseOrImplementIt"] & NonTerminal["__doNotUseOrImplementIt"];
}
export declare class EmbeddedDefault extends TangibleItemAbstract implements Embedded {
constructor(embeddedGoalName: PublicValueType/* GrammarRuleName */, embeddedGrammarReference: GrammarReference);
get embeddedGoalName(): PublicValueType/* GrammarRuleName */;
get embeddedGrammarReference(): GrammarReference;
get resolvedGrammarRule(): Nullable<GrammarRule>;
get allTerminal(): KtSet<Terminal>;
get allNonTerminal(): KtSet<NonTerminal>;
get allEmbedded(): KtSet<Embedded>;
get firstTerminal(): KtSet<Terminal>;
get firstTangibleRecursive(): KtSet<TangibleItem>;
get firstConcatenationRecursive(): KtSet<Concatenation>;
referencedRule(targetGrammar: Grammar): GrammarRule;
setOwningRule(rule: GrammarRule, indices: KtList<number>): void;
subItem(index: number): RuleItem;
toString(): string;
readonly __doNotUseOrImplementIt: TangibleItemAbstract["__doNotUseOrImplementIt"] & Embedded["__doNotUseOrImplementIt"];
}
export declare abstract class ListOfItemsAbstract extends ConcatenationItemAbstract implements ListOfItems {
protected constructor();
get firstTerminal(): KtSet<Terminal>;
get firstTangible(): KtSet<TangibleItem>;
get firstTangibleRecursive(): KtSet<TangibleItem>;
get firstConcatenationRecursive(): KtSet<Concatenation>;
abstract get allEmbedded(): KtSet<Embedded>;
abstract subItem(index: number): RuleItem;
abstract itemsForChild(childNumber: number): KtSet<RuleItem>;
abstract setOwningRule(rule: GrammarRule, indices: KtList<number>): void;
abstract get min(): number;
abstract get max(): number;
abstract get item(): RuleItem;
readonly __doNotUseOrImplementIt: ConcatenationItemAbstract["__doNotUseOrImplementIt"] & ListOfItems["__doNotUseOrImplementIt"];
}
export declare class SimpleListDefault extends ListOfItemsAbstract implements SimpleList {
constructor(min: number, max: number, item: RuleItem);
get min(): number;
get max(): number;
get item(): RuleItem;
get allTerminal(): KtSet<Terminal>;
get allNonTerminal(): KtSet<NonTerminal>;
get allEmbedded(): KtSet<Embedded>;
setOwningRule(rule: GrammarRule, indices: KtList<number>): void;
subItem(index: number): RuleItem;
itemsForChild(childNumber: number): KtSet<RuleItem>;
toString(): string;
readonly __doNotUseOrImplementIt: ListOfItemsAbstract["__doNotUseOrImplementIt"] & SimpleList["__doNotUseOrImplementIt"];
}
export declare class SeparatedListDefault extends ListOfItemsAbstract implements SeparatedList {
constructor(min: number, max: number, item: RuleItem, separator: RuleItem);
get min(): number;
get max(): number;
get item(): RuleItem;
get separator(): RuleItem;
get allTerminal(): KtSet<Terminal>;
get allNonTerminal(): KtSet<NonTerminal>;
get allEmbedded(): KtSet<Embedded>;
setOwningRule(rule: GrammarRule, indices: KtList<number>): void;
subItem(index: number): RuleItem;
itemsForChild(childNumber: number): KtSet<RuleItem>;
toString(): string;
readonly __doNotUseOrImplementIt: ListOfItemsAbstract["__doNotUseOrImplementIt"] & SeparatedList["__doNotUseOrImplementIt"];
}
export declare interface GrammarModel extends Model<GrammarNamespace, Grammar> {
readonly primary: Nullable<Grammar>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.GrammarModel": unique symbol;
} & Model<GrammarNamespace, Grammar>["__doNotUseOrImplementIt"];
}
export declare interface GrammarNamespace extends Namespace<Grammar> {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.GrammarNamespace": unique symbol;
} & Namespace<Grammar>["__doNotUseOrImplementIt"];
}
export declare interface GrammarItem extends Formatable {
readonly grammar: Grammar;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.GrammarItem": unique symbol;
} & Formatable["__doNotUseOrImplementIt"];
}
export declare interface GrammarReference {
readonly localNamespace: Namespace<Grammar>;
readonly nameOrQName: PossiblyQualifiedName;
readonly resolved: Nullable<Grammar>;
resolveAs(resolved: Grammar): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.GrammarReference": unique symbol;
};
}
export declare interface Grammar extends Definition<Grammar> {
readonly selfReference: GrammarReference;
readonly extends: KtList<GrammarReference>;
readonly extendsResolved: KtList<Grammar>;
readonly defaultGoalRule: GrammarRule;
readonly grammarRule: KtList<GrammarRule>;
readonly preferenceRule: KtList<PreferenceRule>;
readonly allGrammarReferencesInRules: KtList<GrammarReference>;
readonly allExtends: KtSet<GrammarReference>/* OrderedSet<GrammarReference> */;
readonly allExtendsResolved: KtSet<Grammar>/* OrderedSet<Grammar> */;
readonly directInheritedGrammarRule: KtList<GrammarRule>;
readonly allGrammarRule: KtList<GrammarRule>;
readonly directInheritedResolvedGrammarRule: KtSet<GrammarRule>/* OrderedSet<GrammarRule> */;
readonly allInheritedResolvedGrammarRule: KtSet<GrammarRule>/* OrderedSet<GrammarRule> */;
readonly resolvedGrammarRule: KtSet<GrammarRule>/* OrderedSet<GrammarRule> */;
readonly allResolvedGrammarRule: KtSet<GrammarRule>/* OrderedSet<GrammarRule> */;
readonly allResolvedPreferenceRuleRule: KtSet<PreferenceRule>/* OrderedSet<PreferenceRule> */;
readonly allResolvedNonTerminalRule: KtSet<GrammarRule>;
readonly allResolvedTerminal: KtSet<Terminal>;
readonly allResolvedSkipTerminal: KtSet<Terminal>;
readonly allResolvedEmbeddedRules: KtSet<Embedded>;
readonly allResolvedEmbeddedGrammars: KtSet<Grammar>;
findOwnedGrammarRuleOrNull(ruleName: PublicValueType/* GrammarRuleName */): Nullable<GrammarRule>;
findAllSuperGrammarRule(ruleName: PublicValueType/* GrammarRuleName */): KtList<GrammarRule>;
findAllGrammarRuleList(ruleName: PublicValueType/* GrammarRuleName */): KtList<GrammarRule>;
findAllResolvedGrammarRule(ruleName: PublicValueType/* GrammarRuleName */): Nullable<GrammarRule>;
findAllResolvedTerminalRule(terminalPattern: string): Terminal;
findAllResolvedEmbeddedGrammars(found?: KtSet<Grammar>): KtSet<Grammar>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.Grammar": unique symbol;
} & Definition<Grammar>["__doNotUseOrImplementIt"];
}
export declare interface PreferenceRule extends GrammarItem {
readonly forItem: SimpleItem;
readonly optionList: KtList<PreferenceOption>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.PreferenceRule": unique symbol;
} & GrammarItem["__doNotUseOrImplementIt"];
}
export declare abstract class Associativity {
private constructor();
static get LEFT(): Associativity & {
get name(): "LEFT";
get ordinal(): 0;
};
static get RIGHT(): Associativity & {
get name(): "RIGHT";
get ordinal(): 1;
};
get name(): "LEFT" | "RIGHT";
get ordinal(): 0 | 1;
static values(): Array<Associativity>;
static valueOf(value: string): Associativity;
}
export declare abstract class ChoiceIndicator {
private constructor();
static get NONE(): ChoiceIndicator & {
get name(): "NONE";
get ordinal(): 0;
};
static get EMPTY(): ChoiceIndicator & {
get name(): "EMPTY";
get ordinal(): 1;
};
static get ITEM(): ChoiceIndicator & {
get name(): "ITEM";
get ordinal(): 2;
};
static get NUMBER(): ChoiceIndicator & {
get name(): "NUMBER";
get ordinal(): 3;
};
get name(): "NONE" | "EMPTY" | "ITEM" | "NUMBER";
get ordinal(): 0 | 1 | 2 | 3;
static values(): Array<ChoiceIndicator>;
static valueOf(value: string): ChoiceIndicator;
}
export declare interface PreferenceOption extends Formatable {
readonly spine: Spine;
readonly choiceIndicator: ChoiceIndicator;
readonly choiceNumber: number;
readonly onTerminals: KtList<SimpleItem>;
readonly associativity: Associativity;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.PreferenceOption": unique symbol;
} & Formatable["__doNotUseOrImplementIt"];
}
export declare interface Spine {
readonly parts: KtList<NonTerminal>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.Spine": unique symbol;
};
}
export declare interface GrammarRule extends GrammarItem {
readonly name: PublicValueType/* GrammarRuleName */;
readonly qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
readonly isOverride: boolean;
readonly isSkip: boolean;
readonly isLeaf: boolean;
readonly isOneEmbedded: boolean;
readonly rhs: RuleItem;
readonly compressedLeaf: Terminal;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.GrammarRule": unique symbol;
} & GrammarItem["__doNotUseOrImplementIt"];
}
export declare interface NormalRule extends GrammarRule {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.NormalRule": unique symbol;
} & GrammarRule["__doNotUseOrImplementIt"];
}
export declare abstract class OverrideKind {
private constructor();
static get REPLACE(): OverrideKind & {
get name(): "REPLACE";
get ordinal(): 0;
};
static get APPEND_ALTERNATIVE(): OverrideKind & {
get name(): "APPEND_ALTERNATIVE";
get ordinal(): 1;
};
static get SUBSTITUTION(): OverrideKind & {
get name(): "SUBSTITUTION";
get ordinal(): 2;
};
get name(): "REPLACE" | "APPEND_ALTERNATIVE" | "SUBSTITUTION";
get ordinal(): 0 | 1 | 2;
static values(): Array<OverrideKind>;
static valueOf(value: string): OverrideKind;
}
export declare interface OverrideRule extends GrammarRule {
readonly overrideKind: OverrideKind;
readonly overriddenRhs: RuleItem;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.OverrideRule": unique symbol;
} & GrammarRule["__doNotUseOrImplementIt"];
}
export declare interface RuleItem {
readonly owningRule: GrammarRule;
readonly allTerminal: KtSet<Terminal>;
readonly allNonTerminal: KtSet<NonTerminal>;
readonly allEmbedded: KtSet<Embedded>;
readonly firstTerminal: KtSet<Terminal>;
readonly firstTangible: KtSet<TangibleItem>;
readonly firstTangibleRecursive: KtSet<TangibleItem>;
readonly firstConcatenationRecursive: KtSet<Concatenation>;
subItem(index: number): RuleItem;
itemsForChild(childNumber: number): KtSet<RuleItem>;
setOwningRule(rule: GrammarRule, indices: KtList<number>): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.RuleItem": unique symbol;
};
}
export declare interface Choice extends RuleItem {
readonly alternative: KtList<RuleItem>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.Choice": unique symbol;
} & RuleItem["__doNotUseOrImplementIt"];
}
export declare interface Concatenation extends RuleItem {
readonly items: KtList<RuleItem>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.Concatenation": unique symbol;
} & RuleItem["__doNotUseOrImplementIt"];
}
export declare interface ConcatenationItem extends RuleItem {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.ConcatenationItem": unique symbol;
} & RuleItem["__doNotUseOrImplementIt"];
}
export declare interface ChoiceLongest extends Choice {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.ChoiceLongest": unique symbol;
} & Choice["__doNotUseOrImplementIt"];
}
export declare interface ChoicePriority extends Choice {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.ChoicePriority": unique symbol;
} & Choice["__doNotUseOrImplementIt"];
}
export declare interface ChoiceAmbiguous extends Choice {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.ChoiceAmbiguous": unique symbol;
} & Choice["__doNotUseOrImplementIt"];
}
export declare interface OptionalItem extends ConcatenationItem {
readonly item: RuleItem;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.OptionalItem": unique symbol;
} & ConcatenationItem["__doNotUseOrImplementIt"];
}
export declare interface SimpleItem extends ConcatenationItem {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.SimpleItem": unique symbol;
} & ConcatenationItem["__doNotUseOrImplementIt"];
}
export declare interface ListOfItems extends ConcatenationItem {
readonly min: number;
readonly max: number;
readonly item: RuleItem;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.ListOfItems": unique symbol;
} & ConcatenationItem["__doNotUseOrImplementIt"];
}
export declare interface SimpleList extends ListOfItems {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.SimpleList": unique symbol;
} & ListOfItems["__doNotUseOrImplementIt"];
}
export declare interface SeparatedList extends ListOfItems {
readonly separator: RuleItem;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.SeparatedList": unique symbol;
} & ListOfItems["__doNotUseOrImplementIt"];
}
export declare abstract class SeparatedListKind {
private constructor();
static get Flat(): SeparatedListKind & {
get name(): "Flat";
get ordinal(): 0;
};
static get Left(): SeparatedListKind & {
get name(): "Left";
get ordinal(): 1;
};
static get Right(): SeparatedListKind & {
get name(): "Right";
get ordinal(): 2;
};
get name(): "Flat" | "Left" | "Right";
get ordinal(): 0 | 1 | 2;
static values(): Array<SeparatedListKind>;
static valueOf(value: string): SeparatedListKind;
}
export declare interface Group extends SimpleItem {
readonly groupedContent: RuleItem;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.Group": unique symbol;
} & SimpleItem["__doNotUseOrImplementIt"];
}
export declare interface TangibleItem extends SimpleItem {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.TangibleItem": unique symbol;
} & SimpleItem["__doNotUseOrImplementIt"];
}
export declare interface EmptyRule extends TangibleItem {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.EmptyRule": unique symbol;
} & TangibleItem["__doNotUseOrImplementIt"];
}
export declare interface Terminal extends TangibleItem {
readonly id: string;
readonly isLiteral: boolean;
readonly isPattern: boolean;
readonly value: string;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.Terminal": unique symbol;
} & TangibleItem["__doNotUseOrImplementIt"];
}
export declare interface NonTerminal extends TangibleItem {
readonly ruleReference: PublicValueType/* GrammarRuleName */;
readonly targetGrammar: Nullable<GrammarReference>;
referencedRuleOrNull(targetGrammar: Grammar): Nullable<GrammarRule>;
referencedRule(targetGrammar: Grammar): GrammarRule;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.NonTerminal": unique symbol;
} & TangibleItem["__doNotUseOrImplementIt"];
}
export declare interface Embedded extends TangibleItem {
readonly embeddedGoalName: PublicValueType/* GrammarRuleName */;
readonly embeddedGrammarReference: GrammarReference;
referencedRule(targetGrammar: Grammar): GrammarRule;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammar.api.Embedded": unique symbol;
} & TangibleItem["__doNotUseOrImplementIt"];
}
export declare function grammarModel(name: string, namespaces: KtList<GrammarNamespace> | undefined, grammarRegistry: Nullable<GrammarRegistry> | undefined, init: (p0: GrammarModelBuilder) => void): GrammarModel;
/** @deprecated use 'grammarModel' instead */
export declare function grammar(namespace: string, name: string, init: (p0: GrammarBuilder) => void): Grammar;
export declare class GrammarModelBuilder {
constructor(name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, namespaces: KtList<GrammarNamespace>);
option(key: string, value: string): void;
namespace(qualifiedName: string, init: (p0: GrammarNamespaceBuilder) => void): void;
build(): GrammarModelDefault;
}
export declare class GrammarNamespaceBuilder {
constructor(grammarModel: GrammarModel, qualifiedName: string);
get grammarModel(): GrammarModel;
option(key: string, value: string): void;
import(qualifiedName: string): void;
grammar(name: string, init: (p0: GrammarBuilder) => void): void;
build(): GrammarNamespaceDefault;
}
export declare class GrammarBuilder {
constructor(namespace: GrammarNamespace, name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */);
extends(nameOrQName: string): void;
extendsGrammar(extended: GrammarReference): void;
terminalLiteral(value: string): Terminal;
terminalPattern(value: string): Terminal;
empty(grammarRuleName: string, overrideKind?: Nullable<OverrideKind>, isSkip?: boolean, isLeaf?: boolean): void;
choice(grammarRuleName: string, overrideKind: Nullable<OverrideKind> | undefined, isSkip: boolean | undefined, isLeaf: boolean | undefined, init: (p0: any/* ChoiceItemBuilder */) => void): void;
concatenation(grammarRuleName: string, overrideKind: Nullable<OverrideKind> | undefined, isSkip: boolean | undefined, isLeaf: boolean | undefined, init: (p0: any/* ConcatenationItemBuilder */) => void): void;
optional(grammarRuleName: string, overrideKind: Nullable<OverrideKind> | undefined, isSkip: boolean | undefined, isLeaf: boolean | undefined, init: (p0: any/* SimpleItemsBuilder */) => void): void;
list(grammarRuleName: string, min: number, max: number, overrideKind: Nullable<OverrideKind> | undefined, isSkip: boolean | undefined, isLeaf: boolean | undefined, init: (p0: any/* SimpleItemsBuilder */) => void): void;
separatedList(grammarRuleName: string, min: number, max: number, overrideKind: Nullable<OverrideKind> | undefined, isSkip: boolean | undefined, isLeaf: boolean | undefined, init: (p0: any/* SimpleItemsBuilder */) => void): void;
preference(itemReference: string, init: (p0: PreferenceRuleBuilder) => void): void;
build(): Grammar;
}
export declare class GroupChoiceBuilder {
constructor(localNamespace: Namespace<Grammar>);
get localNamespace(): Namespace<Grammar>;
get alternatives(): KtMutableList<RuleItem>;
alt(init: (p0: any/* ConcatenationItemBuilder */) => void): void;
build(): Choice;
}
export declare class PreferenceRuleBuilder {
constructor(grammar: Grammar, forItem: SimpleItem);
get grammar(): Grammar;
get forItem(): SimpleItem;
get optionList(): KtMutableList<PreferenceOption>;
optionLeft(spine: KtList<string>, choiceIndicator: ChoiceIndicator, choiceNumber: number, terminals: KtList<string>): void;
optionRight(spine: KtList<string>, choiceIndicator: ChoiceIndicator, choiceNumber: number, terminals: KtList<string>): void;
build(): PreferenceRule;
}
export declare const AglGrammar: {
getInstance(): {
get OPTION_defaultGoalRule(): string;
get NAMESPACE_NAME(): string;
get NAME(): string;
get identity(): PublicValueType/* LanguageIdentity */;
get grammarString(): string;
get kompositeString(): string;
get styleString(): string;
get grammarModel(): GrammarModel;
get typesModel(): TypeModel;
get asmTransformModel(): TransformModel;
get crossReferenceModel(): CrossReferenceModel;
get formatModel(): AglFormatModel;
get styleModel(): AglStyleModel;
get formatStr(): string;
get defaultTargetGrammar(): Grammar;
get defaultTargetGoalRule(): string;
get syntaxAnalyser(): SyntaxAnalyser<GrammarModel>;
get semanticAnalyser(): SemanticAnalyser<GrammarModel, ContextWithScope<any, any>>;
get completionProvider(): CompletionProvider<GrammarModel, ContextWithScope<any, any>>;
toString(): string;
} & LanguageObjectAbstract<GrammarModel, ContextWithScope<any, any>>;
};
export declare class AglGrammarCompletionProvider extends CompletionProviderAbstract<GrammarModel, ContextWithScope<any, any>> {
constructor();
}
export declare class AglGrammarSemanticAnalyser implements SemanticAnalyser<GrammarModel, ContextWithScope<any, any>> {
constructor();
clear(): void;
analyse(sentenceIdentity: Nullable<any>, asm: GrammarModel, locationMap: Nullable<LocationMap> | undefined, options: SemanticAnalysisOptions<ContextWithScope<any, any>>): SemanticAnalysisResult;
readonly __doNotUseOrImplementIt: SemanticAnalyser<GrammarModel, ContextWithScope<any, any>>["__doNotUseOrImplementIt"];
static get Companion(): {
get OPTIONS_KEY_AMBIGUITY_ANALYSIS(): string;
findGrammarOrNull(context: ContextWithScope<any, any>, localNamespace: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, grammarNameOrQName: PossiblyQualifiedName): Grammar;
};
}
export declare function findTypeForRule(_this_: TypeModel, ruleName: PublicValueType/* GrammarRuleName */): Nullable<TypeInstance>;
export declare function contextFromGrammar(grammars: GrammarModel): ContextWithScope<any, any>;
export declare function ContextFromGrammarRegistry(registry: GrammarRegistry): ContextWithScope<any, any>;
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare class GrammarTypeNamespaceSimple extends GrammarTypeNamespaceAbstract {
constructor(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, options: OptionHolder | undefined, _import: KtList<PublicValueType/* Import */>);
get qualifiedName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
findInOrCloneTo(other: TypeModel): TypeNamespace;
createTypeInstance(contextQualifiedTypeName: Nullable<PossiblyQualifiedName & PublicValueType>/* Nullable<QualifiedName> */, qualifiedOrImportedTypeName: PossiblyQualifiedName, typeArguments?: KtList<TypeArgument>, isNullable?: boolean): TypeInstance;
asString(indent?: Indent): string;
static get Companion(): {
findOrCreateGrammarNamespace(typeModel: TypeModel, qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */): GrammarTypeNamespaceSimple;
};
}
export declare abstract class GrammarTypeNamespaceAbstract extends TypeNamespaceAbstract implements GrammarTypeNamespace {
constructor(options: OptionHolder, _import: KtList<PublicValueType/* Import */>);
setTypeForGrammarRule(grammarRuleName: PublicValueType/* GrammarRuleName */, typeUse: TypeInstance): void;
get allRuleNameToType(): KtMutableMap<PublicValueType/* GrammarRuleName */, TypeInstance>;
set allRuleNameToType(value: KtMutableMap<PublicValueType/* GrammarRuleName */, TypeInstance>);
get allTypesByRuleName(): any/* Collection<Pair<GrammarRuleName, TypeInstance>> */;
findTypeForRule(ruleName: PublicValueType/* GrammarRuleName */): Nullable<TypeInstance>;
createTypeInstance(contextQualifiedTypeName: Nullable<PossiblyQualifiedName & PublicValueType>/* Nullable<QualifiedName> */, qualifiedOrImportedTypeName: PossiblyQualifiedName, typeArguments?: KtList<TypeArgument>, isNullable?: boolean): TypeInstance;
asString(indent?: Indent): string;
abstract findInOrCloneTo(other: TypeModel): TypeNamespace;
abstract get qualifiedName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
readonly __doNotUseOrImplementIt: TypeNamespaceAbstract["__doNotUseOrImplementIt"] & GrammarTypeNamespace["__doNotUseOrImplementIt"];
}
export declare function grammarTypeNamespace(_this_: TypeModelBuilder, namespaceQualifiedName: string | undefined, imports: KtList<string> | undefined, resolveImports: boolean | undefined, init: (p0: TypeNamespaceBuilder/* GrammarTypeNamespaceBuilder */) => void): void;
/** @deprecated does not allow namespaces */
export declare function grammarTypeModel(namespaceQualifiedName: string, modelName: string, imports: KtList<TypeNamespace> | undefined, init: (p0: TypeNamespaceBuilder/* GrammarTypeNamespaceBuilder */) => void): TypeModel;
export declare interface GrammarTypeNamespace extends TypeNamespace {
readonly allRuleNameToType: KtMap<PublicValueType/* GrammarRuleName */, TypeInstance>;
readonly allTypesByRuleName: any/* Collection<Pair<GrammarRuleName, TypeInstance>> */;
findTypeForRule(ruleName: PublicValueType/* GrammarRuleName */): Nullable<TypeInstance>;
setTypeForGrammarRule(grammarRuleName: PublicValueType/* GrammarRuleName */, typeUse: TypeInstance): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.grammarTypemodel.api.GrammarTypeNamespace": unique symbol;
} & TypeNamespace["__doNotUseOrImplementIt"];
}
export declare const AglCrossReference: {
getInstance(): {
get NAMESPACE_NAME(): string;
get NAME(): string;
get goalRuleName(): string;
get identity(): PublicValueType/* LanguageIdentity */;
get grammarStr(): string;
get grammar(): Grammar;
get komposite(): string;
get typeModel(): TypeModel;
get styleStr(): string;
get formatterStr(): string;
toString(): string;
};
};
export declare class ReferencesCompletionProvider extends CompletionProviderAbstract<CrossReferenceModel, ContextFromTypeModel> {
constructor();
}
export declare class ReferencesSemanticAnalyser implements SemanticAnalyser<CrossReferenceModel, ContextFromTypeModel> {
constructor();
clear(): void;
analyse(sentenceIdentity: Nullable<any>, asm: CrossReferenceModel, locationMap: Nullable<LocationMap> | undefined, options: SemanticAnalysisOptions<ContextFromTypeModel>): SemanticAnalysisResult;
readonly __doNotUseOrImplementIt: SemanticAnalyser<CrossReferenceModel, ContextFromTypeModel>["__doNotUseOrImplementIt"];
}
export declare class ReferencesSyntaxAnalyser extends SyntaxAnalyserByMethodRegistrationAbstract<CrossReferenceModel> {
constructor();
registerHandlers(): void;
get extendsSyntaxAnalyser(): KtMap<(PossiblyQualifiedName & PublicValueType)/* QualifiedName */, SyntaxAnalyser<any /*UnknownType **/>>;
clear<T extends any>(done?: KtSet<SyntaxAnalyser<T>>): void;
}
export declare namespace ReferencesSyntaxAnalyser {
class PropertyValue {
constructor(asmObject: any, value: string);
get asmObject(): any;
get value(): string;
copy(asmObject?: any, value?: string): ReferencesSyntaxAnalyser.PropertyValue;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
}
export declare interface CrossReferenceModel extends Model<CrossReferenceNamespace, DeclarationsForNamespace> {
readonly declarationsForNamespace: KtMap<(PossiblyQualifiedName & PublicValueType)/* QualifiedName */, DeclarationsForNamespace>;
isScopeDefinedFor(possiblyQualifiedTypeName: PossiblyQualifiedName): boolean;
referencesFor(possiblyQualifiedTypeName: PossiblyQualifiedName): KtList<ReferenceExpression>;
referenceForProperty(typeQualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, propertyName: string): KtList<(PossiblyQualifiedName & PublicValueType)/* QualifiedName */>;
identifyingExpressionFor(scopeForTypeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, possiblyQualifiedTypeName: PossiblyQualifiedName): Nullable<Expression>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.reference.api.CrossReferenceModel": unique symbol;
} & Model<CrossReferenceNamespace, DeclarationsForNamespace>["__doNotUseOrImplementIt"];
}
export declare interface CrossReferenceNamespace extends Namespace<DeclarationsForNamespace> {
readonly declarationsForNamespace: DeclarationsForNamespace;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.reference.api.CrossReferenceNamespace": unique symbol;
} & Namespace<DeclarationsForNamespace>["__doNotUseOrImplementIt"];
}
export declare interface DeclarationsForNamespace extends Definition<DeclarationsForNamespace> {
readonly importedNamespaces: KtList<PublicValueType/* Import */>;
readonly scopeDefinition: KtMap<(PossiblyQualifiedName & PublicValueType)/* SimpleName */, ScopeDefinition>;
readonly references: KtList<ReferenceDefinition>;
readonly isEmpty: boolean;
isScopeDefinedFor(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): boolean;
referencesFor(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): KtList<ReferenceExpression>;
referenceForPropertyOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, propertyName: string): Nullable<ReferenceExpression>;
identifyingExpressionFor(scopeForTypeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<Expression>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.reference.api.DeclarationsForNamespace": unique symbol;
} & Definition<DeclarationsForNamespace>["__doNotUseOrImplementIt"];
}
export declare interface ReferenceDefinition extends Formatable {
readonly inTypeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
readonly referenceExpressionList: KtList<ReferenceExpression>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.reference.api.ReferenceDefinition": unique symbol;
} & Formatable["__doNotUseOrImplementIt"];
}
export declare interface ScopeDefinition extends Formatable {
readonly scopeForTypeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
readonly identifiables: KtList<Identifiable>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.reference.api.ScopeDefinition": unique symbol;
} & Formatable["__doNotUseOrImplementIt"];
}
export declare interface Identifiable extends Formatable {
readonly typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
readonly identifiedBy: Expression;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.reference.api.Identifiable": unique symbol;
} & Formatable["__doNotUseOrImplementIt"];
}
export declare interface ReferenceExpression extends Formatable {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.reference.api.ReferenceExpression": unique symbol;
} & Formatable["__doNotUseOrImplementIt"];
}
export declare interface ReferenceExpressionProperty extends ReferenceExpression {
readonly referringPropertyNavigation: NavigationExpression;
readonly refersToTypeName: KtList<PossiblyQualifiedName>;
readonly fromNavigation: Nullable<NavigationExpression>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.reference.api.ReferenceExpressionProperty": unique symbol;
} & ReferenceExpression["__doNotUseOrImplementIt"];
}
export declare interface ReferenceExpressionCollection extends ReferenceExpression {
readonly expression: Expression;
readonly ofType: Nullable<PossiblyQualifiedName>;
readonly referenceExpressionList: KtList<ReferenceExpression>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.reference.api.ReferenceExpressionCollection": unique symbol;
} & ReferenceExpression["__doNotUseOrImplementIt"];
}
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare class CrossReferenceModelDefault extends ModelAbstract<CrossReferenceNamespace, DeclarationsForNamespace> implements CrossReferenceModel {
constructor(name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, options?: OptionHolder, namespace?: KtList<CrossReferenceNamespace>);
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get declarationsForNamespace(): KtMap<(PossiblyQualifiedName & PublicValueType)/* QualifiedName */, DeclarationsForNamespace>;
get isEmpty(): boolean;
isScopeDefinedFor(possiblyQualifiedTypeName: PossiblyQualifiedName): boolean;
referencesFor(possiblyQualifiedTypeName: PossiblyQualifiedName): KtList<ReferenceExpression>;
identifyingExpressionFor(scopeForTypeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, possiblyQualifiedTypeName: PossiblyQualifiedName): Nullable<Expression>;
referenceForProperty(typeQualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, propertyName: string): KtList<(PossiblyQualifiedName & PublicValueType)/* QualifiedName */>;
addRecordReferenceForProperty(typeQualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, propertyName: string, refersToQualifiedTypeNames: KtList<(PossiblyQualifiedName & PublicValueType)/* QualifiedName */>): void;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: ModelAbstract<CrossReferenceNamespace, DeclarationsForNamespace>["__doNotUseOrImplementIt"] & CrossReferenceModel["__doNotUseOrImplementIt"];
static get Companion(): {
get ROOT_SCOPE_TYPE_NAME(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get IDENTIFY_BY_NOTHING(): string;
fromString(context: Nullable<ContextFromTypeModel>, crossReferenceString: PublicValueType/* CrossReferenceString */): ProcessResult<CrossReferenceModel>;
};
}
export declare class CrossReferenceNamespaceDefault extends NamespaceAbstract<DeclarationsForNamespace> implements CrossReferenceNamespace {
constructor(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, options?: OptionHolder, _import?: KtList<PublicValueType/* Import */>);
get qualifiedName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get declarationsForNamespace(): DeclarationsForNamespace;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: NamespaceAbstract<DeclarationsForNamespace>["__doNotUseOrImplementIt"] & CrossReferenceNamespace["__doNotUseOrImplementIt"];
}
export declare class DeclarationsForNamespaceDefault extends DefinitionAbstract<DeclarationsForNamespace> implements DeclarationsForNamespace {
constructor(namespace: CrossReferenceNamespace, options?: OptionHolder);
get namespace(): CrossReferenceNamespace;
get options(): OptionHolder;
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get importedNamespaces(): KtList<PublicValueType/* Import */>;
get scopeDefinition(): KtMutableMap<(PossiblyQualifiedName & PublicValueType)/* SimpleName */, ScopeDefinition>;
get references(): KtMutableList<ReferenceDefinition>;
get isEmpty(): boolean;
isScopeDefinedFor(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): boolean;
referencesFor(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): KtList<ReferenceExpression>;
referenceForPropertyOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, propertyName: string): Nullable<ReferenceExpression>;
identifyingExpressionFor(scopeForTypeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<Expression>;
asString(indent?: Indent): string;
copy(namespace?: CrossReferenceNamespace, options?: OptionHolder): DeclarationsForNamespaceDefault;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: DeclarationsForNamespace["__doNotUseOrImplementIt"] & DefinitionAbstract<DeclarationsForNamespace>["__doNotUseOrImplementIt"];
}
export declare class ScopeDefinitionDefault implements ScopeDefinition {
constructor(scopeForTypeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */);
get scopeForTypeName(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get identifiables(): KtMutableList<Identifiable>;
asString(indent?: Indent): string;
copy(scopeForTypeName?: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): ScopeDefinitionDefault;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: ScopeDefinition["__doNotUseOrImplementIt"];
}
export declare class IdentifiableDefault implements Identifiable {
constructor(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, identifiedBy: Expression);
get typeName(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get identifiedBy(): Expression;
asString(indent?: Indent): string;
copy(typeName?: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, identifiedBy?: Expression): IdentifiableDefault;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: Identifiable["__doNotUseOrImplementIt"];
}
export declare class ReferenceDefinitionDefault implements ReferenceDefinition {
constructor(inTypeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, referenceExpressionList: KtList<ReferenceExpression>);
get inTypeName(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get referenceExpressionList(): KtList<ReferenceExpression>;
asString(indent?: Indent): string;
copy(inTypeName?: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, referenceExpressionList?: KtList<ReferenceExpression>): ReferenceDefinitionDefault;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: ReferenceDefinition["__doNotUseOrImplementIt"];
}
export declare abstract class ReferenceExpressionAbstract implements ReferenceExpression {
constructor();
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: ReferenceExpression["__doNotUseOrImplementIt"];
}
export declare class ReferenceExpressionPropertyDefault extends ReferenceExpressionAbstract implements ReferenceExpressionProperty {
constructor(referringPropertyNavigation: NavigationExpression, refersToTypeName: KtList<PossiblyQualifiedName>, fromNavigation: Nullable<NavigationExpression>);
get referringPropertyNavigation(): NavigationExpression;
get refersToTypeName(): KtList<PossiblyQualifiedName>;
get fromNavigation(): Nullable<NavigationExpression>;
asString(indent?: Indent): string;
copy(referringPropertyNavigation?: NavigationExpression, refersToTypeName?: KtList<PossiblyQualifiedName>, fromNavigation?: Nullable<NavigationExpression>): ReferenceExpressionPropertyDefault;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: ReferenceExpressionAbstract["__doNotUseOrImplementIt"] & ReferenceExpressionProperty["__doNotUseOrImplementIt"];
}
export declare class ReferenceExpressionCollectionDefault extends ReferenceExpressionAbstract implements ReferenceExpressionCollection {
constructor(expression: Expression, ofType: Nullable<PossiblyQualifiedName>, referenceExpressionList: KtList<ReferenceExpressionAbstract>);
get expression(): Expression;
get ofType(): Nullable<PossiblyQualifiedName>;
get referenceExpressionList(): KtList<ReferenceExpressionAbstract>;
asString(indent?: Indent): string;
copy(expression?: Expression, ofType?: Nullable<PossiblyQualifiedName>, referenceExpressionList?: KtList<ReferenceExpressionAbstract>): ReferenceExpressionCollectionDefault;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: ReferenceExpressionAbstract["__doNotUseOrImplementIt"] & ReferenceExpressionCollection["__doNotUseOrImplementIt"];
}
export declare function crossReferenceModel(name: string, init: (p0: CrossReferenceModelBuilder) => void): CrossReferenceModel;
export declare class CrossReferenceModelBuilder {
constructor(_name: string);
declarationsFor(namespaceQualifiedName: string, init: (p0: DeclarationsForNamespaceBuilder) => void): void;
build(): CrossReferenceModel;
}
export declare class DeclarationsForNamespaceBuilder {
constructor(namespace: CrossReferenceNamespace);
import(namespaceQualifiedName: string): void;
scope(forTypeName: string, init: (p0: ScopeDefinitionBuilder) => void): void;
reference(inType: string, init: (p0: ReferenceDefinitionBuilder) => void): void;
build(): any/* Pair<DeclarationsForNamespace, KtList<Import>> */;
}
export declare class ScopeDefinitionBuilder {
constructor(_forTypeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */);
identify(typeName: string, expressionStr: string): void;
build(): ScopeDefinition;
}
export declare class ReferenceDefinitionBuilder {
constructor(_inType: (PossiblyQualifiedName & PublicValueType)/* SimpleName */);
get _refExpressionList(): KtMutableList<ReferenceExpression>;
property(referringPropertyStr: string, refersToTypes: KtList<string>, fromExpressionStr: Nullable<string>): void;
collection(): void;
build(): ReferenceDefinition;
}
export declare const AglScope: {
getInstance(): {
get komposite(): string;
get typeModel(): TypeModel;
};
};
export declare class ItemInScope<ItemInScopeType> {
constructor(referableName: string, qualifiedTypeName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, location: Nullable<any>, item: ItemInScopeType);
get referableName(): string;
get qualifiedTypeName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get location(): Nullable<any>;
get item(): ItemInScopeType;
copy(referableName?: string, qualifiedTypeName?: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, location?: Nullable<any>, item?: ItemInScopeType): ItemInScope<ItemInScopeType>;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare interface Scope<ItemInScopeType> {
readonly forTypeName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
readonly scopeIdentity: string;
readonly scopePath: KtList<string>;
readonly items: KtMap<string, KtMap<(PossiblyQualifiedName & PublicValueType)/* QualifiedName */, any/* Pair<Nullable<any>, ItemInScopeType> */>>;
readonly childScopes: KtMap<string, Scope<ItemInScopeType>>;
readonly rootScope: Scope<ItemInScopeType>;
readonly isEmpty: boolean;
clear(): void;
contains(referableName: string, conformsToFunc: (p0: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */) => boolean): boolean;
findItemsNamed(name: string): KtSet<ItemInScope<ItemInScopeType>>;
findItemsConformingTo(conformsToFunc: (p0: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */) => boolean): KtList<ItemInScope<ItemInScopeType>>;
findItemsNamedConformingTo(name: string, conformsToFunc: (p0: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */) => boolean): KtList<ItemInScope<ItemInScopeType>>;
findItemsByQualifiedName(qualifiedName: KtList<string>): KtSet<ItemInScope<ItemInScopeType>>;
findItemsByQualifiedNameConformingTo(qualifiedName: KtList<string>, conformsToFunc: (p0: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */) => boolean): KtList<ItemInScope<ItemInScopeType>>;
getChildScopeOrNull(childScopeIdentityInThis: string): Nullable<Scope<ItemInScopeType>>;
createOrGetChildScope(childScopeIdentityInThis: string, forTypeName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */): Scope<ItemInScopeType>;
addToScope(referableName: string, qualifiedTypeName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, location: Nullable<any>, item: ItemInScopeType, replaceIfAlreadyExists: boolean): boolean;
removeItemsWithLocation(location: any): void;
removeItemsIf(func: (p0: ItemInScope<ItemInScopeType>) => boolean): void;
asString(indent: Indent): string;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.scope.api.Scope": unique symbol;
};
}
export declare class ScopeSimple<ItemInScopeType> implements Scope<ItemInScopeType> {
constructor(parent: Nullable<ScopeSimple<ItemInScopeType>>, scopeIdentityInParent: string, forTypeName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */);
get parent(): Nullable<ScopeSimple<ItemInScopeType>>;
get scopeIdentityInParent(): string;
get forTypeName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get scopeIdentity(): string;
get scopePath(): KtList<string>;
get rootScope(): ScopeSimple<ItemInScopeType>;
get childScopes(): KtMap<string, ScopeSimple<ItemInScopeType>>;
get items(): KtMap<string, KtMap<(PossiblyQualifiedName & PublicValueType)/* QualifiedName */, any/* Pair<Nullable<any>, ItemInScopeType> */>>;
get isEmpty(): boolean;
clear(): void;
contains(referableName: string, conformsToFunc: (p0: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */) => boolean): boolean;
getChildScopeOrNull(childScopeIdentityInThis: string): Nullable<Scope<ItemInScopeType>>;
createOrGetChildScope(childScopeIdentityInThis: string, forTypeName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */): ScopeSimple<ItemInScopeType>;
addToScope(referableName: string, qualifiedTypeName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, location: Nullable<any>, itemInScope: ItemInScopeType, replaceIfAlreadyExists: boolean): boolean;
removeItemsWithLocation(location: any): void;
removeItemsIf(func: (p0: ItemInScope<ItemInScopeType>) => boolean): void;
findItemsNamed(name: string): KtSet<ItemInScope<ItemInScopeType>>;
findItemsConformingTo(conformsToFunc: (p0: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */) => boolean): KtList<ItemInScope<ItemInScopeType>>;
findItemsNamedConformingTo(name: string, conformsToFunc: (p0: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */) => boolean): KtList<ItemInScope<ItemInScopeType>>;
findItemsByQualifiedName(qualifiedName: KtList<string>): KtSet<ItemInScope<ItemInScopeType>>;
findItemsByQualifiedNameConformingTo(qualifiedName: KtList<string>, conformsToFunc: (p0: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */) => boolean): KtList<ItemInScope<ItemInScopeType>>;
asString(indent: Indent): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: Scope<ItemInScopeType>["__doNotUseOrImplementIt"];
static get Companion(): {
get ROOT_ID(): string;
};
}
export declare const AglStyle: {
getInstance(): {
get NAMESPACE_NAME(): string;
get NAME(): string;
get goalRuleName(): string;
get identity(): PublicValueType/* LanguageIdentity */;
get grammarString(): string;
get crossReferenceString(): string;
get styleString(): string;
get grammarModel(): GrammarModel;
get komposite(): string;
get typesModel(): TypeModel;
get asmTransformModel(): TransformModel;
get crossReferenceModel(): CrossReferenceModel;
get styleModel(): AglStyleModel;
get formatModel(): AglFormatModel;
get defaultTargetGrammar(): Grammar;
get defaultTargetGoalRule(): string;
get syntaxAnalyser(): Nullable<SyntaxAnalyser<AglStyleModel>>;
get semanticAnalyser(): Nullable<SemanticAnalyser<AglStyleModel, ContextWithScope<any, any>>>;
get completionProvider(): Nullable<CompletionProvider<AglStyleModel, ContextWithScope<any, any>>>;
} & LanguageObjectAbstract<AglStyleModel, ContextWithScope<any, any>>;
};
export declare class AglStyleCompletionProvider implements CompletionProvider<AglStyleModel, ContextWithScope<any, any>> {
constructor();
provide(spines: KtSet<Spine>, options: CompletionProviderOptions<ContextWithScope<any, any>>): KtList<CompletionItem>;
readonly __doNotUseOrImplementIt: CompletionProvider<AglStyleModel, ContextWithScope<any, any>>["__doNotUseOrImplementIt"];
static get Companion(): {
};
}
export declare class AglStyleSemanticAnalyser implements SemanticAnalyser<AglStyleModel, ContextWithScope<any, any>> {
constructor();
get _issues(): IssueHolder;
clear(): void;
analyse(sentenceIdentity: Nullable<any>, asm: AglStyleModel, locationMap: Nullable<LocationMap> | undefined, options: SemanticAnalysisOptions<ContextWithScope<any, any>>): SemanticAnalysisResult;
readonly __doNotUseOrImplementIt: SemanticAnalyser<AglStyleModel, ContextWithScope<any, any>>["__doNotUseOrImplementIt"];
static get Companion(): {
};
}
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare class AglStyleModelDefault extends ModelAbstract<StyleNamespace, StyleSet> implements AglStyleModel {
constructor(name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, options?: OptionHolder, namespace?: KtList<StyleNamespace>);
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: AglStyleModel["__doNotUseOrImplementIt"] & ModelAbstract<StyleNamespace, StyleSet>["__doNotUseOrImplementIt"];
static get Companion(): {
get KEYWORD_STYLE_ID(): AglStyleSelector;
get NO_STYLE_ID(): AglStyleSelector;
fromString(context: ContextWithScope<any, any>, aglStyleModelSentence: PublicValueType/* StyleString */): ProcessResult<AglStyleModel>;
};
}
export declare class StyleNamespaceDefault extends NamespaceAbstract<StyleSet> implements StyleNamespace {
constructor(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, options?: OptionHolder, _import?: KtList<PublicValueType/* Import */>);
get qualifiedName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get styleSet(): KtList<StyleSet>;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: StyleNamespace["__doNotUseOrImplementIt"] & NamespaceAbstract<StyleSet>["__doNotUseOrImplementIt"];
}
export declare class StyleSetReferenceDefault implements StyleSetReference {
constructor(localNamespace: StyleNamespace, nameOrQName: PossiblyQualifiedName);
get localNamespace(): StyleNamespace;
get nameOrQName(): PossiblyQualifiedName;
get resolved(): Nullable<StyleSet>;
set resolved(value: Nullable<StyleSet>);
resolveAs(resolved: StyleSet): void;
copy(localNamespace?: StyleNamespace, nameOrQName?: PossiblyQualifiedName): StyleSetReferenceDefault;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: StyleSetReference["__doNotUseOrImplementIt"];
}
export declare class AglStyleSetDefault extends DefinitionAbstract<StyleSet> implements StyleSet {
constructor(namespace: StyleNamespace, name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, _extends: KtList<StyleSetReference>, options?: OptionHolder);
get namespace(): StyleNamespace;
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get extends(): KtList<StyleSetReference>;
get options(): OptionHolder;
get rules(): KtList<AglStyleRule>;
get metaRules(): KtList<AglStyleMetaRule>;
get tagRules(): KtList<AglStyleTagRule>;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: StyleSet["__doNotUseOrImplementIt"] & DefinitionAbstract<StyleSet>["__doNotUseOrImplementIt"];
}
export declare class AglStyleMetaRuleDefault implements AglStyleMetaRule {
constructor(pattern: any/* Regex */);
get pattern(): any/* Regex */;
get declaration(): (KtMap<string, AglStyleDeclaration> & KtMutableMap<string, AglStyleDeclaration>)/* LinkedHashMap<string, AglStyleDeclaration> */;
set declaration(value: (KtMap<string, AglStyleDeclaration> & KtMutableMap<string, AglStyleDeclaration>)/* LinkedHashMap<string, AglStyleDeclaration> */);
asString(indent?: Indent): string;
copy(pattern?: any/* Regex */): AglStyleMetaRuleDefault;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: AglStyleMetaRule["__doNotUseOrImplementIt"];
}
export declare class AglStyleTagRuleDefault implements AglStyleTagRule {
constructor(selector: KtList<AglStyleSelector>);
get selector(): KtList<AglStyleSelector>;
get declaration(): (KtMap<string, AglStyleDeclaration> & KtMutableMap<string, AglStyleDeclaration>)/* LinkedHashMap<string, AglStyleDeclaration> */;
set declaration(value: (KtMap<string, AglStyleDeclaration> & KtMutableMap<string, AglStyleDeclaration>)/* LinkedHashMap<string, AglStyleDeclaration> */);
asString(indent?: Indent): string;
copy(selector?: KtList<AglStyleSelector>): AglStyleTagRuleDefault;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: AglStyleTagRule["__doNotUseOrImplementIt"];
}
export declare interface AglStyleModel extends Model<StyleNamespace, StyleSet> {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.style.api.AglStyleModel": unique symbol;
} & Model<StyleNamespace, StyleSet>["__doNotUseOrImplementIt"];
}
export declare interface StyleNamespace extends Namespace<StyleSet> {
readonly styleSet: KtList<StyleSet>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.style.api.StyleNamespace": unique symbol;
} & Namespace<StyleSet>["__doNotUseOrImplementIt"];
}
export declare interface StyleSetReference {
readonly localNamespace: StyleNamespace;
readonly nameOrQName: PossiblyQualifiedName;
readonly resolved: Nullable<StyleSet>;
resolveAs(resolved: StyleSet): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.style.api.StyleSetReference": unique symbol;
};
}
export declare interface StyleSet extends Definition<StyleSet> {
readonly namespace: StyleNamespace;
readonly extends: KtList<StyleSetReference>;
readonly rules: KtList<AglStyleRule>;
readonly metaRules: KtList<AglStyleMetaRule>;
readonly tagRules: KtList<AglStyleTagRule>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.style.api.StyleSet": unique symbol;
} & Definition<StyleSet>["__doNotUseOrImplementIt"];
}
export declare interface AglStyleRule extends Formatable {
readonly declaration: KtMap<string, AglStyleDeclaration>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.style.api.AglStyleRule": unique symbol;
} & Formatable["__doNotUseOrImplementIt"];
}
export declare interface AglStyleMetaRule extends AglStyleRule {
readonly pattern: any/* Regex */;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.style.api.AglStyleMetaRule": unique symbol;
} & AglStyleRule["__doNotUseOrImplementIt"];
}
export declare interface AglStyleTagRule extends AglStyleRule {
readonly selector: KtList<AglStyleSelector>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.style.api.AglStyleTagRule": unique symbol;
} & AglStyleRule["__doNotUseOrImplementIt"];
}
export declare abstract class AglStyleSelectorKind {
private constructor();
static get SPECIAL(): AglStyleSelectorKind & {
get name(): "SPECIAL";
get ordinal(): 0;
};
static get LITERAL(): AglStyleSelectorKind & {
get name(): "LITERAL";
get ordinal(): 1;
};
static get PATTERN(): AglStyleSelectorKind & {
get name(): "PATTERN";
get ordinal(): 2;
};
static get RULE_NAME(): AglStyleSelectorKind & {
get name(): "RULE_NAME";
get ordinal(): 3;
};
get name(): "SPECIAL" | "LITERAL" | "PATTERN" | "RULE_NAME";
get ordinal(): 0 | 1 | 2 | 3;
static values(): Array<AglStyleSelectorKind>;
static valueOf(value: string): AglStyleSelectorKind;
}
export declare class AglStyleSelector {
constructor(value: string, kind: AglStyleSelectorKind);
get value(): string;
get kind(): AglStyleSelectorKind;
copy(value?: string, kind?: AglStyleSelectorKind): AglStyleSelector;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare class AglStyleDeclaration {
constructor(name: string, value: string);
get name(): string;
get value(): string;
copy(name?: string, value?: string): AglStyleDeclaration;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
}
export declare function styleModel(name: string, init: (p0: StyleModelBuilder) => void): AglStyleModel;
export declare class StyleModelBuilder {
constructor(_name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */);
namespace(qualifiedName: string, init: (p0: StyleNamespaceBuilder) => void): void;
build(): AglStyleModel;
}
export declare class StyleNamespaceBuilder {
private constructor();
styles(name: string, init: (p0: StylesBuilder) => void): void;
build(): StyleNamespaceDefault;
}
export declare class StylesBuilder {
private constructor();
metaRule(pattern: string, init: (p0: StyleMetaRuleBuilder) => void): void;
tagRule(tag: Array<string>, init: (p0: StyleTagRuleBuilder) => void): void;
build(): AglStyleSetDefault;
}
export declare class StyleMetaRuleBuilder {
private constructor();
declaration(name: string, value: string): void;
build(): AglStyleMetaRuleDefault;
}
export declare class StyleTagRuleBuilder {
private constructor();
declaration(name: string, value: string): void;
build(): AglStyleTagRuleDefault;
}
export declare const AsmTransform: {
getInstance(): {
get NAMESPACE_NAME(): string;
get NAME(): string;
get goalRuleName(): string;
get identity(): PublicValueType/* LanguageIdentity */;
get grammarString(): string;
get grammar(): Grammar;
get styleStr(): string;
toString(): string;
};
};
export declare class AsmTransformCompletionProvider extends CompletionProviderAbstract<TransformModel, ContextFromGrammarAndTypeModel> {
constructor();
}
export declare class AsmTransformInterpreter<AsmValueType extends any> {
constructor(typeModel: TypeModel, objectGraph: ObjectGraph<AsmValueType>);
get typeModel(): TypeModel;
get objectGraph(): ObjectGraph<AsmValueType>;
get issues(): IssueHolder;
get exprInterpreter(): ExpressionsInterpreterOverTypedObject<AsmValueType>;
clear(): void;
evaluate(evc: EvaluationContext<AsmValueType>, trRule: TransformationRule): TypedObject<AsmValueType>;
static get Companion(): {
get SELF(): string;
get PATH(): PublicValueType/* PropertyName */;
get ALTERNATIVE(): PublicValueType/* PropertyName */;
get CHILD(): PublicValueType/* PropertyName */;
get CHILDREN(): PublicValueType/* PropertyName */;
get MATCHED_TEXT(): PublicValueType/* PropertyName */;
get LIST_OF_ANY(): TypeInstance;
get SLIST_OF_ANY(): TypeInstance;
get CMP_STR_MEM(): KtSet<PropertyCharacteristic>;
get parseNodeTypeModel(): TypeModel;
get parseNodeNamespace(): TypeNamespace;
get PARSE_NODE_TYPE_LEAF(): TypeDefinition;
get PARSE_NODE_TYPE_BRANCH_SIMPLE(): TypeInstance;
get PARSE_NODE_TYPE_BRANCH_SEPARATED(): TypeInstance;
};
}
export declare class AsmTransformSemanticAnalyser implements SemanticAnalyser<TransformModel, ContextFromGrammarAndTypeModel> {
constructor();
clear(): void;
analyse(sentenceIdentity: Nullable<any>, asm: TransformModel, locationMap: Nullable<LocationMap> | undefined, options: SemanticAnalysisOptions<ContextFromGrammarAndTypeModel>): SemanticAnalysisResult;
readonly __doNotUseOrImplementIt: SemanticAnalyser<TransformModel, ContextFromGrammarAndTypeModel>["__doNotUseOrImplementIt"];
static get Companion(): {
get OPTION_CREATE_TYPES(): string;
get OPTION_OVERRIDE_DEFAULT(): string;
};
}
export declare class AsmTransformSyntaxAnalyser extends SyntaxAnalyserByMethodRegistrationAbstract<TransformModel> {
constructor();
get extendsSyntaxAnalyser(): KtMap<(PossiblyQualifiedName & PublicValueType)/* QualifiedName */, SyntaxAnalyser<any /*UnknownType **/>>;
get embeddedSyntaxAnalyser(): KtMap<(PossiblyQualifiedName & PublicValueType)/* QualifiedName */, SyntaxAnalyser<any /*UnknownType **/>>;
registerHandlers(): void;
clear<T extends any>(done?: KtSet<SyntaxAnalyser<T>>): void;
}
export declare interface TransformModel extends Model<TransformNamespace, TransformRuleSet> {
readonly typeModel: Nullable<TypeModel>;
readonly namespace: KtList<TransformNamespace>;
findOrCreateNamespace(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, imports: KtList<PublicValueType/* Import */>): TransformNamespace;
findTypeForGrammarRule(grammarQualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, ruleName: PublicValueType/* GrammarRuleName */): Nullable<TypeInstance>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.transform.api.TransformModel": unique symbol;
} & Model<TransformNamespace, TransformRuleSet>["__doNotUseOrImplementIt"];
}
export declare interface TransformNamespace extends Namespace<TransformRuleSet> {
createOwnedTransformRuleSet(name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, _extends: KtList<TransformRuleSetReference>, options: OptionHolder): TransformRuleSet;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.transform.api.TransformNamespace": unique symbol;
} & Namespace<TransformRuleSet>["__doNotUseOrImplementIt"];
}
export declare interface TransformRuleSetReference extends DefinitionReference<TransformRuleSet> {
cloneTo(ns: TransformNamespace): TransformRuleSetReference;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.transform.api.TransformRuleSetReference": unique symbol;
} & DefinitionReference<TransformRuleSet>["__doNotUseOrImplementIt"];
}
export declare interface TransformRuleSet extends Definition<TransformRuleSet> {
readonly namespace: TransformNamespace;
readonly extends: KtList<TransformRuleSetReference>;
readonly importTypes: KtList<PublicValueType/* Import */>;
readonly rules: KtMap<PublicValueType/* GrammarRuleName */, TransformationRule>;
readonly createObjectRules: KtList<CreateObjectRule>;
readonly modifyObjectRules: KtList<ModifyObjectRule>;
findOwnedTrRuleForGrammarRuleNamedOrNull(grmRuleName: PublicValueType/* GrammarRuleName */): Nullable<TransformationRule>;
findAllTrRuleForGrammarRuleNamedOrNull(grmRuleName: PublicValueType/* GrammarRuleName */): Nullable<TransformationRule>;
addImportType(value: PublicValueType/* Import */): void;
setRule(rule: TransformationRule): void;
cloneTo(ns: TransformNamespace): TransformRuleSet;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.transform.api.TransformRuleSet": unique symbol;
} & Definition<TransformRuleSet>["__doNotUseOrImplementIt"];
}
export declare interface TransformationRule {
grammarRuleName: PublicValueType/* GrammarRuleName */;
readonly expression: Expression;
readonly isResolved: boolean;
readonly resolvedType: TypeInstance;
resolveTypeAs(type: TypeInstance): void;
asString(indent?: Indent, imports?: KtList<PublicValueType/* Import */>): string;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.transform.api.TransformationRule": unique symbol;
};
}
export declare interface CreateObjectRule extends TransformationRule {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.transform.api.CreateObjectRule": unique symbol;
} & TransformationRule["__doNotUseOrImplementIt"];
}
export declare interface SelfStatement {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.transform.api.SelfStatement": unique symbol;
};
}
export declare interface ModifyObjectRule extends TransformationRule {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.transform.api.ModifyObjectRule": unique symbol;
} & TransformationRule["__doNotUseOrImplementIt"];
}
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare class TransformDomainDefault extends ModelAbstract<TransformNamespace, TransformRuleSet> implements TransformModel {
constructor(name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, options?: OptionHolder, namespace?: KtList<TransformNamespace>);
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get typeModel(): Nullable<TypeModel>;
set typeModel(value: Nullable<TypeModel>);
findOrCreateNamespace(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, imports: KtList<PublicValueType/* Import */>): TransformNamespace;
findTypeForGrammarRule(grammarQualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, ruleName: PublicValueType/* GrammarRuleName */): Nullable<TypeInstance>;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: TransformModel["__doNotUseOrImplementIt"] & ModelAbstract<TransformNamespace, TransformRuleSet>["__doNotUseOrImplementIt"];
static get Companion(): {
fromString(context: ContextFromGrammarAndTypeModel, transformStr: PublicValueType/* TransformString */): ProcessResult<TransformModel>;
fromGrammarModel(grammarModel: GrammarModel, typeModel?: TypeModel, configuration?: Nullable<Grammar2TypeModelMapping>): ProcessResult<TransformModel>;
};
}
export declare class TransformNamespaceDefault extends NamespaceAbstract<TransformRuleSet> implements TransformNamespace {
constructor(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, options?: OptionHolder, _import?: KtList<PublicValueType/* Import */>);
get qualifiedName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
createOwnedTransformRuleSet(name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, _extends: KtList<TransformRuleSetReference>, options: OptionHolder): TransformRuleSet;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: TransformNamespace["__doNotUseOrImplementIt"] & NamespaceAbstract<TransformRuleSet>["__doNotUseOrImplementIt"];
}
export declare class TransformRuleSetReferenceDefault implements TransformRuleSetReference {
constructor(localNamespace: TransformNamespace, nameOrQName: PossiblyQualifiedName);
get localNamespace(): TransformNamespace;
get nameOrQName(): PossiblyQualifiedName;
get resolved(): Nullable<TransformRuleSet>;
set resolved(value: Nullable<TransformRuleSet>);
resolveAs(resolved: TransformRuleSet): void;
cloneTo(ns: TransformNamespace): TransformRuleSetReference;
copy(localNamespace?: TransformNamespace, nameOrQName?: PossiblyQualifiedName): TransformRuleSetReferenceDefault;
toString(): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: TransformRuleSetReference["__doNotUseOrImplementIt"];
}
export declare class TransformRuleSetDefault extends DefinitionAbstract<TransformRuleSet> implements TransformRuleSet {
constructor(namespace: TransformNamespace, name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, argExtends: KtList<TransformRuleSetReference> | undefined, options: OptionHolder | undefined, _rules: KtList<TransformationRule>);
get namespace(): TransformNamespace;
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get options(): OptionHolder;
get extends(): KtList<TransformRuleSetReference>;
get importTypes(): KtList<PublicValueType/* Import */>;
get rules(): KtMap<PublicValueType/* GrammarRuleName */, TransformationRule>;
get createObjectRules(): KtList<CreateObjectRule>;
get modifyObjectRules(): KtList<ModifyObjectRule>;
addImportType(value: PublicValueType/* Import */): void;
findOwnedTrRuleForGrammarRuleNamedOrNull(grmRuleName: PublicValueType/* GrammarRuleName */): Nullable<TransformationRule>;
findAllTrRuleForGrammarRuleNamedOrNull(grmRuleName: PublicValueType/* GrammarRuleName */): Nullable<TransformationRule>;
cloneTo(ns: TransformNamespace): TransformRuleSet;
addExtends(other: TransformRuleSetReference): void;
setRule(rule: TransformationRule): void;
asString(indent?: Indent): string;
toString(): string;
readonly __doNotUseOrImplementIt: TransformRuleSet["__doNotUseOrImplementIt"] & DefinitionAbstract<TransformRuleSet>["__doNotUseOrImplementIt"];
}
export declare class TransformationRuleDefault implements TransformationRule {
constructor(expression: Expression);
get expression(): Expression;
get grammarRuleName(): PublicValueType/* GrammarRuleName */;
set grammarRuleName(value: PublicValueType/* GrammarRuleName */);
get isResolved(): boolean;
get resolvedType(): TypeInstance;
resolveTypeAs(type: TypeInstance): void;
asString(indent?: Indent, imports?: KtList<PublicValueType/* Import */>): string;
toString(): string;
readonly __doNotUseOrImplementIt: TransformationRule["__doNotUseOrImplementIt"];
}
export declare function asmTransform(name: string, typeModel: TypeModel, createTypes: boolean, init: (p0: AsmTransformModelBuilder) => void): TransformModel;
export declare class AsmTransformModelBuilder {
private constructor();
namespace(qualifiedName: string, init: (p0: AsmTransformNamespaceBuilder) => void): void;
build(): TransformModel;
}
export declare class AsmTransformNamespaceBuilder {
private constructor();
imports(imports: Array<string>): void;
transform(name: string, init: (p0: AsmTransformRuleSetBuilder) => void): void;
build(): TransformNamespace;
}
export declare class AsmTransformRuleSetBuilder {
private constructor();
expression(expressionStr: string): Expression;
extends(list: Array<string>): void;
importTypes(imports: Array<string>): void;
leafStringRule(grammarRuleName: string): void;
transRule(grammarRuleName: string, typeName: string, expressionStr: string): void;
transToListOf(grammarRuleName: string, elementTypeName: string, expressionStr: string): void;
child0StringRule(grammarRuleName: string): void;
subtypeRule(grammarRuleName: string, typeName: string): void;
unionRule(grammarRuleName: string, typeName: string, expressionStr: string, init: (p0: SubtypeListBuilder) => void): void;
createObject(grammarRuleName: string, typeName: string, modifyStatements?: (p0: AssignmentBuilder) => void): void;
build(): TransformRuleSet;
}
export declare class AssignmentBuilder {
constructor();
assignment(lhsPropertyName: string, lhsGrammarRuleIndex: Nullable<number>, expressionStr: string): void;
build(): KtList<AssignmentStatement>;
}
export declare const StdLibDefault: {
getInstance(): {
get qualifiedName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get AnyType(): TypeInstance;
get NothingType(): TypeInstance;
get String(): TypeInstance;
get Boolean(): TypeInstance;
get Integer(): TypeInstance;
get Real(): TypeInstance;
get Timestamp(): TypeInstance;
get Exception(): TypeInstance;
get Pair(): DataType;
get Lambda(): TypeInstance;
get TupleType(): TupleTypeSimple;
get Collection(): CollectionType;
get List(): CollectionType;
get ListSeparated(): CollectionType;
get Set(): CollectionType;
get OrderedSet(): CollectionType;
get Map(): CollectionType;
findInOrCloneTo(other: TypeModel): TypeNamespace;
createTypeInstance(contextQualifiedTypeName: Nullable<PossiblyQualifiedName & PublicValueType>/* Nullable<QualifiedName> */, qualifiedOrImportedTypeName: PossiblyQualifiedName, typeArguments?: KtList<TypeArgument>, isNullable?: boolean): TypeInstance;
asString(indent?: Indent): string;
} & TypeNamespaceAbstract;
};
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare class TypeModelSimple extends TypeModelSimpleAbstract {
constructor(name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, options?: OptionHolder);
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get options(): OptionHolder;
asString(indent?: Indent): string;
static get Companion(): {
fromString(name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, context: ContextWithScope<any, any>, typesString: PublicValueType/* TypesString */): ProcessResult<TypeModel>;
};
}
export declare abstract class TypeModelSimpleAbstract implements TypeModel {
constructor();
get AnyType(): TypeDefinition;
get NothingType(): TypeDefinition;
get namespace(): KtList<TypeNamespace>;
resolveImports(): void;
addNamespace(value: TypeNamespace): void;
findOrCreateNamespace(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, imports: KtList<PublicValueType/* Import */>): TypeNamespace;
findFirstDefinitionByPossiblyQualifiedNameOrNull(typeName: PossiblyQualifiedName): Nullable<TypeDefinition>;
findFirstDefinitionByNameOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<TypeDefinition>;
findByQualifiedNameOrNull(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */): Nullable<TypeDefinition>;
addAllNamespaceAndResolveImports(namespaces: any/* Iterable<TypeNamespace> */): void;
get allDefinitions(): KtList<TypeDefinition>;
get isEmpty(): boolean;
findNamespaceOrNull(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */): Nullable<TypeNamespace>;
findDefinitionByQualifiedNameOrNull(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */): Nullable<TypeDefinition>;
resolveReference(reference: DefinitionReference<TypeDefinition>): Nullable<TypeDefinition>;
asString(indent?: Indent): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
abstract get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
abstract get options(): OptionHolder;
readonly __doNotUseOrImplementIt: TypeModel["__doNotUseOrImplementIt"];
}
export declare abstract class TypeInstanceAbstract implements TypeInstance {
constructor();
get allResolvedProperty(): KtMap<PublicValueType/* PropertyName */, PropertyDeclarationResolved>;
get allResolvedMethod(): KtMap<PublicValueType/* MethodName */, MethodDeclarationResolved>;
get asTypeArgument(): TypeArgument;
notNullable(): TypeInstance;
nullable(): TypeInstance;
signature(context: Nullable<TypeNamespace>, currentDepth: number): string;
conformsTo(other: TypeInstance): boolean;
commonSuperType(other: TypeInstance): TypeInstance;
abstract hashCode(): number;
abstract equals(other: Nullable<any>): boolean;
toString(): string;
protected createTypeArgMap(): KtMap<TypeParameter, TypeInstance>;
abstract get namespace(): TypeNamespace;
abstract get typeArguments(): KtList<TypeArgument>;
abstract get isNullable(): boolean;
abstract get typeName(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
abstract get qualifiedTypeName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
abstract get resolvedDeclaration(): TypeDefinition;
abstract get resolvedDeclarationOrNull(): Nullable<TypeDefinition>;
abstract resolved(resolvingTypeArguments: KtMap<TypeParameter, TypeInstance>): TypeInstance;
abstract possiblyQualifiedNameInContext(context: TypeNamespace): any;
abstract findInOrCloneTo(other: TypeModel): TypeInstance;
readonly __doNotUseOrImplementIt: TypeInstance["__doNotUseOrImplementIt"];
}
export declare class TypeParameterReference extends TypeInstanceAbstract implements TypeInstance {
constructor(context: TypeDefinition, typeParameterName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, isNullable?: boolean);
get context(): TypeDefinition;
get typeParameterName(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get isNullable(): boolean;
get namespace(): TypeNamespace;
get qualifiedTypeName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get typeName(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get typeArguments(): KtList<TypeArgument>;
get resolvedDeclarationOrNull(): Nullable<TypeDefinition>;
get resolvedDeclaration(): TypeDefinition;
conformsTo(other: TypeInstance): boolean;
signature(context: Nullable<TypeNamespace>, currentDepth: number): string;
resolved(resolvingTypeArguments: KtMap<TypeParameter, TypeInstance>): TypeInstance;
possiblyQualifiedNameInContext(context: TypeNamespace): PossiblyQualifiedName;
findInOrCloneTo(other: TypeModel): TypeInstance;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: TypeInstanceAbstract["__doNotUseOrImplementIt"] & TypeInstance["__doNotUseOrImplementIt"];
}
export declare class TypeArgumentSimple implements TypeArgument {
constructor(type: TypeInstance);
get type(): TypeInstance;
conformsTo(other: TypeArgument): boolean;
resolved(resolvingTypeArguments: KtMap<TypeParameter, TypeInstance>): TypeInstance;
signature(context: Nullable<TypeNamespace>, currentDepth: number): string;
findInOrCloneTo(other: TypeModel): TypeArgument;
toString(): string;
copy(type?: TypeInstance): TypeArgumentSimple;
hashCode(): number;
equals(other: Nullable<any>): boolean;
readonly __doNotUseOrImplementIt: TypeArgument["__doNotUseOrImplementIt"];
}
/* @ts-ignore: https://github.com/microsoft/TypeScript/issues/4628 */
export declare class TypeInstanceSimple extends TypeInstanceAbstract {
constructor(contextQualifiedTypeName: Nullable<PossiblyQualifiedName & PublicValueType>/* Nullable<QualifiedName> */, namespace: TypeNamespace, qualifiedOrImportedTypeName: PossiblyQualifiedName, typeArguments: KtList<TypeArgument>, isNullable: boolean);
get contextQualifiedTypeName(): Nullable<PossiblyQualifiedName & PublicValueType>/* Nullable<QualifiedName> */;
get namespace(): TypeNamespace;
get qualifiedOrImportedTypeName(): PossiblyQualifiedName;
get typeArguments(): KtList<TypeArgument>;
get isNullable(): boolean;
get context(): Nullable<TypeDefinition>;
get typeName(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get qualifiedTypeName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get resolvedDeclarationOrNull(): Nullable<TypeDefinition>;
get resolvedDeclaration(): TypeDefinition;
resolved(resolvingTypeArguments: KtMap<TypeParameter, TypeInstance>): TypeInstance;
possiblyQualifiedNameInContext(context: TypeNamespace): PossiblyQualifiedName;
findInOrCloneTo(other: TypeModel): TypeInstance;
hashCode(): number;
equals(other: Nullable<any>): boolean;
static get Companion(): {
combineTypeArgMap(first: KtMap<TypeParameter, TypeInstance>, second: KtMap<TypeParameter, TypeInstance>): KtMap<TypeParameter, TypeInstance>;
};
}
export declare class TupleTypeInstanceSimple extends TypeInstanceAbstract implements TupleTypeInstance {
constructor(namespace: TypeNamespace, typeArguments: KtList<TypeArgumentNamed>, isNullable: boolean);
get namespace(): TypeNamespace;
get typeArguments(): KtList<TypeArgumentNamed>;
get isNullable(): boolean;
get typeName(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get qualifiedTypeName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get resolvedDeclarationOrNull(): TypeDefinition;
get resolvedDeclaration(): TypeDefinition;
resolved(resolvingTypeArguments: KtMap<TypeParameter, TypeInstance>): TypeInstance;
protected createTypeArgMap(): KtMap<TypeParameter, TypeInstance>;
possiblyQualifiedNameInContext(context: TypeNamespace): PossiblyQualifiedName;
findInOrCloneTo(other: TypeModel): TypeInstance;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: TypeInstanceAbstract["__doNotUseOrImplementIt"] & TupleTypeInstance["__doNotUseOrImplementIt"];
}
export declare class TypeNamespaceSimple extends TypeNamespaceAbstract {
constructor(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, options?: OptionHolder, _import?: KtList<PublicValueType/* Import */>);
get qualifiedName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
findInOrCloneTo(other: TypeModel): TypeNamespace;
createTypeInstance(contextQualifiedTypeName: Nullable<PossiblyQualifiedName & PublicValueType>/* Nullable<QualifiedName> */, qualifiedOrImportedTypeName: PossiblyQualifiedName, typeArguments?: KtList<TypeArgument>, isNullable?: boolean): TypeInstance;
asString(indent?: Indent): string;
}
export declare abstract class TypeNamespaceAbstract extends NamespaceAbstract<TypeDefinition> implements TypeNamespace {
constructor(options: OptionHolder, _import: KtList<PublicValueType/* Import */>);
get import(): KtList<PublicValueType/* Import */>;
get ownedTypesByName(): KtMap<(PossiblyQualifiedName & PublicValueType)/* SimpleName */, TypeDefinition>;
get ownedTypes(): any/* Collection<TypeDefinition> */;
get ownedUnnamedSupertypeType(): KtMutableList<UnionType>;
get ownedTupleTypes(): KtMutableList<TupleType>;
get singletonType(): KtSet<SingletonType>;
get primitiveType(): KtSet<PrimitiveType>;
get valueType(): KtSet<ValueType>;
get enumType(): KtSet<EnumType>;
get collectionType(): KtSet<CollectionType>;
get interfaceType(): KtSet<InterfaceType>;
get dataType(): KtSet<DataType>;
isImported(qualifiedNamespaceName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */): boolean;
findOwnedTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<TypeDefinition>;
findTypeNamed(qualifiedOrImportedTypeName: PossiblyQualifiedName): Nullable<TypeDefinition>;
findOwnedUnnamedSupertypeTypeOrNull(subtypes: KtList<TypeInstance>): Nullable<UnionType>;
/** @deprecated No longer needed */
findTupleTypeWithIdOrNull(id: number): Nullable<TupleType>;
findOwnedSpecialTypeNamedOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<SpecialTypeSimple>;
findOwnedSingletonTypeNamedOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<SingletonType>;
findOwnedPrimitiveTypeNamedOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<PrimitiveType>;
findOwnedEnumTypeNamedOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<EnumType>;
findOwnedCollectionTypeNamedOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<CollectionType>;
findOwnedValueTypeNamedOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<ValueType>;
findOwnedInterfaceTypeNamedOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<InterfaceType>;
findOwnedDataTypeNamedOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<DataType>;
findOwnedUnionTypeNamedOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<UnionType>;
createOwnedDataTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): DataType;
findOwnedOrCreateSpecialTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): SpecialTypeSimple;
findOwnedOrCreateSingletonTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): SingletonType;
findOwnedOrCreatePrimitiveTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): PrimitiveType;
findOwnedOrCreateEnumTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, literals: KtList<string>): EnumType;
findOwnedOrCreateCollectionTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): CollectionType;
findOwnedOrCreateValueTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): ValueType;
findOwnedOrCreateInterfaceTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): InterfaceType;
findOwnedOrCreateDataTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): DataType;
findOwnedOrCreateUnionTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, ifCreate: (p0: UnionType) => void): UnionType;
createTupleType(): TupleType;
createTypeInstance(contextQualifiedTypeName: Nullable<PossiblyQualifiedName & PublicValueType>/* Nullable<QualifiedName> */, qualifiedOrImportedTypeName: PossiblyQualifiedName, typeArguments?: KtList<TypeArgument>, isNullable?: boolean): TypeInstance;
createTupleTypeInstance(typeArguments: KtList<TypeArgumentNamed>, nullable: boolean): TupleTypeInstance;
asString(indent?: Indent): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
abstract findInOrCloneTo(other: TypeModel): TypeNamespace;
abstract get qualifiedName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
readonly __doNotUseOrImplementIt: TypeNamespace["__doNotUseOrImplementIt"] & NamespaceAbstract<TypeDefinition>["__doNotUseOrImplementIt"];
}
export declare class TypeParameterSimple implements TypeParameter {
constructor(name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */);
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
clone(): TypeParameter;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: TypeParameter["__doNotUseOrImplementIt"];
}
export declare const TypeParameterMultiple: {
getInstance(): {
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
clone(): TypeParameter;
readonly __doNotUseOrImplementIt: TypeParameter["__doNotUseOrImplementIt"];
} & TypeParameter;
};
export declare abstract class TypeDefinitionSimpleAbstract implements TypeDefinition {
constructor(options?: OptionHolder);
get options(): OptionHolder;
get qualifiedName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
get supertypes(): KtList<TypeInstance>;
get subtypes(): KtList<TypeInstance>;
get typeParameters(): KtList<TypeParameter>;
get propertyByIndex(): KtMutableMap<number, PropertyDeclaration>;
get property(): KtList<PropertyDeclaration>;
get method(): KtMutableList<MethodDeclaration>;
get allSuperTypes(): KtList<TypeInstance>;
get allProperty(): KtMap<PublicValueType/* PropertyName */, PropertyDeclaration>;
get allMethod(): KtMap<PublicValueType/* MethodName */, MethodDeclaration>;
get metaInfo(): KtMutableMap<string, string>;
set metaInfo(value: KtMutableMap<string, string>);
type(typeArguments?: KtList<TypeArgument>, isNullable?: boolean): TypeInstance;
conformsTo(other: TypeDefinition): boolean;
getOwnedPropertyByIndexOrNull(i: number): Nullable<PropertyDeclaration>;
findOwnedPropertyOrNull(name: PublicValueType/* PropertyName */): Nullable<PropertyDeclaration>;
findAllPropertyOrNull(name: PublicValueType/* PropertyName */): Nullable<PropertyDeclaration>;
findOwnedMethodOrNull(name: PublicValueType/* MethodName */): Nullable<MethodDeclaration>;
findAllMethodOrNull(name: PublicValueType/* MethodName */): Nullable<MethodDeclaration>;
addTypeParameter(name: TypeParameter): void;
addSupertype_dep(qualifiedTypeName: PossiblyQualifiedName): void;
addSupertype(typeInstance: TypeInstance): void;
appendPropertyDerived(name: PublicValueType/* PropertyName */, typeInstance: TypeInstance, description: string, expression: string): PropertyDeclarationDerived;
appendPropertyPrimitive(name: PublicValueType/* PropertyName */, typeInstance: TypeInstance, description: string): PropertyDeclarationPrimitive;
appendMethodPrimitive(name: PublicValueType/* MethodName */, parameters: KtList<ParameterDeclaration>, returnType: TypeInstance, description: string): MethodDeclarationPrimitive;
appendMethodDerived(name: PublicValueType/* MethodName */, parameters: KtList<ParameterDeclaration>, typeInstance: TypeInstance, description: string, body: string): MethodDeclarationDerived;
asStringInContext(context: TypeNamespace): string;
asString(indent?: Indent): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
protected findInOrCloneTo(other: TypeModel, clone: TypeDefinitionSimpleAbstract): void;
addProperty(propertyDeclaration: PropertyDeclaration): void;
addMethod(methodDeclaration: MethodDeclaration): void;
abstract get namespace(): TypeNamespace;
signature(context: Nullable<TypeNamespace>, currentDepth?: number): string;
abstract findInOrCloneTo(other: TypeModel): TypeDefinition;
abstract get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
readonly __doNotUseOrImplementIt: TypeDefinition["__doNotUseOrImplementIt"];
static get Companion(): {
get maxDepth(): number;
};
}
export declare class SpecialTypeSimple extends TypeDefinitionSimpleAbstract implements SpecialType {
constructor(namespace: TypeNamespace, name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */);
get namespace(): TypeNamespace;
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
signature(context: Nullable<TypeNamespace>, currentDepth?: number): string;
findInOrCloneTo(other: TypeModel): SpecialTypeSimple;
asStringInContext(context: TypeNamespace): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
type(typeArguments?: KtList<TypeArgument>, isNullable?: boolean): TypeInstance;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: TypeDefinitionSimpleAbstract["__doNotUseOrImplementIt"] & SpecialType["__doNotUseOrImplementIt"];
}
export declare class SingletonTypeSimple extends TypeDefinitionSimpleAbstract implements SingletonType {
constructor(namespace: TypeNamespace, name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */);
get namespace(): TypeNamespace;
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
signature(context: Nullable<TypeNamespace>, currentDepth?: number): string;
findInOrCloneTo(other: TypeModel): SingletonType;
asStringInContext(context: TypeNamespace): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
type(typeArguments?: KtList<TypeArgument>, isNullable?: boolean): TypeInstance;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: TypeDefinitionSimpleAbstract["__doNotUseOrImplementIt"] & SingletonType["__doNotUseOrImplementIt"];
}
export declare class PrimitiveTypeSimple extends TypeDefinitionSimpleAbstract implements PrimitiveType {
constructor(namespace: TypeNamespace, name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */);
get namespace(): TypeNamespace;
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
signature(context: Nullable<TypeNamespace>, currentDepth?: number): string;
findInOrCloneTo(other: TypeModel): PrimitiveType;
asStringInContext(context: TypeNamespace): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
type(typeArguments?: KtList<TypeArgument>, isNullable?: boolean): TypeInstance;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: TypeDefinitionSimpleAbstract["__doNotUseOrImplementIt"] & PrimitiveType["__doNotUseOrImplementIt"];
}
export declare class EnumTypeSimple extends TypeDefinitionSimpleAbstract implements EnumType {
constructor(namespace: TypeNamespace, name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, literals: KtList<string>);
get namespace(): TypeNamespace;
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get literals(): KtList<string>;
signature(context: Nullable<TypeNamespace>, currentDepth?: number): string;
findInOrCloneTo(other: TypeModel): EnumType;
asStringInContext(context: TypeNamespace): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
type(typeArguments?: KtList<TypeArgument>, isNullable?: boolean): TypeInstance;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: TypeDefinitionSimpleAbstract["__doNotUseOrImplementIt"] & EnumType["__doNotUseOrImplementIt"];
}
export declare class UnionTypeSimple extends TypeDefinitionSimpleAbstract implements UnionType {
constructor(namespace: TypeNamespace, name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */);
get namespace(): TypeNamespace;
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get alternatives(): KtMutableList<TypeInstance>;
addAlternative(value: TypeInstance): void;
signature(context: Nullable<TypeNamespace>, currentDepth?: number): string;
conformsTo(other: TypeDefinition): boolean;
findInOrCloneTo(other: TypeModel): UnionType;
asStringInContext(context: TypeNamespace): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
type(typeArguments?: KtList<TypeArgument>, isNullable?: boolean): TypeInstance;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: TypeDefinitionSimpleAbstract["__doNotUseOrImplementIt"] & UnionType["__doNotUseOrImplementIt"];
}
export declare abstract class StructuredTypeSimpleAbstract extends TypeDefinitionSimpleAbstract implements StructuredType {
constructor();
propertiesWithCharacteristic(chr: PropertyCharacteristic): KtList<PropertyDeclaration>;
appendPropertyStored(name: PublicValueType/* PropertyName */, typeInstance: TypeInstance, characteristics: KtSet<PropertyCharacteristic>, index?: number): PropertyDeclaration;
type(typeArguments?: KtList<TypeArgument>, isNullable?: boolean): TypeInstance;
asString(indent?: Indent): string;
abstract findInOrCloneTo(other: TypeModel): StructuredType;
abstract get namespace(): TypeNamespace;
signature(context: Nullable<TypeNamespace>, currentDepth?: number): string;
abstract get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
readonly __doNotUseOrImplementIt: TypeDefinitionSimpleAbstract["__doNotUseOrImplementIt"] & StructuredType["__doNotUseOrImplementIt"];
}
export declare class TypeArgumentNamedSimple implements TypeArgumentNamed {
constructor(name: PublicValueType/* PropertyName */, type: TypeInstance);
get name(): PublicValueType/* PropertyName */;
get type(): TypeInstance;
conformsTo(other: TypeArgument): boolean;
resolved(resolvingTypeArguments: KtMap<TypeParameter, TypeInstance>): TypeInstance;
signature(context: Nullable<TypeNamespace>, currentDepth: number): string;
findInOrCloneTo(other: TypeModel): TypeArgumentNamed;
toString(): string;
readonly __doNotUseOrImplementIt: TypeArgumentNamed["__doNotUseOrImplementIt"];
}
export declare class TupleTypeSimple extends TypeDefinitionSimpleAbstract implements TupleType {
constructor(namespace: TypeNamespace, name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */);
get namespace(): TypeNamespace;
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get typeParameters(): KtList<typeof TypeParameterMultiple>;
type(typeArguments?: KtList<TypeArgument>, isNullable?: boolean): TupleTypeInstance;
typeTuple(typeArguments: KtList<TypeArgumentNamed>, nullable?: boolean): TupleTypeInstance;
signature(context: Nullable<TypeNamespace>, currentDepth?: number): string;
findInOrCloneTo(other: TypeModel): TupleType;
conformsTo(other: TypeDefinition): boolean;
equalTo(other: TupleType): boolean;
asStringInContext(context: TypeNamespace): string;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: TypeDefinitionSimpleAbstract["__doNotUseOrImplementIt"] & TupleType["__doNotUseOrImplementIt"];
}
export declare class ValueTypeSimple extends StructuredTypeSimpleAbstract implements ValueType {
constructor(namespace: TypeNamespace, name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */);
get namespace(): TypeNamespace;
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get constructors(): KtList<ConstructorDeclaration>;
get valueProperty(): PropertyDeclaration;
addConstructor(parameters: KtList<ParameterDeclaration>): void;
signature(context: Nullable<TypeNamespace>, currentDepth?: number): string;
findInOrCloneTo(other: TypeModel): ValueType;
asStringInContext(context: TypeNamespace): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
appendPropertyStored(name: PublicValueType/* PropertyName */, typeInstance: TypeInstance, characteristics: KtSet<PropertyCharacteristic>, index?: number): PropertyDeclaration;
type(typeArguments?: KtList<TypeArgument>, isNullable?: boolean): TypeInstance;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: StructuredTypeSimpleAbstract["__doNotUseOrImplementIt"] & ValueType["__doNotUseOrImplementIt"];
}
export declare class InterfaceTypeSimple extends StructuredTypeSimpleAbstract implements InterfaceType {
constructor(namespace: TypeNamespace, name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */);
get namespace(): TypeNamespace;
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get subtypes(): KtMutableList<TypeInstance>;
signature(context: Nullable<TypeNamespace>, currentDepth?: number): string;
findInOrCloneTo(other: TypeModel): InterfaceType;
addSubtype(typeInstance: TypeInstance): void;
asStringInContext(context: TypeNamespace): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
appendPropertyStored(name: PublicValueType/* PropertyName */, typeInstance: TypeInstance, characteristics: KtSet<PropertyCharacteristic>, index?: number): PropertyDeclaration;
type(typeArguments?: KtList<TypeArgument>, isNullable?: boolean): TypeInstance;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: StructuredTypeSimpleAbstract["__doNotUseOrImplementIt"] & InterfaceType["__doNotUseOrImplementIt"];
}
export declare class DataTypeSimple extends StructuredTypeSimpleAbstract implements DataType {
constructor(namespace: TypeNamespace, name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */);
get namespace(): TypeNamespace;
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get constructors(): KtList<ConstructorDeclaration>;
get subtypes(): KtMutableList<TypeInstance>;
addConstructor(parameters: KtList<ParameterDeclaration>): void;
signature(context: Nullable<TypeNamespace>, currentDepth?: number): string;
findInOrCloneTo(other: TypeModel): DataType;
/** @deprecated Create a TypeInstance and use addSubtype(TypeInstance) */
addSubtype_dep(qualifiedTypeName: PossiblyQualifiedName): void;
addSubtype(typeInstance: TypeInstance): void;
asStringInContext(context: TypeNamespace): string;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
appendPropertyStored(name: PublicValueType/* PropertyName */, typeInstance: TypeInstance, characteristics: KtSet<PropertyCharacteristic>, index?: number): PropertyDeclaration;
type(typeArguments?: KtList<TypeArgument>, isNullable?: boolean): TypeInstance;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: StructuredTypeSimpleAbstract["__doNotUseOrImplementIt"] & DataType["__doNotUseOrImplementIt"];
}
export declare class CollectionTypeSimple extends StructuredTypeSimpleAbstract implements CollectionType {
constructor(namespace: TypeNamespace, name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */);
get namespace(): TypeNamespace;
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get isStdList(): boolean;
get isStdSet(): boolean;
get isStdMap(): boolean;
signature(context: Nullable<TypeNamespace>, currentDepth?: number): string;
findInOrCloneTo(other: TypeModel): CollectionType;
asStringInContext(context: TypeNamespace): string;
appendPropertyStored(name: PublicValueType/* PropertyName */, typeInstance: TypeInstance, characteristics: KtSet<PropertyCharacteristic>, index?: number): PropertyDeclaration;
type(typeArguments?: KtList<TypeArgument>, isNullable?: boolean): TypeInstance;
asString(indent?: Indent): string;
readonly __doNotUseOrImplementIt: StructuredTypeSimpleAbstract["__doNotUseOrImplementIt"] & CollectionType["__doNotUseOrImplementIt"];
}
export declare class ConstructorDeclarationSimple implements ConstructorDeclaration {
constructor(owner: TypeDefinition, parameters: KtList<ParameterDeclaration>);
get owner(): TypeDefinition;
get parameters(): KtList<ParameterDeclaration>;
findInOrCloneTo(other: TypeModel): ConstructorDeclaration;
readonly __doNotUseOrImplementIt: ConstructorDeclaration["__doNotUseOrImplementIt"];
}
export declare abstract class PropertyDeclarationAbstract implements PropertyDeclaration {
constructor();
get metaInfo(): KtMutableMap<string, string>;
set metaInfo(value: KtMutableMap<string, string>);
get isConstructor(): boolean;
get isIdentity(): boolean;
get isComposite(): boolean;
get isReference(): boolean;
get isReadOnly(): boolean;
get isReadWrite(): boolean;
get isDerived(): boolean;
get isStored(): boolean;
get isPrimitive(): boolean;
resolved(typeArguments: KtMap<TypeParameter, TypeInstance>): PropertyDeclarationResolved;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
abstract get owner(): TypeDefinition;
abstract get name(): PublicValueType/* PropertyName */;
abstract get typeInstance(): TypeInstance;
abstract get characteristics(): KtSet<PropertyCharacteristic>;
abstract get description(): string;
abstract get index(): number;
abstract findInOrCloneTo(other: TypeModel): PropertyDeclaration;
readonly __doNotUseOrImplementIt: PropertyDeclaration["__doNotUseOrImplementIt"];
}
export declare class PropertyDeclarationStored extends PropertyDeclarationAbstract {
constructor(owner: StructuredType, name: PublicValueType/* PropertyName */, typeInstance: TypeInstance, characteristics: KtSet<PropertyCharacteristic>, index: number);
get owner(): StructuredType;
get name(): PublicValueType/* PropertyName */;
get typeInstance(): TypeInstance;
get characteristics(): KtSet<PropertyCharacteristic>;
get index(): number;
get description(): string;
findInOrCloneTo(other: TypeModel): PropertyDeclaration;
}
export declare class PropertyDeclarationPrimitive extends PropertyDeclarationAbstract {
constructor(owner: TypeDefinition, name: PublicValueType/* PropertyName */, typeInstance: TypeInstance, description: string, index: number);
get owner(): TypeDefinition;
get name(): PublicValueType/* PropertyName */;
get typeInstance(): TypeInstance;
get description(): string;
get index(): number;
get characteristics(): KtSet<PropertyCharacteristic>;
findInOrCloneTo(other: TypeModel): PropertyDeclaration;
}
export declare class PropertyDeclarationDerived extends PropertyDeclarationAbstract {
constructor(owner: TypeDefinition, name: PublicValueType/* PropertyName */, typeInstance: TypeInstance, description: string, expression: string, index: number);
get owner(): TypeDefinition;
get name(): PublicValueType/* PropertyName */;
get typeInstance(): TypeInstance;
get description(): string;
get expression(): string;
get index(): number;
get characteristics(): KtSet<PropertyCharacteristic>;
findInOrCloneTo(other: TypeModel): PropertyDeclaration;
}
export declare class PropertyDeclarationResolvedSimple extends PropertyDeclarationAbstract implements PropertyDeclarationResolved {
constructor(original: PropertyDeclaration, owner: TypeDefinition, name: PublicValueType/* PropertyName */, typeInstance: TypeInstance, characteristics: KtSet<PropertyCharacteristic>, description: string);
get original(): PropertyDeclaration;
get owner(): TypeDefinition;
get name(): PublicValueType/* PropertyName */;
get typeInstance(): TypeInstance;
get characteristics(): KtSet<PropertyCharacteristic>;
get description(): string;
get index(): number;
findInOrCloneTo(other: TypeModel): PropertyDeclaration;
readonly __doNotUseOrImplementIt: PropertyDeclarationAbstract["__doNotUseOrImplementIt"] & PropertyDeclarationResolved["__doNotUseOrImplementIt"];
}
export declare abstract class MethodDeclarationAbstract implements MethodDeclaration {
constructor();
resolved(typeArguments: KtMap<TypeParameter, TypeInstance>): MethodDeclarationResolved;
abstract get owner(): TypeDefinition;
abstract get name(): PublicValueType/* MethodName */;
abstract get parameters(): KtList<ParameterDeclaration>;
abstract get returnType(): TypeInstance;
abstract get description(): string;
abstract findInOrCloneTo(other: TypeModel): MethodDeclaration;
readonly __doNotUseOrImplementIt: MethodDeclaration["__doNotUseOrImplementIt"];
}
export declare class MethodDeclarationDerivedSimple extends MethodDeclarationAbstract implements MethodDeclarationDerived {
constructor(owner: TypeDefinition, name: PublicValueType/* MethodName */, parameters: KtList<ParameterDeclaration>, returnType: TypeInstance, description: string, body: string);
get owner(): TypeDefinition;
get name(): PublicValueType/* MethodName */;
get parameters(): KtList<ParameterDeclaration>;
get returnType(): TypeInstance;
get description(): string;
get body(): string;
findInOrCloneTo(other: TypeModel): MethodDeclarationDerived;
readonly __doNotUseOrImplementIt: MethodDeclarationAbstract["__doNotUseOrImplementIt"] & MethodDeclarationDerived["__doNotUseOrImplementIt"];
}
export declare class MethodDeclarationResolvedSimple extends MethodDeclarationAbstract implements MethodDeclarationResolved {
constructor(original: MethodDeclaration, owner: TypeDefinition, name: PublicValueType/* MethodName */, parameters: KtList<ParameterDeclaration>, returnType: TypeInstance, description: string);
get original(): MethodDeclaration;
get owner(): TypeDefinition;
get name(): PublicValueType/* MethodName */;
get parameters(): KtList<ParameterDeclaration>;
get returnType(): TypeInstance;
get description(): string;
findInOrCloneTo(other: TypeModel): MethodDeclaration;
readonly __doNotUseOrImplementIt: MethodDeclarationAbstract["__doNotUseOrImplementIt"] & MethodDeclarationResolved["__doNotUseOrImplementIt"];
}
export declare class ParameterDefinitionSimple implements ParameterDeclaration {
constructor(name: PublicValueType/* ParameterName */, typeInstance: TypeInstance, defaultValue: Nullable<string>);
get name(): PublicValueType/* ParameterName */;
get typeInstance(): TypeInstance;
get defaultValue(): Nullable<string>;
findInOrCloneTo(other: TypeModel): ParameterDeclaration;
hashCode(): number;
equals(other: Nullable<any>): boolean;
toString(): string;
readonly __doNotUseOrImplementIt: ParameterDeclaration["__doNotUseOrImplementIt"];
}
export declare const AglTypes: {
getInstance(): {
get NAMESPACE_NAME(): string;
get NAME(): string;
get goalRuleName(): string;
get identity(): PublicValueType/* LanguageIdentity */;
get grammarString(): string;
get kompositeString(): string;
get styleString(): string;
get grammarModel(): GrammarModel;
get typesModel(): TypeModel;
get asmTransformModel(): TransformModel;
get crossReferenceModel(): CrossReferenceModel;
get styleModel(): AglStyleModel;
get formatModel(): AglFormatModel;
get defaultTargetGrammar(): Grammar;
get defaultTargetGoalRule(): string;
get syntaxAnalyser(): SyntaxAnalyser<TypeModel>;
get semanticAnalyser(): Nullable<SemanticAnalyser<TypeModel, ContextWithScope<any, any>>>;
get completionProvider(): Nullable<CompletionProvider<TypeModel, ContextWithScope<any, any>>>;
} & LanguageObjectAbstract<TypeModel, ContextWithScope<any, any>>;
};
export declare interface TypeModel extends Model<TypeNamespace, TypeDefinition> {
readonly AnyType: TypeDefinition;
readonly NothingType: TypeDefinition;
resolveImports(): void;
findOrCreateNamespace(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, imports: KtList<PublicValueType/* Import */>): TypeNamespace;
findByQualifiedNameOrNull(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */): Nullable<TypeDefinition>;
addAllNamespaceAndResolveImports(namespaces: any/* Iterable<TypeNamespace> */): void;
findNamespaceOrNull(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */): Nullable<TypeNamespace>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.TypeModel": unique symbol;
} & Model<TypeNamespace, TypeDefinition>["__doNotUseOrImplementIt"];
}
export declare interface TypeNamespace extends Namespace<TypeDefinition> {
readonly ownedTypesByName: KtMap<(PossiblyQualifiedName & PublicValueType)/* SimpleName */, TypeDefinition>;
readonly ownedTypes: any/* Collection<TypeDefinition> */;
readonly singletonType: KtSet<SingletonType>;
readonly primitiveType: KtSet<PrimitiveType>;
readonly valueType: KtSet<ValueType>;
readonly enumType: KtSet<EnumType>;
readonly collectionType: KtSet<CollectionType>;
readonly interfaceType: KtSet<InterfaceType>;
readonly dataType: KtSet<DataType>;
isImported(qualifiedNamespaceName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */): boolean;
findOwnedTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<TypeDefinition>;
findTypeNamed(qualifiedOrImportedTypeName: PossiblyQualifiedName): Nullable<TypeDefinition>;
findOwnedUnnamedSupertypeTypeOrNull(subtypes: KtList<TypeInstance>): Nullable<UnionType>;
/** @deprecated No longer needed */
findTupleTypeWithIdOrNull(id: number): Nullable<TupleType>;
findOwnedSingletonTypeNamedOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<SingletonType>;
findOwnedPrimitiveTypeNamedOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<PrimitiveType>;
findOwnedEnumTypeNamedOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<EnumType>;
findOwnedValueTypeNamedOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<ValueType>;
findOwnedInterfaceTypeNamedOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<InterfaceType>;
findOwnedDataTypeNamedOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<DataType>;
findOwnedCollectionTypeNamedOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<CollectionType>;
findOwnedUnionTypeNamedOrNull(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): Nullable<UnionType>;
createOwnedDataTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): DataType;
findOwnedOrCreateSingletonTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): SingletonType;
findOwnedOrCreatePrimitiveTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): PrimitiveType;
findOwnedOrCreateEnumTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, literals: KtList<string>): EnumType;
findOwnedOrCreateValueTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): ValueType;
findOwnedOrCreateInterfaceTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): InterfaceType;
findOwnedOrCreateDataTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): DataType;
findOwnedOrCreateCollectionTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */): CollectionType;
findOwnedOrCreateUnionTypeNamed(typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, ifCreate: (p0: UnionType) => void): UnionType;
createTypeInstance(contextQualifiedTypeName: Nullable<PossiblyQualifiedName & PublicValueType>/* Nullable<QualifiedName> */, qualifiedOrImportedTypeName: PossiblyQualifiedName, typeArguments?: KtList<TypeArgument>, isNullable?: boolean): TypeInstance;
createTupleTypeInstance(typeArguments: KtList<TypeArgumentNamed>, nullable: boolean): TupleTypeInstance;
createTupleType(): TupleType;
findInOrCloneTo(other: TypeModel): TypeNamespace;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.TypeNamespace": unique symbol;
} & Namespace<TypeDefinition>["__doNotUseOrImplementIt"];
}
export declare interface TypeParameter {
readonly name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
clone(): TypeParameter;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.TypeParameter": unique symbol;
};
}
export declare interface TypeArgument {
readonly type: TypeInstance;
conformsTo(other: TypeArgument): boolean;
signature(context: Nullable<TypeNamespace>, currentDepth: number): string;
resolved(resolvingTypeArguments: KtMap<TypeParameter, TypeInstance>): TypeInstance;
findInOrCloneTo(other: TypeModel): TypeArgument;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.TypeArgument": unique symbol;
};
}
export declare interface TypeInstance {
readonly namespace: TypeNamespace;
readonly typeArguments: KtList<TypeArgument>;
readonly isNullable: boolean;
readonly typeName: (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
readonly qualifiedTypeName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
readonly resolvedDeclaration: TypeDefinition;
readonly resolvedDeclarationOrNull: Nullable<TypeDefinition>;
readonly allResolvedProperty: KtMap<PublicValueType/* PropertyName */, PropertyDeclarationResolved>;
readonly allResolvedMethod: KtMap<PublicValueType/* MethodName */, MethodDeclarationResolved>;
readonly asTypeArgument: TypeArgument;
resolved(resolvingTypeArguments: KtMap<TypeParameter, TypeInstance>): TypeInstance;
notNullable(): TypeInstance;
nullable(): TypeInstance;
signature(context: Nullable<TypeNamespace>, currentDepth: number): string;
conformsTo(other: TypeInstance): boolean;
commonSuperType(other: TypeInstance): TypeInstance;
possiblyQualifiedNameInContext(context: TypeNamespace): any;
findInOrCloneTo(other: TypeModel): TypeInstance;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.TypeInstance": unique symbol;
};
}
export declare interface TypeArgumentNamed extends TypeArgument {
readonly name: PublicValueType/* PropertyName */;
findInOrCloneTo(other: TypeModel): TypeArgumentNamed;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.TypeArgumentNamed": unique symbol;
} & TypeArgument["__doNotUseOrImplementIt"];
}
export declare interface TupleTypeInstance extends TypeInstance {
readonly typeArguments: KtList<TypeArgumentNamed>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.TupleTypeInstance": unique symbol;
} & TypeInstance["__doNotUseOrImplementIt"];
}
export declare interface TypeDefinition extends Definition<TypeDefinition> {
readonly namespace: TypeNamespace;
readonly supertypes: KtList<TypeInstance>;
readonly subtypes: KtList<TypeInstance>;
readonly typeParameters: KtList<TypeParameter>;
readonly property: KtList<PropertyDeclaration>;
readonly method: KtList<MethodDeclaration>;
readonly allSuperTypes: KtList<TypeInstance>;
readonly allProperty: KtMap<PublicValueType/* PropertyName */, PropertyDeclaration>;
readonly allMethod: KtMap<PublicValueType/* MethodName */, MethodDeclaration>;
readonly metaInfo: KtMap<string, string>;
signature(context: Nullable<TypeNamespace>, currentDepth?: number): string;
type(typeArguments?: KtList<TypeArgument>, isNullable?: boolean): TypeInstance;
conformsTo(other: TypeDefinition): boolean;
getOwnedPropertyByIndexOrNull(i: number): Nullable<PropertyDeclaration>;
findOwnedPropertyOrNull(name: PublicValueType/* PropertyName */): Nullable<PropertyDeclaration>;
findAllPropertyOrNull(name: PublicValueType/* PropertyName */): Nullable<PropertyDeclaration>;
findOwnedMethodOrNull(name: PublicValueType/* MethodName */): Nullable<MethodDeclaration>;
findAllMethodOrNull(name: PublicValueType/* MethodName */): Nullable<MethodDeclaration>;
asStringInContext(context: TypeNamespace): string;
addTypeParameter(name: TypeParameter): void;
/** @deprecated Create a TypeInstance and use addSupertype(TypeInstance). This (deprecated) method does not add TypeArgs to the supertype. */
addSupertype_dep(qualifiedTypeName: PossiblyQualifiedName): void;
addSupertype(typeInstance: TypeInstance): void;
appendPropertyPrimitive(name: PublicValueType/* PropertyName */, typeInstance: TypeInstance, description: string): PropertyDeclaration;
appendPropertyDerived(name: PublicValueType/* PropertyName */, typeInstance: TypeInstance, description: string, expression: string): PropertyDeclaration;
appendMethodPrimitive(name: PublicValueType/* MethodName */, parameters: KtList<ParameterDeclaration>, returnType: TypeInstance, description: string): MethodDeclarationPrimitive;
appendMethodDerived(name: PublicValueType/* MethodName */, parameters: KtList<ParameterDeclaration>, typeInstance: TypeInstance, description: string, body: string): MethodDeclarationDerived;
findInOrCloneTo(other: TypeModel): TypeDefinition;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.TypeDefinition": unique symbol;
} & Definition<TypeDefinition>["__doNotUseOrImplementIt"];
}
export declare interface SpecialType extends TypeDefinition {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.SpecialType": unique symbol;
} & TypeDefinition["__doNotUseOrImplementIt"];
}
export declare interface SingletonType extends TypeDefinition {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.SingletonType": unique symbol;
} & TypeDefinition["__doNotUseOrImplementIt"];
}
export declare interface PrimitiveType extends TypeDefinition {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.PrimitiveType": unique symbol;
} & TypeDefinition["__doNotUseOrImplementIt"];
}
export declare interface EnumType extends TypeDefinition {
readonly literals: KtList<string>;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.EnumType": unique symbol;
} & TypeDefinition["__doNotUseOrImplementIt"];
}
export declare interface StructuredType extends TypeDefinition {
propertiesWithCharacteristic(chr: PropertyCharacteristic): KtList<PropertyDeclaration>;
appendPropertyStored(name: PublicValueType/* PropertyName */, typeInstance: TypeInstance, characteristics: KtSet<PropertyCharacteristic>, index?: number): PropertyDeclaration;
findInOrCloneTo(other: TypeModel): StructuredType;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.StructuredType": unique symbol;
} & TypeDefinition["__doNotUseOrImplementIt"];
}
export declare interface TupleType extends TypeDefinition {
typeTuple(typeArguments: KtList<TypeArgumentNamed>, nullable?: boolean): TupleTypeInstance;
equalTo(other: TupleType): boolean;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.TupleType": unique symbol;
} & TypeDefinition["__doNotUseOrImplementIt"];
}
export declare interface ValueType extends StructuredType {
readonly constructors: KtList<ConstructorDeclaration>;
readonly valueProperty: PropertyDeclaration;
addConstructor(parameters: KtList<ParameterDeclaration>): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.ValueType": unique symbol;
} & StructuredType["__doNotUseOrImplementIt"];
}
export declare interface InterfaceType extends StructuredType {
readonly subtypes: KtList<TypeInstance>;
addSubtype(typeInstance: TypeInstance): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.InterfaceType": unique symbol;
} & StructuredType["__doNotUseOrImplementIt"];
}
export declare interface DataType extends StructuredType {
readonly subtypes: KtList<TypeInstance>;
readonly constructors: KtList<ConstructorDeclaration>;
/** @deprecated Create a TypeInstance and use addSubtype(TypeInstance) */
addSubtype_dep(qualifiedTypeName: PossiblyQualifiedName): void;
addSubtype(typeInstance: TypeInstance): void;
addConstructor(parameters: KtList<ParameterDeclaration>): void;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.DataType": unique symbol;
} & StructuredType["__doNotUseOrImplementIt"];
}
export declare interface UnionType extends TypeDefinition {
readonly alternatives: KtList<TypeInstance>;
addAlternative(value: TypeInstance): void;
findInOrCloneTo(other: TypeModel): UnionType;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.UnionType": unique symbol;
} & TypeDefinition["__doNotUseOrImplementIt"];
}
export declare interface CollectionType extends StructuredType {
readonly isStdList: boolean;
readonly isStdSet: boolean;
readonly isStdMap: boolean;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.CollectionType": unique symbol;
} & StructuredType["__doNotUseOrImplementIt"];
}
export declare interface PropertyDeclaration {
readonly owner: TypeDefinition;
readonly name: PublicValueType/* PropertyName */;
readonly typeInstance: TypeInstance;
readonly characteristics: KtSet<PropertyCharacteristic>;
readonly description: string;
readonly index: number;
readonly metaInfo: KtMap<string, string>;
readonly isReference: boolean;
readonly isComposite: boolean;
readonly isConstructor: boolean;
readonly isIdentity: boolean;
readonly isReadOnly: boolean;
readonly isReadWrite: boolean;
readonly isStored: boolean;
readonly isDerived: boolean;
readonly isPrimitive: boolean;
resolved(typeArguments: KtMap<TypeParameter, TypeInstance>): PropertyDeclarationResolved;
findInOrCloneTo(other: TypeModel): PropertyDeclaration;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.PropertyDeclaration": unique symbol;
};
}
export declare interface PropertyDeclarationResolved extends PropertyDeclaration {
readonly original: PropertyDeclaration;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.PropertyDeclarationResolved": unique symbol;
} & PropertyDeclaration["__doNotUseOrImplementIt"];
}
export declare abstract class PropertyCharacteristic {
private constructor();
static get REFERENCE(): PropertyCharacteristic & {
get name(): "REFERENCE";
get ordinal(): 0;
};
static get COMPOSITE(): PropertyCharacteristic & {
get name(): "COMPOSITE";
get ordinal(): 1;
};
static get READ_ONLY(): PropertyCharacteristic & {
get name(): "READ_ONLY";
get ordinal(): 2;
};
static get READ_WRITE(): PropertyCharacteristic & {
get name(): "READ_WRITE";
get ordinal(): 3;
};
static get STORED(): PropertyCharacteristic & {
get name(): "STORED";
get ordinal(): 4;
};
static get DERIVED(): PropertyCharacteristic & {
get name(): "DERIVED";
get ordinal(): 5;
};
static get PRIMITIVE(): PropertyCharacteristic & {
get name(): "PRIMITIVE";
get ordinal(): 6;
};
static get CONSTRUCTOR(): PropertyCharacteristic & {
get name(): "CONSTRUCTOR";
get ordinal(): 7;
};
static get IDENTITY(): PropertyCharacteristic & {
get name(): "IDENTITY";
get ordinal(): 8;
};
get name(): "REFERENCE" | "COMPOSITE" | "READ_ONLY" | "READ_WRITE" | "STORED" | "DERIVED" | "PRIMITIVE" | "CONSTRUCTOR" | "IDENTITY";
get ordinal(): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
asString(indent?: Indent): string;
static values(): Array<PropertyCharacteristic>;
static valueOf(value: string): PropertyCharacteristic;
}
export declare interface MethodDeclaration {
readonly owner: TypeDefinition;
readonly name: PublicValueType/* MethodName */;
readonly parameters: KtList<ParameterDeclaration>;
readonly returnType: TypeInstance;
readonly description: string;
resolved(typeArguments: KtMap<TypeParameter, TypeInstance>): MethodDeclarationResolved;
findInOrCloneTo(other: TypeModel): MethodDeclaration;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.MethodDeclaration": unique symbol;
};
}
export declare interface MethodDeclarationPrimitive extends MethodDeclaration {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.MethodDeclarationPrimitive": unique symbol;
} & MethodDeclaration["__doNotUseOrImplementIt"];
}
export declare interface MethodDeclarationDerived extends MethodDeclaration {
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.MethodDeclarationDerived": unique symbol;
} & MethodDeclaration["__doNotUseOrImplementIt"];
}
export declare interface MethodDeclarationResolved extends MethodDeclaration {
readonly original: MethodDeclaration;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.MethodDeclarationResolved": unique symbol;
} & MethodDeclaration["__doNotUseOrImplementIt"];
}
export declare interface ConstructorDeclaration {
readonly owner: TypeDefinition;
readonly parameters: KtList<ParameterDeclaration>;
findInOrCloneTo(other: TypeModel): ConstructorDeclaration;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.ConstructorDeclaration": unique symbol;
};
}
export declare interface ParameterDeclaration {
readonly name: PublicValueType/* ParameterName */;
readonly typeInstance: TypeInstance;
readonly defaultValue: Nullable<string>;
findInOrCloneTo(other: TypeModel): ParameterDeclaration;
readonly __doNotUseOrImplementIt: {
readonly "net.akehurst.language.typemodel.api.ParameterDeclaration": unique symbol;
};
}
export declare function typeModel(name: string, resolveImports: boolean, namespaces: KtList<TypeNamespace> | undefined, init: (p0: TypeModelBuilder) => void): TypeModel;
export declare class TypeModelBuilder {
constructor(name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */, resolveImports: boolean, namespaces: KtList<TypeNamespace>);
get name(): (PossiblyQualifiedName & PublicValueType)/* SimpleName */;
get namespaces(): KtList<TypeNamespace>;
get _model(): TypeModelSimple;
namespace(qualifiedName: string, imports: KtList<string> | undefined, init: (p0: TypeNamespaceBuilder) => void): TypeNamespace;
build(): TypeModel;
}
export declare class TypeNamespaceBuilder {
constructor(qualifiedName: (PossiblyQualifiedName & PublicValueType)/* QualifiedName */, imports: KtList<PublicValueType/* Import */>);
get qualifiedName(): (PossiblyQualifiedName & PublicValueType)/* QualifiedName */;
protected get _namespace(): TypeNamespace;
imports(imports: Array<string>): void;
singleton(typeName: string): SingletonType;
primitive(typeName: string): PrimitiveType;
value(typeName: string, init?: (p0: ValueTypeBuilder) => void): void;
interface_(typeName: string, init?: (p0: InterfaceTypeBuilder) => void): InterfaceType;
enum(typeName: string, literals: KtList<string>): EnumType;
collection(typeName: string, typeParams: KtList<string>): CollectionType;
data(typeName: string, init?: (p0: DataTypeBuilder) => void): DataType;
union(typeName: string, init: (p0: SubtypeListBuilder) => void): UnionType;
build(): TypeNamespace;
}
export declare abstract class StructuredTypeBuilder {
constructor(_namespace: TypeNamespace, _typeReferences: KtMutableList<TypeInstanceArgBuilder>);
protected get _namespace(): TypeNamespace;
protected get _typeReferences(): KtMutableList<TypeInstanceArgBuilder>;
protected abstract get _structuredType(): StructuredType;
get CON(): PropertyCharacteristic;
get IDY(): PropertyCharacteristic;
get CMP(): PropertyCharacteristic;
get REF(): PropertyCharacteristic;
get VAL(): PropertyCharacteristic;
get VAR(): PropertyCharacteristic;
get STR(): PropertyCharacteristic;
get DER(): PropertyCharacteristic;
propertyOf(characteristics: KtSet<PropertyCharacteristic>, propertyName: string, typeName: string, isNullable?: boolean, init?: (p0: TypeArgumentBuilder) => void): PropertyDeclaration;
propertyPrimitiveType(propertyName: string, typeName: string, isNullable: boolean, childIndex: number): PropertyDeclaration;
propertyListTypeOf(propertyName: string, dataTypeName: string, nullable: boolean, childIndex: number): PropertyDeclaration;
propertyListType(propertyName: string, isNullable: boolean, childIndex: number, init: (p0: TypeInstanceArgBuilder) => void): PropertyDeclaration;
propertyListSeparatedTypeOf(propertyName: string, itemTypeName: string, separatorTypeName: string, isNullable: boolean, childIndex: number): PropertyDeclaration;
propertyListSeparatedType(propertyName: string, isNullable: boolean, childIndex: number, init: (p0: TypeInstanceArgBuilder) => void): PropertyDeclaration;
propertyListOfTupleType(propertyName: string, isNullable: boolean, childIndex: number, init?: (p0: TypeInstanceArgNamedBuilder) => void): PropertyDeclaration;
propertyTupleType(propertyName: string, isNullable: boolean, childIndex: number, init: (p0: TypeInstanceArgNamedBuilder) => void): PropertyDeclaration;
propertyDataTypeOf(propertyName: string, typeName: string, isNullable: boolean, childIndex: number): PropertyDeclaration;
propertyUnionTypeOf(propertyName: string, typeName: string, isNullable: boolean, childIndex: number): PropertyDeclaration;
property(propertyName: string, typeUse: TypeInstance, childIndex: number): PropertyDeclaration;
}
export declare class ValueTypeBuilder extends StructuredTypeBuilder {
constructor(_namespace: TypeNamespace, _typeReferences: KtMutableList<TypeInstanceArgBuilder>, _name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */);
protected get _structuredType(): StructuredType;
supertype(typeDeclarationName: string, init?: (p0: TypeInstanceArgBuilder) => void): void;
constructor_(init: (p0: ConstructorBuilder) => void): void;
build(): ValueType;
}
export declare class InterfaceTypeBuilder extends StructuredTypeBuilder {
constructor(_namespace: TypeNamespace, _typeReferences: KtMutableList<TypeInstanceArgBuilder>, _name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */);
protected get _structuredType(): StructuredType;
typeParameters(parameters: Array<string>): void;
supertype(typeDeclarationName: string, init?: (p0: TypeInstanceArgBuilder) => void): void;
subtypes(elementTypeName: Array<string>): void;
build(): InterfaceType;
}
export declare class DataTypeBuilder extends StructuredTypeBuilder {
constructor(_namespace: TypeNamespace, _typeReferences: KtMutableList<TypeInstanceArgBuilder>, _name: (PossiblyQualifiedName & PublicValueType)/* SimpleName */);
protected get _structuredType(): StructuredType;
typeParameters(parameters: Array<string>): void;
supertypes(superTypes: Array<string>): void;
supertype(typeDeclarationName: string, init?: (p0: TypeInstanceArgBuilder) => void): void;
subtypes(elementTypeName: Array<string>): void;
constructor_(init: (p0: ConstructorBuilder) => void): void;
build(): DataType;
}
export declare class ConstructorBuilder {
constructor(_namespace: TypeNamespace, _type: TypeDefinition, _typeReferences: KtMutableList<TypeInstanceArgBuilder>);
get _namespace(): TypeNamespace;
get CMP(): PropertyCharacteristic;
get REF(): PropertyCharacteristic;
get VAL(): PropertyCharacteristic;
get VAR(): PropertyCharacteristic;
get DER(): PropertyCharacteristic;
get STR(): PropertyCharacteristic;
parameter(name: string, typeName: string, nullable?: boolean): void;
build(): KtList<ParameterDeclaration>;
}
export declare class TypeInstanceArgBuilder {
constructor(context: Nullable<TypeDefinition>, _namespace: TypeNamespace, possiblyQualifiedName: PossiblyQualifiedName, nullable: boolean, _typeReferences: KtMutableList<TypeInstanceArgBuilder>);
get context(): Nullable<TypeDefinition>;
get _namespace(): TypeNamespace;
get possiblyQualifiedName(): PossiblyQualifiedName;
get nullable(): boolean;
protected get _typeReferences(): KtMutableList<TypeInstanceArgBuilder>;
ref(possiblyQualifiedTypeDeclarationName: string): void;
build(): TypeInstance;
}
export declare class TypeInstanceArgNamedBuilder {
constructor(context: Nullable<TypeDefinition>, _namespace: TypeNamespace, type: TypeDefinition, instanceIsNullable: boolean, _typeReferences: KtMutableList<TypeInstanceArgBuilder>);
get context(): Nullable<TypeDefinition>;
get _namespace(): TypeNamespace;
get type(): TypeDefinition;
get instanceIsNullable(): boolean;
protected get _typeReferences(): KtMutableList<TypeInstanceArgBuilder>;
typeRef(name: string, typeName: string, isNullable: boolean): void;
tupleType(name: string, isNullable: boolean, init: (p0: TypeInstanceArgNamedBuilder) => void): void;
build(): TypeInstance;
}
export declare class TypeArgumentBuilder {
constructor(_context: Nullable<TypeDefinition>, _namespace: TypeNamespace);
typeArgument(possiblyQualifiedTypeDeclarationName: string, nullable?: boolean, typeArguments?: (p0: TypeArgumentBuilder) => void): void;
build(): KtList<TypeArgument>;
}
export declare class SubtypeListBuilder {
constructor(_namespace: TypeNamespace, _typeReferences: KtMutableList<TypeInstanceArgBuilder>);
get _namespace(): TypeNamespace;
get _subtypeList(): KtMutableList<TypeInstance>;
typeRef(typeName: string, isNullable?: boolean): void;
listType(isNullable: boolean | undefined, init: (p0: TypeInstanceArgBuilder) => void): void;
listSeparatedType(isNullable: boolean | undefined, init: (p0: TypeInstanceArgBuilder) => void): void;
tupleType(isNullable: boolean | undefined, init: (p0: TypeInstanceArgNamedBuilder) => void): void;
build(): KtList<TypeInstance>;
}