lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


To get Cosmo to work on my system (and IBM mainframe) I had to change the following cosmo code in grammar.lua.
--local alpha =  lpeg.R('__','az','AZ','\127\255')
local alpha =  lpeg.R('__','az','AZ')

Obviously, the \127\255 range isn't going to work on an EBCDIC machine. I modified Lpeg to handle EBCDIC ranges simply by converting the EBCDIC chars to ASCII, which is a common hack. My question is what impact is that going to have on my altered version Cosmo? I wouldn't have considered ASCII \127\255 to be alphas. Is there a better way of doing this, possibly using locales?