develooper Front page | perl.perl6.internals | Postings from July 2002

[PATCH] rx.dev

From:
Stephen Rawls
Date:
July 14, 2002 09:39
Subject:
[PATCH] rx.dev
Message ID:
20020714154816.84775.qmail@web14504.mail.yahoo.com
Hello everyone,
  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?

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?

Thanks!
Stephen Rawls


__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About