The input of GAP consists of sequences of the following characters.
Digits, uppercase and lowercase letters, space, tab, newline, and the special characters
" ' ( ) * + , _ . / : ; < = > ~ [ \ ] ^ _ { } #
Other characters will be signalled as illegal. Inside strings and comments the full character set supported by the computer is allowed.
GAP 3.4.4