467,198 Members | 1,230 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,198 developers. It's quick & easy.

Parsers with Python

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
  • viewed: 1148
Share:
3 Replies
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
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

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.

Similar topics

1 post views Thread by Will Stuyvesant | last post: by
2 posts views Thread by Thomas Guettler | last post: by
2 posts views Thread by Maurice LING | last post: by
reply views Thread by eparker@mail.kickingdragon.com | last post: by
2 posts views Thread by Dale Strickland-Clark | last post: by
2 posts views Thread by dwelch91@gmail.com | last post: by
reply views Thread by JosAH | last post: by
reply views Thread by JosAH | last post: by
1 post views Thread by josh logan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.