Skip to content

Commit

Permalink
Added first readme and license
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Edgar committed Aug 29, 2011
1 parent dc91914 commit 18687e3
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
19 changes: 19 additions & 0 deletions LICENSE
@@ -0,0 +1,19 @@
Copyright (C) <year> by <copyright holders>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Empty file removed README
Empty file.
51 changes: 51 additions & 0 deletions README.md
@@ -0,0 +1,51 @@
Redtree: A Superior Ruby Parser
===============================

**Homepage**: [http://carboni.ca/projects/p/redtree](http://carboni.ca/)
**Git**: [https://github.com/michaeledgar/redtree](http://github.com/michaeledgar/redtree)
**Author**: Michael Edgar
**Copyright**: 2011
**License**: MIT
**Latest Version**: none
**Release Date**: None, yet.

Synopsis
--------

Redtree is a Ruby parser in the spirit of Ripper and Melbourne, but with additional capabilities. It carries with it the entire shift-reduce sequence and token boundaries, so a consumer of a Redtree parse tree knows exactly where each token occurred.

Redtree was borne out of the [Laser](https:/github.com/michaeledgar/laser) project, which needs to be able to rewrite source code token-by-token (including whitespace, a typically ignored token) for proper style-linting. It is also difficult to extract correct line numbers from a Ripper parse tree, and impossible to reliably obtain column numbers from Ripper or Melbourne. Hence: Redtree.

Feature List
------------
Details are always forthcoming, but:

**1. Full Token Information**: Each internal node of the parse tree knows exactly which tokens (or other internal nodes) composed the node's reduction during parsing. Every token is available, including its line/column start and end points.
**2. Comment Nodes**: Attaching comments to nodes is a task required of documentation tools, linters, static analyzers, and so on. Yet no Ruby parser adequately includes comments when necessary.
**3. Compact Representation**: Including this much information is possible with a compact, simple representation. Redtree incorporates this design to minimize its space use.

Installing
----------

To install Redtree, use the following command:

$ gem install redtree --prerelease

(Add `sudo` if you're installing to a directory requiring root privileges to write)

Usage
-----

When it works, I'll add it here. I promise.

Changelog
---------

- **Aug.29.2011**: Project initiated.

Copyright
---------

Redtree &copy; 2011 by [Michael Edgar](mailto:adgar@carboni.ca).
Redtree is licensed under the MIT license. See {file:LICENSE}.

0 comments on commit 18687e3

Please sign in to comment.