-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- -------- Original Message --------
Subject: Re: Bug#394704: synopsis: Cxx parser always fails
Date: Fri, 27 Oct 2006 18:17:52 +0200
From: Andreas Fester <[EMAIL PROTECTED]>
To: Nick Lewycky <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>

Nick Lewycky wrote:
> Andreas Fester wrote:
>> I was trying to reproduce the bug you reported, but couldn't.
>> Could you do me the favour and create a system call trace
>> as follows:
>>
>> $ strace -o synopsis.trc -f synopsis -p Cxx empty.cpp
>>
>> Then simply send me the file synopsis.trc (the strace command
>> is in the package "strace").
>
> synopsis.trc attached.

ok, so it seems that the reason is the file ~/.synopsis/parsers/cpp/emulator.
I deleted it, and now I also get your error ;)

Background: this file is generated (*if it does not exist yet*) by
/usr/share/pycentral/synopsis/site-packages/Synopsis/Parsers/Cpp/Emulator.py
which calls an installed gcc compiler to find the necessary builtin compiler
#defines (which are usually necessary to compile any code) and the
include file paths. The result is then stored in the above mentioned file
(I still had the contents of an older gcc version in this file, until I
removed it - thats the reason why I could not reproduce the error at first).
Then, ucpp (the C/C++ precompiler provided by synopsis) can use these
#defines and include file paths to preprocess C/C++ files.

As a workaround, you can simply edit   ~/.synopsis/parsers/cpp/emulator
and remove the __STDC__ entry of the "macros" array:

  macros=[('__STDC__', '1'), ('__STDC_HOSTED__', '1'),      ...

will become

 macros=[('__STDC_HOSTED__', '1'),       ...

Then the error disappears. Still, you also need to pass a formatter
on the command line which creates the actual documentation output.
To create HTML documentation, use something like

synopsis -p Cxx -f HTML -o html *.cpp

This creates the html documentation in the subdirectory "html".

I will forward the issue to upstream.

Best Regards,

        Andreas

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFaB/8Z3bQVzeW+rsRApqVAJ96wx1dYdtRZr8e2Bqt1DdOrjSMHQCfYlYB
VqpJ8+FOotwAHXdVgvH7kEU=
=/F59
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to