Presentation is loading. Please wait.

Presentation is loading. Please wait.

TRADUCTORES DDS CON CUP. Ejemplo de prueba (false and (74 >= 34)) xor 45 < 78 ;

Similar presentations


Presentation on theme: "TRADUCTORES DDS CON CUP. Ejemplo de prueba (false and (74 >= 34)) xor 45 < 78 ;"— Presentation transcript:

1 TRADUCTORES DDS CON CUP

2 Ejemplo de prueba (false and (74 >= 34)) xor 45 < 78 ;

3 A

4 ALAL A::=L

5 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J L::=L xor J

6 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C L::=J J::=C

7 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 J::=( L ) C::=n1<n2

8 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 L and J L::=L and J

9 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 L and J J ( L ) L::=J J::=( L )

10 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 L and J J ( L ) false J J::=false L::=J

11 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 L and J J ( L ) false J C J::=C

12 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 L and J J ( L ) false J C n1>=n2 C::=n1>=n2

13 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 L and J J ( L ) false J C n1>=n2 J:=vfalse {: Simbolo s=new Simbolo(); s.valor=false; RESULT = s; :}

14 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 L and J false ( L ) J C n1>=n2 L::=J:eval {: Simbolo s=new Simbolo(); s.valor=eval.valor; RESULT = s; :}

15 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 false and J ( L ) J C n1>=n2

16 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 false and J ( L ) J C n1>=n2

17 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 false and J ( L ) J C 74>=34 C::=numero:n1 opmayori numero:n2 {:int v1=Integer.parseInt(n1); int v2=Integer.parseInt(n2); Simbolo s=new Simbolo(); s.valor=(v1 >= v2); RESULT = s; :}

18 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 false and J ( L ) J C true

19 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 false and J ( L ) J true J::=C:eval {: Simbolo s=new Simbolo(); s.valor=eval.valor; RESULT = s; :}

20 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 false and J ( L ) true L::=J:eval {: Simbolo s=new Simbolo(); s.valor=eval.valor; RESULT = s; :}

21 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 false and J ( true)

22 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 false and J ( true) J::=apertura_parentesis L:eval cierre_parentesis {: Simbolo s=new Simbolo(); s.valor=(eval.valor); RESULT = s; :}

23 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 false and J true

24 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 false and true

25 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 false and true L::=L:ev1 opand J:ev2 {: Simbolo s=new Simbolo(); s.valor=(ev1.valor && ev2.valor); RESULT = s; :}

26 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 false

27 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( false ) n1 < n2

28 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( false ) n1 < n2 J::=apertura_parentesis L:eval cierre_parentesis {: Simbolo s=new Simbolo(); s.valor=(eval.valor); RESULT = s; :}

29 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C false n1 < n2

30 (false and (74 >= 34)) xor 45 < 78 ; A L L xor J false C n1 < n2 L::=J:eval {: Simbolo s=new Simbolo(); s.valor=eval.valor; RESULT = s; :}

31 (false and (74 >= 34)) xor 45 < 78 ; A L false xor J C n1 < n2

32 (false and (74 >= 34)) xor 45 < 78 ; A L false xor J C n1 < n2

33 (false and (74 >= 34)) xor 45 < 78 ; A L false xor J C 45 < 78 C::=numero:n1 opmenor numero:n2 {: int v1=Integer.parseInt(n1); int v2=Integer.parseInt(n2); Simbolo s=new Simbolo(); s.valor=(v1 < v2); RESULT = s; :}

34 (false and (74 >= 34)) xor 45 < 78 ; A L false xor J C true

35 (false and (74 >= 34)) xor 45 < 78 ; A L false xor J true J::= C:eval {: Simbolo s=new Simbolo(); s.valor=eval.valor; RESULT = s; :}

36 (false and (74 >= 34)) xor 45 < 78 ; A L false xor true

37 (false and (74 >= 34)) xor 45 < 78 ; A L false xor true L::= L:ev1 opxor J:ev2 {: Simbolo s=new Simbolo(); s.valor=(ev1.valor ^ ev2.valor); RESULT = s; :}

38 (false and (74 >= 34)) xor 45 < 78 ; A L true

39 (false and (74 >= 34)) xor 45 < 78 ; A true A::=L:eval semicolon {: System.out.println("\n\nExpresion logica correcta. Valor final: "+ eval.valor +"\n\n"); :};

40 (false and (74 >= 34)) xor 45 < 78 ; RESULTADO APERTURA_PAR [(]FALSE [false] OPAND [and] APERTURA_PAR [(]NUMERO [74] OPMAYORI [>=] NUMERO [34]CIERRE_PAR [)]CIERRE_PAR [)] OPXOR [xor] NUMERO [45] OPMENOR [<] NUMERO [78] SEMICOLON [;] NUMERO [345] Expresion logica correcta. Valor final: true


Download ppt "TRADUCTORES DDS CON CUP. Ejemplo de prueba (false and (74 >= 34)) xor 45 < 78 ;"

Similar presentations


Ads by Google