Cisco Interview Question

Pseudocode to detect if an arithmetic expression (with operators and variables) is valid