IG for c++

Torbjorn Tornkvist tobbe@REDACTED
Wed Nov 1 09:40:08 CET 2000


> now, my problem : i d like to wrap a C++ lib.

I think I remember it was done by someone, a long time ago.

> - a) adding # ifdef _cplusplus , external "C" {.... at the begining and
> end of headers files. supposely no big deal.

This was the way it was done I belive.

> how complex is the grammar extension ? the parser ? is it generated with
> Yecc ? (the history from the doc tends to make me thinking the opposite,
> but there is a .y files in the sources ?

The grammar is described by a yecc file (igparser.yrl).

> (the history from the doc tends to make me thinking the opposite,
> but there is a .y files in the sources ?

Well, at the time IG was written, the Erlang compiler couldn't
compile the resulting .erl file, produced from a ANSI-C.yrl grammar.
So igparser.yrl has been growing by adding rules to it when needed.

BTW: If someone would be interested, here is the ANSI-C yecc grammar:

 http://www.bluetail.com/~tobbe/ansi_c.yrl

Cheers /Tobbe




More information about the erlang-questions mailing list