Implementação Direta em Código
.
..
*
nextChar = getNonBlank(codefile, *nextChar);
switch (nextChar->type){
case LETTER:
tamLexema = addChar(nextLexeme, tamLexema, nextChar->value);
*
nextChar = getChar(codefile);
while ((nextChar->type == LETTER) || (nextChar->type == DIGIT))
{
tamLexema = addChar(nextLexeme, tamLexema, nextChar->value);
*
nextChar = getChar(codefile);
}
nextToken = IDENT;
break;
case DIGIT:
tamLexema = addChar(nextLexeme, tamLexema, nextChar->value);
*
nextChar = getChar(codefile);
while (nextChar->type == DIGIT)
{
tamLexema = addChar(nextLexeme, tamLexema, nextChar->value);
*
nextChar = getChar(codefile);
}
nextToken = INT_LIT;
break;
.
..