help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NUL Char Handling


From: Raman Muthukrishnan
Subject: NUL Char Handling
Date: Thu, 30 Oct 2003 13:56:14 -0800 (PST)

Hi All,

I need help in modifying the flex source code or
writing a post-processing script so that flex always
treats NUL character as an input character and not as
End-of-buffer.

Currently in flex, if a NUL char comes as an input,
the action code for End-of-buffer is called. Within
that action, the check is done whether the NUL char
came as part of input, or end-of-buffer has been
reached.
If end-of-buffer is reached, the action loads more
characters into the buffer. If the NUL char was part
of input, then the function yy_try_NUL_transition is
called which does the NUL char transition.

In my requirement, the end-of-buffer condition is
taken care of differently (that is, I know the number
of characters to be scanned and hence do not use the
end-of-buffer action generated by flex). 

So my question: How to make the flex-DFA treat the NUL
char as an input character always? That is, I do not
want Flex to jump to end-of-buffer routine.
Jumping to the end-of-buffer routine makes the
scanning slow.

If anyone has tried this before, or have any inputs,
it will be very helpful.

Thanks,
Regards,
Raman


__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]