mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-2219 minor changes for java output, comments and alignment.
X-SVN-Rev: 11028
This commit is contained in:
parent
73b457e004
commit
8b4d6d7609
1 changed files with 31 additions and 19 deletions
|
@ -198,20 +198,32 @@ for ($state=1; $state<$num_states; $state++) {
|
|||
die if ($errors>0);
|
||||
|
||||
if ($javaOutput) {
|
||||
print "//---------------------------------------------------------------------------------\n";
|
||||
print "//\n";
|
||||
print "// Generated Java File. Do not edit by hand.\n";
|
||||
print "// This file contains the state table for the ICU Rule Based Break Iterator\n";
|
||||
print "// rule parser.\n";
|
||||
print "// It is generated by the Perl script \"rbbicst.pl\" from\n";
|
||||
print "// the rule parser state definitions file \"rbbirpt.txt\".\n";
|
||||
print "//\n";
|
||||
print "// Copyright (C) 2003 International Business Machines Corporation \n";
|
||||
print "// and others. All rights reserved. \n";
|
||||
print "//\n";
|
||||
print "//---------------------------------------------------------------------------------\n";
|
||||
print "/*\n";
|
||||
print " *******************************************************************************\n";
|
||||
print " * Copyright (C) 2003,\n";
|
||||
print " * International Business Machines Corporation and others. All Rights Reserved.\n";
|
||||
print " *******************************************************************************\n";
|
||||
print " *\n";
|
||||
print " * \$Source: /xsrl/Nsvn/icu/icu/source/common/rbbicst.pl,v $\n";
|
||||
print " * \$Date: 2003/02/11 23:30:08 $\n";
|
||||
print " * \$Revision: 1.7 $\n";
|
||||
print " *\n";
|
||||
print " *******************************************************************************\n";
|
||||
print " */\n";
|
||||
print " \n";
|
||||
print "package com.ibm.icu.text;\n";
|
||||
print " \n";
|
||||
print "/**\n";
|
||||
print " * Generated Java File. Do not edit by hand.\n";
|
||||
print " * This file contains the state table for the ICU Rule Based Break Iterator\n";
|
||||
print " * rule parser.\n";
|
||||
print " * It is generated by the Perl script \"rbbicst.pl\" from\n";
|
||||
print " * the rule parser state definitions file \"rbbirpt.txt\".\n";
|
||||
print " *\n";
|
||||
print " */\n";
|
||||
|
||||
print "public class rbbirpt {\n";
|
||||
print "public class RuleBasedBreakIteratorStateTable\n";
|
||||
print "{\n";
|
||||
|
||||
#
|
||||
# Emit the constants for the actions to be performed.
|
||||
|
@ -225,11 +237,11 @@ if ($javaOutput) {
|
|||
#
|
||||
# emit the state transition table
|
||||
#
|
||||
print "public static final String[] gRuleParseStateTable = {\n";
|
||||
printf(" \"\\u%04.4x\\u%04.4x\\u%04.4x\\u%04.4x\\u%04.4x\"\n", doNOP, 0, 0, 0, 1);
|
||||
print " public static final String[] gRuleParseStateTable = {\n";
|
||||
printf(" \"\\u%04.4x\\u%04.4x\\u%04.4x\\u%04.4x\\u%04.4x\"\n", doNOP, 0, 0, 0, 1);
|
||||
for ($state=1; $state < $num_states; $state++) {
|
||||
printf(" , \"\\u%04.4x", $state_func_name[$state]);
|
||||
# print " , {$state_func_name[$state],";
|
||||
printf(" , \"\\u%04.4x", $state_func_name[$state]);
|
||||
# print " , {$state_func_name[$state],";
|
||||
if ($state_literal_chars[$state] ne "") {
|
||||
printf("\\u%04.4x", $state_func_name[$state]);
|
||||
}else {
|
||||
|
@ -255,10 +267,10 @@ if ($javaOutput) {
|
|||
}
|
||||
|
||||
# Put out a C++ comment showing the number (index) of this state row,
|
||||
print " // $state ";
|
||||
print " // $state ";
|
||||
print "\n";
|
||||
};
|
||||
print "};\n";
|
||||
print " };\n";
|
||||
print "}\n";
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue