Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Lexical Structure

This section defines the smallest syntactic building blocks of FOL source code.

All FOL source is interpreted as Unicode text encoded in UTF-8. The lexer groups raw characters into tokens such as:

  • keywords
  • identifiers
  • literals
  • symbols
  • comments
  • whitespace/newline boundaries

The lexical chapters answer questions such as:

  • which words are reserved
  • how identifiers are formed
  • which literal forms exist
  • how comments and spacing affect parsing

The detailed chapters are:

  • keywords
  • identifiers
  • comments
  • whitespace
  • strings, characters, and booleans
  • numbers
  • symbols