flex: plex?
Peter Kleiweg
in.aqua.scribis at nl.invalid
Tue Aug 17 19:39:43 EDT 2004
David M. Cooke schreef:
> If you've been using Flex, you might want to check out FlexModule at
> <http://www.cs.utexas.edu/users/mcguire/software/fbmodule/>
> which allows you to use Flex to generate a lexer callable from python.
I have tried it. (Had to edit the Makefile by hand, because
"make -f Makefile.pre.in boot" did not produce a valid Makefile,
but I did manage to build and run the example.) The problem is,
the Flex file (and Yacc file) is compiled into C, and then into
a shared lib. This means I must use C code in the Flex file.
What I want is something that lets me call arbitrary Python code
from the lexer. Ideal would be to have a version of Flex that
produces a Python file instead of a C file. I have kept looking,
and I think I found what I was looking for: PyLly, which is part
of PyGgy. http://www.lava.net/~newsham/pyggy/
--
Peter Kleiweg L:NL,af,da,de,en,ia,nds,no,sv,(fr,it) S:NL,de,en,(da,ia)
info: http://www.let.rug.nl/~kleiweg/ls.html
More information about the Python-list
mailing list