/k-infix

Simple but versatile infix parsing for arbitrary expressions. Fully customizable. Comes with basic math expressions implemented.

Primary LanguageRacketOtherNOASSERTION

k-infix

Run raco docs k-infix for in-depth documentation and customization.

(require k-infix)
($ 1 * 2 + 3 - 4)

What about the other infix libraries?

There is infix, but this works on strings, and we would like to be able to work on the AST-level. There is also infix-syntax but it's horribly complicated and terribly documented. I've tried changing that but it becomes too complicated for me.

This package is a very simple extended shunting-yard algorithm that handles n-ary functions, binary, and unary operators, and arbitrary expressions.