Rename Bin[ary] to Bitwise (which is the correct name)

This commit is contained in:
nikic 2011-08-11 08:42:28 +02:00
parent 344913d44b
commit 22b507e9f4
12 changed files with 45 additions and 45 deletions

View File

@ -461,9 +461,9 @@ expr:
| variable T_DIV_EQUAL expr { $$ = Expr_AssignDiv [$1, $3]; }
| variable T_CONCAT_EQUAL expr { $$ = Expr_AssignConcat [$1, $3]; }
| variable T_MOD_EQUAL expr { $$ = Expr_AssignMod [$1, $3]; }
| variable T_AND_EQUAL expr { $$ = Expr_AssignBinAnd [$1, $3]; }
| variable T_OR_EQUAL expr { $$ = Expr_AssignBinOr [$1, $3]; }
| variable T_XOR_EQUAL expr { $$ = Expr_AssignBinXor [$1, $3]; }
| variable T_AND_EQUAL expr { $$ = Expr_AssignBitwiseAnd[$1, $3]; }
| variable T_OR_EQUAL expr { $$ = Expr_AssignBitwiseOr [$1, $3]; }
| variable T_XOR_EQUAL expr { $$ = Expr_AssignBitwiseXor[$1, $3]; }
| variable T_SL_EQUAL expr { $$ = Expr_AssignShiftLeft [$1, $3]; }
| variable T_SR_EQUAL expr { $$ = Expr_AssignShiftRight[$1, $3]; }
| variable T_INC { $$ = Expr_PostInc[var: $1]; }
@ -475,9 +475,9 @@ expr:
| expr T_LOGICAL_OR expr { $$ = Expr_LogicalOr[left: $1, right: $3]; }
| expr T_LOGICAL_AND expr { $$ = Expr_LogicalAnd[left: $1, right: $3]; }
| expr T_LOGICAL_XOR expr { $$ = Expr_LogicalXor[left: $1, right: $3]; }
| expr '|' expr { $$ = Expr_BinaryOr[left: $1, right: $3]; }
| expr '&' expr { $$ = Expr_BinaryAnd[left: $1, right: $3]; }
| expr '^' expr { $$ = Expr_BinaryXor[left: $1, right: $3]; }
| expr '|' expr { $$ = Expr_BitwiseOr[left: $1, right: $3]; }
| expr '&' expr { $$ = Expr_BitwiseAnd[left: $1, right: $3]; }
| expr '^' expr { $$ = Expr_BitwiseXor[left: $1, right: $3]; }
| expr '.' expr { $$ = Expr_Concat[left: $1, right: $3]; }
| expr '+' expr { $$ = Expr_Plus[left: $1, right: $3]; }
| expr '-' expr { $$ = Expr_Minus[left: $1, right: $3]; }
@ -489,7 +489,7 @@ expr:
| '+' expr %prec T_INC { $$ = Expr_UnaryPlus[expr: $2]; }
| '-' expr %prec T_INC { $$ = Expr_UnaryMinus[expr: $2]; }
| '!' expr { $$ = Expr_BooleanNot[expr: $2]; }
| '~' expr { $$ = Expr_BinaryNot[expr: $2]; }
| '~' expr { $$ = Expr_BitwiseNot[expr: $2]; }
| expr T_IS_IDENTICAL expr { $$ = Expr_Identical[left: $1, right: $3]; }
| expr T_IS_NOT_IDENTICAL expr { $$ = Expr_NotIdentical[left: $1, right: $3]; }
| expr T_IS_EQUAL expr { $$ = Expr_Equal[left: $1, right: $3]; }

View File

