OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 3 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 # | 6 # |
7 | 7 |
8 """ | 8 """ |
9 Responsible for generating the decoder based on parsed | 9 Responsible for generating the decoder based on parsed |
10 table representations. | 10 table representations. |
11 """ | 11 """ |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 values['decoder'] = row.action.actual() | 317 values['decoder'] = row.action.actual() |
318 out.write(METHOD_DISPATCH_CLASS_DECODER % values) | 318 out.write(METHOD_DISPATCH_CLASS_DECODER % values) |
319 elif row.action.__class__.__name__ == 'DecoderMethod': | 319 elif row.action.__class__.__name__ == 'DecoderMethod': |
320 values['subtable_name'] = row.action.name | 320 values['subtable_name'] = row.action.name |
321 out.write(METHOD_DISPATCH_SUBMETHOD % values) | 321 out.write(METHOD_DISPATCH_SUBMETHOD % values) |
322 else: | 322 else: |
323 raise Exception('Bad table action: %s' % repr(row.action)) | 323 raise Exception('Bad table action: %s' % repr(row.action)) |
324 out.write(METHOD_DISPATCH_CLOSE % values) | 324 out.write(METHOD_DISPATCH_CLOSE % values) |
325 values['not_implemented'] = decoder.get_value('NotImplemented').actual() | 325 values['not_implemented'] = decoder.get_value('NotImplemented').actual() |
326 out.write(METHOD_FOOTER % values) | 326 out.write(METHOD_FOOTER % values) |
OLD | NEW |