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

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

Issue 803933003: IDL: various adjustments to match Web IDL specification better (Closed) Base URL: https://chromium.googlesource.com/chromium/src@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 | « no previous file | tools/idl_parser/idl_parser.py » ('j') | tools/idl_parser/idl_parser.py » ('J')
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 """ Lexer for PPAPI IDL 6 """ Lexer for PPAPI IDL
7 7
8 The lexer uses the PLY library to build a tokenizer which understands both 8 The lexer uses the PLY library to build a tokenizer which understands both
9 WebIDL and Pepper tokens. 9 WebIDL and Pepper tokens.
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 'ByteString' : 'BYTESTRING', 70 'ByteString' : 'BYTESTRING',
71 'callback' : 'CALLBACK', 71 'callback' : 'CALLBACK',
72 'const' : 'CONST', 72 'const' : 'CONST',
73 'creator' : 'CREATOR', 73 'creator' : 'CREATOR',
74 'Date' : 'DATE', 74 'Date' : 'DATE',
75 'deleter' : 'DELETER', 75 'deleter' : 'DELETER',
76 'dictionary' : 'DICTIONARY', 76 'dictionary' : 'DICTIONARY',
77 'DOMString' : 'DOMSTRING', 77 'DOMString' : 'DOMSTRING',
78 'double' : 'DOUBLE', 78 'double' : 'DOUBLE',
79 'enum' : 'ENUM', 79 'enum' : 'ENUM',
80 'exception' : 'EXCEPTION',
80 'false' : 'FALSE', 81 'false' : 'FALSE',
81 'float' : 'FLOAT', 82 'float' : 'FLOAT',
82 'exception' : 'EXCEPTION',
83 'getter': 'GETTER', 83 'getter': 'GETTER',
84 'implements' : 'IMPLEMENTS', 84 'implements' : 'IMPLEMENTS',
85 'Infinity' : 'INFINITY', 85 'Infinity' : 'INFINITY',
86 'inherit' : 'INHERIT', 86 'inherit' : 'INHERIT',
87 'interface' : 'INTERFACE', 87 'interface' : 'INTERFACE',
88 'iterable': 'ITERABLE',
88 'legacycaller' : 'LEGACYCALLER', 89 'legacycaller' : 'LEGACYCALLER',
90 'legacyiterable' : 'LEGACYITERABLE',
89 'long' : 'LONG', 91 'long' : 'LONG',
92 'maplike': 'MAPLIKE',
90 'Nan' : 'NAN', 93 'Nan' : 'NAN',
91 'null' : 'NULL', 94 'null' : 'NULL',
92 'object' : 'OBJECT', 95 'object' : 'OBJECT',
93 'octet' : 'OCTET', 96 'octet' : 'OCTET',
94 'optional' : 'OPTIONAL', 97 'optional' : 'OPTIONAL',
95 'or' : 'OR', 98 'or' : 'OR',
96 'partial' : 'PARTIAL', 99 'partial' : 'PARTIAL',
97 'Promise' : 'PROMISE', 100 'Promise' : 'PROMISE',
98 'readonly' : 'READONLY', 101 'readonly' : 'READONLY',
99 'RegExp' : 'REGEXP', 102 'RegExp' : 'REGEXP',
103 'required' : 'REQUIRED',
100 'sequence' : 'SEQUENCE', 104 'sequence' : 'SEQUENCE',
101 'serializer' : 'SERIALIZER', 105 'serializer' : 'SERIALIZER',
106 'setlike' : 'SETLIKE',
102 'setter': 'SETTER', 107 'setter': 'SETTER',
103 'short' : 'SHORT', 108 'short' : 'SHORT',
104 'static' : 'STATIC', 109 'static' : 'STATIC',
105 'stringifier' : 'STRINGIFIER', 110 'stringifier' : 'STRINGIFIER',
106 'typedef' : 'TYPEDEF', 111 'typedef' : 'TYPEDEF',
107 'true' : 'TRUE', 112 'true' : 'TRUE',
108 'unsigned' : 'UNSIGNED', 113 'unsigned' : 'UNSIGNED',
109 'unrestricted' : 'UNRESTRICTED', 114 'unrestricted' : 'UNRESTRICTED',
110 'void' : 'VOID' 115 'void' : 'VOID'
111 } 116 }
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 self.tokens = [] 285 self.tokens = []
281 self._AddTokens(IDLLexer.tokens) 286 self._AddTokens(IDLLexer.tokens)
282 self._AddKeywords(IDLLexer.keywords) 287 self._AddKeywords(IDLLexer.keywords)
283 self._lexobj = None 288 self._lexobj = None
284 self.last = None 289 self.last = None
285 self.lines = None 290 self.lines = None
286 291
287 # If run by itself, attempt to build the lexer 292 # If run by itself, attempt to build the lexer
288 if __name__ == '__main__': 293 if __name__ == '__main__':
289 lexer_object = IDLLexer() 294 lexer_object = IDLLexer()
OLDNEW
« no previous file with comments | « no previous file | tools/idl_parser/idl_parser.py » ('j') | tools/idl_parser/idl_parser.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698