Download context/2 - bei IF Computer

Transcript
Chapter 9
Prolog syntax
Starting from the basic Prolog character set, the syntax of Prolog terms is built up step by
step in the sections Basic Prolog elements and Terms. The remaining parts of this chapter
deal with special aspects of operators, arithmetic expressions and functions, comparison
predicates and list processing.
9.1
Basic Prolog elements
The character set used by Prolog is divided into four classes of characters, the Prolog-specific
characters being of particular importance in the Prolog syntax. The remaining characters
form lexical elements and delimiters.
Prolog character set
The Prolog character set consists of the following classes of characters:
• Letters, digits, underscore character
• Special characters
• Prolog-specific characters
• Delimiters
These classes comprise the following individual characters:
Letters, digits, underscore character
a
A
0
b
B
1
c
C
2
d
D
3
...
...
4
z
Z
5
6
793
7
8
9
_