[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trailing sequence
From: |
John W. Millaway |
Subject: |
Re: trailing sequence |
Date: |
Thu, 31 Jan 2002 08:02:47 -0800 (PST) |
> I'm parsing an array of bytes. What should be my regular expression to
> indicate the end of parsing( once all the bytes of the array are parsed)?
Just use EOF. It's the same for strings as for file streams, e.g.:
[a-z]+ return WORD;
[0-9]+ return DIGITS;
<<EOF>> { printf("End of string\n"); yyterminate(); }
But you don't need to explicitly match EOF unless you need to handle it
specially. The default behavior is to call yywrap() then, possibly,
yyterminate().
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
- trailing sequence, Sunil Kumar Jain, 2002/01/31
- Re: trailing sequence,
John W. Millaway <=