- Timestamp:
- Sep 26, 2017, 10:51:47 AM (17 months ago)
- Location:
- icGREP/icgrep-devel/icgrep/re
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
icGREP/icgrep-devel/icgrep/re/re_alt.h
r5267 r5649 62 62 RE * makeAlt(iterator begin, iterator end) { 63 63 if (LLVM_UNLIKELY(std::distance(begin, end) == 0)) { 64 throw std::runtime_error("Alt objects cannot be empty!");64 return makeAlt(); 65 65 } else if (std::distance(begin, end) == 1) { 66 66 return *begin; -
icGREP/icgrep-devel/icgrep/re/re_analysis.cpp
r5604 r5649 11 11 #include <re/re_intersect.h> 12 12 #include <re/re_assertion.h> 13 #include < iostream>13 #include <re/re_nullable.h> 14 14 #include <re/printer_re.h> 15 15 #include <limits.h> 16 #include <llvm/Support/ErrorHandling.h> 16 17 17 18 using namespace llvm; … … 193 194 return 0; // otherwise 194 195 } 195 196 196 197 //If a regular expression contains unit and not byteLength bounded repetition type, we select a different pipeline to utilize the log2 technique. 197 198 bool unitBoundedRep(const RE * re) { … … 261 262 } 262 263 263 } 264 void UndefinedNameError(const Name * n) { 265 report_fatal_error("Error: Undefined name in regular expression: \"" + n->getName() + "\"."); 266 } 267 } -
icGREP/icgrep-devel/icgrep/re/re_analysis.h
r5604 r5649 3 3 4 4 #include <utility> 5 namespace re { class RE; }5 namespace re { class RE; class Name;} 6 6 7 7 namespace re { … … 18 18 19 19 bool isTypeForLocal(const RE * re); 20 21 void UndefinedNameError (const Name * n); 20 22 21 23 } -
icGREP/icgrep-devel/icgrep/re/re_cc.h
r5278 r5649 53 53 54 54 inline CC() 55 : RE(ClassTypeId::CC) {55 : RE(ClassTypeId::CC), UnicodeSet() { 56 56 57 57 } -
icGREP/icgrep-devel/icgrep/re/re_local.cpp
r5632 r5649 33 33 return first(name->getDefinition()); 34 34 } else { 35 throw std::runtime_error("All non-unicode-property Name objects should have been defined prior to Unicode property resolution.");35 UndefinedNameError(name); 36 36 } 37 37 } else if (CC * cc = dyn_cast<CC>(re)) { … … 75 75 return final(name->getDefinition()); 76 76 } else { 77 throw std::runtime_error("All non-unicode-property Name objects should have been defined prior to Unicode property resolution.");77 UndefinedNameError(name); 78 78 } 79 79 } else if (CC * cc = dyn_cast<CC>(re)) { … … 118 118 return follow(name->getDefinition(), follow_map); 119 119 } else { 120 throw std::runtime_error("All non-unicode-property Name objects should have been defined prior to Unicode property resolution.");120 UndefinedNameError(name); 121 121 } 122 122 } else if (Seq * seq = dyn_cast<Seq>(re)) {
Note: See TracChangeset
for help on using the changeset viewer.