short: yaec - Yet Another E Compiler [1.2b] uploader: amigae@swipnet.se author: amigae@swipnet.se requires: OS3.1+, 020+, (881+), PhxAss (dev/asm/), PhxLnk (dev/asm/) yaec (Yet Another E Compiler) _____________________________ By Leif Salomonsson 2000 ________________________ History ~~~~~~~ 1.1b : First Public Release 1.2b : Mostly bugfixes in the archive. ~~~~~~~ >> A Thanks to Wouter for this Great language << Does not work in this release ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++/-- on object-members NEW obj.member END obj.member Default arguments. ..and stuff I probably forgotten right now.. Installation ~~~~~~~~~~~~ Uunpack all to a drawer (lha x yaec.lha drawerpath/) Assign E: to drawer (ASSIGN E: drawerpath) Create path to E:bin (PATH E:bin) Have PhxAss/PhxLnk in commandpath (PATH phxass/lnk-drawer) Off you go. Differences from Wouters AmigaE: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Note that the compiler still is in beta-state so some things are not even mentioned here at all as their destiny is still to be decided on. Syntax ~~~~~~ New keyword : EXTERN ex : EXTERN 'gadtools' This lets you use any functions from gadtools.library ex : EXTERN 'mylinklib' This lets you use any functions from your own linklib You dont have to EXTERN exec,dos,graphics,intuition or utility.library This is done automatic by the compiler. This replaces the old MODULE 'alibrary' declaration. Classes ~~~~~~~ Classes can be now also be created dynamically on the stack with : DEF varname:classobjectname (the object IS cleared!) Same goes for globals and calling .end() + deallocation is automatic! Librarybases ~~~~~~~~~~~~ You have to declare any librarybases you use, except for exec,dos,intuition and graphics.library. OPT LINKOBJ ~~~~~~~~~~~ Lets you create a linkobj. Results in filename.o Linkobjects may contains global blocks of data such as LISTs ARRAYs etc.. Modules ~~~~~~~ All modules are in ASCII. This means you only have to compile your mainprogram. (unless you are using some linkobjects) Globals cannot be EXPORT:ed from modules. However.. they can be IMPORT:ed ! Just define them in mainprogram as usual, then IMPORT them to your module. Global ARRAYs, LISTs, OBJECTs (even classes) and STRINGs can now be declared in modules. Defaultvalues for globals is now possible. List`N`Quotes functions ~~~~~~~~~~~~~~~~~~~~~~~ Slight API-change here. same function, and some more. bool := ForAll(list, qexp, qexp2=NIL) bool, pos := Exists(list, qexp, qexp2=NIL) listvar := MapList(list, listvar, qexp) listvarlen := SelectList(list, listvar, qexp) Now. what happened to the {var} ? Here it is : \x (and \y). In the above functions \x gives the listitem and \y gives the listposition. qexp2 in ForAll() and Exists() will, if <> NIL be evaluated IF the result is TRUE. Then the result of qexp2 will be returned instead. ex : Exists(list, `\x=14, `PrintF('yes, at pos \d\n', \y)) Generated binaries ~~~~~~~~~~~~~~~~~~ Requires minimum v40 of the operatingsystem, 020+ and 881-fpu for floats. Hmm.. wonder if there is any more .. :) ohyes, the inline asm is done in a different way. Asm-instructions can not be mixed directly with E-code. But assigning values to and rom registers is possible. like this : D0 := variable funny(x, y, D2) var := A2 A0 := A2 Now. We would want to do something funny with theese registers : ASM move.l d0,(a0)+ -> one-liner ASM.. -> multi-liner bla___: move.l d0, (a0)+ dbra d0, bla___ ENDASM -> this is legal too. FOR a := 0 TO 99 DO ASM move.l (a0)+, -(a7) _The compiler does NOT check the asm-code in any way !!!_ Current implementation supports up to 040-asm. Becuse of a bug? in PhxAss, only 040-FPU-asm is possible. ------------------------------------------------------------ Distribution ~~~~~~~~~~~~ This archive (yaec.lha) can be freely distributed as long as all files stay together unchanged. ------------------------------------------------------------ YAEC is FreeWare ------------------------------------------------------------ Some of the names Ive been thinking of for this compiler : ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Eeh (working name) EC4 .. continiueing the masters work.. KamikazE .. a bit self destructive/offending? E! .. cool E# .. hehe e++ .. hoho BEEP .. sounds like another lang :) AmiE .. too perfect purple hazE .. may be too jimi Eternety .. not that bad BADGeR ATTACK .. a bit scary pherhaps.. and the list goes on... How can one choose from theese all nice names, huh ? yaec sounds pretty nice too, plus it is a good description of what this is. Yet Another E Compiler. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Send me questions and stuff. I`ll include them in later releases and try to answer them. ------EOF---------------------------------------------------