NET/MASTER Network Control Language (NCL) Reference Manual
Lexical Elements of NCL
Compiler Operation
8–2 106126 Tandem Computers Incorporated
Lexical elements are made up of alphanumeric and some nonalphanumeric characters.
Each type of lexical element has its own subset of legal (acceptable) characters.
Compilation Errors
Compilation errors are errors detected during the analysis of lexical elements. There
are two types of compilation errors: a fatal error causes the compilation of an NCL
procedure to stop immediately; other (non-fatal) errors do not stop compilation.
Illegal Characters
The compiler treats the characters listed in Table 8-1 as illegal characters, except within
quoted strings.
Table 8-1. Illegal Characters
Character Name of Character
! Exclamation mark
? Question mark
~ Tilde
^ Caret
` Single opening quote
Control characters Not applicable
Here are some examples of lexical elements with illegal characters:
!oken1
to?en2
token~
The compiler reports an error message when it encounters illegal characters during
lexical element analysis, unless the illegal characters are within quotes. If the compiler
finds an illegal character outside a quoted string, it reports an error and replaces the
character with a blank. This allows compilation and error reporting to continue. Here
are the same examples, now made legal because all characters are within quotes:
"!oken1"
'to?en2'
"token~"
Blanks
Blanks are of particular importance in lexical element analysis because the compiler
treats a blank outside a quoted string as a lexical element delimiter. (Depending on
the context, a blank may be a blank operator. This is a special use of the blank and is
discussed in Section 10, “Expressions and Operators.”)