| | |
help with BNF
Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
![]() |
•
•
Join Date: Nov 2008
Posts: 10
Reputation:
Solved Threads: 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.
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.
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.
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.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Make love, no war. Cave ab homine unius libri.
Danny
![]() |
Similar Threads
- help in bnf? (C#)
- Object Orientated C+++.net Calculator! (C++)
- Convert expression to BNF (Computer Science)
- Algorithm: BNF question (C)
- A problem with a given Syntax! (Computer Science)
Other Threads in the Computer Science Forum
- Previous Thread: Quantum Automata
- Next Thread: New Open Source Project
| Thread Tools | Search this Thread |
ai algorithm algorithms amazon assignment assignmenthelp assignments automata battery bigbrother binary bittorrent bizarre bletchleypark blogging bomb business cern codebreaker compiler computer computers computerscience computertrackingsoftware conversion csc data dataanalysis dataintepretation development dfa dissertation dissertations dissertationthesis dissertationtopic ebook employment energy extensions floatingpoint foreclosuresoftware fuel gadgets geeks givemetehcodez government graphics hardware history homeowners homeworkassignment homeworkhelp humor ibm idea ideas internet iphone ipod itcontracts jobs kindle laser laws lsmeans mainframes marketing mining mobileapplication msaccess netbeans networking news os p2p piracy piratebay programming research sas science security sex simulation software spying sql study supercomputer supercomputing sweden technology textfield turing turingtest two'scompliment uk virus warehouse ww2






