public int
    yylex()
        throws ParseException
    {
        int token;
        int c = 0;
        token = 0;
        yytext.setLength(0);
        text.mark();

        token = -1;
        while(token < 0 && (c = text.read()) != EOS) {
            if(c <= ' ' || c == '\177') {
                /* whitespace: ignore */
            } else if(c == '"' || c == '\'') {
                int delim = c;
                boolean more = true;
                /* We have a string token; will be reported as STRINGCONST */
                while(more && (c = text.read()) > 0) {
                    switch (c) {
                    case EOS:
                        throw new ParseException("Unterminated character or string constant");
                    case '"':
                        more = (delim != c);
                        break;
                    case '\'':
                        more = (delim != c);
                        break;
                    case ESCAPE:
/* Suppress for now
            if(c >= '0' && c <= '9') {
			int decimal = 0;
		        do {
                            decimal = decimal * 10 + (c - '0');
                            c = text.read();
                        } while(c >= '0' && c <= '9');
                        c = decimal;
			text.backup();
                        break;
		    } else
*/
                        switch (c) {
                        case 'r':
                            c = '\r';
                            break;
                        case 'n':
                            c = '\n';
                            break;
                        case 'f':
                            c = '\f';
                            break;
                        case 't':
                            c = '\t';
                            break;
                        default:
                            break;
                        }
                        break;
                    default:
                        break;
                    }
                    if(more) yytext.append((char) c);
                }
                token = CEParserImpl.Lexer.STRING;
            } else if(DELIMS.indexOf(c) >= 0) {
                // Single char delimiter
                yytext.append((char) c);
                token = c;
            } else { // Assume we have a word or integer
                yytext.append((char) c);
                while((c = text.read()) > 0) {
                    if(c <= ' ' || c == '\177') break; // whitespace
                    if(DELIMS.indexOf(c) >= 0) break;
                    if(c == ESCAPE) {
                        c = text.read();
                        if(c == EOS)
                            throw new ParseException("Unterminated backslash escape");
                    }
                    yytext.append((char) c);
                }
                // pushback the delimiter
                if(c != EOS) text.backup();
                try {// See if this looks like an integer
                    long num = Long.parseLong(yytext.toString());
                    token = CEParserImpl.Lexer.LONG;
                } catch (NumberFormatException nfe) {
                    token = CEParserImpl.Lexer.NAME;
                }
            }
        }
        if(c == EOS && token < 0) {
            token = 0;
            lval = null;
        } else {
            lval = (yytext.length() == 0 ? (String) null : yytext.toString());
        }
        if(parsestate.getDebugLevel() > 0)
            dumptoken(token, (String) lval);
        return token; // Return the type of the token
    }
public int
    yylex()
        throws ParseException
    {
        int token;
        int c = 0;
        token = 0;
        yytext.setLength(0);
        text.mark();

        token = -1;
        while(token < 0 && (c = text.read()) != EOS) {
            if(c <= ' ' || c == '\177') {
                
            } else if(c == '"' || c == '\'') {
                int delim = c;
                boolean more = true;
                
                while(more && (c = text.read()) > 0) {
                    switch (c) {
                    case EOS:
                        throw new ParseException("Unterminated character or string constant");
                    case '"':
                        more = (delim != c);
                        break;
                    case '\'':
                        more = (delim != c);
                        break;
                    case ESCAPE:

                        switch (c) {
                        case 'r':
                            c = '\r';
                            break;
                        case 'n':
                            c = '\n';
                            break;
                        case 'f':
                            c = '\f';
                            break;
                        case 't':
                            c = '\t';
                            break;
                        default:
                            break;
                        }
                        break;
                    default:
                        break;
                    }
                    if(more) yytext.append((char) c);
                }
                token = CEParserImpl.Lexer.STRING;
            } else if(DELIMS.indexOf(c) >= 0) {
                
                yytext.append((char) c);
                token = c;
            } else { 
                yytext.append((char) c);
                while((c = text.read()) > 0) {
                    if(c <= ' ' || c == '\177') break; 
                    if(DELIMS.indexOf(c) >= 0) break;
                    if(c == ESCAPE) {
                        c = text.read();
                        if(c == EOS)
                            throw new ParseException("Unterminated backslash escape");
                    }
                    yytext.append((char) c);
                }
                
                if(c != EOS) text.backup();
                try {
                    long num = Long.parseLong(yytext.toString());
                    token = CEParserImpl.Lexer.LONG;
                } catch (NumberFormatException nfe) {
                    token = CEParserImpl.Lexer.NAME;
                }
            }
        }
        if(c == EOS && token < 0) {
            token = 0;
            lval = null;
        } else {
            lval = (yytext.length() == 0 ? (String) null : yytext.toString());
        }
        if(parsestate.getDebugLevel() > 0)
            dumptoken(token, (String) lval);
        return token; 
    }
