0

hi

here is BNF grammer.Can anybody help me to understand it.

<bool exp> -> <bool term> { "&" <bool term>}

<bool exp> -> "!" "(" <bool exp> ")"

<bool exp> -> <relation> { "|" <relation>}
<relation> -> <exp> ("=" | "<" | ">") <exp>
<exp> -> <term> {"+" <term> | "-" <term>}
<term> -> <factor> { "*" <factor> | "/" <factor>}
<factor> -> <number> | "(" <exp> ")"

here.inside double quote marks are terminals symbols,but | alone is a meta-symbol in the grammer.

3
Contributors
12
Replies
13
Views
8 Years
Discussion Span
Last Post by gbertoli3
0

The last line <factor> -> <number> | "(" <exp> ")"
says that a <factor> is a <number> or a <exp> enclosed in brackets.
The line <term> -> <factor> { "*" <factor> | "/" <factor>} means that a <term> is a <factor> followed by zero or more <factor> things which are preceded by a * or / sign.
With this you should be able to find the rest yourself, otherwise : google BNF grammar.

0

Cave ab homine unius libri.
There is to my knowledge no forum on BNF so he might as well have posted it here.

0

Thanks!

I saw some snippets using unsafe code for Image Manipulation. When I compared the two Images the method using the unsafe code looked better.

0

I just wanted to know which one(s)! Sorry for the poor wording. I've never made / used an assembler, but I know what one is.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.