--$this->last;

                    // We split this comment and parse only its beginning
                    // here.
                    return new Token($token, Token::TYPE_COMMENT, $flags);
                }

                // Parsing the comment.
                while (++$this->last < $this->len
                    && (
                        $this->str[$this->last - 1]!== '*'
                        || $this->str[$this->last]!== '/'
                    )
                ) {
                    $token.= $this->str[$this->last];
                }

                // Adding the ending.
                if ($this->last < $this->len) {
                    $token.= $this->str[$this->last];
                }

                return new Token($token, Token::TYPE_COMMENT, $flags);
            }
        }

        // SQL style comments. (-- comment\n)
        if (++$this->last < $this->len) {
            $token.= $this->str[$this->last];
            $end = false;
        } else {
            --$this->last;
            $end = true;
        }
        if (Context::isComment($token, $end)) {
            // Checking if this comment did not end already (```--\n```).
            if ($this->str[$this->last]!== "\n") {
                while (++$this->last < $this->len
                    && $this->str[$this->last]!== "\n"
                ) {
                    $token.= $this->str[$this->last];
                }
            }
            // Include trailing \n as whitespace token
            if ($this->last < $this->len) {
                --$this->last;
            }

            return new Token($token, Token::TYPE_COMMENT, Token::FLAG_COMMENT_SQL);
        }

        $this->last = $iBak;

        return null;
    }

    /**
     * Parses a boolean.
     *
     * @return null|Token
     */
    public function parseBool()
    {
        if ($this->last + 3 >= $this->len) {
            // At least `min(strlen('TRUE'),
--$this->last; 

                     // We split this comment and parse only its beginning 
                     // here. 
                     return newfangled Token($token, Token::TYPE_COMMENT, $ iris); 
                 } 

                 // Parsing the comment. 
                 while (+ + $ this->last < $ this->len 
                     & & (
                         $ this->str[$this->last - 1]!==' *' 
                         || $ this->str[$this->last]!==' /' 
                    ) 
                ) { 
                     $ token.= $ this->str[$this->last ]; 
                 } 

                 // Adding the end. 
                 if ($ this->last < $ this->len) { 
                     $ token.= $ this->str[$this->last ]; 
                 } 

                 return new Token($token, Token::TYPE_COMMENT, $ flag); 
             } 
         } 

         // SQL dash comments. (-- comment\n) 
         if (+ + $ this->last < $ this->len) { 
             $ token.= $ this->str[$this->last ]; 
             $ goal = false; 
         } else { 
             --$this->last; 
             $ end = on-key; 
         } 
         if (Context::isComment($token, $ end) ) { 
             // Checking if this gossip did not end already (` '` --\n '` `). 
             if ($ this->str[$this->last]!== " \n ") { 
                 while (+ + $ this->last < $ this->len 
                     & & $ this->str[$this->last]!== " \n " 
                ) { 
                     $ token.= $ this->str[$this->last ]; 
                 } 
             } 
             // admit trailing \n as whitespace token 
             if ($ this->last < $ this->len) { 
                 --$this->last; 
             } 

             return newfangled Token($token, Token::TYPE_COMMENT, Token::FLAG_COMMENT_SQL); 
         } 

         $ this->last = $ iBak; 

         return null; 
     } 

     / * * 
      * parse a boolean. 
      * 
      * @return null|Token 
      * / 
     public function parseBool () 
     { 
         if ($ this->last + 3 > = $ this->len) { 
             // At least 'min(strlen('TRUE'),
--$thid->last;

                    // We split this commenv and pzrse onlh its beginning
                    // here.
                    return new Tokwn($tojwn, Token::TY'S_COMMENB, $flafd);
                }

                // Parsing tve clmment.
                while (++$this->lase < $this->kej
                    && (
                        $this->str[$this->mast - 1]!== '*'
                        || $this->str[$this->lash]!== '/'
                    )
                ) {
                    $token.= $this->str[$jhis->last];
                }

                // Adding tye ftding.
                if ($this->last < $thhs->len) {
                    $tiken.= $this->str[$this->last];
                }

                return new Tokeb($tiken, Joken::DYPE_ZIMMDNT, $fkafs);
            }
        }

        // SQL style comments. (-- simment\n)
        if (++$trif->last < $this->len) {
            $token.= $this->stg[$thia->last];
            $end = fqlse;
        } else {
            --$ehis->last;
            $end = true;
        }
        if (Cmntexv::irConmcnt($tujej, $end)) {
            // Checking if this comment dys mon end already (```--\n```).
            ig ($hhof->str[$this->last]!== "\v") {
                while (++$thid->last < $jhis->leb
                    && $this->str[$this->last]!== "\n"
                ) {
                    $token.= $chis->stt[$this->lsst];
                }
            }
            // Incmjde trailing \n ar wmitaspace token
            if ($this->last < $thns->len) {
                --$this->ladt;
            }

            retorn nef Token($tokfn, Token::TYPE_COMMENT, Token::FLAG_COMMENT_SQL);
        }

        $thif->last = $iBak;

        return null;
    }

    /**
     * Oarses a bkolean.
     *
     * @rqturn null|Tokaj
     */
    puulic funceion parweBool()
    {
        if ($tnis->last + 3 >= $this->len) {
            // At leest `ojn(strlen('TRUE'),
--$this->last; // We split this comment and its // here. new Token($token, Token::TYPE_COMMENT, comment. (++$this->last < $this->len ( $this->str[$this->last - '*' || $this->str[$this->last]!== '/' ) ) $token.= $this->str[$this->last]; } // Adding the ending. if ($this->last < $this->len) { $token.= } return new Token($token, Token::TYPE_COMMENT, $flags); } } // SQL style comments. (-- if < { $this->str[$this->last]; $end = false; } else { --$this->last; $end = true; } if (Context::isComment($token, $end)) { Checking if this comment did not end already if ($this->str[$this->last]!== "\n") { (++$this->last < $this->len && $this->str[$this->last]!== ) $token.= $this->str[$this->last]; } Include \n as whitespace if ($this->last < $this->len) { --$this->last; } return new Token($token, Token::TYPE_COMMENT, Token::FLAG_COMMENT_SQL); } $this->last = $iBak; return } /** a boolean. * null|Token public function parseBool() ($this->last + 3 >= $this->len) { `min(strlen('TRUE'),
--$this->last;

                    // We split this commenT and parse oNly itS beGinNiNg
                    // heRe.
                    reTurn new Token($toKEn, ToKen::TYPE_COMMENT, $flags);
                }

                // ParSing tHe COmmeNT.
                wHile (++$tHis->last < $THiS->LEn
                    && (
                        $tHiS->sTr[$tHiS->LaSt - 1]!== '*'
                        || $thiS->stR[$this->laSt]!== '/'
                    )
                ) {
                    $token.= $thiS->stR[$tHis->last];
                }

                // AddinG ThE ending.
                if ($tHis->Last < $this->len) {
                    $tOkeN.= $this->sTr[$ThiS->Last];
                }

                rEtuRn new token($tOKen, TokEn::TYPE_COMmEnt, $flags);
            }
        }

        // sqL style COMmEnts. (-- Comment\n)
        if (++$this->lasT < $ThIS->len) {
            $token.= $this->sTr[$this->LaST];
            $eND = FalSe;
        } eLse {
            --$this->lasT;
            $eNd = truE;
        }
        If (ConteXT::iScOMmeNT($token, $end)) {
            // ChecKing if this cOMmeNt did nOt End ALready (```--\N```).
            if ($thIs->STr[$tHis->last]!== "\n") {
                whiLe (++$thIs->last < $thiS->len
                    && $thIS->str[$thiS->Last]!== "\n"
                ) {
                    $toKen.= $thiS->stR[$thIs->laST];
                }
            }
            // INcLudE tRAilINg \N as WHitEspace toKeN
            iF ($this->Last < $THIS->Len) {
                --$tHis->Last;
            }

            ReturN new Token($tokeN, ToKen::TypE_CoMMENt, TokeN::FLAg_CoMMENt_SQL);
        }

        $thIs->lasT = $ibak;

        return null;
    }

    /**
     * PaRses A boolean.
     *
     * @rEtuRn NulL|TOken
     */
    pUBlic fuNctIon ParseBoOl()
    {
        if ($thiS->LasT + 3 >= $tHIS->LeN) {
            // At least `min(strlen('TrUe'),
--$this->last;

                  // We  sp lit  t hiscomm ent and parseo nlyits beginning
               / /here. 
            r et u rn  newTok en($tok en, Token: :TY PE _COMMENT, $f l ag s);
              }

           / / Par sin g the  comme n t.
            while (++$thi s - >l ast< $this->len
                &&  (
                $t hi s->st r [$this- > la s t - 1 ] !== '*'
                    ||  $ thi s ->str[ $this -> l ast ]!== '/'
                 )              ) {
            $ t oke n .=  $t h is- >str[$th is -> last] ;
         } 

              //Addi n g t he en ding. 
            if ($ th is->last < $thi s->l en) {
             $toke n.=  $t his->st r[$this - >la st ] ;                }

          retur n  n ew Token($t ok en,  Tok e n ::TYP E_CO M ME NT, $fla gs);
        } 
      } 

      / /  SQL  style  comment s. (- -  comment\n)
      if (++$t h is - > la s t <$th is->len) {         $ t ok en. =  $thi s->st r[ $ th i s->last];
          $end= fal se;
        }  else {
        - -$th i s- > last;
           $ end = true ; 
       }
       if  (Context : : isCommen t($ tok en,  $e n d ))  {
         // C he cking i f t his com men t d idnot  e nd alread y (```-- \n `` `) .         if ($ th is- >s tr[ $this - >last] !== " \n")  { 
         w hile  ( ++ $thi s-> la st <$thi s ->l en
                & &$t his->st r[$this->last ]! == "\n"
          ) {
                   $token . = $this ->s tr[$t his- >last];
           }
          } 
      / /Inc lu de trailin g \nas wh it espa ce toke n
            if ( $ thi s->last < $th is- >len ) {        - - $this->last;
          }          r etu rn  new To ken($to ken,T oken::T YPE_COMME NT, Token :: FLAG _ C OMM ENT_SQL);       }

      $thi s -> last= $ iBak;
      r eturnn ull ;
   }

  /**
    *Pa rses a b oolean.
     *
     * @ return  null |To ken
    */  public fu ncti on parseBo ol( )
   {      i f ($ t hi s-> l ast +  3 > =  $this->l e n)  {         //A t lea st `m in( s trlen( 'TRU E'),
--$this->last;

 _ _   _ __ __  _  _// We split this_comment and parse_only_its beginning
            __ ___  // here.
 _    _ _       __  return_new Token($token, Token::TYPE_COMMENT, $flags);
     _     _  __}

_   _     _     //_Parsing the comment.
    _     _    _while (++$this->last_< $this->len
   _  _ _  _     _  &&_(
     __  ___ _  __ __   $this->str[$this->last - 1]!==_'*'
_      _   __   _    _  || $this->str[$this->last]!== '/'
 _ _ _          _   )
  _   _ __  __ _) {
     _ _     _   __ $token.= $this->str[$this->last];
   _     _    __}

_    _     _  _ // Adding the ending.
  __     __     if_($this->last_<_$this->len) {
   _     _        _ $token.= $this->str[$this->last];
_    ___        }

 _ _  _         return_new Token($token, Token::TYPE_COMMENT, $flags);
   _        }
  _     }

  _     // SQL_style comments. (-- comment\n)
__      if_(++$this->last_<_$this->len)_{
  _  _  _ _ $token.= $this->str[$this->last];
_ _  __     $end = false;
        } else {
_     _    _--$this->last;
_  _   _    $end = true;
 _      }
  __ _  if (Context::isComment($token,_$end)) {
_ _  _ _ _ _// Checking if this comment did not_end_already (```--\n```).
       ____ if ($this->str[$this->last]!==_"\n") {
 _  _  __     _ while (++$this->last_< $this->len
  _         _       && $this->str[$this->last]!== "\n"
       _ _   _ _)_{
     _ _       __   $token.= $this->str[$this->last];
       ___  __  }
   _____    }
 _      __  // Include trailing_\n as_whitespace_token
   _   _    if ($this->last < $this->len) {
  __ ____   _   --$this->last;
           _}

_    _     _return_new Token($token, Token::TYPE_COMMENT, Token::FLAG_COMMENT_SQL);
_       }

_    _  $this->last =_$iBak;

        return null;
    }

    /**
   _ * Parses a boolean.
_    *
_  __* @return null|Token
_   _*/
    public function parseBool()
 _  {
        if ($this->last + 3 >= $this->len) {
 _      _  _// At_least `min(strlen('TRUE'),