Evaluating Mathematical Expressions using Lua

前端 未结 5 531
不知归路
不知归路 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:51

    The Lua documentation contains a section titled The Application Programming Interface which describes how to call Lua from your C program. The documentation for Lua is very good and you may even be able to find an example of what you want to do in there.

    It's a big world in there, so whether you choose your own parsing solution or an embeddable interpreter like Lua, you're going to have some work to do!

提交回复
热议问题