The authors are interested in generating practical Prolog programs automatically from their specifications in attribute grammars in (AGs). They introduce a prototype system to perform this generation. Common attributes are introduced to overcome some disadvantages of Ags. Common attributes provide a solution to the copy-rule problem, reducing copy rules from 50-70% to 10%. A specification language named PANDA has been developed on the basis of the extended AG. A Prolog generator has been constructed that generates Prolog programs from PANDA programs. The generator tests whether a given grammar is an L-attribute grammar with a necessary sufficient condition proposed by the authors, and includes some optimization strategies to generate faster-running Prolog programs.