Lines Matching refs:parts
84 parts = []
86 parts.extend(["{}{}".format(self.comment_prefix(), f) for f in grammar.copyright])
87 parts.append('')
91 parts.append('#ifndef {}'.format(guard))
92 parts.append('#define {}'.format(guard))
93 parts.append('')
95 parts.append(self.cpp_guard_preamble())
98 parts.append(self.const_definition(grammar.name, 'Version', grammar.version))
101 parts.append(self.const_definition(grammar.name, 'Revision', grammar.revision))
103 parts.append('')
106 parts.append(self.enum_prefix(grammar.name, 'Instructions'))
108 parts.append(self.enum_value(grammar.name, inst['opname'], inst['opcode']))
109 parts.append(self.enum_end(grammar.name, 'Instructions'))
110 parts.append('')
114 parts.append(self.enum_prefix(grammar.name, kind['kind']))
116 parts.append(self.enum_value(grammar.name, e['enumerant'], e['value']))
117 parts.append(self.enum_end(grammar.name, kind['kind']))
118 parts.append('')
120 parts.append(self.cpp_guard_postamble())
123 parts.append('#endif // {}'.format(guard))
125 return '\n'.join(parts)