Update main.c

Added while(token != "."); to close the loop