Gulou is a type of building found in ethnic Dong people’s settlements in south west China. It plays a significant role in the traditional Dong architecture and shows both social and technical values. In the near future the technique as an intangible culture heritage would face the risk of extinction because of globalization. The paper argues that the use of formal grammar and computer tools could help the preservation and learning of the design knowledge of Gulou Structure and develop Gulou designs which would be adapted to modern needs. A shape grammar called Gulou Structure Grammar (GSG) and its computer implementation are made to achieve the goals of capturing the design knowledge of Gulou structure, generating new Gulou designs and promoting the education of Gulou building techniques.