aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorDavid Engster2013-12-12 23:09:15 +0100
committerDavid Engster2013-12-12 23:09:15 +0100
commit2cc82b9fbc6e67878e89d7006cc69ffb5227daa1 (patch)
tree89215b4bb7a781a62c99a49f0eb1a8a093ce1ed3 /admin
parent163e99358a71463d72c9339b4ae7b2795dd7290b (diff)
parentb0fe992f3657cf3c852c00d662783354fdab343d (diff)
downloademacs-2cc82b9fbc6e67878e89d7006cc69ffb5227daa1.tar.gz
emacs-2cc82b9fbc6e67878e89d7006cc69ffb5227daa1.zip
Merge from CEDET upstream.
Diffstat (limited to 'admin')
-rw-r--r--admin/ChangeLog15
-rw-r--r--admin/grammars/c.by23
2 files changed, 27 insertions, 11 deletions
diff --git a/admin/ChangeLog b/admin/ChangeLog
index e31c7251ffb..f49061e35df 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,3 +1,18 @@
12013-12-12 David Engster <deng@randomsample.de>
2
3 * grammars/c.by (expr-binop): Add MOD.
4 (variablearg): Add 'opt-assign'.
5 (variablearg, varnamelist): Add default values so that it can be
6 later expanded into the tag.
7 (opt-stuff-after-symbol): Rename to 'brackets-after-symbol' and
8 remove empty match.
9 (multi-stage-dereference): Adapt to above rename.
10 (unaryexpression): Use 'symbol' instead of 'namespace-symbol',
11 since the latter also leads to an empty match at the end which
12 would make this too greedy.
13 (variablearg-opt-name): Support parsing of function pointers
14 inside an argument list.
15
12013-12-12 Glenn Morris <rgm@gnu.org> 162013-12-12 Glenn Morris <rgm@gnu.org>
2 17
3 * update_autogen (info_dir): 18 * update_autogen (info_dir):
diff --git a/admin/grammars/c.by b/admin/grammars/c.by
index 55ec0fbaf01..7aafe7b90f3 100644
--- a/admin/grammars/c.by
+++ b/admin/grammars/c.by
@@ -901,8 +901,8 @@ varname
901;; I should store more in this def, but leave it simple for now. 901;; I should store more in this def, but leave it simple for now.
902;; Klaus Berndl: const and volatile can be written after the type! 902;; Klaus Berndl: const and volatile can be written after the type!
903variablearg 903variablearg
904 : declmods typeformbase cv-declmods opt-ref variablearg-opt-name 904 : declmods typeformbase cv-declmods opt-ref variablearg-opt-name opt-assign
905 ( VARIABLE-TAG (list $5) $2 nil 905 ( VARIABLE-TAG (list (append $5 ,$6)) $2 nil
906 :constant-flag (if (member "const" (append $1 $3)) t nil) 906 :constant-flag (if (member "const" (append $1 $3)) t nil)
907 :typemodifiers (delete "const" (append $1 $3)) 907 :typemodifiers (delete "const" (append $1 $3))
908 :reference (car ,$4) 908 :reference (car ,$4)
@@ -912,6 +912,8 @@ variablearg
912variablearg-opt-name 912variablearg-opt-name
913 : varname 913 : varname
914 ( ,$1 ) 914 ( ,$1 )
915 | semantic-list arg-list
916 ( (car ( EXPAND $1 function-pointer )) $2)
915 ;; Klaus Berndl: This allows variableargs without a arg-name being 917 ;; Klaus Berndl: This allows variableargs without a arg-name being
916 ;; parsed correct even if there several pointers (*) 918 ;; parsed correct even if there several pointers (*)
917 | opt-stars 919 | opt-stars
@@ -926,9 +928,9 @@ varname-opt-initializer
926 928
927varnamelist 929varnamelist
928 : opt-ref varname varname-opt-initializer COMA varnamelist 930 : opt-ref varname varname-opt-initializer COMA varnamelist
929 ( ,(cons $2 $5) ) 931 ( ,(cons (append $2 $3) $5) )
930 | opt-ref varname varname-opt-initializer 932 | opt-ref varname varname-opt-initializer
931 ( $2 ) 933 ( (append $2 $3) )
932 ; 934 ;
933 935
934;; Klaus Berndl: Is necessary to parse stuff like 936;; Klaus Berndl: Is necessary to parse stuff like
@@ -1152,16 +1154,15 @@ type-cast-list
1152 : open-paren typeformbase close-paren 1154 : open-paren typeformbase close-paren
1153 ; 1155 ;
1154 1156
1155opt-stuff-after-symbol 1157brackets-after-symbol
1156 : PAREN_BLCK 1158 : PAREN_BLCK
1157 | BRACK_BLCK 1159 | BRACK_BLCK
1158 | ;; EMPTY
1159 ; 1160 ;
1160 1161
1161multi-stage-dereference 1162multi-stage-dereference
1162 : namespace-symbol opt-stuff-after-symbol PERIOD multi-stage-dereference ;; method call 1163 : namespace-symbol brackets-after-symbol PERIOD multi-stage-dereference ;; method call
1163 | namespace-symbol opt-stuff-after-symbol MINUS GREATER multi-stage-dereference ;;method call 1164 | namespace-symbol brackets-after-symbol MINUS GREATER multi-stage-dereference ;;method call
1164 | namespace-symbol opt-stuff-after-symbol 1165 | namespace-symbol brackets-after-symbol
1165 ; 1166 ;
1166 1167
1167string-seq 1168string-seq
@@ -1187,6 +1188,7 @@ expr-binop
1187 | AMPERSAND 1188 | AMPERSAND
1188 | OR OR 1189 | OR OR
1189 | OR 1190 | OR
1191 | MOD
1190 ;; There are more. 1192 ;; There are more.
1191 ; 1193 ;
1192 1194
@@ -1204,8 +1206,7 @@ unaryexpression
1204 | multi-stage-dereference 1206 | multi-stage-dereference
1205 | NEW multi-stage-dereference 1207 | NEW multi-stage-dereference
1206 | NEW builtintype-types semantic-list 1208 | NEW builtintype-types semantic-list
1207 ;; Klaus Berndl: symbol -> namespace-symbol! 1209 | symbol
1208 | namespace-symbol
1209 ;; Klaus Berndl: C/C++ allows sequences of strings which are 1210 ;; Klaus Berndl: C/C++ allows sequences of strings which are
1210 ;; concatenated by the precompiler to one string 1211 ;; concatenated by the precompiler to one string
1211 | string-seq 1212 | string-seq