The first bug was not allowing whitespace between '#' and the
directive name.
The second bug was swallowing a terminating newline along with any
trailing whitespace on a line.
With these two fixes, and the previous commit to stop emitting SPACE
tokens, the recently added extra-whitespace test now passes.
NONSPACE [^[:space:]]
NEWLINE [\n]
HSPACE [ \t]
-HASH ^{HSPACE}*#
+HASH ^{HSPACE}*#{HSPACE}*
IDENTIFIER [_a-zA-Z][_a-zA-Z0-9]*
TOKEN [^[:space:](),]+
return NEWLINE;
}
-{SPACE}+
+{HSPACE}+
%%