I've been trying to press the limits of s/// and regexs. Is there a way to convert a switch(.)-{case .:-default:} statement to a if(.){-} else if(.) {-} else {-} even with nesting through a/some s/// & regex expressions? In this language the 'default:' clause is required which makes it a bit easier. I've gotten a few examples to work but the nesting is throwing things off.
For example:
switch(trap_generic)
{
case 1:
do stuff
more stuff
switch (varbind1) {
case 'abc':
print stuff
case 'def':
case 'g':
do stuff
default:
# do nothing
}
case 2:
still more stuff
default:
}