public int yylex ( ) throws ParseException { int token ; int c = 0 ; token = 0 ; yytext . setLength ( 0 ) ; text . mark ( ) ; token = - 1 ; while ( token < 0 && ( c = text . read ( ) ) != EOS ) { if ( c <= ' ' || c == ' ' ) { /* whitespace: ignore */ } else if ( c == ' ' || c == ' ' ) { int delim = c ; boolean more = true ; /* We have a string token; will be reported as STRINGCONST */ while ( more && ( c = text . read ( ) ) > 0 ) { switch ( c ) { case EOS : throw new ParseException ( "Unterminated character or string constant" ) ; case ' ' : more = ( delim != c ) ; break ; case ' ' : more = ( delim != c ) ; break ; case ESCAPE : /* Suppress for now
            if(c >= '0' && c <= '9') {
			int decimal = 0;
		        do {
                            decimal = decimal * 10 + (c - '0');
                            c = text.read();
                        } while(c >= '0' && c <= '9');
                        c = decimal;
			text.backup();
                        break;
		    } else
*/ switch ( c ) { case ' ' : c = ' ' ; break ; case ' ' : c = ' ' ; break ; case ' ' : c = ' ' ; break ; case ' ' : c = ' ' ; break ; default : break ; } break ; default : break ; } if ( more ) yytext . append ( ( char ) c ) ; } token = CEParserImpl . Lexer . STRING ; } else if ( DELIMS . indexOf ( c ) >= 0 ) { // Single char delimiter yytext . append ( ( char ) c ) ; token = c ; } else { // Assume we have a word or integer yytext . append ( ( char ) c ) ; while ( ( c = text . read ( ) ) > 0 ) { if ( c <= ' ' || c == ' ' ) break ; // whitespace if ( DELIMS . indexOf ( c ) >= 0 ) break ; if ( c == ESCAPE ) { c = text . read ( ) ; if ( c == EOS ) throw new ParseException ( "Unterminated backslash escape" ) ; } yytext . append ( ( char ) c ) ; } // pushback the delimiter if ( c != EOS ) text . backup ( ) ; try { // See if this looks like an integer long num = Long . parseLong ( yytext . toString ( ) ) ; token = CEParserImpl . Lexer . LONG ; } catch ( NumberFormatException nfe ) { token = CEParserImpl . Lexer . NAME ; } } } if ( c == EOS && token < 0 ) { token = 0 ; lval = null ; } else { lval = ( yytext . length ( ) == 0 ? ( String ) null : yytext . toString ( ) ) ; } if ( parsestate . getDebugLevel ( ) > 0 ) dumptoken ( token , ( String ) lval ) ; return token ; // Return the type of the token }
Entry point for the scanner.
Returns the token identifier corresponding
to the next token and prepares to return the semantic value
of the token.

@return the token identifier corresponding to the next token.
Entry point for the scanner . Returns the token identifier corresponding to the next token and prepares to return the semantic value of the token .