You can check a template for adherence to DGL syntax rules using the Compile option. This is the same as program compilation in other languages. Use this option to see whether a template is executable, without actually performing the execution. Any errors are logged so you can execute templates unattended.
Note: If you do not compile your template, the tool checks the template for errors upon execution (see Creating a Document).
2. Click Compile. A message is displayed in the main Documentor window that notifies you whether the compilation was successful.If there are compilation errors, a message notifies you that errors were found. The error messages are written into the template in the form of comments. A compiler error message appears as close as possible to the line where the problem was found. The following example shows a template with error messages:
.
.
.
name := stm_r_st_name (state_chart, status;
--%DOC (E1352) Missing ’)’
name := name + 5;
--%DOC (E1142) Argument mismatch
name := nm;
--%DOC (E1211) Identifier NM not declared
.
.
.
FOR sub_state IN sub_list LOOP
i:=i+1
--%DOC (E2001) Missing ’;’
.
.
.
You must correct template errors before re-executing the template, but you do not need to remove them from the template file. The Documentor automatically removes them the next time the template is compiled or executed.