C++ (1, RE OF)
.docx-
Переменные
|
float* (*fp)(float *, int);
$i='([a-z]+[\w]*|_[a-z]+\w*)'; $dm=/^
\ *float\ * (?<eo>(\(\ *)*) # external '(' \*\ * # result type '*' (?<io>(\(\ *)*) # internal '(' (?<fpo>(\(\ *)+) # func ptr '(' \*\ * # func ptr '*' (?<fo>(\(\ *)*) # func '(' $i (?<fc>(\ *\))*) # func '(' (?<fpc>(\ *\))+)\ * # func ptr ')' \(\ * # param list '(' float\ * (?<p1po>(\(\ *)*) # p1 ptr (arr) '(' ( \*\ * # p1 type '*' ( (?<p1o>(\(\ *)*) # p1 '(' (?<p1>$i) (?<p1c>(\ *\))*) # p1 ')' )? | ( ( (?<p1o>(\(\ *)+) # p1 '(' (?<p1>$i) (?<p1c>(\ *\))+) # p1 ')' | \ +(?<p1>$i) ) )?\ * \[\] # p1 '[]' ) (?<p1pc>(\ *\))*)\ * # p1 ptr (arr) ')' ,\ * int\ * ( (?<p2o>(\(\ *)+) # p2 '(' (?<p2>$i) (?<p2c>(\ *\))+) # p2 ')' | \ +(?<p2>$i) )?\ * \) # param list ')' (?<ic>(\ *\))*) # internal ')' (?<ec>(\ *\))*)\ * # external ')' ;\ *
$/x;
$eo=$+{eo}; $io=$+{io}; $fpo=$+{fpo}; $fo=$+{fo}; $fc=$+{fc}; $fpc=$+{fpc}; $p1po=$+{p1po}; $p1o=$+{p1o}; $p1c=$+{p1c}; $p1pc=$+{p1pc}; $p2o=$+{p2o}; $p2c=$+{p2c}; $ic=$+{ic}; $ec=$+{ec};
$eol=0; $eol++ while($eo=~/\(/g); $iol=0; $iol++ while($io=~/\(/g); $fpol=0; $fpol++ while($fpo=~/\(/g); $fol=0; $fol++ while($fo=~/\(/g); $fcl=0; $fcl++ while($fc=~/\)/g); $fpcl=0; $fpcl++ while($fpc=~/\)/g); $p1pol=0; $p1pol++ while($p1po=~/\(/g); $p1ol=0; $p1ol++ while($p1o=~/\(/g); $p1cl=0; $p1cl++ while($p1c=~/\)/g); $p1pcl=0; $p1pcl++ while($p1pc=~/\)/g); $p2ol=0; $p2ol++ while($p2o=~/\(/g); $p2cl=0; $p2cl++ while($p2c=~/\)/g); $icl=0; $icl++ while($ic=~/\)/g); $ecl=0; $ecl++ while($ec=~/\)/g);
$dm && ($eol+($iol+($fpol+($fol-$fcl)-$fpcl)+($p2ol-$p2cl)-$icl)-$ecl==0) && ($p1pol+($p1ol-$p1cl)-$p1pcl==0) && (($+{p1} ne $+{p2}) || ($+{p1} eq '')) |