Commit | Line | Data |
---|---|---|
4feec2f5 CY |
1 | ;;; semantic/bovine/c-by.el --- Generated parser support file |
2 | ||
3 | ;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, | |
5df4f04c | 4 | ;;; 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. |
4feec2f5 CY |
5 | |
6 | ;; This file is part of GNU Emacs. | |
7 | ||
8 | ;; GNU Emacs is free software: you can redistribute it and/or modify | |
9 | ;; it under the terms of the GNU General Public License as published by | |
10 | ;; the Free Software Foundation, either version 3 of the License, or | |
11 | ;; (at your option) any later version. | |
12 | ||
13 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
14 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | ;; GNU General Public License for more details. | |
17 | ||
18 | ;; You should have received a copy of the GNU General Public License | |
19 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | |
20 | ||
21 | ;;; Commentary: | |
22 | ;; | |
23 | ;; This file was generated from the grammar file semantic/bovine/c.by | |
24 | ;; in the CEDET repository. | |
25 | ||
26 | ;;; Code: | |
27 | ||
b90caf50 | 28 | (require 'semantic/lex) |
4feec2f5 | 29 | (eval-when-compile (require 'semantic/bovine)) |
b90caf50 | 30 | |
4feec2f5 CY |
31 | (declare-function semantic-c-reconstitute-token "semantic/bovine/c") |
32 | (declare-function semantic-c-reconstitute-template "semantic/bovine/c") | |
33 | (declare-function semantic-expand-c-tag "semantic/bovine/c") | |
34 | ||
35 | (defconst semantic-c-by--keyword-table | |
36 | (semantic-lex-make-keyword-table | |
37 | '(("extern" . EXTERN) | |
38 | ("static" . STATIC) | |
39 | ("const" . CONST) | |
40 | ("volatile" . VOLATILE) | |
41 | ("register" . REGISTER) | |
42 | ("signed" . SIGNED) | |
43 | ("unsigned" . UNSIGNED) | |
44 | ("inline" . INLINE) | |
45 | ("virtual" . VIRTUAL) | |
46 | ("mutable" . MUTABLE) | |
47 | ("struct" . STRUCT) | |
48 | ("union" . UNION) | |
49 | ("enum" . ENUM) | |
50 | ("typedef" . TYPEDEF) | |
51 | ("class" . CLASS) | |
52 | ("typename" . TYPENAME) | |
53 | ("namespace" . NAMESPACE) | |
54 | ("using" . USING) | |
55 | ("new" . NEW) | |
56 | ("delete" . DELETE) | |
57 | ("template" . TEMPLATE) | |
58 | ("throw" . THROW) | |
59 | ("reentrant" . REENTRANT) | |
60 | ("try" . TRY) | |
61 | ("catch" . CATCH) | |
62 | ("operator" . OPERATOR) | |
63 | ("public" . PUBLIC) | |
64 | ("private" . PRIVATE) | |
65 | ("protected" . PROTECTED) | |
66 | ("friend" . FRIEND) | |
67 | ("if" . IF) | |
68 | ("else" . ELSE) | |
69 | ("do" . DO) | |
70 | ("while" . WHILE) | |
71 | ("for" . FOR) | |
72 | ("switch" . SWITCH) | |
73 | ("case" . CASE) | |
74 | ("default" . DEFAULT) | |
75 | ("return" . RETURN) | |
76 | ("break" . BREAK) | |
77 | ("continue" . CONTINUE) | |
78 | ("sizeof" . SIZEOF) | |
79 | ("void" . VOID) | |
80 | ("char" . CHAR) | |
81 | ("wchar_t" . WCHAR) | |
82 | ("short" . SHORT) | |
83 | ("int" . INT) | |
84 | ("long" . LONG) | |
85 | ("float" . FLOAT) | |
86 | ("double" . DOUBLE) | |
87 | ("bool" . BOOL) | |
88 | ("_P" . UNDERP) | |
89 | ("__P" . UNDERUNDERP)) | |
90 | '(("__P" summary "Common macro to eliminate prototype compatibility on some compilers") | |
91 | ("_P" summary "Common macro to eliminate prototype compatibility on some compilers") | |
92 | ("bool" summary "Primitive boolean type") | |
93 | ("double" summary "Primitive floating-point type (double-precision 64-bit IEEE 754)") | |
94 | ("float" summary "Primitive floating-point type (single-precision 32-bit IEEE 754)") | |
95 | ("long" summary "Integral primitive type (-9223372036854775808 to 9223372036854775807)") | |
96 | ("int" summary "Integral Primitive Type: (-2147483648 to 2147483647)") | |
97 | ("short" summary "Integral Primitive Type: (-32768 to 32767)") | |
98 | ("wchar_t" summary "Wide Character Type") | |
99 | ("char" summary "Integral Character Type: (0 to 256)") | |
100 | ("void" summary "Built in typeless type: void") | |
101 | ("sizeof" summary "Compile time macro: sizeof(<type or variable>) // size in bytes") | |
102 | ("continue" summary "Non-local continue within a loop (for, do/while): continue;") | |
103 | ("break" summary "Non-local exit within a loop or switch (for, do/while, switch): break;") | |
104 | ("return" summary "return <value>;") | |
105 | ("default" summary "switch (<variable>) { case <constvalue>: code; ... default: code; }") | |
106 | ("case" summary "switch (<variable>) { case <constvalue>: code; ... default: code; }") | |
107 | ("switch" summary "switch (<variable>) { case <constvalue>: code; ... default: code; }") | |
108 | ("for" summary "for(<init>; <condition>; <increment>) { code }") | |
109 | ("while" summary "do { code } while (<condition>); or while (<condition>) { code };") | |
110 | ("do" summary " do { code } while (<condition>);") | |
111 | ("else" summary "if (<condition>) { code } [ else { code } ]") | |
112 | ("if" summary "if (<condition>) { code } [ else { code } ]") | |
113 | ("friend" summary "friend class <CLASSNAME>") | |
114 | ("catch" summary "try { <body> } catch { <catch code> }") | |
115 | ("try" summary "try { <body> } catch { <catch code> }") | |
116 | ("reentrant" summary "<type> <methoddef> (<method args>) reentrant ...") | |
117 | ("throw" summary "<type> <methoddef> (<method args>) throw (<exception>) ...") | |
118 | ("template" summary "template <class TYPE ...> TYPE_OR_FUNCTION") | |
119 | ("delete" summary "delete <object>;") | |
120 | ("new" summary "new <classname>();") | |
121 | ("using" summary "using <namespace>;") | |
122 | ("namespace" summary "Namespace Declaration: namespace <name> { ... };") | |
123 | ("typename" summary "typename is used to handle a qualified name as a typename;") | |
124 | ("class" summary "Class Declaration: class <name>[:parents] { ... };") | |
125 | ("typedef" summary "Arbitrary Type Declaration: typedef <typedeclaration> <name>;") | |
126 | ("enum" summary "Enumeration Type Declaration: enum [name] { ... };") | |
127 | ("union" summary "Union Type Declaration: union [name] { ... };") | |
128 | ("struct" summary "Structure Type Declaration: struct [name] { ... };") | |
129 | ("mutable" summary "Member Declaration Modifier: mutable <type> <name> ...") | |
130 | ("virtual" summary "Method Modifier: virtual <type> <name>(...) ...") | |
131 | ("inline" summary "Function Modifier: inline <return type> <name>(...) {...};") | |
132 | ("unsigned" summary "Numeric Type Modifier: unsigned <numeric type> <name> ...") | |
133 | ("signed" summary "Numeric Type Modifier: signed <numeric type> <name> ...") | |
134 | ("register" summary "Declaration Modifier: register <type> <name> ...") | |
135 | ("volatile" summary "Declaration Modifier: volatile <type> <name> ...") | |
136 | ("const" summary "Declaration Modifier: const <type> <name> ...") | |
137 | ("static" summary "Declaration Modifier: static <type> <name> ...") | |
138 | ("extern" summary "Declaration Modifier: extern <type> <name> ..."))) | |
139 | "Table of language keywords.") | |
140 | ||
141 | (defconst semantic-c-by--token-table | |
142 | (semantic-lex-make-type-table | |
143 | '(("semantic-list" | |
144 | (BRACKETS . "\\[\\]") | |
145 | (PARENS . "()") | |
146 | (VOID_BLCK . "^(void)$") | |
147 | (BRACE_BLCK . "^{") | |
148 | (PAREN_BLCK . "^(") | |
149 | (BRACK_BLCK . "\\[.*\\]$")) | |
150 | ("close-paren" | |
151 | (RBRACE . "}") | |
152 | (RPAREN . ")")) | |
153 | ("open-paren" | |
154 | (LBRACE . "{") | |
155 | (LPAREN . "(")) | |
156 | ("symbol" | |
157 | (RESTRICT . "\\<\\(__\\)?restrict\\>")) | |
158 | ("number" | |
159 | (ZERO . "^0$")) | |
160 | ("string" | |
161 | (CPP . "\"C\\+\\+\"") | |
162 | (C . "\"C\"")) | |
163 | ("punctuation" | |
164 | (OR . "\\`[|]\\'") | |
165 | (HAT . "\\`\\^\\'") | |
166 | (MOD . "\\`[%]\\'") | |
167 | (TILDE . "\\`[~]\\'") | |
168 | (COMA . "\\`[,]\\'") | |
169 | (GREATER . "\\`[>]\\'") | |
170 | (LESS . "\\`[<]\\'") | |
171 | (EQUAL . "\\`[=]\\'") | |
172 | (BANG . "\\`[!]\\'") | |
173 | (MINUS . "\\`[-]\\'") | |
174 | (PLUS . "\\`[+]\\'") | |
175 | (DIVIDE . "\\`[/]\\'") | |
176 | (AMPERSAND . "\\`[&]\\'") | |
177 | (STAR . "\\`[*]\\'") | |
178 | (SEMICOLON . "\\`[;]\\'") | |
179 | (COLON . "\\`[:]\\'") | |
180 | (PERIOD . "\\`[.]\\'") | |
181 | (HASH . "\\`[#]\\'"))) | |
182 | 'nil) | |
183 | "Table of lexical tokens.") | |
184 | ||
185 | (defconst semantic-c-by--parse-table | |
186 | `( | |
187 | (bovine-toplevel | |
188 | (declaration) | |
189 | ) ;; end bovine-toplevel | |
190 | ||
191 | (bovine-inner-scope | |
192 | (codeblock) | |
193 | ) ;; end bovine-inner-scope | |
194 | ||
195 | (declaration | |
196 | (macro) | |
197 | (type) | |
198 | (define) | |
199 | (var-or-fun) | |
200 | (extern-c) | |
201 | (template) | |
202 | (using) | |
203 | ) ;; end declaration | |
204 | ||
205 | (codeblock | |
206 | (define) | |
207 | (codeblock-var-or-fun) | |
208 | (type) | |
209 | (using) | |
210 | ) ;; end codeblock | |
211 | ||
212 | (extern-c-contents | |
213 | (open-paren | |
214 | ,(semantic-lambda | |
215 | (list nil)) | |
216 | ) | |
217 | (declaration) | |
218 | (close-paren | |
219 | ,(semantic-lambda | |
220 | (list nil)) | |
221 | ) | |
222 | ) ;; end extern-c-contents | |
223 | ||
224 | (extern-c | |
225 | (EXTERN | |
226 | string | |
227 | "\"C\"" | |
228 | semantic-list | |
229 | ,(semantic-lambda | |
230 | (semantic-tag | |
231 | "C" | |
232 | 'extern :members | |
233 | (semantic-parse-region | |
234 | (car | |
235 | (nth 2 vals)) | |
236 | (cdr | |
237 | (nth 2 vals)) | |
238 | 'extern-c-contents | |
239 | 1))) | |
240 | ) | |
241 | (EXTERN | |
242 | string | |
243 | "\"C\\+\\+\"" | |
244 | semantic-list | |
245 | ,(semantic-lambda | |
246 | (semantic-tag | |
247 | "C" | |
248 | 'extern :members | |
249 | (semantic-parse-region | |
250 | (car | |
251 | (nth 2 vals)) | |
252 | (cdr | |
253 | (nth 2 vals)) | |
254 | 'extern-c-contents | |
255 | 1))) | |
256 | ) | |
257 | (EXTERN | |
258 | string | |
259 | "\"C\"" | |
260 | ,(semantic-lambda | |
261 | (list nil)) | |
262 | ) | |
263 | (EXTERN | |
264 | string | |
265 | "\"C\\+\\+\"" | |
266 | ,(semantic-lambda | |
267 | (list nil)) | |
268 | ) | |
269 | ) ;; end extern-c | |
270 | ||
271 | (macro | |
272 | (spp-macro-def | |
273 | ,(semantic-lambda | |
274 | (semantic-tag-new-variable | |
275 | (nth 0 vals) nil nil :constant-flag t)) | |
276 | ) | |
277 | (spp-system-include | |
278 | ,(semantic-lambda | |
279 | (semantic-tag-new-include | |
280 | (nth 0 vals) t)) | |
281 | ) | |
282 | (spp-include | |
283 | ,(semantic-lambda | |
284 | (semantic-tag-new-include | |
285 | (nth 0 vals) nil)) | |
286 | ) | |
287 | ) ;; end macro | |
288 | ||
289 | (define | |
290 | (spp-macro-def | |
291 | ,(semantic-lambda | |
292 | (semantic-tag-new-variable | |
293 | (nth 0 vals) nil nil :constant-flag t)) | |
294 | ) | |
295 | (spp-macro-undef | |
296 | ,(semantic-lambda | |
297 | (list nil)) | |
298 | ) | |
299 | ) ;; end define | |
300 | ||
301 | (unionparts | |
302 | (semantic-list | |
303 | ,(semantic-lambda | |
304 | (semantic-parse-region | |
305 | (car | |
306 | (nth 0 vals)) | |
307 | (cdr | |
308 | (nth 0 vals)) | |
309 | 'classsubparts | |
310 | 1)) | |
311 | ) | |
312 | ) ;; end unionparts | |
313 | ||
314 | (opt-symbol | |
315 | (symbol) | |
316 | ( ;;EMPTY | |
317 | ) | |
318 | ) ;; end opt-symbol | |
319 | ||
320 | (classsubparts | |
321 | (open-paren | |
322 | "{" | |
323 | ,(semantic-lambda | |
324 | (list nil)) | |
325 | ) | |
326 | (close-paren | |
327 | "}" | |
328 | ,(semantic-lambda | |
329 | (list nil)) | |
330 | ) | |
331 | (class-protection | |
332 | opt-symbol | |
333 | punctuation | |
334 | "\\`[:]\\'" | |
335 | ,(semantic-lambda | |
336 | (semantic-tag | |
337 | (car | |
338 | (nth 0 vals)) | |
339 | 'label)) | |
340 | ) | |
341 | (var-or-fun) | |
342 | (FRIEND | |
343 | func-decl | |
344 | ,(semantic-lambda | |
345 | (semantic-tag | |
346 | (car | |
347 | (nth 1 vals)) | |
348 | 'friend)) | |
349 | ) | |
350 | (FRIEND | |
351 | CLASS | |
352 | symbol | |
353 | ,(semantic-lambda | |
354 | (semantic-tag | |
355 | (nth 2 vals) | |
356 | 'friend)) | |
357 | ) | |
358 | (type) | |
359 | (define) | |
360 | (template) | |
361 | ( ;;EMPTY | |
362 | ) | |
363 | ) ;; end classsubparts | |
364 | ||
365 | (opt-class-parents | |
366 | (punctuation | |
367 | "\\`[:]\\'" | |
368 | class-parents | |
369 | opt-template-specifier | |
370 | ,(semantic-lambda | |
371 | (list | |
372 | (nth 1 vals))) | |
373 | ) | |
374 | ( ;;EMPTY | |
375 | ,(semantic-lambda) | |
376 | ) | |
377 | ) ;; end opt-class-parents | |
378 | ||
379 | (one-class-parent | |
380 | (opt-class-protection | |
381 | opt-class-declmods | |
382 | namespace-symbol | |
383 | ,(semantic-lambda | |
384 | (semantic-tag-new-type | |
385 | (car | |
386 | (nth 2 vals)) | |
387 | "class" nil nil :protection | |
388 | (car | |
389 | (nth 0 vals)))) | |
390 | ) | |
391 | (opt-class-declmods | |
392 | opt-class-protection | |
393 | namespace-symbol | |
394 | ,(semantic-lambda | |
395 | (semantic-tag-new-type | |
396 | (car | |
397 | (nth 2 vals)) | |
398 | "class" nil nil :protection | |
399 | (car | |
400 | (nth 1 vals)))) | |
401 | ) | |
402 | ) ;; end one-class-parent | |
403 | ||
404 | (class-parents | |
405 | (one-class-parent | |
406 | punctuation | |
407 | "\\`[,]\\'" | |
408 | class-parents | |
409 | ,(semantic-lambda | |
410 | (cons | |
411 | (nth 0 vals) | |
412 | (nth 2 vals))) | |
413 | ) | |
414 | (one-class-parent | |
415 | ,(semantic-lambda | |
416 | (list | |
417 | (nth 0 vals))) | |
418 | ) | |
419 | ) ;; end class-parents | |
420 | ||
421 | (opt-class-declmods | |
422 | (class-declmods | |
423 | opt-class-declmods | |
424 | ,(semantic-lambda | |
425 | (list nil)) | |
426 | ) | |
427 | ( ;;EMPTY | |
428 | ) | |
429 | ) ;; end opt-class-declmods | |
430 | ||
431 | (class-declmods | |
432 | (VIRTUAL) | |
433 | ) ;; end class-declmods | |
434 | ||
435 | (class-protection | |
436 | (PUBLIC) | |
437 | (PRIVATE) | |
438 | (PROTECTED) | |
439 | ) ;; end class-protection | |
440 | ||
441 | (opt-class-protection | |
442 | (class-protection | |
443 | ,(semantic-lambda | |
444 | (nth 0 vals)) | |
445 | ) | |
446 | ( ;;EMPTY | |
447 | ,(semantic-lambda | |
448 | (list | |
449 | "unspecified")) | |
450 | ) | |
451 | ) ;; end opt-class-protection | |
452 | ||
453 | (namespaceparts | |
454 | (semantic-list | |
455 | ,(semantic-lambda | |
456 | (semantic-parse-region | |
457 | (car | |
458 | (nth 0 vals)) | |
459 | (cdr | |
460 | (nth 0 vals)) | |
461 | 'namespacesubparts | |
462 | 1)) | |
463 | ) | |
464 | ) ;; end namespaceparts | |
465 | ||
466 | (namespacesubparts | |
467 | (open-paren | |
468 | "{" | |
469 | ,(semantic-lambda | |
470 | (list nil)) | |
471 | ) | |
472 | (close-paren | |
473 | "}" | |
474 | ,(semantic-lambda | |
475 | (list nil)) | |
476 | ) | |
477 | (type) | |
478 | (var-or-fun) | |
479 | (define) | |
480 | (class-protection | |
481 | punctuation | |
482 | "\\`[:]\\'" | |
483 | ,(semantic-lambda | |
484 | (semantic-tag | |
485 | (car | |
486 | (nth 0 vals)) | |
487 | 'label)) | |
488 | ) | |
489 | (template) | |
490 | (using) | |
491 | ( ;;EMPTY | |
492 | ) | |
493 | ) ;; end namespacesubparts | |
494 | ||
495 | (enumparts | |
496 | (semantic-list | |
497 | ,(semantic-lambda | |
498 | (semantic-parse-region | |
499 | (car | |
500 | (nth 0 vals)) | |
501 | (cdr | |
502 | (nth 0 vals)) | |
503 | 'enumsubparts | |
504 | 1)) | |
505 | ) | |
506 | ) ;; end enumparts | |
507 | ||
508 | (enumsubparts | |
509 | (symbol | |
510 | opt-assign | |
511 | ,(semantic-lambda | |
512 | (semantic-tag-new-variable | |
513 | (nth 0 vals) | |
514 | "int" | |
515 | (car | |
516 | (nth 1 vals)) :constant-flag t)) | |
517 | ) | |
518 | (open-paren | |
519 | "{" | |
520 | ,(semantic-lambda | |
521 | (list nil)) | |
522 | ) | |
523 | (close-paren | |
524 | "}" | |
525 | ,(semantic-lambda | |
526 | (list nil)) | |
527 | ) | |
528 | (punctuation | |
529 | "\\`[,]\\'" | |
530 | ,(semantic-lambda | |
531 | (list nil)) | |
532 | ) | |
533 | ) ;; end enumsubparts | |
534 | ||
535 | (opt-name | |
536 | (symbol) | |
537 | ( ;;EMPTY | |
538 | ,(semantic-lambda | |
539 | (list | |
540 | "")) | |
541 | ) | |
542 | ) ;; end opt-name | |
543 | ||
544 | (typesimple | |
545 | (struct-or-class | |
546 | opt-class | |
547 | opt-name | |
548 | opt-template-specifier | |
549 | opt-class-parents | |
550 | semantic-list | |
551 | ,(semantic-lambda | |
552 | (semantic-tag-new-type | |
553 | (car | |
554 | (nth 2 vals)) | |
555 | (car | |
556 | (nth 0 vals)) | |
557 | (let | |
558 | ( | |
559 | (semantic-c-classname | |
560 | (cons | |
561 | (car | |
562 | (nth 2 vals)) | |
563 | (car | |
564 | (nth 0 vals))))) | |
565 | (semantic-parse-region | |
566 | (car | |
567 | (nth 5 vals)) | |
568 | (cdr | |
569 | (nth 5 vals)) | |
570 | 'classsubparts | |
571 | 1)) | |
572 | (nth 4 vals) :template-specifier | |
573 | (nth 3 vals) :parent | |
574 | (car | |
575 | (nth 1 vals)))) | |
576 | ) | |
577 | (struct-or-class | |
578 | opt-class | |
579 | opt-name | |
580 | opt-template-specifier | |
581 | opt-class-parents | |
582 | ,(semantic-lambda | |
583 | (semantic-tag-new-type | |
584 | (car | |
585 | (nth 2 vals)) | |
586 | (car | |
587 | (nth 0 vals)) nil | |
588 | (nth 4 vals) :template-specifier | |
589 | (nth 3 vals) :prototype t :parent | |
590 | (car | |
591 | (nth 1 vals)))) | |
592 | ) | |
593 | (UNION | |
594 | opt-class | |
595 | opt-name | |
596 | unionparts | |
597 | ,(semantic-lambda | |
598 | (semantic-tag-new-type | |
599 | (car | |
600 | (nth 2 vals)) | |
601 | (nth 0 vals) | |
602 | (nth 3 vals) nil :parent | |
603 | (car | |
604 | (nth 1 vals)))) | |
605 | ) | |
606 | (ENUM | |
607 | opt-class | |
608 | opt-name | |
609 | enumparts | |
610 | ,(semantic-lambda | |
611 | (semantic-tag-new-type | |
612 | (car | |
613 | (nth 2 vals)) | |
614 | (nth 0 vals) | |
615 | (nth 3 vals) nil :parent | |
616 | (car | |
617 | (nth 1 vals)))) | |
618 | ) | |
619 | (TYPEDEF | |
620 | declmods | |
621 | typeformbase | |
622 | cv-declmods | |
623 | typedef-symbol-list | |
624 | ,(semantic-lambda | |
625 | (semantic-tag-new-type | |
626 | (nth 4 vals) | |
627 | (nth 0 vals) nil | |
628 | (list | |
629 | (nth 2 vals)))) | |
630 | ) | |
631 | ) ;; end typesimple | |
632 | ||
633 | (typedef-symbol-list | |
634 | (typedefname | |
635 | punctuation | |
636 | "\\`[,]\\'" | |
637 | typedef-symbol-list | |
638 | ,(semantic-lambda | |
639 | (cons | |
640 | (nth 0 vals) | |
641 | (nth 2 vals))) | |
642 | ) | |
643 | (typedefname | |
644 | ,(semantic-lambda | |
645 | (list | |
646 | (nth 0 vals))) | |
647 | ) | |
648 | ) ;; end typedef-symbol-list | |
649 | ||
650 | (typedefname | |
651 | (opt-stars | |
652 | symbol | |
653 | opt-bits | |
654 | opt-array | |
655 | ,(semantic-lambda | |
656 | (list | |
657 | (nth 0 vals) | |
658 | (nth 1 vals))) | |
659 | ) | |
660 | ) ;; end typedefname | |
661 | ||
662 | (struct-or-class | |
663 | (STRUCT) | |
664 | (CLASS) | |
665 | ) ;; end struct-or-class | |
666 | ||
667 | (type | |
668 | (typesimple | |
669 | punctuation | |
670 | "\\`[;]\\'" | |
671 | ,(semantic-lambda | |
672 | (nth 0 vals)) | |
673 | ) | |
674 | (NAMESPACE | |
675 | symbol | |
676 | namespaceparts | |
677 | ,(semantic-lambda | |
678 | (semantic-tag-new-type | |
679 | (nth 1 vals) | |
680 | (nth 0 vals) | |
681 | (nth 2 vals) nil)) | |
682 | ) | |
683 | (NAMESPACE | |
684 | namespaceparts | |
685 | ,(semantic-lambda | |
686 | (semantic-tag-new-type | |
687 | "unnamed" | |
688 | (nth 0 vals) | |
689 | (nth 1 vals) nil)) | |
690 | ) | |
691 | (NAMESPACE | |
692 | symbol | |
693 | punctuation | |
694 | "\\`[=]\\'" | |
695 | typeformbase | |
696 | punctuation | |
697 | "\\`[;]\\'" | |
698 | ,(semantic-lambda | |
699 | (semantic-tag-new-type | |
700 | (nth 1 vals) | |
701 | (nth 0 vals) | |
702 | (list | |
703 | (semantic-tag-new-type | |
704 | (car | |
705 | (nth 3 vals)) | |
706 | (nth 0 vals) nil nil)) nil :kind | |
707 | 'alias)) | |
708 | ) | |
709 | ) ;; end type | |
710 | ||
711 | (using | |
712 | (USING | |
713 | usingname | |
714 | punctuation | |
715 | "\\`[;]\\'" | |
716 | ,(semantic-lambda | |
717 | (semantic-tag | |
718 | (car | |
719 | (nth 1 vals)) | |
720 | 'using :type | |
721 | (nth 1 vals))) | |
722 | ) | |
723 | ) ;; end using | |
724 | ||
725 | (usingname | |
726 | (typeformbase | |
727 | ,(semantic-lambda | |
728 | (semantic-tag-new-type | |
729 | (car | |
730 | (nth 0 vals)) | |
731 | "class" nil nil :prototype t)) | |
732 | ) | |
733 | (NAMESPACE | |
734 | typeformbase | |
735 | ,(semantic-lambda | |
736 | (semantic-tag-new-type | |
737 | (car | |
738 | (nth 1 vals)) | |
739 | "namespace" nil nil :prototype t)) | |
740 | ) | |
741 | ) ;; end usingname | |
742 | ||
743 | (template | |
744 | (TEMPLATE | |
745 | template-specifier | |
746 | opt-friend | |
747 | template-definition | |
748 | ,(semantic-lambda | |
749 | (semantic-c-reconstitute-template | |
750 | (nth 3 vals) | |
751 | (nth 1 vals))) | |
752 | ) | |
753 | ) ;; end template | |
754 | ||
755 | (opt-friend | |
756 | (FRIEND) | |
757 | ( ;;EMPTY | |
758 | ) | |
759 | ) ;; end opt-friend | |
760 | ||
761 | (opt-template-specifier | |
762 | (template-specifier | |
763 | ,(semantic-lambda | |
764 | (nth 0 vals)) | |
765 | ) | |
766 | ( ;;EMPTY | |
767 | ,(semantic-lambda) | |
768 | ) | |
769 | ) ;; end opt-template-specifier | |
770 | ||
771 | (template-specifier | |
772 | (punctuation | |
773 | "\\`[<]\\'" | |
774 | template-specifier-types | |
775 | punctuation | |
776 | "\\`[>]\\'" | |
777 | ,(semantic-lambda | |
778 | (nth 1 vals)) | |
779 | ) | |
780 | ) ;; end template-specifier | |
781 | ||
782 | (template-specifier-types | |
783 | (template-var | |
784 | template-specifier-type-list | |
785 | ,(semantic-lambda | |
786 | (cons | |
787 | (nth 0 vals) | |
788 | (nth 1 vals))) | |
789 | ) | |
790 | ( ;;EMPTY | |
791 | ) | |
792 | ) ;; end template-specifier-types | |
793 | ||
794 | (template-specifier-type-list | |
795 | (punctuation | |
796 | "\\`[,]\\'" | |
797 | template-specifier-types | |
798 | ,(semantic-lambda | |
799 | (nth 1 vals)) | |
800 | ) | |
801 | ( ;;EMPTY | |
802 | ,(semantic-lambda) | |
803 | ) | |
804 | ) ;; end template-specifier-type-list | |
805 | ||
806 | (template-var | |
807 | (template-type | |
808 | opt-template-equal | |
809 | ,(semantic-lambda | |
810 | (cons | |
811 | (car | |
812 | (nth 0 vals)) | |
813 | (cdr | |
814 | (nth 0 vals)))) | |
815 | ) | |
816 | (string | |
817 | ,(semantic-lambda | |
818 | (list | |
819 | (nth 0 vals))) | |
820 | ) | |
821 | (number | |
822 | ,(semantic-lambda | |
823 | (list | |
824 | (nth 0 vals))) | |
825 | ) | |
826 | (opt-stars | |
827 | opt-ref | |
828 | namespace-symbol | |
829 | ,(semantic-lambda | |
830 | (nth 2 vals)) | |
831 | ) | |
832 | (semantic-list | |
833 | ,(semantic-lambda | |
834 | (list | |
835 | (nth 0 vals))) | |
836 | ) | |
837 | (SIZEOF | |
838 | semantic-list | |
839 | ,(semantic-lambda | |
840 | (list | |
841 | (nth 1 vals))) | |
842 | ) | |
843 | ) ;; end template-var | |
844 | ||
845 | (opt-template-equal | |
846 | (punctuation | |
847 | "\\`[=]\\'" | |
848 | symbol | |
849 | punctuation | |
850 | "\\`[<]\\'" | |
851 | template-specifier-types | |
852 | punctuation | |
853 | "\\`[>]\\'" | |
854 | ,(semantic-lambda | |
855 | (list | |
856 | (nth 1 vals))) | |
857 | ) | |
858 | (punctuation | |
859 | "\\`[=]\\'" | |
860 | symbol | |
861 | ,(semantic-lambda | |
862 | (list | |
863 | (nth 1 vals))) | |
864 | ) | |
865 | ( ;;EMPTY | |
866 | ,(semantic-lambda) | |
867 | ) | |
868 | ) ;; end opt-template-equal | |
869 | ||
870 | (template-type | |
871 | (CLASS | |
872 | symbol | |
873 | ,(semantic-lambda | |
874 | (semantic-tag-new-type | |
875 | (nth 1 vals) | |
876 | "class" nil nil)) | |
877 | ) | |
878 | (STRUCT | |
879 | symbol | |
880 | ,(semantic-lambda | |
881 | (semantic-tag-new-type | |
882 | (nth 1 vals) | |
883 | "struct" nil nil)) | |
884 | ) | |
885 | (TYPENAME | |
886 | symbol | |
887 | ,(semantic-lambda | |
888 | (semantic-tag-new-type | |
889 | (nth 1 vals) | |
890 | "class" nil nil)) | |
891 | ) | |
892 | (declmods | |
893 | typeformbase | |
894 | cv-declmods | |
895 | opt-stars | |
896 | opt-ref | |
897 | variablearg-opt-name | |
898 | ,(semantic-lambda | |
899 | (semantic-tag-new-type | |
900 | (car | |
901 | (nth 1 vals)) nil nil nil :constant-flag | |
902 | (if | |
903 | (member | |
904 | "const" | |
905 | (append | |
906 | (nth 0 vals) | |
907 | (nth 2 vals))) t nil) :typemodifiers | |
908 | (delete | |
909 | "const" | |
910 | (append | |
911 | (nth 0 vals) | |
912 | (nth 2 vals))) :reference | |
913 | (car | |
914 | (nth 4 vals)) :pointer | |
915 | (car | |
916 | (nth 3 vals)))) | |
917 | ) | |
918 | ) ;; end template-type | |
919 | ||
920 | (template-definition | |
921 | (type | |
922 | ,(semantic-lambda | |
923 | (nth 0 vals)) | |
924 | ) | |
925 | (var-or-fun | |
926 | ,(semantic-lambda | |
927 | (nth 0 vals)) | |
928 | ) | |
929 | ) ;; end template-definition | |
930 | ||
931 | (opt-stars | |
932 | (punctuation | |
933 | "\\`[*]\\'" | |
934 | opt-starmod | |
935 | opt-stars | |
936 | ,(semantic-lambda | |
937 | (list | |
938 | (1+ | |
939 | (car | |
940 | (nth 2 vals))))) | |
941 | ) | |
942 | ( ;;EMPTY | |
943 | ,(semantic-lambda | |
944 | (list | |
945 | 0)) | |
946 | ) | |
947 | ) ;; end opt-stars | |
948 | ||
949 | (opt-starmod | |
950 | (STARMOD | |
951 | opt-starmod | |
952 | ,(semantic-lambda | |
953 | (cons | |
954 | (car | |
955 | (nth 0 vals)) | |
956 | (nth 1 vals))) | |
957 | ) | |
958 | ( ;;EMPTY | |
959 | ,(semantic-lambda) | |
960 | ) | |
961 | ) ;; end opt-starmod | |
962 | ||
963 | (STARMOD | |
964 | (CONST) | |
965 | ) ;; end STARMOD | |
966 | ||
967 | (declmods | |
968 | (DECLMOD | |
969 | declmods | |
970 | ,(semantic-lambda | |
971 | (cons | |
972 | (car | |
973 | (nth 0 vals)) | |
974 | (nth 1 vals))) | |
975 | ) | |
976 | (DECLMOD | |
977 | ,(semantic-lambda | |
978 | (nth 0 vals)) | |
979 | ) | |
980 | ( ;;EMPTY | |
981 | ,(semantic-lambda) | |
982 | ) | |
983 | ) ;; end declmods | |
984 | ||
985 | (DECLMOD | |
986 | (EXTERN) | |
987 | (STATIC) | |
988 | (CVDECLMOD) | |
989 | (INLINE) | |
990 | (REGISTER) | |
991 | (FRIEND) | |
992 | (TYPENAME) | |
993 | (METADECLMOD) | |
994 | (VIRTUAL) | |
995 | ) ;; end DECLMOD | |
996 | ||
997 | (metadeclmod | |
998 | (METADECLMOD | |
999 | ,(semantic-lambda) | |
1000 | ) | |
1001 | ( ;;EMPTY | |
1002 | ,(semantic-lambda) | |
1003 | ) | |
1004 | ) ;; end metadeclmod | |
1005 | ||
1006 | (CVDECLMOD | |
1007 | (CONST) | |
1008 | (VOLATILE) | |
1009 | ) ;; end CVDECLMOD | |
1010 | ||
1011 | (cv-declmods | |
1012 | (CVDECLMOD | |
1013 | cv-declmods | |
1014 | ,(semantic-lambda | |
1015 | (cons | |
1016 | (car | |
1017 | (nth 0 vals)) | |
1018 | (nth 1 vals))) | |
1019 | ) | |
1020 | (CVDECLMOD | |
1021 | ,(semantic-lambda | |
1022 | (nth 0 vals)) | |
1023 | ) | |
1024 | ( ;;EMPTY | |
1025 | ,(semantic-lambda) | |
1026 | ) | |
1027 | ) ;; end cv-declmods | |
1028 | ||
1029 | (METADECLMOD | |
1030 | (VIRTUAL) | |
1031 | (MUTABLE) | |
1032 | ) ;; end METADECLMOD | |
1033 | ||
1034 | (opt-ref | |
1035 | (punctuation | |
1036 | "\\`[&]\\'" | |
1037 | ,(semantic-lambda | |
1038 | (list | |
1039 | 1)) | |
1040 | ) | |
1041 | ( ;;EMPTY | |
1042 | ,(semantic-lambda | |
1043 | (list | |
1044 | 0)) | |
1045 | ) | |
1046 | ) ;; end opt-ref | |
1047 | ||
1048 | (typeformbase | |
1049 | (typesimple | |
1050 | ,(semantic-lambda | |
1051 | (nth 0 vals)) | |
1052 | ) | |
1053 | (STRUCT | |
1054 | symbol | |
1055 | ,(semantic-lambda | |
1056 | (semantic-tag-new-type | |
1057 | (nth 1 vals) | |
1058 | (nth 0 vals) nil nil)) | |
1059 | ) | |
1060 | (UNION | |
1061 | symbol | |
1062 | ,(semantic-lambda | |
1063 | (semantic-tag-new-type | |
1064 | (nth 1 vals) | |
1065 | (nth 0 vals) nil nil)) | |
1066 | ) | |
1067 | (ENUM | |
1068 | symbol | |
1069 | ,(semantic-lambda | |
1070 | (semantic-tag-new-type | |
1071 | (nth 1 vals) | |
1072 | (nth 0 vals) nil nil)) | |
1073 | ) | |
1074 | (builtintype | |
1075 | ,(semantic-lambda | |
1076 | (nth 0 vals)) | |
1077 | ) | |
1078 | (symbol | |
1079 | template-specifier | |
1080 | ,(semantic-lambda | |
1081 | (semantic-tag-new-type | |
1082 | (nth 0 vals) | |
1083 | "class" nil nil :template-specifier | |
1084 | (nth 1 vals))) | |
1085 | ) | |
1086 | (namespace-symbol-for-typeformbase | |
1087 | opt-template-specifier | |
1088 | ,(semantic-lambda | |
1089 | (semantic-tag-new-type | |
1090 | (car | |
1091 | (nth 0 vals)) | |
1092 | "class" nil nil :template-specifier | |
1093 | (nth 1 vals))) | |
1094 | ) | |
1095 | (symbol | |
1096 | ,(semantic-lambda | |
1097 | (list | |
1098 | (nth 0 vals))) | |
1099 | ) | |
1100 | ) ;; end typeformbase | |
1101 | ||
1102 | (signedmod | |
1103 | (UNSIGNED) | |
1104 | (SIGNED) | |
1105 | ) ;; end signedmod | |
1106 | ||
1107 | (builtintype-types | |
1108 | (VOID) | |
1109 | (CHAR) | |
1110 | (WCHAR) | |
1111 | (SHORT | |
1112 | INT | |
1113 | ,(semantic-lambda | |
1114 | (list | |
1115 | (concat | |
1116 | (nth 0 vals) | |
1117 | " " | |
1118 | (nth 1 vals)))) | |
1119 | ) | |
1120 | (SHORT) | |
1121 | (INT) | |
1122 | (LONG | |
1123 | INT | |
1124 | ,(semantic-lambda | |
1125 | (list | |
1126 | (concat | |
1127 | (nth 0 vals) | |
1128 | " " | |
1129 | (nth 1 vals)))) | |
1130 | ) | |
1131 | (FLOAT) | |
1132 | (DOUBLE) | |
1133 | (BOOL) | |
1134 | (LONG | |
1135 | DOUBLE | |
1136 | ,(semantic-lambda | |
1137 | (list | |
1138 | (concat | |
1139 | (nth 0 vals) | |
1140 | " " | |
1141 | (nth 1 vals)))) | |
1142 | ) | |
1143 | (LONG | |
1144 | LONG | |
1145 | ,(semantic-lambda | |
1146 | (list | |
1147 | (concat | |
1148 | (nth 0 vals) | |
1149 | " " | |
1150 | (nth 1 vals)))) | |
1151 | ) | |
1152 | (LONG) | |
1153 | ) ;; end builtintype-types | |
1154 | ||
1155 | (builtintype | |
1156 | (signedmod | |
1157 | builtintype-types | |
1158 | ,(semantic-lambda | |
1159 | (list | |
1160 | (concat | |
1161 | (car | |
1162 | (nth 0 vals)) | |
1163 | " " | |
1164 | (car | |
1165 | (nth 1 vals))))) | |
1166 | ) | |
1167 | (builtintype-types | |
1168 | ,(semantic-lambda | |
1169 | (nth 0 vals)) | |
1170 | ) | |
1171 | (signedmod | |
1172 | ,(semantic-lambda | |
1173 | (list | |
1174 | (concat | |
1175 | (car | |
1176 | (nth 0 vals)) | |
1177 | " int"))) | |
1178 | ) | |
1179 | ) ;; end builtintype | |
1180 | ||
1181 | (codeblock-var-or-fun | |
1182 | (declmods | |
1183 | typeformbase | |
1184 | declmods | |
1185 | opt-ref | |
1186 | var-or-func-decl | |
1187 | ,(semantic-lambda | |
1188 | (semantic-c-reconstitute-token | |
1189 | (nth 4 vals) | |
1190 | (nth 0 vals) | |
1191 | (nth 1 vals))) | |
1192 | ) | |
1193 | ) ;; end codeblock-var-or-fun | |
1194 | ||
1195 | (var-or-fun | |
1196 | (codeblock-var-or-fun | |
1197 | ,(semantic-lambda | |
1198 | (nth 0 vals)) | |
1199 | ) | |
1200 | (declmods | |
1201 | var-or-func-decl | |
1202 | ,(semantic-lambda | |
1203 | (semantic-c-reconstitute-token | |
1204 | (nth 1 vals) | |
1205 | (nth 0 vals) nil)) | |
1206 | ) | |
1207 | ) ;; end var-or-fun | |
1208 | ||
1209 | (var-or-func-decl | |
1210 | (func-decl | |
1211 | ,(semantic-lambda | |
1212 | (nth 0 vals)) | |
1213 | ) | |
1214 | (var-decl | |
1215 | ,(semantic-lambda | |
1216 | (nth 0 vals)) | |
1217 | ) | |
1218 | ) ;; end var-or-func-decl | |
1219 | ||
1220 | (func-decl | |
1221 | (opt-stars | |
1222 | opt-class | |
1223 | opt-destructor | |
1224 | functionname | |
1225 | opt-template-specifier | |
1226 | opt-under-p | |
1227 | arg-list | |
1228 | opt-post-fcn-modifiers | |
1229 | opt-throw | |
1230 | opt-initializers | |
1231 | fun-or-proto-end | |
1232 | ,(semantic-lambda | |
1233 | (nth 3 vals) | |
1234 | (list | |
1235 | 'function | |
1236 | (nth 1 vals) | |
1237 | (nth 2 vals) | |
1238 | (nth 6 vals) | |
1239 | (nth 8 vals) | |
1240 | (nth 7 vals)) | |
1241 | (nth 0 vals) | |
1242 | (nth 10 vals) | |
ac73b1fa CY |
1243 | (list |
1244 | (nth 4 vals)) | |
1245 | (nth 9 vals)) | |
4feec2f5 CY |
1246 | ) |
1247 | (opt-stars | |
1248 | opt-class | |
1249 | opt-destructor | |
1250 | functionname | |
1251 | opt-template-specifier | |
1252 | opt-under-p | |
1253 | opt-post-fcn-modifiers | |
1254 | opt-throw | |
1255 | opt-initializers | |
1256 | fun-try-end | |
1257 | ,(semantic-lambda | |
1258 | (nth 3 vals) | |
1259 | (list | |
1260 | 'function | |
1261 | (nth 1 vals) | |
1262 | (nth 2 vals) nil | |
1263 | (nth 7 vals) | |
1264 | (nth 6 vals)) | |
1265 | (nth 0 vals) | |
1266 | (nth 9 vals) | |
ac73b1fa CY |
1267 | (list |
1268 | (nth 4 vals)) | |
1269 | (nth 8 vals)) | |
4feec2f5 CY |
1270 | ) |
1271 | ) ;; end func-decl | |
1272 | ||
1273 | (var-decl | |
1274 | (varnamelist | |
1275 | punctuation | |
1276 | "\\`[;]\\'" | |
1277 | ,(semantic-lambda | |
1278 | (list | |
1279 | (nth 0 vals) | |
1280 | 'variable)) | |
1281 | ) | |
1282 | ) ;; end var-decl | |
1283 | ||
1284 | (opt-under-p | |
1285 | (UNDERP | |
1286 | ,(semantic-lambda | |
1287 | (list nil)) | |
1288 | ) | |
1289 | (UNDERUNDERP | |
1290 | ,(semantic-lambda | |
1291 | (list nil)) | |
1292 | ) | |
1293 | ( ;;EMPTY | |
1294 | ) | |
1295 | ) ;; end opt-under-p | |
1296 | ||
1297 | (opt-initializers | |
1298 | (punctuation | |
1299 | "\\`[:]\\'" | |
1300 | namespace-symbol | |
1301 | semantic-list | |
1302 | opt-initializers) | |
1303 | (punctuation | |
1304 | "\\`[,]\\'" | |
1305 | namespace-symbol | |
1306 | semantic-list | |
1307 | opt-initializers) | |
1308 | ( ;;EMPTY | |
1309 | ) | |
1310 | ) ;; end opt-initializers | |
1311 | ||
1312 | (opt-post-fcn-modifiers | |
1313 | (post-fcn-modifiers | |
1314 | opt-post-fcn-modifiers | |
1315 | ,(semantic-lambda | |
1316 | (cons | |
1317 | (nth 0 vals) | |
1318 | (nth 1 vals))) | |
1319 | ) | |
1320 | ( ;;EMPTY | |
1321 | ,(semantic-lambda | |
1322 | (list nil)) | |
1323 | ) | |
1324 | ) ;; end opt-post-fcn-modifiers | |
1325 | ||
1326 | (post-fcn-modifiers | |
1327 | (REENTRANT) | |
1328 | (CONST) | |
1329 | ) ;; end post-fcn-modifiers | |
1330 | ||
1331 | (opt-throw | |
1332 | (THROW | |
1333 | semantic-list | |
1334 | ,(lambda (vals start end) | |
1335 | (semantic-bovinate-from-nonterminal | |
1336 | (car | |
1337 | (nth 1 vals)) | |
1338 | (cdr | |
1339 | (nth 1 vals)) | |
1340 | 'throw-exception-list)) | |
1341 | ) | |
1342 | ( ;;EMPTY | |
1343 | ) | |
1344 | ) ;; end opt-throw | |
1345 | ||
1346 | (throw-exception-list | |
1347 | (namespace-symbol | |
1348 | punctuation | |
1349 | "\\`[,]\\'" | |
1350 | throw-exception-list | |
1351 | ,(semantic-lambda | |
1352 | (cons | |
1353 | (car | |
1354 | (nth 0 vals)) | |
1355 | (nth 2 vals))) | |
1356 | ) | |
1357 | (namespace-symbol | |
1358 | close-paren | |
1359 | ")" | |
1360 | ,(semantic-lambda | |
1361 | (nth 0 vals)) | |
1362 | ) | |
1363 | (symbol | |
1364 | close-paren | |
1365 | ")" | |
1366 | ,(semantic-lambda | |
1367 | (list | |
1368 | (nth 0 vals))) | |
1369 | ) | |
1370 | (open-paren | |
1371 | "(" | |
1372 | throw-exception-list | |
1373 | ,(semantic-lambda | |
1374 | (nth 1 vals)) | |
1375 | ) | |
1376 | (close-paren | |
1377 | ")" | |
1378 | ,(semantic-lambda) | |
1379 | ) | |
1380 | ) ;; end throw-exception-list | |
1381 | ||
1382 | (opt-bits | |
1383 | (punctuation | |
1384 | "\\`[:]\\'" | |
1385 | number | |
1386 | ,(semantic-lambda | |
1387 | (list | |
1388 | (nth 1 vals))) | |
1389 | ) | |
1390 | ( ;;EMPTY | |
1391 | ,(semantic-lambda | |
1392 | (list nil)) | |
1393 | ) | |
1394 | ) ;; end opt-bits | |
1395 | ||
1396 | (opt-array | |
1397 | (semantic-list | |
1398 | "\\[.*\\]$" | |
1399 | opt-array | |
1400 | ,(semantic-lambda | |
1401 | (list | |
1402 | (cons | |
1403 | 1 | |
1404 | (car | |
1405 | (nth 1 vals))))) | |
1406 | ) | |
1407 | ( ;;EMPTY | |
1408 | ,(semantic-lambda | |
1409 | (list nil)) | |
1410 | ) | |
1411 | ) ;; end opt-array | |
1412 | ||
1413 | (opt-assign | |
1414 | (punctuation | |
1415 | "\\`[=]\\'" | |
1416 | expression | |
1417 | ,(semantic-lambda | |
1418 | (list | |
1419 | (nth 1 vals))) | |
1420 | ) | |
1421 | ( ;;EMPTY | |
1422 | ,(semantic-lambda | |
1423 | (list nil)) | |
1424 | ) | |
1425 | ) ;; end opt-assign | |
1426 | ||
1427 | (opt-restrict | |
1428 | (symbol | |
1429 | "\\<\\(__\\)?restrict\\>") | |
1430 | ( ;;EMPTY | |
1431 | ) | |
1432 | ) ;; end opt-restrict | |
1433 | ||
1434 | (varname | |
1435 | (opt-stars | |
1436 | opt-restrict | |
1437 | namespace-symbol | |
1438 | opt-bits | |
1439 | opt-array | |
4feec2f5 CY |
1440 | ,(semantic-lambda |
1441 | (nth 2 vals) | |
1442 | (nth 0 vals) | |
1443 | (nth 3 vals) | |
ac73b1fa | 1444 | (nth 4 vals)) |
4feec2f5 CY |
1445 | ) |
1446 | ) ;; end varname | |
1447 | ||
1448 | (variablearg | |
1449 | (declmods | |
1450 | typeformbase | |
1451 | cv-declmods | |
1452 | opt-ref | |
1453 | variablearg-opt-name | |
1454 | ,(semantic-lambda | |
1455 | (semantic-tag-new-variable | |
1456 | (list | |
1457 | (nth 4 vals)) | |
1458 | (nth 1 vals) nil :constant-flag | |
1459 | (if | |
1460 | (member | |
1461 | "const" | |
1462 | (append | |
1463 | (nth 0 vals) | |
1464 | (nth 2 vals))) t nil) :typemodifiers | |
1465 | (delete | |
1466 | "const" | |
1467 | (append | |
1468 | (nth 0 vals) | |
1469 | (nth 2 vals))) :reference | |
1470 | (car | |
1471 | (nth 3 vals)))) | |
1472 | ) | |
1473 | ) ;; end variablearg | |
1474 | ||
1475 | (variablearg-opt-name | |
1476 | (varname | |
1477 | ,(semantic-lambda | |
1478 | (nth 0 vals)) | |
1479 | ) | |
1480 | (opt-stars | |
1481 | ,(semantic-lambda | |
1482 | (list | |
1483 | "") | |
1484 | (nth 0 vals) | |
1485 | (list nil nil nil)) | |
1486 | ) | |
1487 | ) ;; end variablearg-opt-name | |
1488 | ||
ac73b1fa CY |
1489 | (varname-opt-initializer |
1490 | (semantic-list) | |
1491 | (opt-assign) | |
1492 | ( ;;EMPTY | |
1493 | ) | |
1494 | ) ;; end varname-opt-initializer | |
1495 | ||
4feec2f5 CY |
1496 | (varnamelist |
1497 | (opt-ref | |
1498 | varname | |
ac73b1fa | 1499 | varname-opt-initializer |
4feec2f5 CY |
1500 | punctuation |
1501 | "\\`[,]\\'" | |
1502 | varnamelist | |
1503 | ,(semantic-lambda | |
1504 | (cons | |
1505 | (nth 1 vals) | |
ac73b1fa | 1506 | (nth 4 vals))) |
4feec2f5 CY |
1507 | ) |
1508 | (opt-ref | |
1509 | varname | |
ac73b1fa | 1510 | varname-opt-initializer |
4feec2f5 CY |
1511 | ,(semantic-lambda |
1512 | (list | |
1513 | (nth 1 vals))) | |
1514 | ) | |
1515 | ) ;; end varnamelist | |
1516 | ||
1517 | (namespace-symbol | |
1518 | (symbol | |
1519 | opt-template-specifier | |
1520 | punctuation | |
1521 | "\\`[:]\\'" | |
1522 | punctuation | |
1523 | "\\`[:]\\'" | |
1524 | namespace-symbol | |
1525 | ,(semantic-lambda | |
1526 | (list | |
1527 | (concat | |
1528 | (nth 0 vals) | |
1529 | "::" | |
1530 | (car | |
1531 | (nth 4 vals))))) | |
1532 | ) | |
1533 | (symbol | |
1534 | opt-template-specifier | |
1535 | ,(semantic-lambda | |
1536 | (list | |
1537 | (nth 0 vals))) | |
1538 | ) | |
1539 | ) ;; end namespace-symbol | |
1540 | ||
1541 | (namespace-symbol-for-typeformbase | |
1542 | (symbol | |
1543 | opt-template-specifier | |
1544 | punctuation | |
1545 | "\\`[:]\\'" | |
1546 | punctuation | |
1547 | "\\`[:]\\'" | |
1548 | namespace-symbol-for-typeformbase | |
1549 | ,(semantic-lambda | |
1550 | (list | |
1551 | (concat | |
1552 | (nth 0 vals) | |
1553 | "::" | |
1554 | (car | |
1555 | (nth 4 vals))))) | |
1556 | ) | |
1557 | (symbol | |
1558 | ,(semantic-lambda | |
1559 | (list | |
1560 | (nth 0 vals))) | |
1561 | ) | |
1562 | ) ;; end namespace-symbol-for-typeformbase | |
1563 | ||
1564 | (namespace-opt-class | |
1565 | (symbol | |
1566 | punctuation | |
1567 | "\\`[:]\\'" | |
1568 | punctuation | |
1569 | "\\`[:]\\'" | |
1570 | namespace-opt-class | |
1571 | ,(semantic-lambda | |
1572 | (list | |
1573 | (concat | |
1574 | (nth 0 vals) | |
1575 | "::" | |
1576 | (car | |
1577 | (nth 3 vals))))) | |
1578 | ) | |
1579 | (symbol | |
1580 | opt-template-specifier | |
1581 | punctuation | |
1582 | "\\`[:]\\'" | |
1583 | punctuation | |
1584 | "\\`[:]\\'" | |
1585 | ,(semantic-lambda | |
1586 | (list | |
1587 | (nth 0 vals))) | |
1588 | ) | |
1589 | ) ;; end namespace-opt-class | |
1590 | ||
1591 | (opt-class | |
1592 | (namespace-opt-class | |
1593 | ,(semantic-lambda | |
1594 | (nth 0 vals)) | |
1595 | ) | |
1596 | ( ;;EMPTY | |
1597 | ,(semantic-lambda | |
1598 | (list nil)) | |
1599 | ) | |
1600 | ) ;; end opt-class | |
1601 | ||
1602 | (opt-destructor | |
1603 | (punctuation | |
1604 | "\\`[~]\\'" | |
1605 | ,(semantic-lambda | |
1606 | (list t)) | |
1607 | ) | |
1608 | ( ;;EMPTY | |
1609 | ,(semantic-lambda | |
1610 | (list nil)) | |
1611 | ) | |
1612 | ) ;; end opt-destructor | |
1613 | ||
1614 | (arg-list | |
1615 | (semantic-list | |
1616 | "^(" | |
1617 | knr-arguments | |
1618 | ,(semantic-lambda | |
1619 | (nth 1 vals)) | |
1620 | ) | |
1621 | (semantic-list | |
1622 | "^(" | |
1623 | ,(semantic-lambda | |
1624 | (semantic-parse-region | |
1625 | (car | |
1626 | (nth 0 vals)) | |
1627 | (cdr | |
1628 | (nth 0 vals)) | |
1629 | 'arg-sub-list | |
1630 | 1)) | |
1631 | ) | |
1632 | (semantic-list | |
1633 | "^(void)$" | |
1634 | ,(semantic-lambda) | |
1635 | ) | |
1636 | ) ;; end arg-list | |
1637 | ||
1638 | (knr-varnamelist | |
1639 | (varname | |
1640 | punctuation | |
1641 | "\\`[,]\\'" | |
1642 | knr-varnamelist | |
1643 | ,(semantic-lambda | |
1644 | (cons | |
1645 | (nth 0 vals) | |
1646 | (nth 2 vals))) | |
1647 | ) | |
1648 | (varname | |
1649 | ,(semantic-lambda | |
1650 | (list | |
1651 | (nth 0 vals))) | |
1652 | ) | |
1653 | ) ;; end knr-varnamelist | |
1654 | ||
1655 | (knr-one-variable-decl | |
1656 | (declmods | |
1657 | typeformbase | |
1658 | cv-declmods | |
1659 | knr-varnamelist | |
1660 | ,(semantic-lambda | |
1661 | (semantic-tag-new-variable | |
1662 | (nreverse | |
1663 | (nth 3 vals)) | |
1664 | (nth 1 vals) nil :constant-flag | |
1665 | (if | |
1666 | (member | |
1667 | "const" | |
1668 | (append | |
1669 | (nth 2 vals))) t nil) :typemodifiers | |
1670 | (delete | |
1671 | "const" | |
1672 | (nth 2 vals)))) | |
1673 | ) | |
1674 | ) ;; end knr-one-variable-decl | |
1675 | ||
1676 | (knr-arguments | |
1677 | (knr-one-variable-decl | |
1678 | punctuation | |
1679 | "\\`[;]\\'" | |
1680 | knr-arguments | |
1681 | ,(semantic-lambda | |
1682 | (append | |
1683 | (semantic-expand-c-tag | |
1684 | (nth 0 vals)) | |
1685 | (nth 2 vals))) | |
1686 | ) | |
1687 | (knr-one-variable-decl | |
1688 | punctuation | |
1689 | "\\`[;]\\'" | |
1690 | ,(semantic-lambda | |
1691 | (semantic-expand-c-tag | |
1692 | (nth 0 vals))) | |
1693 | ) | |
1694 | ) ;; end knr-arguments | |
1695 | ||
1696 | (arg-sub-list | |
1697 | (variablearg | |
1698 | ,(semantic-lambda | |
1699 | (nth 0 vals)) | |
1700 | ) | |
1701 | (punctuation | |
1702 | "\\`[.]\\'" | |
1703 | punctuation | |
1704 | "\\`[.]\\'" | |
1705 | punctuation | |
1706 | "\\`[.]\\'" | |
1707 | close-paren | |
1708 | ")" | |
1709 | ,(semantic-lambda | |
1710 | (semantic-tag-new-variable | |
1711 | "..." | |
1712 | "vararg" nil)) | |
1713 | ) | |
1714 | (punctuation | |
1715 | "\\`[,]\\'" | |
1716 | ,(semantic-lambda | |
1717 | (list nil)) | |
1718 | ) | |
1719 | (open-paren | |
1720 | "(" | |
1721 | ,(semantic-lambda | |
1722 | (list nil)) | |
1723 | ) | |
1724 | (close-paren | |
1725 | ")" | |
1726 | ,(semantic-lambda | |
1727 | (list nil)) | |
1728 | ) | |
1729 | ) ;; end arg-sub-list | |
1730 | ||
1731 | (operatorsym | |
1732 | (punctuation | |
1733 | "\\`[<]\\'" | |
1734 | punctuation | |
1735 | "\\`[<]\\'" | |
1736 | punctuation | |
1737 | "\\`[=]\\'" | |
1738 | ,(semantic-lambda | |
1739 | (list | |
1740 | "<<=")) | |
1741 | ) | |
1742 | (punctuation | |
1743 | "\\`[>]\\'" | |
1744 | punctuation | |
1745 | "\\`[>]\\'" | |
1746 | punctuation | |
1747 | "\\`[=]\\'" | |
1748 | ,(semantic-lambda | |
1749 | (list | |
1750 | ">>=")) | |
1751 | ) | |
1752 | (punctuation | |
1753 | "\\`[<]\\'" | |
1754 | punctuation | |
1755 | "\\`[<]\\'" | |
1756 | ,(semantic-lambda | |
1757 | (list | |
1758 | "<<")) | |
1759 | ) | |
1760 | (punctuation | |
1761 | "\\`[>]\\'" | |
1762 | punctuation | |
1763 | "\\`[>]\\'" | |
1764 | ,(semantic-lambda | |
1765 | (list | |
1766 | ">>")) | |
1767 | ) | |
1768 | (punctuation | |
1769 | "\\`[=]\\'" | |
1770 | punctuation | |
1771 | "\\`[=]\\'" | |
1772 | ,(semantic-lambda | |
1773 | (list | |
1774 | "==")) | |
1775 | ) | |
1776 | (punctuation | |
1777 | "\\`[<]\\'" | |
1778 | punctuation | |
1779 | "\\`[=]\\'" | |
1780 | ,(semantic-lambda | |
1781 | (list | |
1782 | "<=")) | |
1783 | ) | |
1784 | (punctuation | |
1785 | "\\`[>]\\'" | |
1786 | punctuation | |
1787 | "\\`[=]\\'" | |
1788 | ,(semantic-lambda | |
1789 | (list | |
1790 | ">=")) | |
1791 | ) | |
1792 | (punctuation | |
1793 | "\\`[!]\\'" | |
1794 | punctuation | |
1795 | "\\`[=]\\'" | |
1796 | ,(semantic-lambda | |
1797 | (list | |
1798 | "!=")) | |
1799 | ) | |
1800 | (punctuation | |
1801 | "\\`[+]\\'" | |
1802 | punctuation | |
1803 | "\\`[=]\\'" | |
1804 | ,(semantic-lambda | |
1805 | (list | |
1806 | "+=")) | |
1807 | ) | |
1808 | (punctuation | |
1809 | "\\`[-]\\'" | |
1810 | punctuation | |
1811 | "\\`[=]\\'" | |
1812 | ,(semantic-lambda | |
1813 | (list | |
1814 | "-=")) | |
1815 | ) | |
1816 | (punctuation | |
1817 | "\\`[*]\\'" | |
1818 | punctuation | |
1819 | "\\`[=]\\'" | |
1820 | ,(semantic-lambda | |
1821 | (list | |
1822 | "*=")) | |
1823 | ) | |
1824 | (punctuation | |
1825 | "\\`[/]\\'" | |
1826 | punctuation | |
1827 | "\\`[=]\\'" | |
1828 | ,(semantic-lambda | |
1829 | (list | |
1830 | "/=")) | |
1831 | ) | |
1832 | (punctuation | |
1833 | "\\`[%]\\'" | |
1834 | punctuation | |
1835 | "\\`[=]\\'" | |
1836 | ,(semantic-lambda | |
1837 | (list | |
1838 | "%=")) | |
1839 | ) | |
1840 | (punctuation | |
1841 | "\\`[&]\\'" | |
1842 | punctuation | |
1843 | "\\`[=]\\'" | |
1844 | ,(semantic-lambda | |
1845 | (list | |
1846 | "&=")) | |
1847 | ) | |
1848 | (punctuation | |
1849 | "\\`[|]\\'" | |
1850 | punctuation | |
1851 | "\\`[=]\\'" | |
1852 | ,(semantic-lambda | |
1853 | (list | |
1854 | "|=")) | |
1855 | ) | |
1856 | (punctuation | |
1857 | "\\`[-]\\'" | |
1858 | punctuation | |
1859 | "\\`[>]\\'" | |
1860 | punctuation | |
1861 | "\\`[*]\\'" | |
1862 | ,(semantic-lambda | |
1863 | (list | |
1864 | "->*")) | |
1865 | ) | |
1866 | (punctuation | |
1867 | "\\`[-]\\'" | |
1868 | punctuation | |
1869 | "\\`[>]\\'" | |
1870 | ,(semantic-lambda | |
1871 | (list | |
1872 | "->")) | |
1873 | ) | |
1874 | (semantic-list | |
1875 | "()" | |
1876 | ,(semantic-lambda | |
1877 | (list | |
1878 | "()")) | |
1879 | ) | |
1880 | (semantic-list | |
1881 | "\\[\\]" | |
1882 | ,(semantic-lambda | |
1883 | (list | |
1884 | "[]")) | |
1885 | ) | |
1886 | (punctuation | |
1887 | "\\`[<]\\'") | |
1888 | (punctuation | |
1889 | "\\`[>]\\'") | |
1890 | (punctuation | |
1891 | "\\`[*]\\'") | |
1892 | (punctuation | |
1893 | "\\`[+]\\'" | |
1894 | punctuation | |
1895 | "\\`[+]\\'" | |
1896 | ,(semantic-lambda | |
1897 | (list | |
1898 | "++")) | |
1899 | ) | |
1900 | (punctuation | |
1901 | "\\`[+]\\'") | |
1902 | (punctuation | |
1903 | "\\`[-]\\'" | |
1904 | punctuation | |
1905 | "\\`[-]\\'" | |
1906 | ,(semantic-lambda | |
1907 | (list | |
1908 | "--")) | |
1909 | ) | |
1910 | (punctuation | |
1911 | "\\`[-]\\'") | |
1912 | (punctuation | |
1913 | "\\`[&]\\'" | |
1914 | punctuation | |
1915 | "\\`[&]\\'" | |
1916 | ,(semantic-lambda | |
1917 | (list | |
1918 | "&&")) | |
1919 | ) | |
1920 | (punctuation | |
1921 | "\\`[&]\\'") | |
1922 | (punctuation | |
1923 | "\\`[|]\\'" | |
1924 | punctuation | |
1925 | "\\`[|]\\'" | |
1926 | ,(semantic-lambda | |
1927 | (list | |
1928 | "||")) | |
1929 | ) | |
1930 | (punctuation | |
1931 | "\\`[|]\\'") | |
1932 | (punctuation | |
1933 | "\\`[/]\\'") | |
1934 | (punctuation | |
1935 | "\\`[=]\\'") | |
1936 | (punctuation | |
1937 | "\\`[!]\\'") | |
1938 | (punctuation | |
1939 | "\\`[~]\\'") | |
1940 | (punctuation | |
1941 | "\\`[%]\\'") | |
1942 | (punctuation | |
1943 | "\\`[,]\\'") | |
1944 | (punctuation | |
1945 | "\\`\\^\\'" | |
1946 | punctuation | |
1947 | "\\`[=]\\'" | |
1948 | ,(semantic-lambda | |
1949 | (list | |
1950 | "^=")) | |
1951 | ) | |
1952 | (punctuation | |
1953 | "\\`\\^\\'") | |
1954 | ) ;; end operatorsym | |
1955 | ||
1956 | (functionname | |
1957 | (OPERATOR | |
1958 | operatorsym | |
1959 | ,(semantic-lambda | |
1960 | (nth 1 vals)) | |
1961 | ) | |
1962 | (semantic-list | |
1963 | ,(lambda (vals start end) | |
1964 | (semantic-bovinate-from-nonterminal | |
1965 | (car | |
1966 | (nth 0 vals)) | |
1967 | (cdr | |
1968 | (nth 0 vals)) | |
1969 | 'function-pointer)) | |
1970 | ) | |
1971 | (symbol | |
1972 | ,(semantic-lambda | |
1973 | (list | |
1974 | (nth 0 vals))) | |
1975 | ) | |
1976 | ) ;; end functionname | |
1977 | ||
1978 | (function-pointer | |
1979 | (open-paren | |
1980 | "(" | |
1981 | punctuation | |
1982 | "\\`[*]\\'" | |
1983 | symbol | |
1984 | close-paren | |
1985 | ")" | |
1986 | ,(semantic-lambda | |
1987 | (list | |
1988 | (concat | |
1989 | "*" | |
1990 | (nth 2 vals)))) | |
1991 | ) | |
1992 | ) ;; end function-pointer | |
1993 | ||
1994 | (fun-or-proto-end | |
1995 | (punctuation | |
1996 | "\\`[;]\\'" | |
1997 | ,(semantic-lambda | |
1998 | (list t)) | |
1999 | ) | |
2000 | (semantic-list | |
2001 | ,(semantic-lambda | |
2002 | (list nil)) | |
2003 | ) | |
2004 | (punctuation | |
2005 | "\\`[=]\\'" | |
2006 | number | |
2007 | "^0$" | |
2008 | punctuation | |
2009 | "\\`[;]\\'" | |
2010 | ,(semantic-lambda | |
2011 | (list ':pure-virtual-flag)) | |
2012 | ) | |
2013 | (fun-try-end | |
2014 | ,(semantic-lambda | |
2015 | (list nil)) | |
2016 | ) | |
2017 | ) ;; end fun-or-proto-end | |
2018 | ||
2019 | (fun-try-end | |
2020 | (TRY | |
2021 | opt-initializers | |
2022 | semantic-list | |
2023 | "^{" | |
2024 | fun-try-several-catches | |
2025 | ,(semantic-lambda | |
2026 | (list nil)) | |
2027 | ) | |
2028 | ) ;; end fun-try-end | |
2029 | ||
2030 | (fun-try-several-catches | |
2031 | (CATCH | |
2032 | semantic-list | |
2033 | "^(" | |
2034 | semantic-list | |
2035 | "^{" | |
2036 | fun-try-several-catches | |
2037 | ,(semantic-lambda) | |
2038 | ) | |
2039 | (CATCH | |
2040 | semantic-list | |
2041 | "^{" | |
2042 | fun-try-several-catches | |
2043 | ,(semantic-lambda) | |
2044 | ) | |
2045 | ( ;;EMPTY | |
2046 | ,(semantic-lambda) | |
2047 | ) | |
2048 | ) ;; end fun-try-several-catches | |
2049 | ||
2050 | (type-cast | |
2051 | (semantic-list | |
2052 | ,(lambda (vals start end) | |
2053 | (semantic-bovinate-from-nonterminal | |
2054 | (car | |
2055 | (nth 0 vals)) | |
2056 | (cdr | |
2057 | (nth 0 vals)) | |
2058 | 'type-cast-list)) | |
2059 | ) | |
2060 | ) ;; end type-cast | |
2061 | ||
2062 | (type-cast-list | |
2063 | (open-paren | |
2064 | typeformbase | |
2065 | close-paren) | |
2066 | ) ;; end type-cast-list | |
2067 | ||
2068 | (opt-stuff-after-symbol | |
2069 | (semantic-list | |
2070 | "^(") | |
2071 | (semantic-list | |
2072 | "\\[.*\\]$") | |
2073 | ( ;;EMPTY | |
2074 | ) | |
2075 | ) ;; end opt-stuff-after-symbol | |
2076 | ||
2077 | (multi-stage-dereference | |
2078 | (namespace-symbol | |
2079 | opt-stuff-after-symbol | |
2080 | punctuation | |
2081 | "\\`[.]\\'" | |
2082 | multi-stage-dereference) | |
2083 | (namespace-symbol | |
2084 | opt-stuff-after-symbol | |
2085 | punctuation | |
2086 | "\\`[-]\\'" | |
2087 | punctuation | |
2088 | "\\`[>]\\'" | |
2089 | multi-stage-dereference) | |
2090 | (namespace-symbol | |
2091 | opt-stuff-after-symbol) | |
2092 | ) ;; end multi-stage-dereference | |
2093 | ||
2094 | (string-seq | |
2095 | (string | |
2096 | string-seq | |
2097 | ,(semantic-lambda | |
2098 | (list | |
2099 | (concat | |
2100 | (nth 0 vals) | |
2101 | (car | |
2102 | (nth 1 vals))))) | |
2103 | ) | |
2104 | (string | |
2105 | ,(semantic-lambda | |
2106 | (list | |
2107 | (nth 0 vals))) | |
2108 | ) | |
2109 | ) ;; end string-seq | |
2110 | ||
2111 | (expr-start | |
2112 | (punctuation | |
2113 | "\\`[-]\\'") | |
2114 | (punctuation | |
2115 | "\\`[+]\\'") | |
2116 | (punctuation | |
2117 | "\\`[*]\\'") | |
2118 | (punctuation | |
2119 | "\\`[&]\\'") | |
2120 | ) ;; end expr-start | |
2121 | ||
ac73b1fa CY |
2122 | (expr-binop |
2123 | (punctuation | |
2124 | "\\`[-]\\'") | |
2125 | (punctuation | |
2126 | "\\`[+]\\'") | |
2127 | (punctuation | |
2128 | "\\`[*]\\'") | |
2129 | (punctuation | |
2130 | "\\`[/]\\'") | |
2131 | (punctuation | |
2132 | "\\`[&]\\'" | |
2133 | punctuation | |
2134 | "\\`[&]\\'") | |
2135 | (punctuation | |
2136 | "\\`[&]\\'") | |
2137 | (punctuation | |
2138 | "\\`[|]\\'" | |
2139 | punctuation | |
2140 | "\\`[|]\\'") | |
2141 | (punctuation | |
2142 | "\\`[|]\\'") | |
2143 | ) ;; end expr-binop | |
2144 | ||
4feec2f5 | 2145 | (expression |
ac73b1fa CY |
2146 | (unaryexpression |
2147 | expr-binop | |
2148 | unaryexpression | |
4feec2f5 CY |
2149 | ,(semantic-lambda |
2150 | (list | |
2151 | (identity start) | |
2152 | (identity end))) | |
2153 | ) | |
ac73b1fa | 2154 | (unaryexpression |
4feec2f5 CY |
2155 | ,(semantic-lambda |
2156 | (list | |
2157 | (identity start) | |
2158 | (identity end))) | |
2159 | ) | |
ac73b1fa CY |
2160 | ) ;; end expression |
2161 | ||
2162 | (unaryexpression | |
2163 | (number) | |
2164 | (multi-stage-dereference) | |
4feec2f5 | 2165 | (NEW |
ac73b1fa | 2166 | multi-stage-dereference) |
4feec2f5 CY |
2167 | (NEW |
2168 | builtintype-types | |
ac73b1fa CY |
2169 | semantic-list) |
2170 | (namespace-symbol) | |
2171 | (string-seq) | |
4feec2f5 | 2172 | (type-cast |
ac73b1fa | 2173 | expression) |
4feec2f5 | 2174 | (semantic-list |
ac73b1fa CY |
2175 | expression) |
2176 | (semantic-list) | |
4feec2f5 | 2177 | (expr-start |
ac73b1fa CY |
2178 | expression) |
2179 | ) ;; end unaryexpression | |
4feec2f5 CY |
2180 | ) |
2181 | "Parser table.") | |
2182 | ||
2183 | (defun semantic-c-by--install-parser () | |
2184 | "Setup the Semantic Parser." | |
2185 | (setq semantic--parse-table semantic-c-by--parse-table | |
2186 | semantic-debug-parser-source "c.by" | |
2187 | semantic-debug-parser-class 'semantic-bovine-debug-parser | |
2188 | semantic-flex-keywords-obarray semantic-c-by--keyword-table | |
2189 | semantic-equivalent-major-modes '(c-mode c++-mode) | |
2190 | )) | |
4feec2f5 CY |
2191 | \f |
2192 | ;;; Epilogue | |
2193 | ;; | |
2194 | ||
2195 | (provide 'semantic/bovine/c-by) | |
2196 | ||
3999968a | 2197 | ;; arch-tag: 27da9f71-d2ef-473f-92a7-b0006b1a8491 |
4feec2f5 | 2198 | ;;; semantic/bovine/c-by.el ends here |