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

Side by Side Diff: src/trusted/validator_mips/dgen/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
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2012 The Native Client 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 """ 6 """
7 A simple recursive-descent parser for the table file format. 7 A simple recursive-descent parser for the table file format.
8 8
9 The grammar implemented here is roughly (taking some liberties with whitespace 9 The grammar implemented here is roughly (taking some liberties with whitespace
10 and comment parsing): 10 and comment parsing):
11 11
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 _line_no += 1 115 _line_no += 1
116 _line = _in.readline() 116 _line = _in.readline()
117 if _line: 117 if _line:
118 _line = re.sub(r'#.*', '', _line).strip() 118 _line = re.sub(r'#.*', '', _line).strip()
119 else: 119 else:
120 _line = None 120 _line = None
121 121
122 122
123 def unexpected(): 123 def unexpected():
124 raise Exception('Line %d: Unexpected line in input: %s' % (_line_no, _line)) 124 raise Exception('Line %d: Unexpected line in input: %s' % (_line_no, _line))
OLDNEW
« no previous file with comments | « src/trusted/validator_mips/dgen/dgen_dump.py ('k') | src/trusted/validator_mips/dgen/dgen_opt.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698