Related articles |
---|
[7 earlier articles] |
Re: what scanner scheme is efficient? james@wgold.demon.co.uk (James Mansion) (1996-10-24) |
Re: what scanner scheme is efficient? jlilley@empathy.com (1996-10-30) |
Re: what scanner scheme is efficient? vern@daffy.ee.lbl.gov (1996-11-12) |
Re: what scanner scheme is efficient? jlilley@empathy.com (1996-11-15) |
Re: what scanner scheme is efficient? adrian@dcs.rhbnc.ac.uk (1996-11-19) |
Re: what scanner scheme is efficient? vern@daffy.ee.lbl.gov (1996-11-21) |
Re: what scanner scheme is efficient? adrian@dcs.rhbnc.ac.uk (1996-11-24) |
Re: what scanner scheme is efficient? jlilley@empathy.com (1996-12-01) |
From: | adrian@dcs.rhbnc.ac.uk (A Johnstone) |
Newsgroups: | comp.compilers |
Date: | 24 Nov 1996 16:20:29 -0500 |
Organization: | Royal Holloway, University of London |
References: | 96-10-076 96-11-123 96-11-141 |
Keywords: | administrivia |
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'.
Adrian
Vern Paxson (vern@daffy.ee.lbl.gov) wrote:
: John Lilley (jlilley@empathy.com) 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 <adrian@dcs.rhbnc.ac.uk> 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.
: Vern
--
Dr Adrian Johnstone, Dean of the Science Faculty, Dept of Computer Science,
Royal Holloway, University of London, Egham, Surrey, TW20 0EX, England.
Email: adrian@dcs.rhbnc.ac.uk 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
comp.compilers page.
Search the
comp.compilers archives again.