| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """ | 6 """ |
| 7 A Deterministic acyclic finite state automaton (DAFSA) is a compact | 7 A Deterministic acyclic finite state automaton (DAFSA) is a compact |
| 8 representation of an unordered word list (dictionary). | 8 representation of an unordered word list (dictionary). |
| 9 | 9 |
| 10 http://en.wikipedia.org/wiki/Deterministic_acyclic_finite_state_automaton | 10 http://en.wikipedia.org/wiki/Deterministic_acyclic_finite_state_automaton |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 if len(sys.argv) != 3: | 460 if len(sys.argv) != 3: |
| 461 print('usage: %s infile outfile' % sys.argv[0]) | 461 print('usage: %s infile outfile' % sys.argv[0]) |
| 462 return 1 | 462 return 1 |
| 463 with open(sys.argv[1], 'r') as infile, open(sys.argv[2], 'w') as outfile: | 463 with open(sys.argv[1], 'r') as infile, open(sys.argv[2], 'w') as outfile: |
| 464 outfile.write(words_to_cxx(parse_gperf(infile))) | 464 outfile.write(words_to_cxx(parse_gperf(infile))) |
| 465 return 0 | 465 return 0 |
| 466 | 466 |
| 467 | 467 |
| 468 if __name__ == '__main__': | 468 if __name__ == '__main__': |
| 469 sys.exit(main()) | 469 sys.exit(main()) |
| OLD | NEW |