private void compileTypeDeclarations(Program program)
	                              throws ParseException, IOException
	{
		while (tokenizer.tokenType() == Tokenizer.KEYWORD) {
			// type or const
			switch (tokenizer.keyword()) {
				case Tokenizer.KW_TYPE:
					compileType();

					break;

				case Tokenizer.KW_CONST:
					compileConst();

					break;

				default:
					return;
			}

			// ;
			if ((tokenizer.tokenType() != Tokenizer.SYMBOL) ||
				    (tokenizer.symbol() != ';')) {
				throw new ParseException("; is excepted", tokenizer.lineNumber());
			}

			advance("program not ended");
		}
	}