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