By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,714 Members | 750 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,714 IT Pros & Developers. It's quick & easy.

Parsers with Python

P: n/a
Greetings all,

I am a new subscriber to this list, and a novice Python user. Is this the
correct place to ask for advice on Python-programming?

I want to write a parser for BibTeX. A BibTeX file is a collection of
entries that look like this:

@book {Daniel04,
title = "My Title",
publisher = {Some publisher Inc.},
volume = 2,
year = 2004
}
Can anyone recommend a parser generator for Python? I have been
programming for a few years, but I have never made a parser. I only have
a vague notion of what a lexer and a grammar are. Is there a resource
that you might recommend?

Thanks you for your time.

Cheers,
--
Daniel Carrera | No trees were harmed in the generation of this e-mail.
PhD student. | A significant number of electrons were, however, severely
Math Dept. UMD | inconvenienced.
Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
JCM
Daniel Carrera <dc******@math.umd.edu> wrote:
....
Can anyone recommend a parser generator for Python? I have been
programming for a few years, but I have never made a parser. I only have
a vague notion of what a lexer and a grammar are. Is there a resource
that you might recommend?


I've had good luck with PLY (http://systems.cs.uchicago.edu/ply/).
Jul 18 '05 #2

P: n/a
On Tue, 17 Feb 2004 10:18:07 -0500,
Daniel Carrera <dc******@math.umd.edu> wrote:
I want to write a parser for BibTeX. A BibTeX file is a collection of
entries that look like this:


You should probably look at Greg Ward's btOOL
(http://www.gerg.ca/software/btOOL/), which includes C and Perl parsers for
BibTeX. Unfortunately the software predates Greg's use of Python, so
there's no Python support.

--amk
Jul 18 '05 #3

P: n/a

On Tue, 17 Feb 2004 10:18:07 -0500,
Daniel Carrera <dc******@math.umd.edu> wrote:
I want to write a parser for BibTeX. A BibTeX file is a collection of
entries that look like this:

The cl-bibtex project implements readers and writers for BibTeX formatted
files in Common Lisp, which is a closer to Python than C or Perl:

http://savannah.nongnu.org/projects/cl-bibtex/

Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.