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

Side by Side Diff: src/trusted/validator_arm/dgen_input.py

Issue 12450015: **/*.py: use /usr/bin/env to find python Base URL: https://chromium.googlesource.com/native_client/src/native_client@master
Patch Set: Created 7 years, 9 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
« no previous file with comments | « src/trusted/validator_arm/dgen_decoder_output.py ('k') | src/trusted/validator_arm/dgen_opt.py » ('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/python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2012 The Native Client Authors. All rights reserved. 3 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 # 6 #
7 7
8 """ 8 """
9 A simple recursive-descent parser for the table file format. 9 A simple recursive-descent parser for the table file format.
10 10
11 The grammar implemented here is roughly (taking some liberties with whitespace 11 The grammar implemented here is roughly (taking some liberties with whitespace
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 return re.sub(r'#.*', '', line).strip() 1152 return re.sub(r'#.*', '', line).strip()
1153 else: 1153 else:
1154 self._reached_eof = True 1154 self._reached_eof = True
1155 return '' 1155 return ''
1156 1156
1157 #-------- Error reporting ------ 1157 #-------- Error reporting ------
1158 1158
1159 def _unexpected(self, context='Unexpected line in input'): 1159 def _unexpected(self, context='Unexpected line in input'):
1160 """"Reports that we didn't find the expected context. """ 1160 """"Reports that we didn't find the expected context. """
1161 raise Exception('Line %d: %s' % (self._line_no, context)) 1161 raise Exception('Line %d: %s' % (self._line_no, context))
OLDNEW
« no previous file with comments | « src/trusted/validator_arm/dgen_decoder_output.py ('k') | src/trusted/validator_arm/dgen_opt.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698