| 1 |
const |
| 2 |
GB18030CharLenTable: array [0..6] of byte = (0, 1, 1, 1, 1, 1, 2); |
| 3 |
|
| 4 |
|
| 5 |
GB18030_cls: array [0..255] of Byte = ( |
| 6 |
1,1,1,1,1,1,1,1, // 00 - 07 |
| 7 |
1,1,1,1,1,1,0,0, // 08 - 0f |
| 8 |
1,1,1,1,1,1,1,1, // 10 - 17 |
| 9 |
1,1,1,0,1,1,1,1, // 18 - 1f |
| 10 |
1,1,1,1,1,1,1,1, // 20 - 27 |
| 11 |
1,1,1,1,1,1,1,1, // 28 - 2f |
| 12 |
3,3,3,3,3,3,3,3, // 30 - 37 |
| 13 |
3,3,1,1,1,1,1,1, // 38 - 3f |
| 14 |
2,2,2,2,2,2,2,2, // 40 - 47 |
| 15 |
2,2,2,2,2,2,2,2, // 48 - 4f |
| 16 |
2,2,2,2,2,2,2,2, // 50 - 57 |
| 17 |
2,2,2,2,2,2,2,2, // 58 - 5f |
| 18 |
2,2,2,2,2,2,2,2, // 60 - 67 |
| 19 |
2,2,2,2,2,2,2,2, // 68 - 6f |
| 20 |
2,2,2,2,2,2,2,2, // 70 - 77 |
| 21 |
2,2,2,2,2,2,2,4, // 78 - 7f |
| 22 |
5,6,6,6,6,6,6,6, // 80 - 87 |
| 23 |
6,6,6,6,6,6,6,6, // 88 - 8f |
| 24 |
6,6,6,6,6,6,6,6, // 90 - 97 |
| 25 |
6,6,6,6,6,6,6,6, // 98 - 9f |
| 26 |
6,6,6,6,6,6,6,6, // a0 - a7 |
| 27 |
6,6,6,6,6,6,6,6, // a8 - af |
| 28 |
6,6,6,6,6,6,6,6, // b0 - b7 |
| 29 |
6,6,6,6,6,6,6,6, // b8 - bf |
| 30 |
6,6,6,6,6,6,6,6, // c0 - c7 |
| 31 |
6,6,6,6,6,6,6,6, // c8 - cf |
| 32 |
6,6,6,6,6,6,6,6, // d0 - d7 |
| 33 |
6,6,6,6,6,6,6,6, // d8 - df |
| 34 |
6,6,6,6,6,6,6,6, // e0 - e7 |
| 35 |
6,6,6,6,6,6,6,6, // e8 - ef |
| 36 |
6,6,6,6,6,6,6,6, // f0 - f7 |
| 37 |
6,6,6,6,6,6,6,0 // f8 - ff |
| 38 |
); |
| 39 |
|
| 40 |
GB18030_st: array [0..47] of byte = ( |
| 41 |
byte(eError),byte(eStart),byte(eStart),byte(eStart),byte(eStart),byte(eStart), 3,byte(eError),//00-07 |
| 42 |
byte(eError),byte(eError),byte(eError),byte(eError),byte(eError),byte(eError),byte(eItsMe),byte(eItsMe),//08-0f |
| 43 |
byte(eItsMe),byte(eItsMe),byte(eItsMe),byte(eItsMe),byte(eItsMe),byte(eError),byte(eError),byte(eStart),//10-17 |
| 44 |
4,byte(eError),byte(eStart),byte(eStart),byte(eError),byte(eError),byte(eError),byte(eError),//18-1f |
| 45 |
byte(eError),byte(eError), 5,byte(eError),byte(eError),byte(eError),byte(eItsMe),byte(eError),//20-27 |
| 46 |
byte(eError),byte(eError),byte(eStart),byte(eStart),byte(eStart),byte(eStart),byte(eStart),byte(eStart) //28-2f |
| 47 |
); |
| 48 |
|
| 49 |
GB18030LangModel: SMModel = ( |
| 50 |
classTable: @GB18030_cls; |
| 51 |
classFactor: 7; |
| 52 |
stateTable: @GB18030_st; |
| 53 |
charLenTable: @GB18030CharLenTable; |
| 54 |
CharsetID: GB18030_CHARSET; |
| 55 |
); |
| 56 |
|
| 57 |
// GB18030LangModel: SMModel = ( |
| 58 |
// classTable: ( |
| 59 |
// idxsft: eIdxSft4bits; |
| 60 |
// sftmsk: eSftMsk4bits; |
| 61 |
// bitsft: eBitSft4bits; |
| 62 |
// unitmsk: eUnitMsk4bits; |
| 63 |
// data: @GB18030_cls; |
| 64 |
// ); |
| 65 |
// classFactor: 7; |
| 66 |
// stateTable: ( |
| 67 |
// idxsft: eIdxSft4bits; |
| 68 |
// sftmsk: eSftMsk4bits; |
| 69 |
// bitsft: eBitSft4bits; |
| 70 |
// unitmsk: eUnitMsk4bits; |
| 71 |
// data: @GB18030_st; |
| 72 |
// ); |
| 73 |
// charLenTable: @GB18030CharLenTable; |
| 74 |
// CharsetID: GB18030_CHARSET; |
| 75 |
// ); |
| 76 |
|