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

ParticlePeter via Digitalmars-d-ide digitalmars-d-ide at puremagic.com
Sun Nov 15 10:11:59 PST 2015


On Saturday, 14 November 2015 at 16:23:07 UTC, Rainer Schuetze 
wrote:
>
>
> 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.

Thanks for your reply, I just tried "oscpkt.hh" as starting point.
I couldn't make heads or tails out of the error message, so the 
problem her would be line 247: operator bool() const { return 
isOk(); }
instead of 251?
How about adding the line itself to such an parse error message?

Conversion succeeded, had some more errors but could fix them, 
thanks.


More information about the Digitalmars-d-ide mailing list