Character Strings

The simplest way to describe a character pattern is just to list the characters. In lex input, enclose the characters in quotation marks:
"if"
"while"
"goto"
These are called character strings. A character string matches the sequence of characters enclosed in the string.
Inside character strings, the standard C escape sequences are recognized:
\n — newline
\b — backspace
\t — tab
and so on. See Generating a Lexical Analyzer Using OpenExtensions lex for the complete list. These can be used in regular expressions to stand for otherwise unprintable characters.