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