www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - VisualD: C++ to D stops with meaningless error message

reply ParticlePeter <ParticlePeter gmx.de> writes:
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
Nov 12 2015
parent reply Rainer Schuetze <r.sagitario gmx.de> writes:
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.
Nov 14 2015
parent reply ParticlePeter <ParticlePeter gmx.de> writes:
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.
Nov 15 2015
parent Rainer Schuetze <r.sagitario gmx.de> writes:
On 15.11.2015 19:11, ParticlePeter wrote:
 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.
I fixed the suppressed error messages, it prefers a flood of error messages instead. The issues above should also be parsed correctly (though you'll propably need to replace "std.vector!(char)" with something else anyway). See https://github.com/D-Programming-Language/visuald/releases/tag/v0.3.43-rc1
Nov 16 2015