From ee24a51cf0c68318494d0b1e0fc805878089915d Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Mon, 26 Sep 2011 14:46:00 -0600 Subject: [PATCH] mktables: Add Perl_IDStart property This is a space/time trade-off. We add a table that is compiled to calculate what Perl wants for a character to be the beginning of an identifier. This will enable us to not have to take the && of two tables. --- lib/unicore/mktables | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/unicore/mktables b/lib/unicore/mktables index 910ef2f..645b76a 100644 --- a/lib/unicore/mktables +++ b/lib/unicore/mktables @@ -11845,6 +11845,17 @@ sub compile_perl() { my $begin = $perl->add_match_table('_X_Begin', Perl_Extension => 1); my $extend = $perl->add_match_table('_X_Extend', Perl_Extension => 1); + # For backward compatibility, Perl has its own definition for IDStart + # First, we include the underscore, and then the regular XID_Start also + # have to be Words + $perl->add_match_table('_Perl_IDStart', + Perl_Extension => 1, + Internal_Only => 1, + Initialize => + ord('_') + + (property_ref('XID_Start')->table('Y') & $Word) + ); + my $gcb = property_ref('Grapheme_Cluster_Break'); # The 'extended' grapheme cluster came in 5.1. The non-extended -- 2.7.4