Re: [cedet-semantic] semantic-complete-analyze-inline doesn't work for QT4 example
Brought to you by:
zappo
From: Eric M. L. <er...@si...> - 2009-03-26 11:32:13
|
Yes. I'd guess it is the namespace macros. I don't know why it throws a syntax table error though, as for me it just doesn't parse correctly when I simulate it. I have a solution for the glibc version, but I don't want to hard-code every namespace macro out there into my lexer. It will need a more generic solution. Eric >>> Joseph Garvin <jos...@gm...> seems to think that: >I tried having it lex qobjectdefs.h as well but that didn't fix it >either. Interestingly, if I run gcc's preprocessor on qpushbutton.h >(using the -E flag) and save the output to a file, code completion >*works* within that file. Am I right in thinking this means the >problem is definitely related to the preprocessor? I'll try looking up >each of the headers for all of the macros used in qpushbutton.h >tomorrow.... > >On Wed, Mar 25, 2009 at 9:58 PM, Joseph Garvin ><jos...@gm...> wrote: >> Are you referring to adding these lines? >> >> (add-to-list 'semantic-lex-c-preprocessor-symbol-file (concat >> qt4-base-dir "/Qt/qconfig.h")) >> (add-to-list 'semantic-lex-c-preprocessor-symbol-file (concat >> qt4-base-dir "/Qt/qconfig-dist.h")) >> (add-to-list 'semantic-lex-c-preprocessor-symbol-file (concat >> qt4-base-dir "/Qt/qglobal.h")) >> >> Because they're already in my .emacs :/ Maybe that's not the problem then... >> >> On Wed, Mar 25, 2009 at 9:31 PM, Eric M. Ludlam <er...@si...> wrote: >>>>>> Joseph Garvin <jos...@gm...> seems to think that: >>>>--0016e642d386884f5f0465f9eee6 >>>>Content-Type: text/plain; charset=ISO-8859-1 >>>>Content-Transfer-Encoding: quoted-printable >>>> >>>>I still have GNU Global installed, so if semantic tries to >>>>automatically detect and use it that could be a problem, but no it's >>>>not enabled in my .emacs anywhere. >>>> >>>>I tried enabling semantic-decoration-mode by doing C-u M-x >>>>semantic-decoration-mode and right clicking but it just deleted text, >>>>maybe because I have most GUI elements disabled? >>>> >>>>I opened /usr/include/qt4/QtGui/QPushButton, and it's a one line filed >>>>that #include's qpushbutton.h. So I tried opening qpushbutton.h, which >>>>caused this error to appear in the minibuffer: >>>> >>>>Idle Parse Error: "#<buffer qpushbutton.h> - Args out of range: 71005, 7102= >>>>5" >>>> >>>>I've attached the file by itself in case it will help. You can cause >>>>the error by opening the file then moving the cursor over the >>>>declaration of QPushButton. I tried toggle-debug-on-error but the >>>>error still only appears in the minibuffer. After the error shows >>>>semantic-analyze-debug-assist appears to do nothing as well. >>>> >>>>It looks like a lot of C macros are used, maybe that's confusing the parser= >>>>? >>> [ ... ] >>> >>> If you are having problems with missing macro declarations, you can >>> configure semantic-lex-c-preprocessor-symbol-file to be the single Qt >>> header with all those macros in it. >>> >>> See Alex Ott's article here for more on that: >>> http://xtalk.msk.su/~ott/en/writings/emacs-devenv/EmacsCedet.html >>> >>> Eric >>> >>> -- >>> Eric Ludlam: er...@si... >>> Siege: www.siege-engine.com Emacs: http://cedet.sourceforge.net >>> >> > -- Eric Ludlam: er...@si... Siege: www.siege-engine.com Emacs: http://cedet.sourceforge.net |