A |re2c| program consists of a sequence of *blocks* intermixed with code in the
target language. A block may contain *definitions*, *configurations*, *rules*,
*actions* and *directives* in any order:

``name = regular-expression ;``
    A *definition* binds ``name`` to ``regular-expression``. Names may contain
    alphanumeric characters and underscore. The `regular expressions`_ section
    gives an overview of |re2c| syntax for regular expressions. Once defined,
    the ``name`` can be used in other regular expressions and in rules.
    Recursion in named definitions is not allowed, and each name should be
    defined before it is used. A block inherits named definitions from the
    global scope. Redefining a name that exists in the current scope is an error.

``configuration = value ;``
    A *configuration* allows one to change |re2c| behavior and customize the
    generated code. For a full list of configurations supported by |re2c| see
    the `configurations`_ section. Depending on a particular configuration, the
    ``value`` can be a keyword, a nonnegative integer number or a one-line string
    which should be enclosed in double or single quotes unless it consists of
    alphanumeric characters. A block inherits configurations from the global
    scope and may redefine them or add new ones. Configurations defined inside
    of a block affect the whole block, even if they appear at the end of it.

``regular-expression code``
    A *rule* binds ``regular-expression`` to its semantic action (a block of
    code in curly braces, or a block of code that starts with ``:=`` and ends on
    a newline followed by any non-whitespace character).
    If the ``regular-expression`` matches, the associated ``code`` is executed.
    If multiple rules match, the longest match takes precedence. If multiple
    rules match the same string, the earliest one takes precedence. There are
    two special rules: the default rule ``*`` and the end of input rule ``$``.
    Default rule should always be defined, it has the lowest priority regardless
    of its place in the block, and it matches any code unit (not necessarily a
    valid character, see the `encoding support`_ section). The end of input rule
    should be defined if the corresponding method for
    `handling the end of input`_ is used.
    With `start conditions`_ rules have more complex syntax.

``!action code``
    An *action* binds a user-defined block of ``code`` to a particular place in
    the generated finite state machine (in the same way as semantic actions bind
    code to the final states). See the `actions`_ section for a full list of
    predefined actions.

``!directive ;``
    A *directive* is one of the special predefined statements. Each directive
    has a unique purpose. See the `directives`_ section for details.
