Completely new version, generating a much faster parser
This commit is contained in:
parent
f055d610d3
commit
42d0e056fb
131
util/LLgen/src/cclass.c
Normal file
131
util/LLgen/src/cclass.c
Normal file
|
@ -0,0 +1,131 @@
|
|||
#include "cclass.h"
|
||||
char c_class[] = {
|
||||
0, /* 00 */
|
||||
0, /* 01 */
|
||||
0, /* 02 */
|
||||
0, /* 03 */
|
||||
0, /* 04 */
|
||||
0, /* 05 */
|
||||
0, /* 06 */
|
||||
0, /* 07 */
|
||||
0, /* 010 */
|
||||
ISSPA, /* 011 */
|
||||
ISSPA, /* 012 */
|
||||
0, /* 013 */
|
||||
ISSPA, /* 014 */
|
||||
ISSPA, /* 015 */
|
||||
0, /* 016 */
|
||||
0, /* 017 */
|
||||
0, /* 020 */
|
||||
0, /* 021 */
|
||||
0, /* 022 */
|
||||
0, /* 023 */
|
||||
0, /* 024 */
|
||||
0, /* 025 */
|
||||
0, /* 026 */
|
||||
0, /* 027 */
|
||||
0, /* 030 */
|
||||
0, /* 031 */
|
||||
0, /* 032 */
|
||||
0, /* 033 */
|
||||
0, /* 034 */
|
||||
0, /* 035 */
|
||||
0, /* 036 */
|
||||
0, /* 037 */
|
||||
ISSPA, /* ' ' */
|
||||
0, /* '!' */
|
||||
0, /* '"' */
|
||||
0, /* '#' */
|
||||
0, /* '$' */
|
||||
ISKEY, /* '%' */
|
||||
0, /* '&' */
|
||||
ISLIT, /* ''' */
|
||||
ISTOK, /* '(' */
|
||||
ISTOK, /* ')' */
|
||||
ISTOK, /* '*' */
|
||||
ISTOK, /* '+' */
|
||||
ISTOK, /* ',' */
|
||||
0, /* '-' */
|
||||
0, /* '.' */
|
||||
ISCOM, /* '/' */
|
||||
ISDIG, /* '0' */
|
||||
ISDIG, /* '1' */
|
||||
ISDIG, /* '2' */
|
||||
ISDIG, /* '3' */
|
||||
ISDIG, /* '4' */
|
||||
ISDIG, /* '5' */
|
||||
ISDIG, /* '6' */
|
||||
ISDIG, /* '7' */
|
||||
ISDIG, /* '8' */
|
||||
ISDIG, /* '9' */
|
||||
ISTOK, /* ':' */
|
||||
ISTOK, /* ';' */
|
||||
0, /* '<' */
|
||||
0, /* '=' */
|
||||
0, /* '>' */
|
||||
ISTOK, /* '?' */
|
||||
0, /* '@' */
|
||||
ISLET, /* 'A' */
|
||||
ISLET, /* 'B' */
|
||||
ISLET, /* 'C' */
|
||||
ISLET, /* 'D' */
|
||||
ISLET, /* 'E' */
|
||||
ISLET, /* 'F' */
|
||||
ISLET, /* 'G' */
|
||||
ISLET, /* 'H' */
|
||||
ISLET, /* 'I' */
|
||||
ISLET, /* 'J' */
|
||||
ISLET, /* 'K' */
|
||||
ISLET, /* 'L' */
|
||||
ISLET, /* 'M' */
|
||||
ISLET, /* 'N' */
|
||||
ISLET, /* 'O' */
|
||||
ISLET, /* 'P' */
|
||||
ISLET, /* 'Q' */
|
||||
ISLET, /* 'R' */
|
||||
ISLET, /* 'S' */
|
||||
ISLET, /* 'T' */
|
||||
ISLET, /* 'U' */
|
||||
ISLET, /* 'V' */
|
||||
ISLET, /* 'W' */
|
||||
ISLET, /* 'X' */
|
||||
ISLET, /* 'Y' */
|
||||
ISLET, /* 'Z' */
|
||||
ISTOK, /* '[' */
|
||||
0, /* '\' */
|
||||
ISTOK, /* ']' */
|
||||
0, /* '^' */
|
||||
ISLET, /* '_' */
|
||||
0, /* '`' */
|
||||
ISLET, /* 'a' */
|
||||
ISLET, /* 'b' */
|
||||
ISLET, /* 'c' */
|
||||
ISLET, /* 'd' */
|
||||
ISLET, /* 'e' */
|
||||
ISLET, /* 'f' */
|
||||
ISLET, /* 'g' */
|
||||
ISLET, /* 'h' */
|
||||
ISLET, /* 'i' */
|
||||
ISLET, /* 'j' */
|
||||
ISLET, /* 'k' */
|
||||
ISLET, /* 'l' */
|
||||
ISLET, /* 'm' */
|
||||
ISLET, /* 'n' */
|
||||
ISLET, /* 'o' */
|
||||
ISLET, /* 'p' */
|
||||
ISLET, /* 'q' */
|
||||
ISLET, /* 'r' */
|
||||
ISLET, /* 's' */
|
||||
ISLET, /* 't' */
|
||||
ISLET, /* 'u' */
|
||||
ISLET, /* 'v' */
|
||||
ISLET, /* 'w' */
|
||||
ISLET, /* 'x' */
|
||||
ISLET, /* 'y' */
|
||||
ISLET, /* 'z' */
|
||||
ISTOK, /* '{' */
|
||||
ISTOK, /* '|' */
|
||||
ISTOK, /* '}' */
|
||||
0, /* '~' */
|
||||
0 /* 0177 */
|
||||
};
|
9
util/LLgen/src/cclass.h
Normal file
9
util/LLgen/src/cclass.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
extern char c_class[];
|
||||
|
||||
#define ISLET 1
|
||||
#define ISDIG 2
|
||||
#define ISSPA 3
|
||||
#define ISKEY 4
|
||||
#define ISTOK 5
|
||||
#define ISCOM 6
|
||||
#define ISLIT 7
|
Loading…
Reference in a new issue