A recursive descent expression parser/evaluator should be pretty easy to do. If you have a grammar without left recursion you can translate it pretty directly into simple python code. The same wiki page has an example grammar of which a subset is expressions and the necessary C code to implement expression parsing. (Though I wouldn't recommend a direct translation of that code -- it looks pretty old-school what with global state, etc.)
Tokenization is easily handled with regexes. (A simple dictionary of regex->token type should work ok for a simple expression language.)
Tokenization is easily handled with regexes. (A simple dictionary of regex->token type should work ok for a simple expression language.)
Comment