|[7 earlier articles]|
|Re: what scanner scheme is efficient? firstname.lastname@example.org (James Mansion) (1996-10-24)|
|Re: what scanner scheme is efficient? email@example.com (1996-10-30)|
|Re: what scanner scheme is efficient? firstname.lastname@example.org (1996-11-12)|
|Re: what scanner scheme is efficient? email@example.com (1996-11-15)|
|Re: what scanner scheme is efficient? firstname.lastname@example.org (1996-11-19)|
|Re: what scanner scheme is efficient? email@example.com (1996-11-21)|
|Re: what scanner scheme is efficient? firstname.lastname@example.org (1996-11-24)|
|Re: what scanner scheme is efficient? email@example.com (1996-12-01)|
|From:||firstname.lastname@example.org (A Johnstone)|
|Date:||24 Nov 1996 16:20:29 -0500|
|Organization:||Royal Holloway, University of London|
|References:||96-10-076 96-11-123 96-11-141|
Sorry to waste bandwidth on a moderated group, but Vern has
incorrectly edited previous messages in this thread. I was the author
of a message illustrating the need for backing up even within Pascal's
lexical analyser. The comment that is attributed to me below was made
by someone else and is about 180 degrees out of phase with my own
views... Sorry for the pedantry, but IMHO comp.compilers displays
easily the highest signal to noise ratio of any newsgroup and we
should treat it as a `newsgroup of record'.
Vern Paxson (email@example.com) wrote:
: John Lilley (firstname.lastname@example.org) wrote:
: : What sample have you examined to arrive at the conslusion that *most*
: : scanners require backing-up? The languages that I know of (C, C++,
: : Pascal) do not require any backtracking to support their keyword sets.
: For some reason John's posting never made it to our site. He also sent
: it to me via private email, so that was how I answered it. Anywhere,
: here's my reply.
: - Vern
: A Johnstone <email@example.com> wrote:
: > What sample have you examined to arrive at the conslusion that
: > *most* scanners require backing-up? ...
: > Most of the time, a single character of lookahead with no
: > backtracking is sufficient.
: Pick a flex scanner you have lying around and run it through flex -b and
: you'll see what I mean.
: You're right that keywords usually aren't a problem because of generic
: identifier rules. I picked them as an example because they show how
: backing up works clearly. The sorts of rules that cause problems are
: string constants, escape sequences, floating point representations, and
: multi-character operators.
Dr Adrian Johnstone, Dean of the Science Faculty, Dept of Computer Science,
Royal Holloway, University of London, Egham, Surrey, TW20 0EX, England.
Email: firstname.lastname@example.org Tel: +44 (0)1784 443425 Fax: +44 (0)1784 443420
[I think it may actually have been me, as I attempted to untangle umpteen
layers of quoting. Sorry about that. -John]
Return to the
Search the comp.compilers archives again.