help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Grammar definition problem.


From: Hans Aberg
Subject: Re: Grammar definition problem.
Date: Mon, 21 Mar 2005 19:18:28 +0100

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 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 express the

letter AND {letter OR digit } rule in the Bison grammar.

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?


Regards,
Atul.


_______________________________________________
address@hidden http://lists.gnu.org/mailman/listinfo/help-bison






reply via email to

[Prev in Thread] Current Thread [Next in Thread]