HANDBOOK / REFLEX REFERENCE MANUAL /

# How To Describe Layout and Comments

The generated Lex specification contains blocks that can be overridden by the user. A block `Block` may be replaced by the content of a file `Block.b` .

There is a block `LAYOUT` which unless overridden has the following form:

       \  { yypos += 1; }
       \n { yyPosToNextLine(); }
       \t { yypos += 1; }

These are three Lex rules that match blank, newline, and tabulator. They do not include `return` statements, so the input recognized by the rule is skipped.

The variable `yypos` keeps track of the source position. It is incremented by the length of the input. In the case of newlines the variable is adjusted by the library function `yyPosToNextLine`.

This handling of white space may be overridden by providing a file `LAYOUT.b` .

In addition, a file `COMMENTS.b` may define comments that are to be skipped. By default, the `COMMENTS` block is empty.