Implementação Direta em Código
.
..
*
nextChar = getNonBlank(code_file, *nextChar);
switch (nextChar->charclass)
{
case LETTER:
lexLen = addChar(lexeme, lexLen, nextChar->nextchar);
*
nextChar = getChar(code_file);
while ((nextChar->charclass==LETTER)||(nextChar->charclass==DIGIT))
{
lexLen = addChar(lexeme, lexLen, nextChar->nextchar);
*
nextChar = getChar(code_file);
}
nextToken = IDENT;
break;
case DIGIT:
lexLen = addChar(lexeme, lexLen, nextChar->nextchar);
*
nextChar = getChar(code_file);
while (nextChar->charclass == DIGIT)
{
lexLen = addChar(lexeme, lexLen, nextChar->nextchar);
*
nextChar = getChar(code_file);
}
nextToken = INT_LIT;
break;
.
..