Chapter 5. Lexical Structure

Table of Contents

5.1. Identifiers
5.2. Keywords
5.3. Separators and Operators

This chapter specifies the lexical structure of the XL programming language. This structure is based on the lexical structure of the Java programming language. Thus, the following features are taken over; for the term definitions see the Java Language Specification.

5.1. Identifiers

As for the Java programming language, an identifier is an unlimited-length sequence of Java letters and Java digits, the first of which must be a Java letter. An identifier cannot have the same spelling as a keyword or a literal.

Difference to the Java programming language

The XL programming language introduces three new keywords (Section 5.2, “Keywords”), namely in, module and yield. In order to be able to address existing entities of the Java runtime environment that have these keywords as simple name, e.g., the field or the method Thread.yield(), identifiers undergo an additional translation: If a raw identifier (resulting from the stream of input elements) happens to be equal to one of the character sequences $in, $module, or $yield, the leading $ is discarded and the identifier is subsequently treated as being equal to the character sequence in, module, or yield, respectively.