示例#1
0
 // 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_;
 }
示例#2
0
 // 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_;
 }
示例#3
0
 // 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;
 }
 public NoViableAltException(Token t, string fileName_)
     : base("NoViableAlt", fileName_, t.getLine(), t.getColumn())
 {
     token = t;
 }
 // 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 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 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_;
 }