On 28/01/2011, at 7:54 AM, Emmanuel Onzon wrote:

> Hello,
> 
> Here are the changes
> 
> 2011/01/27
> 
> Code generated by dypgen now tests if the version of dypgen to generate
> the code matches the version of the dyp library.
> It is now possible to load a parser at parsing time using the constructor
>   Parser of ('token, 'obj,'global_data,'local_data,'lexbuf) parser_pilot
> of the parser commands list. See section 7.4 of the manual for more
> information.


OK, so I tried this and I get:

~/felix>flx --test=build/release/ --force abe
Saving automaton felix.automaton
Fatal error: exception Invalid_argument("output_value: abstract value (Custom)")

This is hardly surprising, but leaves the question: exactly what is saved?

My AST contains one term using Big_int.* which cannot be Marshal'd.
I can try to get rid of it. 

However more seriously, my user actions are OCS Scheme code,
and OCS Scheme *also* uses Big_int to represent integers.
It isn't clear this is the problem though. OCS scheme starts off
as text, and can be compiled. Unfortunately, Scheme is not purely
functional, and has state, and compiled Scheme functions can't
be separated from their global state, so there's no way to save
a compiled function: you have to save the whole Scheme interpreter.

It's rather unfortunate Ocaml's support is so weak here: the diagnostic
is effectively useless. At least they could have included a name. Oh well...

[BTW: last time I tried to get rid of Big_int from the parse it made a complete
mess .. I have several integer tokens: some are Felix integers, but some
are for integers in the AST such as something like EXPR_get_n of int * type 
list 
which gets the n'th component of a product value. There are also raw integers
used in the parser for keeping hashtables of productions, etc. So I have had
some trouble differentiating the kind of "integer" I need .. Now I would have 
to do this,
just using a string of digits is enough at parse time.

However this isn't going to fix the problem with saving the Scheme system ;(



 
--
john skaller
[email protected]





------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to