
A bunch of patches to the C parser. These need reviewing and testing.
The first one seems to fix Ville's problem with parsing xmmintrin.h
at least when still using c2hs -C-D__extension__=
The second fixes it for me even without using -C-D__extension__=
The reason was that the gramar was such that if it saw the __extension__
keyword at the beginning of an external decleration then it assumed
that it could only be a data decleration and not a function decleration.
This changes the __extension__ handling about quite a bit but the end
result is that it allows __extension__ on functions too, which was the
problem in Ville's example.
This is the change that most needs testing since while it may fix this
use of __extension__ is may break others where we were previously
working ok. I guess we really need a regression test that tries loads
of common system headers eg /usr/include/*.h .
The last is mainly a tidy up. It hides a shift/reduce conflict.
I checked that it doesn't change the parser's state transition tables.
Still I'm not sure if using context-dependent precedence should be
necessary here.
Duncan
Mon May 29 11:50:14 BST 2006 Duncan Coutts