gt: 	    boolean result = identifier.equals(HeredocIdentifier);
context: // Generated from org\develnext\lexer\php\PHPLexer.g4 by ANTLR 4.5.3
  package org.develnext.lexer.php;
  
  import org.antlr.v4.runtime.*;
  import org.antlr.v4.runtime.atn.ATN;
  import org.antlr.v4.runtime.atn.ATNDeserializer;
  import org.antlr.v4.runtime.atn.LexerATNSimulator;
  import org.antlr.v4.runtime.atn.PredictionContextCache;
  import org.antlr.v4.runtime.dfa.DFA;
  
  @SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
  public class PHPLexer extends Lexer {
  	static { RuntimeMetaData.checkVersion("4.5.3", RuntimeMetaData.VERSION); }
  
  	protected static final DFA[] _decisionToDFA;
  	protected static final PredictionContextCache _sharedContextCache =
  		new PredictionContextCache();
  	public static final int
  		SeaWhitespace=1, HtmlText=2, PHPStart=3, HtmlScriptOpen=4, HtmlStyleOpen=5, 
  		HtmlComment=6, HtmlDtd=7, HtmlOpen=8, Shebang=9, PHPStartInside=10, HtmlClose=11, 
  		HtmlSlashClose=12, HtmlSlash=13, HtmlEquals=14, HtmlStartQuoteString=15, 
  		HtmlStartDoubleQuoteString=16, HtmlHex=17, HtmlDecimal=18, HtmlSpace=19, 
  		HtmlName=20, PHPStartInsideQuoteString=21, HtmlEndQuoteString=22, HtmlQuoteString=23, 
  		PHPStartDoubleQuoteString=24, HtmlEndDoubleQuoteString=25, HtmlDoubleQuoteString=26, 
  		ScriptText=27, ScriptClose=28, PHPStartInsideScript=29, StyleBody=30, 
  		PHPEnd=31, Whitespace=32, MultiLineComment=33, SingleLineComment=34, ShellStyleComment=35, 
  		Abstract=36, Array=37, As=38, BinaryCast=39, BoolType=40, BooleanConstant=41, 
  		Break=42, Callable=43, Case=44, Catch=45, Class=46, Clone=47, Const=48, 
  		Continue=49, Declare=50, Default=51, Do=52, DoubleCast=53, DoubleType=54, 
  		Echo=55, Else=56, ElseIf=57, Empty=58, EndDeclare=59, EndFor=60, EndForeach=61, 
  		EndIf=62, EndSwitch=63, EndWhile=64, Eval=65, Exit=66, Extends=67, Final=68, 
  		Finally=69, FloatCast=70, For=71, Foreach=72, Function=73, Global=74, 
  		Goto=75, If=76, Implements=77, Import=78, Include=79, IncludeOnce=80, 
  		InstanceOf=81, InsteadOf=82, Int16Cast=83, Int64Type=84, Int8Cast=85, 
  		Interface=86, IntType=87, IsSet=88, List=89, LogicalAnd=90, LogicalOr=91, 
  		LogicalXor=92, Namespace=93, New=94, Null=95, ObjectType=96, Parent_=97, 
  		Partial=98, Print=99, Private=100, Protected=101, Public=102, Require=103, 
  		RequireOnce=104, Resource=105, Return=106, Static=107, StringType=108, 
  		Switch=109, Throw=110, Trait=111, Try=112, Typeof=113, Uint16Cast=114, 
  		Uint32Cast=115, Uint64Cast=116, Uint8Cast=117, UnicodeCast=118, Unset=119, 
  		Use=120, Var=121, While=122, Yield=123, Get=124, Set=125, Call=126, CallStatic=127, 
  		Constructor=128, Destruct=129, Wakeup=130, Sleep=131, Autoload=132, IsSet__=133, 
  		Unset__=134, ToString__=135, Invoke=136, SetState=137, Clone__=138, DebugInfo=139, 
  		Namespace__=140, Class__=141, Traic__=142, Function__=143, Method__=144, 
  		Line__=145, File__=146, Dir__=147, Lgeneric=148, Rgeneric=149, DoubleArrow=150, 
  		Inc=151, Dec=152, IsIdentical=153, IsNoidentical=154, IsEqual=155, IsNotEq=156, 
  		IsSmallerOrEqual=157, IsGreaterOrEqual=158, PlusEqual=159, MinusEqual=160, 
  		MulEqual=161, Pow=162, PowEqual=163, DivEqual=164, Concaequal=165, ModEqual=166, 
  		ShiftLeftEqual=167, ShiftRightEqual=168, AndEqual=169, OrEqual=170, XorEqual=171, 
  		BooleanOr=172, BooleanAnd=173, ShiftLeft=174, ShiftRight=175, DoubleColon=176, 
  		ObjectOperator=177, NamespaceSeparator=178, Ellipsis=179, Less=180, Greater=181, 
  		Ampersand=182, Pipe=183, Bang=184, Caret=185, Plus=186, Minus=187, Asterisk=188, 
  		Percent=189, Divide=190, Tilde=191, SuppressWarnings=192, Dollar=193, 
  		Dot=194, QuestionMark=195, OpenRoundBracket=196, CloseRoundBracket=197, 
  		OpenSquareBracket=198, CloseSquareBracket=199, OpenCurlyBracket=200, CloseCurlyBracket=201, 
  		Comma=202, Colon=203, SemiColon=204, Eq=205, DoubleQuote=206, Quote=207, 
  		BackQuote=208, Label=209, VarName=210, Numeric=211, Real=212, EscapeCharacter=213, 
  		BackQuoteString=214, SingleQuoteString=215, DoubleQuoteString=216, StartNowDoc=217, 
  		StartHereDoc=218, Comment=219, PHPEndSingleLineComment=220, CommentEnd=221, 
  		HereDocText=222;
  	public static final int
  		PhpComments=2;
  	public static final int INSIDE = 1;
  	public static final int HtmlQuoteStringMode = 2;
  	public static final int HtmlDoubleQuoteStringMode = 3;
  	public static final int SCRIPT = 4;
  	public static final int STYLE = 5;
  	public static final int PHP = 6;
  	public static final int SingleLineCommentMode = 7;
  	public static final int HereDoc = 8;
  	public static String[] modeNames = {
  		"DEFAULT_MODE", "INSIDE", "HtmlQuoteStringMode", "HtmlDoubleQuoteStringMode", 
  		"SCRIPT", "STYLE", "PHP", "SingleLineCommentMode", "HereDoc"
  	};
  
  	public static final String[] ruleNames = {
  		"PhpStartEchoFragment", "PhpStartFragment", "Digit", "HexDigit", "NameChar", 
  		"NameStartChar", "Decimal", "Hex", "Float", "SingleQuoteStringFragment", 
  		"DoubleQuoteStringFragment", "String", "A", "B", "C", "D", "E", "F", "G", 
  		"H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", 
  		"V", "W", "X", "Y", "Z", "SeaWhitespace", "HtmlText", "PHPStartEcho", 
  		"PHPStart", "HtmlScriptOpen", "HtmlStyleOpen", "HtmlComment", "HtmlDtd", 
  		"HtmlOpen", "Shebang", "NumberSign", "PHPStartEchoInside", "PHPStartInside", 
  		"HtmlClose", "HtmlSlashClose", "HtmlSlash", "HtmlEquals", "HtmlStartQuoteString", 
  		"HtmlStartDoubleQuoteString", "HtmlHex", "HtmlDecimal", "HtmlSpace", "HtmlName", 
  		"PHPStartEchoInsideQuoteString", "PHPStartInsideQuoteString", "HtmlEndQuoteString", 
  		"HtmlQuoteString", "PHPStartEchoDoubleQuoteString", "PHPStartDoubleQuoteString", 
  		"HtmlEndDoubleQuoteString", "HtmlDoubleQuoteString", "ScriptText", "ScriptClose", 
  		"PHPStartInsideScriptEcho", "PHPStartInsideScript", "ScriptText2", "ScriptText3", 
  		"ScriptText4", "StyleBody", "PHPEnd", "Whitespace", "MultiLineComment", 
  		"SingleLineComment", "ShellStyleComment", "Abstract", "Array", "As", "BinaryCast", 
  		"BoolType", "BooleanConstant", "Break", "Callable", "Case", "Catch", "Class", 
  		"Clone", "Const", "Continue", "Declare", "Default", "Do", "DoubleCast", 
  		"DoubleType", "Echo", "Else", "ElseIf", "Empty", "EndDeclare", "EndFor", 
  		"EndForeach", "EndIf", "EndSwitch", "EndWhile", "Eval", "Exit", "Extends", 
  		"Final", "Finally", "FloatCast", "For", "Foreach", "Function", "Global", 
  		"Goto", "If", "Implements", "Import", "Include", "IncludeOnce", "InstanceOf", 
  		"InsteadOf", "Int16Cast", "Int64Type", "Int8Cast", "Interface", "IntType", 
  		"IsSet", "List", "LogicalAnd", "LogicalOr", "LogicalXor", "Namespace", 
  		"New", "Null", "ObjectType", "Parent_", "Partial", "Print", "Private", 
  		"Protected", "Public", "Require", "RequireOnce", "Resource", "Return", 
  		"Static", "StringType", "Switch", "Throw", "Trait", "Try", "Typeof", "Uint16Cast", 
  		"Uint32Cast", "Uint64Cast", "Uint8Cast", "UnicodeCast", "Unset", "Use", 
  		"Var", "While", "Yield", "Get", "Set", "Call", "CallStatic", "Constructor", 
  		"Destruct", "Wakeup", "Sleep", "Autoload", "IsSet__", "Unset__", "ToString__", 
  		"Invoke", "SetState", "Clone__", "DebugInfo", "Namespace__", "Class__", 
  		"Traic__", "Function__", "Method__", "Line__", "File__", "Dir__", "Lgeneric", 
  		"Rgeneric", "DoubleArrow", "Inc", "Dec", "IsIdentical", "IsNoidentical", 
  		"IsEqual", "IsNotEq", "IsSmallerOrEqual", "IsGreaterOrEqual", "PlusEqual", 
  		"MinusEqual", "MulEqual", "Pow", "PowEqual", "DivEqual", "Concaequal", 
  		"ModEqual", "ShiftLeftEqual", "ShiftRightEqual", "AndEqual", "OrEqual", 
  		"XorEqual", "BooleanOr", "BooleanAnd", "ShiftLeft", "ShiftRight", "DoubleColon", 
  		"ObjectOperator", "NamespaceSeparator", "Ellipsis", "Less", "Greater", 
  		"Ampersand", "Pipe", "Bang", "Caret", "Plus", "Minus", "Asterisk", "Percent", 
  		"Divide", "Tilde", "SuppressWarnings", "Dollar", "Dot", "QuestionMark", 
  		"OpenRoundBracket", "CloseRoundBracket", "OpenSquareBracket", "CloseSquareBracket", 
  		"OpenCurlyBracket", "CloseCurlyBracket", "Comma", "Colon", "SemiColon", 
  		"Eq", "DoubleQuote", "Quote", "BackQuote", "Label", "VarName", "Numeric", 
  		"Real", "EscapeCharacter", "BackQuoteString", "SingleQuoteString", "DoubleQuoteString", 
  		"StartNowDoc", "StartHereDoc", "Comment", "PHPEndSingleLineComment", "CommentQuestionMark", 
  		"CommentEnd", "HereDocText"
  	};
  
  	private static final String[] _LITERAL_NAMES = {
  		null, null, null, null, null, null, null, null, null, null, null, null, 
  		"'/>'", null, null, null, null, null, null, null, null, null, null, null, 
  		null, null, null, null, null, null, null, null, null, null, "'//'", "'#'", 
  		null, null, null, null, null, null, null, null, null, null, null, null, 
  		null, null, null, null, null, null, null, null, null, null, null, null, 
  		null, null, null, null, null, null, null, null, null, null, null, null, 
  		null, null, null, null, null, null, null, null, null, null, null, null, 
  		null, null, null, null, null, null, null, null, null, null, null, null, 
  		null, null, null, null, null, null, null, null, null, null, null, null, 
  		null, null, null, null, null, null, null, null, null, null, null, null, 
  		null, null, null, null, null, null, null, null, null, null, null, null, 
  		null, null, null, null, null, null, null, null, null, null, null, null, 
  		null, null, null, null, "'<:'", "':>'", "'=>'", "'++'", "'--'", "'==='", 
  		"'!=='", "'=='", null, "'<='", "'>='", "'+='", "'-='", "'*='", "'**'", 
  		"'**='", "'/='", "'.='", "'%='", "'<<='", "'>>='", "'&='", "'|='", "'^='", 
  		"'||'", "'&&'", "'<<'", "'>>'", "'::'", "'->'", "'\\'", "'...'", null, 
  		null, "'&'", "'|'", "'!'", "'^'", "'+'", "'-'", "'*'", "'%'", null, "'~'", 
  		"'@'", "'$'", "'.'", "'?'", "'('", "')'", "'['", "']'", "'{'", "'}'", 
  		"','", "':'", "';'", null, null, null, "'`'"
  	};
  	private static final String[] _SYMBOLIC_NAMES = {
  		null, "SeaWhitespace", "HtmlText", "PHPStart", "HtmlScriptOpen", "HtmlStyleOpen", 
  		"HtmlComment", "HtmlDtd", "HtmlOpen", "Shebang", "PHPStartInside", "HtmlClose", 
  		"HtmlSlashClose", "HtmlSlash", "HtmlEquals", "HtmlStartQuoteString", "HtmlStartDoubleQuoteString", 
  		"HtmlHex", "HtmlDecimal", "HtmlSpace", "HtmlName", "PHPStartInsideQuoteString", 
  		"HtmlEndQuoteString", "HtmlQuoteString", "PHPStartDoubleQuoteString", 
  		"HtmlEndDoubleQuoteString", "HtmlDoubleQuoteString", "ScriptText", "ScriptClose", 
  		"PHPStartInsideScript", "StyleBody", "PHPEnd", "Whitespace", "MultiLineComment", 
  		"SingleLineComment", "ShellStyleComment", "Abstract", "Array", "As", "BinaryCast", 
  		"BoolType", "BooleanConstant", "Break", "Callable", "Case", "Catch", "Class", 
  		"Clone", "Const", "Continue", "Declare", "Default", "Do", "DoubleCast", 
  		"DoubleType", "Echo", "Else", "ElseIf", "Empty", "EndDeclare", "EndFor", 
  		"EndForeach", "EndIf", "EndSwitch", "EndWhile", "Eval", "Exit", "Extends", 
  		"Final", "Finally", "FloatCast", "For", "Foreach", "Function", "Global", 
  		"Goto", "If", "Implements", "Import", "Include", "IncludeOnce", "InstanceOf", 
  		"InsteadOf", "Int16Cast", "Int64Type", "Int8Cast", "Interface", "IntType", 
  		"IsSet", "List", "LogicalAnd", "LogicalOr", "LogicalXor", "Namespace", 
  		"New", "Null", "ObjectType", "Parent_", "Partial", "Print", "Private", 
  		"Protected", "Public", "Require", "RequireOnce", "Resource", "Return", 
  		"Static", "StringType", "Switch", "Throw", "Trait", "Try", "Typeof", "Uint16Cast", 
  		"Uint32Cast", "Uint64Cast", "Uint8Cast", "UnicodeCast", "Unset", "Use", 
  		"Var", "While", "Yield", "Get", "Set", "Call", "CallStatic", "Constructor", 
  		"Destruct", "Wakeup", "Sleep", "Autoload", "IsSet__", "Unset__", "ToString__", 
  		"Invoke", "SetState", "Clone__", "DebugInfo", "Namespace__", "Class__", 
  		"Traic__", "Function__", "Method__", "Line__", "File__", "Dir__", "Lgeneric", 
  		"Rgeneric", "DoubleArrow", "Inc", "Dec", "IsIdentical", "IsNoidentical", 
  		"IsEqual", "IsNotEq", "IsSmallerOrEqual", "IsGreaterOrEqual", "PlusEqual", 
  		"MinusEqual", "MulEqual", "Pow", "PowEqual", "DivEqual", "Concaequal", 
  		"ModEqual", "ShiftLeftEqual", "ShiftRightEqual", "AndEqual", "OrEqual", 
  		"XorEqual", "BooleanOr", "BooleanAnd", "ShiftLeft", "ShiftRight", "DoubleColon", 
  		"ObjectOperator", "NamespaceSeparator", "Ellipsis", "Less", "Greater", 
  		"Ampersand", "Pipe", "Bang", "Caret", "Plus", "Minus", "Asterisk", "Percent", 
  		"Divide", "Tilde", "SuppressWarnings", "Dollar", "Dot", "QuestionMark", 
  		"OpenRoundBracket", "CloseRoundBracket", "OpenSquareBracket", "CloseSquareBracket", 
  		"OpenCurlyBracket", "CloseCurlyBracket", "Comma", "Colon", "SemiColon", 
  		"Eq", "DoubleQuote", "Quote", "BackQuote", "Label", "VarName", "Numeric", 
  		"Real", "EscapeCharacter", "BackQuoteString", "SingleQuoteString", "DoubleQuoteString", 
  		"StartNowDoc", "StartHereDoc", "Comment", "PHPEndSingleLineComment", "CommentEnd", 
  		"HereDocText"
  	};
  	public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
  
  	/**
  	 * @deprecated Use {@link #VOCABULARY} instead.
  	 */
  	@Deprecated
  	public static final String[] tokenNames;
  	static {
  		tokenNames = new String[_SYMBOLIC_NAMES.length];
  		for (int i = 0; i < tokenNames.length; i++) {
  			tokenNames[i] = VOCABULARY.getLiteralName(i);
  			if (tokenNames[i] == null) {
  				tokenNames[i] = VOCABULARY.getSymbolicName(i);
  			}
  
  			if (tokenNames[i] == null) {
  				tokenNames[i] = "<INVALID>";
  			}
  		}
  	}
  
  	@Override
  	@Deprecated
  	public String[] getTokenNames() {
  		return tokenNames;
  	}
  
  	@Override
  
  	public Vocabulary getVocabulary() {
  		return VOCABULARY;
  	}
  
  
  	public boolean AspTags = true;
  	boolean ScriptTag;
  	boolean StyleTag;
  	String HeredocIdentifier = "";
  	int PrevTokenType;
  	String HtmlNameText = "";
  	boolean PhpScript;
  
  	@Override
  	public Token nextToken()
  	{
  	    Token token = super.nextToken();
  
  	    if (token.getType() == PHPEnd || token.getType() == PHPEndSingleLineComment)
  	    {
  	        if (_mode == SingleLineCommentMode)
  	        {
  	            // SingleLineCommentMode for such allowed syntax:
  	            // <?php echo "Hello world"; // comment ?>
  	            popMode(); // exit from SingleLineComment mode.
  	        }
  	        popMode(); // exit from PHP mode.
  
  	        if (token.getText().equals("</script>"))
  	        {
  	            PhpScript = false;
  	            token = new CommonToken(ScriptClose);
  	        }
  	        else
  	        {
  	            // Add semicolon to the end of statement if it is absente.
  	            // For example: <?php echo "Hello world" ?>
  	            if (PrevTokenType == SemiColon || PrevTokenType == Colon
  	                || PrevTokenType == OpenCurlyBracket || PrevTokenType == CloseCurlyBracket)
  	            {
  	                token = super.nextToken();
  	            }
  	            else
  	            {
  	                token = new CommonToken(SemiColon);
  	            }
  	        }
  	    }
  	    else if (token.getType() == HtmlName)
  	    {
  	        HtmlNameText = token.getText();
  	    }
  	    else if (token.getType() == HtmlDoubleQuoteString)
  	    {
  	        if (token.getText().equalsIgnoreCase("php") && HtmlNameText.equals("language"))
  	        {
  	            PhpScript = true;
  	        }
  	    }
  
  	    else if (_mode == HereDoc)
  	    {
  	        // Heredoc and Nowdoc syntax suuport: http://php.net/manual/en/language.getType()s.string.php#language.types.string.syntax.heredoc
  	        switch (token.getType())
  	        {
  	            case StartHereDoc:
  	            case StartNowDoc:
  	                HeredocIdentifier = token.getText().substring(3).trim().replaceAll("\\'$|^\\'", "");
  	                while (_input.LA(1) == '\r' || _input.LA(1) == '\n')
  	                    _input.consume();
  	                break;
  
  	            case HereDocText:
  	                if (checkHeredocEnd(token.getText()))
  	                {
  	                    popMode();
  	                    if (token.getText().trim().endsWith(";"))
  	                    {
  	                        token = new CommonToken(SemiColon);
  	                    }
  	                    else
  	                    {
  	                        token = super.nextToken();
  	                    }
  	                }
  	                break;
  	        }
  	    }
  	    else if (_mode == PHP)
  	    {
  	        if (_channel != HIDDEN)
  	        {
  	            PrevTokenType = token.getType();
  	        }
  	    }
  
  	    return token;
  	}
  
  	boolean checkHeredocEnd(String text)
  	{
  	    text = text.trim();
  	    boolean semi = text.length() > 0 ? text.charAt(text.length() - 1) == ';' : false;
  
  	    String identifier = semi ? text.substring(0, text.length() - 1) : text;
  