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

Side by Side Diff: tools/idl_parser/idl_ppapi_parser.py

Issue 816543004: Update from https://crrev.com/308996 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « tools/idl_parser/idl_parser.py ('k') | tools/idl_parser/test_lexer/keywords.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 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 """ Parser for PPAPI IDL """ 6 """ Parser for PPAPI IDL """
7 7
8 # 8 #
9 # IDL Parser 9 # IDL Parser
10 # 10 #
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 pass 233 pass
234 234
235 def p_null(self, p): 235 def p_null(self, p):
236 """ """ 236 """ """
237 pass 237 pass
238 238
239 def p_PromiseType(self, p): 239 def p_PromiseType(self, p):
240 """ """ 240 """ """
241 pass 241 pass
242 242
243 def p_EnumValueListComma(self, p):
244 """ """
245 pass
246
247 def p_EnumValueListString(self, p):
248 """ """
249 pass
250
243 # We only support: 251 # We only support:
244 # [ identifier ] 252 # [ identifier ]
245 # [ identifier ( ArgumentList )] 253 # [ identifier ( ArgumentList )]
246 # [ identifier ( ValueList )] 254 # [ identifier ( ValueList )]
247 # [ identifier = identifier ] 255 # [ identifier = identifier ]
248 # [ identifier = ( IdentifierList )] 256 # [ identifier = ( IdentifierList )]
249 # [ identifier = ConstValue ] 257 # [ identifier = ConstValue ]
250 # [ identifier = identifier ( ArgumentList )] 258 # [ identifier = identifier ( ArgumentList )]
251 # [51] map directly to 74-77 259 # [51] map directly to 74-77
252 # [52-54, 56] are unsupported 260 # [52-54, 56] are unsupported
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 print '\n'.join(ast.Tree(accept_props=['PROD', 'TYPE', 'VALUE'])) 308 print '\n'.join(ast.Tree(accept_props=['PROD', 'TYPE', 'VALUE']))
301 if errors: 309 if errors:
302 print '\nFound %d errors.\n' % errors 310 print '\nFound %d errors.\n' % errors
303 311
304 312
305 return errors 313 return errors
306 314
307 315
308 if __name__ == '__main__': 316 if __name__ == '__main__':
309 sys.exit(main(sys.argv[1:])) 317 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « tools/idl_parser/idl_parser.py ('k') | tools/idl_parser/test_lexer/keywords.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698