emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100071: Fix errors in CEDET 1.0 m


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100071: Fix errors in CEDET 1.0 merge.
Date: Wed, 29 Sep 2010 12:09:21 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100071
committer: Chong Yidong <address@hidden>
branch nick: emacs-23
timestamp: Wed 2010-09-29 12:09:21 -0400
message:
  Fix errors in CEDET 1.0 merge.
  
  * semantic/tag.el (semantic-tag-version): Bump to 2.0.
  
  * semantic/db-typecache.el (semanticdb-typecache-find-default):
  * semantic/imenu.el (semantic-create-imenu-index):
  * semantic/grammar.el (semantic--grammar-macro-function-tag):
  * semantic/fw.el (semanticdb-without-unloaded-file-searches): Fix
  require.  Suggested by David Engster.
  
  * semantic/bovine/c-by.el: Regenerate.
  
  * semantic/lex-spp.el (semantic-lex-spp-debug-symbol): New var.
  (semantic-lex-spp-enable-debug-symbol): New command
  (semantic-lex-spp-value-valid-p)
  (semantic-lex-spp-validate-value): New functions
  (semantic-lex-spp-symbol-set)
  (semantic-lex-spp-symbol-push): Add call to validate value.
  (semantic-lex-spp-table-write-slot-value): Instead of erroring on
  invalid values during save, just save a nil.
modified:
  lisp/cedet/ChangeLog
  lisp/cedet/semantic/bovine/c-by.el
  lisp/cedet/semantic/db-typecache.el
  lisp/cedet/semantic/fw.el
  lisp/cedet/semantic/grammar.el
  lisp/cedet/semantic/imenu.el
  lisp/cedet/semantic/lex-spp.el
  lisp/cedet/semantic/tag.el
=== modified file 'lisp/cedet/ChangeLog'
--- a/lisp/cedet/ChangeLog      2010-09-25 18:49:43 +0000
+++ b/lisp/cedet/ChangeLog      2010-09-29 16:09:21 +0000
@@ -1,3 +1,26 @@
+2010-09-29  Chong Yidong  <address@hidden>
+
+       * semantic/tag.el (semantic-tag-version): Bump to 2.0.
+
+       * semantic/db-typecache.el (semanticdb-typecache-find-default):
+       * semantic/imenu.el (semantic-create-imenu-index):
+       * semantic/grammar.el (semantic--grammar-macro-function-tag):
+       * semantic/fw.el (semanticdb-without-unloaded-file-searches): Fix
+       require.  Suggested by David Engster.
+
+       * semantic/bovine/c-by.el: Regenerate.
+
+2010-09-29  Eric Ludlam  <address@hidden>
+
+       * semantic/lex-spp.el (semantic-lex-spp-debug-symbol): New var.
+       (semantic-lex-spp-enable-debug-symbol): New command
+       (semantic-lex-spp-value-valid-p)
+       (semantic-lex-spp-validate-value): New functions
+       (semantic-lex-spp-symbol-set)
+       (semantic-lex-spp-symbol-push): Add call to validate value.
+       (semantic-lex-spp-table-write-slot-value): Instead of erroring on
+       invalid values during save, just save a nil.
+
 2010-09-25  Chong Yidong  <address@hidden>
 
        * ede/linux.el (ede-project-class-files):

=== modified file 'lisp/cedet/semantic/bovine/c-by.el'
--- a/lisp/cedet/semantic/bovine/c-by.el        2010-01-13 08:35:10 +0000
+++ b/lisp/cedet/semantic/bovine/c-by.el        2010-09-29 16:09:21 +0000
@@ -1240,7 +1240,9 @@
         (nth 7 vals))
        (nth 0 vals)
        (nth 10 vals)
-       (nth 4 vals))
+       (list
+        (nth 4 vals))
+       (nth 9 vals))
       )
      (opt-stars
       opt-class
@@ -1262,7 +1264,9 @@
         (nth 6 vals))
        (nth 0 vals)
        (nth 9 vals)
-       (nth 4 vals))
+       (list
+        (nth 4 vals))
+       (nth 8 vals))
       )
      ) ;; end func-decl
 
@@ -1433,13 +1437,11 @@
       namespace-symbol
       opt-bits
       opt-array
-      opt-assign
       ,(semantic-lambda
        (nth 2 vals)
        (nth 0 vals)
        (nth 3 vals)
-       (nth 4 vals)
-       (nth 5 vals))
+       (nth 4 vals))
       )
      ) ;; end varname
 
@@ -1484,19 +1486,28 @@
       )
      ) ;; end variablearg-opt-name
 
