Re: About the FOR loop semantic action

2007-10-21 Thread Laurence Finston
On Sun, 21 Oct 2007, [EMAIL PROTECTED] wrote: > Ilyes Gouta wrote: > > > Hmm.. So bison is able to read from data buffers instead of a FILE*. > > How can I achieve that? > > I don't remember off-hand. It's documented in the manual, or you can look > in my source code. It involves `yyin'. > S

Re: About the FOR loop semantic action

2007-10-21 Thread lfinsto1
Ilyes Gouta wrote: > Hmm.. So bison is able to read from data buffers instead of a FILE*. > How can I achieve that? I don't remember off-hand. It's documented in the manual, or you can look in my source code. It involves `yyin'. >> I think it's usually not a good idea to execute code in the mi

Re: About the FOR loop semantic action

2007-10-20 Thread Ilyes Gouta
Hi, Thanks Laurence for your comments. > I don't know how C compilers do this, but you could look at how I I think C compilers generate semantic trees, instead of executing the actions, that then are passed to the back-end to emit CPU opcodes. > implemented loops in GNU 3DLDF. It was not parti

Re: About the FOR loop semantic action

2007-10-20 Thread lfinsto1
> I'm in the process of writing an interpreter for my simplified C-like > language. I've already added the support for expressions and "if then > else" statements but I'm having some hard time figuring out how to > support loops. I suggest you take a look through the archives, since this topic has

About the FOR loop semantic action

2007-10-20 Thread Ilyes Gouta
Hi all, I'm in the process of writing an interpreter for my simplified C-like language. I've already added the support for expressions and "if then else" statements but I'm having some hard time figuring out how to support loops. My grammar is defined as following: #define YYSTYPE_IS_DECLARED t