Commit a60a2b6d authored by David Engster's avatar David Engster
Browse files

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.
parent 9d37482c
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
......
......@@ -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
;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment