Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. ; Limbajul din laboratorul 1, descris in BNF
  2.  
  3. <Litera> ::= "a" | "A" | "b" | "B" | "c" | "C" | "d" | "D" | "e" | "E" | "f" | "F" | "g" | "G" | "h" | "H" | "i" | "I" | "j" | "J" | "k" | "K" | "l" | "L" | "m" | "M" | "n" | "N" | "o" | "O" | "p" | "P" | "q" | "Q" | "r" | "R" | "s" | "S" | "t" | "T" | "u" | "U" | "v" | "V" | "w" | "W" | "x" | "X" | "y" | "Y" | "z" | "Z"
  4. <Cifra> ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
  5. <Numar> ::= <Cifra> | <Numar> <Cifra>
  6.  
  7. <Identificator> ::= <Litera> | <Identificator> (<Litera> | <Cifra>)
  8.  
  9. <Citire> ::= "Input " <Identificator>
  10. <Scriere> ::= "Output" <Identificator>
  11. <Instructiune> ::= <Citire> | <Scriere>
  12.  
  13. <Operator> ::= "+" | "-" | "*" | "/"
  14. <Operand> ::= <Numar> | <Identificator>
  15.  
  16. <Expresie> ::= <Operand> <Operator> <Operand>
  17.  
  18. <Atribuire> ::= <Identificator> "=" <Expresie>
  19. <Operand_atribuire> ::= <Operand> | "?"
  20. <Declaratie> ::= "Var " <Identificator> "=" <Operand_atribuire> | <Declaratie> ", " <Identificator> "=" <Operand_atribuire>
  21.  
  22. <Sintaxa> ::= <Instructiune> | <Expresie> | <Atribuire>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement