Ejemplo n.º 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);
            }
Ejemplo n.º 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;
		}
Ejemplo n.º 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;
		}
Ejemplo n.º 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;
		}
Ejemplo n.º 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;
		}
Ejemplo n.º 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);
            }