BadVPN – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 <?php
2  
3  
4 /*
5  
6 DON'T EDIT THIS FILE!
7  
8 This file was automatically generated by the Lime parser generator.
9 The real source code you should be looking at is in one or more
10 grammar files in the Lime format.
11  
12 THE ONLY REASON TO LOOK AT THIS FILE is to see where in the grammar
13 file that your error happened, because there are enough comments to
14 help you debug your grammar.
15  
16 If you ignore this warning, you're shooting yourself in the brain,
17 not the foot.
18  
19 */
20  
21 class ProtoParser extends lime_parser {
22 var $qi = 0;
23 var $i = array (
24  
25 array (
26 'directives' => 's 1',
27 'directive' => 's 30',
28 'include' => 's 33',
29 'file' => 's 35',
30 '\'start\'' => 'a \'start\'',
31 'message' => 'r 1',
32 ),
33 1 =>
34 array (
35 'messages' => 's 2',
36 'msgspec' => 's 3',
37 'message' => 's 5',
38 ),
39 2 =>
40 array (
41 '#' => 'r 0',
42 ),
43 3 =>
44 array (
45 'msgspec' => 's 3',
46 'messages' => 's 4',
47 'message' => 's 5',
48 '#' => 'r 4',
49 ),
50 4 =>
51 array (
52 '#' => 'r 5',
53 ),
54 5 =>
55 array (
56 'name' => 's 6',
57 ),
58 6 =>
59 array (
60 'spar' => 's 7',
61 ),
62 7 =>
63 array (
64 'entries' => 's 8',
65 'entry' => 's 11',
66 'cardinality' => 's 13',
67 'repeated' => 's 26',
68 'optional' => 's 27',
69 'required' => 's 28',
70 ),
71 8 =>
72 array (
73 'epar' => 's 9',
74 ),
75 9 =>
76 array (
77 'semicolon' => 's 10',
78 ),
79 10 =>
80 array (
81 'message' => 'r 6',
82 '#' => 'r 6',
83 ),
84 11 =>
85 array (
86 'entry' => 's 11',
87 'entries' => 's 12',
88 'cardinality' => 's 13',
89 'repeated' => 's 26',
90 'optional' => 's 27',
91 'required' => 's 28',
92 'epar' => 'r 7',
93 ),
94 12 =>
95 array (
96 'epar' => 'r 8',
97 ),
98 13 =>
99 array (
100 'type' => 's 14',
101 'uint' => 's 19',
102 'data' => 's 20',
103 'message' => 's 24',
104 ),
105 14 =>
106 array (
107 'name' => 's 15',
108 ),
109 15 =>
110 array (
111 'equals' => 's 16',
112 ),
113 16 =>
114 array (
115 'number' => 's 17',
116 ),
117 17 =>
118 array (
119 'semicolon' => 's 18',
120 ),
121 18 =>
122 array (
123 'repeated' => 'r 9',
124 'optional' => 'r 9',
125 'required' => 'r 9',
126 'epar' => 'r 9',
127 ),
128 19 =>
129 array (
130 'name' => 'r 14',
131 ),
132 20 =>
133 array (
134 'srpar' => 's 21',
135 'name' => 'r 15',
136 ),
137 21 =>
138 array (
139 'string' => 's 22',
140 ),
141 22 =>
142 array (
143 'erpar' => 's 23',
144 ),
145 23 =>
146 array (
147 'name' => 'r 16',
148 ),
149 24 =>
150 array (
151 'name' => 's 25',
152 ),
153 25 =>
154 array (
155 'name' => 'r 17',
156 ),
157 26 =>
158 array (
159 'uint' => 'r 10',
160 'data' => 'r 10',
161 'message' => 'r 10',
162 ),
163 27 =>
164 array (
165 'uint' => 'r 11',
166 'data' => 'r 11',
167 'message' => 'r 11',
168 ),
169 28 =>
170 array (
171 'repeated' => 's 29',
172 'uint' => 'r 12',
173 'data' => 'r 12',
174 'message' => 'r 12',
175 ),
176 29 =>
177 array (
178 'uint' => 'r 13',
179 'data' => 'r 13',
180 'message' => 'r 13',
181 ),
182 30 =>
183 array (
184 'semicolon' => 's 31',
185 ),
186 31 =>
187 array (
188 'directive' => 's 30',
189 'directives' => 's 32',
190 'include' => 's 33',
191 'message' => 'r 1',
192 ),
193 32 =>
194 array (
195 'message' => 'r 2',
196 ),
197 33 =>
198 array (
199 'string' => 's 34',
200 ),
201 34 =>
202 array (
203 'semicolon' => 'r 3',
204 ),
205 35 =>
206 array (
207 '#' => 'r 18',
208 ),
209 );
210 function reduce_0_file_1($tokens, &$result) {
211 #
212 # (0) file := directives messages
213 #
214 $result = reset($tokens);
215  
216 $result = array(
217 "directives" => $tokens[0],
218 "messages" => $tokens[1]
219 );
220  
221 }
222  
223 function reduce_1_directives_1($tokens, &$result) {
224 #
225 # (1) directives :=
226 #
227 $result = reset($tokens);
228  
229 $result = array();
230  
231 }
232  
233 function reduce_2_directives_2($tokens, &$result) {
234 #
235 # (2) directives := directive semicolon directives
236 #
237 $result = reset($tokens);
238  
239 $result = array_merge(array($tokens[0]), $tokens[2]);
240  
241 }
242  
243 function reduce_3_directive_1($tokens, &$result) {
244 #
245 # (3) directive := include string
246 #
247 $result = reset($tokens);
248  
249 $result = array(
250 "type" => "include",
251 "file" => $tokens[1]
252 );
253  
254 }
255  
256 function reduce_4_messages_1($tokens, &$result) {
257 #
258 # (4) messages := msgspec
259 #
260 $result = reset($tokens);
261  
262 $result = array($tokens[0]);
263  
264 }
265  
266 function reduce_5_messages_2($tokens, &$result) {
267 #
268 # (5) messages := msgspec messages
269 #
270 $result = reset($tokens);
271  
272 $result = array_merge(array($tokens[0]), $tokens[1]);
273  
274 }
275  
276 function reduce_6_msgspec_1($tokens, &$result) {
277 #
278 # (6) msgspec := message name spar entries epar semicolon
279 #
280 $result = reset($tokens);
281  
282 $result = array(
283 "name" => $tokens[1],
284 "entries" => $tokens[3]
285 );
286  
287 }
288  
289 function reduce_7_entries_1($tokens, &$result) {
290 #
291 # (7) entries := entry
292 #
293 $result = reset($tokens);
294  
295 $result = array($tokens[0]);
296  
297 }
298  
299 function reduce_8_entries_2($tokens, &$result) {
300 #
301 # (8) entries := entry entries
302 #
303 $result = reset($tokens);
304  
305 $result = array_merge(array($tokens[0]), $tokens[1]);
306  
307 }
308  
309 function reduce_9_entry_1($tokens, &$result) {
310 #
311 # (9) entry := cardinality type name equals number semicolon
312 #
313 $result = reset($tokens);
314  
315 $result = array(
316 "cardinality" => $tokens[0],
317 "type" => $tokens[1],
318 "name" => $tokens[2],
319 "id" => $tokens[4]
320 );
321  
322 }
323  
324 function reduce_10_cardinality_1($tokens, &$result) {
325 #
326 # (10) cardinality := repeated
327 #
328 $result = reset($tokens);
329  
330 $result = "repeated";
331  
332 }
333  
334 function reduce_11_cardinality_2($tokens, &$result) {
335 #
336 # (11) cardinality := optional
337 #
338 $result = reset($tokens);
339  
340 $result = "optional";
341  
342 }
343  
344 function reduce_12_cardinality_3($tokens, &$result) {
345 #
346 # (12) cardinality := required
347 #
348 $result = reset($tokens);
349  
350 $result = "required";
351  
352 }
353  
354 function reduce_13_cardinality_4($tokens, &$result) {
355 #
356 # (13) cardinality := required repeated
357 #
358 $result = reset($tokens);
359  
360 $result = "required repeated";
361  
362 }
363  
364 function reduce_14_type_1($tokens, &$result) {
365 #
366 # (14) type := uint
367 #
368 $result = reset($tokens);
369  
370 $result = array(
371 "type" => "uint",
372 "size" => $tokens[0]
373 );
374  
375 }
376  
377 function reduce_15_type_2($tokens, &$result) {
378 #
379 # (15) type := data
380 #
381 $result = reset($tokens);
382  
383 $result = array(
384 "type" => "data"
385 );
386  
387 }
388  
389 function reduce_16_type_3($tokens, &$result) {
390 #
391 # (16) type := data srpar string erpar
392 #
393 $result = reset($tokens);
394  
395 $result = array(
396 "type" => "constdata",
397 "size" => $tokens[2]
398 );
399  
400 }
401  
402 function reduce_17_type_4($tokens, &$result) {
403 #
404 # (17) type := message name
405 #
406 $result = reset($tokens);
407  
408 $result = array(
409 "type" => "message",
410 "message" => $tokens[1]
411 );
412  
413 }
414  
415 function reduce_18_start_1($tokens, &$result) {
416 #
417 # (18) 'start' := file
418 #
419 $result = reset($tokens);
420  
421 }
422  
423 var $method = array (
424  
425 1 => 'reduce_1_directives_1',
426 2 => 'reduce_2_directives_2',
427 3 => 'reduce_3_directive_1',
428 4 => 'reduce_4_messages_1',
429 5 => 'reduce_5_messages_2',
430 6 => 'reduce_6_msgspec_1',
431 7 => 'reduce_7_entries_1',
432 8 => 'reduce_8_entries_2',
433 9 => 'reduce_9_entry_1',
434 10 => 'reduce_10_cardinality_1',
435 11 => 'reduce_11_cardinality_2',
436 12 => 'reduce_12_cardinality_3',
437 13 => 'reduce_13_cardinality_4',
438 14 => 'reduce_14_type_1',
439 15 => 'reduce_15_type_2',
440 16 => 'reduce_16_type_3',
441 17 => 'reduce_17_type_4',
442 18 => 'reduce_18_start_1',
443 );
444 var $a = array (
445  
446 array (
447 'symbol' => 'file',
448 'len' => 2,
449 'replace' => true,
450 ),
451 1 =>
452 array (
453 'symbol' => 'directives',
454 'len' => 0,
455 'replace' => true,
456 ),
457 2 =>
458 array (
459 'symbol' => 'directives',
460 'len' => 3,
461 'replace' => true,
462 ),
463 3 =>
464 array (
465 'symbol' => 'directive',
466 'len' => 2,
467 'replace' => true,
468 ),
469 4 =>
470 array (
471 'symbol' => 'messages',
472 'len' => 1,
473 'replace' => true,
474 ),
475 5 =>
476 array (
477 'symbol' => 'messages',
478 'len' => 2,
479 'replace' => true,
480 ),
481 6 =>
482 array (
483 'symbol' => 'msgspec',
484 'len' => 6,
485 'replace' => true,
486 ),
487 7 =>
488 array (
489 'symbol' => 'entries',
490 'len' => 1,
491 'replace' => true,
492 ),
493 8 =>
494 array (
495 'symbol' => 'entries',
496 'len' => 2,
497 'replace' => true,
498 ),
499 9 =>
500 array (
501 'symbol' => 'entry',
502 'len' => 6,
503 'replace' => true,
504 ),
505 10 =>
506 array (
507 'symbol' => 'cardinality',
508 'len' => 1,
509 'replace' => true,
510 ),
511 11 =>
512 array (
513 'symbol' => 'cardinality',
514 'len' => 1,
515 'replace' => true,
516 ),
517 12 =>
518 array (
519 'symbol' => 'cardinality',
520 'len' => 1,
521 'replace' => true,
522 ),
523 13 =>
524 array (
525 'symbol' => 'cardinality',
526 'len' => 2,
527 'replace' => true,
528 ),
529 14 =>
530 array (
531 'symbol' => 'type',
532 'len' => 1,
533 'replace' => true,
534 ),
535 15 =>
536 array (
537 'symbol' => 'type',
538 'len' => 1,
539 'replace' => true,
540 ),
541 16 =>
542 array (
543 'symbol' => 'type',
544 'len' => 4,
545 'replace' => true,
546 ),
547 17 =>
548 array (
549 'symbol' => 'type',
550 'len' => 2,
551 'replace' => true,
552 ),
553 18 =>
554 array (
555 'symbol' => '\'start\'',
556 'len' => 1,
557 'replace' => true,
558 ),
559 );
560 }