Hi,
This is more a regexp question rather than TextMate so it is a bit OT, but I'll try anyway since I know that there are som clever regexp heads on this list...
I'm trying to figure out a way to parse a string with an expression, so that I can filter out subexpressions to build up a structure of expression objects.
An example expression: ((print == MIB) >> (color == Black));
Our expression structure is built up so that everything is an expression with a recursive structure (Expression = expression operator expression): ((print == MIB) >> (color == Black)); (print == MIB) (color == Black) print MIB color Black
Additionally, from this list, each variable is also an expression (print, MIB, ...)
I guess that some regexp magic would be some great tool here, but I can't seem to figure out the correct approach, and thus need some starter help.
Any idea of how to approach this? Programming language shouldn't matter, since it anyway would be some recursive structure to dig down the structure, but for reference I can say that I'm using C#.