1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 declare temp_segs (5) pointer;
22
23
24
25
26
27
28
29
30
31
32 declare area area based (temp_seg_3.area_ptr);
33
34
35
36 declare 1 atoken aligned based,
37 2 string_size fixed binary (21) unaligned,
38
39 2 created bit (1) unaligned,
40 2 pct_type fixed binary (5) unsigned unaligned,
41 2 type fixed binary (8) unsigned unaligned,
42
43 2 replace_by fixed binary,
44 2 string_ptr unaligned pointer;
45
46 declare 1 token (divide (sys_info$max_seg_size, size (atoken), 19)) aligned based (temp_segs (1))
47 like atoken;
48
49
50
51 declare size builtin;
52
53
54
55 declare 1 args aligned based,
56 2 string_size fixed binary (21),
57 2 string_ptr unaligned pointer;
58
59
60
61 declare 1 params aligned based,
62 2 name aligned like args,
63 2 value aligned like token;
64
65
66
67 declare 1 temp_seg_3 aligned based (temp_segs (3)),
68 2 area_ptr pointer,
69 2 source_ptr pointer,
70 2 source_length fixed binary (21),
71 2 output_length fixed binary (21),
72 2 constant_base pointer,
73 2 variable_base pointer,
74 2 source_depth fixed binary,
75 2 file_stack_ptr pointer,
76 2 flags unaligned,
77 3 list bit (1),
78 3 pad1 bit (35),
79 2 target_value fixed binary (17),
80 2 number_of_clargs fixed binary,
81 2 number_of_params fixed binary,
82 2 cl_args (64) aligned like args,
83 2 cl_params (64) aligned like params;
84
85
86 declare output_string char (4 * sys_info$max_seg_size) based (temp_segs (2));
87
88
89
90 declare 1 variable aligned based,
91 2 next pointer unaligned,
92 2 nextv pointer unaligned,
93 2 alias_id fixed binary (17) unaligned,
94
95 2 variable_type fixed binary unaligned,
96 2 name_length fixed binary (17) unaligned,
97 2 name character (variable_name_length refer (variable.name_length));
98
99 declare variable_name_length fixed binary;
100
101
102
103 declare 1 constant aligned based,
104 2 next pointer,
105 2 string_length fixed binary (21),
106 2 string_value character (constant_length refer (constant.string_length));
107
108 declare constant_length fixed binary (21);
109
110
111
112 declare (
113 no_token initial (0),
114 invalid_char initial (1),
115 identifier initial (2),
116 keyword_token initial (3),
117 isub initial (4),
118 plus initial (5),
119 minus initial (6),
120 asterisk initial (7),
121 slash initial (8),
122 expon initial (9),
123 not initial (10),
124 and initial (11),
125 or initial (12),
126 cat initial (13),
127 eq initial (14),
128 ne initial (15),
129 lt initial (16),
130 gt initial (17),
131 le initial (18),
132 ge initial (19),
133 ngt initial (20),
134 nlt initial (21),
135 prefix_plus initial (22),
136 prefix_minus initial (23),
137 assignment initial (24),
138 colon initial (25),
139 semi_colon initial (26),
140 comma initial (27),
141 period initial (28),
142 arrow initial (29),
143 left_parn initial (30),
144 right_parn initial (31),
145 percent initial (32),
146 target_comma initial (33),
147 comment_token initial (34),
148 nl_vt_np_token initial (35),
149 bit_string initial (36),
150 char_string initial (37),
151 fixed_bin initial (38),
152 bin_integer initial (39),
153 fixed_dec initial (40),
154 dec_integer initial (41),
155 float_bin initial (42),
156 token_hole_1 initial (43),
157 float_dec initial (44),
158 token_hole_2 initial (45),
159 i_fixed_bin initial (46),
160 i_bin_integer initial (47),
161 i_fixed_dec initial (48),
162 i_dec_integer initial (49),
163 i_float_bin initial (50),
164 token_hole_3 initial (51),
165 i_float_dec initial (52),
166 token_hole_4 initial (53),
167 white_space_token initial (54)
168 ) fixed binary (8) unsigned internal static options (constant);
169
170
171
172 declare (
173 min_delimiter_token initial (5),
174 max_delimiter_token initial (35),
175 min_constant_token initial (36),
176 max_constant_token initial (53),
177 min_arithmetic_token initial (38),
178 max_arithmetic_token initial (53)
179 ) fixed binary (8) unsigned internal static options (constant);
180
181
182
183 declare (
184 is_imaginary_constant initial ("1000"b),
185 is_float_constant initial ("0100"b),
186 is_decimal_constant initial ("0010"b),
187 is_integral_constant initial ("0001"b)
188 ) bit (4) aligned internal static options (constant);
189
190
191
192
193
194 declare 1 pct_keywords (19) aligned structure internal static options (constant),
195 2 name character (8) varying
196 initial(
197 "page", "skip", "replace", "default", "target", "isarg", "isdef",
198 "include","if", "then", "else", "elseif", "endif", "print",
199 "error", "warn", "abort", "INCLUDE", "set"),
200
201 2 terminator fixed binary (17) unaligned
202 initial(
203 3, 3, 3, 3, 1, 1, 1,
204 3, 2, 2, 2, 2, 2, 3,
205 3, 3, 3, 3, 3),
206
207 2 needs_reinterpreation bit (1) unaligned
208 initial(
209 "0"b, "0"b, "1"b, "1"b, "1"b, "1"b, "1"b,
210 "0"b, "1"b, "1"b, "1"b, "1"b, "1"b, "1"b,
211 "1"b, "1"b, "1"b, "1"b, "1"b),
212
213 2 m_index fixed binary (17) unaligned
214 initial(
215 2, 3, 4, 1, 7, 8, 6,
216 15, 9, 10, 11, 12, 13, 16,
217 5, 17, 18, 14, 19);
218
219
220
221
222
223 declare (
224 pct_default initial (1),
225 pct_page initial (2),
226 pct_skip initial (3),
227 pct_replace initial (4),
228 pct_error initial (5),
229 pct_isdef initial (6),
230 pct_target initial (7),
231 pct_isarg initial (8),
232 pct_if initial (9),
233 pct_then initial (10),
234 pct_else initial (11),
235 pct_elseif initial (12),
236 pct_endif initial (13),
237 pct_INCLUDE initial (14),
238 pct_include initial (15),
239 pct_print initial (16),
240 pct_warn initial (17),
241 pct_abort initial (18),
242 pct_set initial (19)
243 ) fixed binary internal static options (constant);
244
245
246
247 declare (
248 replace_var initial (1),
249 default_var initial (2),
250 set_var initial (3),
251 parameter_var initial (4)
252 ) fixed binary internal static options (constant);
253
254
255
256 declare (
257 paren_macro initial (1),
258 if_macro initial (2),
259 semicolon_macro initial (3),
260 reinterpret_macro initial (4)
261 ) fixed binary internal static options (constant);
262
263
264
265 declare (
266 max_bit_string_constant
267 initial (253),
268 max_char_string_constant
269 initial (254),
270 max_identifier_length initial (256)
271 ) fixed binary internal static options (constant);
272
273
274
275
276 declare pl1_macro_severity_ fixed binary (35) external static;
277 declare sys_info$max_seg_size fixed binary (19) external static;
278
279
280
281 declare pl1_macro_error_ entry (fixed binary (35), char (*), pointer, fixed binary (21), fixed binary (21));
282 declare pl1_macro_lex_ entry ((*) pointer, fixed binary (35));
283 declare pl1_macro_lex_$cleanup entry ((*) pointer);
284 declare system_type_ entry (char (*), char (*), fixed binary (17), fixed binary (35));
285
286
287
288 declare arithchar char (28) internal static options (constant)
289 initial ("0123456789(=^=<=>=+-*/) .""
290 ");
291 declare alphabetics char (52) internal static options (constant)
292 initial ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
293
294 declare numerals char (10) internal static options (constant) initial ("0123456789");
295
296 declare identifier_chars char (64) internal static options (constant)
297 initial ("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$");
298
299 declare lower_case_letters char (26) internal static options (constant) initial ("abcdefghijklmnopqrstuvwxyz");
300 declare upper_case_letters char (26) internal static options (constant) initial ("ABCDEFGHIJKLMNOPQRSTUVWXYZ");
301
302 declare zero_one char (2) internal static options (constant) initial ("01");
303 declare QUOTE char (1) internal static options (constant) initial ("""");
304 declare QUOTEQUOTE char (2) internal static options (constant) initial ("""""");
305
306
307
308 declare none fixed binary internal static options (constant) initial (0);
309
310 declare macro_version character (5) internal static options (constant) initial (" 2.0 ");
311 declare command character (9) internal static options (constant) initial ("pl1_macro");
312
313
314
315 declare NO_RESULT fixed binary (35) internal static options (constant) initial (1);
316 declare COMPILER_ERROR fixed binary (35) internal static options (constant) initial (2);
317 declare SYNTAX_ERROR fixed binary (35) internal static options (constant) initial (3);
318 declare SEMANTIC_ERROR fixed binary (35) internal static options (constant) initial (4);
319 declare STORAGE_SYSTEM_ERROR fixed binary (35) internal static options (constant) initial (5);
320 declare IMPLEMENTATION_RESTRICTION
321 fixed binary (35) internal static options (constant) initial (6);
322 declare TARGET_STRING_ERROR fixed binary (35) internal static options (constant) initial (7);
323
324 %include system_types;
325
326