/* 
 * Character "typer" for ECE 209 Homework 7.
 * Do not modify this file.
 *
 * J Dean Brock, 2010
 *
 */

/* Included for EOF */
#include <stdio.h>
/* Included for isspace */
#include <ctype.h>
#include "chartypes.h"

getRealCharType char2rctype(int c) {
    if (c==EOF) {
        return RCEOF ;
    } else if (c == '\n') {
        return RCEOL ;
    } else if (isspace(c)) {
        return RCWSP ;
    } else if (isdigit(c)) {
        return RCNUM ;
    } else if (c == '.') {
        return RCDOT ;
    } else if (c == 'e' || c == 'E') {
        return RCEXP ;
    } else if (c == '+' || c == '-') {
        return RCSGN ;
    } else {
        return RCOTH ;
    }
}
