Syntactic parsing and plotting of mathematical expressions