| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # | 2 # |
| 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2011 The Chromium 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 import sys | 7 import sys |
| 8 | 8 |
| 9 from idl_log import ErrOut, InfoOut, WarnOut | 9 from idl_log import ErrOut, InfoOut, WarnOut |
| 10 from idl_option import GetOption, Option, ParseOptions | 10 from idl_option import GetOption, Option, ParseOptions |
| 11 | 11 |
| 12 GeneratorList = [] | 12 GeneratorList = [] |
| 13 | 13 |
| 14 Option('release', 'Which release to generate.', default='') | 14 Option('release', 'Which release to generate.', default='') |
| 15 Option('range', 'Which ranges in the form of MIN,MAX.', default='M13,M14') | 15 Option('range', 'Which ranges in the form of MIN,MAX.', default='M13,M16') |
| 16 | 16 |
| 17 | 17 |
| 18 # | 18 # |
| 19 # Generator | 19 # Generator |
| 20 # | 20 # |
| 21 # Base class for generators. This class provides a mechanism for | 21 # Base class for generators. This class provides a mechanism for |
| 22 # adding new generator objects to the IDL driver. To use this class | 22 # adding new generator objects to the IDL driver. To use this class |
| 23 # override the GenerateRelease and GenerateRange members, and | 23 # override the GenerateRelease and GenerateRange members, and |
| 24 # instantiate one copy of the class in the same module which defines it to | 24 # instantiate one copy of the class in the same module which defines it to |
| 25 # register the generator. After the AST is generated, call the static Run | 25 # register the generator. After the AST is generated, call the static Run |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 filenames = ParseOptions(args) | 239 filenames = ParseOptions(args) |
| 240 ast = ParseFiles(filenames) | 240 ast = ParseFiles(filenames) |
| 241 | 241 |
| 242 return Generator.Run(ast) | 242 return Generator.Run(ast) |
| 243 | 243 |
| 244 | 244 |
| 245 if __name__ == '__main__': | 245 if __name__ == '__main__': |
| 246 GeneratorReleaseTest('Test Gen', 'testgen', 'Generator Class Test.') | 246 GeneratorReleaseTest('Test Gen', 'testgen', 'Generator Class Test.') |
| 247 sys.exit(Main(sys.argv[1:])) | 247 sys.exit(Main(sys.argv[1:])) |
| 248 | 248 |
| OLD | NEW |