anchor.diff:                  if (CheckHeredocEnd(token.Text))
                   {
                       PopMode();
  +
  +                    var heredocIdentifier = GetHeredocIdentifier(token.Text);
                       if (token.Text.Trim().EndsWith(";"))
                       {
  +                        token.Text = heredocIdentifier + ";\n";
                           token.Type = SemiColon;
                       }
                       else
                       {
  -                        token.Channel = SkipChannel;
  +                        token = (CommonToken)base.NextToken();
  +                        token.Text = heredocIdentifier + "\n;";
                       }
                   }
                   break;
  
positive.code:     return token;
  }
  
  bool CheckHeredocEnd(string text)
  {
      text = text.Trim();
      bool semi = text.Length > 0 ? text[text.Length - 1] == ';' : false;
      string identifier = semi ? text.Substring(0, text.Length - 1) : text;
      var result = string.Equals(identifier, _heredocIdentifier, System.StringComparison.Ordinal);
      return result;
  }}
  
  SeaWhitespace:  [ \t\r\n]+ -> channel(HIDDEN);
  
negative.code:             PopMode(); // exit from SingleLineComment mode.
          }
          PopMode(); // exit from PHP mode.
  
          if (string.Equals(token.Text, "</script>", System.StringComparison.Ordinal))
          {
              _phpScript = false;
  