Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #68361

PEP/GSoC idea: built-in parser generator module for Python?

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <pmawhorter@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'syntax': 0.04; 'third-party': 0.04; 'subject:Python': 0.06; 'parser': 0.07; 'plenty': 0.07; 'subject:PEP': 0.07; 'though:': 0.07; 'builtin': 0.09; 'e.g.,': 0.09; 'generators': 0.09; 'parsing': 0.09; 'seemed': 0.09; 'subject:GSoC': 0.09; 'subject:module': 0.09; 'python': 0.11; 'mostly': 0.14; 'idea:': 0.16; 'programing': 0.16; 'pythonic': 0.16; 'relates': 0.16; 'subject:generator': 0.16; 'subject:parser': 0.16; 'task.': 0.16; 'student': 0.16; 'language': 0.16; 'library': 0.18; 'looked': 0.18; 'all,': 0.19; 'bit': 0.19; 'module': 0.19; 'everyone,': 0.19; 'written': 0.21; 'seems': 0.21; 'integrate': 0.24; 'module,': 0.24; "i've": 0.25; 'developers': 0.25; '(see': 0.26; 'subject:/': 0.26; 'point': 0.28; '[1]': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'serve': 0.31; 'towards': 0.31; 'integrating': 0.31; 'libraries': 0.31; 'waters': 0.31; 'probably': 0.32; 'figure': 0.32; 'another': 0.32; 'worked': 0.33; 'community': 0.33; 'problem': 0.35; 'something': 0.35; "who's": 0.35; 'test': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'building': 0.35; 'there': 0.35; 'module.': 0.36; "didn't": 0.36; 'subject:?': 0.36; 'should': 0.36; 'so,': 0.37; 'turn': 0.37; 'project': 0.37; 'list.': 0.37; 'feedback': 0.38; 'tasks': 0.38; 'needed': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; 'rather': 0.38; 'embedded': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'extended': 0.61; 'new': 0.61; 'providing': 0.61; 'first': 0.61; 'kind': 0.63; 'pick': 0.64; 'more': 0.64; 'different': 0.65; 'specialized': 0.65; 'contact': 0.67; 'route': 0.84; "they'd": 0.84; 'imagine': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=U6JgDXmPYrziJDZ3FCbEYW9RF3kns2ajf/Z3uoUBhdY=; b=xSsUp58jjfbM5f4dQwN2NxU6aUO4AW4WSfcElX7ZTTnItMPz9spHZwyq4UDJleYUyz pnzHiyT3MLLYE+1vtG3/vxiL/V70vS6eeuVGaL5sorfQje2JPazB+VUtLpTsLDbBPgGf YyNLbsWtEqnpIiU4N1WDNbH8oUP0yaVMPt9dj2waT6cDG7GfFf8Rz31Ngtc2sE6KpwYo Uv5bwGhh4Mwo7N1hrN3ULtzdR5cCghnGN2S5AhQfwTI1vsBFgxWZP6ka8YjvOEyYdH0D jTlrJwciWQ5G7j+ADx27aEV3ZlVaxbXcu+GO1QQekexnXax5aIRScf9dfh1o+8zk0BRC S0lg==
X-Received by 10.58.229.4 with SMTP id sm4mr7798705vec.10.1394823104990; Fri, 14 Mar 2014 11:51:44 -0700 (PDT)
MIME-Version 1.0
From Peter Mawhorter <pmawhorter@gmail.com>
Date Fri, 14 Mar 2014 11:51:14 -0700
Subject PEP/GSoC idea: built-in parser generator module for Python?
To python-list@python.org
Content-Type text/plain; charset=UTF-8
X-Mailman-Approved-At Fri, 14 Mar 2014 20:17:53 +0100
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.8152.1394824673.18130.python-list@python.org> (permalink)
Lines 44
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1394824673 news.xs4all.nl 2903 [2001:888:2000:d::a6]:58364
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:68361

Show key headers only | View raw


First of all, hi everyone, I'm new to this list.

I'm a grad student who's worked on and off with Python on various
projects for 8ish years now. I recently wanted to construct a parser
for another programing language in Python and was dissapointed that
Python doesn't have a built-in module for building parsers, which
seems like a common-enough task. There are plenty of different
3rd-party parsing libraries available, specialized in lots of
different ways (see e.g., [1]). I happened to pick one that seemed
suitable for my needs but didn't turn out to support the recursive
structures that I needed to parse. Rather than pick a different one I
just built my own parser generator module, and used that to build my
parser: problem solved.

It would have been much nicer if there were a fully-featured builtin
parser generator module in Python, however, and the purpose of this
email is to test the waters a bit: is this something that other people
in the Python community would be interested in? I imagine the route to
providing a built-in parser generator module would be to first canvass
the community to figure out what third-party libraries they use, and
then contact the developers of some of the top libraries to see if
they'd be happy integrating as a built-in module. At that point
someone would need to work to integrate the chosen third-party library
as a built-in module (ideally with its developers).

>From what I've looked at PyParsing and PLY seem to be standout parser
generators for Python, PyParsing has a bit more Pythonic syntax from
what I've seen. One important issue would be speed though: an
implementation mostly written in C for low-level parsing tasks would
probably be much preferrable to one written in pure Python, since a
builtin module should be geared towards efficiency, but I don't
actually know exactly how that would work (I've both extended and
embedded Python with/in C before, but I'm not sure how that kind of
project relates to writing a built-in module in C).

Sorry if this is a bit rambly, but I'm interested in feedback from the
community on this idea: is a builtin parser generator module
desirable? If so, would integrating PyParsing as a builtin module be a
good solution? What 3rd-party parsing module do you think would serve
best for this purpose?

-Peter Mawhorter

[1] http://nedbatchelder.com/text/python-parsers.html

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

PEP/GSoC idea: built-in parser generator module for Python? Peter Mawhorter <pmawhorter@gmail.com> - 2014-03-14 11:51 -0700

csiph-web