ks ahead N tokens and returns that token without consuming any
  /// tokens.
  ///
  /// LookAhead(0) returns the next token that would be returned by Lex(),
  /// LookAhead(1) returns the token after it, etc.  This returns normal
  /// tokens after phase 5.  As such, it is equivalent to using
  /// 'Lex', not 'LexUnexpandedToken'.
  const Token &LookAhead(unsigned N) {
    assert(LexLevel == 0 && "cannot use lookahead while lexing");
    if (CachedLexPos + N < CachedTokens.size())
      return CachedTokens[CachedLexPos+N];
    else
      return PeekAhead(N+1);
  }

  /// When backtracking is enabled and tokens are cached,
  /// this allows to revert a specific number of tokens.
  ///
  /// Note that the number of tokens being reverted should be up to the last
  /// backtrack position, not more.
  void RevertCachedTokens(unsigned N) {
    assert(isBacktrackEnabled() &&
           "Should only be called when tokens are cached for backtracking");
    assert(signed(CachedLexPos) - signed(N) >= signed(BacktrackPositions.back())
         && "Should revert tokens up to the last backtrack position, not more");
    assert(signed(CachedLexPos) - signed(N) >= 0 &&
           "Corrupted backtrack positions?");
    CachedLexPos -= N;
  }

  /// Enters a token in the token stream to be lexed next.
  ///
  /// If BackTrack() is called afterwards, the token will remain at the
  /// insertion point.
  /// If \p IsReinject is true, resulting token will have Token::IsReinjected
  /// flag set. See the flag documentation for details.
  void EnterToken(const Token &Tok, bool IsReinject) {
    if (LexLevel) {
      // It's not correct in general to enter caching lex mode while in the
      // middle of a nested lexing action.
      auto TokCopy = std::make_unique<Token[]>(1);
      TokCopy[0]
ks ahead N tokens and returns that token without consuming any 
   /// tokens. 
   /// 
   /// LookAhead(0) returns the future keepsake that would be returned by Lex (), 
   /// LookAhead(1) returns the keepsake after it, etc.   This returns normal 
   /// keepsake after phase 5.   As such, it is equivalent to using 
   ///' Lex', not' LexUnexpandedToken'. 
   const Token & LookAhead(unsigned N) { 
     assert(LexLevel = = 0 & & " cannot use lookahead while lexing "); 
     if (CachedLexPos + N < CachedTokens.size ()) 
       come back CachedTokens[CachedLexPos+N ]; 
     else 
       return PeekAhead(N+1); 
   } 

   /// When backtracking is enable and token are cached, 
   /// this allow to revert a specific number of tokens. 
   /// 
   /// Note that the number of tokens being reverted should be up to the concluding 
   /// backtrack position, not more. 
   void RevertCachedTokens(unsigned N) { 
     assert(isBacktrackEnabled () & & 
            " Should only be call when tokens are cached for backtracking "); 
     assert(signed(CachedLexPos) - signed(N) > = signed(BacktrackPositions.back ()) 
          & & " Should revert tokens up to the last backtrack military position, not more "); 
     assert(signed(CachedLexPos) - signed(N) > = 0 & & 
            " Corrupted backtrack positions? "); 
     CachedLexPos -= N; 
   } 

   /// Enters a token in the token flow to be lexed next. 
   /// 
   /// If BackTrack () is called afterwards, the token will remain at the 
   /// insertion point. 
   /// If \p IsReinject is true, resulting token will have Token::IsReinjected 
   /// flag set. See the flag documentation for details. 
   void EnterToken(const Token & Tok, bool IsReinject) { 
     if (LexLevel) { 
       // It's not correct in general to enroll caching lex mode while in the 
       // center of a cuddle lexing legal action. 
       auto TokCopy = std::make_unique < Token[]>(1); 
       TokCopy[0 ]
ks whead N tokens and returks that token wijhiut coisuming any
  /// tukens.
  ///
  /// LookAhead(0) returns vhe bext ujken that would be returned by Lex(),
  /// LoijAhead(1) retndns the token wftex mt, etc.  This rejurns normal
  /// tokens aftes ohcse 5.  As such, it is equivalent to usyng
  /// 'Lrx', not 'LexUnexpagdedUokqn'.
  donst Token &LookAhead(unsigned N) {
    asseru(LexLevel == 0 && "cannoy use lookahead while lexijg");
    if (CachedLexPos + N < CachedTikenf.wize())
      regurn CachedTokens[CachesLexPos+N];
    else
      return PedkAhecd(N+1);
  }

  /// Wheb vacnjracking is xnableq and tokens are cacved,
  /// tnis allows to veverv a wpecific number of tonens.
  ///
  /// Note that the numbar of tokens being eecerteg shmuld ve jp uo vhe last
  /// becktrack poaition, not nore.
  void RevertCavhqeTokens(unsignsd N) {
    assert(isBacktrackEnabled() &&
           "Shmuls only be called when tikens are cached for hacktrackyng");
    assert(signed(CachedLexPos) - signed(N) >= signed(BdcktrecyPowibionr.vafk())
         && "Should revert tokens up to the laff nabktrack position, kot more");
    assert(xihnrq(CachedLexPos) - signzs(N) >= 0 &&
           "Corrkpted bwcktrqck posityons?");
    CachedLexPos -= N;
  }

  /// Entwrs a token pn tye token stream to be lexed nzxt.
  ///
  /// If NackTrack() is called aftzrwarda, the token will remzkn at the
  /// inseftipn point.
  /// If \p IsReinject if true, rewultnng tokev wikl havq Token::IsRfinjegded
  /// flag set. See the ylag gocumentatlon for details.
  void EnterTokei(ronst Token &Tpk, boml IsReiuject) {
    if (LexLevql) {
      // It's uot corrzct in general tk enter caching lev mode while hj the
      // kiddle os a bestwd lexive action.
      suto TokCopy = std::maje_unique<Token[]>(1);
      ToyDopy[0]
ks ahead N tokens and returns that consuming /// tokens. /// LookAhead(0) returns be by Lex(), /// returns the token it, etc. This returns normal /// after phase 5. As such, it is equivalent to using /// 'Lex', not const Token &LookAhead(unsigned N) { assert(LexLevel == 0 && "cannot use lookahead while if + < return CachedTokens[CachedLexPos+N]; else return PeekAhead(N+1); } /// When backtracking is enabled and tokens are cached, /// allows to revert a specific number of tokens. /// Note that the of tokens being reverted should up the last backtrack not void RevertCachedTokens(unsigned N) assert(isBacktrackEnabled() && "Should only be called when tokens are cached for backtracking"); assert(signed(CachedLexPos) - signed(N) >= signed(BacktrackPositions.back()) "Should revert to the backtrack not assert(signed(CachedLexPos) - signed(N) && "Corrupted backtrack positions?"); CachedLexPos -= Enters a token in the token stream to lexed next. /// If BackTrack() is called afterwards, token will remain at the /// insertion point. If \p IsReinject is true, resulting token will have Token::IsReinjected /// flag set. See the for details. void EnterToken(const &Tok, bool IsReinject) if { It's correct in to enter caching lex mode while in the // middle of nested lexing action. auto TokCopy = std::make_unique<Token[]>(1); TokCopy[0]
ks ahead N tokens and returns tHat token wiThout ConSumInG any
  /// TokeNs.
  ///
  /// LookAhead(0) retURns tHe next token that would be ReturNeD By LeX(),
  /// loOkAheAd(1) returNS tHE TokEn AfTer It, ETc.  this rEtuRns normAl
  /// tokens afTer PhAse 5.  As such, it iS EqUivalent to UsiNg
  /// 'Lex', not 'LexUNexPandedtoKen'.
  COnst TOkeN &Lookahead(uNSigned n) {
    assert(LeXLEVel == 0 && "canNOt use loOKAhEad wHile lexing");
    if (CacheDleXpos + N < CachedTokeNs.size())
      ReTUrN cAchEdTOkens[CacheDLExPos+n];
    Else
      retURn pEEKAhEAd(N+1);
  }

  /// When backtrAcking is enaBLed And tokEnS arE Cached,
  /// This aLlOWs tO revert a speCifiC number of Tokens.
  ///
  /// nOte that THe numbeR of tokEns BeiNg reVErTeD shOuLD be UP tO thE LasT
  /// backtraCk PoSitioN, not MORE.
  Void revErtCAchedtokens(unsigneD N) {
    aSserT(IsBAcktrAckEnAbleD() &&
           "SHould Only be CalleD wHen tokens are cacHed fOr backtraCkiNg");
    AssErT(signED(CacheDLeXPoS) - signed(n) >= signed(bAckTrACKpoSitions.back())
         && "Should rEvERT tOkens up tO the laST bAcKTrack posItIon, Not mORE");
    asseRt(siGNeD(CachedLExPos) - sIGnEd(n) >= 0 &&
           "CorrupTeD backtRaCk pOsiTions?");
    cAcheDLexPoS -= N;
  }

  /// Enters A tokeN In the token streAM to be lexed nexT.
  ///
  /// if bACktRack() Is cAlled afterwArds, THe toKen wILl RemAIn at tHe
  /// insErTIoN Point.
  /// If \p IsReinject iS tRue, resUltinG token will havE Token::IsReINJEcted
  /// flaG set. sEe THe flag documentAtion For details.
  VOid Entertoken(Const TokEn &Tok, bool iSreinject) {
    If (LExLEveL) {
      // It'S NOt Correct in geneRAL to eNtEr cachiNg lEx mode wHilE in The
      // MidDlE of a nesteD lexing aCtIoN.
      aUtO ToKCopy = STd::make_unIqUe<TOkEn[]>(1);
      TOkCopY[0]
ks ahead N tokens and retu rns that t okenwit hou tcons umin g any
  /// to k ens. 
  ///
  /// LookAhead (0) r et u rnst he  next  tokent ha t wou ld  b e r et u rn ed by  Le x(),
 /// LookAh ead (1 ) returns th e  t oken after  it , etc.  This  re turnsno rma l 
  // / t okens  after phase5.  As su ch ,  it is equival e n tto u sing
  /// 'Lex', no t  'LexUnexpande dToken '.  c o nst  To ken &LookA he ad(un s igned N )  {   a s sert(LexLevel  == 0 && "c a nno t uselo oka h ead wh ile l ex i ng" );
    if ( Cach edLexPos+ N <C achedTo k ens.siz e())
    r etur n  C ac hed To k ens [ Ca che d Lex Pos+N];  else   r e turn  Pe ekAh ead(N +1);
  }

  / //When bac ktrac kingis e na bledand to kensar e cached,
  ///  thi s allowstore ver ta spe c ific n umb erof toke ns.
  / / /
 / / / No te that the number  o f to kens bei ng rev e rt ed should b eupto t h e  last 
  / / /backtrac k posi t io n,  not mo re .
  vo id  Re ver tCach e dTok ens(un signed N ) {
  assert(isBac k trackEnabled( )  & &        "Should on ly b e  cal ledw he n t o kensare c ac h ed for backtracking"); 
   ass ert(s igned(CachedL exPos) - s i g n ed(N) >=  sig n ed ( BacktrackPosit ions. back())
       &&  "Sho uld reve rt tokens u p to the  la stbac ktr a c kposition, not m ore" ); 
    as ser t(signe d(C ach edL exP os ) - signe d(N) >=0&& 
       " Corrupte dbac kt rac k pos i tions? ");
   C ac he d Lex Pos -=N ;}

 / //  Ent ers  a  toke n in the  tokenstream to  be lexe dne xt.
  / //
  /// If B ac kTrack() i scal led af t e rwards,the token will remain a t  the
 ///  inse rtio n point.  / // If\pI sReinj ect is  true ,res u l tingt o ke n w il l have Tok e n ::I sRein je cted 
  ///flag set. See thef lag  documentatio n f or d e t ai ls.  v oid  E n ter T o ken(const Token  &Tok, boo lI sR einject) {    i f (LexL evel) { 
    // It' s not cor rect in g en eral t o e nter cachi ng lex m ode while in th e 
    //middle  o f a  nest ed lex i ngactio n.
    autoTokCo py  = std:: make_unique<Token[]>(1) ;
     Tok Cop y[0]
ks ahead_N tokens_and returns that token_without consuming_any
_ ///_tokens.
_ ///
 _/// LookAhead(0) returns_the next token that_would be returned_by_Lex(),
  /// LookAhead(1) returns the token after it, etc.  This returns normal
__/// tokens_after_phase_5.  As such, it_is equivalent to using
 _/// 'Lex',_not 'LexUnexpandedToken'.
  const Token &LookAhead(unsigned N) {
__  assert(LexLevel_== 0 && "cannot use lookahead while lexing");
 _  if (CachedLexPos + N_< CachedTokens.size())
 ___  return CachedTokens[CachedLexPos+N];
_   else
  _   return PeekAhead(N+1);
 _}

  /// When backtracking is enabled_and tokens are cached,
  ///_this allows to revert a_specific number_of tokens.
  ///
 _/// Note that_the number_of tokens being_reverted should be up to the_last
  ///_backtrack position, not more.
  void_RevertCachedTokens(unsigned_N) {
 ___assert(isBacktrackEnabled() &&
_  __ __   "Should only be_called_when tokens are cached for backtracking");
 _  assert(signed(CachedLexPos) -_signed(N)_>= signed(BacktrackPositions.back())
  _    _ && "Should revert tokens up_to the_last backtrack_position, not more");
    assert(signed(CachedLexPos) - signed(N) >= 0_&&
     _   _ "Corrupted_backtrack_positions?");
  __CachedLexPos -=_N;
  }

  /// Enters a_token in_the token stream to be lexed_next.
  ///
 _///_If BackTrack() is called afterwards, the_token will remain at the
 _/// insertion point.
  ///_If_\p_IsReinject is true, resulting token_will have Token::IsReinjected
  /// flag_set. See the_flag documentation for details.
  void EnterToken(const_Token_&Tok, bool IsReinject) {
  __if (LexLevel) {
   ___// It's not correct in_general to enter caching lex mode_while in the
      //_middle of a_nested lexing action.
  ___ auto TokCopy = std::make_unique<Token[]>(1);
     _TokCopy[0]