token.c - #include\"token.h#include\"command.h\/return token count int tokenise(char inputLine char token int tokenCount = 0 char startToken =

token.c - #include"token.h#include"command.h/return token...

This preview shows page 1 out of 1 page.

#include "token.h" #include "command.h" //return token count int tokenise(char* inputLine, char* token[]){ int tokenCount = 0; char* startToken = strtok(inputLine, " \t\n"); if (startToken == NULL) return 0; token[tokenCount] = malloc(sizeof(char) * strlen(startToken)); strcpy(token[tokenCount], startToken); while (startToken != NULL){ if (tokenCount>MAX_NUM_TOKENS) return -1;
Image of page 1

You've reached the end of your free preview.

Want to read the whole page?

  • Summer '17
  • int tokenCount, return token count

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes