A generalized parser for C-style expressions