rewrited function routines from syntax.c, function.c, syn_tree.c