[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/last-cedet-merge f3674d0 33/37: semantic: Parse C+
From: |
David Engster |
Subject: |
[Emacs-diffs] scratch/last-cedet-merge f3674d0 33/37: semantic: Parse C++ override/final correctly |
Date: |
Sun, 22 Jan 2017 21:26:33 +0000 (UTC) |
branch: scratch/last-cedet-merge
commit f3674d05e58768c41ed2383563ccb44300bd5d49
Author: Ramkumar Ramachandra <address@hidden>
Commit: David Engster <address@hidden>
semantic: Parse C++ override/final correctly
override and final are a perfectly good opt-post-fcn-modifiers in
C++. Parse them correctly.
* admin/grammars/c.by (post-fcn-modifiers): Add tokens OVERRIDE and
FINAL.
* lisp/cedet/semantic/bovine/c.el (semantic-c-reconstitute-token): Add
:override-flag and :final-flag.
Copyright-paperwork-exempt: yes
---
admin/grammars/c.by | 6 ++++++
lisp/cedet/semantic/bovine/c.el | 4 +++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/admin/grammars/c.by b/admin/grammars/c.by
index 094e8d8..38a33f9 100644
--- a/admin/grammars/c.by
+++ b/admin/grammars/c.by
@@ -143,6 +143,10 @@
%put THROW summary "<type> <methoddef> (<method args>) throw (<exception>) ..."
%token REENTRANT "reentrant"
%put REENTRANT summary "<type> <methoddef> (<method args>) reentrant ..."
+%token OVERRIDE "override"
+%put OVERRIDE summary "<type> <methoddef> (<method args>) override ..."
+%token FINAL "final"
+%put FINAL summary "<type> <methoddef> (<method args>) final ..."
%token TRY "try"
%token CATCH "catch"
%put { TRY CATCH } summary "try { <body> } catch { <catch code> }"
@@ -852,6 +856,8 @@ opt-post-fcn-modifiers
post-fcn-modifiers
: REENTRANT
| CONST
+ | OVERRIDE
+ | FINAL
;
opt-throw
diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el
index 449a763..a72b0dd 100644
--- a/lisp/cedet/semantic/bovine/c.el
+++ b/lisp/cedet/semantic/bovine/c.el
@@ -1362,8 +1362,10 @@ Optional argument STAR and REF indicate the number of *
and & in the typedef."
;; `throws' as a common name for things that toss
;; exceptions about.
:throws (nth 5 tokenpart)
- ;; Reentrant is a C++ thingy. Add it here
+ ;; Reentrant, override, final are a C++ things. Add it here.
:reentrant-flag (if (member "reentrant" (nth 6 tokenpart)) t)
+ :override-flag (if (member "override" (nth 6 tokenpart)) t)
+ :final-flag (if (member "final" (nth 6 tokenpart)) t)
;; A function post-const is funky. Try stuff
:methodconst-flag (if (member "const" (nth 6 tokenpart)) t)
;; prototypes are functions w/ no body
- [Emacs-diffs] scratch/last-cedet-merge 47471b9 12/37: EDE: Add missing require and silence byte compiler, (continued)
- [Emacs-diffs] scratch/last-cedet-merge 47471b9 12/37: EDE: Add missing require and silence byte compiler, David Engster, 2017/01/22
- [Emacs-diffs] scratch/last-cedet-merge 6ca095c 21/37: semantic: Add autoload for Add autoload for `semantic-analyze-debug-assist', David Engster, 2017/01/22
- [Emacs-diffs] scratch/last-cedet-merge 5cb7aed 22/37: semantic: New c-mode override for analyzing tag type members, David Engster, 2017/01/22
- [Emacs-diffs] scratch/last-cedet-merge 8571383 16/37: semantic: Incorporate local scope when finding type, David Engster, 2017/01/22
- [Emacs-diffs] scratch/last-cedet-merge 74263b1 37/37: semantic: Change unary expression rule, David Engster, 2017/01/22
- [Emacs-diffs] scratch/last-cedet-merge 03c5f0d 25/37: semantic: Add more syntax modifications for scheme lexer, David Engster, 2017/01/22
- [Emacs-diffs] scratch/last-cedet-merge ebc59a5 19/37: semantic: Accept FLAGS parameter for srecode-template-mode, David Engster, 2017/01/22
- [Emacs-diffs] scratch/last-cedet-merge 02644fe 36/37: semantic: Add missing save-excursion for scope calculation, David Engster, 2017/01/22
- [Emacs-diffs] scratch/last-cedet-merge 278c06c 31/37: semantic: Optimize 'typeformbase' in C grammar, David Engster, 2017/01/22
- [Emacs-diffs] scratch/last-cedet-merge cfd7139 28/37: semantic: Some C grammar optimizations, David Engster, 2017/01/22
- [Emacs-diffs] scratch/last-cedet-merge f3674d0 33/37: semantic: Parse C++ override/final correctly,
David Engster <=
- [Emacs-diffs] scratch/last-cedet-merge 6d6b045 27/37: EDE: Improve Emacs project type, David Engster, 2017/01/22
- [Emacs-diffs] scratch/last-cedet-merge b4bcc84 32/37: semantic: completion fixes, David Engster, 2017/01/22