2011/1/28 john skaller <skal...@users.sourceforge.net>
>
> On 28/01/2011, at 7:08 PM, Emmanuel Onzon wrote:
>
> > 2011/1/28 john skaller <skal...@users.sourceforge.net>
> >
> >
> > 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?
> >
> > Basically it contains the automaton, the user actions, the merge
> functions, the grammar and other values that describe the parser. It is a
> value of type parser_pilot that is used.
>
>
> So, if I have a ref to global data somewhere, and I also use it in user
> actions,
> what happens?
>
>
You're not supposed to have a ref to global data. Global data is supposed to
be not mutable (except if the parsing is always deterministic). The way to
use global data is to return a fresh value to the parser from a user action
in the parser command list.
> I will get the automaton back, but the global data variable would be stale.
> Right?
>
>
You get the global and local data back as well and I realize this may not be
what we'd like to have.
> So I have to be very careful there's no mutable global data anywhere.
> Right?
>
Right.
------------------------------------------------------------------------------
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
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language