Re: MLNLFFIGEN

Norrman Vesa <[email protected]>
Newsgroups gmane.comp.lang.ml.mlton.user
Message-ID <[email protected]>
You can work around non working parts of header files. For example,

mlnlffigen -cppopt "-D__GNUC_VA_LIST -D__va_list__ -Dva_list=..." /usr/include/sqlite3.h

I tried above command in Linux which has gcc 4.6.3 and it generated some sml files.

 - Vesa

________________________________________
Lähettäjä: Maurício Antunes [[email protected]]
Lähetetty: 8. lokakuuta 2013 21:54
Vastaanottaja: [email protected]
Aihe: Re: [MLton-user] MLNLFFIGEN

Trying mlnlffigen with posix "regex.h" seems to work well, despite these
error messages:

    "/usr/include/bits/pthreadtypes.h":121.31-122.6: error: syntax
error: deleting  SEMICOLON RCURLY
    Likely cause: missing typedef declaration.

    "/usr/include/bits/pthreadtypes.h":125.3: error: syntax error:
inserting  RCURLY
    Likely cause: missing typedef declaration.


I failed with sqlite (www.sqlite.org), though. This is the command
line:

    mlnlffigen /usr/include/sqlite3.h

I got this (and no .sml files):

    "/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/include/stdarg.h":40.73-90:
error: syntax error: replacing  ID with  TYPE_NAME
    Likely cause: missing typedef declaration.

    "/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/include/stdarg.h":98.73-87:
error: syntax error: replacing  ID with  TYPE_NAME
    Likely cause: missing typedef declaration.

    "???": warning: additional errors suppressed.
    "???": warning: additional warnings suppressed.
    AstToSpec: warning: "/usr/include/sqlite3.h":1314.33-61: varargs
not supported; ignoring the ellipsis
    AstToSpec: warning: "/usr/include/sqlite3.h":1332.33-77: varargs
not supported; ignoring the ellipsis
    AstToSpec: warning: "/usr/include/sqlite3.h":2241.33-71: varargs
not supported; ignoring the ellipsis
    AstToSpec: error: Error type


Now with "wchar.h" (again with no resulting .sml files):

    mlnlffigen /usr/include/wchar.h

    "/usr/lib/gcc/i686-pc-linux-gnu/4.8.1/include/stdarg.h":40.73-90:
error: syntax error: replacing  ID with  TYPE_NAME
    Likely cause: missing typedef declaration.

    "???": warning: additional errors suppressed.
    "???": warning: additional warnings suppressed.
    AstToSpec: warning: "/usr/include/wchar.h":594.1-595.38: varargs
not supported; ignoring the ellipsis
    AstToSpec: warning: "/usr/include/wchar.h":601.1-51: varargs not
supported; ignoring the ellipsis
    AstToSpec: warning: "/usr/include/wchar.h":604.1-605.38: varargs
not supported; ignoring the ellipsis
    AstToSpec: error: Error type

Thanks,
Maurício

2013/10/3, Matthew Fluet <[email protected]>:
> On Tue, Oct 1, 2013 at 4:55 AM, Maurício Antunes
> <[email protected]> wrote:
>> I've been trying to use mlnlffigen, but I wasn't able to get results
>> except for a very small C file that I built to be as simple as possible.
>> I
>> tried, for instance, the C code of sqlite (www.sqlite.org) and some files
>> from sophia (sphia.org). Is mlnlffigen supposed to work with usual code
>> from well known libraries? Are there restrictions I should check first?
>
> Can you be more specific as to how mlnlffigen is failing on these
> libraries?  I know that other have had some (small) successes with
> using mlnlffigen.
>
> Note that MLton's mlnlffigen is a "port" of SML/NJ's ml-nlffigen tool.
>  The differences are minimal with respect to how the tools process C
> files; the more significant difference is in the generated code that
> is specific to the compiler's foreign function interface.  But, the
> more important point is that we didn't write the tool and might not
> understand all of its limitations.
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
> _______________________________________________
> MLton-user mailing list
> [email protected]; [email protected]
> https://lists.sourceforge.net/lists/listinfo/mlton-user
>

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
MLton-user mailing list
[email protected]; [email protected]
https://lists.sourceforge.net/lists/listinfo/mlton-user

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.