Eric M. Ludlam writes:
> On 05/26/2011 08:37 PM, Mitchel Humpherys wrote:
>> Hello list!
>> I'm working with an implementation of the c++ standard library by
>> WindRiver (vxworks) and semantic I guess is having a hard time parsing
>> the files... My project is finding the files (they're highlighted
>> yellow, not ping) but semantic can't ever parse them. When I visit one
>> of the files in question and do semantic-analyze-current-context I get:
>> semantic-analyze-current-context: Cannot analyze buffers not supported
>> by Semantic
>> Any ideas what's up? I obviously can't supply the files because I don't
>> think WindRiver would appreciate that :), so I guess this conversation
>> is pointless unless you have access to those headers or have some other
>> ideas for me to debug what's going on.
> The major mode of your files needs to be C++, or Semantic won't get the
> buffer set up for parsing. Alternately, if they are C++ files, an error
> may be thrown while the mode is being setup and it is being caught, but
> the buffer isn't setup.
This is a common problem with STL files like "algorithm" which don't
have a file extension. There are several ways to deal with that:
// -*- C++ -*-
in the first line of all the files (this is what GNU glibc has).
* If all the files start with a C++ comment, use
(add-to-list 'magic-fallback-mode-alist '("^// " . c++-mode))
* Frob auto-mode-alist to include the directory with the STL files, like
(add-to-list 'auto-mode-alist '("^/usr/include/windriverSTL/" . c++-mode))