| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
| 4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 import re | 6 import re |
| 7 import subprocess | 7 import subprocess |
| 8 import tempfile | 8 import tempfile |
| 9 | 9 |
| 10 from pegparser import * | 10 from pegparser import * |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 def ReadOnly(): | 205 def ReadOnly(): |
| 206 return 'readonly' | 206 return 'readonly' |
| 207 | 207 |
| 208 # Operation: | 208 # Operation: |
| 209 def Operation(): | 209 def Operation(): |
| 210 return syntax_switch( | 210 return syntax_switch( |
| 211 # Web IDL: | 211 # Web IDL: |
| 212 [MAYBE(ExtAttrs), MAYBE(Static), MAYBE(Stringifier), MAYBE(_Specials), | 212 [MAYBE(ExtAttrs), MAYBE(Static), MAYBE(Stringifier), MAYBE(_Specials), |
| 213 ReturnType, MAYBE(Id), '(', _Arguments, ')', ';'], | 213 ReturnType, MAYBE(Id), '(', _Arguments, ')', ';'], |
| 214 # WebKit: | 214 # WebKit: |
| 215 [MAYBE(ExtAttrs), MAYBE(Static), MAYBE(_AttrGetterSetter), | 215 [MAYBE(ExtAttrs), MAYBE(Static), MAYBE(_Specials), |
| 216 ReturnType, MAYBE(Id), '(', _Arguments, ')', ';'], | 216 ReturnType, MAYBE(Id), '(', _Arguments, ')', ';'], |
| 217 # FremontCut: | 217 # FremontCut: |
| 218 [MAYBE(_Annotations), MAYBE(ExtAttrs), MAYBE(Static), MAYBE(Stringifier)
, | 218 [MAYBE(_Annotations), MAYBE(ExtAttrs), MAYBE(Static), MAYBE(Stringifier)
, |
| 219 MAYBE(_Specials), ReturnType, MAYBE(Id), '(', _Arguments, ')', ';']) | 219 MAYBE(_Specials), ReturnType, MAYBE(Id), '(', _Arguments, ')', ';']) |
| 220 | 220 |
| 221 def Static(): | 221 def Static(): |
| 222 return 'static' | 222 return 'static' |
| 223 | 223 |
| 224 def _Specials(): | 224 def _Specials(): |
| 225 return MANY(Special) | 225 return MANY(Special) |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 Args: | 416 Args: |
| 417 content -- text to parse. | 417 content -- text to parse. |
| 418 defines -- an array of pre-processor defines. | 418 defines -- an array of pre-processor defines. |
| 419 includePaths -- an array of path strings used by the | 419 includePaths -- an array of path strings used by the |
| 420 gcc pre-processor. | 420 gcc pre-processor. |
| 421 """ | 421 """ |
| 422 if self._syntax == WEBKIT_SYNTAX: | 422 if self._syntax == WEBKIT_SYNTAX: |
| 423 content = self._pre_process(content, defines, includePaths) | 423 content = self._pre_process(content, defines, includePaths) |
| 424 | 424 |
| 425 return self._pegparser.parse(content) | 425 return self._pegparser.parse(content) |
| OLD | NEW |