mjackson / citrus

Parsing Expressions for Ruby
http://mjackson.github.io/citrus
405 stars 28 forks source link

A way to pass context to grammar/rules #54

Open clamoris opened 9 years ago

clamoris commented 9 years ago

I want to parse and compute a formula using Citrus, but there is a problem - exact values contained in a different object. Obvious way to deal with it is to pass a context to parser, but I do not see a way to do that in current version.

How could I achieve my goal? Thanks.

clamoris commented 9 years ago

Well, if anybody also struggles with this, here's my workaround https://gist.github.com/clamoris/769c0808b991e911873f