[antlr-interest] Serialization of ANTLR tree

Scott Stanchfield scott at javadude.com
Thu Mar 18 09:12:18 PDT 2010


I'd second this (just pass the original source), even if you need to
parse on the sending side (for example, an editor with syntax checking
so the user gets fast feedback on the client side)
-- Scott

----------------------------------------
Scott Stanchfield
http://javadude.com



On Thu, Mar 18, 2010 at 12:06 PM, Jim Idle <jimi at temporal-wave.com> wrote:
> Are you sure that you have defined the correct requirement here? You parse the source text and create tokens and the tree (which all reference back in to the original source text), then you are going to send a text representation of the tree over the wire and re-assemble it. Just send the original source text and parse it in to the AST at the receiving end.
>
> You can certainly produce a text representation of the AST, but in order not to lose information, the format would quite likely end up being larger than the original input. So my answer would be "Doctor doctor, I broke my arm in 3 places! Don't go to those 3 places again!" ;-)
>
> Jim


More information about the antlr-interest mailing list