Previous: , Up: Syntax Tables   [Contents][Index]


45.7 Syntax Table Internals

Each element of a syntax table is an integer that encodes the syntax of one character: the syntax class, possible matching character, and flags. Lisp programs don’t usually work with the elements directly; the Lisp-level syntax table functions usually work with syntax descriptors (see Syntax Descriptors).

The low 8 bits of each element of a syntax table indicate the syntax class.

Integer

Class

0

whitespace

1

punctuation

2

word

3

symbol

4

open parenthesis

5

close parenthesis

6

expression prefix

7

string quote

8

paired delimiter

9

escape

10

character quote

11

comment-start

12

comment-end

13

inherit

The next 8 bits are the matching opposite parenthesis (if the character has parenthesis syntax); otherwise, they are not meaningful. The next 6 bits are the flags.