forked from rperlste/UniversalCompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTransitionTable.h
37 lines (31 loc) · 1.38 KB
/
TransitionTable.h
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
#ifndef _transitionTable
#define _transitionTable
const int TRANSITION_TABLE[8][16] = {
// Letter Digit Blank + — = : , ; ( ) _ # Tab Eol Other
/*0*/ { 1, 2, 3, 14, 4, 22, 6, 17, 18, 19, 20, 22, 7, 3, 3, 22 },
/*1*/ { 1, 1, 11, 11, 11, 11, 11, 11, 11, 11, 11, 1, 22, 11, 11, 11 },
/*2*/ { 12, 2, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 22, 12, 12, 12 },
/*3*/ { 13, 13, 3, 13, 13, 13, 13, 13, 13, 13, 13, 13, 22, 3, 3, 13 },
/*4*/ { 21, 21, 21, 21, 5, 21, 21, 21, 21, 21, 21, 22, 22, 21, 21, 14 },
/*5*/ { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 22, 5, 15, 5 },
/*6*/ { 22, 22, 22, 22, 22, 16, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22 },
/*7*/ { 7, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23 }
/********************************************************************************************************************************
* FINAL STATES
* ------------
* 11 Id = Letter (Letter | Digit | _)*
* 12 IntLiteral = Digit+
* 13 EmptySpace = (Blank | Eol | Tab)+
* 14 PlusOp
* 15 Comment = — — Not(Eol)*Eol
* 16 AssignOp
* 17 Comma
* 18 SemiColon
* 19 LParen
* 20 Rparen
* 21 MinusOp
* 22 Error
* 23 ActionSymbol
********************************************************************************************************************************/
};
#endif