D
david
Hi all,
I have an perl expression which i have to examine (not to run).
for example:
($obj->fun1(x,y,z) || ($obj->fun2(x,y,z) && $obj->fun3('a') || ($obj-
.)
My question is how could i parse this expression so that i'll get a
list like this
$obj->fun1(x,y,z),
$obj->fun2(x,y,z)
$obj->fun3('a')
$obj->fun4
$obj->fun5
The hierarchy is less important. I need just the operators.
I fear to use regexps (i know them but i am not a wizard in it)
because in the arguments there could be also parentheses.
What do you think ?
Thanks a lot,
David
I have an perl expression which i have to examine (not to run).
for example:
($obj->fun1(x,y,z) || ($obj->fun2(x,y,z) && $obj->fun3('a') || ($obj-
(Please don't count the number of parenthesesfun4 && $obj->fun5))
My question is how could i parse this expression so that i'll get a
list like this
$obj->fun1(x,y,z),
$obj->fun2(x,y,z)
$obj->fun3('a')
$obj->fun4
$obj->fun5
The hierarchy is less important. I need just the operators.
I fear to use regexps (i know them but i am not a wizard in it)
because in the arguments there could be also parentheses.
What do you think ?
Thanks a lot,
David