OCaml Forge
SCM

Development references

From Caml Foreign dynamic interface to C/C++ Wiki

(Difference between revisions)
Jump to: navigation, search
 
(2 intermediate revisions not shown)
Line 1: Line 1:
* [http://www.codesourcery.com/public/cxx-abi/abi-examples.html C++ ABI for IA-64: Code and Implementation Examples]
* [http://www.codesourcery.com/public/cxx-abi/abi-examples.html C++ ABI for IA-64: Code and Implementation Examples]
 +
* [http://www.haskell.org/haskellwiki/CPlusPlus_from_Haskell ffi to c++ from Haskell]
* Camlp4:
* Camlp4:
** [http://ambassadortothecomputers.blogspot.com/p/reading-camlp4.html Jake Donham's blog series on Camlp4]
** [http://ambassadortothecomputers.blogspot.com/p/reading-camlp4.html Jake Donham's blog series on Camlp4]
Line 7: Line 8:
** do not forget to end str_items with ;;
** do not forget to end str_items with ;;
** "Parse error: currified constructor": ?
** "Parse error: currified constructor": ?
 +
** using "foreign" as a terminal in a grammar extension registers "foreign" as a keyword, and prevents other uses of it (like naming a variable or name "foreign") ; using LIDENT "foreign" instead fixes that problem
* list of Camlp4 antiquotations (extracted using <nowiki>perl -MData::Dumper -ne '/ANTIQUOT\s*\(([^)]+)\)/ or next; $_ = $1; print Dumper $_; ++$h{$_} for /"([^"]*)"/g; END{print join "\n", map {"** $_"} sort keys %h}' Camlp4Parsers/*</nowiki>):
* list of Camlp4 antiquotations (extracted using <nowiki>perl -MData::Dumper -ne '/ANTIQUOT\s*\(([^)]+)\)/ or next; $_ = $1; print Dumper $_; ++$h{$_} for /"([^"]*)"/g; END{print join "\n", map {"** $_"} sort keys %h}' Camlp4Parsers/*</nowiki>):
** ..
** ..
Line 32: Line 34:
** int32
** int32
** int64
** int64
-
** lid
+
** lid: lowercase id (as a variable name, see also uid)
** list
** list
** match_case
** match_case
Line 52: Line 54:
** tup
** tup
** typ
** typ
-
** uid
+
** uid: uppercase id (as a variant constructor or module name, see also lid)
** virtual
** virtual
** with_constr
** with_constr

Latest revision as of 16:56, 18 November 2011

Personal tools
Navigation