emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/last-cedet-merge 278c06c 31/37: semantic: Optimize


From: David Engster
Subject: [Emacs-diffs] scratch/last-cedet-merge 278c06c 31/37: semantic: Optimize 'typeformbase' in C grammar
Date: Sun, 22 Jan 2017 21:26:33 +0000 (UTC)

branch: scratch/last-cedet-merge
commit 278c06c55479bca6ccbde13239de9a868fd8db23
Author: Eric Ludlam <address@hidden>
Commit: David Engster <address@hidden>

    semantic: Optimize 'typeformbase' in C grammar
    
    * admin/grammar/c.by (typeformbase): Replace two rules that could
     match the same with one. Replace special
     'namespace-symbol-for-typeformbase' with just 'namespace-symbol'.
     (namespace-symbol): Force that a symbol @ end can
     never have a template specifier.
     (opt-namespace-symbol-more): This must now always be
     '::namespace-symbol'.
     (namespace-symbol-for-typeformbase): Deleted.
---
 admin/grammars/c.by |   25 ++++---------------------
 1 file changed, 4 insertions(+), 21 deletions(-)

diff --git a/admin/grammars/c.by b/admin/grammars/c.by
index ccdf808..094e8d8 100644
--- a/admin/grammars/c.by
+++ b/admin/grammars/c.by
@@ -712,11 +712,7 @@ typeformbase
     (TYPE-TAG $2 $1 nil nil )
   | builtintype
     ( ,$1 )
-  | symbol template-specifier
-    (TYPE-TAG $1 "class" nil nil :template-specifier $2)
- ;;| namespace-symbol opt-stars opt-template-specifier
- ;;| namespace-symbol opt-template-specifier
-  | namespace-symbol-for-typeformbase opt-template-specifier
+  | namespace-symbol opt-template-specifier
     (TYPE-TAG (car $1) "class" nil nil
              :template-specifier $2)
   | symbol
@@ -964,29 +960,16 @@ opt-varnamelist-more
 namespace-symbol
   : symbol opt-template-specifier opt-namespace-symbol-more
     ( (concat $1 (car $3) ) )
+ ;; Don't accept template specifiers at the end.
+  | symbol
+    ( $1 )
   ;
 
 opt-namespace-symbol-more
   : COLON COLON namespace-symbol
     ( (concat "::" (car $3)) )
-  | ;; empty
-    ( "" )
   ;
 
-;; Don't pull an optional template specifier at the end of the
-;; namespace symbol so that it can be picked up by the type.
-namespace-symbol-for-typeformbase
-  : symbol opt-template-specifier COLON COLON namespace-symbol-for-typeformbase
-    ( (concat $1 "::" (car $5)) )
-  | symbol
-    ( $1 )
-  ;
-;; namespace-symbol
-;;   : symbol COLON COLON namespace-symbol
-;;     ( (concat $1 "::" (car $4)) )
-;;   | symbol
-;;     ( $1 )
-;;   ;
 
 namespace-opt-class
   : symbol COLON COLON namespace-opt-class



reply via email to

[Prev in Thread] Current Thread [Next in Thread]