Add 2011 to FSF/AIST copyright years.
[emacs.git] / lisp / cedet / semantic / bovine / c-by.el
blob0308ace619bbdf62cc061e4ad78e9266e0bfcd29
1 ;;; semantic/bovine/c-by.el --- Generated parser support file
3 ;;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
4 ;;; 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
6 ;; This file is part of GNU Emacs.
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.
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.
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/>.
21 ;;; Commentary:
23 ;; This file was generated from the grammar file semantic/bovine/c.by
24 ;; in the CEDET repository.
26 ;;; Code:
28 (require 'semantic/lex)
29 (eval-when-compile (require 'semantic/bovine))
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")
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.")
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.")
185 (defconst semantic-c-by--parse-table
187 (bovine-toplevel
188 (declaration)
189 ) ;; end bovine-toplevel
191 (bovine-inner-scope
192 (codeblock)
193 ) ;; end bovine-inner-scope
195 (declaration
196 (macro)
197 (type)
198 (define)
199 (var-or-fun)
200 (extern-c)
201 (template)
202 (using)
203 ) ;; end declaration
205 (codeblock
206 (define)
207 (codeblock-var-or-fun)
208 (type)
209 (using)
210 ) ;; end codeblock
212 (extern-c-contents
213 (open-paren
214 ,(semantic-lambda
215 (list nil))
217 (declaration)
218 (close-paren
219 ,(semantic-lambda
220 (list nil))
222 ) ;; end extern-c-contents
224 (extern-c
225 (EXTERN
226 string
227 "\"C\""
228 semantic-list
229 ,(semantic-lambda
230 (semantic-tag
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)))
241 (EXTERN
242 string
243 "\"C\\+\\+\""
244 semantic-list
245 ,(semantic-lambda
246 (semantic-tag
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)))
257 (EXTERN
258 string
259 "\"C\""
260 ,(semantic-lambda
261 (list nil))
263 (EXTERN
264 string
265 "\"C\\+\\+\""
266 ,(semantic-lambda
267 (list nil))
269 ) ;; end extern-c
271 (macro
272 (spp-macro-def
273 ,(semantic-lambda
274 (semantic-tag-new-variable
275 (nth 0 vals) nil nil :constant-flag t))
277 (spp-system-include
278 ,(semantic-lambda
279 (semantic-tag-new-include
280 (nth 0 vals) t))
282 (spp-include
283 ,(semantic-lambda
284 (semantic-tag-new-include
285 (nth 0 vals) nil))
287 ) ;; end macro
289 (define
290 (spp-macro-def
291 ,(semantic-lambda
292 (semantic-tag-new-variable
293 (nth 0 vals) nil nil :constant-flag t))
295 (spp-macro-undef
296 ,(semantic-lambda
297 (list nil))
299 ) ;; end define
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
312 ) ;; end unionparts
314 (opt-symbol
315 (symbol)
316 ( ;;EMPTY
318 ) ;; end opt-symbol
320 (classsubparts
321 (open-paren
323 ,(semantic-lambda
324 (list nil))
326 (close-paren
328 ,(semantic-lambda
329 (list nil))
331 (class-protection
332 opt-symbol
333 punctuation
334 "\\`[:]\\'"
335 ,(semantic-lambda
336 (semantic-tag
337 (car
338 (nth 0 vals))
339 'label))
341 (var-or-fun)
342 (FRIEND
343 func-decl
344 ,(semantic-lambda
345 (semantic-tag
346 (car
347 (nth 1 vals))
348 'friend))
350 (FRIEND
351 CLASS
352 symbol
353 ,(semantic-lambda
354 (semantic-tag
355 (nth 2 vals)
356 'friend))
358 (type)
359 (define)
360 (template)
361 ( ;;EMPTY
363 ) ;; end classsubparts
365 (opt-class-parents
366 (punctuation
367 "\\`[:]\\'"
368 class-parents
369 opt-template-specifier
370 ,(semantic-lambda
371 (list
372 (nth 1 vals)))
374 ( ;;EMPTY
375 ,(semantic-lambda)
377 ) ;; end opt-class-parents
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))))
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))))
402 ) ;; end one-class-parent
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)))
414 (one-class-parent
415 ,(semantic-lambda
416 (list
417 (nth 0 vals)))
419 ) ;; end class-parents
421 (opt-class-declmods
422 (class-declmods
423 opt-class-declmods
424 ,(semantic-lambda
425 (list nil))
427 ( ;;EMPTY
429 ) ;; end opt-class-declmods
431 (class-declmods
432 (VIRTUAL)
433 ) ;; end class-declmods
435 (class-protection
436 (PUBLIC)
437 (PRIVATE)
438 (PROTECTED)
439 ) ;; end class-protection
441 (opt-class-protection
442 (class-protection
443 ,(semantic-lambda
444 (nth 0 vals))
446 ( ;;EMPTY
447 ,(semantic-lambda
448 (list
449 "unspecified"))
451 ) ;; end opt-class-protection
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
464 ) ;; end namespaceparts
466 (namespacesubparts
467 (open-paren
469 ,(semantic-lambda
470 (list nil))
472 (close-paren
474 ,(semantic-lambda
475 (list nil))
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))
489 (template)
490 (using)
491 ( ;;EMPTY
493 ) ;; end namespacesubparts
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
506 ) ;; end enumparts
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))
518 (open-paren
520 ,(semantic-lambda
521 (list nil))
523 (close-paren
525 ,(semantic-lambda
526 (list nil))
528 (punctuation
529 "\\`[,]\\'"
530 ,(semantic-lambda
531 (list nil))
533 ) ;; end enumsubparts
535 (opt-name
536 (symbol)
537 ( ;;EMPTY
538 ,(semantic-lambda
539 (list
540 ""))
542 ) ;; end opt-name
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
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
572 (nth 4 vals) :template-specifier
573 (nth 3 vals) :parent
574 (car
575 (nth 1 vals))))
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))))
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))))
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))))
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))))
631 ) ;; end typesimple
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)))
643 (typedefname
644 ,(semantic-lambda
645 (list
646 (nth 0 vals)))
648 ) ;; end typedef-symbol-list
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)))
660 ) ;; end typedefname
662 (struct-or-class
663 (STRUCT)
664 (CLASS)
665 ) ;; end struct-or-class
667 (type
668 (typesimple
669 punctuation
670 "\\`[;]\\'"
671 ,(semantic-lambda
672 (nth 0 vals))
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))
683 (NAMESPACE
684 namespaceparts
685 ,(semantic-lambda
686 (semantic-tag-new-type
687 "unnamed"
688 (nth 0 vals)
689 (nth 1 vals) nil))
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))
709 ) ;; end type
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)))
723 ) ;; end using
725 (usingname
726 (typeformbase
727 ,(semantic-lambda
728 (semantic-tag-new-type
729 (car
730 (nth 0 vals))
731 "class" nil nil :prototype t))
733 (NAMESPACE
734 typeformbase
735 ,(semantic-lambda
736 (semantic-tag-new-type
737 (car
738 (nth 1 vals))
739 "namespace" nil nil :prototype t))
741 ) ;; end usingname
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)))
753 ) ;; end template
755 (opt-friend
756 (FRIEND)
757 ( ;;EMPTY
759 ) ;; end opt-friend
761 (opt-template-specifier
762 (template-specifier
763 ,(semantic-lambda
764 (nth 0 vals))
766 ( ;;EMPTY
767 ,(semantic-lambda)
769 ) ;; end opt-template-specifier
771 (template-specifier
772 (punctuation
773 "\\`[<]\\'"
774 template-specifier-types
775 punctuation
776 "\\`[>]\\'"
777 ,(semantic-lambda
778 (nth 1 vals))
780 ) ;; end template-specifier
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)))
790 ( ;;EMPTY
792 ) ;; end template-specifier-types
794 (template-specifier-type-list
795 (punctuation
796 "\\`[,]\\'"
797 template-specifier-types
798 ,(semantic-lambda
799 (nth 1 vals))
801 ( ;;EMPTY
802 ,(semantic-lambda)
804 ) ;; end template-specifier-type-list
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))))
816 (string
817 ,(semantic-lambda
818 (list
819 (nth 0 vals)))
821 (number
822 ,(semantic-lambda
823 (list
824 (nth 0 vals)))
826 (opt-stars
827 opt-ref
828 namespace-symbol
829 ,(semantic-lambda
830 (nth 2 vals))
832 (semantic-list
833 ,(semantic-lambda
834 (list
835 (nth 0 vals)))
837 (SIZEOF
838 semantic-list
839 ,(semantic-lambda
840 (list
841 (nth 1 vals)))
843 ) ;; end template-var
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)))
858 (punctuation
859 "\\`[=]\\'"
860 symbol
861 ,(semantic-lambda
862 (list
863 (nth 1 vals)))
865 ( ;;EMPTY
866 ,(semantic-lambda)
868 ) ;; end opt-template-equal
870 (template-type
871 (CLASS
872 symbol
873 ,(semantic-lambda
874 (semantic-tag-new-type
875 (nth 1 vals)
876 "class" nil nil))
878 (STRUCT
879 symbol
880 ,(semantic-lambda
881 (semantic-tag-new-type
882 (nth 1 vals)
883 "struct" nil nil))
885 (TYPENAME
886 symbol
887 ,(semantic-lambda
888 (semantic-tag-new-type
889 (nth 1 vals)
890 "class" nil nil))
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
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))))
918 ) ;; end template-type
920 (template-definition
921 (type
922 ,(semantic-lambda
923 (nth 0 vals))
925 (var-or-fun
926 ,(semantic-lambda
927 (nth 0 vals))
929 ) ;; end template-definition
931 (opt-stars
932 (punctuation
933 "\\`[*]\\'"
934 opt-starmod
935 opt-stars
936 ,(semantic-lambda
937 (list
939 (car
940 (nth 2 vals)))))
942 ( ;;EMPTY
943 ,(semantic-lambda
944 (list
947 ) ;; end opt-stars
949 (opt-starmod
950 (STARMOD
951 opt-starmod
952 ,(semantic-lambda
953 (cons
954 (car
955 (nth 0 vals))
956 (nth 1 vals)))
958 ( ;;EMPTY
959 ,(semantic-lambda)
961 ) ;; end opt-starmod
963 (STARMOD
964 (CONST)
965 ) ;; end STARMOD
967 (declmods
968 (DECLMOD
969 declmods
970 ,(semantic-lambda
971 (cons
972 (car
973 (nth 0 vals))
974 (nth 1 vals)))
976 (DECLMOD
977 ,(semantic-lambda
978 (nth 0 vals))
980 ( ;;EMPTY
981 ,(semantic-lambda)
983 ) ;; end declmods
985 (DECLMOD
986 (EXTERN)
987 (STATIC)
988 (CVDECLMOD)
989 (INLINE)
990 (REGISTER)
991 (FRIEND)
992 (TYPENAME)
993 (METADECLMOD)
994 (VIRTUAL)
995 ) ;; end DECLMOD
997 (metadeclmod
998 (METADECLMOD
999 ,(semantic-lambda)
1001 ( ;;EMPTY
1002 ,(semantic-lambda)
1004 ) ;; end metadeclmod
1006 (CVDECLMOD
1007 (CONST)
1008 (VOLATILE)
1009 ) ;; end CVDECLMOD
1011 (cv-declmods
1012 (CVDECLMOD
1013 cv-declmods
1014 ,(semantic-lambda
1015 (cons
1016 (car
1017 (nth 0 vals))
1018 (nth 1 vals)))
1020 (CVDECLMOD
1021 ,(semantic-lambda
1022 (nth 0 vals))
1024 ( ;;EMPTY
1025 ,(semantic-lambda)
1027 ) ;; end cv-declmods
1029 (METADECLMOD
1030 (VIRTUAL)
1031 (MUTABLE)
1032 ) ;; end METADECLMOD
1034 (opt-ref
1035 (punctuation
1036 "\\`[&]\\'"
1037 ,(semantic-lambda
1038 (list
1041 ( ;;EMPTY
1042 ,(semantic-lambda
1043 (list
1046 ) ;; end opt-ref
1048 (typeformbase
1049 (typesimple
1050 ,(semantic-lambda
1051 (nth 0 vals))
1053 (STRUCT
1054 symbol
1055 ,(semantic-lambda
1056 (semantic-tag-new-type
1057 (nth 1 vals)
1058 (nth 0 vals) nil nil))
1060 (UNION
1061 symbol
1062 ,(semantic-lambda
1063 (semantic-tag-new-type
1064 (nth 1 vals)
1065 (nth 0 vals) nil nil))
1067 (ENUM
1068 symbol
1069 ,(semantic-lambda
1070 (semantic-tag-new-type
1071 (nth 1 vals)
1072 (nth 0 vals) nil nil))
1074 (builtintype
1075 ,(semantic-lambda
1076 (nth 0 vals))
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)))
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)))
1095 (symbol
1096 ,(semantic-lambda
1097 (list
1098 (nth 0 vals)))
1100 ) ;; end typeformbase
1102 (signedmod
1103 (UNSIGNED)
1104 (SIGNED)
1105 ) ;; end signedmod
1107 (builtintype-types
1108 (VOID)
1109 (CHAR)
1110 (WCHAR)
1111 (SHORT
1113 ,(semantic-lambda
1114 (list
1115 (concat
1116 (nth 0 vals)
1118 (nth 1 vals))))
1120 (SHORT)
1121 (INT)
1122 (LONG
1124 ,(semantic-lambda
1125 (list
1126 (concat
1127 (nth 0 vals)
1129 (nth 1 vals))))
1131 (FLOAT)
1132 (DOUBLE)
1133 (BOOL)
1134 (LONG
1135 DOUBLE
1136 ,(semantic-lambda
1137 (list
1138 (concat
1139 (nth 0 vals)
1141 (nth 1 vals))))
1143 (LONG
1144 LONG
1145 ,(semantic-lambda
1146 (list
1147 (concat
1148 (nth 0 vals)
1150 (nth 1 vals))))
1152 (LONG)
1153 ) ;; end builtintype-types
1155 (builtintype
1156 (signedmod
1157 builtintype-types
1158 ,(semantic-lambda
1159 (list
1160 (concat
1161 (car
1162 (nth 0 vals))
1164 (car
1165 (nth 1 vals)))))
1167 (builtintype-types
1168 ,(semantic-lambda
1169 (nth 0 vals))
1171 (signedmod
1172 ,(semantic-lambda
1173 (list
1174 (concat
1175 (car
1176 (nth 0 vals))
1177 " int")))
1179 ) ;; end builtintype
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)))
1193 ) ;; end codeblock-var-or-fun
1195 (var-or-fun
1196 (codeblock-var-or-fun
1197 ,(semantic-lambda
1198 (nth 0 vals))
1200 (declmods
1201 var-or-func-decl
1202 ,(semantic-lambda
1203 (semantic-c-reconstitute-token
1204 (nth 1 vals)
1205 (nth 0 vals) nil))
1207 ) ;; end var-or-fun
1209 (var-or-func-decl
1210 (func-decl
1211 ,(semantic-lambda
1212 (nth 0 vals))
1214 (var-decl
1215 ,(semantic-lambda
1216 (nth 0 vals))
1218 ) ;; end var-or-func-decl
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 (list
1244 (nth 4 vals))
1245 (nth 9 vals))
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)
1267 (list
1268 (nth 4 vals))
1269 (nth 8 vals))
1271 ) ;; end func-decl
1273 (var-decl
1274 (varnamelist
1275 punctuation
1276 "\\`[;]\\'"
1277 ,(semantic-lambda
1278 (list
1279 (nth 0 vals)
1280 'variable))
1282 ) ;; end var-decl
1284 (opt-under-p
1285 (UNDERP
1286 ,(semantic-lambda
1287 (list nil))
1289 (UNDERUNDERP
1290 ,(semantic-lambda
1291 (list nil))
1293 ( ;;EMPTY
1295 ) ;; end opt-under-p
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
1310 ) ;; end opt-initializers
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)))
1320 ( ;;EMPTY
1321 ,(semantic-lambda
1322 (list nil))
1324 ) ;; end opt-post-fcn-modifiers
1326 (post-fcn-modifiers
1327 (REENTRANT)
1328 (CONST)
1329 ) ;; end post-fcn-modifiers
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))
1342 ( ;;EMPTY
1344 ) ;; end opt-throw
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)))
1357 (namespace-symbol
1358 close-paren
1360 ,(semantic-lambda
1361 (nth 0 vals))
1363 (symbol
1364 close-paren
1366 ,(semantic-lambda
1367 (list
1368 (nth 0 vals)))
1370 (open-paren
1372 throw-exception-list
1373 ,(semantic-lambda
1374 (nth 1 vals))
1376 (close-paren
1378 ,(semantic-lambda)
1380 ) ;; end throw-exception-list
1382 (opt-bits
1383 (punctuation
1384 "\\`[:]\\'"
1385 number
1386 ,(semantic-lambda
1387 (list
1388 (nth 1 vals)))
1390 ( ;;EMPTY
1391 ,(semantic-lambda
1392 (list nil))
1394 ) ;; end opt-bits
1396 (opt-array
1397 (semantic-list
1398 "\\[.*\\]$"
1399 opt-array
1400 ,(semantic-lambda
1401 (list
1402 (cons
1404 (car
1405 (nth 1 vals)))))
1407 ( ;;EMPTY
1408 ,(semantic-lambda
1409 (list nil))
1411 ) ;; end opt-array
1413 (opt-assign
1414 (punctuation
1415 "\\`[=]\\'"
1416 expression
1417 ,(semantic-lambda
1418 (list
1419 (nth 1 vals)))
1421 ( ;;EMPTY
1422 ,(semantic-lambda
1423 (list nil))
1425 ) ;; end opt-assign
1427 (opt-restrict
1428 (symbol
1429 "\\<\\(__\\)?restrict\\>")
1430 ( ;;EMPTY
1432 ) ;; end opt-restrict
1434 (varname
1435 (opt-stars
1436 opt-restrict
1437 namespace-symbol
1438 opt-bits
1439 opt-array
1440 ,(semantic-lambda
1441 (nth 2 vals)
1442 (nth 0 vals)
1443 (nth 3 vals)
1444 (nth 4 vals))
1446 ) ;; end varname
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
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))))
1473 ) ;; end variablearg
1475 (variablearg-opt-name
1476 (varname
1477 ,(semantic-lambda
1478 (nth 0 vals))
1480 (opt-stars
1481 ,(semantic-lambda
1482 (list
1484 (nth 0 vals)
1485 (list nil nil nil))
1487 ) ;; end variablearg-opt-name
1489 (varname-opt-initializer
1490 (semantic-list)
1491 (opt-assign)
1492 ( ;;EMPTY
1494 ) ;; end varname-opt-initializer
1496 (varnamelist
1497 (opt-ref
1498 varname
1499 varname-opt-initializer
1500 punctuation
1501 "\\`[,]\\'"
1502 varnamelist
1503 ,(semantic-lambda
1504 (cons
1505 (nth 1 vals)
1506 (nth 4 vals)))
1508 (opt-ref
1509 varname
1510 varname-opt-initializer
1511 ,(semantic-lambda
1512 (list
1513 (nth 1 vals)))
1515 ) ;; end varnamelist
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)))))
1533 (symbol
1534 opt-template-specifier
1535 ,(semantic-lambda
1536 (list
1537 (nth 0 vals)))
1539 ) ;; end namespace-symbol
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)))))
1557 (symbol
1558 ,(semantic-lambda
1559 (list
1560 (nth 0 vals)))
1562 ) ;; end namespace-symbol-for-typeformbase
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)))))
1579 (symbol
1580 opt-template-specifier
1581 punctuation
1582 "\\`[:]\\'"
1583 punctuation
1584 "\\`[:]\\'"
1585 ,(semantic-lambda
1586 (list
1587 (nth 0 vals)))
1589 ) ;; end namespace-opt-class
1591 (opt-class
1592 (namespace-opt-class
1593 ,(semantic-lambda
1594 (nth 0 vals))
1596 ( ;;EMPTY
1597 ,(semantic-lambda
1598 (list nil))
1600 ) ;; end opt-class
1602 (opt-destructor
1603 (punctuation
1604 "\\`[~]\\'"
1605 ,(semantic-lambda
1606 (list t))
1608 ( ;;EMPTY
1609 ,(semantic-lambda
1610 (list nil))
1612 ) ;; end opt-destructor
1614 (arg-list
1615 (semantic-list
1616 "^("
1617 knr-arguments
1618 ,(semantic-lambda
1619 (nth 1 vals))
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
1632 (semantic-list
1633 "^(void)$"
1634 ,(semantic-lambda)
1636 ) ;; end arg-list
1638 (knr-varnamelist
1639 (varname
1640 punctuation
1641 "\\`[,]\\'"
1642 knr-varnamelist
1643 ,(semantic-lambda
1644 (cons
1645 (nth 0 vals)
1646 (nth 2 vals)))
1648 (varname
1649 ,(semantic-lambda
1650 (list
1651 (nth 0 vals)))
1653 ) ;; end knr-varnamelist
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
1666 (member
1667 "const"
1668 (append
1669 (nth 2 vals))) t nil) :typemodifiers
1670 (delete
1671 "const"
1672 (nth 2 vals))))
1674 ) ;; end knr-one-variable-decl
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)))
1687 (knr-one-variable-decl
1688 punctuation
1689 "\\`[;]\\'"
1690 ,(semantic-lambda
1691 (semantic-expand-c-tag
1692 (nth 0 vals)))
1694 ) ;; end knr-arguments
1696 (arg-sub-list
1697 (variablearg
1698 ,(semantic-lambda
1699 (nth 0 vals))
1701 (punctuation
1702 "\\`[.]\\'"
1703 punctuation
1704 "\\`[.]\\'"
1705 punctuation
1706 "\\`[.]\\'"
1707 close-paren
1709 ,(semantic-lambda
1710 (semantic-tag-new-variable
1711 "..."
1712 "vararg" nil))
1714 (punctuation
1715 "\\`[,]\\'"
1716 ,(semantic-lambda
1717 (list nil))
1719 (open-paren
1721 ,(semantic-lambda
1722 (list nil))
1724 (close-paren
1726 ,(semantic-lambda
1727 (list nil))
1729 ) ;; end arg-sub-list
1731 (operatorsym
1732 (punctuation
1733 "\\`[<]\\'"
1734 punctuation
1735 "\\`[<]\\'"
1736 punctuation
1737 "\\`[=]\\'"
1738 ,(semantic-lambda
1739 (list
1740 "<<="))
1742 (punctuation
1743 "\\`[>]\\'"
1744 punctuation
1745 "\\`[>]\\'"
1746 punctuation
1747 "\\`[=]\\'"
1748 ,(semantic-lambda
1749 (list
1750 ">>="))
1752 (punctuation
1753 "\\`[<]\\'"
1754 punctuation
1755 "\\`[<]\\'"
1756 ,(semantic-lambda
1757 (list
1758 "<<"))
1760 (punctuation
1761 "\\`[>]\\'"
1762 punctuation
1763 "\\`[>]\\'"
1764 ,(semantic-lambda
1765 (list
1766 ">>"))
1768 (punctuation
1769 "\\`[=]\\'"
1770 punctuation
1771 "\\`[=]\\'"
1772 ,(semantic-lambda
1773 (list
1774 "=="))
1776 (punctuation
1777 "\\`[<]\\'"
1778 punctuation
1779 "\\`[=]\\'"
1780 ,(semantic-lambda
1781 (list
1782 "<="))
1784 (punctuation
1785 "\\`[>]\\'"
1786 punctuation
1787 "\\`[=]\\'"
1788 ,(semantic-lambda
1789 (list
1790 ">="))
1792 (punctuation
1793 "\\`[!]\\'"
1794 punctuation
1795 "\\`[=]\\'"
1796 ,(semantic-lambda
1797 (list
1798 "!="))
1800 (punctuation
1801 "\\`[+]\\'"
1802 punctuation
1803 "\\`[=]\\'"
1804 ,(semantic-lambda
1805 (list
1806 "+="))
1808 (punctuation
1809 "\\`[-]\\'"
1810 punctuation
1811 "\\`[=]\\'"
1812 ,(semantic-lambda
1813 (list
1814 "-="))
1816 (punctuation
1817 "\\`[*]\\'"
1818 punctuation
1819 "\\`[=]\\'"
1820 ,(semantic-lambda
1821 (list
1822 "*="))
1824 (punctuation
1825 "\\`[/]\\'"
1826 punctuation
1827 "\\`[=]\\'"
1828 ,(semantic-lambda
1829 (list
1830 "/="))
1832 (punctuation
1833 "\\`[%]\\'"
1834 punctuation
1835 "\\`[=]\\'"
1836 ,(semantic-lambda
1837 (list
1838 "%="))
1840 (punctuation
1841 "\\`[&]\\'"
1842 punctuation
1843 "\\`[=]\\'"
1844 ,(semantic-lambda
1845 (list
1846 "&="))
1848 (punctuation
1849 "\\`[|]\\'"
1850 punctuation
1851 "\\`[=]\\'"
1852 ,(semantic-lambda
1853 (list
1854 "|="))
1856 (punctuation
1857 "\\`[-]\\'"
1858 punctuation
1859 "\\`[>]\\'"
1860 punctuation
1861 "\\`[*]\\'"
1862 ,(semantic-lambda
1863 (list
1864 "->*"))
1866 (punctuation
1867 "\\`[-]\\'"
1868 punctuation
1869 "\\`[>]\\'"
1870 ,(semantic-lambda
1871 (list
1872 "->"))
1874 (semantic-list
1875 "()"
1876 ,(semantic-lambda
1877 (list
1878 "()"))
1880 (semantic-list
1881 "\\[\\]"
1882 ,(semantic-lambda
1883 (list
1884 "[]"))
1886 (punctuation
1887 "\\`[<]\\'")
1888 (punctuation
1889 "\\`[>]\\'")
1890 (punctuation
1891 "\\`[*]\\'")
1892 (punctuation
1893 "\\`[+]\\'"
1894 punctuation
1895 "\\`[+]\\'"
1896 ,(semantic-lambda
1897 (list
1898 "++"))
1900 (punctuation
1901 "\\`[+]\\'")
1902 (punctuation
1903 "\\`[-]\\'"
1904 punctuation
1905 "\\`[-]\\'"
1906 ,(semantic-lambda
1907 (list
1908 "--"))
1910 (punctuation
1911 "\\`[-]\\'")
1912 (punctuation
1913 "\\`[&]\\'"
1914 punctuation
1915 "\\`[&]\\'"
1916 ,(semantic-lambda
1917 (list
1918 "&&"))
1920 (punctuation
1921 "\\`[&]\\'")
1922 (punctuation
1923 "\\`[|]\\'"
1924 punctuation
1925 "\\`[|]\\'"
1926 ,(semantic-lambda
1927 (list
1928 "||"))
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 "^="))
1952 (punctuation
1953 "\\`\\^\\'")
1954 ) ;; end operatorsym
1956 (functionname
1957 (OPERATOR
1958 operatorsym
1959 ,(semantic-lambda
1960 (nth 1 vals))
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))
1971 (symbol
1972 ,(semantic-lambda
1973 (list
1974 (nth 0 vals)))
1976 ) ;; end functionname
1978 (function-pointer
1979 (open-paren
1981 punctuation
1982 "\\`[*]\\'"
1983 symbol
1984 close-paren
1986 ,(semantic-lambda
1987 (list
1988 (concat
1990 (nth 2 vals))))
1992 ) ;; end function-pointer
1994 (fun-or-proto-end
1995 (punctuation
1996 "\\`[;]\\'"
1997 ,(semantic-lambda
1998 (list t))
2000 (semantic-list
2001 ,(semantic-lambda
2002 (list nil))
2004 (punctuation
2005 "\\`[=]\\'"
2006 number
2007 "^0$"
2008 punctuation
2009 "\\`[;]\\'"
2010 ,(semantic-lambda
2011 (list ':pure-virtual-flag))
2013 (fun-try-end
2014 ,(semantic-lambda
2015 (list nil))
2017 ) ;; end fun-or-proto-end
2019 (fun-try-end
2020 (TRY
2021 opt-initializers
2022 semantic-list
2023 "^{"
2024 fun-try-several-catches
2025 ,(semantic-lambda
2026 (list nil))
2028 ) ;; end fun-try-end
2030 (fun-try-several-catches
2031 (CATCH
2032 semantic-list
2033 "^("
2034 semantic-list
2035 "^{"
2036 fun-try-several-catches
2037 ,(semantic-lambda)
2039 (CATCH
2040 semantic-list
2041 "^{"
2042 fun-try-several-catches
2043 ,(semantic-lambda)
2045 ( ;;EMPTY
2046 ,(semantic-lambda)
2048 ) ;; end fun-try-several-catches
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))
2060 ) ;; end type-cast
2062 (type-cast-list
2063 (open-paren
2064 typeformbase
2065 close-paren)
2066 ) ;; end type-cast-list
2068 (opt-stuff-after-symbol
2069 (semantic-list
2070 "^(")
2071 (semantic-list
2072 "\\[.*\\]$")
2073 ( ;;EMPTY
2075 ) ;; end opt-stuff-after-symbol
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
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)))))
2104 (string
2105 ,(semantic-lambda
2106 (list
2107 (nth 0 vals)))
2109 ) ;; end string-seq
2111 (expr-start
2112 (punctuation
2113 "\\`[-]\\'")
2114 (punctuation
2115 "\\`[+]\\'")
2116 (punctuation
2117 "\\`[*]\\'")
2118 (punctuation
2119 "\\`[&]\\'")
2120 ) ;; end expr-start
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
2145 (expression
2146 (unaryexpression
2147 expr-binop
2148 unaryexpression
2149 ,(semantic-lambda
2150 (list
2151 (identity start)
2152 (identity end)))
2154 (unaryexpression
2155 ,(semantic-lambda
2156 (list
2157 (identity start)
2158 (identity end)))
2160 ) ;; end expression
2162 (unaryexpression
2163 (number)
2164 (multi-stage-dereference)
2165 (NEW
2166 multi-stage-dereference)
2167 (NEW
2168 builtintype-types
2169 semantic-list)
2170 (namespace-symbol)
2171 (string-seq)
2172 (type-cast
2173 expression)
2174 (semantic-list
2175 expression)
2176 (semantic-list)
2177 (expr-start
2178 expression)
2179 ) ;; end unaryexpression
2181 "Parser table.")
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)
2192 ;;; Epilogue
2195 (provide 'semantic/bovine/c-by)
2197 ;; arch-tag: 27da9f71-d2ef-473f-92a7-b0006b1a8491
2198 ;;; semantic/bovine/c-by.el ends here