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