[antlr-interest] CSharp2: serialize/deserialize as AST
Johannes Luber
jaluber at gmx.de
Wed Jan 21 22:41:03 PST 2009
Ben Gillis schrieb:
> I want to serialize/deserialize an AST, binary format, using C#.
>
> But, I'm not clear how the AST is reconstructed on deserialization
> concerning the IToken.Parent.
>
> I see some serialization in ANTLR, e.g.
> Antlr.Runtime.Debug.DebugEventSocketProxy.SerializeToken. This would be
> a pointer; therefore, some recursive approach to using built-in AddChild
> methods or something must be done???
>
> Before I brew up something, perhaps this is (a) already done/available?
> (b) easier than I'm making it???
Doesn't the usual approach via Binary/XML formatters work? If the
classes in 3.1.1 don't have the required attributes, then get a
snapshot, as those should be in the repo files.
Johannes
>
> Thanks,
> Ben
>
>
>
>
> ------------------------------------------------------------------------
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
More information about the antlr-interest
mailing list