// Expected token / not token
 public MismatchedCharException(char c, char expecting_, bool matchNot, CharScanner scanner_) :
     base("Mismatched char", scanner_.getFilename(), scanner_.getLine(), scanner_.getColumn())
 {
     mismatchType = matchNot ? CharTypeEnum.NotCharType : CharTypeEnum.CharType;
     foundChar    = c;
     expecting    = expecting_;
     scanner      = scanner_;
 }
 // Expected BitSet / not BitSet
 public MismatchedCharException(char c, BitSet set_, bool matchNot, CharScanner scanner_) :
     base("Mismatched char", scanner_.getFilename(), scanner_.getLine(), scanner_.getColumn())
 {
     mismatchType = matchNot ? CharTypeEnum.NotSetType : CharTypeEnum.SetType;
     foundChar    = c;
     bset         = set_;
     scanner      = scanner_;
 }
 // Expected range / not range
 public MismatchedCharException(char c, char lower, char upper_, bool matchNot, CharScanner scanner_) :
     base("Mismatched char", scanner_.getFilename(), scanner_.getLine(), scanner_.getColumn())
 {
     mismatchType = matchNot ? CharTypeEnum.NotRangeType : CharTypeEnum.RangeType;
     foundChar    = c;
     expecting    = lower;
     upper        = upper_;
     scanner      = scanner_;
 }
Пример #4
0
 public NoViableAltForCharException(char c, CharScanner scanner) :
     base("NoViableAlt", scanner.getFilename(), scanner.getLine(), scanner.getColumn())
 {
     foundChar = c;
 }
Пример #5
0
 public ReflectionBasedTokenCreator(CharScanner owner, string tokenTypeName)
 {
     this.owner = owner;
     SetTokenType(tokenTypeName);
 }