Name

tpl — PL_TDF compiler producing TDF

Synopsis

tpl 

[ -V ] [ -g ] [ -I path… ]
input-file output-file

tpl 

{ -v }

Description

The action of tpl is to compile a PL_TDF text in input-file to a TDF capsule in output-file. (See PL_TDF Definition). The resulting .j file is suitable for linking and translation just as any other .j file by tcc. Conventionally, PL_TDF programs are held in normal text files with suffix .tpl.

Options

-V

This option produces a cut-down “pretty print” of the TDF capsule on the standard output. This shows the definitions and declarations of the tags, tokens and al_tags of the program.

-I path

Gives the search path for any #include files in the PL_TDF text.

-g

The -g option will put line number information into the TDF.

-v

This option causes tpl to print its version number and the version of the TDF specification it supports.

Caveats

Compile-time error reporting is rather rudimentary and error recovery non-existent. Only the first error found will be reported on the standard error channel. This will give some indication of the type of error, together with the text line number and a print-out of the line, marking the place within the line where the error was detected.

Errors which can only be detected at translate-time are much more difficult to correct. These are usually shape or alignment errors, particularly in the construction of offsets. Try compiling and translating with the -g option. On the error, the translator will output the source filename and an approximate line-number corresponding to the position of the error in the PL_TDF.

Translating with the -g option may sometimes give warning messages from the system assembler being used; some assemblers object to being given line number information in anything else but the .text segment of the program. The main intention of the -g option is to detect and correct errors errors thrown up by the translators and not for run-time de-bugging, so do not regard a warning like this as a bug in the system.

See Also

tcc.

PL_TDF Definition.

History

Historically, the source files to tpl (and tpl itself) were named just .pl. After the TenDRA 4.1.2 release, these were renamed to avoid confusion with Perl.