Those IDL files don't look like they are in WebIDL format (
https://webidl.spec.whatwg.org/).  If you want to use them with
webidl_binder you would need to first convert them to webidl format.

cheers,
sam

On Thu, Nov 3, 2022 at 6:16 AM Balázs Varga <balazs.varga...@gmail.com>
wrote:

> Hi All,
>
> I am facing with a similar problam like this:
> https://lists.w3.org/Archives/Public/public-webapps/2009JanMar/0197.html
>
> I have a lot of .idl files from a project like this one:
> https://api.libreoffice.org/docs/idl/ref/files.html
> There are two .idl example:
> https://api.libreoffice.org/docs/idl/ref/XInterface_8idl_source.html
> https://api.libreoffice.org/docs/idl/ref/XReference_8idl_source.html
>
> *Is it possible to #include existing .idl files with webIDL and then
> creating .cpp and .js from them?*
>
> I tried to make a .cpp and .js file from the original XInterface.idl file
> with './webidl_binder XInterface.idl glue', but as I expected it didn't
> work, because of the #ifndef prepocess
>
> *Can webIDL handle prepocesess like #ifndef #define and/or #include
> existing .idl files with webIDL?*
>
> By the way the error msg was:
>
> Traceback (most recent call last):
>   File
> "/home/bvarga/builder/emsdk/upstream/emscripten/tools/./webidl_binder.py",
> line 55, in <module>
>     p.parse(r'''
>   File
> "/home/bvarga/builder/emsdk/upstream/emscripten/third_party/WebIDL.py",
> line 4960, in parse
>
> self._productions.extend(self.parser.parse(lexer=self.lexer,tracking=True))
>   File
> "/home/bvarga/builder/emsdk/upstream/emscripten/third_party/ply/ply/yacc.py",
> line 263, in parse
>     return self.parseopt(input,lexer,debug,tracking,tokenfunc)
>   File
> "/home/bvarga/builder/emsdk/upstream/emscripten/third_party/ply/ply/yacc.py",
> line 792, in parseopt
>     tok = self.errorfunc(errtoken)
>   File
> "/home/bvarga/builder/emsdk/upstream/emscripten/third_party/WebIDL.py",
> line 4909, in p_error
>     raise WebIDLError("invalid syntax", [Location(self.lexer, p.lineno,
> p.lexpos, self._filename)])
> WebIDL.WebIDLError: error: invalid syntax, <unknown> line 22:0
> #ifndef __com_sun_star_uno_XInterface_idl__
> ^
>
> Thanks for the feedback in advance.
>
> Best,
> Balázs
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to emscripten-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/da554b58-e4d8-4c15-9742-2882e45af411n%40googlegroups.com
> <https://groups.google.com/d/msgid/emscripten-discuss/da554b58-e4d8-4c15-9742-2882e45af411n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2-9qXg1oYVEEvy82wTOqCwr6mEyKAgFffa-z4Pmj7C70w%40mail.gmail.com.

Reply via email to