Skip to main content

Emacs Lisp parser

Project description

A simple package to parse Emacs Lisp expressions from Python.

https://secure.travis-ci.org/jorgenschaefer/python-elisp.png?branch=master https://coveralls.io/repos/jorgenschaefer/python-elisp/badge.png?branch=master

Simple Usage

>>> import elisp
>>> numbers = elisp.loads("(1 2 3)")
>>> numbers.car
1
>>> numbers.cdr.cdr.car
3
>>> numbers.cdr.cdr.cdr is elisp.NIL
True

Type Mappings

The following types are supported and are mapped to the respective Python types.

  • integer to int
  • float to float
  • symbol to elisp.ELispSymbol, a subclass of str
  • list, cons to elisp.ELispCons
  • unibyte string to bytearray
  • multibyte string to unicode (without the \C-a syntax)
  • vector to list

Unsupported Types

The following types are not supported:

  • Characters (like ?a or ?\C-f)
  • Char-Table
  • Bool-Vector
  • Hash Table
  • Byte-Code

Grammar

See the file [elisp.ebnf](elisp/elisp.ebnf) for the grammar used by this package.

Project details


Release history Release notifications | RSS feed

This version

0.5

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for elisp, version 0.5
Filename, size File type Python version Upload date Hashes
Filename, size elisp-0.5-py2-none-any.whl (6.7 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size elisp-0.5.tar.gz (7.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page