943,560 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Nov 25th, 2008
0

help with BNF

Expand Post »
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.
Similar Threads
Reputation Points: 7
Solved Threads: 0
Newbie Poster
laki234 is offline Offline
10 posts
since Nov 2008
Nov 26th, 2008
0

Re: help with BNF

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.
Reputation Points: 2023
Solved Threads: 644
Senior Poster
ddanbe is offline Offline
3,735 posts
since Oct 2008
Nov 26th, 2008
0

Re: help with BNF

Is this even C#?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gbertoli3 is offline Offline
16 posts
since Sep 2008
Nov 26th, 2008
0

Re: help with BNF

Then why is it in the C# Forum?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gbertoli3 is offline Offline
16 posts
since Sep 2008
Nov 26th, 2008
0

Re: help with BNF

Quote originally posted by gbertoli3 ...
Is this even C#?
No it isn't...
Reputation Points: 2023
Solved Threads: 644
Senior Poster
ddanbe is offline Offline
3,735 posts
since Oct 2008
Nov 26th, 2008
0

Re: help with BNF

Cave ab homine unius libri.
There is to my knowledge no forum on BNF so he might as well have posted it here.
Reputation Points: 2023
Solved Threads: 644
Senior Poster
ddanbe is offline Offline
3,735 posts
since Oct 2008
Nov 26th, 2008
0

Re: help with BNF

Yeah I guess!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gbertoli3 is offline Offline
16 posts
since Sep 2008
Nov 26th, 2008
0

Re: help with BNF

Nice snippet. Why use unsafe code?
Reputation Points: 2023
Solved Threads: 644
Senior Poster
ddanbe is offline Offline
3,735 posts
since Oct 2008
Nov 26th, 2008
0

Re: help with BNF

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gbertoli3 is offline Offline
16 posts
since Sep 2008
Nov 26th, 2008
0

Re: help with BNF

Can be. Why not use assembler then, it will look even better.
Reputation Points: 2023
Solved Threads: 644
Senior Poster
ddanbe is offline Offline
3,735 posts
since Oct 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Computer Science Forum Timeline: Quantum Automata
Next Thread in Computer Science Forum Timeline: New Open Source Project





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC