Re: [sqlite] LEMON Examples

2004-08-03 Thread Joseph Stewart
I'll second sporkey, would you be able to post your calc source for us all to see? TIA, -j On Tue, 03 Aug 2004 15:38:53 -0400, John Cohen <[EMAIL PROTECTED]> wrote: > Hi all, > > Thanks for all the help! I got it all working fine.. The wrapper did the > trick - I also want to try some speed

Re: [sqlite] LEMON Examples

2004-08-03 Thread D. Richard Hipp
D. Richard Hipp wrote: John Cohen wrote: The last suggestion worked great (thanks!). But still, I still have a small problem. It won't accept more than one 'statement'. I know why, but can't fix it. Take a look: $ ./a.out 7 + 9 + 7 + 3 / (5 + 7); 23.25 3 + 3 + 3; Fatal Error: Parser

Re: [sqlite] LEMON Examples

2004-08-03 Thread Christian Smith
On Tue, 2 Aug 2004, John Cohen wrote: > >in ::= in stmt ENDLINE. > >But that doesn't seem to work in lemon. I've also tried making the 2nd >statement right recursive, but that doesn't work either because it doesn't >seem to ever reduce all the way. > >Any ideas? Much thanks to all. Just make

Re: [sqlite] LEMON Examples

2004-08-02 Thread John Cohen
Date: Mon, 02 Aug 2004 23:51:15 -0400 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Aha! =) The last suggestion worked great (thanks!). But still, I still have a small problem. It won't accept more than one 'statement'. I know why, but can't fix it. Take a look: $ ./a.out 7 +

Re: [sqlite] LEMON Examples

2004-08-02 Thread Doug Currie
Monday, August 2, 2004, 12:49:50 AM, John Cohen wrote: > My problem is the fact I cannot use the start token on the right hand of the > rule. [...] > How can I get this to accept things such as: > 5 + 5 + 5 > 5 + 6 > ? [I have never used lemon, but perhaps something like...] expr := term |

[sqlite] LEMON Examples

2004-07-31 Thread John Cohen
Hi, I've used bison for a while now, and gotten pretty proficient at the grammar, but hearing how LEMON has some pretty nice features (i.e. terminal destructors) I decided to try it out, but I can't even get a simple calculator to work with it. I can get the tokenizer written fine, but just