Hi Folks,
In convert-ly, rule (1, 3, 117) is broken: it removes all
identifier assignments. The problem is that 's' is used both for the
function argument (input string) and the output string in function
'regularize_ids()'.
Fixing this yields python errors: in Python 3.15 the string class
no longer has 'letters' or 'lowercase' members.
I suggest rewriting 'regularize_ids()' as:
def regularize_id(s):
r = ''
lastx = ''
for x in s:
if x == '_':
lastx = x
continue
elif x in string.digits:
x = chr(ord(x) - ord('0') + ord('A'))
elif x not in string.ascii_letters:
x = 'x'
elif x in string.ascii_lowercase and lastx == '_':
x = x.upper()
r = r + x
lastx = x
return r
This means that Unicode characters in identifiers are not supported;
but I don't think they were supported this early in Lily's development
anyway
Peter C