|Can (f)lex handle the NULL character? firstname.lastname@example.org (1999-05-07)|
|Re: Can (f)lex handle the NULL character? email@example.com (1999-05-09)|
|Re: Can (f)lex handle the NULL character? firstname.lastname@example.org (1999-05-16)|
|Re: Can (f)lex handle the NULL character? email@example.com (1999-05-20)|
|Date:||9 May 1999 16:01:28 -0400|
Could you maybe share some of the flex code you are having problems
with here. It is possible that you are not having trouble in your
regular expression code or the flex rules.
Instead, you may be having problems passing NULL as a token. You did
not state that you are, but at the risk of taking too obvious an
approach on this, let me state that lex and its progeny can not pass
NULL (as a single byte token). This is because that is reserved as the
handshake value between the lexer and parser to, in fact, signal end
So depending on the version of lex, any attempt to violate this rule
drives (f)lex wild or the parser wild.
If this is your problem, then you may have some genuine interest in
gabbing this one byte text and passing it as a token. You can do
that, just don't try to send it literally. Instead, set up a %token in
your parser declarations and pass the NULL token symbolically. If
needed, you can still pass the hex zeroes as the lexeme value in the
state variable. You just can not pass token zero.
Return to the
Search the comp.compilers archives again.