File: flextypes.h

package info (click to toggle)
flexc%2B%2B 2.17.01-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,180 kB
  • sloc: cpp: 6,467; makefile: 148; sh: 130; ansic: 18
file content (43 lines) | stat: -rw-r--r-- 1,016 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef INCLUDED_FLEXTYPES_
#define INCLUDED_FLEXTYPES_


class FlexTypes
{
    using Alphabet = char;

    public:
        static size_t const NCHARS =   1 << (8 * sizeof(Alphabet));

        enum class TextType
        {
            IDENT,
            STRING,
            RAWSTRING
        };
            
        enum Type       // values in the Alphabet range are simple characters
        {
            UNDETERMINED_ =  NCHARS,
            EMPTY,                              
            FINAL,
            CHARSET,                            // string contents of [ ... ]
            EOF_                               // EOF becomes a special char
        };                                      // see README

        enum RuleType
        {
            NORMAL,
            LOP_FIXED,                          // LOP rule with fixed tail
            LOP_1,                              // LOP rule with variable tail
            LOP_2,
            LOP_3,
            LOP_4
        };
};
        
#endif