[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with very simple gramma
From: |
Hans Aberg |
Subject: |
Re: problem with very simple gramma |
Date: |
Mon, 3 Dec 2007 00:12:07 +0100 |
On 2 Dec 2007, at 22:58, Natalia Wolyczko wrote:
Hi Hans,
Many thanks for your replay.
Please keep the cc to the list, as you did now, because others may
join in.
I read calculator examples within the manual several times, but
still have some difficulties.
You might try the Usenet newsgroup comp.compilers.
What I didn't mention in my previous email is that I also tried
several different grammas
If you want to match a sequence of zero or more, you can try
foo_bar_sequence:
/* empty */
| foo_bar_sequence foo_bar
;
There is not symbol for the empty string; whence the comment-
And for one or more:
foo_bar_sequence:
/* empty *|
| foo_bar_sequence foo_bar
;
where in both cases
foo_bar:
FOO BAR
;
It should be in the Bison manual if you look for the word "recursion".
Hans Aberg