public function priority($operator)
{
$priority = 0;
if ($operator == "&") {
$priority = 2;
}
if ($operator == "~") {
$priority = 3;
}
if ($operator == "|") {
$priority = 1;
}
if ($operator == "(" || $operator == ")") {
$priority = 4;
}
return $priority;
}