diff options
author | David Engster <dengste@eml.cc> | 2014-02-06 21:57:24 +0100 |
---|---|---|
committer | David Engster <dengste@eml.cc> | 2014-02-06 21:57:24 +0100 |
commit | a60a2b6db23998bc02f3b5d5c9fb64205d21d357 (patch) | |
tree | deb0c8852735353cf580e8c18412dde25925c69c /admin/grammars | |
parent | 9d37482ce3aeea8a99add51f57fd355996f6d3a9 (diff) | |
download | emacs-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/grammars')
-rw-r--r-- | admin/grammars/c.by | 19 |
1 files changed, 15 insertions, 4 deletions
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 ; |