[Python-Dev] Python keywords (was Lockstep iteration - eureka!)
Peter Schneider-Kamp
nowonder@nowonder.de
Fri, 11 Aug 2000 23:48:20 +0000
Bill Tutt wrote:
>
> This is an alternative approach that we should certainly consider. We could
> use ANTLR (www.antlr.org) as our parser generator, and have it generate Java
> for JPython, and C++ for CPython. This would be a good chunk of work, and
> it's something I really don't have time to pursue. I don't even have time to
> pursue the idea about moving keyword recognition into the lexer.
<disclaimer val="I have only used ANTLR to generate Java code and not
for
a parser but for a Java source code checker that tries to catch
possible
runtime errors.">
ANTLR is a great tool. Unfortunately - although trying hard to change
it this morning in order to suppress keyword lookup in certain places -
I don't know anything about the interface between Python and its
parser. Is there some documentation on that (or can some divine deity
guide me with a few hints where to look in Parser/*)?
> I'm just not sure if you want to bother introducing C++ into the Python
> codebase solely to only have one parser for CPython and JPython.
Which compilers/platforms would this affect? VC++/Windows
won't be a problem, I guess; gcc mostly comes with g++,
but not always as a default. Probably more problematic.
don't-know-about-VMS-and-stuff-ly y'rs
Peter
--
Peter Schneider-Kamp ++47-7388-7331
Herman Krags veg 51-11 mailto:peter@schneider-kamp.de
N-7050 Trondheim http://schneider-kamp.de