Changeset 4304


Ignore:
Timestamp:
Nov 14, 2014, 10:58:20 AM (4 years ago)
Author:
cameron
Message:

NothingToRepeat? exception/error message.

Location:
icGREP/icgrep-devel/icgrep/re
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/re/parsefailure.h

    r4187 r4304  
    6363};
    6464
     65class NothingToRepeat : public ParseFailure {
     66public:
     67    NothingToRepeat() noexcept : ParseFailure("Need something to repeat before *, +, ? or {.") { }
     68    virtual ~NothingToRepeat() noexcept {}
     69};
     70
    6571#endif // PARSEFAILURE_H
  • icGREP/icgrep-devel/icgrep/re/re_parser.cpp

    r4298 r4304  
    9494            case '|': case ')':
    9595                break;
    96             case '*': case '+': case '?': case ']': case '{': case '}':
     96            case '*': case '+': case '?': case '{':
     97                throw NothingToRepeat();
     98            case ']': case '}':
    9799                throw ParseFailure("Illegal metacharacter usage!");
    98100            case '[':
Note: See TracChangeset for help on using the changeset viewer.