[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AST serialization



>Mathias Braux 0251858217 wrote:
>>   I would be able to save the AST produced by my parser using Java
>> serialization. For the moment, of course,I have some troubles with node
>> classes which are not serializable, and it should be a good idea not to modify
>> all of them (including casting classes generated by SableCC). How to do that
>> in a simple way? Did somebody tried?
>
>What is required, to make a node Serializable?  Is enough to simply add
>the "implements Serializable" to all node classes (and a few related
>classes like "Cast")?
>
>If this is the kind of changes required, then It's a matter of simply
>changing a few lines in ca/mcgill/sable/sablecc/*.txt files.  So,
>please, tell me if this is what you need.
>
>Etienne
>-- 
>----------------------------------------------------------------------
>Etienne M. Gagnon, M.Sc.                     e-mail: egagnon@j-meg.com
>Author of SableCC:                 http://www.sable.mcgill.ca/sablecc/
>----------------------------------------------------------------------


Yes I did it little time after the message have been sent. And it works fine. 
Thank you.

Mathias braux

Mathias Braux
----------------------------------------------------------------
Ecole des Mines de Nantes, computer science department
4 rue Alfred Kastler, La Chantrerie, BP 20722, 
44000 Nantes cedex 3 France

Phone: +33 2 51 85 82 17       Fax: +33 2 51 85 81 99