Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- elif char == '[':
- if array[ptr]:
- stack.append(i)
- else:
- while True:
- char = bf_code[i]
- if char == '[':
- depth += 1
- i += 1
- elif char == ']':
- depth -= 1
- i += 1
- elif char == '<' or char == '>' or char == '+' or char == '-' or char == '.' or char == ',':
- i +=1
- if depth == 0:
- break
- elif char == ']':
- i = stack.pop() -1
- i += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement