On Thu, Aug 05, 2004 at 09:07:36AM -0400, Joseph Stewart wrote:
> Many thanks for your contribution!
> -joe
> 
> On Wed, 4 Aug 2004 22:02:48 -0400, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
> > A user earlier posted a question about terminating
> > the grammer for a simple calculator done with lemon.
> > 
> > I ran into the same problem and had to use
> > the following, which worked fine:
> > 
> >           main ::= in.
> >           in ::= .
> >           in ::= in state NEWLINE.
> > 
> > I cannot reduce it any further. For instance,
> > the following does not work:
> > 
> >           in ::= .
> >           in ::= in stmt ENDLINE.
> > 
> > The version of lemon I'm using is from the
> > cvs 3.0.3.
> > 
> > The full calculator, there are 4 examples, can
> > be downloaded from the following link:
> > 
> > http://prdownloads.sourceforge.net/souptonuts/lemon_examples.tar.gz?download
> > 
> > Look at example4.y, if you want to go directly to
> > the terminating issue above.  Everything should be in
> > this download including lemon.c and lempar.c, so you
> > won't have to download anything else.
> > 
> > Take a look at the README. I tried to add documentation
> > on creating custom tokens, destructors, and a little bit
> > on what the grammer does.
> > 
> > To run everything, just run make
> > 
> >    $ make
> > 
> > Then, each example can be run separately
> > 
> >    $ ./ex1
> > 
> >    $ ./ex2
> > 
> > ....
> >    $ ./ex4
> > 
> > Anyway, I hope this examples will help. Or
> > inspire you to take a took at lemon.
> > 
> > Regards,
> > 
> > Mike Chirico
> > 
> >

I've added an example with flex, and I'm trying write some engaging
documentation. If enough people find it useful, and if it can help
bring people to SQLite, I'll change the license from GPL to the public
domain. But, it will probably have to go through a few revisions first.

Regards,

Mike Chirico

Reply via email to