home *** CD-ROM | disk | FTP | other *** search
/ CD Shareware Magazine 1996 December / CD_shareware_12-96.iso / DOS / Programa / AGSPC1B2.ZIP / PPC.DOC < prev    next >
Encoding:
Text File  |  1996-08-09  |  30.8 KB  |  776 lines

  1.                     s                                   s
  2.                    .$                                  .$
  3.                   .$$                                 .$$
  4.                  .$^$                                 $$$
  5.                 .$' $.    .s$Ss..       .s$Ss..       `$$     .s$Ss..
  6.                .$'  $$  .$$$²°^²$$s.  .$$$²°^²$$s.     `$.  .$$$²°^²$$s.
  7.              .$$'   $$  $$$      `$$  $$$      `$$      $$  $$$      `$$
  8.           .s$$$$$s. ²$. `²$$s.     ²  $$$        ²      $$. `²$$s.     ²
  9.        .sS$²°^°²S$$Ss.²    `$$$²'     $$$.        .sS.  $$$    `°²S$Ss.
  10.  ..ssS$$²'        `°²S$s.  .$$'       `$$$     .s$S²S$. $$$.    .s. `°²$s.
  11.  ²$S²'              $Sss. .$$'      .$ $$$. .s$S²'.$ $$ $$$$. .$$'     `$$
  12.                     $$$$$ $$$      .$$ `$$$ `²²' .$$ `$ $$$$$ $$$      .$$
  13.                     $$$$² `$$s.  .s$$'  `$$s.  .s$$'    $$$$² `$$s.  .s$$'
  14.                     $$²     `²$$$S²'  Ms. `²$$$S²'      $$²     `²$$$S²'
  15.                     $'                                  $'
  16.                           C       O       R       P.
  17.  
  18.                     Power PPL Compiler 1.OO Public Beta 2
  19.  
  20.                             (C) 1996 Lone Runner,
  21.                             The Aegis Corporation
  22.  
  23.                   ·  · ·-───────────────────────────--· ·  ·
  24.      
  25. ───────────────────────────────────────────────────────────────────────────────
  26. ▒▒▌ IMPORTANT ▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  27. ───────────────────────────────────────────────────────────────────────────────
  28.  
  29.                   THIS IS A PUBLIC ...
  30.  
  31.  
  32.                               ▄▄██▄
  33.                              ██▀  ▀█
  34.                             ██  ▄▄█
  35.                            ██   ▀▄  █▀▀ ▀█▀ █▀█
  36.                            ██  ▄▄▀  █▀   █  █▀█
  37.                            ██ ▀▀    ▀▀▀  ▀  ▀ ▀
  38.                            ██
  39.                            █▀
  40.                            ▀          
  41.                                          ... VERSION
  42.  
  43.        I need your bug reports ! Send me your remarks at the address :
  44.  
  45.                       lone.runner@nuxes.frmug.fr.net
  46.                                     or
  47.                        francis.gastellu@ace.epita.fr
  48.  
  49. ───────────────────────────────────────────────────────────────────────────────
  50. ▒▒▌ DESCRIPTION ▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  51. ───────────────────────────────────────────────────────────────────────────────
  52.  
  53.   PPC is a PPL Compiler. :)
  54.  
  55.   It will compile a standard PPS source up to v3.30 PPE format (equivalent
  56.   to PPLC 3.30)
  57.  
  58.   You say : "My compiler works great, why should i change?"
  59.  
  60.   I say   : "Because PPC will do all that your compiler does,
  61.              plus many more, and will compile to a usually
  62.              smaller and faster PPE. You will also be able
  63.              to use and make libraries, and much more!"
  64.  
  65.  
  66.                                               PPLC                PPC
  67.                                         ────────────────────────────────────
  68.          User Functions & Procedures           yes                yes
  69.            .LIB Generation & Linking           no                 yes
  70.    PPLdebug .SYM debug file creation           no                 yes
  71.          Autodeclare vars (optional)           no                 yes
  72.     Code control compiler directives           no                 yes
  73.          Syntax checking only option           no                 yes
  74.           Autodetect encoding method           no                 yes
  75.  Force flat ppe or any encoding type           no                 yes
  76.                Imbedded Select Cases           no                 yes
  77.      Chained simple while statements           no                 yes
  78.          Direct character addressing           no                 yes
  79.             Basic For/Next statement        93 bytes            55 bytes
  80.       Basic While/Endwhile statement        27 bytes            21 bytes
  81.               Simple While statement        16 bytes            16 bytes
  82.         3 cases SelectCase statement        75 bytes            57 bytes
  83.        Basic If/Else/Endif statement        27 bytes            21 bytes
  84.                  Simple If statement        13 bytes            13 bytes
  85.    3 cases If/Elseif/Endif statement        75 bytes            57 bytes
  86.                                         ────────────────────────────────────
  87.  
  88.   Note that the less number of bytes it takes, the faster it runs.
  89.  
  90. ───────────────────────────────────────────────────────────────────────────────
  91. ▒▒▌ INSTALLATION ▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  92. ───────────────────────────────────────────────────────────────────────────────
  93.  
  94.   No Installation program is currently available. Unzip the archive
  95.   (using -d !) in a new directory (ie: C:\PPL).
  96.  
  97.   Add the following to your path:
  98.  
  99.   C:\PPL\BIN
  100.  
  101.   if you installed in C:\PPL of course.
  102.  
  103.  
  104.        C:\PPL
  105.        ├───BIN             binaries. PPC.EXE, RUN.EXE, DEB.EXE, PPLIB.EXE, PPLDEBUG.EXE (c)t4f
  106.        ├───LIB             Libraries binaries (*.LIB) 
  107.        ├───LIBSRC          Libraries sources 
  108.        └─┬─EXAMPLES        Example & demonstration files
  109.          └───...
  110.  
  111.   PPC.EXE usage
  112.   ─────────────
  113.  
  114.         Usage: ppc [options] filename[.pps] [filename[.lib] ...]
  115.         Options:
  116.             
  117.           -d       generate debug code (ppldebug .sym format)
  118.           -dc      write debug.cod file (for internal debug purpose)
  119.           -f       flat PPE 2.00, do not honnor pcb encoding convention
  120.           -feN     force pcb encoding type. N=coding method
  121.           -imp     set implicit variable declaration (autodeclare option)
  122.           -l       list source while compiling
  123.           -lib     compile to .LIB library
  124.           -lpXXXX  specify library path. ie: lpC:\PP\LIB
  125.           -s       only check syntax (don't create .PPE)
  126.           -uv      generate user variables
  127.  
  128.         Use of a resonse file (for compatibility with any MAKE utility)
  129.         is also supported :
  130.  
  131.         ppc @filename
  132.  
  133.         command lines arguments will be read from the response file, each
  134.         parameter separated by a carriage return.
  135.  
  136.  
  137.     Details:
  138.  
  139.          -d       generates debug code in .SYM ppldebug format.
  140.                   for now, this does not work in conjunction with
  141.                   external .LIB linking. but for any source not
  142.                   using external libraries, using -d will generate
  143.                   a valid (hopefully) .SYM debug symbol table to use
  144.                   with Tools4Fools'PPLdebug.
  145.  
  146.                   compiler directive equivalent: #debug
  147.  
  148.  
  149.          -dc      this is used for my internal debugging. You don't
  150.                   need this switch.
  151.  
  152.          -f       force generation a flat 2.00 unencoded PPE.
  153.                   Use this switch to tell the compiler not to honnor PCB
  154.                   encoding conventions. Be sure that this PPE will be run
  155.                   on a PCB version that will support it!
  156.  
  157.                   compiler directive equivalent: #flat
  158.  
  159.  
  160.          -feN     force to a specific encoding type. N is the encoding method.
  161.                   N=0 for PPE 2.00, N=1 for PPE 3.20, N=2 for PPE 3.30.
  162.  
  163.                   compiler directive equivalent: #force encoding N
  164.  
  165.  
  166.          -imp     set implicit variable declaration on. 
  167.                   See below for more information about this option
  168.  
  169.                   compiler directive equivalent: #implicit
  170.  
  171.  
  172.          -l       list sourec while compiling. This is for internal
  173.                   debugging. You should not need this switch.
  174.  
  175.  
  176.          -lib     generate a .LIB rather than a .PPE
  177.                   a .LIB library offers all its functions, procedures,
  178.                   and global variables public to a source file just using
  179.                   the compiler directive #use libname
  180.  
  181.                   compiler directive equivalent: #lib
  182.  
  183.  
  184.          -lpXXXX  specify path for libraries. for example -lpC:\LIB
  185.                   will tell the compiler to search libraries in C:\LIB.
  186.  
  187.                   compiler directive equivalent: #libpath XXXX
  188.  
  189.  
  190.          -s       only check syntax. ppc will not create PPE on disk.
  191.  
  192.                   compiler directive equivalent: #syntax
  193.  
  194.  
  195.          -uv      generates user variables. needed if you used any user
  196.                   variable such as U_SEC.
  197.  
  198.                   compiler directive equivalent: #user or #uservar
  199.  
  200.  
  201.   List of compiler directives :
  202.  
  203.       #libpath yourpath             ; set library path to 'yourpath'
  204.       #use yourlib (or #uses)       ; include library 'yourlib'
  205.       #lib                          ; generate .LIB rather than .PPE
  206.       #ppe                          ; force generating .PPE even if "-lib"
  207.       #user / #uservar              ; generate user variables
  208.       #nouser / #nouservar          ; don't generate user variables even if "-uv"
  209.       #syntax                       ; only check syntax (don't create .PPE)
  210.       #compile                      ; force PPE creation on disk even if "-s"
  211.       #error message                ; end compilation with error 'message'
  212.       #warning message              ; generates a compilation warning
  213.       #note message                 ; issues a note from the compiler
  214.       #implicit                     ; set implicit variable declaration
  215.       #explicit                     ; force explicit variable declaration even if "-imp"
  216.       #debug                        ; generate debug table .SYM file
  217.       #nodebug                      ; force no debug .SYM file even if "-d"
  218.       #encoding (or #enc)           ; autodetect encoding type even if "-f" or "-feN"
  219.       #force encoding N (or #fe N)  ; force encoding type N
  220.       #flat                         ; force no encoding (PPE 2.00) even if "-feN"
  221.       #include yourfile.ext         ; includes an external file (also accept pplc syntax: '$include:yourfile.ext)
  222.  
  223.  
  224. ───────────────────────────────────────────────────────────────────────────────
  225. ▒▒▌ CREATING LIBRARIES ▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  226. ───────────────────────────────────────────────────────────────────────────────
  227.  
  228.   Creating a library is really simple.
  229.  
  230.   When you have a source file with Functions & Procedures you wish to put
  231.   in a library, simply compile it with the -lib switch (or #lib compilation
  232.   directive) and you will end up with a .LIB file.
  233.  
  234.   For a cleaner library, you could edit your source as a separate
  235.   library source, apart of your original ppe source, so you don't put any
  236.   code in the main section. This is not mandatory, but will generate a
  237.   smaller library.
  238.  
  239.   If your source is dedicated to compile to a lib, put #lib at the
  240.   beginning of the file so ppc will always compile to a .LIB
  241.  
  242.   Note :
  243.  
  244.      ■ You cannot build a library if you use external libraries.
  245.        All libraries are from a single source.
  246.  
  247. ───────────────────────────────────────────────────────────────────────────────
  248. ▒▒▌ USING LIBRARIES ▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  249. ───────────────────────────────────────────────────────────────────────────────
  250.  
  251.   To use a library you previously created or you downloaded as a ppl library
  252.   package, put your library in your source path (you could also put it in
  253.   a general lib path and use #libpath or -lpXXXX).
  254.  
  255.   Put the following line at the top of your source :
  256.  
  257.   #use libname
  258.  
  259.   where 'libname' is the name of the library you whish to use.
  260.  
  261.   That's all, you can now use any Function, Procedure, or Global variable
  262.   from the library, directly in your source, without any more declaration.
  263.  
  264.   Note :
  265.  
  266.      ■ You cannot build a library if you use external libraries.
  267.        All libraries are from a single source.
  268.  
  269. ───────────────────────────────────────────────────────────────────────────────
  270. ▒▒▌ ENCODING ▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  271. ───────────────────────────────────────────────────────────────────────────────
  272.  
  273.   Because of decompilers (ahem... ;)) Clark Development Company decided to
  274.   encode their PPE.
  275.  
  276.   There are basically 3 methods of encoding:
  277.  
  278.   - none             (v2.00)
  279.   - simple encoding  (v3.01, v3.10, v3.20)
  280.   - double encoding  (v3.30)
  281.  
  282.   PPC gives you a total control over the encoding method used on the PPE.
  283.  
  284.   By default, PPC autodetects the encoding method that should be used
  285.   based on the statements you use, and the structure of your program.
  286.  
  287.   For example, if you use user functions and procedures, ppc will
  288.   automatically encode to a PPE 3.01. If, in addition, you use some
  289.   specific version statements and functions, ppc will autoswitch to the
  290.   specific version. For example, if you use Findfirst in your PPE, ppc will
  291.   autoswitch to a PPE 3.10. If you use ChDir, ppc will switch to a PPE 3.20.
  292.  
  293.   PPC will allways use the lowest PPE version it can so your PPE will work
  294.   on most systems. For example, if you used user procedures and functions,
  295.   but no version specific statements, PPC will compile to a 3.01 so it will
  296.   run on PCBoard 15.20, 15.21, 15.22 & 15.23.
  297.  
  298.   Furthermore, you may also force crypting to one of the three specific
  299.   encoding method listed above by using the -feN option or #force encoding N
  300.   directive where N is :
  301.  
  302.   0 for PPE 2.00 (no encoding)
  303.   1 for PPE 3.20 (simple encoding)
  304.   2 for PPE 3.30 (double encoding)
  305.  
  306.   A simple switch has been added for method 0: -f or #flat directive.
  307.  
  308.   Important Note:
  309.  
  310.      PCBoard does not care about which encoding method is used when it
  311.      executes the PPE. If you are sure the version of PCboard that will
  312.      run your PPE will handle all statements you used and the structure
  313.      of your program (particularly user functions/procedures), you can
  314.      SAFELY compile to a PPE 2.00. PCBoard will not decrypt it, and the
  315.      result will be a much faster loading of the PPE.
  316.      You can use this for your personnal use but this is risky if you
  317.      spread an unencoded PPE 2.00 containing 3.xx specific stuff. You are
  318.      not guaranteed that the end user of your PPE will have the last version
  319.      of PCBoard or at least, a version that handle all what you used in your
  320.      PPE.
  321.  
  322.      So, it is a good idea to let the compiler decide which encoding method
  323.      to use, and maybe recompile everything to a v2.00 for your personnal
  324.      use.
  325.  
  326.  
  327.   Note also:
  328.  
  329.   PPE 1.00 is not supported as it only makes restrictions, and force handling
  330.   of a different basic variable structure. As it is totally unnecessary, i
  331.   decided to let v1.00 unsupported. But who needs a v1.00 PPE ??
  332.  
  333. ───────────────────────────────────────────────────────────────────────────────
  334. ▒▒▌ BRACKETS [] ▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  335. ───────────────────────────────────────────────────────────────────────────────
  336.  
  337.   In the original PPL language, '[' & ']' are equivalent to '(' & ')'.
  338.  
  339.   For PPC, '[' & ']' are used to retreive a specific character from a string.
  340.  
  341.   For exemple:
  342.  
  343.       String A
  344.  
  345.       A = "Hello"
  346.       PrintLn A[1]
  347.  
  348.   This will output 'H'.
  349.  
  350.   Brackets may also be used with any other type than string, just consider
  351.   that the value will first be converted to string (with datatype sepecific
  352.   conversions applying, such as date/time/money...)
  353.  
  354.   Requesting a char outside the valid range of the string will return a
  355.   space (ascii 32).
  356.  
  357.   Note: If you're used to C-style char array subscripts, note that unlike
  358.   C, "[1]" point at the first char of specified object, not the 2nd (C starts
  359.   with 0)
  360.  
  361. ───────────────────────────────────────────────────────────────────────────────
  362. ▒▒▌ IMPLICIT VARIABLES ▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  363. ───────────────────────────────────────────────────────────────────────────────
  364.  
  365.   This option is designed for programmers used to code in BASIC. In the
  366.   basic language, you don't need to declare variables. Using an undeclared
  367.   variable automatically declares it.
  368.  
  369.   #implicit directive or -imp switch will recreate this option. You won't
  370.   need anymore to declare your variables.
  371.  
  372.   While you use the implicit declarations, it is still legal to declare some
  373.   variables, for example, as you will see bellow, to use variable of
  374.   non-standard type.
  375.  
  376.   Variables types will be found with the name of the variable itself, or
  377.   more precisely, with the suffix character. here is an example :
  378.  
  379.     var name            suffix           implicit type
  380.     ──────────────────────────────────────────────────
  381.     example              none                int
  382.     example%               %                 int
  383.     example$               $                 string
  384.     example&               &                 long
  385.     example!               !                 float
  386.     example#               #                 double
  387.  
  388.     Variables of other types must be declared explicitly.
  389.  
  390.   Explicitly declared variables suffix has no meaning and may contradict
  391.   with implicit rules. A variable "example$" declared as an integer is
  392.   legal and will be interpreted as an integer even if #implicit was
  393.   specified because this specific variable has been explicitly declared.
  394.  
  395.   Using implicit types with libraries
  396.   ───────────────────────────────────
  397.  
  398.   Be carefull when using implicit variables declaration with library
  399.   linking. Sometimes you will need to access global variables from an
  400.   external library. Without implicit option, if you mispell the variable
  401.   name, the compiler will issue an error, with implicit option, the compiler
  402.   will automatically declare this new variable and your source will
  403.   certainly not work.
  404.  
  405.   So if you planned to use implicit option together with libraries, be
  406.   carefull and check twice the names of globals!
  407.  
  408.   You may try an alternative : use the compiler directives #implicit
  409.   and #explicit to control how the compiler will handle undeclared variables.
  410.   For example:
  411.  
  412.   ------
  413.   #lib mylib
  414.   #implicit
  415.  
  416.   Word$ = "Hello"
  417.   PrintLn Word$
  418.  
  419.   #explicit
  420.   GlobalLibParameter = "Test"
  421.   #implicit
  422.  
  423.   GlobalLibProc()
  424.   ------
  425.  
  426.   In this case, you can see that the global reference is between two
  427.   compiler directive. The first sets the compiler in explicit variable
  428.   declaration mode, so if you mispell the global variable name, the compiler
  429.   will complain. The second directive sets back the compiler to implicit
  430.   variable declaration, and so you may continue to use vars as you're used
  431.   to.
  432.  
  433.  
  434.   Note:
  435.   -----
  436.  
  437.   I would suggest that you forget about the implicit variable declaration
  438.   option as soon as possible. Using implicitly declared variables is a
  439.   constant source of bugs. Declaring all your variables lead to a cleaner
  440.   code, and usually to a much better organized work.
  441.  
  442. ───────────────────────────────────────────────────────────────────────────────
  443. ▒▒▌ NUMERIC VALUES ▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  444. ───────────────────────────────────────────────────────────────────────────────
  445.  
  446.   The following notations are supported :
  447.  
  448.   (numeric)b                          -> binary value            11111111b
  449.   (numeric)o                          -> octal value             377o
  450.   (numeric)h                          -> hexadecimal value       0FFh
  451.   (numeric)                           -> decimal value           255
  452.   (numeric)d                          -> decimal value           255d
  453.   (numeric).(numeric)[E[+-](numeric)] -> double precision value  255.0
  454.  
  455. ───────────────────────────────────────────────────────────────────────────────
  456. ▒▒▌ DIFFERENCES WITH PPLC ▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  457. ───────────────────────────────────────────────────────────────────────────────
  458.  
  459.   Although i tried to make PPC 100% compatible with PPLC, this has not been
  460.   completly possible for some reasons, mainly PPLC bugs or grammar
  461.   ambiguities in the original PPL language.
  462.  
  463.   Most sources will recompile without change with PPC, but there are rare
  464.   cases where you will need to enter some little modifications.
  465.  
  466.      Names Ambiguities
  467.      ─────────────────
  468.  
  469.        The original PPL language has names ambiguities, for example, the
  470.        keyword GetToken may be either a Statement or a Function.
  471.  
  472.        Fortunatly, statements and functions are used in a totally different
  473.        way, and so this abiguity is not a problem, but some other ambiguities
  474.        are problematic for the language itself: the PPL language originally
  475.        allows you to use any keyword as a variable name, for example:
  476.  
  477.        Int Step
  478.        For Step = Step To Step Step Step
  479.        Next
  480.  
  481.        will be compiled by the original PPL compiler, athought it is a
  482.        real braindead structure!
  483.  
  484.        PPC will not allow you to declare variable with internal keywords
  485.        names such as Step, For, Next, If, Then, Int, String... but also
  486.        internal functions and statements like Cls, Len, CurColor, ... are
  487.        not allowed as variable names.
  488.  
  489.        If you used a variable with an internal name, just add "_" or change
  490.        its name.
  491.  
  492.        For the same reason, the constant SEC has been changed to SECUR
  493.  
  494.        (SEC is used in the internal "DispFile" statement).
  495.  
  496.  
  497.      ElseIf Structures
  498.      ─────────────────
  499.  
  500.        The ElseIf structure introduce 2 ambiguities in the grammar.
  501.  
  502.          Note: a complex strcture is a structure made of more than one line
  503.          of code, a simple structure is a structure made if 1 line of
  504.          code. For example :
  505.  
  506.            If (exp) Then
  507.            Endif
  508.  
  509.            is a complex structure (needs to be closed by a Endif of equivalent
  510.            keyword).
  511.  
  512.            If (exp) Cls
  513.  
  514.            is a simple structure (does not need to be closed as it is
  515.            immediatly closed by the end of line).
  516.  
  517.  
  518.        ■ Ambiguity 1
  519.  
  520.          The original PPL compiler allows you to use ElseIf without Then for
  521.          complex structures :
  522.  
  523.          If (expression) Then
  524.          Elseif (expression)      <- original compiler allows use of THEN 
  525.          Endif                       also, that's the abiguity.
  526.  
  527.          PPC does not allows that, and you will NEED to put the Then keyword
  528.          for a complex structured block:
  529.  
  530.          If (expression) Then
  531.          Elseif (expression) THEN <- PPC wants the THEN keyword
  532.          Endif
  533.  
  534.  
  535.        ■ Ambiguity 2
  536.  
  537.          The simple If statement opens a simple structure, not a complex
  538.          structured block:
  539.  
  540.          If (expression) Cls
  541.  
  542.          In the original PPL compiler, the use of a simple ElseIf structure
  543.          is a part of a complex structure! That's the ambiguity.
  544.  
  545.          If (exp) Then
  546.              Wait
  547.          ElseIf (exp) Cls
  548.          ElseIf (exp) End      
  549.          Endif                 <- can we put code before EndIf ? Will the 
  550.                                   previous Elsif concern only "End" or also
  551.                                   following lines ? Ambiguities are not easy
  552.                                   to deal with!
  553.  
  554.          This is compiled by the original compiler.
  555.  
  556.          For PPC, a simple ElseIf strcture may not be used in a complex
  557.          strcture unless it closes this structure, the above example will be
  558.          rewritten :
  559.  
  560.          If (exp) Then
  561.              Wait
  562.          ElseIf (exp) Then
  563.              Cls
  564.          ElseIf (exp) Then
  565.              End
  566.          Endif
  567.  
  568.          And the following structure is valid :
  569.  
  570.          If (exp) Then
  571.              Wait
  572.          ElseIf (exp) Cls                   <- simple ElseIf concern ONLY
  573.                                                "Cls" and then closes the
  574.                                                complex If structure.
  575.  
  576.          Which looks much more like a intelligent structure language such
  577.          as pascal or C.
  578.  
  579.          note the absence of keyword Endif! the simple ElseIf strcture has
  580.          closed the complex If strcture opened above. There is no more
  581.          ambiguity.
  582.  
  583.  
  584.      Embedded Structures
  585.      ───────────────────
  586.  
  587.        PPLC will fail to compile this :
  588.  
  589.          ■ While (expression) While (second_expression) .... do something
  590.  
  591.            (PPLC will stop compiling, complaning that it cannot found a
  592.            label...)
  593.  
  594.          ■ Select Case (exp)
  595.              Case ...
  596.              Case ...
  597.                 Select Case (exp)
  598.                       Case ...
  599.                       Case ...
  600.                 End Select
  601.              Case ...
  602.            End Select
  603.  
  604.            (PPLC will simply not let you do that. note that PPLC 3.01 was
  605.            able to compile embedded select cases, but this feature has been
  606.            removed in later versions)
  607.  
  608.        Both structures will be handled by PPC.
  609.  
  610.  
  611.      "Begin" Keyword
  612.      ───────────────
  613.  
  614.         In the original PPL language, if you include an external source,
  615.         you will need to do the following :
  616.  
  617.             '$USEFUNCS
  618.             '$INCLUDE ...
  619.  
  620.             Begin
  621.  
  622.             ... your code ...
  623.  
  624.         PPC will not need the '$USEFUNCS as it automatically detects the
  625.         use of Begin keyword.
  626.  
  627.       ■ If you use "Begin" in your code, your PPE will start there.
  628.       ■ If you don't use "Begin" in your code, your PPE will start at the
  629.         beginning of the code.
  630.  
  631.         Note: If you include a file with functions/procedures at the
  632.         beginning of your source, and if you don't use Begin, your PPE will
  633.         execute nothing, as it will stop at the beginning of the first
  634.         procedure/function. So if you use #include or '$include:, use Begin!
  635.  
  636. ───────────────────────────────────────────────────────────────────────────────
  637. ▒▒▌ DECOMPILERS ▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  638. ───────────────────────────────────────────────────────────────────────────────
  639.  
  640.    Due to some differences with PPLC, some programs compiled with PPC will
  641.    not decompile correctly either will PPLX or with PPLD (bugs may have
  642.    various symptoms: empty procedures, aborting decompilation, garbage in
  643.    code, crash, ...).
  644.  
  645.    This is because PPLX & PPLD assume some variables to be set to specific
  646.    values (which are PPLC dependant). Because the global organisation of
  647.    variables (specially for functions & procedures in the case of PPLX) is
  648.    not the same, errors appears. But PCB will perfectly handle the PPEs.
  649.  
  650.    (In fact, i've understood some things during the programming of the
  651.    compiler that i did not during the decompiler :)
  652.  
  653.    I should release a fixed version of my decompiler someday, if i have time.
  654.  
  655. ───────────────────────────────────────────────────────────────────────────────
  656. ▒▒▌ DISCLAIMER ▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  657. ───────────────────────────────────────────────────────────────────────────────
  658.  
  659.   This compiler is free, and so are anything you produce with it. All your
  660.   work compiled with PPC is ROYALTY FREE and may be distributed the way
  661.   you want.
  662.  
  663.   PPC is free, but this does not means the author leaves it to public
  664.   domain. PPC is NOT PUBLIC DOMAIN, but is free to be used by anybody.
  665.  
  666.   Because this compiler is free, i don't planned to give any extended
  667.   support to users encoutering problems. The only way to reach me is mail
  668.   (snalemail, email or bbs), and so is the only way i will reply.
  669.  
  670.   IN NO EVENT WILL I (THE AUTHOR) BE LIABLE TO YOU FOR  ANY DAMAGES,
  671.   INCLUDING  ANY LOST  PROFITS, LOST  SAVINGS  OR  OTHER  INCIDENTAL
  672.   OR  CONSEQUENTIAL DAMAGES ARISING  OUT OF YOUR USE OR INABILITY TO
  673.   USE THE PROGRAM, OR FOR ANY CLAIM BY ANY OTHER PARTY.
  674.  
  675. ───────────────────────────────────────────────────────────────────────────────
  676. ▒▒▌ REACH THE AUTHOR ▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  677. ───────────────────────────────────────────────────────────────────────────────
  678.  
  679.   If you like this product, send me a postcard!
  680.   If you REALLY like this product, send me a CD, or some hardware :)
  681.  
  682.   Please, note that it may take some time before you get a reply. I'm
  683.   really sorry about that, but i'm kinda LOT busy :)
  684.  
  685.        Postal address:
  686.  
  687.        Francis Gastellu
  688.        42 Bd Stalingrad
  689.        94500 Champigny Sur Marne
  690.        FRANCE
  691.  
  692.        email:
  693.  
  694.        lone.runner@nuxes.frmug.fr.net
  695.        francis.gastellu@ace.epita.fr
  696.  
  697.        bbs:
  698.  
  699.          A.C.E            - write to "Francis Gastellu"
  700.          +33-1-4588-7548
  701.          +33-1-4588-8809
  702.  
  703.          THE DEADLINE     - write to "Lone Runner"
  704.          +33-1-4648-6763
  705.          +33-1-4644-5796
  706.  
  707.          UNDERGROUND CAFÉ - write to "Lone Runner" or "Sysop"
  708.          +33-1-4882-2581
  709.  
  710. ───────────────────────────────────────────────────────────────────────────────
  711. ▒▒▌ INFORMATIONS ▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  712. ───────────────────────────────────────────────────────────────────────────────
  713.  
  714.  PPC source code is :
  715.  
  716.     - 16479 lines
  717.     - 354595 bytes
  718.  
  719.  This was used to code PPC :
  720.  
  721.     ■ Programs
  722.  
  723.     - Borland C++ 3.1 - the good old one
  724.       Copyright (C) 1990, 1992 Borland International, Inc.
  725.       
  726.     - GNU Bison 1.11 - the awesome
  727.       Copyright (C) 1988, 1989 Free Software Foundation, Inc.
  728.       
  729.     - LEX - the usefull
  730.       Copyright (C) 1978, Charles H. Forsyth
  731.  
  732.     - Fortify - the lifeguard
  733.       Copyright (C) 1995 Simon P. Bullen - Cybergraphic
  734.  
  735.  
  736.     ■ Books & publications
  737.  
  738.     - "Compilers - Theory, Construction, Generation" by R.Wilhelm & D.Maurer
  739.       the original version in german is (C) 1992 Heidelberg
  740.       local translations copyrights apply.
  741.  
  742.       A very good book that i suggest you to get if you planned to begin
  743.       coding a compiler or an interpreter! 
  744.  
  745.     - Electronic (shorted) version of "LEX, a lexical analyser generator"
  746.       (C) Bell laboratories
  747.  
  748.     - Electronic articles of various gurus of compilers programmation
  749.       about the formal languages theory, non-contextual grammars, scanners
  750.       & parsers, and lexical, grammatical & semantic analysis found on the
  751.       net.
  752.  
  753.     ■ Included is PPLDebug, (C)1996 by Chicken & eULE / Tools 4 Fools
  754.  
  755. ───────────────────────────────────────────────────────────────────────────────
  756. ▒▒▌ LAST WORDS ▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  757. ───────────────────────────────────────────────────────────────────────────────
  758.  
  759.   I hope you will enjoy my work...
  760.  
  761.       See you soon for our next major work, Project: Frontier.
  762.  
  763.  
  764.                                                            _.Lone Runner
  765.                                                     aka Francis Gastellu
  766.  
  767.  
  768.                                         _    _  _ ___ ___/\
  769.     _________/\  /\_____________/\________________ ___ _  _ \/\______________
  770.    /      _    \/   _________  /    ______________________  /   __________  /
  771.  _/     __/     \    ____)___\/     \         \_/         \/\___________  \/_
  772.  \      \        \_  \        \_     \__       \_            \_        /    /
  773.   \______\        /____________/________________/_____________/____________/kP
  774.   ·-------`------'---------------------------------------------------------·
  775.  
  776.