%%'.
definitions %% rules
Furthermore, the definition section contains declarations of simple name definitions to simplify scanner specification. A name definition looks like:
name pattern
where name is is a word beginning with a letter or an underscore (`_')
followed by zero or more letters, digits, `_', or `-' (dash). pattern
is a pattern, see Patterns 5.
Finally, in the definition section we can declare start conditions 7. Miniscanners are a kind of startcondition, and they are very useful for scanning small `sublanguages' in the language you want to scan. An example is scanning a C-string in a C-program.
pattern action
action is here an end-of-line comment, a single-line C-statement, or a
compound statement that may span several lines. action may also be empty.
An action consisting solely of a vertical bar (`|') means ``same as the action for the next rule''.
/* ... */) and end of line comments (// ...)
are supported.
When a multiline comment is encountered outside an action, flexc++ discards the comment, while all comments in actions will be copied verbatim to the source.