[Biopython-dev] flex, setup.py and Bio.PDB.mmCIF (Bug 2619)

Michiel de Hoon mjldehoon at yahoo.com
Sat Feb 16 02:46:00 UTC 2013


Hi Lenna,

Maybe we are confusing each other..
I am looking for a solution that (a) doesn't introduce new dependencies, (b) is pure-Python so it can run on Jython, and (c) if that is not possible and we do need to use C, then that C code should be understandable so that it can be debugged if necessary.

I was suggesting to clean up lex.yy.c so that we can at least achieve (c). The alternative is to start from the PLY-based parser and remove the dependency on PLY.

Best,
-Michiel.

--- On Thu, 2/14/13, Lenna Peterson <arklenna at gmail.com> wrote:

> From: Lenna Peterson <arklenna at gmail.com>
> Subject: Re: [Biopython-dev] flex, setup.py and Bio.PDB.mmCIF (Bug 2619)
> To: "BioPython-Dev Mailing List" <biopython-dev at biopython.org>
> Date: Thursday, February 14, 2013, 2:52 PM
> On Sat, Feb 9, 2013 at 10:55 PM,
> Michiel de Hoon <mjldehoon at yahoo.com>wrote:
> 
> >
> >
> > Currently lex.yy.c contains lots of code that is
> generated automatically
> > by lex but is not actually needed for the mmCIF parser.
> I was thinking to
> > remove those parts, and to clean up the remainder so
> that the code is
> > understandable (allowing us to fix any bugs, or to
> convert it to pure
> > Python).
> >
> 
> Whoops, failed to reply all. Sorry for the double email,
> Michiel.
> 
> ---
> 
> But generated C is by definition not understandable or
> debuggable. The only
> function of lex.yy.c is to tokenize the mmCIF input.
> 
> All of the communication to Python is handled by
> MMCIFlexmodule.c, which is
> 70 lines and a header with 3 statements. In parallel to the
> PLY version, I
> rewrote the C to be object-oriented, which pushed it to 101
> lines.
> 
> Cheers,
> 
> Lenna
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython-dev
> 



More information about the Biopython-dev mailing list