NET/MASTER Network Control Language (NCL) Reference Manual

8 Compiler Operation
106126 Tandem Computers Incorporated 8–1
This section discusses how NCL source code is compiled. It includes the following
topics:
The compilation process
Lexical elements of NCL
Statement analysis
Compiler directives
For help in understanding syntax notation, see “Notation Conventions” at the
beginning of this manual.
The Compilation
Process
When you execute an NCL procedure (either explicitly, using one of the NonStop
NET/MASTER MS START or EXEC commands, or implicitly), it is automatically
compiled if it has not been compiled before. The compilation process converts a
source file of NCL statements to object code that is stored in an object file.
The object code of an NCL procedure is a list of NCL operations without absolute
addresses. This means that the object code is relocatable and can be read into any
operating system process that can interpret NCL. Absolute addresses are assigned
when the object code is loaded into an operating system process for execution.
Lexical Elements of
NCL
This subsection discusses the analysis of the lexical elements in an NCL procedure
during compilation. There are five types of lexical elements:
Symbols, which include numbers as a subset
Quoted strings
Special characters
Variables
Operators
For information on variables, see Section 9, “Variables.” For information on operators,
see Section 10, “Expressions and Operators.” The effect of comments on lexical
elements and on the composition of labels is also discussed in this section.
Analysis of Lexical
Elements
NCL regards an NCL procedure as a sequence of lexical elements. A lexical element is
the smallest meaningful unit within an NCL procedure. Lexical elements are the
building blocks of an NCL source file.
The compiler uses the context in which a lexical element appears in a statement to
obtain its meaning. Core statements, verbs, variables, built-in functions, expressions,
comments, and labels consist of lexical elements.
Note Comments and labels are not regarded in themselves as lexical elements by the compiler, though they
consist of lexical elements.