Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. NoTerminales = { P F B S H L U C T A K Q E E1 G G1 V V1 W X }
  2. Axioma = P
  3. Terminales = { eof , function id ( ) { } ; input print var switch return int bool str case : default cteInt true false cteStr + ++ == = && }
  4.  
  5. Producciones = {
  6.  
  7. P -> F P
  8. P -> B P
  9. P -> eof
  10.  
  11. B -> input ( id ) ;
  12. B -> print ( E ) ;
  13. B -> return E ;
  14. B -> var T id ;
  15. B -> id S
  16. B -> switch ( E ) { C }
  17.  
  18. F -> function H id ( A ) { Q } ;
  19.  
  20. S -> = E ;
  21. S -> ( L ) ;
  22.  
  23. H -> T
  24. H ->
  25.  
  26. L -> E U
  27. L ->
  28.  
  29. U -> , E U
  30. U ->
  31.  
  32. C -> case E : B C
  33. C -> default : B
  34. C ->
  35.  
  36. T -> int
  37. T -> bool
  38. T -> str
  39.  
  40. A -> T id K
  41.  
  42. K -> , T id K
  43. K ->
  44.  
  45. Q -> B Q
  46. Q ->
  47.  
  48. E -> G E1
  49.  
  50. E1 -> && E
  51. E1 ->
  52.  
  53. G -> V G1
  54.  
  55. G1 -> == G
  56. G1 ->
  57.  
  58. V -> id X
  59. V -> cteInt
  60. V -> cteStr
  61. V -> true
  62. V -> false
  63. V -> ( E )
  64.  
  65. X -> ++
  66. X -> ( L )
  67. X ->
  68. }
  69.  
  70.  
  71. 2 7 22 2 8 11 31 34 37 40 39 36 33 3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement