VisualD: C++ to D stops with meaningless error message

Rainer Schuetze via Digitalmars-d-ide digitalmars-d-ide at puremagic.com
Sat Nov 14 08:23:05 PST 2015



On 12.11.2015 17:07, ParticlePeter wrote:
> I am trying to convert the oscpkt.hh file from this c++ library:
> http://gruntthepeon.free.fr/oscpkt/
>
> The wizzard simply stops with this error message:
>
> oscpkt.hh
> E:\Code\Lib_CPP\oscpkt-1.2\oscpkt.hh(251): not parsed until the end of
> the file
> ----------------
> 1 of 1 files failed to parse, aborting
>
> What are the reason for such an error? What can be done about it?
>
> Cheers, ParticlePeter

I tried the header file and noticed that all previous error messages are 
lost when the parser completely bails out with the error given above. 
I'll try to fix this.

The bad trouble in this header comes from two issues:

- the parser doesn't understand operator overloads, so you'd better 
comment these. There is often no good replacement anyway.

- the parser stumbles over namespaces in type names, e.g. std::vector. 
you might get better results by replacing these with a single identifier 
or just remove the namespace "std::".

In the udp.hh header, there are a lot of "sizeof type" without 
parenthesis. I wasn't aware that these are optional when I wrote the 
parser, so they are mandatory ATM.


More information about the Digitalmars-d-ide mailing list