summaryrefslogtreecommitdiff
path: root/web/yacco2/library/gbl_defs.w
blob: 5f4433e49fd8de1fa65165ef05ddd65344bfc7e3 (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
@q file: gbl_defs.w@>
@q%   Copyright Dave Bone 1998 - 2015@>
@q% /*@>
@q%    This Source Code Form is subject to the terms of the Mozilla Public@>
@q%    License, v. 2.0. If a copy of the MPL was not distributed with this@>
@q%    file, You can obtain one at http://mozilla.org/MPL/2.0/.@>
@q% */@>
@** Global macro definitions.
These are references throughout all Yacco2's |cweb| files.
One definition to watch for is |SIZE_CAbs_lr1_sym|. It attempts
to optimize the allocation of raw characters.
Due to some of |CAbs_lr1_sym| items --- the boolean and short ints,
there are slack bytes
generated when alignment for 64 bit support takes place for pointers
on 8 byte boundries.
|SIZE_RC_MALLOC| is used to eliminate dflt ctor of |CAbs_lr1_sym|.
@d START_OF_LRK_ENUMERATE 0
@d END_OF_LRK_ENUMERATE 7
@d START_OF_RC_ENUMERATE END_OF_LRK_ENUMERATE+1
@d END_OF_RC_ENUMERATE START_OF_RC_ENUMERATE+256-1
@d START_OF_ERROR_ENUMERATE END_OF_RC_ENUMERATE+1
@d SEQ_SRCH_VS_BIN_SRCH_LIMIT 71
@d MAX_UINT (0xffffffff) //1024*1024*1024*4 - 1
@d MAX_USINT 256*256 - 1
@d MAX_LR_STK_ITEMS 256
@d C_MAX_LR_STK_ITEMS MAX_LR_STK_ITEMS+1
@d BITS_PER_WORD 32
@d BITS_PER_WORD_REL_0 BITS_PER_WORD - 1
@d MAX_NO_THDS 1024
@d START_OF_RC_ENUM 8
@d SIZE_CAbs_lr1_sym 56 // 32 bit: 24..28 bytes, 64 bit: 56
@d NO_CAbs_lr1_sym_ENTRIES 1024*1024
@d SIZE_RC_MALLOC NO_CAbs_lr1_sym_ENTRIES*SIZE_CAbs_lr1_sym
@d ASCII_8_BIT 256
@d START_LINE_NO 1
@d START_CHAR_POS 0
@d LINE_FEED 10
@d EOF_CHAR_SUB 256
@d YES true
@d NO false
@d ON true
@d OFF false
@d BUFFER_SIZE 1024*4
@d BIG_BUFFER_32K 1024*32
@d SMALL_BUFFER_4K 1024*4
@d THREAD_WORKING 0
@d THREAD_WAITING_FOR_WORK 1
@d ALL_THREADS_BUSY 2
@d NO_THREAD_AT_ALL 3
@d THREAD_TO_EXIT 4
@d EVENT_RECEIVED 0
@d WAIT_FOR_EVENT 1
@d Token_start_pos 0 // rel 0 for now
@d No_Token_start_pos Token_start_pos - 1 // rel 0 for now
@d CALLED_AS_THREAD true
@d CALLED_AS_PROC false
@d ACCEPT_FILTER true
@d BYPASS_FILTER false