]> code.delx.au - gnu-emacs/blobdiff - admin/grammars/c.by
Update copyright year to 2015
[gnu-emacs] / admin / grammars / c.by
index 0fd8a33f25a6be2a268af65478a3cc1de53d94d7..8a3a194b00eb002c4d6f302df79a006071e599c5 100644 (file)
@@ -1,5 +1,5 @@
 ;;; c.by -- LL grammar for C/C++ language specification
-;; Copyright (C) 1999-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2015 Free Software Foundation, Inc.
 ;;
 ;; Author: Eric M. Ludlam <zappo@gnu.org>
 ;;         David Ponce <david@dponce.com>
@@ -64,6 +64,7 @@
 %token <punctuation>   PLUS       "\\`[+]\\'"
 %token <punctuation>   MINUS      "\\`[-]\\'"
 %token <punctuation>   BANG       "\\`[!]\\'"
+%token <punctuation>   QUESTION   "\\`[?]\\'"
 %token <punctuation>   EQUAL      "\\`[=]\\'"
 %token <punctuation>   LESS       "\\`[<]\\'"
 %token <punctuation>   GREATER    "\\`[>]\\'"
@@ -590,10 +591,12 @@ template-type
   | declmods typeformbase cv-declmods opt-stars
     opt-ref variablearg-opt-name
     (TYPE-TAG (car $2) nil nil nil
+             :template-specifier (plist-get (nth 2 $2) :template-specifier)
               :constant-flag (if (member "const" (append $1 $3)) t nil)
               :typemodifiers (delete "const" (append $1 $3))
               :reference (car ,$5)
               :pointer (car $4)
+             :typevar (car $6)
               )
   ;
 
@@ -832,7 +835,7 @@ opt-initializers
 
 opt-post-fcn-modifiers
   : post-fcn-modifiers opt-post-fcn-modifiers
-    ( ,(cons ,$1 $2) )
+    ( ,(cons ,(car $1) $2) )
   | ;;EMPTY
     ( nil )
   ;
@@ -1206,7 +1209,9 @@ expr-binop
 ;; Use expression for parsing only.  Don't actually return anything
 ;; for now.  Hopefully we can fix this later.
 expression
-  : unaryexpression expr-binop unaryexpression
+  : unaryexpression QUESTION unaryexpression COLON unaryexpression
+    ( (identity start) (identity end) )
+  | unaryexpression expr-binop unaryexpression
     ( (identity start) (identity end) )
   | unaryexpression
     ( (identity start) (identity end) )