Rules</h4>

    <p>Programming languages have grammars, which specify valid token structure. For
    example, comments usually cannot appear within a string. Grammars consist of
    rules, which are simply combinations of tokens. Recall from the lexer
    template the <a href="#lexer.add_rule"><code>lexer.add_rule()</code></a> call, which adds a rule to the lexer&rsquo;s
    grammar:</p>

    <pre><code>
    lex:add_rule('whitespace', ws)
    </code></pre>

    <p>Each rule has an associated name, but rule 