dotgnu-general
[Top][All Lists]
Advanced

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

Re: [DotGNU]An example of using treecc


From: Glenn Chambers
Subject: Re: [DotGNU]An example of using treecc
Date: Tue, 1 Oct 2002 20:47:25 -0400

On Sunday, September 29, 2002, at 07:10 PM, Gopal V wrote:

Hi Everyone,
        I was pottering around with treecc when I just thought of
reimplementing the tried and tested 'Expression Compiler' that
we (meaning the poor souls from CS) had to hand implement. With
the help of flex, bison and treecc ... compiler design becomes
less of a black magic ...


Interesting, but I think I see a slight flaw.  "max_stack_size" is
computed as twice the most deeply nested set of parentheses, but in
fact depends on the maximum depth of the parse tree.

Not that hard to implement, as another operator.  Trivial, in fact,
given the simple version of the code generator you're using.  The
actual implementation is left as an exercise for the student...

Glenn Chambers
Toledo, OH



reply via email to

[Prev in Thread] Current Thread [Next in Thread]