Re: Extending Functions from Manual Example

2008-09-12 Thread Hans Aberg
On 12 Sep 2008, at 03:12, Jason Melbye wrote: On Thu, Sep 11, 2008 at 6:44 AM, Hans Aberg <[EMAIL PROTECTED]> wrote: On 11 Sep 2008, at 05:17, Jason Melbye wrote: Then use it: FNCT '(' expr ')' Some prefer not using the '...' construct. So one can write: %token LP "(" %token RP ")" FNCT "(

Re: Extending Functions from Manual Example

2008-09-11 Thread Laurence Finston
On Thu, 11 Sep 2008, Jason Melbye wrote: > > I'm not sure I completely follow the bit about creating a closure and > > computing later. But I think I see how to do this now (or at least one way > > to do this.) Rather than have my C functions that I wish to call of the > > form fnct(arg1, arg2,

Re: Extending Functions from Manual Example

2008-09-11 Thread Jason Melbye
> On Thu, Sep 11, 2008 at 6:44 AM, Hans Aberg <[EMAIL PROTECTED]> wrote: > >> On 11 Sep 2008, at 05:17, Jason Melbye wrote: >> >> Then use it: FNCT '(' expr ')' Some prefer not using the '...' construct. So one can write: %token LP "(" %token RP ")" FNCT "

Re: Extending Functions from Manual Example

2008-09-11 Thread Hans Aberg
On 11 Sep 2008, at 05:17, Jason Melbye wrote: Then use it: FNCT '(' expr ')' Some prefer not using the '...' construct. So one can write: %token LP "(" %token RP ")" FNCT "(" expr ")" Should those FNCT '(' expr ')' / FNCT "(" expr ")" lines say FNCT '(' expr_list ')' (or "(", ")" ) inste

Re: Extending Functions from Manual Example

2008-09-10 Thread Jason Melbye
On Wed, Sep 10, 2008 at 3:59 AM, Hans Aberg <[EMAIL PROTECTED]> wrote: > On 10 Sep 2008, at 05:39, Jason Melbye wrote: > >> I have been reading through the Bison manual the past couple days. I >> really >> liked the three examples, especially the last - the multifunction >> calculator. Since rea

Re: Extending Functions from Manual Example

2008-09-10 Thread Jason Melbye
On Wed, Sep 10, 2008 at 3:59 AM, Hans Aberg <[EMAIL PROTECTED]> wrote: > On 10 Sep 2008, at 05:39, Jason Melbye wrote: > >> I have been reading through the Bison manual the past couple days. I >> really >> liked the three examples, especially the last - the multifunction >> calculator. Since rea

Re: Extending Functions from Manual Example

2008-09-10 Thread Hans Aberg
On 10 Sep 2008, at 05:39, Jason Melbye wrote: I have been reading through the Bison manual the past couple days. I really liked the three examples, especially the last - the multifunction calculator. Since reading that I have been wondering if there was a general way to describe a function