www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12128] New: C++ conversion error: not parsed until the end of the file

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12128

           Summary: C++ conversion error: not parsed until the end of the
                    file
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: VisualD
        AssignedTo: nobody puremagic.com
        ReportedBy: andrej.mitrovich gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2014-02-10
01:40:23 PST ---
I've tried converting this codebase:
http://www.music.mcgill.ca/~gary/rtaudio/release/rtaudio-4.0.12.tar.gz

C++ Conversion Wizard Dialog settings:

-----
Input Dir: 
C:\dev\projects\CRtAudio_Interface\src\rtaudio_c-4.0.12

Output Dir: 
C:\dev\projects\CRtAudio_Interface\src\rtaudio_c-4.0.12\convert

Files and directories:
*.cpp
*.h

Preprocessor expansions:
__WINDOWS_DS__=1

Keyword Prefix:
d_

Package Prefix:
rtaudio_d
-----

When hitting convert for each C++ file I get back these errors:

RtAudio.cpp
C:\dev\projects\CRtAudio_Interface\src\rtaudio_c-4.0.12\RtAudio.cpp(108): not
parsed until the end of the file
----------------
RtAudio.h
C:\dev\projects\CRtAudio_Interface\src\rtaudio_c-4.0.12\RtAudio.h(515): not
parsed until the end of the file
----------------
RtError.h
C:\dev\projects\CRtAudio_Interface\src\rtaudio_c-4.0.12\RtError.h(41): not
parsed until the end of the file
----------------
3 of 3 files failed to parse, aborting

Using VisualD 0.3.37

Any ideas what I'm doing wrong?

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 10 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12128


Rainer Schuetze <r.sagitario gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |r.sagitario gmx.de


--- Comment #1 from Rainer Schuetze <r.sagitario gmx.de> 2014-02-10 15:17:09
PST ---
The files reveal some deficiencies in the converters C++ parser, mostly it
seems not to deal with scoped identifiers. Here is a list of "Pre Token
Replacements" that let it get beyond the initial parsing:

*.*:: RtAudio::Api => RtAudio_Api
*.*:: RtAudio::StreamParameters =>  RtAudio_StreamParameters
*.*:: RtAudio::StreamOptions => RtAudio_StreamOptions
*.*:: RtError::Type => RtError_Type
*.*:: RtError::$_ident => RtErrorCode($_ident)
*.*:: RtAudio::DeviceInfo => RtAudio_DeviceInfo
throw() =>
*.*::std:: =>
virtual~ => /*virtual*/~
try { $try } catch( $ex ) { $catch } => $try
CALLBACK =>

Unfortunately the converter doesn't match declaration and implementation very
well afterwards...

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 10 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12128



--- Comment #2 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2014-02-11
02:45:04 PST ---
(In reply to comment #1)
 The files reveal some deficiencies in the converters C++ parser, mostly it
 seems not to deal with scoped identifiers. Here is a list of "Pre Token
 Replacements" that let it get beyond the initial parsing:
 
 *.*:: RtAudio::Api => RtAudio_Api
 *.*:: RtAudio::StreamParameters =>  RtAudio_StreamParameters
 *.*:: RtAudio::StreamOptions => RtAudio_StreamOptions
 *.*:: RtError::Type => RtError_Type
 *.*:: RtError::$_ident => RtErrorCode($_ident)
 *.*:: RtAudio::DeviceInfo => RtAudio_DeviceInfo
 throw() =>
 *.*::std:: =>
 virtual~ => /*virtual*/~
 try { $try } catch( $ex ) { $catch } => $try
 CALLBACK =>

Small usability issue: It's really hard matching the left and right columns since they scroll independently and there's no line numbering. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 11 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12128



--- Comment #3 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2014-02-11
02:47:20 PST ---
(In reply to comment #2)
 Small usability issue: It's really hard matching the left and right columns
 since they scroll independently and there's no line numbering.

Wait, I thought the part after => goes to the right column, my mistake. But what is this column here for: http://i.imgur.com/zLUtQlX.png -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 11 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12128



--- Comment #4 from Rainer Schuetze <r.sagitario gmx.de> 2014-02-11 12:34:12
PST ---
 But what is this column here for: http://i.imgur.com/zLUtQlX.png

The left field contains replacements that are applied to the input before parsing it as C++, the right field is for replacements of the output of the C++ to D conversion before writing the file. If you enable "Write intermediate files" you can check the state after the different phases. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 11 2014