+    (varname-opt-initializer
+     (semantic-list)
+     (opt-assign)
+     ( ;;EMPTY
+      )
+     ) ;; end varname-opt-initializer
+
     (varnamelist
      (opt-ref
       varname
+      varname-opt-initializer
       punctuation
       "\\`[,]\\'"
       varnamelist
       ,(semantic-lambda
        (cons
         (nth 1 vals)
-        (nth 3 vals)))
+        (nth 4 vals)))
       )
      (opt-ref
       varname
+      varname-opt-initializer
       ,(semantic-lambda
        (list
         (nth 1 vals)))
@@ -2108,74 +2119,64 @@
       "\\`[&]\\'")
      ) ;; end expr-start
 
+    (expr-binop
+     (punctuation
+      "\\`[-]\\'")
+     (punctuation
+      "\\`[+]\\'")
+     (punctuation
+      "\\`[*]\\'")
+     (punctuation
+      "\\`[/]\\'")
+     (punctuation
+      "\\`[&]\\'"
+      punctuation
+      "\\`[&]\\'")
+     (punctuation
+      "\\`[&]\\'")
+     (punctuation
+      "\\`[|]\\'"
+      punctuation
+      "\\`[|]\\'")
+     (punctuation
+      "\\`[|]\\'")
+     ) ;; end expr-binop
+
     (expression
-     (number
-      ,(semantic-lambda
-       (list
-        (identity start)
-        (identity end)))
-      )
-     (multi-stage-dereference
-      ,(semantic-lambda
-       (list
-        (identity start)
-        (identity end)))
-      )
+     (unaryexpression
+      expr-binop
+      unaryexpression
+      ,(semantic-lambda
+       (list
+        (identity start)
+        (identity end)))
+      )
+     (unaryexpression
+      ,(semantic-lambda
+       (list
+        (identity start)
+        (identity end)))
+      )
+     ) ;; end expression
+
+    (unaryexpression
+     (number)
+     (multi-stage-dereference)
      (NEW
-      multi-stage-dereference
-      ,(semantic-lambda
-       (list
-        (identity start)
-        (identity end)))
-      )
+      multi-stage-dereference)
      (NEW
       builtintype-types
-      semantic-list
-      ,(semantic-lambda
-       (list
-        (identity start)
-        (identity end)))
-      )
-     (namespace-symbol
-      ,(semantic-lambda
-       (list
-        (identity start)
-        (identity end)))
-      )
-     (string-seq
-      ,(semantic-lambda
-       (list
-        (identity start)
-        (identity end)))
-      )
+      semantic-list)
+     (namespace-symbol)
+     (string-seq)
      (type-cast
-      expression
-      ,(semantic-lambda
-       (list
-        (identity start)
-        (identity end)))
-      )
-     (semantic-list
-      expression
-      ,(semantic-lambda
-       (list
-        (identity start)
-        (identity end)))
-      )
-     (semantic-list
-      ,(semantic-lambda
-       (list
-        (identity start)
-        (identity end)))
-      )
+      expression)
+     (semantic-list
+      expression)
+     (semantic-list)
      (expr-start
-      expression
-      ,(semantic-lambda
-       (list
-        (identity start)
-        (identity end)))
-      )
-     ) ;; end expression
+      expression)
+     ) ;; end unaryexpression
     )
   "Parser table.")
 

=== modified file 'lisp/cedet/semantic/db-typecache.el'
--- a/lisp/cedet/semantic/db-typecache.el       2010-09-19 02:49:54 +0000
+++ b/lisp/cedet/semantic/db-typecache.el       2010-09-29 16:09:21 +0000
@@ -403,7 +403,7 @@
 PATH is the search path, which should be one table object.
 If FIND-FILE-MATCH is non-nil, then force the file belonging to the
 found tag to be loaded."
