// Expected token / not token public MismatchedTokenException(string[] tokenNames_, Token token_, int expecting_, bool matchNot, string fileName_) : base("Mismatched Token", fileName_, token_.getLine(), token_.getColumn()) { tokenNames = tokenNames_; token = token_; tokenText = token_.getText(); mismatchType = matchNot ? TokenTypeEnum.NotTokenType : TokenTypeEnum.TokenType; expecting = expecting_; }
// Expected BitSet / not BitSet public MismatchedTokenException(string[] tokenNames_, Token token_, BitSet set_, bool matchNot, string fileName_) : base("Mismatched Token", fileName_, token_.getLine(), token_.getColumn()) { tokenNames = tokenNames_; token = token_; tokenText = token_.getText(); mismatchType = matchNot ? TokenTypeEnum.NotSetType : TokenTypeEnum.SetType; bset = set_; }
// Expected range / not range public MismatchedTokenException(string[] tokenNames_, Token token_, int lower, int upper_, bool matchNot, string fileName_) : base("Mismatched Token", fileName_, token_.getLine(), token_.getColumn()) { tokenNames = tokenNames_; token = token_; tokenText = token_.getText(); mismatchType = matchNot ? TokenTypeEnum.NotRangeType : TokenTypeEnum.RangeType; expecting = lower; upper = upper_; }
public NoViableAltException(Token t, string fileName_) : base("NoViableAlt", fileName_, t.getLine(), t.getColumn()) { token = t; }