Add 2010 to copyright years.
[bpt/emacs.git] / lisp / cedet / semantic / bovine / c-by.el
1 ;;; semantic/bovine/c-by.el --- Generated parser support file
2
3 ;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
4 ;;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
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
28 (require 'semantic/lex)
29 (eval-when-compile (require 'semantic/bovine))
30
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)
1243 (nth 4 vals))
1244 )
1245 (opt-stars
1246 opt-class
1247 opt-destructor
1248 functionname
1249 opt-template-specifier
1250 opt-under-p
1251 opt-post-fcn-modifiers
1252 opt-throw
1253 opt-initializers
1254 fun-try-end
1255 ,(semantic-lambda
1256 (nth 3 vals)
1257 (list
1258 'function
1259 (nth 1 vals)
1260 (nth 2 vals) nil
1261 (nth 7 vals)
1262 (nth 6 vals))
1263 (nth 0 vals)
1264 (nth 9 vals)
1265 (nth 4 vals))
1266 )
1267 ) ;; end func-decl
1268
1269 (var-decl
1270 (varnamelist
1271 punctuation
1272 "\\`[;]\\'"
1273 ,(semantic-lambda
1274 (list
1275 (nth 0 vals)
1276 'variable))
1277 )
1278 ) ;; end var-decl
1279
1280 (opt-under-p
1281 (UNDERP
1282 ,(semantic-lambda
1283 (list nil))
1284 )
1285 (UNDERUNDERP
1286 ,(semantic-lambda
1287 (list nil))
1288 )
1289 ( ;;EMPTY
1290 )
1291 ) ;; end opt-under-p
1292
1293 (opt-initializers
1294 (punctuation
1295 "\\`[:]\\'"
1296 namespace-symbol
1297 semantic-list
1298 opt-initializers)
1299 (punctuation
1300 "\\`[,]\\'"
1301 namespace-symbol
1302 semantic-list
1303 opt-initializers)
1304 ( ;;EMPTY
1305 )
1306 ) ;; end opt-initializers
1307
1308 (opt-post-fcn-modifiers
1309 (post-fcn-modifiers
1310 opt-post-fcn-modifiers
1311 ,(semantic-lambda
1312 (cons
1313 (nth 0 vals)
1314 (nth 1 vals)))
1315 )
1316 ( ;;EMPTY
1317 ,(semantic-lambda
1318 (list nil))
1319 )
1320 ) ;; end opt-post-fcn-modifiers
1321
1322 (post-fcn-modifiers
1323 (REENTRANT)
1324 (CONST)
1325 ) ;; end post-fcn-modifiers
1326
1327 (opt-throw
1328 (THROW
1329 semantic-list
1330 ,(lambda (vals start end)
1331 (semantic-bovinate-from-nonterminal
1332 (car
1333 (nth 1 vals))
1334 (cdr
1335 (nth 1 vals))
1336 'throw-exception-list))
1337 )
1338 ( ;;EMPTY
1339 )
1340 ) ;; end opt-throw
1341
1342 (throw-exception-list
1343 (namespace-symbol
1344 punctuation
1345 "\\`[,]\\'"
1346 throw-exception-list
1347 ,(semantic-lambda
1348 (cons
1349 (car
1350 (nth 0 vals))
1351 (nth 2 vals)))
1352 )
1353 (namespace-symbol
1354 close-paren
1355 ")"
1356 ,(semantic-lambda
1357 (nth 0 vals))
1358 )
1359 (symbol
1360 close-paren
1361 ")"
1362 ,(semantic-lambda
1363 (list
1364 (nth 0 vals)))
1365 )
1366 (open-paren
1367 "("
1368 throw-exception-list
1369 ,(semantic-lambda
1370 (nth 1 vals))
1371 )
1372 (close-paren
1373 ")"
1374 ,(semantic-lambda)
1375 )
1376 ) ;; end throw-exception-list
1377
1378 (opt-bits
1379 (punctuation
1380 "\\`[:]\\'"
1381 number
1382 ,(semantic-lambda
1383 (list
1384 (nth 1 vals)))
1385 )
1386 ( ;;EMPTY
1387 ,(semantic-lambda
1388 (list nil))
1389 )
1390 ) ;; end opt-bits
1391
1392 (opt-array
1393 (semantic-list
1394 "\\[.*\\]$"
1395 opt-array
1396 ,(semantic-lambda
1397 (list
1398 (cons
1399 1
1400 (car
1401 (nth 1 vals)))))
1402 )
1403 ( ;;EMPTY
1404 ,(semantic-lambda
1405 (list nil))
1406 )
1407 ) ;; end opt-array
1408
1409 (opt-assign
1410 (punctuation
1411 "\\`[=]\\'"
1412 expression
1413 ,(semantic-lambda
1414 (list
1415 (nth 1 vals)))
1416 )
1417 ( ;;EMPTY
1418 ,(semantic-lambda
1419 (list nil))
1420 )
1421 ) ;; end opt-assign
1422
1423 (opt-restrict
1424 (symbol
1425 "\\<\\(__\\)?restrict\\>")
1426 ( ;;EMPTY
1427 )
1428 ) ;; end opt-restrict
1429
1430 (varname
1431 (opt-stars
1432 opt-restrict
1433 namespace-symbol
1434 opt-bits
1435 opt-array
1436 opt-assign
1437 ,(semantic-lambda
1438 (nth 2 vals)
1439 (nth 0 vals)
1440 (nth 3 vals)
1441 (nth 4 vals)
1442 (nth 5 vals))
1443 )
1444 ) ;; end varname
1445
1446 (variablearg
1447 (declmods
1448 typeformbase
1449 cv-declmods
1450 opt-ref
1451 variablearg-opt-name
1452 ,(semantic-lambda
1453 (semantic-tag-new-variable
1454 (list
1455 (nth 4 vals))
1456 (nth 1 vals) nil :constant-flag
1457 (if
1458 (member
1459 "const"
1460 (append
1461 (nth 0 vals)
1462 (nth 2 vals))) t nil) :typemodifiers
1463 (delete
1464 "const"
1465 (append
1466 (nth 0 vals)
1467 (nth 2 vals))) :reference
1468 (car
1469 (nth 3 vals))))
1470 )
1471 ) ;; end variablearg
1472
1473 (variablearg-opt-name
1474 (varname
1475 ,(semantic-lambda
1476 (nth 0 vals))
1477 )
1478 (opt-stars
1479 ,(semantic-lambda
1480 (list
1481 "")
1482 (nth 0 vals)
1483 (list nil nil nil))
1484 )
1485 ) ;; end variablearg-opt-name
1486
1487 (varnamelist
1488 (opt-ref
1489 varname
1490 punctuation
1491 "\\`[,]\\'"
1492 varnamelist
1493 ,(semantic-lambda
1494 (cons
1495 (nth 1 vals)
1496 (nth 3 vals)))
1497 )
1498 (opt-ref
1499 varname
1500 ,(semantic-lambda
1501 (list
1502 (nth 1 vals)))
1503 )
1504 ) ;; end varnamelist
1505
1506 (namespace-symbol
1507 (symbol
1508 opt-template-specifier
1509 punctuation
1510 "\\`[:]\\'"
1511 punctuation
1512 "\\`[:]\\'"
1513 namespace-symbol
1514 ,(semantic-lambda
1515 (list
1516 (concat
1517 (nth 0 vals)
1518 "::"
1519 (car
1520 (nth 4 vals)))))
1521 )
1522 (symbol
1523 opt-template-specifier
1524 ,(semantic-lambda
1525 (list
1526 (nth 0 vals)))
1527 )
1528 ) ;; end namespace-symbol
1529
1530 (namespace-symbol-for-typeformbase
1531 (symbol
1532 opt-template-specifier
1533 punctuation
1534 "\\`[:]\\'"
1535 punctuation
1536 "\\`[:]\\'"
1537 namespace-symbol-for-typeformbase
1538 ,(semantic-lambda
1539 (list
1540 (concat
1541 (nth 0 vals)
1542 "::"
1543 (car
1544 (nth 4 vals)))))
1545 )
1546 (symbol
1547 ,(semantic-lambda
1548 (list
1549 (nth 0 vals)))
1550 )
1551 ) ;; end namespace-symbol-for-typeformbase
1552
1553 (namespace-opt-class
1554 (symbol
1555 punctuation
1556 "\\`[:]\\'"
1557 punctuation
1558 "\\`[:]\\'"
1559 namespace-opt-class
1560 ,(semantic-lambda
1561 (list
1562 (concat
1563 (nth 0 vals)
1564 "::"
1565 (car
1566 (nth 3 vals)))))
1567 )
1568 (symbol
1569 opt-template-specifier
1570 punctuation
1571 "\\`[:]\\'"
1572 punctuation
1573 "\\`[:]\\'"
1574 ,(semantic-lambda
1575 (list
1576 (nth 0 vals)))
1577 )
1578 ) ;; end namespace-opt-class
1579
1580 (opt-class
1581 (namespace-opt-class
1582 ,(semantic-lambda
1583 (nth 0 vals))
1584 )
1585 ( ;;EMPTY
1586 ,(semantic-lambda
1587 (list nil))
1588 )
1589 ) ;; end opt-class
1590
1591 (opt-destructor
1592 (punctuation
1593 "\\`[~]\\'"
1594 ,(semantic-lambda
1595 (list t))
1596 )
1597 ( ;;EMPTY
1598 ,(semantic-lambda
1599 (list nil))
1600 )
1601 ) ;; end opt-destructor
1602
1603 (arg-list
1604 (semantic-list
1605 "^("
1606 knr-arguments
1607 ,(semantic-lambda
1608 (nth 1 vals))
1609 )
1610 (semantic-list
1611 "^("
1612 ,(semantic-lambda
1613 (semantic-parse-region
1614 (car
1615 (nth 0 vals))
1616 (cdr
1617 (nth 0 vals))
1618 'arg-sub-list
1619 1))
1620 )
1621 (semantic-list
1622 "^(void)$"
1623 ,(semantic-lambda)
1624 )
1625 ) ;; end arg-list
1626
1627 (knr-varnamelist
1628 (varname
1629 punctuation
1630 "\\`[,]\\'"
1631 knr-varnamelist
1632 ,(semantic-lambda
1633 (cons
1634 (nth 0 vals)
1635 (nth 2 vals)))
1636 )
1637 (varname
1638 ,(semantic-lambda
1639 (list
1640 (nth 0 vals)))
1641 )
1642 ) ;; end knr-varnamelist
1643
1644 (knr-one-variable-decl
1645 (declmods
1646 typeformbase
1647 cv-declmods
1648 knr-varnamelist
1649 ,(semantic-lambda
1650 (semantic-tag-new-variable
1651 (nreverse
1652 (nth 3 vals))
1653 (nth 1 vals) nil :constant-flag
1654 (if
1655 (member
1656 "const"
1657 (append
1658 (nth 2 vals))) t nil) :typemodifiers
1659 (delete
1660 "const"
1661 (nth 2 vals))))
1662 )
1663 ) ;; end knr-one-variable-decl
1664
1665 (knr-arguments
1666 (knr-one-variable-decl
1667 punctuation
1668 "\\`[;]\\'"
1669 knr-arguments
1670 ,(semantic-lambda
1671 (append
1672 (semantic-expand-c-tag
1673 (nth 0 vals))
1674 (nth 2 vals)))
1675 )
1676 (knr-one-variable-decl
1677 punctuation
1678 "\\`[;]\\'"
1679 ,(semantic-lambda
1680 (semantic-expand-c-tag
1681 (nth 0 vals)))
1682 )
1683 ) ;; end knr-arguments
1684
1685 (arg-sub-list
1686 (variablearg
1687 ,(semantic-lambda
1688 (nth 0 vals))
1689 )
1690 (punctuation
1691 "\\`[.]\\'"
1692 punctuation
1693 "\\`[.]\\'"
1694 punctuation
1695 "\\`[.]\\'"
1696 close-paren
1697 ")"
1698 ,(semantic-lambda
1699 (semantic-tag-new-variable
1700 "..."
1701 "vararg" nil))
1702 )
1703 (punctuation
1704 "\\`[,]\\'"
1705 ,(semantic-lambda
1706 (list nil))
1707 )
1708 (open-paren
1709 "("
1710 ,(semantic-lambda
1711 (list nil))
1712 )
1713 (close-paren
1714 ")"
1715 ,(semantic-lambda
1716 (list nil))
1717 )
1718 ) ;; end arg-sub-list
1719
1720 (operatorsym
1721 (punctuation
1722 "\\`[<]\\'"
1723 punctuation
1724 "\\`[<]\\'"
1725 punctuation
1726 "\\`[=]\\'"
1727 ,(semantic-lambda
1728 (list
1729 "<<="))
1730 )
1731 (punctuation
1732 "\\`[>]\\'"
1733 punctuation
1734 "\\`[>]\\'"
1735 punctuation
1736 "\\`[=]\\'"
1737 ,(semantic-lambda
1738 (list
1739 ">>="))
1740 )
1741 (punctuation
1742 "\\`[<]\\'"
1743 punctuation
1744 "\\`[<]\\'"
1745 ,(semantic-lambda
1746 (list
1747 "<<"))
1748 )
1749 (punctuation
1750 "\\`[>]\\'"
1751 punctuation
1752 "\\`[>]\\'"
1753 ,(semantic-lambda
1754 (list
1755 ">>"))
1756 )
1757 (punctuation
1758 "\\`[=]\\'"
1759 punctuation
1760 "\\`[=]\\'"
1761 ,(semantic-lambda
1762 (list
1763 "=="))
1764 )
1765 (punctuation
1766 "\\`[<]\\'"
1767 punctuation
1768 "\\`[=]\\'"
1769 ,(semantic-lambda
1770 (list
1771 "<="))
1772 )
1773 (punctuation
1774 "\\`[>]\\'"
1775 punctuation
1776 "\\`[=]\\'"
1777 ,(semantic-lambda
1778 (list
1779 ">="))
1780 )
1781 (punctuation
1782 "\\`[!]\\'"
1783 punctuation
1784 "\\`[=]\\'"
1785 ,(semantic-lambda
1786 (list
1787 "!="))
1788 )
1789 (punctuation
1790 "\\`[+]\\'"
1791 punctuation
1792 "\\`[=]\\'"
1793 ,(semantic-lambda
1794 (list
1795 "+="))
1796 )
1797 (punctuation
1798 "\\`[-]\\'"
1799 punctuation
1800 "\\`[=]\\'"
1801 ,(semantic-lambda
1802 (list
1803 "-="))
1804 )
1805 (punctuation
1806 "\\`[*]\\'"
1807 punctuation
1808 "\\`[=]\\'"
1809 ,(semantic-lambda
1810 (list
1811 "*="))
1812 )
1813 (punctuation
1814 "\\`[/]\\'"
1815 punctuation
1816 "\\`[=]\\'"
1817 ,(semantic-lambda
1818 (list
1819 "/="))
1820 )
1821 (punctuation
1822 "\\`[%]\\'"
1823 punctuation
1824 "\\`[=]\\'"
1825 ,(semantic-lambda
1826 (list
1827 "%="))
1828 )
1829 (punctuation
1830 "\\`[&]\\'"
1831 punctuation
1832 "\\`[=]\\'"
1833 ,(semantic-lambda
1834 (list
1835 "&="))
1836 )
1837 (punctuation
1838 "\\`[|]\\'"
1839 punctuation
1840 "\\`[=]\\'"
1841 ,(semantic-lambda
1842 (list
1843 "|="))
1844 )
1845 (punctuation
1846 "\\`[-]\\'"
1847 punctuation
1848 "\\`[>]\\'"
1849 punctuation
1850 "\\`[*]\\'"
1851 ,(semantic-lambda
1852 (list
1853 "->*"))
1854 )
1855 (punctuation
1856 "\\`[-]\\'"
1857 punctuation
1858 "\\`[>]\\'"
1859 ,(semantic-lambda
1860 (list
1861 "->"))
1862 )
1863 (semantic-list
1864 "()"
1865 ,(semantic-lambda
1866 (list
1867 "()"))
1868 )
1869 (semantic-list
1870 "\\[\\]"
1871 ,(semantic-lambda
1872 (list
1873 "[]"))
1874 )
1875 (punctuation
1876 "\\`[<]\\'")
1877 (punctuation
1878 "\\`[>]\\'")
1879 (punctuation
1880 "\\`[*]\\'")
1881 (punctuation
1882 "\\`[+]\\'"
1883 punctuation
1884 "\\`[+]\\'"
1885 ,(semantic-lambda
1886 (list
1887 "++"))
1888 )
1889 (punctuation
1890 "\\`[+]\\'")
1891 (punctuation
1892 "\\`[-]\\'"
1893 punctuation
1894 "\\`[-]\\'"
1895 ,(semantic-lambda
1896 (list
1897 "--"))
1898 )
1899 (punctuation
1900 "\\`[-]\\'")
1901 (punctuation
1902 "\\`[&]\\'"
1903 punctuation
1904 "\\`[&]\\'"
1905 ,(semantic-lambda
1906 (list
1907 "&&"))
1908 )
1909 (punctuation
1910 "\\`[&]\\'")
1911 (punctuation
1912 "\\`[|]\\'"
1913 punctuation
1914 "\\`[|]\\'"
1915 ,(semantic-lambda
1916 (list
1917 "||"))
1918 )
1919 (punctuation
1920 "\\`[|]\\'")
1921 (punctuation
1922 "\\`[/]\\'")
1923 (punctuation
1924 "\\`[=]\\'")
1925 (punctuation
1926 "\\`[!]\\'")
1927 (punctuation
1928 "\\`[~]\\'")
1929 (punctuation
1930 "\\`[%]\\'")
1931 (punctuation
1932 "\\`[,]\\'")
1933 (punctuation
1934 "\\`\\^\\'"
1935 punctuation
1936 "\\`[=]\\'"
1937 ,(semantic-lambda
1938 (list
1939 "^="))
1940 )
1941 (punctuation
1942 "\\`\\^\\'")
1943 ) ;; end operatorsym
1944
1945 (functionname
1946 (OPERATOR
1947 operatorsym
1948 ,(semantic-lambda
1949 (nth 1 vals))
1950 )
1951 (semantic-list
1952 ,(lambda (vals start end)
1953 (semantic-bovinate-from-nonterminal
1954 (car
1955 (nth 0 vals))
1956 (cdr
1957 (nth 0 vals))
1958 'function-pointer))
1959 )
1960 (symbol
1961 ,(semantic-lambda
1962 (list
1963 (nth 0 vals)))
1964 )
1965 ) ;; end functionname
1966
1967 (function-pointer
1968 (open-paren
1969 "("
1970 punctuation
1971 "\\`[*]\\'"
1972 symbol
1973 close-paren
1974 ")"
1975 ,(semantic-lambda
1976 (list
1977 (concat
1978 "*"
1979 (nth 2 vals))))
1980 )
1981 ) ;; end function-pointer
1982
1983 (fun-or-proto-end
1984 (punctuation
1985 "\\`[;]\\'"
1986 ,(semantic-lambda
1987 (list t))
1988 )
1989 (semantic-list
1990 ,(semantic-lambda
1991 (list nil))
1992 )
1993 (punctuation
1994 "\\`[=]\\'"
1995 number
1996 "^0$"
1997 punctuation
1998 "\\`[;]\\'"
1999 ,(semantic-lambda
2000 (list ':pure-virtual-flag))
2001 )
2002 (fun-try-end
2003 ,(semantic-lambda
2004 (list nil))
2005 )
2006 ) ;; end fun-or-proto-end
2007
2008 (fun-try-end
2009 (TRY
2010 opt-initializers
2011 semantic-list
2012 "^{"
2013 fun-try-several-catches
2014 ,(semantic-lambda
2015 (list nil))
2016 )
2017 ) ;; end fun-try-end
2018
2019 (fun-try-several-catches
2020 (CATCH
2021 semantic-list
2022 "^("
2023 semantic-list
2024 "^{"
2025 fun-try-several-catches
2026 ,(semantic-lambda)
2027 )
2028 (CATCH
2029 semantic-list
2030 "^{"
2031 fun-try-several-catches
2032 ,(semantic-lambda)
2033 )
2034 ( ;;EMPTY
2035 ,(semantic-lambda)
2036 )
2037 ) ;; end fun-try-several-catches
2038
2039 (type-cast
2040 (semantic-list
2041 ,(lambda (vals start end)
2042 (semantic-bovinate-from-nonterminal
2043 (car
2044 (nth 0 vals))
2045 (cdr
2046 (nth 0 vals))
2047 'type-cast-list))
2048 )
2049 ) ;; end type-cast
2050
2051 (type-cast-list
2052 (open-paren
2053 typeformbase
2054 close-paren)
2055 ) ;; end type-cast-list
2056
2057 (opt-stuff-after-symbol
2058 (semantic-list
2059 "^(")
2060 (semantic-list
2061 "\\[.*\\]$")
2062 ( ;;EMPTY
2063 )
2064 ) ;; end opt-stuff-after-symbol
2065
2066 (multi-stage-dereference
2067 (namespace-symbol
2068 opt-stuff-after-symbol
2069 punctuation
2070 "\\`[.]\\'"
2071 multi-stage-dereference)
2072 (namespace-symbol
2073 opt-stuff-after-symbol
2074 punctuation
2075 "\\`[-]\\'"
2076 punctuation
2077 "\\`[>]\\'"
2078 multi-stage-dereference)
2079 (namespace-symbol
2080 opt-stuff-after-symbol)
2081 ) ;; end multi-stage-dereference
2082
2083 (string-seq
2084 (string
2085 string-seq
2086 ,(semantic-lambda
2087 (list
2088 (concat
2089 (nth 0 vals)
2090 (car
2091 (nth 1 vals)))))
2092 )
2093 (string
2094 ,(semantic-lambda
2095 (list
2096 (nth 0 vals)))
2097 )
2098 ) ;; end string-seq
2099
2100 (expr-start
2101 (punctuation
2102 "\\`[-]\\'")
2103 (punctuation
2104 "\\`[+]\\'")
2105 (punctuation
2106 "\\`[*]\\'")
2107 (punctuation
2108 "\\`[&]\\'")
2109 ) ;; end expr-start
2110
2111 (expression
2112 (number
2113 ,(semantic-lambda
2114 (list
2115 (identity start)
2116 (identity end)))
2117 )
2118 (multi-stage-dereference
2119 ,(semantic-lambda
2120 (list
2121 (identity start)
2122 (identity end)))
2123 )
2124 (NEW
2125 multi-stage-dereference
2126 ,(semantic-lambda
2127 (list
2128 (identity start)
2129 (identity end)))
2130 )
2131 (NEW
2132 builtintype-types
2133 semantic-list
2134 ,(semantic-lambda
2135 (list
2136 (identity start)
2137 (identity end)))
2138 )
2139 (namespace-symbol
2140 ,(semantic-lambda
2141 (list
2142 (identity start)
2143 (identity end)))
2144 )
2145 (string-seq
2146 ,(semantic-lambda
2147 (list
2148 (identity start)
2149 (identity end)))
2150 )
2151 (type-cast
2152 expression
2153 ,(semantic-lambda
2154 (list
2155 (identity start)
2156 (identity end)))
2157 )
2158 (semantic-list
2159 expression
2160 ,(semantic-lambda
2161 (list
2162 (identity start)
2163 (identity end)))
2164 )
2165 (semantic-list
2166 ,(semantic-lambda
2167 (list
2168 (identity start)
2169 (identity end)))
2170 )
2171 (expr-start
2172 expression
2173 ,(semantic-lambda
2174 (list
2175 (identity start)
2176 (identity end)))
2177 )
2178 ) ;; end expression
2179 )
2180 "Parser table.")
2181
2182 (defun semantic-c-by--install-parser ()
2183 "Setup the Semantic Parser."
2184 (setq semantic--parse-table semantic-c-by--parse-table
2185 semantic-debug-parser-source "c.by"
2186 semantic-debug-parser-class 'semantic-bovine-debug-parser
2187 semantic-flex-keywords-obarray semantic-c-by--keyword-table
2188 semantic-equivalent-major-modes '(c-mode c++-mode)
2189 ))
2190 \f
2191 ;;; Epilogue
2192 ;;
2193
2194 (provide 'semantic/bovine/c-by)
2195
2196 ;; arch-tag: 27da9f71-d2ef-473f-92a7-b0006b1a8491
2197 ;;; semantic/bovine/c-by.el ends here