📄 regexp.h
字号:
/* @(#)Copyright (C) H.Shirouzu 2005-2006 regexp.cpp ver1.31 *//* ======================================================================== Project Name : Regular Expression / Wild Card Match Library Create : 2005-11-03(The) Update : 2006-01-31(Tue) Reference : ======================================================================== */typedef unsigned _int64 RegStates;class RegExp {public: RegExp(); ~RegExp(); enum CaseSense { CASE_SENSE, CASE_INSENSE }; void Init(); BOOL RegisterWildCard(const void *wild_str, CaseSense cs=CASE_SENSE);// BOOL RegisterRegStr(const void *reg_str, CaseSense cs=CASE_SENSE); BOOL IsMatch(const void *target); BOOL IsRegistered(void) { return max_state ? TRUE : FALSE; }protected: enum StatesType { NORMAL_TBL, REV_TBL, MAX_STATES_TBL }; RegStates **states_tbl[MAX_STATES_TBL]; RegStates (*epsilon_tbl)[BYTE_NUM]; RegStates end_states; int max_state; void AddRegStates(StatesType type, WCHAR ch, const RegStates &state_pattern); RegStates GetRegStates(StatesType type, WCHAR ch); void AddEpStates(int state, const RegStates &add_states); RegStates GetEpStates(RegStates cur_states); inline void AddRegStatesEx(StatesType type, WCHAR ch, CaseSense cs);};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -