| 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 logging | 6 import logging |
| 7 import re | 7 import re |
| 8 import weakref | 8 import weakref |
| 9 | 9 |
| 10 _logger = logging.getLogger('pegparser') | 10 _logger = logging.getLogger('pegparser') |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 (lineNumber, lineOffset, message)) | 518 (lineNumber, lineOffset, message)) |
| 519 | 519 |
| 520 # Initialize state | 520 # Initialize state |
| 521 state = _PegParserState(text, | 521 state = _PegParserState(text, |
| 522 whitespace_rule=self._whitespace_rule, | 522 whitespace_rule=self._whitespace_rule, |
| 523 strings_are_tokens=self._strings_are_tokens) | 523 strings_are_tokens=self._strings_are_tokens) |
| 524 | 524 |
| 525 # Match and analyze result | 525 # Match and analyze result |
| 526 (pos, ast) = self._root_rule.match(state, start_pos) | 526 (pos, ast) = self._root_rule.match(state, start_pos) |
| 527 return analyze_result(state, pos, ast) | 527 return analyze_result(state, pos, ast) |
| OLD | NEW |