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.