I am a Wolfram Language/Mathematica beginner and trying to convert STEP ISO10303 commands into geometrical regions. A simple command looks like
I tried with
String commands to convert it into a valid
ToExpression string like
allowing then to convert it with Rules into geometrical objects.
I managed to get a first prototype running but struggled finding a generic way of converting nested parentheses.
As I am a mediocre Perl programmer I would use the recipe https://stackoverflow.com/questions/4445674/can-i-use-perl-regular-expressions-to-match-balanced-text but I could not find information if Mathematica regex allows using longest match without backtracking and reference to sub-pattern?
Literature says that one either needs recursive regex usage or stack implementation when trying to parse nested objects.
Any help on how to tackle this problem is much appreciated.