Properties - Parser

Top  Previous  Next

The Parser tab page lets you decide which parts of the source that should be found and documented.

 

clip0005

The Parser tab page

 

Target version

Select the compiler version targeted for the current documentation run. Note that, although Pascal Browser scans the source files in the same way as the compiler, it does not detect every syntax error. Make sure that the source code compiles correctly for the specified target, otherwise the results output by Pascal Browser may be incorrect.

 

Pascal Browser supports code written for these compilers/versions:

 

- Borland Pascal 7 (or earlier)

- Delphi 1

- Delphi 2

- Delphi 3

- Delphi 4

- Delphi 5

- Delphi 6

- Delphi 7

- Delphi 8 for .NET

 

- Delphi 2005 for Win32

- Delphi 2005 for .NET

- Delphi 2006 for Win32 (also Turbo Delphi for Win32)

- Delphi 2006 for .NET   (also Turbo Delphi for .NET)

- Delphi 2007 for Win32

- Delphi 2007 for .NET

- Delphi 2009 for Win32

- Delphi 2010 for Win32

 

- Delphi XE for Win32

 

- Delphi XE2 for Win32

- Delphi XE2 for Win64

- Delphi XE2 for OSX

 

- Delphi XE3 for Win32

- Delphi XE3 for Win64

- Delphi XE3 for OSX

 

- Delphi XE4 for Win32

- Delphi XE4 for Win64

- Delphi XE4 for OSX

- Delphi XE4 for iOS Device

- Delphi XE4 for iOS Simulator

 

- Delphi XE5 for Win32

- Delphi XE5 for Win64

- Delphi XE5 for OSX

- Delphi XE5 for iOS Device

- Delphi XE5 for iOS Simulator

- Delphi XE5 for Android

 

- Delphi XE6 for Win32

- Delphi XE6 for Win64

- Delphi XE6 for OSX

- Delphi XE6 for iOS Device

- Delphi XE6 for iOS Simulator

- Delphi XE6 for Android

 

- Delphi XE7 for Win32

- Delphi XE7 for Win64

- Delphi XE7 for OSX

- Delphi XE7 for iOS Device

- Delphi XE7 for iOS Simulator

- Delphi XE7 for Android

 

- Delphi XE8 for Win32

- Delphi XE8 for Win64

- Delphi XE8 for OSX

- Delphi XE8 for iOS Device

- Delphi XE8 for iOS Device 64-bits

- Delphi XE8 for iOS Simulator

- Delphi XE8 for Android

 

- Delphi 10 for Win32

- Delphi 10 for Win64

- Delphi 10 for OSX

- Delphi 10 for iOS Device

- Delphi 10 for iOS Device 64-bits

- Delphi 10 for iOS Simulator

- Delphi 10 for Android

 

- Delphi 10.1 for Win32

- Delphi 10.1 for Win64

- Delphi 10.1 for OSX

- Delphi 10.1 for iOS Device

- Delphi 10.1 for iOS Device 64-bits

- Delphi 10.1 for iOS Simulator

- Delphi 10.1 for Android

 

- Delphi 10.2 for Win32

- Delphi 10.2 for Win64

- Delphi 10.2 for OSX

- Delphi 10.2 for iOS Device

- Delphi 10.2 for iOS Device 64-bits

- Delphi 10.2 for iOS Simulator

- Delphi 10.2 for Android

- Delphi 10.2 for Linux 64-bits

 

 

Default = Delphi 10.2 for Win32

 

Pascal Browser may also work with earlier versions of Turbo Pascal for DOS and Windows (prior to Borland Pascal 7), but this has not been validated and consequently is not guaranteed. In this case, select Borland Pascal 7 for best results.

 

Files parsed

Select an option:

 

Both source and form files (DFM/NFM-files)

This is the default option. If Pascal Browser finds a DFM/XFM-file, it will be examined together with the corresponding PAS-file.

 

Only source files

No form files (DFM/XFM-files) will be examined.

 

Form files format

Select an option:

 

DFM/NFM

Pascal Browser looks for form files with a DFM or NFM extension (default).

Form files with a DFM extension are used with VCL (Windows applications), and NFM-files for Delphi for .NET applications.

 

XFM

Pascal Browser looks for form files with a XFM extension.

Form files with a XFM extension are used with CLX (Windows and Linux applications), usually when developing with Borland Kylix (in essence Delphi for the Linus OS).

 

Include files must exist

Mark this checkbox if a missing include file should trigger an error and stop the analysis. Keep this option selected if possible, since a vital missing include file could generate incorrect results.

 

Default = No

 

Use Delphi project options if found

