developerWorks: A Look at DParser for Python | Linux Today

developerWorks: A Look at DParser for Python

Written By
Web Webster
Web Webster
Aug 12, 2004

“There are many Python parser libraries available. I have
discussed mx.TextTools, SimpleParse, and SPARK in this column and
covered PLY in my book (see Resources for links to these
documents). Offhand, I know of PyGgy, Yapps, PLEX, PyLR, PyParsing,
and TPG, and I have vague recollections of reading announcements of
a half dozen others. This is a category where users might be
frustrated, not by the dearth, but by the glut of high quality
libraries.

“What distinguishes DParser from all the others? Well, like PLY
and Spark, DParser for Python utilizes function documentation
strings to indicate its productions. This style lets you put action
code right inside a production for events that should occur when a
particular grammar rule is fulfilled; the production-in-docstring
style also lets you manipulate parse trees as parsing occurs. In
contrast to PLY or Spark, DParser itself is written in C, and is
thus likely to be considerably faster than pure-Python parsers.
DParser for Python is a fairly thin wrapper around an underlying C
library — callbacks into Python take some extra time, but the
basic parsing is at C speeds. For this article, however, I have not
attempted any specific benchmarks. So exactly how fast or slow
DParser is compared to other parsers is not something I can
directly comment on…”


Complete Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.