Use ultraviolet1x
This repo is deprecated/unmaintained, please use ultraviolet1x -- ultraviolet for ruby 1.8 + ruby 1.9
- less hacky
- less duplication
- more syntaxes
UltraPowList
Ultraviolet + TextPow for Ruby 1.8 and 1.9 Because all these libs are kind of broken and dont work well on either platform.
If you only need ruby 1.9, simply go with spox-ultraviolet
.
(which will load spox-plist, a slightly outdated plist flavor)
Install
gem install ultra_pow_list
Ruby 1.8 ?
Install oniguruma
# Ubuntu
sudo apt-get -y install libonig-dev
gem install oniguruma
# OsX (no idea if this works...)
port install oniguruma4
Usage
# make all 3 libs loadable
UltraPowList.make_loadable
# or separate
UltraPowList.make_loadable 'plist'
# ... whatever you want to do with these libs ...
# to html
require 'textpow'
require 'uv'
puts Uv.syntaxes.join( ", " )
# analyse syntax
language = 'ruby'
syntax = File.join(Uv.path.first,'uv', 'syntax',"#{language}.syntax")
syntax = Textpow::SyntaxNode.load(syntax)
processor = Textpow::DebugProcessor.new
puts result = syntax.parse( "class Foo\n def xxx;end\nend", processor )
TODO
- tests e.g. copy from the original repos
Author
This is basially only code extracted from Kitabu by Nando Vieira
Michael Grosser
michael@grosser.it
Hereby placed under public domain, do what you want, just do not hold me accountable...