Stephen Rawls: # I've only been involved with parrot since last week, # but I've been learning quickly from all the # documentation. With the recent activity about lack of # documentation, I thought I'd try to help out as best I could. # I've attached a file for an rx.dev candidate. # Some parts may be wrong, and at some points I even ask # questions, but there isn't much to rx.[ch], so overall it # should be a decent rough draft. Below are my questions, # copied right out of the attached document: # # 1) The rx_is_number_character function breaks the # abstraction and uses the following expression to test # the argument: # if (ch >= '0' && ch <= '9') # It explains that it is "faster to do # less-than/greater-than" # My question is: Doesn't this restrict the ability for # adding different character encodings and languge # support? What about languages that don't use arabic # numerals?
It's a speed hack. I'm well aware that it won't work on some languages, but I figured we can always change it later. # 2) In the rxinfo struct: # opcode_t *substfunc; # # My first guess was that that is a pointer to the first # opcode the regex uses, but then I got confused by the # name 'substfunc.' So basically ... what is it used # for? It's unused; originally I was planning to have the regex engine handle substitutions (and you would pass in a label to call to get the replacement string), but I changed my mind. Apparently that never disappeared. Overall, well done on the file--I think you explained bitmaps better than I could have. :^) --Brent Dax <[EMAIL PROTECTED]> @roles=map {"Parrot $_"} qw(embedding regexen Configure) He who fights and runs away wasted valuable running time with the fighting.