Walrus
Walrus is a free Object-Oriented templating engine written in Ruby and licensed under the GPL. Plain text templates are compiled down to Ruby code; final output is produced by executing ("filling") the compiled templates. A walrus commandline tool is included to make compiling and filling templates easy. Walrus includes a sophisticated parser generator that can make packrat parsers capable of recognizing Parsing Expression Grammars (including grammars that include left-recursion), and outputting arbitrarily complex Abstract Syntax Trees.
Walrus was inspired by the Cheetah template engine written in Python.
For more information about Walrus see these articles published during its development:
- "Test-Driven Development"
- "Progress notes"
- "Abstract Syntax Trees"
- "Putting the 'packrat' into PEG: adding memoizing to my Ruby parser generator"
- "Updated packrat performance numbers"
- "Parser generator update"
- "Another performance update: parity"
- "Here documents"
- "Goodbye parity, hello superiority"
- "Payoff time"
Donations
Walrus is free software released under the GPL license.
Downloading from RubyForge
See the RubyForge file listing.
To install using RubyGems:
sudo gem install walrus
Obtaining via Git
git clone git://git.wincent.dev/Walrus.git
Building from source
Before using Walrus you must build the C extensions upon which it depends; you can do this from inside the root of the source tree by executing the following:
rake make
You can run the specs by doing the following:
rake spec