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.

Source Distribution

elisp-0.5.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

elisp-0.5-py2-none-any.whl (6.7 kB view details)

Uploaded Python 2

File details

Details for the file elisp-0.5.tar.gz.

File metadata

  • Download URL: elisp-0.5.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for elisp-0.5.tar.gz
Algorithm Hash digest
SHA256 cc75dfbf980e53e230caddc60c52491fedd6e064ac85007d54c3d9d1ce1b5b95
MD5 ea7f98815a42bac48c16c4379b9a6d3b
BLAKE2b-256 d7c213ba98ca144612bd145c3fc365d5f983123b89f6fddece6e629e7081693e

See more details on using hashes here.

File details

Details for the file elisp-0.5-py2-none-any.whl.

File metadata

File hashes

Hashes for elisp-0.5-py2-none-any.whl
Algorithm Hash digest
SHA256 3e2cbd38260dbbc4622786e1f743d06c04a03a9e6e45287a7928d1c56139f317
MD5 de6aaa01d74a50a9f60b3eb2ac10281a
BLAKE2b-256 ac03a1e503483b97a20767805887528e6e1ed5212e080103860d294667013081

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page