public void advance() {
        try {
            switch (parser.ttype) {
                case StreamTokenizer.TT_NUMBER:
                    tokenType = TYPE_INT_CONST;
                    intValue = (int)parser.nval;
                    break;
                case StreamTokenizer.TT_WORD:
                    String word = parser.sval;
                    if (keywords.containsKey(word)) {
                        tokenType = TYPE_KEYWORD;
                        keyWordType = ((Integer)keywords.get(word)).intValue();
                    }
                    else {
                        tokenType = TYPE_IDENTIFIER;
                        identifier = word;
                    }
                    break;
                case '"':
                    tokenType = TYPE_STRING_CONST;
                    stringValue = parser.sval;
                    break;
                default:
                    tokenType = TYPE_SYMBOL;
                    symbol = (char)parser.ttype;
                    break;
            }
        	lineNumber = parser.lineno();
            parser.nextToken();
        } catch (IOException ioe) {
            System.out.println
                ("JackTokenizer failed during advance operation");
            System.exit(-1);
        }
    }