Shape grammars are rule-based formalisms for the specification of shape languages. Most of the existing shape grammars are developed on paper and have not been implemented computationally thus far. Nevertheless, the computer implementation of shape grammar is an important research question, not only to automate design analysis and generation, but also to extend the impact of shape grammars toward design practice and computer-aided design tools. In this paper, we investigate the implementation of shape grammars on a computer system, using a graph-theoretic representation. In particular, we describe and evaluate the implementation of the existing Rabo-de-Bacalhau transformation grammar. A practical step-by-step approach is presented, together with a discussion of important findings noticed during the implementation and evaluation. The proposed approach is shown to be both feasible and valuable in several aspects: we show how the attempt to implement a grammar on a computer system leads to a deeper understanding of that grammar, and might result in the further development of the grammar; we show how the proposed approach is embedded within a commercial computer-aided design environment to make the shape grammar formalism more accessible to students and practitioners, thereby increasing the impact of grammars on design practice; and the proposed step-by-step implementation approach has shown to be feasible for the implementation of the Rabo-de-Bacalhau transformation grammar, but can also be generalized using different ontologies for the implementation.