python LEX
Mike Meyer
mwm at mired.org
Fri Apr 22 02:05:21 EDT 2005
Miki Tebeka <miki.tebeka at zoran.com> writes:
> Hello jozo,
>
>> I have to work on python lexical definition in Lex. I spent lots of my
>> time to find regular expresions written for Lex of Python language but
>> nothing.
>> Can somebody help me?
> http://www.antlr.org/grammar/list (search for Python)
>
> You can search in projects like Pyrex and Parrot for their parser
> implementation.
The python grammar is included with the Python sources, and is used
to build the compiler.
> HTH.
Trouble is, he wants a lexer, not a parser. The lexer in the sources
is an ad-hoc package, contained in Parser/tokenizer.c.
<mike
--
Mike Meyer <mwm at mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
More information about the Python-list
mailing list