blob: 3400881a98d7207bbd686c906183acfbf0d243c9 (
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
|
/*
file: lrksym.txt
Why: LR k symbols vocabulary to parse.
Note: lr1-constant-symbols is shown for clarity. It is the keyword trigger
that calls this grammar. Parsed is comments onwards.
*/
lr1-constant-symbols
// comments
(file-name yacco2_k_symbols
,name-space NS_yacco2_k_symbols){
eog
/@
Used to indicate an end-of-grammar.
@/
(sym-class LR1_eog {
user-declaration
LR1_eog();
***
user-implementation
LR1_eog::LR1_eog()
T_CTOR("eog",T_LR1_eog_,0,false,false){}
LR1_eog LR1_eog__;
yacco2::CAbs_lr1_sym* NS_yacco2_k_symbols::PTR_LR1_eog__ = &LR1_eog__;
***
}
)
....
"|t|" AD AB(sym-class LR1_fset_transience_operator)
/@
As they are constants, they are defined globally
to save space / overhead in the typical new create / delete
cycle of terminals. Thar's recycling going on in this green space.
@/
lrk-sufx
extern yacco2::CAbs_lr1_sym* PTR_LR1_parallel_operator__;
....
extern yacco2::CAbs_lr1_sym* PTR_LR1_eolr__;
***
}
|