Fixed the variables

- Flipped position of space pattern and character pattern
- fixed the variable sIndex value to be a character array that we duplicated from yytext