diff options
| author | David Engster | 2014-02-06 21:57:24 +0100 |
|---|---|---|
| committer | David Engster | 2014-02-06 21:57:24 +0100 |
| commit | a60a2b6db23998bc02f3b5d5c9fb64205d21d357 (patch) | |
| tree | deb0c8852735353cf580e8c18412dde25925c69c /admin | |
| parent | 9d37482ce3aeea8a99add51f57fd355996f6d3a9 (diff) | |
| download | emacs-a60a2b6db23998bc02f3b5d5c9fb64205d21d357.tar.gz emacs-a60a2b6db23998bc02f3b5d5c9fb64205d21d357.zip | |
Grammar bug fixes from CEDET upstream.
* grammars/c.by (function-pointer): Correctly deal with anonymous
function pointers.
(opt-brackets-after-symbol): New.
(multi-stage-dereference): Use it. Add rules for explicit
matching the last dereference.
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/ChangeLog | 8 | ||||
| -rw-r--r-- | admin/grammars/c.by | 19 |
2 files changed, 23 insertions, 4 deletions
diff --git a/admin/ChangeLog b/admin/ChangeLog index 35af2d5dfda..3695deff983 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2014-02-06 David Engster <deng@randomsample.de> | ||
| 2 | |||
| 3 | * grammars/c.by (function-pointer): Correctly deal with anonymous | ||
| 4 | function pointers. | ||
| 5 | (opt-brackets-after-symbol): New. | ||
| 6 | (multi-stage-dereference): Use it. Add rules for explicit | ||
| 7 | matching the last dereference. | ||
| 8 | |||
| 1 | 2014-01-16 Eric S. Raymond <esr@thyrsus.com> | 9 | 2014-01-16 Eric S. Raymond <esr@thyrsus.com> |
| 2 | 10 | ||
| 3 | * notes/commits: Add a 'graph on VCS-independent ways of | 11 | * notes/commits: Add a 'graph on VCS-independent ways of |
diff --git a/admin/grammars/c.by b/admin/grammars/c.by index fa85689c13b..0fd8a33f25a 100644 --- a/admin/grammars/c.by +++ b/admin/grammars/c.by | |||
| @@ -1113,8 +1113,8 @@ functionname | |||
| 1113 | ; | 1113 | ; |
| 1114 | 1114 | ||
| 1115 | function-pointer | 1115 | function-pointer |
| 1116 | : LPAREN STAR symbol RPAREN | 1116 | : LPAREN STAR opt-symbol RPAREN |
| 1117 | ( (concat "*" $3) ) | 1117 | ( (concat "*" ,(car $3)) ) |
| 1118 | | LPAREN symbol RPAREN | 1118 | | LPAREN symbol RPAREN |
| 1119 | ( $2 ) | 1119 | ( $2 ) |
| 1120 | ; | 1120 | ; |
| @@ -1154,14 +1154,25 @@ type-cast-list | |||
| 1154 | : open-paren typeformbase close-paren | 1154 | : open-paren typeformbase close-paren |
| 1155 | ; | 1155 | ; |
| 1156 | 1156 | ||
| 1157 | opt-brackets-after-symbol | ||
| 1158 | : brackets-after-symbol | ||
| 1159 | | ;; EMPTY | ||
| 1160 | ; | ||
| 1161 | |||
| 1157 | brackets-after-symbol | 1162 | brackets-after-symbol |
| 1158 | : PAREN_BLCK | 1163 | : PAREN_BLCK |
| 1159 | | BRACK_BLCK | 1164 | | BRACK_BLCK |
| 1160 | ; | 1165 | ; |
| 1161 | 1166 | ||
| 1162 | multi-stage-dereference | 1167 | multi-stage-dereference |
| 1163 | : namespace-symbol brackets-after-symbol PERIOD multi-stage-dereference ;; method call | 1168 | : namespace-symbol opt-brackets-after-symbol |
| 1164 | | namespace-symbol brackets-after-symbol MINUS GREATER multi-stage-dereference ;;method call | 1169 | PERIOD multi-stage-dereference ;; method call |
| 1170 | | namespace-symbol opt-brackets-after-symbol | ||
| 1171 | MINUS GREATER multi-stage-dereference ;;method call | ||
| 1172 | | namespace-symbol opt-brackets-after-symbol | ||
| 1173 | PERIOD namespace-symbol opt-brackets-after-symbol | ||
| 1174 | | namespace-symbol opt-brackets-after-symbol | ||
| 1175 | MINUS GREATER namespace-symbol opt-brackets-after-symbol | ||
| 1165 | | namespace-symbol brackets-after-symbol | 1176 | | namespace-symbol brackets-after-symbol |
| 1166 | ; | 1177 | ; |
| 1167 | 1178 | ||