OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/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 The core object model for the Decoder Generator. The dg_input and dg_output | 9 The core object model for the Decoder Generator. The dg_input and dg_output |
10 modules both operate in terms of these classes. | 10 modules both operate in terms of these classes. |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 for r in t.rows: | 440 for r in t.rows: |
441 if r.action.__class__.__name__ == 'DecoderAction': | 441 if r.action.__class__.__name__ == 'DecoderAction': |
442 decoders.add(r.action) | 442 decoders.add(r.action) |
443 return sorted(decoders) | 443 return sorted(decoders) |
444 | 444 |
445 def rules(self): | 445 def rules(self): |
446 """Returns the sorted sequence of DecoderActions that define | 446 """Returns the sorted sequence of DecoderActions that define |
447 the rule field. | 447 the rule field. |
448 """ | 448 """ |
449 return sorted(filter(lambda (r): r.rule, self.decoders())) | 449 return sorted(filter(lambda (r): r.rule, self.decoders())) |
OLD | NEW |