ASPCompiler Project file syntax
ASP Compiler 1.1 documentation is under development. See also the examples.

Project file syntax

Project files have file name extension aspc-project. They can be composed using the ASPC IDE or manually. This chapter describes the project files content and allows you to make some modifications not available through the user interface. Please be careful when doing it - these techniques are for advanced users only. For general information about the configuration files see "Configuration files - general information".

A sample project file is listed below. See the details about every setting below it.

{ MAIN:
    (string)ParserDefinitions=defs.cfg
    (string)TempFile=aspc.tmp
    (string)ProjectName=ASPHello
    (int)SaveFullPaths=0
    (int)DbgBuild=0
} MAIN;
{ ASPToPlain:
    (string)Parser=ASP
    (string)SiteRoot=src
    (string)Response.Write=Response.Write
} ASPToPlain;
{ VBStoVB:
    (string)ASPOutputPath=compiled
    (string)VBOutputPath=VBProject
    (string)Parser=VBS
    (string)StatementParser=STMT
    (string)VBSymbols=VBSymbols.aspc-symbols
    (int)NoContext=0
    { EnvironmentObjects:
        (int)Application=1
        (int)Request=1
        (int)Response=1
        (int)Server=1
        (int)Session=1
    } EnvironmentObjects;
} VBStoVB;
{ Files:
    { 0:
        (string)File=src\Arrays_VBScript.asp
        (string)Process=ASPtoVB
    } 0;
    { 1:
        (string)File=src\Enum_VBScript.asp
        (string)Process=ASPtoVB
    } 1;
    { 2:
        (string)File=src\HelloWorld_VBScript.asp
        (string)Process=ASPtoVB
        (string)Comment=Some comment
    } 2;
} Files;
{ VERSION:
    (int)MajorVer=1
    (int)MinorVer=0
    (int)RevisionVer=0
    (string)VersionCompanyName=My
    (string)VersionLegalCopyright=
    (string)VersionLegalTrademarks=
    (string)VersionProductName=
    (string)VersionFileDescription=
    (string)VersionComments=
} VERSION;

MAIN section

Contains general settings:

ParserDefinitions - string value. Specifies the parser definitions file relative to the directory containing the compiler. Usually this means relative to the aspcx.dll (which is in the same directory as ASPCIDE.EXE). This file is used by the compound parser (EMBDPRSR.DLL) and every section (at root level) specifies separate parsing scheme. Information about this file will be supplied to the registered customers on demand.

TempFile - Temp file name. It is created in the compiler directory when needed. By default the value from the general settings is used for every project created by the IDE.

ProjectName - The project name. Can be edited from the IDE - see "Project options".

SaveFullPaths - Integer - 0 or 1. Can be edited from the IDE - see  "Project options". By default you will not need to set it to 1, but some advanced techniques may need it. If set to 1 all the paths in the project will be saved as full physical paths by the IDE. This will make the project non-portable to another machine.

DbgBuild - Integer. 0 - release build, 1 - debug build. See the DbgTrace directive for more information

ASPToPlain section

Describes general settings for the source files.

Parser - Corresponds to a section in the file specified by the ParserDefinitions in the MAIN section. Thus it defines which parsing scheme to use with ASP files when converting them to plain VBScript.  Default value is ASP. 

SiteRoot - Path to the directory under which the source files must be located. If it is relative IDE assumes it is relative to the directory containing the project file. In other words relative path becomes fully determined when the project file is saved. Any input file located outside the subtree of this directory will cause errors. This behavior ensures the projects are moveable manually - i.e. can be copied together with the source files without loss of important input data. Furthermore this setting is meaningful for all the input files and not only for the ASP input files.

Response.Write - If exists it instructs the ASPC to translate ASP tags to calls to another object and/or method instead of Response.Write. Can be useful if using ASPC for HTML generation components for non WEB applications.

 VBStoVB section

Settings related to VBScript language processing and its environment.

ASPOutputPath - Output path for the loader files. This is used for all the loader files - ASP and the others. If relative path is used it is relative to the directory where the project file is located - as like the SiteRoot in the previous section. Compiler recreates the structure of the source directory tree specified by SiteRoot record whenever a loader file is created.

VBOutputPath - Output path for the VB project files. If relative path is used it is relative to the directory where the project file is located. All the VB files are stored in this directory. You are able to compile/recompile them using Microsoft Visual Basic at any time without need to start ASPC unless you need to process your ASP/VBScript files again.

Parser - VBScript program structure parser. Usually it is VBS - corresponds to a definition in the Parser definitions file (see MAIN section).

StatementParser - VBScript single statement parser. Usually it is STMT - corresponds to a definition in the Parser definitions file (see MAIN section).

VBSymbols - VB symbols file . Relative path is relative to the compiler location.

NoContext - Integer. If set to 1 it disables the context connection between the objects in the DLL. This option cannot be edited from the IDE. With this option set to 1 important part of the ASPC is disabled thus it is useful only in some rare cases when the developer needs to transfer some script to a VB project and then continue to work on it in the VB IDE. If missing it is assumed 0.

EnvironmentObjects - subsection 

This section contains the names of the global namespace objects of the script. In ASP they are usually Request, Response, Server and so on. In WSH it is WScript and in case of custom hosts they are defined by the host (see its documentation). These are the objects accessible from every point in the script globally. They are passed by the host (IIS, WSH or custom) and the host is responsible to initialize them before starting the script.

Pairs of type (string)Name=number
Name is the name of the namespace. Number can be 0 or 1. If set to 0 the object is disabled - can be useful if you want to not use a particular object without deleting its entry from the file.

Files section

This section contains one subsection for every input file configured with the project - file sections. File sections must be named with continuous numeric names. Every section must contain the following records:

File - string value. Input file - path relative to the project file location. Every file must be under the SiteRoot specified in the ASPtoPlain section.

Process - How to process the file. See the available processing options in the "Processing options".

And may contain

Comment - String value containing a file comment. Can be edited in the file options dialog

VERSION section

Version information for the DLL. can be entered in the IDE (Project menu - Version information). Except the first 3 integer values all the other values are strings. The actual content is not checked (nor by ASPC nor by VB). The field names are enough descriptive and values are optional. You can omit any part of the version information for your project. It is recommended to fill the integer values only - in order to allow version checking by setup programs and so on.

The names of the sections and record names are case insensitive. This is not true for the values - importance of the text capitalization depends on their purpose (for example: none for file names and paths).

Please note the syntax of the ASPC project files may change in the next versions. Compatibility will be preserved through conversion utilities or internal functionality integrated into the ASPC IDE. 

newObjectsSite4All.nl Copyright 2001-2006 newObjects [ ]