Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Side by Side Diff: ppapi/generators/generator.py

Issue 8568025: Pnacl ppapi shim generator (from IDL), based on Noel's first cut. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comments Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_ast import IDLAst 9 from idl_ast import IDLAst
10 from idl_generator import Generator 10 from idl_generator import Generator
robertm 2011/11/28 19:44:04 are all these needed?
jvoung - send to chromium... 2011/11/28 20:14:25 importing some of these appears to have a side-eff
11 from idl_log import ErrOut, InfoOut, WarnOut 11 from idl_log import ErrOut, InfoOut, WarnOut
12 from idl_node import IDLAttribute, IDLNode 12 from idl_node import IDLAttribute, IDLNode
13 from idl_option import GetOption, Option, ParseOptions 13 from idl_option import GetOption, Option, ParseOptions
14 from idl_outfile import IDLOutFile 14 from idl_outfile import IDLOutFile
15 from idl_parser import ParseFiles 15 from idl_parser import ParseFiles
16 from idl_c_header import HGen 16 from idl_c_header import HGen
17 from idl_gen_pnacl import PnaclGen
17 18
18 19
19 def Main(args): 20 def Main(args):
20 filenames = ParseOptions(args) 21 filenames = ParseOptions(args)
21 ast = ParseFiles(filenames) 22 ast = ParseFiles(filenames)
22 return Generator.Run(ast) 23 return Generator.Run(ast)
23 24
24 if __name__ == '__main__': 25 if __name__ == '__main__':
25 args = sys.argv[1:] 26 args = sys.argv[1:]
26 27
27 # If no arguments are provided, assume we are tring to rebuild the 28 # If no arguments are provided, assume we are tring to rebuild the
28 # C headers with warnings off. 29 # C headers with warnings off.
29 if not args: args = ['--wnone', '--cgen', '--range=start,end'] 30 if not args: args = ['--wnone', '--cgen', '--range=start,end']
30 31
31 sys.exit(Main(args)) 32 sys.exit(Main(args))
32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698