Evaluating Mathematical Expressions using Lua

前端 未结 5 524
不知归路
不知归路 2021-01-18 20:00

In my previous question I was looking for a way of evaulating complex mathematical expressions in C, most of the suggestions required implementing some type of parser.

5条回答
  •  無奈伤痛
    2021-01-18 20:38

    Since you're lazy, like most programmers, here's a link to a simple example that you can use to parse some arbitrary code using Lua. From there, it should be simple to create your expression parser.

提交回复
热议问题