Previous: Distinguishing line types, Up: Output devices



B.5.7 How lines are divided into tokens

Each driver definition line is run through a simple tokenizer. This tokenizer recognizes two basic types of tokens.

The first type is an equals sign (=). Equals signs are both delimiters between tokens and tokens in themselves.

The second type is an identifier or string token. Identifiers and strings are equivalent after tokenization, though they are written differently. An identifier is any string of characters other than white space or equals sign.

A string is introduced by a single- or double-quote character (' or ") and, in general, continues until the next occurrence of that same character. The following standard C escapes can also be embedded within strings:

\'
A single-quote (').
\"
A double-quote (").
\?
A question mark (?). Included for hysterical raisins.
\\
A backslash (\).
\a
Audio bell (ASCII 7).
\b
Backspace (ASCII 8).
\f
Formfeed (ASCII 12).
\n
New-line (ASCII 10)
\r
Carriage return (ASCII 13).
\t
Tab (ASCII 9).
\v
Vertical tab (ASCII 11).
\ooo
Each o must be an octal digit. The character is the one having the octal value specified. Any number of octal digits is read and interpreted; only the lower 8 bits are used.
\xhh
Each h must be a hex digit. The character is the one having the hexadecimal value specified. Any number of hex digits is read and interpreted; only the lower 8 bits are used.

Tokens, outside of quoted strings, are delimited by white space or equals signs.