When a Delphi compiler and a DPR file is selected, Pascal Browser tries to load the corresponding project options file (CFG file in Delphi 4 or higher, DOF file in Delphi 2 and 3, and OPT file in Delphi 1). If successful, these options are used. For search paths, unit aliases and defines, the options are merged with the options you select. This makes it possible to instance, in Pascal Browser to provide the path to the VCL source files.

 

If a Delphi project file (DPR file) is parsed, search paths following the in keyword are automatically followed.

 

Allow multi-byte characters

Mark this checkbox if multi-byte characters (such as Shift-JS or Japanese) exist in source code comments.

Default = No

 

Search folders

Select the drives and folders where Pascal Browser will search for source files. The folder containing the primary source file is automatically searched, and there is no need to include this folder.

 

Unlike the compiler, Pascal Browser does not require that all source code is available. However, it is often best to make as much source code visible to Pascal Browser as possible.

 

Enter search folders, in priority order, separated with a semicolon e. g.:

 

c:\source\myunits;c:\source\generic;c:\source\proj1

 

Alternatively, press the ellipsis button to select the folders in a selection dialog box.

 

You may also enter relative paths, like “..\..\generic”.

 

If a Delphi project or package file (DPR, or DPK file) is parsed, search paths following the in keyword are automatically followed.

 

Because the parser looks in the directories according to the order specified, it is wise to put more frequently used directories first in the list.

 

User-defined environmental variables set in the Delphi IDE, may also be used.

 

Append Delphi library path

Mark this checkbox if you want Pascal Browser to look for modules also in these folders. The Delphi library path is set in the Delphi IDE under Tools|Environment Options and the Library tab page.

 

Default = No

 

Append Delphi browsing path

Mark this checkbox if you want Pascal Browser to look for modules also in these folders. The Delphi browsing path is set in the Delphi IDE under Tools|Environment Options and the Library tab page.

 

Default = No

 

Exclude identifiers from these folders in documentation (but always report main file):

Identifiers declared in source code from these folders will NOT appear in the generated documentation.

 

One exception however is identifiers for types. For example when displaying types for identifiers, like "integer" or "TStringList", these are written out even if  their folders are excluded.

 

Enter excluded folders separated with a semicolon e. g.:

 

c:\source\myunits;c:\source\generic

 

Alternatively, press the ellipsis button to select the folders in a dialog box.

 

It is possible to select that an exclude folder should also apply to its subfolders. In this way it is possible to exclude “C:\Program Files\Borland\Delphi7\Source” and all the subfolders. When subfolders are excluded, the folder name is suffixed with “<+>”.  

 

User-defined environmental variables, like “$(UTILS)”, set in the Delphi IDE, may also be used.

 

Unit aliases

Select unit aliases (Delphi 2 and upwards).

 

Default for Win32 versions:

WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE

 

Default for .NET versions:

WinTypes=Borland.Vcl.Windows;WinProcs=Borland.Vcl.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE

 

See the Delphi documentation for an explanation of unit aliases.

 

Conditional defines

Specify conditional compilation directives that are valid for the current analysis. Pascal Browser parses source code just like the compiler, and must treat conditional directives, meaning that it will ignore sections of not activated code. You may also include defines within the source code.

 

Enter conditional defines, separated with a semicolon e. g.:

 

Final;Special

 

Alternatively, press the ellipsis button to enter the defines in a dialog box.

 

Pascal Browser even initializes predefined defines just as the compiler does (e g 'WIN32'). It also keeps track of the state of all compiler directives so that directives like {$IFOPT} will function correctly.

 

The conditional compilation directive _PEGANZA_ is always defined.

 

Expressions for $IF-directives, that evaluate to TRUE

In Delphi 6, the new $IF-directive was introduced. The $IF-directive is followed by an expression, that evaluates to TRUE or FALSE. If you use $IF-directives, you must supply all expressions that evaluate to TRUE, because Pascal Browser cannot always determine the value of an expression. Enter the expressions separated with semicolons, like:

 

RTLVersion > 14;Declared(Windows)

 

Please observe that you do not need to include Defined-directives like "Defined(MSWINDOWS)", because PAB manages to evaluate those directives.

 

When Pascal Browser parser finds a $IF-directive in code, it will try to evaluate it. If it is an expression that you have supplied, it will be evaluated to TRUE, otherwise it will be evaluated as FALSE. Directives that are evaluated as FALSE, imply that the corresponding code is not activated.

 

Namespaces

This field is only enabled (and relevant) if the compiler is set to Delphi 8 or higher compilers for .NET. Press the ellipsis button to select the namespaces.

 

Default namespace

This field is only enabled (and relevant) if the compiler is set to Delphi 8 or higher compilers for .NET.

 

 

See also: