Semantic-parse-region returning non-string Tag name
Thomas Karolski <[email protected]> Tue, 8 Mar 2016 22:04:18 +0100
| Newsgroups | gmane.emacs.semantic |
|---|---|
| Message-ID | <CAHwDXSviiJMcgft4KZWh-Qjgj0GEgZVG6wYA4gfsDmn7kpRGXg@mail.gmail.com> |
Hi Guys,
I'm currently trying to speedup semantic, by moving parsing jobs for files
to a different emacs instance. However, when invoking semantic-parse-region
on a buffer, I sometimes get tags where the first element (the name) is a
list, instead of a string.
On the remote emacs instance, I parse files using this code:
(with-current-buffer (get-file-buffer file)
(c++-mode)
(semantic-new-buffer-fcn)
(when (and
;; ;; Is this a semantic enabled buffer?
(semantic-active-p)
;; ;; Application hooks say the buffer is
safe for parsing
(run-hook-with-args-until-failure
'semantic-before-toplevel-bovination-hook)
(run-hook-with-args-until-failure
'semantic--before-fetch-tags-hook)
;; If the buffer was previously marked
unparseable,
;; then don't waste our time.
(not (semantic-parse-tree-unparseable-p))
;; The parse tree actually needs to be
refreshed
(not (semantic-parse-tree-up-to-date-p)))
(let* ((gc-cons-threshold (max gc-cons-threshold
10000000))
(semantic-lex-block-streams nil))
(garbage-collect)
(let ((buffer-cache (semantic-parse-region
(point-min) (point-max))))
(let (semantic-unmatched-syntax-cache
semantic-unmatched-syntax-cache-check
semantic-parser-warnings)
(semantic-clear-toplevel-cache))
;; Set up the new overlays
; (semantic--tag-link-list-to-buffer
buffer-cache)
;; Set up the cache with the new results
(message "%S" buffer-cache)
(semantic--set-buffer-cache buffer-cache)
(list
;; this returns semantic--buffer-cache
semantic--buffer-cache
semantic--parse-table
)))))
The first time I run the code ("file" is simply a variable pointing to e.g.
"/usr/include/boost/bind.hpp"), I get tags correctly. If I run the code
another time in the same emacs instance however, I get the error as
explained above.
Can some semantic experts tell me, whether I'm missing something, with
regards to initializing semantic, which would explain why I'm getting lists
instead of strings as tag names?
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
cedet-semantic mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cedet-semantic