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

Side by Side Diff: mojo/public/bindings/pylib/parse/mojo_lexer.py

Issue 221663004: mojo: add handle<shared_buffer> support to generator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months 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 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import re 5 import re
6 import sys 6 import sys
7 import os.path 7 import os.path
8 8
9 # Try to load the ply module, if not, then assume it is in the third_party 9 # Try to load the ply module, if not, then assume it is in the third_party
10 # directory. 10 # directory.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 raise LexError(self.filename, token.lineno, msg) 48 raise LexError(self.filename, token.lineno, msg)
49 49
50 ## 50 ##
51 ## Reserved keywords 51 ## Reserved keywords
52 ## 52 ##
53 keywords = ( 53 keywords = (
54 'HANDLE', 54 'HANDLE',
55 'DATA_PIPE_CONSUMER', 55 'DATA_PIPE_CONSUMER',
56 'DATA_PIPE_PRODUCER', 56 'DATA_PIPE_PRODUCER',
57 'MESSAGE_PIPE', 57 'MESSAGE_PIPE',
58 'SHARED_BUFFER',
58 59
59 'IMPORT', 60 'IMPORT',
60 'MODULE', 61 'MODULE',
61 'STRUCT', 62 'STRUCT',
62 'INTERFACE', 63 'INTERFACE',
63 'ENUM', 64 'ENUM',
64 ) 65 )
65 66
66 keyword_map = {} 67 keyword_map = {}
67 for keyword in keywords: 68 for keyword in keywords:
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 return t 288 return t
288 289
289 # Ignore C and C++ style comments 290 # Ignore C and C++ style comments
290 def t_COMMENT(self, t): 291 def t_COMMENT(self, t):
291 r'(/\*(.|\n)*?\*/)|(//.*(\n[ \t]*//.*)*)' 292 r'(/\*(.|\n)*?\*/)|(//.*(\n[ \t]*//.*)*)'
292 pass 293 pass
293 294
294 def t_error(self, t): 295 def t_error(self, t):
295 msg = 'Illegal character %s' % repr(t.value[0]) 296 msg = 'Illegal character %s' % repr(t.value[0])
296 self._error(msg, t) 297 self._error(msg, t)
OLDNEW
« no previous file with comments | « mojo/public/bindings/pylib/generate/mojom_pack.py ('k') | mojo/public/bindings/pylib/parse/mojo_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698