PL_TDF Definition

January 1998

next section
previous section current document TenDRA home page document index


5 Use of the PL_TDF compiler

Conventionally, PL_TDF programs are held in normal text files with suffix .pl. The PL_TDF compiler is invoked by:

	pl [-v] [-Iinclude_path ...] [-g] [-V ] infile.pl outfile.j
This compiles infile.pl to TDF in outfile.j. This file can be linked and loaded just as any other .j file using tcc.

The -v option will produce a cut-down pretty print of the TDF for the definitions and declarations of the tags, tokens and al_tags of the program on the standard output.

The -I options will defines the paths for any #include pre-processing directives in the text.

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

The -V option will print version information of both pl and the TDF it produces.

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.


Part of the TenDRA Web.
Crown Copyright © 1998.