parrotcode: Status of WMLScript Translator | |
Contents | Language Implementations | WMLScript |
Status of WMLScript Translator
The language WMLScript is a subset of ECMAScript (ie JavaScript). WMLScript defines also an bytecode interpreter (stack based), a binary format.
WMLScript is a part of the Wireless Application Protocol specifications.
The complete specification are available on http://www.openmobilealliance.org/ (formerly http://www.wapforum.org/)
WMLScript Specification, Version 28-Sept-2001
WMLScript Standard Libraries Specification, 25-SEP-2000
The translator is in 3 files src/script.pir
,
src/opcode.pir
(generated by build/translator.pl
from src/translation.rules
) and src/stdlibs.pir
(generated by build/stdlibs.pl
from src/wmlslib.cfg
).
There are 4 applications :
The design of the Translator & Stack to Register Mapping comes from the Jonathan Worthington's work (see languages/dotnet/doc/contents.pod).
Find optimization (like Register or OptRegister) compatible with opcodes SCAND & SCOR. These 2 opcodes pop one value and push one or two values.
languages/WMLScript/pmc/wmlsbytecode.pmc is a singleton PMC what holds a method load
.
This method is used to decode Bytecode File Format.
There are five types in WMLScript, each of them is implemented by a PMC.
languages/WMLScript/ops/wmls.ops defines opcode with new signature.
Some of these libraries are implemented in :
languages/WMLScript/runtime/wmlsstdlibs.pir gives an unique entry point and implements some helpers.
Some of these libraries are incomplete.
Francois Perrad.
|