|
1 | 1 | :doctitle: Other Tools Developed Here |
| 2 | +:sectnums: |
| 3 | +:toc: left |
| 4 | +:toclevels: 4 |
2 | 5 |
|
3 | | -Subdirectory source/tools/ inside link:index[PasDoc] sources |
| 6 | +## Introduction |
| 7 | + |
| 8 | +Subdirectory `source/tools/` inside link:index[PasDoc] sources |
4 | 9 | contains some useful programs related to PasDoc. They are either small |
5 | 10 | programs helpful for development of PasDoc, or tools that use PasDoc |
6 | 11 | units to do other tasks. |
7 | 12 |
|
8 | 13 | ## [[file_to_pascal_string]] file_to_pascal_string |
9 | 14 |
|
10 | | -Converts any text file into a Pascal string, so that you can compile |
11 | | -text files inside your program. |
| 15 | +Converts any text file into a Pascal string. |
| 16 | +This allows to embed contents of any text file into a compiled program. |
12 | 17 |
|
13 | 18 | ## [[file_to_pascal_data]] file_to_pascal_data |
14 | 19 |
|
15 | | -Converts any file into a Pascal array of bytes, so that you can compile |
16 | | -binary files inside your program. |
| 20 | +Converts any file into a Pascal array of bytes. |
| 21 | +This allows to embed contents of any binary file into a compiled program. |
17 | 22 |
|
18 | 23 | ## [[pascal_pre_proc]] pascal_pre_proc |
19 | 24 |
|
20 | | -Pascal preprocessor. It reads the Pascal source file given on the |
| 25 | +Pascal preprocessor. Rreads the Pascal source file given on the |
21 | 26 | command-line, and outputs it's processed version to the standard output. |
22 | 27 | Features (all inherited from pasdoc tokenizer and scanner): |
23 | 28 |
|
24 | | -* Handles $ifdef and related constructs |
| 29 | +* Handles `$ifdef` and related constructs, see link:ConditionalDefines[conditional expressions support]. |
25 | 30 |
|
26 | 31 | * Handles FPC macros (very useful if you want to use FPC source code using macros in Delphi) |
27 | | -* Handles $include |
| 32 | +
|
| 33 | +* Handles `$include` |
| 34 | +
|
28 | 35 | * Preserves whitespace |
29 | 36 |
|
30 | 37 | The preprocessor behavior can be configured by a couple of command-line |
31 | 38 | options, a subset of link:CommandLine[PasDoc command line options]. |
32 | | -Run pascal_pre_proc --help to get a list of supported options. Examples |
| 39 | +Run `pascal_pre_proc --help` to get a list of supported options. Examples |
33 | 40 | of use: |
34 | 41 |
|
35 | 42 | * Basic test of handling macros using ok_macros.pas file from pasdoc tests: |
36 | 43 | + |
37 | 44 | ---- |
38 | 45 | pascal_pre_proc pasdoc/tests/ok_macros.pas |
39 | 46 | ---- |
40 | | -* Generate a single (without any $includes and $ifdefs) source code of the SysUtils unit for Linux/i386 target from FPC sources: |
| 47 | +* Generate a single (without any `$include`, `$ifdef` etc.) source code of the SysUtils unit for Linux/i386 target from FPC sources: |
41 | 48 | + |
42 | 49 | ---- |
43 | 50 | pascal_pre_proc unix/sysutils.pp \ |
44 | 51 | -I objpas/sysutils/ -I inc/ -I i386/ -I ./linux/ \ |
45 | 52 | -D UNIX -D cpui386 > linux_i386_sysutils.pas |
46 | 53 | ---- |
47 | | -+ |
48 | | -Note that this is not perfect. because proper handling of $if and $elseif conditions is not implemented yet. |
|
0 commit comments