0% found this document useful (0 votes)
38 views

Symbols

Scanning assembles characters into symbols which are the basic lexical units used in programming. There are several types of symbols including keywords, identifiers, integers, strings, and operator/delimiter symbols. Keywords are reserved words, identifiers are sequences of letters and numbers that are not keywords, integers are numeric sequences, and strings are character sequences in double quotes.

Uploaded by

ravg10
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Symbols

Scanning assembles characters into symbols which are the basic lexical units used in programming. There are several types of symbols including keywords, identifiers, integers, strings, and operator/delimiter symbols. Keywords are reserved words, identifiers are sequences of letters and numbers that are not keywords, integers are numeric sequences, and strings are character sequences in double quotes.

Uploaded by

ravg10
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Symbols

By: GAP
The process of reading, i.e., of assembling the input into expressions, has a subprocess,
called scanning, that assembles the characters into symbols. A symbol is a sequence of characters
that form a lexical unit. The set of symbols consists of keywords, identifiers, strings, integers, and
operator and delimiter symbols.
A keyword is a reserved word (see Keywords). An identifier is a sequence of letters, digits and
underscores (or other characters escaped by backslashes) that contains at least one non-digit and is
not a keyword (see Identifiers). An integer is a sequence of digits (see Integers), possibly prepended
by - and + sign characters. A string is a sequence of arbitrary characters enclosed in double quotes
(see Strings and Characters).
Operator and delimiter symbols are
+ - * / ^ ~ !.
= <> < <= > >= ![
:= . .. -> , ; !{
[ ] { } ( ) :

Reference: http://www.gap-system.org/Manuals//doc/htm/ref/CHAP004.htm#SECT002
Date:17-9-2008

You might also like