flex/bison like module in Python?

J

Jerry Sievers

Dear Pythonists;

Curious if there exists in Python package(s) for use as lexer/parser
for implementation of language grammars?

Already using cmd.py from the standard distro for it's basic features
but wishing for much more advanced capability. As such, I refer to
flex/bison because though complex they are general purpose and very
useful.

I am trying to avoid having to do the lexer/parser part in C if
possible.

Thanks.
 
P

Paul McGuire

Jerry Sievers said:
Dear Pythonists;

Curious if there exists in Python package(s) for use as lexer/parser
for implementation of language grammars?

Already using cmd.py from the standard distro for it's basic features
but wishing for much more advanced capability. As such, I refer to
flex/bison because though complex they are general purpose and very
useful.

I am trying to avoid having to do the lexer/parser part in C if
possible.

Thanks.

Check out this page from the Python Wiki:
http://www.python.org/moin/LanguageParsing

(although I'm partial to pyparsing, myself...)

-- Paul
 
J

Jean Brouwers

For command line parsing, take a look at the shlex module, also in the
standard distro. It may fit your requirements for additional
functionality beyond cmd.

/Jean Brouwers

PS) We use SimpleParse/mxTextTools for parsing large log files, both
are listed on the web page mentioned below. In addition, check out
David Mertz' web pages 'Text Processing in Python' at

<http://gnosis.cx/TPiP/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top