400 likes | 513 Views
TRADUCTORES DDS CON CUP. Ejemplo de prueba. (false and (74 >= 34)) xor 45 < 78 ;. (false and (74 >= 34)) xor 45 < 78 ;. A. (false and (74 >= 34)) xor 45 < 78 ;. A L. A::=L. (false and (74 >= 34)) xor 45 < 78 ;. A L L xor J. L::=L xor J. (false and (74 >= 34)) xor 45 < 78 ;.
E N D
Ejemplo de prueba (false and (74 >= 34)) xor 45 < 78 ;
(false and (74 >= 34)) xor 45 < 78 ; A L A::=L
(false and (74 >= 34)) xor 45 < 78 ; A L L xor J L::=L xor J
(false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C L::=J J::=C
(false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 J::=( L ) C::=n1<n2
(false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L ) n1 < n2 L and J L::=L and J
(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 )
(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
(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
(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
(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; :}
(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; :}
(false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L )n1 < n2 falseand J ( L ) J C n1>=n2
(false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L )n1 < n2 falseand J ( L ) J C n1>=n2
(false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L )n1 < n2 falseand 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; :}
(false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L )n1 < n2 falseand J ( L ) J C true
(false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L )n1 < n2 falseand J ( L ) J true J::=C:eval {: Simbolo s=new Simbolo(); s.valor=eval.valor; RESULT = s; :}
(false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L )n1 < n2 falseand J ( L ) true L::=J:eval {: Simbolo s=new Simbolo(); s.valor=eval.valor; RESULT = s; :}
(false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L )n1 < n2 falseand J ( true)
(false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L )n1 < n2 falseand J ( true) J::=apertura_parentesis L:eval cierre_parentesis {: Simbolo s=new Simbolo(); s.valor=(eval.valor); RESULT = s; :}
(false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L )n1 < n2 falseand J true
(false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L )n1 < n2 falseand true
(false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L )n1 < n2 falseand true L::=L:ev1 opand J:ev2 {: Simbolo s=new Simbolo(); s.valor=(ev1.valor && ev2.valor); RESULT = s; :}
(false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( L )n1 < n2 false
(false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C ( false)n1 < n2
(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; :}
(false and (74 >= 34)) xor 45 < 78 ; A L L xor J J C falsen1 < n2
(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; :}
(false and (74 >= 34)) xor 45 < 78 ; A L falsexor J C n1 < n2
(false and (74 >= 34)) xor 45 < 78 ; A L falsexor J C n1 < n2
(false and (74 >= 34)) xor 45 < 78 ; A L falsexor 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; :}
(false and (74 >= 34)) xor 45 < 78 ; A L falsexor J C true
(false and (74 >= 34)) xor 45 < 78 ; A L falsexor J true J::=C:eval {: Simbolo s=new Simbolo(); s.valor=eval.valor; RESULT = s; :}
(false and (74 >= 34)) xor 45 < 78 ; A L falsexortrue
(false and (74 >= 34)) xor 45 < 78 ; A L falsexortrue L::=L:ev1 opxor J:ev2 {: Simbolo s=new Simbolo(); s.valor=(ev1.valor ^ ev2.valor); RESULT = s; :}
(false and (74 >= 34)) xor 45 < 78 ; A L true
(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"); :};
(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