New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce proper parsing of math expressions in config files #29

Open
doudou opened this Issue Nov 13, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@doudou
Copy link
Member

doudou commented Nov 13, 2014

We should aim at allowing math expressions in config files without resorting to eval(). eval() is horribly dangerous and yukky.

The general scheme would IMO be:

  • if the target type is numeric and
  • the YAML-parsed type is a string
  • then parse the string

Convenience unit operators (5.deg, 22.mm, 1.bar) should be added to the parser.

Ready-to-use math expression parsers are already available as gems. Or, I always wanted to try treetop/parslet to see what they could do.

@doudou doudou added the enhancement label Nov 13, 2014

@jakobs

This comment has been minimized.

Copy link
Member

jakobs commented Jan 15, 2015

sounds good. especially for using things like Math::PI * 0.5, a.s.o.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment