src
test.h
Go to the documentation of this file.
1 #ifndef _RE2C_TEST_RANGE_TEST_
2 #define _RE2C_TEST_RANGE_TEST_
3 
4 #include "src/util/c99_stdint.h"
5 
6 namespace re2c { class Range; }
7 
8 namespace re2c_test {
9 
10 /*
11  * If encoding has N code units (characters), character class can be
12  * represented as an N-bit integer: k-th bit is set iff k-th character
13  * belongs to the class.
14  *
15  * Addition and subtraction can be implemented trivially for such
16  * integer representation of character classes: addition is simply
17  * bitwise OR of two classes, subtraction is bitwise AND of the first
18  * class and negated second class.
19  */
20 template <uint8_t BITS> re2c::Range * range (uint32_t n);
21 template <uint8_t BITS> re2c::Range * add (uint32_t n1, uint32_t n2);
22 template <uint8_t BITS> re2c::Range * sub (uint32_t n1, uint32_t n2);
23 
24 } // namespace re2c_test
25 
26 #endif // _RE2C_TEST_RANGE_TEST_
re2c::Range * add(uint32_t n1, uint32_t n2)
Definition: test-impl.h:37
re2c::Range * range(uint32_t n)
Definition: test-impl.h:16
re2c::Range * sub(uint32_t n1, uint32_t n2)
Definition: test-impl.h:43
Definition: bitmap.cc:10