@ -4,10 +4,10 @@
* @property PHPParser_Node_Expr $var Variable
* @property PHPParser_Node_Expr $expr Expression
*/
class PHPParser_Node_Expr_AssignBinOr extends PHPParser_Node_Expr
class PHPParser_Node_Expr_AssignBitwiseAnd extends PHPParser_Node_Expr
{
/**
* Constructs an assignment with binary or node.
* Constructs an assignment with bitwise and node.
*
* @param PHPParser_Node_Expr $var Variable
* @param PHPParser_Node_Expr $expr Expression

View File

@ -4,10 +4,10 @@
* @property PHPParser_Node_Expr $var Variable
* @property PHPParser_Node_Expr $expr Expression
*/
class PHPParser_Node_Expr_AssignBinAnd extends PHPParser_Node_Expr
class PHPParser_Node_Expr_AssignBitwiseOr extends PHPParser_Node_Expr
{
/**
* Constructs an assignment with binary and node.
* Constructs an assignment with bitwise or node.
*
* @param PHPParser_Node_Expr $var Variable
* @param PHPParser_Node_Expr $expr Expression

View File

@ -4,10 +4,10 @@
* @property PHPParser_Node_Expr $var Variable
* @property PHPParser_Node_Expr $expr Expression
*/
class PHPParser_Node_Expr_AssignBinXor extends PHPParser_Node_Expr
class PHPParser_Node_Expr_AssignBitwiseXor extends PHPParser_Node_Expr
{
/**
* Constructs an assignment with binary xor node.
* Constructs an assignment with bitwise xor node.
*
* @param PHPParser_Node_Expr $var Variable
* @param PHPParser_Node_Expr $expr Expression

View File

@ -4,6 +4,6 @@
* @property PHPParser_Node_Expr $left The left hand side expression
* @property PHPParser_Node_Expr $right The right hand side expression
*/
class PHPParser_Node_Expr_BinaryXor extends PHPParser_Node_Expr
class PHPParser_Node_Expr_BitwiseAnd extends PHPParser_Node_Expr
{
}

View File

@ -3,6 +3,6 @@
/**
* @property PHPParser_Node_Expr $expr Expression
*/
class PHPParser_Node_Expr_BinaryNot extends PHPParser_Node_Expr
class PHPParser_Node_Expr_BitwiseNot extends PHPParser_Node_Expr
{
}

View File

@ -4,6 +4,6 @@
* @property PHPParser_Node_Expr $left The left hand side expression
* @property PHPParser_Node_Expr $right The right hand side expression
*/
class PHPParser_Node_Expr_BinaryOr extends PHPParser_Node_Expr
class PHPParser_Node_Expr_BitwiseOr extends PHPParser_Node_Expr
{
}

View File

@ -4,6 +4,6 @@
* @property PHPParser_Node_Expr $left The left hand side expression
* @property PHPParser_Node_Expr $right The right hand side expression
*/
class PHPParser_Node_Expr_BinaryAnd extends PHPParser_Node_Expr
class PHPParser_Node_Expr_BitwiseXor extends PHPParser_Node_Expr
{
}

View File

@ -1671,15 +1671,15 @@ class PHPParser_Parser
}
private function yyn172($line, $docComment) {
$this->yyval = new PHPParser_Node_Expr_AssignBinAnd($this->yyastk[$this->yysp-(3-1)], $this->yyastk[$this->yysp-(3-3)], $line, $docComment);
$this->yyval = new PHPParser_Node_Expr_AssignBitwiseAnd($this->yyastk[$this->yysp-(3-1)], $this->yyastk[$this->yysp-(3-3)], $line, $docComment);
}
private function yyn173($line, $docComment) {
$this->yyval = new PHPParser_Node_Expr_AssignBinOr($this->yyastk[$this->yysp-(3-1)], $this->yyastk[$this->yysp-(3-3)], $line, $docComment);
$this->yyval = new PHPParser_Node_Expr_AssignBitwiseOr($this->yyastk[$this->yysp-(3-1)], $this->yyastk[$this->yysp-(3-3)], $line, $docComment);
}
private function yyn174($line, $docComment) {
$this->yyval = new PHPParser_Node_Expr_AssignBinXor($this->yyastk[$this->yysp-(3-1)], $this->yyastk[$this->yysp-(3-3)], $line, $docComment);
$this->yyval = new PHPParser_Node_Expr_AssignBitwiseXor($this->yyastk[$this->yysp-(3-1)], $this->yyastk[$this->yysp-(3-3)], $line, $docComment);
}
private function yyn175($line, $docComment) {
@ -1727,15 +1727,15 @@ class PHPParser_Parser
}
private function yyn186($line, $docComment) {
$this->yyval = new PHPParser_Node_Expr_BinaryOr(array('left' => $this->yyastk[$this->yysp-(3-1)], 'right' => $this->yyastk[$this->yysp-(3-3)]), $line, $docComment);
$this->yyval = new PHPParser_Node_Expr_BitwiseOr(array('left' => $this->yyastk[$this->yysp-(3-1)], 'right' => $this->yyastk[$this->yysp-(3-3)]), $line, $docComment);
}
private function yyn187($line, $docComment) {
$this->yyval = new PHPParser_Node_Expr_BinaryAnd(array('left' => $this->yyastk[$this->yysp-(3-1)], 'right' => $this->yyastk[$this->yysp-(3-3)]), $line, $docComment);
$this->yyval = new PHPParser_Node_Expr_BitwiseAnd(array('left' => $this->yyastk[$this->yysp-(3-1)], 'right' => $this->yyastk[$this->yysp-(3-3)]), $line, $docComment);
}
private function yyn188($line, $docComment) {
$this->yyval = new PHPParser_Node_Expr_BinaryXor(array('left' => $this->yyastk[$this->yysp-(3-1)], 'right' => $this->yyastk[$this->yysp-(3-3)]), $line, $docComment);
$this->yyval = new PHPParser_Node_Expr_BitwiseXor(array('left' => $this->yyastk[$this->yysp-(3-1)], 'right' => $this->yyastk[$this->yysp-(3-3)]), $line, $docComment);
}
private function yyn189($line, $docComment) {
@ -1783,7 +1783,7 @@ class PHPParser_Parser
}
private function yyn200($line, $docComment) {
$this->yyval = new PHPParser_Node_Expr_BinaryNot(array('expr' => $this->yyastk[$this->yysp-(2-2)]), $line, $docComment);
$this->yyval = new PHPParser_Node_Expr_BitwiseNot(array('expr' => $this->yyastk[$this->yysp-(2-2)]), $line, $docComment);
}
private function yyn201($line, $docComment) {

View File

@ -2068,15 +2068,15 @@ class PHPParser_ParserDebug
}
private function yyn172($line, $docComment) {
$this->yyval = new PHPParser_Node_Expr_AssignBinAnd($this->yyastk[$this->yysp-(3-1)], $this->yyastk[$this->yysp-(3-3)], $line, $docComment);
$this->yyval = new PHPParser_Node_Expr_AssignBitwiseAnd($this->yyastk[$this->yysp-(3-1)], $this->yyastk[$this->yysp-(3-3)], $line, $docComment);
}
private function yyn173($line, $docComment) {
$this->yyval = new PHPParser_Node_Expr_AssignBinOr($this->yyastk[$this->yysp-(3-1)], $this->yyastk[$this->yysp-(3-3)], $line, $docComment);
$this->yyval = new PHPParser_Node_Expr_AssignBitwiseOr($this->yyastk[$this->yysp-(3-1)], $this->yyastk[$this->yysp-(3-3)], $line, $docComment);
}
private function yyn174($line, $docComment) {
$this->yyval = new PHPParser_Node_Expr_AssignBinXor($this->yyastk[$this->yysp-(3-1)], $this->yyastk[$this->yysp-(3-3)], $line, $docComment);
$this->yyval = new PHPParser_Node_Expr_AssignBitwiseXor($this->yyastk[$this->yysp-(3-1)], $this->yyastk[$this->yysp-(3-3)], $line, $docComment);
}
private function yyn175($line, $docComment) {
@ -2124,15 +2124,15 @@ class PHPParser_ParserDebug
}
private function yyn186($line, $docComment) {
$this->yyval = new PHPParser_Node_Expr_BinaryOr(array('left' => $this->yyastk[$this->yysp-(3-1)], 'right' => $this->yyastk[$this->yysp-(3-3)]), $line, $docComment);
$this->yyval = new PHPParser_Node_Expr_BitwiseOr(array('left' => $this->yyastk[$this->yysp-(3-1)], 'right' => $this->yyastk[$this->yysp-(3-3)]), $line, $docComment);
}
private function yyn187($line, $docComment) {
$this->yyval = new PHPParser_Node_Expr_BinaryAnd(array('left' => $this->yyastk[$this->yysp-(3-1)], 'right' => $this->yyastk[$this->yysp-(3-3)]), $line, $docComment);
$this->yyval = new PHPParser_Node_Expr_BitwiseAnd(array('left' => $this->yyastk[$this->yysp-(3-1)], 'right' => $this->yyastk[$this->yysp-(3-3)]), $line, $docComment);
}
private function yyn188($line, $docComment) {
$this->yyval = new PHPParser_Node_Expr_BinaryXor(array('left' => $this->yyastk[$this->yysp-(3-1)], 'right' => $this->yyastk[$this->yysp-(3-3)]), $line, $docComment);
$this->yyval = new PHPParser_Node_Expr_BitwiseXor(array('left' => $this->yyastk[$this->yysp-(3-1)], 'right' => $this->yyastk[$this->yysp-(3-3)]), $line, $docComment);
}
private function yyn189($line, $docComment) {
@ -2180,7 +2180,7 @@ class PHPParser_ParserDebug
}
private function yyn200($line, $docComment) {
$this->yyval = new PHPParser_Node_Expr_BinaryNot(array('expr' => $this->yyastk[$this->yysp-(2-2)]), $line, $docComment);
$this->yyval = new PHPParser_Node_Expr_BitwiseNot(array('expr' => $this->yyastk[$this->yysp-(2-2)]), $line, $docComment);
}
private function yyn201($line, $docComment) {

View File

@ -103,15 +103,15 @@ class PHPParser_PrettyPrinter_Zend extends PHPParser_PrettyPrinterAbstract
return $this->p($node->var) . ' %= ' . $this->p($node->expr);
}
public function pExpr_AssignBinAnd(PHPParser_Node_Expr_AssignBinAnd $node) {
public function pExpr_AssignBitwiseAnd(PHPParser_Node_Expr_AssignBitwiseAnd $node) {
return $this->p($node->var) . ' &= ' . $this->p($node->expr);
}
public function pExpr_AssignBinOr(PHPParser_Node_Expr_AssignBinOr $node) {
public function pExpr_AssignBitwiseOr(PHPParser_Node_Expr_AssignBitwiseOr $node) {
return $this->p($node->var) . ' |= ' . $this->p($node->expr);
}
public function pExpr_AssignBinXor(PHPParser_Node_Expr_AssignBinXor $node) {
public function pExpr_AssignBitwiseXor(PHPParser_Node_Expr_AssignBitwiseXor $node) {
return $this->p($node->var) . ' ^= ' . $this->p($node->expr);
}
@ -170,15 +170,15 @@ class PHPParser_PrettyPrinter_Zend extends PHPParser_PrettyPrinterAbstract
return $this->p($node->left) . ' || ' . $this->p($node->right);
}
public function pExpr_BinaryAnd(PHPParser_Node_Expr_BinaryAnd $node) {
public function pExpr_BitwiseAnd(PHPParser_Node_Expr_BitwiseAnd $node) {
return $this->p($node->left) . ' & ' . $this->p($node->right);
}
public function pExpr_BinaryOr(PHPParser_Node_Expr_BinaryOr $node) {
public function pExpr_BitwiseOr(PHPParser_Node_Expr_BitwiseOr $node) {
return $this->p($node->left) . ' | ' . $this->p($node->right);
}
public function pExpr_BinaryXor(PHPParser_Node_Expr_BinaryXor $node) {
public function pExpr_BitwiseXor(PHPParser_Node_Expr_BitwiseXor $node) {
return $this->p($node->left) . ' ^ ' . $this->p($node->right);
}
@ -244,7 +244,7 @@ class PHPParser_PrettyPrinter_Zend extends PHPParser_PrettyPrinterAbstract
return '!' . $this->p($node->expr);
}
public function pExpr_BinaryNot(PHPParser_Node_Expr_BinaryNot $node) {
public function pExpr_BitwiseNot(PHPParser_Node_Expr_BitwiseNot $node) {
return '~' . $this->p($node->expr);
}

View File

@ -3,7 +3,7 @@
abstract class PHPParser_PrettyPrinterAbstract
{
protected $precedanceMap = array(
'Expr_BinaryNot' => 1,
'Expr_BitwiseNot' => 1,
'Expr_PreInc' => 1,
'Expr_PreDec' => 1,
'Expr_PostInc' => 1,
@ -36,9 +36,9 @@ abstract class PHPParser_PrettyPrinterAbstract
'Expr_NotEqual' => 8,
'Expr_Identical' => 8,
'Expr_NotIdentical' => 8,
'Expr_BinaryAnd' => 9,
'Expr_BinaryXor' => 10,
'Expr_BinaryOr' => 11,
'Expr_BitwiseAnd' => 9,
'Expr_BitwiseXor' => 10,
'Expr_BitwiseOr' => 11,
'Expr_BooleanAnd' => 12,
'Expr_BooleanOr' => 13,
'Expr_Ternary' => 14,
@ -49,9 +49,9 @@ abstract class PHPParser_PrettyPrinterAbstract
'Expr_AssignDiv' => 15,
'Expr_AssignConcat' => 15,
'Expr_AssignMod' => 15,
'Expr_AssignBinaryAnd' => 15,
'Expr_AssignBinaryOr' => 15,
'Expr_AssignBinaryXor' => 15,
'Expr_AssignBitwiseAnd' => 15,
'Expr_AssignBitwiseOr' => 15,
'Expr_AssignBitwiseXor' => 15,
'Expr_AssignShiftLeft' => 15,
'Expr_AssignShiftRight' => 15,
'Expr_LogicalAnd' => 16,