2.2 Symbols

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 consisting entirely of lowercase letters (see Keywords). An identifier is a sequence of letters and digits that contains at least one letter and is not a keyword (see Identifiers). An integer is a sequence of digits (see Integers). A string is a sequence of arbitrary characters enclosed in double quotes (see Strings and Characters).

Operator and delimiter symbols are

    +       -       *       /       ^       ~
    =       <>      <       <=      >       >=
    :=      .       ..      ->      ,       ;
    [       ]       {       }       (       )  

Note that during the process of scanning also all whitespace is removed (see Whitespaces).

Previous Up Top Next
Index

GAP 3.4.4
April 1997