Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-core-dev] Parser comments

Hi Doug, John,

Updated to the latest source last night to try out the new parser.
I ran into a couple of issues (tried my standard test of importing the
QNX kernel sources :-)); I realize it's still early with the new parser,
but just wanted to give you some quick examples:

- declarations of the kind:

int kdecl foobar(int a) {
}

where kdecl is defined in a header as some compiler-specific attribute.
"kdecl" 
confuses the parser. One thought (we'd discussed this before) is to have a
list
of ignored keywords that the user can set up (these could include some of
the gcc
extensions).

- #ifdefs which include curlies inside them, e.g.

int foobar(int a) {

if(a == 0) {
#ifdef THIS
 } else {
 }
#elif THAT
 } else {
 }
#endif
  return 0;
}

The parser parses all branches of the #if/#else (probably should only do
one).

In any case, I'm sure there are more like this -- I can create JUnit tests
for
these if you'd like, so at least we track them and eventually they can get
fixed.

Also, I updated the ui.tests plugin, but got compile errors in the DomTests
and ParserSymbolTableTests files. Checked in a fix.

Thanks,

Sebastien

--------------------
Sebastien Marineau
QNX Software Systems
(613) 271-9336
sebastien@xxxxxxx 


Back to the top