| OLD | NEW |
| 1 # Copyright 2013 the V8 project authors. All rights reserved. | 1 # Copyright 2013 the V8 project authors. All rights reserved. |
| 2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
| 3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
| 4 # met: | 4 # met: |
| 5 # | 5 # |
| 6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
| 7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
| 8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
| 9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
| 10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 minimize_default = True, | 40 minimize_default = True, |
| 41 inline = True, | 41 inline = True, |
| 42 switching = True, | 42 switching = True, |
| 43 debug_print = False, | 43 debug_print = False, |
| 44 log = False): | 44 log = False): |
| 45 if minimize_default: | 45 if minimize_default: |
| 46 dfa = rule_processor.default_automata().minimal_dfa() | 46 dfa = rule_processor.default_automata().minimal_dfa() |
| 47 else: | 47 else: |
| 48 dfa = rule_processor.default_automata().dfa() | 48 dfa = rule_processor.default_automata().dfa() |
| 49 self.__dfa = dfa | 49 self.__dfa = dfa |
| 50 self.__default_action = rule_processor.default_action | 50 self.__default_action = rule_processor.default_action() |
| 51 self.__debug_print = debug_print | 51 self.__debug_print = debug_print |
| 52 self.__start_node_number = self.__dfa.start_state().node_number() | 52 self.__start_node_number = self.__dfa.start_state().node_number() |
| 53 self.__log = log | 53 self.__log = log |
| 54 self.__inline = inline | 54 self.__inline = inline |
| 55 self.__switching = switching | 55 self.__switching = switching |
| 56 self.__jump_table = [] | 56 self.__jump_table = [] |
| 57 | 57 |
| 58 __jump_labels = ['state_entry', 'after_entry_code'] | 58 __jump_labels = ['state_entry', 'after_entry_code'] |
| 59 | 59 |
| 60 @staticmethod | 60 @staticmethod |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 | 423 |
| 424 return template.render( | 424 return template.render( |
| 425 start_node_number = 0, | 425 start_node_number = 0, |
| 426 debug_print = self.__debug_print, | 426 debug_print = self.__debug_print, |
| 427 default_action = default_action, | 427 default_action = default_action, |
| 428 dfa_states = dfa_states, | 428 dfa_states = dfa_states, |
| 429 jump_table = self.__jump_table, | 429 jump_table = self.__jump_table, |
| 430 encoding = encoding.name(), | 430 encoding = encoding.name(), |
| 431 char_type = char_type, | 431 char_type = char_type, |
| 432 upper_bound = encoding.primary_range()[1]) | 432 upper_bound = encoding.primary_range()[1]) |
| OLD | NEW |