help-bison
[Top][All Lists]
Advanced

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

How to write the BNF


From: Sharan Basappa
Subject: How to write the BNF
Date: Mon, 10 Mar 2008 20:25:23 +0530

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




reply via email to

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