Looking for tools on Sexp expressions in Ruby [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this questionI am a recent fan of s-exp expressions in Ruby. I discovered Sexpistol parser for instance.
Are you using other dedicated tools around them (schemas etc ) ?
You might check out Lispy: https://github.com/ryan-allen/lispy
It's no quite s-expressions, but similar in concept..
I've been rolling my own handlers for s-expressions in Ruby, but I'm loving the relative ease with which they can be manipulated.
If you haven't seen Ruby's built-in Ripper library yet, it's worth checking out:
> require 'ripper'
> Ripper.sexp("1 + 1")
=> [:program, [[:binary, [:@int, "1", [1, 0]], :+, [:@int, "1", [1, 4]]]]]
The fastest lib available is sfsexp (the small, fast s-expression library). It is written in C with Ruby bindings that you can see in action in the API Doc.
精彩评论