Lines Matching refs:parts
123 parts = []
125 parts.extend(["{}{}".format(self.comment_prefix(), f) for f in grammar.copyright])
126 parts.append('')
130 parts.append('#ifndef {}'.format(guard))
131 parts.append('#define {}'.format(guard))
132 parts.append('')
134 parts.append(self.cpp_guard_preamble())
137 parts.append(self.const_definition(grammar.name, 'Version', grammar.version))
140 parts.append(self.const_definition(grammar.name, 'Revision', grammar.revision))
142 parts.append('')
145 parts.append(self.enum_prefix(grammar.name, 'Instructions'))
147 parts.append(self.enum_value(grammar.name, inst['opname'], inst['opcode']))
148 parts.append(self.enum_end(grammar.name, 'Instructions'))
149 parts.append('')
153 parts.append(self.enum_prefix(grammar.name, kind['kind']))
155 parts.append(self.enum_value(grammar.name, e['enumerant'], e['value']))
156 parts.append(self.enum_end(grammar.name, kind['kind']))
157 parts.append('')
159 parts.append(self.cpp_guard_postamble())
162 parts.append('#endif // {}'.format(guard))
165 parts.append('')
167 return '\n'.join(parts)