bitmark-grammar
Version:
37 lines (30 loc) • 1.08 kB
text/typescript
/*!
* Copyright 2016 The ANTLR Project. All rights reserved.
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
*/
// ConvertTo-TS run at 2016-10-04T11:26:30.8483617-07:00
import { ATNState } from "./ATNState";
import { IntervalSet } from "../misc/IntervalSet";
import { Override, NotNull, Nullable } from "../Decorators";
import { SetTransition } from "./SetTransition";
import { Transition } from "./Transition";
import { TransitionType } from "./TransitionType";
export class NotSetTransition extends SetTransition {
constructor( target: ATNState, set: IntervalSet) {
super(target, set);
}
get serializationType(): TransitionType {
return TransitionType.NOT_SET;
}
public matches(symbol: number, minVocabSymbol: number, maxVocabSymbol: number): boolean {
return symbol >= minVocabSymbol
&& symbol <= maxVocabSymbol
&& !super.matches(symbol, minVocabSymbol, maxVocabSymbol);
}
public toString(): string {
return "~" + super.toString();
}
}