summaryrefslogtreecommitdiff
path: root/regen/unicode_constants.pl
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-03-25 11:15:41 -0600
committerKarl Williamson <khw@cpan.org>2015-07-28 22:15:51 -0600
commit9d8e3074c037c6f67811f18e01b84d5c718b2046 (patch)
tree7ce4e66490af989329304f884a3d9b7a13d20aa2 /regen/unicode_constants.pl
parent16d89be8495ff4e0a9b99e837b5444df8a4a6cc6 (diff)
downloadperl-9d8e3074c037c6f67811f18e01b84d5c718b2046.tar.gz
regen/unicode_constants.pl: Move comments around
This moves the description of what <DATA> lines should look like to the __DATA__ line.
Diffstat (limited to 'regen/unicode_constants.pl')
-rw-r--r--regen/unicode_constants.pl60
1 files changed, 32 insertions, 28 deletions
diff --git a/regen/unicode_constants.pl b/regen/unicode_constants.pl
index 936c1a8a6c..9cbaf52644 100644
--- a/regen/unicode_constants.pl
+++ b/regen/unicode_constants.pl
@@ -28,34 +28,7 @@ print $out_fh <<END;
END
-# The data are at the end of this file. A blank line is output as-is.
-# Comments (lines whose first non-blank is a '#') are converted to C-style,
-# though empty comments are converted to blank lines. Otherwise, each line
-# represents one #define, and begins with either a Unicode character name with
-# the blanks and dashes in it squeezed out or replaced by underscores; or it
-# may be a hexadecimal Unicode code point of the form U+xxxx. In the latter
-# case, the name will be looked-up to use as the name of the macro. In either
-# case, the macro name will have suffixes as listed above, and all blanks and
-# dashes will be replaced by underscores.
-#
-# Each line may optionally have one of the following flags on it, separated by
-# white space from the initial token.
-# string indicates that the output is to be of the string form
-# described in the comments above that are placed in the file.
-# string_skip_ifundef is the same as 'string', but instead of dying if the
-# code point doesn't exist, the line is just skipped: no output is
-# generated for it
-# first indicates that the output is to be of the FIRST_BYTE form.
-# tail indicates that the output is of the _TAIL form.
-# native indicates that the output is the code point, converted to the
-# platform's native character set if applicable
-#
-# If the code point has no official name, the desired name may be appended
-# after the flag, which will be ignored if there is an official name.
-#
-# This program is used to make it convenient to create compile time constants
-# of UTF-8, and to generate proper EBCDIC as well as ASCII without manually
-# having to figure things out.
+# The data are at __DATA__ in this file.
my @data = <DATA>;
@@ -176,6 +149,37 @@ print $out_fh "\n#endif /* H_UNICODE_CONSTANTS */\n";
read_only_bottom_close_and_rename($out_fh);
+# DATA FORMAT
+#
+# A blank line is output as-is.
+# Comments (lines whose first non-blank is a '#') are converted to C-style,
+# though empty comments are converted to blank lines. Otherwise, each line
+# represents one #define, and begins with either a Unicode character name with
+# the blanks and dashes in it squeezed out or replaced by underscores; or it
+# may be a hexadecimal Unicode code point of the form U+xxxx. In the latter
+# case, the name will be looked-up to use as the name of the macro. In either
+# case, the macro name will have suffixes as listed above, and all blanks and
+# dashes will be replaced by underscores.
+#
+# Each line may optionally have one of the following flags on it, separated by
+# white space from the initial token.
+# string indicates that the output is to be of the string form
+# described in the comments above that are placed in the file.
+# string_skip_ifundef is the same as 'string', but instead of dying if the
+# code point doesn't exist, the line is just skipped: no output is
+# generated for it
+# first indicates that the output is to be of the FIRST_BYTE form.
+# tail indicates that the output is of the _TAIL form.
+# native indicates that the output is the code point, converted to the
+# platform's native character set if applicable
+#
+# If the code point has no official name, the desired name may be appended
+# after the flag, which will be ignored if there is an official name.
+#
+# This program is used to make it convenient to create compile time constants
+# of UTF-8, and to generate proper EBCDIC as well as ASCII without manually
+# having to figure things out.
+
__DATA__
U+017F string