Hi,
For one part of a large project, I need to parse math and turn the
"mathematical objects" into a C++ abstraction of them. Is it possible that
a nested pattern hold semantic values within itself and can be queried for
that value somehow? As if a match were a function of its sub-patterns'
matches, if that makes sense...
Code might speak better than my english:
class math_number {...};
class math_addition {...};
class math_arglist {...};
class math_funcdef {...};
sregex integer = (s1= +_d)
[ return math_number( as<int>(s1) ) ];
sregex addition = (s1= integer) >> '+' >> (s2= integer)
[ return math_addition( as