summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorDavid Engster <dengste@eml.cc>2014-02-06 21:57:24 +0100
committerDavid Engster <dengste@eml.cc>2014-02-06 21:57:24 +0100
commita60a2b6db23998bc02f3b5d5c9fb64205d21d357 (patch)
treedeb0c8852735353cf580e8c18412dde25925c69c /admin
parent9d37482ce3aeea8a99add51f57fd355996f6d3a9 (diff)
downloademacs-a60a2b6db23998bc02f3b5d5c9fb64205d21d357.tar.gz
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/ChangeLog8
-rw-r--r--admin/grammars/c.by19
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 @@
+2014-02-06 David Engster <deng@randomsample.de>
+
+ * 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.
+
2014-01-16 Eric S. Raymond <esr@thyrsus.com>
* 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
;
function-pointer
- : LPAREN STAR symbol RPAREN
- ( (concat "*" $3) )
+ : LPAREN STAR opt-symbol RPAREN
+ ( (concat "*" ,(car $3)) )
| LPAREN symbol RPAREN
( $2 )
;
@@ -1154,14 +1154,25 @@ type-cast-list
: open-paren typeformbase close-paren
;
+opt-brackets-after-symbol
+ : brackets-after-symbol
+ | ;; EMPTY
+ ;
+
brackets-after-symbol
: PAREN_BLCK
| BRACK_BLCK
;
multi-stage-dereference
- : namespace-symbol brackets-after-symbol PERIOD multi-stage-dereference ;; method call
- | namespace-symbol brackets-after-symbol MINUS GREATER multi-stage-dereference ;;method call
+ : namespace-symbol opt-brackets-after-symbol
+ PERIOD multi-stage-dereference ;; method call
+ | namespace-symbol opt-brackets-after-symbol
+ MINUS GREATER multi-stage-dereference ;;method call
+ | namespace-symbol opt-brackets-after-symbol
+ PERIOD namespace-symbol opt-brackets-after-symbol
+ | namespace-symbol opt-brackets-after-symbol
+ MINUS GREATER namespace-symbol opt-brackets-after-symbol
| namespace-symbol brackets-after-symbol
;