#define STATE_EXIT  (int) (-1)
#define STATE_ERROR (int) (-2)

#define CHARTYPE_SPACE 5
#define CHARTYPE_BS 3
#define CHARTYPE_DQ 0
#define CHARTYPE_SQ 1
#define CHARTYPE_NULL 4
#define CHARTYPE_OTHER 2

#define CHARTYPES_COUNT 6

#define ACTION_SKIP 0
#define ACTION_INCLUDE 1
#define ACTION_FINISH 2

#define ACTIONS_COUNT 3

static const int action [5] [6] = {
   { 0, 0, 1, 0, 2, 2 },
   { 0, 1, 1, 1, 2, 1 },
   { 1, 0, 1, 1, 2, 1 },
   { 0, 0, 1, 0, 2, 2 },
   { 1, 1, 1, 1, 2, 1 }};

static const int transition [5] [6] = {
   { 1, 2, 3, 4, -1, 0 },
   { 0, 1, 1, 1, -2, 1 },
   { 2, 0, 2, 2, -2, 2 },
   { 1, 2, 3, 4, -1, 0 },
   { 3, 3, 3, 3, -2, 3 }};

