if ( $length !== 0 ) {
$token = $this->newNumber( substr( $this->rule, $this->pos, $length ), $this->pos );
$this->pos += $length;
if ( $length !== 0 ) {
$token = $this->newNumber( substr( $this->rule, $this->pos, $length ), $this->pos );
$this->pos += $length;
if ( $op2 === '..' || $op2 === '!=' ) {
$token = $this->newOperator( $op2, $this->pos, 2 );
$this->pos += 2;
if ( $op2 === '..' || $op2 === '!=' ) {
$token = $this->newOperator( $op2, $this->pos, 2 );
$this->pos += 2;
$op1 = $this->rule[$this->pos];
if ( $op1 === ',' || $op1 === '=' || $op1 === '%' ) {
$token = $this->newOperator( $op1, $this->pos, 1 );
$op1 = $this->rule[$this->pos];
if ( $op1 === ',' || $op1 === '=' || $op1 === '%' ) {
$token = $this->newOperator( $op1, $this->pos, 1 );
if ( isset( self::$precedence[$bothWords] ) ) {
$token = $this->newOperator( $bothWords, $this->pos, $nextTokenPos - $this->pos );
$this->pos = $nextTokenPos;
if ( isset( self::$precedence[$bothWords] ) ) {
$token = $this->newOperator( $bothWords, $this->pos, $nextTokenPos - $this->pos );
$this->pos = $nextTokenPos;
if ( isset( self::$precedence[$word1] ) ) {
$token = $this->newOperator( $word1, $this->pos, strlen( $word1 ) );
$this->pos += strlen( $word1 );
if ( isset( self::$precedence[$word1] ) ) {
$token = $this->newOperator( $word1, $this->pos, strlen( $word1 ) );
$this->pos += strlen( $word1 );
return $token;
}
// The single-character operand symbols
if ( strpos( self::OPERAND_SYMBOLS, $word1 ) !== false ) {
$token = $this->newNumber( $word1, $this->pos );
return $token;
}
// The single-character operand symbols
if ( strpos( self::OPERAND_SYMBOLS, $word1 ) !== false ) {
$token = $this->newNumber( $word1, $this->pos );
// Samples are like comments, they have no effect on rule evaluation.
// They run from the first sample indicator to the end of the string.
$this->pos = $this->end;
// Samples are like comments, they have no effect on rule evaluation.
// They run from the first sample indicator to the end of the string.
$this->pos = $this->end;