Skip to content

Commit

Permalink
Add <isLu> and other <isProp> subrules.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Feb 16, 2010
1 parent 79e7b62 commit fdcde82
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 29 deletions.
27 changes: 14 additions & 13 deletions build/Makefile.in
Expand Up @@ -152,6 +152,7 @@ CHEATS_PIR = \
src/cheats/parrot/attriter.pir \
src/cheats/parrot/Protoobject.pir \
src/cheats/parrot/P6role.pir \
src/gen/uprop-cheats.pir \
src/cheats/parrot/register.pir \

CORE_SOURCES = \
Expand Down Expand Up @@ -354,20 +355,20 @@ src/gen/cheats.pir: build/gen_cheats_pir.pl $(CHEATS_PIR)
src/gen/core.pm: build/gen_core_pm.pl $(CORE_SOURCES)
$(PERL) build/gen_core_pm.pl $(CORE_SOURCES) > src/gen/core.pm

src/gen_metaop.pir: build/gen_metaop_pir.pl
$(PERL) build/gen_metaop_pir.pl > src/gen_metaop.pir
src/gen/uprop-cheats.pir: build/gen_uprop_pir.pl
$(PERL) build/gen_uprop_pir.pl > src/gen/uprop-cheats.pir

src/gen_junction.pir: build/gen_junction_pir.pl
$(PERL) build/gen_junction_pir.pl > src/gen_junction.pir

src/gen_whatever.pir: build/gen_whatever_pir.pl
$(PERL) build/gen_whatever_pir.pl > src/gen_whatever.pir

src/gen_uprop.pir: build/gen_uprop_pir.pl
$(PERL) build/gen_uprop_pir.pl > src/gen_uprop.pir

src/gen_setting.pm: build/gen_setting_pm.pl $(SETTING)
$(PERL) build/gen_setting_pm.pl $(SETTING) > src/gen_setting.pm
#src/gen_metaop.pir: build/gen_metaop_pir.pl
# $(PERL) build/gen_metaop_pir.pl > src/gen_metaop.pir
#
#src/gen_junction.pir: build/gen_junction_pir.pl
# $(PERL) build/gen_junction_pir.pl > src/gen_junction.pir
#
#src/gen_whatever.pir: build/gen_whatever_pir.pl
# $(PERL) build/gen_whatever_pir.pl > src/gen_whatever.pir
#
#src/gen_setting.pm: build/gen_setting_pm.pl $(SETTING)
# $(PERL) build/gen_setting_pm.pl $(SETTING) > src/gen_setting.pm

$(PMC_DIR)/objectref.pmc : $(PMC_DIR)/objectref_pmc.template build/gen_objectref_pmc.pl
$(PERL) -I$(PARROT_PERL_LIB) build/gen_objectref_pmc.pl $(PMC_DIR)/objectref_pmc.template \
Expand Down
28 changes: 14 additions & 14 deletions build/gen_uprop_pir.pl
Expand Up @@ -272,22 +272,22 @@
);

print qq{
.HLL 'parrot'
.namespace ['PGE';'Match']
.namespace ['Regex';'Cursor']
.sub '!uprop' :anon
.param pmc mob
.param pmc self
.param string uprop
.local string target
\$P0 = get_hll_global ['PGE'], 'Match'
(mob, \$I0, target) = \$P0.'new'(mob)
\$I1 = is_uprop uprop, target, \$I0
unless \$I1 goto end
inc \$I0
mob.'to'(\$I0)
end:
.return (mob)
.local pmc cur
.local int pos
.local string tgt
(cur, pos, tgt) = self.'!cursor_start'()
\$I0 = x_is_uprop uprop, tgt, pos
unless \$I0 goto fail
pass:
inc pos
\$S0 = concat 'is', uprop
cur.'!cursor_pass'(pos, \$S0)
fail:
.return (cur)
.end
};

Expand Down
4 changes: 2 additions & 2 deletions src/ops/perl6.ops
Expand Up @@ -203,15 +203,15 @@ inline op find_lex_skip_current(out PMC, in STR) :base_core {

/*

=item inline op is_uprop(out INT, in STR, in STR, in INT)
=item inline op x_is_uprop(out INT, in STR, in STR, in INT)

Sets a true value in $1 if character $4 in string $3 has the unicode property
named $2.

=cut

*/
inline op is_uprop(out INT, in STR, in STR, in INT) :base_core {
inline op x_is_uprop(out INT, in STR, in STR, in INT) :base_core {
#if PARROT_HAS_ICU
char *cstr;
INTVAL ord;
Expand Down

0 comments on commit fdcde82

Please sign in to comment.