RE: Grammar definition problem.

2005-03-28 Thread Vincent Zweije
>> x: letter extension >> >> extension: /* Empty */ >> >> extension: extension letter >> >> extension: extension digit And just for sports: X -> letter X -> X letter X -> X digit Ciao. Vincent. ___ Help-bison@gnu.org http://lists.gnu.org/ma

Re: Grammar definition problem.

2005-03-22 Thread Hans Aberg
Please continue to cc the Help-Bison list, so that more can help. Often one is using a program like Flex to generate a lexer, a program that tokenizes the input. Then the Bison generated parser gets token number to parse. This kind of setup is described, for example, in the book by Aho, Sethi &

Re: Grammar definition problem.

2005-03-22 Thread Atul Kulkarni
Hey Laurence, Thanks! that was nice and simple, I should have go that :( earlier! Regards, Atul. On Mon, 21 Mar 2005 11:59:49 +0100 (MET), Laurence Finston <[EMAIL PROTECTED]> wrote: > On Mon, 21 Mar 2005, Atul Kulkarni wrote: > > > how do I put the OR part of the rule inconsideration of the

Re: Grammar definition problem.

2005-03-21 Thread Hans Aberg
In addition, note that most wold put this stuff in the lexer (generated say by Flex). At 14:55 +0530 2005/03/21, Atul Kulkarni wrote: Hi All, I am facing problem in defining the following grammar for Bison. X -> letter { letter | digit }. here letter and digit are terminals and X is the non term

Re: Grammar definition problem.

2005-03-21 Thread Laurence Finston
On Mon, 21 Mar 2005, Atul Kulkarni wrote: > how do I put the OR part of the rule inconsideration of the fact that > that scentence has to start with the "letter" and later have any > number of of digit? x: letter extension extension: /* Empty */ extension: extension letter extension: extensio

RE: Grammar definition problem.

2005-03-21 Thread Vincent Zweije
Atul wrote: > X -> letter { letter | digit }. > here letter and digit are terminals and X is the non terminal symbol. > how do I put the OR part of the rule inconsideration of the > fact that that scentence has to start with the "letter" and > later have any number of of digit? Use a nontermina

Grammar definition problem.

2005-03-21 Thread Atul Kulkarni
Hi All, I am facing problem in defining the following grammar for Bison. X -> letter { letter | digit }. here letter and digit are terminals and X is the non terminal symbol. I am not able to put this rule in the bison grammar form hence need some advice on this. in particular I am not able to