+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
;
function-pointer
- : LPAREN STAR symbol RPAREN
- ( (concat "*" $3) )
+ : LPAREN STAR opt-symbol RPAREN
+ ( (concat "*" ,(car $3)) )
| LPAREN symbol RPAREN
( $2 )
;
: 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
;