Advertisement
lewissmallwood

BNF Mathematical Operations

Feb 6th, 2016
3,085
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
BNF 0.49 KB | None | 0 0
  1. <digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
  2.  
  3. <positive int> ::= <digit> | <digit><positive int>
  4. <positive float> ::= <positive int> | <positive int> . <positive int>
  5. <valid number> ::= <positive float> | -<positive float>
  6.  
  7. <whitespace> ::= " " <whitespace> | ""
  8. <arithmetic operator> ::= + | - | รท | x | *
  9. <user input> ::= <valid number><arithmetic operator><valid number>|<valid number><whitespace><arithmetic operator><whitespace><valid number>
  10. <computer output> ::= <valid number>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement