Related articles |
---|
what scanner scheme is efficient? lloix@star.spb.ru (1996-10-12) |
Re: what scanner scheme is efficient? peter@bj-ig.de (1996-10-15) |
Re: what scanner scheme is efficient? ramb@primenet.com (Ram Bhamidipaty) (1996-10-16) |
Re: what scanner scheme is efficient? peter@peter.bj-ig.de (Peter Brueckner) (1996-10-18) |
Re: what scanner scheme is efficient? roth@noel.cs.rice.edu (1996-10-20) |
Re: what scanner scheme is efficient? jsgray@acm.org (Jan Gray) (1996-10-20) |
Re: what scanner scheme is efficient? clark@quarry.zk3.dec.com (1996-10-24) |
[8 later articles] |
From: | lloix@star.spb.ru |
Newsgroups: | comp.compilers |
Date: | 12 Oct 1996 22:14:13 -0400 |
Organization: | Rcom Company Ltd. St-Petersburg. |
Keywords: | lex, question |
Hello
I'm new in this newsgroup, so excuse me please if this topic was
discussed already.
For some parsing purposes I've implemented a scanner framework. For
keywords it uses an external lookup table, and keywords are matched
when the scanner forms an identifier. Lookup table is a fast access
class for strings. All was perfect with C++ but now I start work with
Delphi with its case-insensitive keywords and have to "strcmpi"
instead of "strcmp". I realize that this keywords can be incorporated
into the scanner transition table. But back to C++, consider the
Borland dialect with its numerous "_far", "__far", and tens of other
additional keywords. I estimate the size of transition table to be
approx 500 states.
Thus the question is simple, how do professionals design their scanners
and tables, what do they do with keywords, and what is the more effective
approach?
best wishes, Michael Gerasimov, programmer at STAR SPb Russia
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.