Hello.
I've made a swig freeling.i file that worked. As I was going to use more
and more std::lists, I tried to modularise it by adding %include
<std_list.i> and commenting out the code wrapping lists.
Now, I get std_list.ml and std_list.mli as well as std_lib_wrap.cxx, but
not anymore the files wrapping freeling.i...
What am I doing wrong?
All the best,
Guillaume Yziquel
> yziquel@seldon:~/svn/main/libmorfo-ocaml$ cat freeling.i
> %include <std_list.i>
>
> %module swig_Freeling
> %{
>
> #include "freeling.h"
>
> using namespace std;
>
> string string_of_chars (char * c)
> {
> string s (c);
> return s;
> }
>
> /*word last_word_of_word_list (list<word> & l)
> {
> word head = l.front ();
> return head;
> }
>
> void pop_last_word_list (list<word> & l)
> {
> l.pop_front ();
> }
>
> bool is_empty_word_list (list<word> & l)
> {
> bool b = l.empty ();
> return b;
> }
>
> list<word> new_word_list ()
> {
> list<word> l;
> return l;
> }
>
> void push_last_word_list (list<word> & l, word& w)
> {
> l.push_back (w);
> }*/
>
> %}
>
> // C++ functions used to glue code with OCaml.
>
> string string_of_chars (char *);
>
> /*word last_word_of_word_list (list<word> &);
> void pop_last_word_list (list<word> &);
> bool is_empty_word_list (list<word> &);
> list<word> new_word_list ();
> void push_last_word_list (list<word> &, word &);*/
>
> // Freeling declarations.
>
> class tokenizer {
> public:
> /// Constructor
> tokenizer(const string &);
>
> /// tokenize string with default options
> list<word> tokenize(const string &);
> /// tokenize string with default options, tracking offset in given int param.
> list<word> tokenize(const string &, unsigned long &);
> };
>
> class splitter {
> public:
> /// Constructor
> splitter(const std::string &);
>
> /// split sentences with default options
> std::list<sentence> split(const std::list<word> &, bool);
> };
>
------------------------------------------------------------------------------
_______________________________________________
Swig-user mailing list
Swig-user@...
https://lists.sourceforge.net/lists/listinfo/swig-user