XBScriptXBScript is a full featured scripting language engine that's compatible with any ActiveScript host like:
Multiple versions XBScript comes in different personalities which are tied together very tightly. 1 .XBScript DLL as ActiveScript Host or WSG, IE or IIS For this you need XBScript DLL edition. XBScript DLL is a full featured scripting language, compatible with any ActitveScript Host like WSH (WScript.exe and CScript.exe), Internet Explorer (IE) or Internet Information Server (IIS). You may embed XBScript source in:
2. A 100% Clipper compatible Pre-Processor with some extensions For this you will need the XBScript-Prompt edition. Executing XBScript.exe followed by a source file name and the -P switch, will create <filename.pp$> which is the equivalent of the Clipper PPO file. A Clipper PPO of XBScript PP$ file is the result of the preprocessed PRG source file. Syntax: xbScript.exe filename[.ext] -P Optional command line switches in this mode: • -CCH Generate a .cch file (compiled command header). • -D <id> #define <id>. • -D:E Show tracing information in the expression Scanner. • -D:M Show tracing information into the Match Engine. • -D:P Show tracing information into the Output Generator. • -FIX Do not clone Clipper PreProcessor bugs. • -l<path> #include file search path(s) (';' separated). • -Q Quiet. • -U Use command definitions set in (or none). 3. XBScript Prompt, which allows most of the Clipper syntax For this you will need the XBScript-Prompt edition. In this mode you can execute a single line at a time by typing the line and pressing the [Enter] key.It does support IF [ELSE] [ELSEIF] ENDIF in DOT environment. Executing XBScript with no source filename will start the DOT prompt mode. Additionally you may type: DO filename.prg [ENTER] So that DOT will "run" the specified source file. This interpreter mode is subject to few limitations: A - It does support LOCAL/STATIC/PRIVATE/PUBLIC, but: • STATICs are actually implemented as publics. • LOCALS have scoping of locals but are implemented as privates so you can't have a LOCAL and a PRIVATE with the same name. B - Non-declared variables are auto-created on assignment in Harbour but NOT in Clipper (yet). C - It does support definition and execution of prg-defined FUNCTIONs/PROCEDUREs. D - It does support all control flow structures including: BEGIN SEQUENCE [BREAK] [RECOVER] END SEQUENCE TRY [CATCH [<xCatcher>]] END. FOR EACH <Enumerator> IN <Enumeration> This will create rp_dot.pp$ compilation trace file. xbScript is using pre-burned rules to support this functionality, unless a file named rp_dot.ch is present. If rp_dot.ch is present xbScript will load rp_dot.ch instead of using the pre-burned rules. If this file doesn't include all the needed rules, the functionality of the the Dot Prompt mode may be faulty. 4. Finally, XBScript is a limited Clipper/Harbour/xBase Interpreter For this you will need the XBScript-Prompt edition. Subject to those same few limitations it can execute most of Harbour syntax. Executing XBScript-Prompt followed by a source file name and the -R switch will "RUN" that source (it will also create the rp_run.pp$ compilation trace file). Syntax: xbScript.exe filename[.ext] -R In this mode these are the optional command line switches: • -CCH Generate a .cch file (compiled command header). • -D <id> #define <id>. • -D:E Show tracing information in the expression Scanner. • -D:M Show tracing information into the Match Engine. • -D:P Show tracing information into the Output Generator. • -FIX Do not clone Clipper PreProcessor bugs. • -l<path> #include file search path(s) (';' separated). • -Q Quiet. • -U Use command definitions set in (or none). So that DOT will "run" the specified source file. This interpreter mode is subject to few limitations: A - It does support LOCAL/STATIC/PRIVATE/PUBLIC, but: • STATICs are actually implemented as publics. • LOCALS have scoping of locals but are implemented as privates so you can't have a LOCAL and a PRIVATE with the same name. B - Non-declared variables are auto-created on assignment in Harbour but NOT in Clipper (yet). C - It does support definition and execution of prg-defined FUNCTIONs/PROCEDUREs. D - It does support all control flow structures including: BEGIN SEQUENCE [BREAK] [RECOVER] END SEQUENCE
TRY [CATCH [<xCatcher>]] END. FOR EACH <Enumerator> IN <Enumeration E - The compiled module is automatically using -n (No implicit startup procedure) if the script starts with a Procedure/Function definition.
F - Built-in OLE COM Client gateway is included when PP is compiled with xHarbour. XBScript is using pre-burned rules to support this functionality, unless a file named rp_run.ch is present. If rp_run.ch is present xbScript will load rp_run.ch instead of using the pre-burned rules. If this file doesn't include all the needed rules, the functionality of the the Interpreter mode may be faulty. |