Created
December 1, 2012 23:37
-
-
Save tripped/4185952 to your computer and use it in GitHub Desktop.
The sane way to parse [19 02] control code arguments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def parse_19_02(source): | |
str = [] | |
cur = next(source) | |
while cur != 1 and cur != 2: | |
str.append(cur) | |
cur = next(source) | |
str = ('String', str) | |
if cur == 2: | |
return ('19 02', [str], 'load "#a"') | |
else: | |
return ('19 02', [str, parse_long(source)], 'load "#a" -> $#bbbbbb') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HEH