Well, I'm thinking of a simple syntax tree that would fit on a one-liner? For
the first cut, I think I'll ignore unary operators and just accommodate numeric
integer literals for addition, subtraction, multiplication and division.
Later we can add variables, unary operators, functions like log10,
Hello siegried,
This is a fun question! In fact, v5.10 introduced "recursive subpatterns"
into the regex lexicon, so using v5.10 or later, it is possible to
implement (rather arcane) recursive descent regexes without resorting to
eval-based tricks like what you have.
But before diving in, a few q