* harbour/harbour.spec
+ new spec file. It creates four binary RPMs with shared and
static libs core harbour compiler and tools and with Ron's PP
which allow to run xBase files as scripts on *nix platform
and new tool hbcmp, hbcc, hblnk, hbmk.
For details see README.RPM
Please remember that PP has poor GPL license. It is noticed in RPM
headers.
+ harbour/hbgtmk.sh
+ simple script which connect to SourceForge CVS takes sources and
build RPMs from them.
+ harbour/make_rpm.sh
+ script for checking dependences and making RPMs
+ harbour/make_tgz.sh
+ script for making binary package for this Linux distro which don't
support RPM
+ harbour/bin/hb-mkslib.sh
+ script for building shared libs from static ones and/or object files
+ harbour/bin/pack_src.sh
+ script for packing harbour sources
* harbour/Makefile
* harbour/source/compiler/harbour.c
* harbour/source/common/hbver.c
* harbour/source/vm/cmdarg.c
* harbour/source/vm/fm.c
* harbour/source/vm/hvm.c
* changes for some new futures in hb{cmp,lnk,mk} tools
* harbour/contrib/libct/datetime.prg
- redundant STOD removed (this function is part of RTL)
* harbour/contrib/dot/pp.prg
* harbour/contrib/dot/pp.txt
* harbour/contrib/dot/pp_harb.ch
* harbour/contrib/dot/rp_dot.ch
* harbour/contrib/dot/rp_run.ch
* upadting for runing xBase files as scripts.
All this changes (except Ron's PP) are my work borrowed from xHarbour.
* contrib/dot/pp.prg
+ Started support for interpreting prg files.
* contrib/dot/rp_dot.ch
+ Added #command for stealing END
/* PP can alreay "Run" simple prgs :-). It actually support most Clipper commands.
It does *not* support LOCAL/STATIC/PRIVATE/PUBLIC, but any refference to a variable will create it as PRIVATE.
It does not (yet) support creation of FUNCTIONs/PROCEDUREs but will execute any built-in, or linked, prodecure/function.
It does not (yet) support WHILE and FOR loops.
It can execute code like this:
//------------------------------//
CLS
Alert( "Testinf PP as Interpreter... " )
USE test
IF ! File( "test" + IndexExt() )
INDEX on FIELD->First TO First
ELSE
SET INDEX TO First
ENDIF
GO TOP
cName := FIELD->First + FIELD->Last
IF cName == FIELD->First + FIELD->Last
? "Ok"
ELSE
? "Err"
ENDIF
DO CASE
CASE cName == First // Not exact!
? "Err"
CASE cName = First // But still equal
? "Ok"
OTHERWISE
? "Err"
ENDCASE
REPLACE First WITH "From PP"
? FIELD->First
//------------------------------//
To have PP execute a PRG use: PP filename -R
*/
* contrib/dot/pp.prg
! Fixed order of production in multi line result, where some of the resulting lines are re-processed
+ Added support for IF, ELSE, ELSEIF, ENDIF, DO CASE, CASE, OTHERWISE, ENDCASE
! Fixed cursor position in Dot prompt to simulate running program cursor position.
* contrib/dot/rp_dot.ch
! Fixed literal coordinates to use MaxRow() and MaxCol()
+ Added #command CLS to only clean the work region.
+ Added #commands to "steal" handling of IF, ELSE, ELSEIF, ENDIF, DO CASE, CASE, OTHERWISE, ENDCASE
* contrib/dot/pp.prg
! Corrected few pre-processor bugs.
! Corrected DOT multi-line support.
* contrib/dot/rp_dot.ch
+ Added Clipper and Harbour support for GET
* source/pp/ppcore.c
! Removed redundant line in md_strAt() whiched caused bug with tanslating within [] bracket expressions.
environment, written in the Clipper language.
The pre-processor is speced to be 100% Clipper/Harbour compatible, though
further testing is needed. It supports all of the Clipper PP Directives, Match
Markers, and Result Markers. It utilizes a much more aggresive compilation of the
PP rules, and thus uses a much simpler "interpreter" and output algoritems.
This file also offers a "DOT" prompt environment which can execute most of
the Clipper/Harbour syntax and supports all of the pre-processor directives
thus supporting any user defined commands.
Current exceptions are statements like:
LOCAL, STATIC, PRIVATE PUBLIC, FUNCTION PROCEDURE etc.
as well as flow control constructs like IF,ELSE,END,WHILE,CASE,FOR,NEXT etc.
This is a very early stage of the "DOT" environment, but it does demonstrate
the architecture, and already provides the core functionality.
The "DOT" mode, automatically loades rp_dot.ch to implement additional commands
on top of the built in rules (burned-in Clipper std.ch compatible).
Usage:
PP [PrgName] [-P][-U][-CCH][-DE|M|P]
PrgName - Source file (PRG) to compile
-P - Will produce a PP$ file, which is the exact equivalent of the PPO file.
-U - Will excluse the burned-in standard rules
-D - Will produe debug trace information when folowed by E, M, or P
E - Will trace the Expression parser
M - Will trace the rule Matching system.
P - Will trace the outPut system.
-CCH - Will produce a .CCH file which is a compiled version of any rules
compiled. This flag *should* be used with the -U flag.
If no parameters are provided, the program will enter the "DOT" mode.
I hope this file can provide thise intersted with a better understanding of the
Clipper Pre-Processor structure and logic.