-  (if (not (and (featurep 'semanticdb) semanticdb-current-database))
+  (if (not (and (featurep 'semantic/db) semanticdb-current-database))
       nil ;; No DB, no search
     (save-excursion
       (semanticdb-typecache-find-method (or path semanticdb-current-table)

=== modified file 'lisp/cedet/semantic/fw.el'
--- a/lisp/cedet/semantic/fw.el 2010-09-19 02:49:54 +0000
+++ b/lisp/cedet/semantic/fw.el 2010-09-29 16:09:21 +0000
@@ -315,7 +315,7 @@
 (defmacro semanticdb-without-unloaded-file-searches (forms)
   "Execute FORMS with `unloaded' removed from the current throttle."
   `(let ((semanticdb-find-default-throttle
-         (if (featurep 'semanticdb-find)
+         (if (featurep 'semantic/db-find)
              (remq 'unloaded semanticdb-find-default-throttle)
            nil)))
      ,forms))

=== modified file 'lisp/cedet/semantic/grammar.el'
--- a/lisp/cedet/semantic/grammar.el    2010-09-19 02:49:54 +0000
+++ b/lisp/cedet/semantic/grammar.el    2010-09-29 16:09:21 +0000
@@ -1519,7 +1519,7 @@
   (car (semantic-find-tags-by-class
         'function
         (or (semantic-find-tags-by-name name (current-buffer))
-            (and (featurep 'semanticdb)
+            (and (featurep 'semantic/db)
                  semanticdb-current-database
                  (cdar (semanticdb-find-tags-by-name name nil t)))))))
 

=== modified file 'lisp/cedet/semantic/imenu.el'
--- a/lisp/cedet/semantic/imenu.el      2010-09-19 02:49:54 +0000
+++ b/lisp/cedet/semantic/imenu.el      2010-09-29 16:09:21 +0000
@@ -235,7 +235,7 @@
   (setq imenu-default-goto-function 'semantic-imenu-goto-function)
   (prog1
       (if (and semantic-imenu-index-directory
-               (featurep 'semanticdb)
+               (featurep 'semantic/db)
                (semanticdb-minor-mode-p))
           (semantic-create-imenu-directory-index
           (or stream (semantic-fetch-tags-fast)))

=== modified file 'lisp/cedet/semantic/lex-spp.el'
--- a/lisp/cedet/semantic/lex-spp.el    2010-09-19 02:49:54 +0000
+++ b/lisp/cedet/semantic/lex-spp.el    2010-09-29 16:09:21 +0000
@@ -173,10 +173,42 @@
       (setq semantic-lex-spp-dynamic-macro-symbol-obarray-stack
            (make-vector 13 0))))
 
+(defun semantic-lex-spp-value-valid-p (value)
+  "Return non-nil if VALUE is valid."
+  (or (null value)
+      (stringp value)
+      (and (consp value)
+          (or (semantic-lex-token-p (car value))
+              (eq (car (car value)) 'spp-arg-list)))))
+
+(defvar semantic-lex-spp-debug-symbol nil
+  "A symbol to break on if it is being set somewhere.")
+
+(defun semantic-lex-spp-enable-debug-symbol (sym)
+  "Enable debugging for symbol SYM.
+Disable debugging by entering nothing."
+  (interactive "sSymbol: ")
+  (if (string= sym "")
+      (setq semantic-lex-spp-debug-symbol nil)
+    (setq semantic-lex-spp-debug-symbol sym)))
+
+(defmacro semantic-lex-spp-validate-value (name value)
+  "Validate the NAME and VALUE of a macro before it is set."
+;  `(progn
+;     (when (not (semantic-lex-spp-value-valid-p ,value))
+;       (error "Symbol \"%s\" with bogus value %S" ,name ,value))
+;     (when (and semantic-lex-spp-debug-symbol
+;              (string= semantic-lex-spp-debug-symbol name))
+;       (debug))
+;     )
+  nil
+  )
+
 (defun semantic-lex-spp-symbol-set (name value &optional obarray-in)
   "Set value of spp symbol with NAME to VALUE and return VALUE.
 If optional OBARRAY-IN is non-nil, then use that obarray instead of
 the dynamic map."
+  (semantic-lex-spp-validate-value name value)
   (if (and (stringp value) (string= value "")) (setq value nil))
   (set (intern name (or obarray-in
                        (semantic-lex-spp-dynamic-map)))
@@ -192,6 +224,7 @@
 (defun semantic-lex-spp-symbol-push (name value)
   "Push macro NAME with VALUE into the map.
 Reverse with `semantic-lex-spp-symbol-pop'."
+  (semantic-lex-spp-validate-value name value)
   (let* ((map (semantic-lex-spp-dynamic-map))
         (stack (semantic-lex-spp-dynamic-map-stack))
         (mapsym (intern name map))

=== modified file 'lisp/cedet/semantic/tag.el'
--- a/lisp/cedet/semantic/tag.el        2010-09-19 02:49:54 +0000
+++ b/lisp/cedet/semantic/tag.el        2010-09-29 16:09:21 +0000
@@ -53,7 +53,7 @@
 (declare-function semantic-fetch-tags "semantic")
 (declare-function semantic-clear-toplevel-cache "semantic")
 
-(defconst semantic-tag-version "2.0pre7"
+(defconst semantic-tag-version "2.0"
   "Version string of semantic tags made with this code.")
 
 (defconst semantic-tag-incompatible-version "1.0"
@@ -221,6 +221,7 @@
           ;; beginning of TAG.
           (or (and (>= (point) start) (< (point) end))
               (goto-char start))
+          (require 'semantic/ctxt)
           (semantic-ctxt-current-mode)))))
 
 (defsubst semantic--tag-attributes-cdr (tag)


reply via email to

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