The development of the new Prowl compiler is steaming at good pace, only lacking:
- decission: if
- loops: for, foreach, do... while y while.
- Dynamic inheritance.
It is already fully implemented:
- definition of local references
. messages
. assignments
It is able to compile most programs except those with loops and decisions
Investigación en el paradigma de orientación a objetos basada en prototipos, y persistencia.
07 abril 2011
Prowl 2.0
El desarrollo del compilador sigue avanzando, y en este momento sólo le faltan:
- decisión: if
- repetición: for, foreach, do... while y while.
- Herencia dinámica
Estando ya implementado:
- definición de variables locales
. mensajes
. asignaciones
Es capaz de compilar la mayoría de programas, excepto aquellos con decisiones o repeticiones
- decisión: if
- repetición: for, foreach, do... while y while.
- Herencia dinámica
Estando ya implementado:
- definición de variables locales
. mensajes
. asignaciones
Es capaz de compilar la mayoría de programas, excepto aquellos con decisiones o repeticiones
08 marzo 2011
prowlc
prowlc, the new compiler for PROWL, said: ¡Hola, mundo!
With this program as input:
There are a few minor syntax changes. Before, the end of the object was marked with the reserved word endObject, while now it is possible to use the curl braces. Before, the programmer had to write object, method and attribute, when obj, atr and mth are just as valid. As it can be inferred from this, the old syntax is still valid as well.
prowlc published:
Generating...
Though it is not finished (not at all, only some kind of messages are allowed), it is a big first step. The objective is to have a compiler as stable as the virtual machine. Unfortunately, the current compiler was developed by a student and it has too many cumbersome cases.
About implementation, it is not lex&yacc based, nor it is based in any of its variants. PROWL has a simple syntax that allows to write a simple syntax and semantic analyzers. The different behaviours of the linux and windows versions of the current compiler decided me about this.
With this program as input:
/*
Hola, mundo desde PROWL
jbgarcia@uvigo.es
*/
obj HolaMundo: ConsoleApplication {
mth + doIt()
{
System.console.writeLn( "¡Hola mundo!" );
return;
}
}
There are a few minor syntax changes. Before, the end of the object was marked with the reserved word endObject, while now it is possible to use the curl braces. Before, the programmer had to write object, method and attribute, when obj, atr and mth are just as valid. As it can be inferred from this, the old syntax is still valid as well.
prowlc published:
Prowl - PROtotype-Writing Language - A Zero's programming language
v2.0 20100831
f: 'HolaMundo.pwl'
Compilando...
Generando...
Obj(s): 1
EOF('HolaMundo')
Generating...
OBJ HolaMundo ConsoleApplication
MTH + doIt
STR ¡Hola mundo!
ASG __gp1
MTH System.console writeLn __gp1
RET
ENM
ENO
Though it is not finished (not at all, only some kind of messages are allowed), it is a big first step. The objective is to have a compiler as stable as the virtual machine. Unfortunately, the current compiler was developed by a student and it has too many cumbersome cases.
About implementation, it is not lex&yacc based, nor it is based in any of its variants. PROWL has a simple syntax that allows to write a simple syntax and semantic analyzers. The different behaviours of the linux and windows versions of the current compiler decided me about this.
prowlc
prowlc, el nuevo compilador de PROWL, ha dicho: ¡Hola, mundo!
Ante este programa:
Nótese que hay algunos cambios de sintaxis. Antes, el fin de objeto se marcaba con endObject, mientras que ahora se pueden usar llaves. Antes, era necesario teclear object, method y attribute, cuando obj, atr y mth son igual de válidas. Tal y como se deduce de lo escrito, la antigua sintaxis sigue siendo perfectamente válida.
prowlc ha dicho:
Y ha generado esto:
Aunque no está terminado, ni mucho menos (sólo soporta algunos tipos de mensajes en este momento), es un gran primer paso. El objetivo es tener un compilador de prowl tan estable como la máquina virtual. Desgraciadamente, el compilador actual fue desarrollado por una estudiante y tiene demasiados casos particulares.
Sobre la implementación, decir que no está basado en Lex & Yacc o variantes. De hecho, no está basado en nada: todo ha sido construido desde el principio. La gramática de PROWL es suficientemente sencilla como para no tener que escribir una analizador léxico y sintáctico complicadísimo, y la diferencia de comportamiento entre las versiones de Linux y Windows del actual compilador me decidieron en este sentido. No me arrepiento, desde luego.
Ante este programa:
/*
Hola, mundo desde PROWL
jbgarcia@uvigo.es
*/
obj HolaMundo: ConsoleApplication {
mth + doIt()
{
System.console.writeLn( "¡Hola mundo!" );
return;
}
}
Nótese que hay algunos cambios de sintaxis. Antes, el fin de objeto se marcaba con endObject, mientras que ahora se pueden usar llaves. Antes, era necesario teclear object, method y attribute, cuando obj, atr y mth son igual de válidas. Tal y como se deduce de lo escrito, la antigua sintaxis sigue siendo perfectamente válida.
prowlc ha dicho:
Prowl - PROtotype-Writing Language - A Zero's programming language
v2.0 20100831
f: 'HolaMundo.pwl'
Compilando...
Generando...
Obj(s): 1
EOF('HolaMundo')
Y ha generado esto:
OBJ HolaMundo ConsoleApplication
MTH + doIt
STR ¡Hola mundo!
ASG __gp1
MTH System.console writeLn __gp1
RET
ENM
ENO
Aunque no está terminado, ni mucho menos (sólo soporta algunos tipos de mensajes en este momento), es un gran primer paso. El objetivo es tener un compilador de prowl tan estable como la máquina virtual. Desgraciadamente, el compilador actual fue desarrollado por una estudiante y tiene demasiados casos particulares.
Sobre la implementación, decir que no está basado en Lex & Yacc o variantes. De hecho, no está basado en nada: todo ha sido construido desde el principio. La gramática de PROWL es suficientemente sencilla como para no tener que escribir una analizador léxico y sintáctico complicadísimo, y la diferencia de comportamiento entre las versiones de Linux y Windows del actual compilador me decidieron en este sentido. No me arrepiento, desde luego.
29 diciembre 2009
Instalador para Zero
Desde hoy, está a disposición de aquellos interesados en Zero, o en probar la persistencia, y la programación orientada a objetos basada en prototipos, de un instalador que permite bajarse y probar Zero en segundos, en lugar de descargar y descomprimir cada paquete manualmente.
Necesita de Java para funcionar, aunque es un software que está instalado en casi todas las máquinas hoy en día.
Como siempre, disponible en la página de descargas del Proyecto Zero.
Necesita de Java para funcionar, aunque es un software que está instalado en casi todas las máquinas hoy en día.
Como siempre, disponible en la página de descargas del Proyecto Zero.
Zero installer
From today on, people wishing to learn about persistence, and Prototype-based object-oriented programming, or simply interested in Zero, can use the Zero installer in order to test it, instead of downloading and decompressing the packages manually.
The Zero installer is written in Java, though today that software is installed in nearly any machine.
You can find that in the download page:
Zero project
The Zero installer is written in Java, though today that software is installed in nearly any machine.
You can find that in the download page:
Zero project
25 septiembre 2009
PROWL compiler for Linux
The PROWL compiler for Linux has shown various strange errors. They are strange because they don't show in Windows, and it has been compiled from the same sources.
The strangest of all of them is that two instructions (messages) as simple as the following ones make the compiler (oddly) complain:
They'll have to be substituted with similar instructions, in which the return value must be stored.
While it is true that this compilers (prowl and J--) have been excelent for showing Zero's capabilities, they have turned out to be not very stable, thus making the need to replace them in the medium-term.
The strangest of all of them is that two instructions (messages) as simple as the following ones make the compiler (oddly) complain:
System.console.writeLn( "Hola" );
System.console.lf();
They'll have to be substituted with similar instructions, in which the return value must be stored.
reference retVal;
// ...
retVal = System.console.writeLn( "Hola" );
retVal = System.console.lf();
While it is true that this compilers (prowl and J--) have been excelent for showing Zero's capabilities, they have turned out to be not very stable, thus making the need to replace them in the medium-term.
Compilador de PROWL para Linux
El compilador de PROWL para linux tiene varios errores extraños, puesto que es compilado con los mismos fuentes que el compilador para Windows.
El más raro de todos ellos es que dos instrucciones (mensajes) tan simples como estas provocan error:
Teniendo que ser sustituidas por sentencias similares, pero guardando el valor de retorno.
Lo cierto es que estos compiladores (prowl y J--), pese a ser excelentes en cuanto a que han demostrado características de Zero, no han resultado ser demasiado estables, lo que supone la necesidad de relevarlos a término medio.
El más raro de todos ellos es que dos instrucciones (mensajes) tan simples como estas provocan error:
System.console.writeLn( "Hola" );
System.console.lf();
Teniendo que ser sustituidas por sentencias similares, pero guardando el valor de retorno.
reference retVal;
// ...
retVal = System.console.writeLn( "Hola" );
retVal = System.console.lf();
Lo cierto es que estos compiladores (prowl y J--), pese a ser excelentes en cuanto a que han demostrado características de Zero, no han resultado ser demasiado estables, lo que supone la necesidad de relevarlos a término medio.
Small correction of the standard library
I've fixed some problems in the standard library (IntStdLib). The source and the compiled files are now corrected in the current pacckages for the 3.2 version of Zero: zero-bin-3.2-xxx.zip
Pequeña corrección de la librería estandar
He corregido algunos problemas en la librería estándar (IntStdLib). Tanto la fuente como el ensamblador modificado están en la web, en los paquetes para Windows y Linux zero-bin-3.2-xxx.zip
Suscribirse a:
Entradas (Atom)