• Stars
    star
    304
  • Rank 132,147 (Top 3 %)
  • Language
    Erlang
  • License
    MIT License
  • Created almost 15 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Erlang library and packrat parser-generator for parsing expression grammars.

Neotoma

About

Neotoma is a packrat parser-generator for Erlang for Parsing Expression Grammars (PEGs).
It consists of a parsing-combinator library with memoization routines, a parser for PEGs,
and a utility to generate parsers from PEGs. It is inspired by treetop, a Ruby library with
similar aims, and parsec, the parser-combinator library for Haskell.

Neotoma is licensed under the MIT License (see LICENSE).

Features

  1. Simple, declarative parsers generated from even simpler grammars.
  2. Fully integrated, single-pass lexical and syntactic analysis (a feature of PEGs).
  3. Packrat-style memoization, boasting parse-time bound linearly to the input size (at the expense of memory usage).
  4. In-place semantic analysis/transformation, supporting single-pass end-to-end in some applications.
  5. Erlang code-generation for the lexical/syntactic analysis piece, with the option of semantic analysis/transformation inline, or in a separate module.
  6. Line/column number tracking for easy resolution of parsing errors.

Installation

  1. Clone the repository from github:
    $ git clone git://github.com/seancribbs/neotoma.git
  2. Symlink or copy the cloned repository to somewhere in your Erlang code path. $ERLANG_HOME/lib is best.
  3. Build the source:
    $ make

Usage

  1. After making sure the library is in your code path, fire up an Erlang shell.
  2. To generate a parser from a PEG, use neotoma:file/1,2 (more detailed documentation pending). For PEG examples, see the extra/ directory in the repository.
1> neotoma:file("extra/arithmetic.peg").
This will place arithmetic.erl in the same directory as the .peg file by default.

Contributing

Please send pull-requests to โ€˜seancribbsโ€™ on github. When submitting a patch, eunit tests are strongly encouraged.

More Repositories

1

riak_id

A clone of Twitter's Snowflake, built on riak_core
Erlang
104
star
2

eunit_formatters

Because eunit's output sucks. Let's make it better.
Erlang
69
star
3

yakriak

A Riak-powered Ajax-polling chatroom. Not for production use!
JavaScript
37
star
4

riak-url-shortener

A sample Riak + Ruby app, written with Sinatra and riak-client.
Ruby
37
star
5

hardhat

An opinionated, production-ready HTTP client for Elixir services
Elixir
30
star
6

datalog-elixir

Naively-evaluated Datalog, implemented in Elixir
Elixir
29
star
7

riak_zmq

Publish writes to Riak KV to 0MQ (based on linked gist)
Erlang
22
star
8

restful_workflow

A Rails plugin to implement interview-style workflows in a controller.
Ruby
21
star
9

nanocompiler

A nanopass-style compiler in Elixir, targeting BEAM, based on https://github.com/compilers-course-materials/
Elixir
15
star
10

paxos

Multi-Paxos for Erlang, based on "Paxos Made Moderately Complex" [PROTOTYPE]
Erlang
13
star
11

radiant-templates-extension

NO LONGER MAINTAINED. See http://github.com/avonderluft/radiant-templates-extension
Ruby
13
star
12

strangeloop-riak-mapred

Slides from Strange Loop 2011 - "Wrap Your SQL Head around Riak MapReduce"
JavaScript
12
star
13

edn-erlang

edn for Erlang
Erlang
12
star
14

survivors-game

A survivors/rogue-like game written in Rust using the Bevy engine
Rust
11
star
15

radiant-banner-rotator-extension

NO LONGER MAINTAINED. Use http://github.com/avonderluft/radiant-banner-rotator-extension
Ruby
11
star
16

radiant-feed-reader-extension

An extension for Radiant CMS that lets you display RSS/Atom/Feedburner feeds in a page, using Paul Dix's FeedZirra library.
Ruby
11
star
17

riak-sessions

Rails/Rack Session stores for Riak (formerly "ripple/riak-sessions")
Ruby
11
star
18

sedate

Story-Driven Acceptance Testing for Erlang (a Cucumber clone)
Erlang
10
star
19

twitterl

Erlang bindings for everybody's favorite webservice, Twitter.
Erlang
10
star
20

rqc

An implementation of QuickCheck in Ruby (NOT FUNCTIONING)
Ruby
8
star
21

swedish_chef

A re-implementation of the Chef server API in Erlang.
Erlang
8
star
22

webmachine-tutorial

WM Tutorial for LambdaJam
Erlang
7
star
23

rubyconf-webmachine

Slides from RubyConf 2011 - "Resources, For Real This Time"
Ruby
7
star
24

bbuzz-riak-mapred

Slides from Berlin Buzzwords 2011 - "Wrap Your SQL Head around Riak MapReduce"
JavaScript
6
star
25

weewar

Ruby bindings for the Weewar API
Ruby
6
star
26

radiant-atom-import-extension

Imports Atom feeds into a standard blog layout in Radiant.
Ruby
5
star
27

riak-cache

riak-cache is an ActiveSupport::Cache::Store that is backed by Riak. (previously part of "seancribbs/ripple")
Ruby
5
star
28

pwl-chicago-1

Presentation sources given at the first Papers We Love Chicago
TeX
4
star
29

riak-qc.js

Test Riak map and reduce functions in Javascript, in a QuickCheck style
JavaScript
4
star
30

codehighlighter-languages

Extra or modified languages for Dan Webb's CodeHighlighter.js
JavaScript
4
star
31

ex-tree-sitter

Experimental Elixir bindings (NIFs) to the tree-sitter library
Rust
4
star
32

beamruby

Basic Erlang NIF linking to mruby (EXPERIMENTAL)
C
3
star
33

riak-apps-jsconf2011

Presentation slides for JSConf 2011
Shell
3
star
34

restfest-todos

RESTfest hackday app
Erlang
2
star
35

wm-stack

Batteries-Included Webmachine Project Template (WIP)
Shell
2
star
36

ctf

Elixir
2
star
37

prodigy

The seed of some remote automation for SmartOS
Ruby
1
star
38

hashtypes

Port of Elixir's HashDict and HashSet to plain Erlang.
Erlang
1
star
39

devise-ripple

An ORM strategy to use Devise with Riak
Ruby
1
star
40

datalog-rust

An implementation of naively-evaluated Datalog, in Rust
Rust
1
star
41

crafting-interpreters

An implementation in Rust of the "Lox" language from Crafting Interpreters by Robert Nystrom
Rust
1
star