Beispiel #1
0
            //----------<Keep Extracting until the none - DoublePunct>----------------------------

            override public Token getTok()
            {
                Token tok = new Token();

                if (isdoubleChar())
                {
                    tok.Append((char)context_.src.next());
                    tok.Append((char)context_.src.next());
                }
                return(tok);
            }
Beispiel #2
0
		override public Token getTok()
		{
			Token tok = new Token();
			tok.Append((char)context_.src.next());

			while (isSingleSpecial(context_.src.peek()))
			{
				tok.Append((char)context_.src.next());
			}
			return tok;
		}
Beispiel #3
0
		//----< keep extracting until get none-alpha >-------------------

		override public Token getTok()
		{
			Token tok = new Token();
			tok.Append((char)context_.src.next());          // first is alpha

			while (isLetterOrDigit(context_.src.peek()))    // stop when non-alpha
			{
				tok.Append((char)context_.src.next());
			}
			return tok;
		}
Beispiel #4
0
		//----< keep extracting until get none-punctuator >--------------

		override public Token getTok()
		{
			Token tok = new Token();
			tok.Append((char)context_.src.next());       // first is punctuator

			while (isPunctuation(context_.src.peek()))   // stop when non-punctuator
			{
				tok.Append((char)context_.src.next());
			}
			return tok;
		}
Beispiel #5
0
		//----< keep extracting until get none-whitespace >--------------

		override public Token getTok()
		{
			Token tok = new Token();
			tok.Append((char)context_.src.next());     // first is WhiteSpace

			while (isWhiteSpace(context_.src.peek()))  // stop when non-WhiteSpace
			{
				tok.Append((char)context_.src.next());
			}
			return tok;
		}
Beispiel #6
0
            //<-------------------Keep extracting until the none single character >-----------------

            override public Token getTok()
            {
                Token tok = new Token();

                tok.Append((char)context_.src.next());

                while (issingleChar(context_.src.peek()))
                {
                    tok.Append((char)context_.src.next());
                }
                return(tok);
            }