-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alejandro Linarez Rangel
committed
Mar 12, 2016
1 parent
0d3f5f8
commit 4b9a9ce
Showing
17 changed files
with
258 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,60 @@ | ||
utilizar clases.pseudo [ para Numero ] | ||
|
||
instancia Numero myInt | ||
fijar myInt#valor =* 0 | ||
|
||
funcion ModDemo | ||
[ Cualquier aparicion de myInt es de la global ] | ||
instancia Numero myInt | ||
[ Cualquier aparicion de myInt es de la local ] | ||
fijar myInt#valor =* 1024 | ||
escribir myInt#valor | ||
clase Base | ||
:metodoA | ||
:metodoB | ||
#(Final). | ||
heredar Objeto Base | ||
|
||
funcion Base#metodoA | ||
adquirir yo | ||
adquirir msg | ||
recibir_parametro yo | ||
fijar msg =* Hola desde Base:metodoA, habla la instancia: | ||
escribir msg | ||
escribir_esp | ||
escribir yo | ||
nl | ||
liberar yo | ||
liberar msg | ||
finfun | ||
|
||
funcion Base#metodoB | ||
adquirir yo | ||
adquirir msg | ||
recibir_parametro yo | ||
fijar msg =* Hola desde Base:metodoB, habla la instancia: | ||
escribir msg | ||
escribir_esp | ||
escribir yo | ||
nl | ||
liberar myInt | ||
[ Cualquier aparicion de myInt es de la global ] | ||
escribir myInt#valor | ||
liberar yo | ||
liberar msg | ||
finfun | ||
|
||
clase Hija | ||
:metodoB | ||
#(Final). | ||
heredar Base Hija | ||
|
||
funcion Hija#metodoB | ||
adquirir yo | ||
adquirir msg | ||
recibir_parametro yo | ||
fijar msg =* Hola desde Hija:metodoB, habla la instancia: | ||
escribir msg | ||
escribir_esp | ||
escribir yo | ||
nl | ||
fijar myInt#valor =* 2 | ||
liberar yo | ||
liberar msg | ||
finfun | ||
|
||
escribir myInt#valor [ global ] | ||
nl | ||
llamar ModDemo #(Final). [ local/global ] | ||
escribir myInt#valor [ global ] | ||
nl | ||
instancia Base base | ||
instancia Hija hija | ||
|
||
llamar base#metodoA #(Final). | ||
llamar base#metodoB #(Final). | ||
llamar hija#metodoA #(Final). | ||
llamar hija#metodoB #(Final). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
ESTE ARCHIVO CONTIENE TEXTO UNICODE | ||
|
||
Bienvenido al sistema de pruebas de PseudoD, donde estan las pruebas de cada | ||
caracteristica del lenguaje, a continuación podras ver como crear, editar | ||
y ejecutar las pruebas. | ||
|
||
ESTRUCTURA DE UNA PRUEBA | ||
Donde "./" es el directorio de la prueba: | ||
salida.txt Salida de la prueba. | ||
test.pd Prueba en PseudoD. | ||
entrada.txt Entrada de la prueba. | ||
fmt.txt Formato de los archivos de entrada/salida. | ||
espr.txt Salida esperada de la prueba. | ||
diff.txt Salida 'diff' entre 'espr.txt' y | ||
'salida.txt'. | ||
|
||
CREANDO UNA PRUEBA | ||
1. Como primer paso, se debe crear una carpeta en el directorio actual que | ||
posea de nombre, el nombre de la prueba. | ||
2. Se deben crear los archivos especificados dentro del directorio. | ||
3. Se debe llenar esos archivos con los formatos especificados. | ||
4. Ejecutar la prueba como es dicho más abajo. | ||
|
||
FORMATO DE LOS ARCHIVOS | ||
'salida.txt' | ||
Debe contener la salida sin modificar de la prueba, debe seguir el | ||
formato de 'fmt.txt'. | ||
'test.pd' | ||
Debe contener el código fuente de la prueba, comentado y debe cumplir | ||
los requisitos basicos de código fuente(ver más abajo). | ||
'entrada.txt' | ||
Entrada de la prueba, debe seguir el formato de 'fmt.txt'. | ||
'fmt.txt' | ||
Especificación del formato de las pruebas, en dos secciones: | ||
'---GENERAL---' | ||
Especificación en formato general de las pruebas, conteniendo | ||
variables y la descripción de ellas, por ejemplo: | ||
---GENERAL--- | ||
La entrada se compone de 'N' lineas con el siguiente formato: | ||
a b c d | ||
Donde 'N' es especificado en la primera linea como: | ||
N w f | ||
'---EXPR---' | ||
Especificación en formato de expresión regular(regexpr), por ejemplo: | ||
---EXPR--- | ||
(<N>[0-9]+) (<w>[a-z]*) (<f>[0-9]{2}) | ||
(<a><b><c><d>){{{N}}} | ||
Recordar que {a,b} es que la expresion se repita entre a y b veces | ||
mientras que {{a}} es el valor de la variable a. | ||
'espr.txt' | ||
Salida esperada de la prueba, siguiendo el formato de 'fmt.txt'. | ||
'diff.txt' | ||
Salida de ejecutar 'diff' entre 'salida.txt' y 'espr.txt'. | ||
|
||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
5 | ||
2 | ||
1 1 | ||
2 | ||
3 1 | ||
5 | ||
2 6 3 6 3 | ||
7 | ||
17 18 17 16 18 19 17 | ||
9 | ||
20 23 21 25 27 15 17 20 19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
1.000000 | ||
2.000000 | ||
4.000000 | ||
17.428571 | ||
20.777778 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
---ENTRADA--- | ||
---GENERAL--- | ||
La primera linea posee el formato: | ||
N | ||
Donde 'N' es el numero de listas a procesar, el resto d la entrada se | ||
compone de 'N' listas con el formato: | ||
Ni | ||
Li... | ||
Donde 'Ni' es el tamaño de la lista actual y 'Li...' son todos los | ||
elementos de la lista actual separados por espacios. | ||
---EXPR--- | ||
(<N>[0-9]+)\n(((<Ni>[0-9]+)\n((<Li>[0-9]+){{{Ni}}})){{{N}}}) | ||
---SALIDA--- | ||
---GENERAL--- | ||
La salida se compone de 'N' lineas que contienen un decimal que es el | ||
promedio de la lista 'Ni'. | ||
---EXPR--- | ||
((<Pi>[0-9]+(\.[0-9]+)?){{{N}}}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
1.000000 | ||
2.000000 | ||
4.000000 | ||
17.428571 | ||
20.777778 |
Oops, something went wrong.