Java math expression parser that can take complex numbers as a variable?

后端 未结 7 944
广开言路
广开言路 2021-01-21 10:58

I am writing a program in Processing that transforms complex numbers. However, I want to have a method of taking an input string and calculating the transformation using a compl

7条回答
  •  感动是毒
    2021-01-21 11:44

    I would (and have, actually) manually make a parse table and use a simple LR or LALR parser to process it. At a reduction, you can perform the calculations. One advantage to this is that it is easy to modify the "language", or acceptable input.

提交回复
热议问题