Mercurial > lcfOS
diff python/yacc.py @ 368:d2ddfe134c48
Remove yield from for python < 3.3
author | Windel Bouwman |
---|---|
date | Fri, 21 Mar 2014 11:21:50 +0100 |
parents | 86b02c98a717 |
children | 173e20a47fda |
line wrap: on
line diff
--- a/python/yacc.py Fri Mar 21 10:27:57 2014 +0100 +++ b/python/yacc.py Fri Mar 21 11:21:50 2014 +0100 @@ -102,11 +102,13 @@ if section == 0: if line.startswith('%tokens'): yield('%tokens', '%tokens') - yield from tokenize_line(line[7:]) + for tk in tokenize_line(line[7:]): + yield tk else: yield ('HEADER', line) elif section == 1: - yield from tokenize_line(line) + for tk in tokenize_line(line): + yield tk yield ('eof', 'eof') self.tokens = tokenize() self.token = self.tokens.__next__()