Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def r_prelude(self):
# (, line 25
# unset Y_found, line 26
self.B_Y_found = False
# do, line 27
v_1 = self.cursor
try:
# (, line 27
# [, line 27
self.bra = self.cursor
# literal, line 27
if not self.eq_s(1, u"'"):
raise lab0()
# ], line 27
self.ket = self.cursor
# delete, line 27
if not self.slice_del():
return False
except lab0: pass
self.cursor = v_1
# do, line 28
v_2 = self.cursor
try:
# (, line 28
# [, line 28
self.bra = self.cursor
# literal, line 28
if not self.eq_s(1, u"y"):
if not self.r_R1():
return False
# <-, line 77
if not self.slice_from(u"ee"):
return False
elif among_var == 2:
# (, line 79
# test, line 80
v_1 = self.limit - self.cursor
# gopast, line 80
try:
while True:
try:
if not self.in_grouping_b(EnglishStemmer.g_v, 97, 121):
raise lab1()
raise lab0()
except lab1: pass
if self.cursor <= self.limit_backward:
return False
self.cursor -= 1
except lab0: pass
self.cursor = self.limit - v_1
# delete, line 80
if not self.slice_del():
return False
# test, line 81
v_3 = self.limit - self.cursor
# substring, line 81
among_var = self.find_among_b(EnglishStemmer.a_3, 13)
if among_var == 0:
return False
# try, line 59
v_1 = self.limit - self.cursor
try:
# (, line 59
# [, line 60
self.ket = self.cursor
# substring, line 60
among_var = self.find_among_b(EnglishStemmer.a_1, 3)
if among_var == 0:
self.cursor = self.limit - v_1
raise lab0()
# ], line 60
self.bra = self.cursor
if among_var == 0:
self.cursor = self.limit - v_1
raise lab0()
elif among_var == 1:
# (, line 62
# delete, line 62
if not self.slice_del():
return False
except lab0: pass
# [, line 65
self.ket = self.cursor
# substring, line 65
among_var = self.find_among_b(EnglishStemmer.a_2, 6)
if among_var == 0:
return False
# ], line 65
self.bra = self.cursor
if among_var == 0:
def r_shortv(self):
# (, line 49
# or, line 51
try:
v_1 = self.limit - self.cursor
try:
# (, line 50
if not self.out_grouping_b(EnglishStemmer.g_v_WXY, 89, 121):
raise lab1()
if not self.in_grouping_b(EnglishStemmer.g_v, 97, 121):
raise lab1()
if not self.out_grouping_b(EnglishStemmer.g_v, 97, 121):
raise lab1()
raise lab0()
except lab1: pass
self.cursor = self.limit - v_1
# (, line 52
if not self.out_grouping_b(EnglishStemmer.g_v, 97, 121):
return False
if not self.in_grouping_b(EnglishStemmer.g_v, 97, 121):
return False
# atlimit, line 52
if self.cursor > self.limit_backward:
return False
except lab0: pass
return True
elif among_var == 1:
# (, line 144
# delete, line 144
if not self.slice_del():
return False
elif among_var == 2:
# (, line 145
# or, line 145
try:
v_1 = self.limit - self.cursor
try:
# literal, line 145
if not self.eq_s_b(1, u"s"):
raise lab1()
raise lab0()
except lab1: pass
self.cursor = self.limit - v_1
# literal, line 145
if not self.eq_s_b(1, u"t"):
return False
except lab0: pass
# delete, line 145
if not self.slice_del():
return False
return True
def r_Step_1c(self):
# (, line 93
# [, line 94
self.ket = self.cursor
# or, line 94
try:
v_1 = self.limit - self.cursor
try:
# literal, line 94
if not self.eq_s_b(1, u"y"):
raise lab1()
raise lab0()
except lab1: pass
self.cursor = self.limit - v_1
# literal, line 94
if not self.eq_s_b(1, u"Y"):
return False
except lab0: pass
# ], line 94
self.bra = self.cursor
if not self.out_grouping_b(EnglishStemmer.g_v, 97, 121):
return False
# not, line 95
v_2 = self.limit - self.cursor
try:
# atlimit, line 95
if self.cursor > self.limit_backward:
raise lab2()
if self.find_among(EnglishStemmer.a_0, 3) == 0:
raise lab2()
raise lab1()
except lab2: pass
self.cursor = v_2
# (, line 41
# gopast, line 41
try:
while True:
try:
if not self.in_grouping(EnglishStemmer.g_v, 97, 121):
raise lab4()
raise lab3()
except lab4: pass
if self.cursor >= self.limit:
raise lab0()
self.cursor += 1
except lab3: pass
# gopast, line 41
try:
while True:
try:
if not self.out_grouping(EnglishStemmer.g_v, 97, 121):
raise lab6()
raise lab5()
except lab6: pass
if self.cursor >= self.limit:
raise lab0()
self.cursor += 1
except lab5: pass
except lab1: pass
# setmark p1, line 42
self.ket = self.cursor
self.cursor = v_2
raise lab3()
except lab4: pass
self.cursor = v_2
if self.cursor >= self.limit:
raise lab2()
self.cursor += 1
except lab3: pass
# <-, line 203
if not self.slice_from(u"y"):
return False
raise lab1()
except lab2: pass
self.cursor = v_1
raise lab0()
except lab1: pass
except lab0: pass
return True
if among_var == 0:
return False
# ], line 150
self.bra = self.cursor
if among_var == 0:
return False
elif among_var == 1:
# (, line 151
# or, line 151
try:
v_1 = self.limit - self.cursor
try:
# call R2, line 151
if not self.r_R2():
raise lab1()
raise lab0()
except lab1: pass
self.cursor = self.limit - v_1
# (, line 151
# call R1, line 151
if not self.r_R1():
return False
# not, line 151
v_2 = self.limit - self.cursor
try:
# call shortv, line 151
if not self.r_shortv():
raise lab2()
return False
except lab2: pass
self.cursor = self.limit - v_2
except lab0: pass