source: icGREP/icgrep-devel/icgrep/re/re_parser_pcre.cpp

Last change on this file was 5181, checked in by xwa163, 14 months ago

fix undefined vtable caused by llvm O3 optimization for inline function

File size: 834 bytes
Line 
1/*
2 *  Copyright (c) 2016 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#include <re/re_parser_pcre.h>
8#include <re/re_parser_helper.h>
9#include <re/re_alt.h>
10#include <re/re_seq.h>
11#include <re/re_start.h>
12#include <re/re_end.h>
13#include <re/re_assertion.h>
14
15namespace re{
16
17    // \< and \> removed
18    const uint64_t setEscapeCharacters = bit3C('b') | bit3C('p') | bit3C('q') | bit3C('d') | bit3C('w') | bit3C('s') | bit3C('B') |
19                                         bit3C('P') | bit3C('Q') | bit3C('D') | bit3C('W') | bit3C('S') | bit3C('N') | bit3C('X');
20
21    bool RE_Parser_PCRE::isSetEscapeChar(char c) {
22        return c >= 0x3C && c <= 0x7B && ((setEscapeCharacters >> (c - 0x3C)) & 1) == 1;
23    }
24
25}
Note: See TracBrowser for help on using the repository browser.