Parsers with Python

Discussion in 'Python' started by Daniel Carrera, Feb 17, 2004.

  1. 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.
     
    Daniel Carrera, Feb 17, 2004
    #1
    1. Advertising

  2. Daniel Carrera

    JCM Guest

    Daniel Carrera <> 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/).
     
    JCM, Feb 17, 2004
    #2
    1. Advertising

  3. On Tue, 17 Feb 2004 10:18:07 -0500,
    Daniel Carrera <> 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
     
    A.M. Kuchling, Feb 17, 2004
    #3
  4. On Tue, 17 Feb 2004 10:18:07 -0500,
    Daniel Carrera <> 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/
     
    Robert E. Brown, Feb 18, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John J. Lee
    Replies:
    3
    Views:
    926
    John J. Lee
    Jun 26, 2003
  2. Paul McGuire
    Replies:
    0
    Views:
    302
    Paul McGuire
    Dec 16, 2003
  3. bio_enthusiast
    Replies:
    5
    Views:
    441
    Ramon Diaz-Uriarte
    Aug 26, 2006
  4. eliben
    Replies:
    0
    Views:
    332
    eliben
    Feb 14, 2009
  5. Peng Yu

    Comparison of parsers in python?

    Peng Yu, Sep 19, 2009, in forum: Python
    Replies:
    24
    Views:
    1,875
    andrew cooke
    Sep 26, 2009
Loading...

Share This Page