names are completely arbitrary and
    serve only to identify and distinguish between different rules. Rule order is
    important: if text does not match the first rule added to the grammar, the
    lexer tries to match the second rule added, and so on. Right now this lexer
    simply matches whitespace tokens under a rule named &ldquo;whitespace&rdquo;.</p>

    <p>To illustrate the importance of rule order, here is an example of a
    simplified Lua lexer:</p>

    <pre><code>
    lex:add_rule('whitespac