s s .$ .$ .$$ .$$ .$^$ $$$ .$' $. .s$Ss.. .s$Ss.. `$$ .s$Ss.. .$' $$ .$$$żų^ż$$s. .$$$żų^ż$$s. `$. .$$$żų^ż$$s. .$$' $$ $$$ `$$ $$$ `$$ $$ $$$ `$$ .s$$$$$s. ż$. `ż$$s. ż $$$ ż $$. `ż$$s. ż .sS$żų^ųżS$$Ss.ż `$$$ż' $$$. .sS. $$$ `ųżS$Ss. ..ssS$$ż' `ųżS$s. .$$' `$$$ .s$SżS$. $$$. .s. `ųż$s. ż$Sż' $Sss. .$$' .$ $$$. .s$Sż'.$ $$ $$$$. .$$' `$$ $$$$$ $$$ .$$ `$$$ `żż' .$$ `$ $$$$$ $$$ .$$ $$$$ż `$$s. .s$$' `$$s. .s$$' $$$$ż `$$s. .s$$' $$ż `ż$$$Sż' Ms. `ż$$$Sż' $$ż `ż$$$Sż' $' $' C O R P. Power PPL Compiler 1.OO Public Beta 3 (C) 1996 Lone Runner, The Aegis Corporation ś ś ś-ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ--ś ś ś ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ±±Ż IMPORTANT Ž±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ THIS IS A PUBLIC ... ÜÜŪŪÜ ŪŪß ßŪ ŪŪ ÜÜŪ ŪŪ ßÜ Ūßß ßŪß ŪßŪ ŪŪ ÜÜß Ūß Ū ŪßŪ ŪŪ ßß ßßß ß ß ß ŪŪ Ūß ß ... VERSION I need your bug reports ! Send me your remarks at the address : lone@mygale.org lone.runner@nuxes.frmug.fr.net francis.gastellu@ace.epita.fr ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ±±Ż DESCRIPTION Ž±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PPC is a PPL Compiler. :) It will compile a standard PPS source up to v3.30 PPE format (equivalent to PPLC 3.30) You say : "My compiler works great, why should i change?" I say : "Because PPC will do all that your compiler does, plus many more, and will compile to a usually smaller and faster PPE. You will also be able to use and make libraries, and much more!" PPLC PPC ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Seemless integration in PowerPPL yes yes User Functions & Procedures yes yes .LIB Generation & Linking no yes PPLdebug .SYM debug file creation no yes Autodeclare vars (optional) no yes Code control compiler directives no yes Syntax checking only option no yes Autodetect encoding method no yes Force flat ppe or any encoding type no yes Imbedded Select Cases no yes Chained simple while statements no yes Direct character addressing no yes Basic For/Next statement 93 bytes 55 bytes Basic While/Endwhile statement 27 bytes 21 bytes Simple While statement 16 bytes 16 bytes 3 cases SelectCase statement 75 bytes 57 bytes Basic If/Else/Endif statement 27 bytes 21 bytes Simple If statement 13 bytes 13 bytes 3 cases If/Elseif/Endif statement 75 bytes 57 bytes ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Note that the less number of bytes it takes, the faster it runs. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ±±Ż INSTALLATION Ž±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ No Installation program is currently available. Unzip the archive (using -d !) in a new directory (ie: C:\PPL). Add the following to your path: C:\PPL\BIN if you installed in C:\PPL of course. C:\PPL ĆÄÄÄBIN binaries. PPC.EXE, RUN.EXE, DEB.EXE, PPLIB.EXE, PPLDEBUG.EXE (c)t4f ĆÄÄÄLIB Libraries binaries (*.LIB) ĆÄÄÄLIBSRC Libraries sources ĄÄĀÄEXAMPLES Example & demonstration files ĄÄÄÄ... Edit the file PPC.INI located in the ..\BIN subdirectory to match your needs. It is important to edit the path to libraries so you won't have to use the #libpath directive or -lp option! Also, this INI file will let you choose whether or not the compiler will use some options by default. For example, you could deactivate the default generation of user variables by editing the following line : UserVars=1 And setting its value to 0 : UserVars=0 PPC.EXE usage ÄÄÄÄÄÄÄÄÄÄÄÄÄ Usage: ppc [{+-}switch] [-option] filename[.pps] [filename[.lib] ...] +switch turn on option -switch turn off option switch action when turned on d make debug code (ppldebug .sym format) dc write debug.cod file (for internal debug purpose) f force flat PPE 2.00, do not honnor pcb encoding convention h force honnor pcb encoding convention (autodetect crypting version) imp set implicit variable declaration on (autodeclare option) l list source while compiling lib compile to .LIB library rather than .PPE o use alternate output style (PPLC-like) s only check syntax (don't create .PPE) u generates user variables Options: -feN force pcb encoding type. N=coding method -lpXXXX specify library path. ie: lpC:\PP\LIB Use of a resonse file (for compatibility with any MAKE utility) is also supported : ppc @filename command lines arguments will be read from the response file, each parameter separated by a carriage return. Details ÄÄÄÄÄÄÄ Switches: description when activated with '+' {+-}d generates debug code in .SYM ppldebug format. for now, this does not work in conjunction with external .LIB linking. but for any source not using external libraries, using -d will generate a valid (hopefully) .SYM debug symbol table to use with Tools4Fools'PPLdebug. compiler directive equivalent: #debug {+-}dc this is used for my internal debugging. You don't need this switch. {+-}f force generation a flat 2.00 unencoded PPE. Use this switch to tell the compiler not to honnor PCB encoding conventions. Be sure that this PPE will be run on a PCB version that will support it! compiler directive equivalent: #flat {+-}imp set implicit variable declaration on. See below for more information about this option compiler directive equivalent: #implicit {+-}l list sourec while compiling. This is for internal debugging. You should not need this switch. {+-}lib generate a .LIB rather than a .PPE a .LIB library offers all its functions, procedures, and global variables public to a source file just using the compiler directive #use libname compiler directive equivalent: #lib {+-}s only check syntax. ppc will not create PPE on disk. compiler directive equivalent: #syntax {+-}uv generates user variables. needed if you used any user variable such as U_SEC. compiler directive equivalent: #user or #uservar {+-}o use alternate console output style. With this switch turned on you will get messages taht will look just like PPLC ones. This allows the use of PPC in PowerPPL. Options : -feN force to a specific encoding type. N is the encoding method. N=0 for PPE 2.00, N=1 for PPE 3.20, N=2 for PPE 3.30, and 3 for Frontier Script 1.00 compiler directive equivalent: #force encoding N -lpXXXX specify path for libraries. for example -lpC:\LIB will tell the compiler to search libraries in C:\LIB. compiler directive equivalent: #libpath XXXX List of compiler directives : ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ #libpath yourpath ; set library path to 'yourpath' #use yourlib (or #uses) ; include library 'yourlib' #lib ; generate .LIB rather than .PPE #ppe ; force generating .PPE even if "-lib" #user / #uservar ; generate user variables #nouser / #nouservar ; don't generate user variables even if "-uv" #syntax ; only check syntax (don't create .PPE) #compile ; force PPE creation on disk even if "-s" #error message ; end compilation with error 'message' #warning message ; generates a compilation warning #note message ; issues a note from the compiler #implicit ; set implicit variable declaration #explicit ; force explicit variable declaration even if "-imp" #debug ; generate debug table .SYM file #nodebug ; force no debug .SYM file even if "-d" #encoding (or #enc) ; autodetect encoding type even if "-f" or "-feN" #force encoding N (or #fe N) ; force encoding type N #flat ; force no encoding (PPE 2.00) even if "-feN" #include yourfile.ext ; includes an external file (also accept pplc syntax: '$include:yourfile.ext) Options priority is the following: - First, the compiler will read PPC.INI to set default options - Then, it will read the command line to change options to what is desired this session. - Finally, when compiling, compiler directives may again change options for this session. Compiler directives have the highest level of priority over command line and INI file. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ±±Ż CREATING LIBRARIES Ž±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Creating a library is really simple. When you have a source file with Functions & Procedures you wish to put in a library, simply compile it with the +lib switch (or #lib compilation directive) and you will end up with a .LIB file. For a cleaner library, you could edit your source as a separate library source, apart of your original ppe source, so you don't put any code in the main section. This is not mandatory, but will generate a smaller library. If your source is dedicated to compile to a lib, put #lib at the beginning of the file so ppc will always compile to a .LIB Note : ž You cannot build a library if you use external libraries. All libraries are from a single source. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ±±Ż USING LIBRARIES Ž±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ To use a library you previously created or you downloaded as a ppl library package, put your library in your source path (you could also put it in a general lib path and use #libpath or -lpXXXX). Put the following line at the top of your source : #use libname where 'libname' is the name of the library you whish to use. That's all, you can now use any Function, Procedure, or Global variable from the library, directly in your source, without any more declaration. Note : ž You cannot build a library if you use external libraries. All libraries are from a single source. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ±±Ż ENCODING Ž±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Because of decompilers (ahem... ;)) Clark Development Company decided to encode their PPE. There are basically 3 methods of encoding for PCB, and one more format reserved to Frontier: - none (v2.00) - simple encoding (v3.01, v3.10, v3.20) - double encoding (v3.30) - Frontier-specific (Frontier Script v1.00) Note that fontier-specific PPE are not crypted in any way, this speeds up the loading of PPEs PPC gives you a total control over the encoding method used on the PPE. By default, PPC autodetects the encoding method that should be used based on the statements you use, and the structure of your program. For example, if you use user functions and procedures, ppc will automatically encode to a PPE 3.01. If, in addition, you use some specific version statements and functions, ppc will autoswitch to the specific version. For example, if you use Findfirst in your PPE, ppc will autoswitch to a PPE 3.10. If you use ChDir, ppc will switch to a PPE 3.20. PPC will allways use the lowest PPE version it can so your PPE will work on most systems. For example, if you used user procedures and functions, but no version specific statements, PPC will compile to a 3.01 so it will run on PCBoard 15.20, 15.21, 15.22 & 15.23. Furthermore, you may also force crypting to one of the three specific encoding method listed above by using the -feN option or #force encoding N directive where N is : 0 for PPE 2.00 (no encoding) 1 for PPE 3.20 (simple encoding) 2 for PPE 3.30 (double encoding) 3 for Frontier Script 1.00 (no encoding + specific header) A simple switch has been added for method 0: +f or #flat directive. Important Note: PCBoard does not care about which encoding method is used when it executes the PPE. If you are sure the version of PCboard that will run your PPE will handle all statements you used and the structure of your program (particularly user functions/procedures), you can SAFELY compile to a PPE 2.00. PCBoard will not decrypt it, and the result will be a much faster loading of the PPE. You can use this for your personnal use but this is risky if you spread an unencoded PPE 2.00 containing 3.xx specific stuff. You are not guaranteed that the end user of your PPE will have the last version of PCBoard or at least, a version that handle all what you used in your PPE. So, it is a good idea to let the compiler decide which encoding method to use, and maybe recompile everything to a v2.00 for your personnal use. Of course, compiling to a Frontier specific PPE will not allows you to run it under PCBoard. Note also: PPE 1.00 is not supported as it only makes restrictions, and force handling of a different basic variable structure. As it is totally unnecessary, i decided to let v1.00 unsupported. But who needs a v1.00 PPE ?? ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ±±Ż BRACKETS [] Ž±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ In the original PPL language, '[' & ']' are equivalent to '(' & ')'. For PPC, '[' & ']' are used to retreive a specific character from a string. For exemple: String A A = "Hello" PrintLn A[1] This will output 'H'. Brackets may also be used with any other type than string, just consider that the value will first be converted to string (with datatype sepecific conversions applying, such as date/time/money...) Requesting a char outside the valid range of the string will return a space (ascii 32). Note: If you're used to C-style char array subscripts, note that unlike C, "[1]" point at the first char of specified object, not the 2nd (C starts with 0) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ±±Ż IMPLICIT VARIABLES Ž±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ This option is designed for programmers used to code in BASIC. In the basic language, you don't need to declare variables. Using an undeclared variable automatically declares it. #implicit directive or +imp switch will recreate this option. You won't need anymore to declare your variables. While you use the implicit declarations, it is still legal to declare some variables, for example, as you will see bellow, to use variable of non-standard type. Variables types will be found with the name of the variable itself, or more precisely, with the suffix character. here is an example : var name suffix implicit type ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ example none int example% % int example$ $ string example& & long example! ! float example# # double Variables of other types must be declared explicitly. Explicitly declared variables suffix has no meaning and may contradict with implicit rules. A variable "example$" declared as an integer is legal and will be interpreted as an integer even if #implicit was specified because this specific variable has been explicitly declared. Using implicit types with libraries ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Be carefull when using implicit variables declaration with library linking. Sometimes you will need to access global variables from an external library. Without implicit option, if you mispell the variable name, the compiler will issue an error, with implicit option, the compiler will automatically declare this new variable and your source will certainly not work. So if you planned to use implicit option together with libraries, be carefull and check twice the names of globals! You may try an alternative : use the compiler directives #implicit and #explicit to control how the compiler will handle undeclared variables. For example: ------ #lib mylib #implicit Word$ = "Hello" PrintLn Word$ #explicit GlobalLibParameter = "Test" #implicit GlobalLibProc() ------ In this case, you can see that the global reference is between two compiler directive. The first sets the compiler in explicit variable declaration mode, so if you mispell the global variable name, the compiler will complain. The second directive sets back the compiler to implicit variable declaration, and so you may continue to use vars as you're used to. Note: ----- I would suggest that you forget about the implicit variable declaration option as soon as possible. Using implicitly declared variables is a constant source of bugs. Declaring all your variables lead to a cleaner code, and usually to a much better organized work. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ±±Ż NUMERIC VALUES Ž±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The following notations are supported : (numeric)b -> binary value 11111111b (numeric)o -> octal value 377o (numeric)h -> hexadecimal value 0FFh (numeric) -> decimal value 255 (numeric)d -> decimal value 255d (numeric).(numeric)[E[+-](numeric)] -> double precision value 255.0 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ±±Ż DIFFERENCES WITH PPLC Ž±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Although i tried to make PPC 100% compatible with PPLC, this has not been completly possible for some reasons, mainly PPLC bugs or grammar ambiguities in the original PPL language. Most sources will recompile without change with PPC, but there are rare cases where you will need to enter some little modifications. Names Ambiguities ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ - The original PPL language has names ambiguities, for example, the keyword GetToken may be either a Statement or a Function. Fortunatly, statements and functions are used in a totally different way, and so this abiguity is not a problem, but some other ambiguities are problematic for the language itself: the PPL language originally allows you to use any keyword as a variable name, for example: Int Step For Step = Step To Step Step Step Next will be compiled by the original PPL compiler, athought it is a real braindead structure! PPC will not allow you to declare variable with internal keywords names such as Step, For, Next, If, Then, Int, String... but also internal functions and statements like Cls, Len, CurColor, ... are not allowed as variable names. If you used a variable with an internal name, just add "_" or change its name. For the same reason, the constant SEC has been changed to SECUR (SEC is used in the internal "DispFile" statement). Embedded Structures ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PPC will compile without problem some imbedded structures that PPLC cannot compile : ž While (expression) While (second_expression) .... do something (PPLC will stop compiling, complaning that it cannot found a label...) ž Select Case (exp) Case ... Case ... Select Case (exp) Case ... Case ... End Select Case ... End Select (PPLC will simply not let you do that. note that PPLC 3.01 was able to compile embedded select cases, but this feature has been removed in later versions) Both structures will be handled by PPC. "Begin" Keyword ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ In the original PPL language, if you include an external source, you will need to do the following : '$USEFUNCS '$INCLUDE:yoursource... Begin ... your code ... PPC will not need the '$USEFUNCS as it automatically detects the use of Begin keyword. ž If you use "Begin" in your code, your PPE will start there. ž If you don't use "Begin" in your code, your PPE will start at the beginning of the code. Note: If you include a file with functions/procedures at the beginning of your source, and if you don't use Begin, your PPE will execute nothing, as it will stop at the beginning of the first procedure/function. So if you use #include or '$include:, use Begin! ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ±±Ż DECOMPILERS Ž±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Due to some differences with PPLC, some programs compiled with PPC will not decompile correctly either will PPLX or with PPLD (bugs may have various symptoms: empty procedures, aborting decompilation, garbage in code, crash, ...). This is because PPLX & PPLD assume some variables to be set to specific values (which are PPLC dependant). Because the global organisation of variables (specially for functions & procedures in the case of PPLX) is not the same, errors appears. But PCB will perfectly handle the PPEs. (In fact, i've understood some things during the programming of the compiler that i did not during the decompiler :) I should release a fixed version of my decompiler someday, if i have time. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ±±Ż DISCLAIMER Ž±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ This compiler is free, and so are anything you produce with it. All your work compiled with PPC is ROYALTY FREE and may be distributed the way you want. PPC is free, but this does not means the author leaves it to public domain. PPC is NOT PUBLIC DOMAIN, but is free to be used by anybody. Because this compiler is free, i don't planned to give any extended support to users encoutering problems. The only way to reach me is mail (snalemail, email or bbs), and so is the only way i will reply. IN NO EVENT WILL I (THE AUTHOR) BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING ANY LOST PROFITS, LOST SAVINGS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF YOUR USE OR INABILITY TO USE THE PROGRAM, OR FOR ANY CLAIM BY ANY OTHER PARTY. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ±±Ż REACH THE AUTHOR Ž±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ If you like this product, send me a postcard! If you REALLY like this product, send me a CD, or some hardware :) Please, note that it may take some time before you get a reply. I'm really sorry about that, but i'm kinda LOT busy :) Postal address: Francis Gastellu 42 Bd Stalingrad 94500 Champigny Sur Marne FRANCE email: lone@mygale.org lone.runner@nuxes.frmug.fr.net francis.gastellu@ace.epita.fr bbs: A.C.E - write to "Francis Gastellu" +33-1-4588-7548 +33-1-4588-8809 THE DEADLINE - write to "Lone Runner" +33-1-4648-6763 +33-1-4644-5796 UNDERGROUND CAF - write to "Lone Runner" or "Sysop" +33-1-4882-2581 You may want to check my homepage : http://www.mygale.org/04/lone ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ±±Ż INFORMATIONS Ž±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PPC source code is : - 25 583 lines - 570 179 bytes This was used to code PPC : ž Programs - Borland C++ 3.1 - the good old one Copyright (C) 1990, 1992 Borland International, Inc. - GNU Bison 1.11 - the awesome Copyright (C) 1988, 1989 Free Software Foundation, Inc. - LEX - the usefull Copyright (C) 1978, Charles H. Forsyth - Fortify - the lifeguard Copyright (C) 1995 Simon P. Bullen - Cybergraphic ž Books & publications - "Compilers - Theory, Construction, Generation" by R.Wilhelm & D.Maurer the original version in german is (C) 1992 Heidelberg local translations copyrights apply. A very good book that i suggest you to get if you planned to begin coding a compiler or an interpreter! - Electronic (shorted) version of "LEX, a lexical analyser generator" (C) Bell laboratories - Electronic articles of various gurus of compilers programmation about the formal languages theory, non-contextual grammars, scanners & parsers, and lexical, grammatical & semantic analysis found on the net. ž Included is PPLDebug, (C)1996 by Chicken & eULE / Tools 4 Fools ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ±±Ż LAST WORDS Ž±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Thanks to the following people for having heavily contributed to what PPC is now, by betatesting it : CyZ/Peanuts - Thanks for having a totaly diffenrent way of coding compared to us :) This made you discover a lot of holes in the language itself. Thanks for the hard work you put in betatesting, thanks a lot! :) Hollowman - I send you all the thanks you deserve for having received all those unfinished and buggy first beta versions with always a smile! :) Number6, Greedo, Jason, Splif, and all the others for supporting me in the idea of developing this tool, as well as Frontier. I hope you will enjoy my work... See you soon for our next major work, Project: Frontier. _.Lone Runner aka Francis Gastellu _ _ _ ___ ___/\ _________/\ /\_____________/\________________ ___ _ _ \/\______________ / _ \/ _________ / ______________________ / __________ / _/ __/ \ ____)___\/ \ \_/ \/\___________ \/_ \ \ \_ \ \_ \__ \_ \_ / / \______\ /____________/________________/_____________/____________/kP ś-------`------'---------------------------------------------------------ś