Hi,

I would like to know how to write BNF for code blocks that have
optional block enclosing symbols like {}
For example, the following statements are both valid:

if () $printf();

if()
{
  func1;
  func2;
}

How to I specify that {} are optional when number of statement is just one.

Also, when I write a BNF for a new lanugage, the words that are
reserved are categorized as keywords.
What about symbols like {} etc. What are they categorized as?

Regards


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

Reply via email to