Version française
Home     About     Download     Resources     Contact us    
Browse thread
Testing lexers and parsers
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: konrad <konrad@m...>
Subject: Re: [Caml-list] Testing lexers and parsers

I actually attended a project in university on writing a C compiler (written in Java) and we printed out XML code for debugging, that represented the AST. That was a real benefit cause you can still see the structure of the AST in the XML tree. It is even easy to do that - one tree traversal is enough.

chris

On Tue, 27 Feb 2007 11:11:09 -0500, "Denis Bueno" <dbueno@gmail.com> wrote:
> [Meant to send to the list the first time. Sorry for the dupe.]
> 
> On 2/27/07, Denis Bueno <dbueno@gmail.com> wrote:
>> On 2/27/07, Joel Reymont <joelr1@gmail.com> wrote:
>> > Are you printing out the AST to make sure you can reproduce the
>> > original file you parsed?
> 
> Yes. I wanted to make sure my AST-printing functions would print
> correct source code in the source language. This makes it very easy to
> inspect AST fragments.
> 
> -Denis
> 
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs