/
thomas-king
/
Expression
Обзор
Документация
Войти
/
thomas-king
/
Expression
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
include/lib/CharacterSet.h
35 строк
555 B
AceRodstin
Update Lexer::Parser
25 ноя 2022, 15:37
25 ноя 2022, 15:37
0fb5f55
Код
Авторство
О чём код?
// // Created by Ace Rodstin on 22 Nov 2022. // #ifndef GRAMMARPARSER_CHARACTERSET_H #define GRAMMARPARSER_CHARACTERSET_H #include <set> #include <string> #include <algorithm> #include <initializer_list> using namespace std; class CharacterSet { public: struct Range { char start; char end; }; static CharacterSet digits; static CharacterSet alphabet; static CharacterSet alpha_numeric; CharacterSet(initializer_list<Range> ranges); bool contains(char character); private: set<char> storage; }; #endif //GRAMMARPARSER_CHARACTERSET_H