Advertisement
m4v1

Gramatica

Nov 27th, 2017
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CODE -> INSTRUCTION*
  2.  
  3. INSTRUCTIONS -> FOR
  4. IF
  5. WHILE
  6. INPUT
  7. ASSIGN
  8. PRINT
  9. pass
  10.  
  11. FOR -> for VAR in range(VARB, VARB): TAB
  12.  
  13. IF -> if BOOL TAB
  14. if BOOL TAB else: TAB
  15.  
  16. BOOL -> EXPRESSION {B_OP EXPRESSION}* :
  17.  
  18. TAB -> tab INSTRUCCTIONS* untab
  19.  
  20. WHILE -> BOOL TABW
  21.  
  22. TABW -> tab INSTRUCTIONS* pass untab
  23.  
  24. INPUT -> VAR = ("string")
  25.  
  26. ASSIGN -> VAR = VARB
  27. VAR = INPUT
  28. VAR = [VARB {, VARB}* ]
  29.  
  30. PRINT -> print(PRT {,prt}* )
  31.  
  32. VAR- > ID
  33. ID[VARB]
  34.  
  35. VARB -> EXPRESSION
  36. LEN
  37. VAR[VARB]
  38.  
  39. PRT -> string
  40. Input
  41. VARB
  42.  
  43. LEN -> len(VAR)
  44.  
  45. EXPRESSION -> F[(+||-)F]*
  46.  
  47. F -> M[(x||/)F]*
  48.  
  49. M -> L[(%||**)M]*
  50.  
  51. L-> ID
  52. INT
  53. (EXPRESSION)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement