I want to make a kind of simple spreadsheet with python.
I need to parse a formula from a string.
All the operations I need for now are: + - * / ^ ()
Formulas will be always starting with '='.
Examples of input:
=4+8-6/2this is simple: just usig eval()
2.=4b+12*(2+5)
where '4b' is a link to another cell in spreadsheet (a variable).
** It's possible to make all the links like 'b4' instead of '4b'
The script would substitute the link (variable) with corresponding value.
What I'm unable to achive is to make parser 'understand' variables like '4b' or 'b4', the rest is pretty simple
What would you suggest?
P.S. I'm new to Python. Tried pyparsing but it's to complicated to use or to correct custom examples according to my needs. Hope to find more simple solution