Add tests, fixes for tests, reinstate and type-convert stuff marked "bitrot"
[ccom.git] / fields.sed
1 s/@/ATSIGN/g
2 s/^/@/
3 s/$/@/
4 s/[^A-Za-z0-9_]\+/@&@/g
5
6 # types
7 s/@union\(@[     ]*@\)tree@/@struct\1node@/g
8
9 # values
10 s/@TNULL@/@(struct node *)NULL@/g
11
12 # tnode
13 s/@t@\.@op@/@tn_op@/g
14 s/@t@\.@type@/@tn_type@/g
15 s/@t@\.@subsp@/@tn_subsp@/g
16 s/@t@\.@strp@/@tn_strp@/g
17 s/@t@\.@tr1@/@tn_tr1@/g
18 s/@t@\.@tr2@/@tn_tr2@/g
19 s/@t@\.@degree@/@tn_degree@/g
20
21 # nnode
22 s/@n@\.@op@/@nn_op@/g
23 s/@n@\.@type@/@nn_type@/g
24 s/@n@\.@subsp@/@nn_subsp@/g
25 s/@n@\.@strp@/@nn_strp@/g
26 s/@n@\.@tr1@/@nn_nmlist@/g
27 s/@n@\.@class@/@nn_class@/g
28 s/@n@\.@regno@/@nn_regno@/g
29 s/@n@\.@offset@/@nn_offset@/g
30 s/@n@\.@nloc@/@nn_nloc@/g
31
32 # xnode
33 s/@x@\.@op@/@xn_op@/g
34 s/@x@\.@type@/@xn_type@/g
35 s/@x@\.@subsp@/@xn_subsp@/g
36 s/@x@\.@strp@/@xn_strp@/g
37 s/@x@\.@tr1@/@xn_tr1@/g
38 s/@x@\.@class@/@xn_class@/g
39 s/@x@\.@regno@/@xn_regno@/g
40 s/@x@\.@offset@/@xn_offset@/g
41 s/@x@\.@name@/@xn_name@/g
42
43 # cnode
44 s/@c@\.@op@/@cn_op@/g
45 s/@c@\.@type@/@cn_type@/g
46 s/@c@\.@subsp@/@cn_subsp@/g
47 s/@c@\.@strp@/@cn_strp@/g
48 s/@c@\.@value@/@cn_value@/g
49
50 # lnode
51 s/@l@\.@op@/@ln_op@/g
52 s/@l@\.@type@/@ln_type@/g
53 s/@l@\.@subsp@/@ln_subsp@/g
54 s/@l@\.@strp@/@ln_strp@/g
55 s/@l@\.@lvalue@/@ln_lvalue@/g
56
57 # lnode
58 s/@f@\.@op@/@fn_op@/g
59 s/@f@\.@type@/@fn_type@/g
60 s/@f@\.@subsp@/@fn_subsp@/g
61 s/@f@\.@strp@/@fn_strp@/g
62 s/@f@\.@value@/@fn_value@/g
63 s/@f@\.@fvalue@/@fn_fvalue@/g
64
65 # fasgn
66 s/@F@\.@op@/@fa_op@/g
67 s/@F@\.@type@/@fa_type@/g
68 s/@F@\.@subsp@/@fa_subsp@/g
69 s/@F@\.@strp@/@fa_strp@/g
70 s/@F@\.@tr1@/@fa_tr1@/g
71 s/@F@\.@tr2@/@fa_tr2@/g
72 s/@F@\.@degree@/@fa_degree@/g
73 s/@F@\.@mask@/@fa_mask@/g
74
75 # nmlist
76 s/\.@hclass@/.@nl_class@/g
77 s/\.@hflag@/.@nl_flag@/g
78 s/\.@htype@/.@nl_type@/g
79 s/\.@hsubsp@/.@nl_subsp@/g
80 s/\.@hstrp@/.@nl_strp@/g
81 s/\.@hoffset@/.@nl_offset@/g
82 s/\.@nextnm@/.@nl_nextnm@/g
83 s/\.@sparent@/.@nl_sparent@/g
84 s/\.@hblklev@/.@nl_blklev@/g
85 s/\.@name@/.@nl_name@/g
86 s/->@hclass@/->@nl_class@/g
87 s/->@hflag@/->@nl_flag@/g
88 s/->@htype@/->@nl_type@/g
89 s/->@hsubsp@/->@nl_subsp@/g
90 s/->@hstrp@/->@nl_strp@/g
91 s/->@hoffset@/->@nl_offset@/g
92 s/->@nextnm@/->@nl_nextnm@/g
93 s/->@sparent@/->@nl_sparent@/g
94 s/->@hblklev@/->@nl_blklev@/g
95 s/->@name@/->@nl_name@/g
96
97 s/@//g
98 s/ATSIGN/@/g