Question

I 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 ) ?

Was it helpful?

Solution

You might check out Lispy: https://github.com/ryan-allen/lispy

It's no quite s-expressions, but similar in concept..

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top