(uprv_strlen(region));
if (regionLen == 0) {
CharString loc = ulocimp_addLikelySubtags(fLocale.getName(), status);
- ulocimp_getSubtags(loc.data(), nullptr, nullptr, &fTargetRegion, nullptr, nullptr, status);
+ ulocimp_getSubtags(loc.toStringPiece(), nullptr, nullptr, &fTargetRegion, nullptr, nullptr, status);
if (U_FAILURE(status)) {
cleanup();
return;
diff --git a/deps/icu-small/source/i18n/tznames_impl.cpp b/deps/icu-small/source/i18n/tznames_impl.cpp
index 9b7ade7f0bb12f..769c9a6526c587 100644
--- a/deps/icu-small/source/i18n/tznames_impl.cpp
+++ b/deps/icu-small/source/i18n/tznames_impl.cpp
@@ -2149,7 +2149,7 @@ TZDBTimeZoneNames::TZDBTimeZoneNames(const Locale& locale)
if (regionLen == 0) {
UErrorCode status = U_ZERO_ERROR;
CharString loc = ulocimp_addLikelySubtags(fLocale.getName(), status);
- ulocimp_getSubtags(loc.data(), nullptr, nullptr, &fRegion, nullptr, nullptr, status);
+ ulocimp_getSubtags(loc.toStringPiece(), nullptr, nullptr, &fRegion, nullptr, nullptr, status);
if (U_SUCCESS(status)) {
useWorld = false;
}
diff --git a/deps/icu-small/source/i18n/tzrule.cpp b/deps/icu-small/source/i18n/tzrule.cpp
index 7507068c8807d8..8d6a37a844cbd8 100644
--- a/deps/icu-small/source/i18n/tzrule.cpp
+++ b/deps/icu-small/source/i18n/tzrule.cpp
@@ -355,9 +355,8 @@ AnnualTimeZoneRule::getNextStart(UDate base,
int32_t prevDSTSavings,
UBool inclusive,
UDate& result) const {
- int32_t year, month, dom, dow, doy, mid;
UErrorCode status = U_ZERO_ERROR;
- Grego::timeToFields(base, year, month, dom, dow, doy, mid, status);
+ int32_t year = Grego::timeToYear(base, status);
U_ASSERT(U_SUCCESS(status));
if (year < fStartYear) {
return getFirstStart(prevRawOffset, prevDSTSavings, result);
@@ -381,9 +380,8 @@ AnnualTimeZoneRule::getPreviousStart(UDate base,
int32_t prevDSTSavings,
UBool inclusive,
UDate& result) const {
- int32_t year, month, dom, dow, doy, mid;
UErrorCode status = U_ZERO_ERROR;
- Grego::timeToFields(base, year, month, dom, dow, doy, mid, status);
+ int32_t year = Grego::timeToYear(base, status);
U_ASSERT(U_SUCCESS(status));
if (year > fEndYear) {
return getFinalStart(prevRawOffset, prevDSTSavings, result);
diff --git a/deps/icu-small/source/i18n/ucln_in.h b/deps/icu-small/source/i18n/ucln_in.h
index 765cdd559fb4e2..74868891c83744 100644
--- a/deps/icu-small/source/i18n/ucln_in.h
+++ b/deps/icu-small/source/i18n/ucln_in.h
@@ -39,6 +39,7 @@ typedef enum ECleanupI18NType {
UCLN_I18N_HEBREW_CALENDAR,
UCLN_I18N_ASTRO_CALENDAR,
UCLN_I18N_DANGI_CALENDAR,
+ UCLN_I18N_PERSIAN_CALENDAR,
UCLN_I18N_CALENDAR,
UCLN_I18N_TIMEZONEFORMAT,
UCLN_I18N_TZDBTIMEZONENAMES,
@@ -62,6 +63,7 @@ typedef enum ECleanupI18NType {
UCLN_I18N_REGION,
UCLN_I18N_LIST_FORMATTER,
UCLN_I18N_NUMSYS,
+ UCLN_I18N_MF2_UNISETS,
UCLN_I18N_COUNT /* This must be last */
} ECleanupI18NType;
diff --git a/deps/icu-small/source/i18n/ucol_sit.cpp b/deps/icu-small/source/i18n/ucol_sit.cpp
index 87387f879d8392..f8fa02fad71997 100644
--- a/deps/icu-small/source/i18n/ucol_sit.cpp
+++ b/deps/icu-small/source/i18n/ucol_sit.cpp
@@ -450,7 +450,7 @@ ucol_prepareShortStringOpen( const char *definition,
ucol_sit_readSpecs(&s, definition, parseError, status);
ucol_sit_calculateWholeLocale(&s, *status);
- CharString buffer = ulocimp_canonicalize(s.locale.data(), *status);
+ CharString buffer = ulocimp_canonicalize(s.locale.toStringPiece(), *status);
UResourceBundle *b = ures_open(U_ICUDATA_COLL, buffer.data(), status);
/* we try to find stuff from keyword */
@@ -514,7 +514,7 @@ ucol_openFromShortString( const char *definition,
#ifdef UCOL_TRACE_SIT
fprintf(stderr, "DEF %s, DATA %s, ERR %s\n", definition, s.locale.data(), u_errorName(*status));
#endif
- CharString buffer = ulocimp_canonicalize(s.locale.data(), *status);
+ CharString buffer = ulocimp_canonicalize(s.locale.toStringPiece(), *status);
UCollator *result = ucol_open(buffer.data(), status);
int32_t i = 0;
diff --git a/deps/icu-small/source/i18n/unicode/calendar.h b/deps/icu-small/source/i18n/unicode/calendar.h
index a04f5b65bd5ba6..4499e281f9c55e 100644
--- a/deps/icu-small/source/i18n/unicode/calendar.h
+++ b/deps/icu-small/source/i18n/unicode/calendar.h
@@ -55,6 +55,7 @@ class ICUServiceFactory;
typedef int32_t UFieldResolutionTable[12][8];
class BasicTimeZone;
+class CharString;
/**
* `Calendar` is an abstract base class for converting between
* a `UDate` object and a set of integer fields such as
@@ -1692,10 +1693,9 @@ class U_I18N_API Calendar : public UObject {
* calendar system. Subclasses should override this method if they can
* provide a more correct or more efficient implementation than the
* default implementation in Calendar.
- * @stable ICU 2.0
+ * @internal
*/
- virtual int32_t handleGetYearLength(int32_t eyear) const;
-
+ virtual int32_t handleGetYearLength(int32_t eyear, UErrorCode& status) const;
/**
* Return the extended year defined by the current fields. This will
@@ -1881,42 +1881,7 @@ class U_I18N_API Calendar : public UObject {
*/
int32_t getActualHelper(UCalendarDateFields field, int32_t startValue, int32_t endValue, UErrorCode &status) const;
-
protected:
- /**
- * The flag which indicates if the current time is set in the calendar.
- * @stable ICU 2.0
- */
- UBool fIsTimeSet;
-
- /**
- * True if the fields are in sync with the currently set time of this Calendar.
- * If false, then the next attempt to get the value of a field will
- * force a recomputation of all fields from the current value of the time
- * field.
- *
- * This should really be named areFieldsInSync, but the old name is retained
- * for backward compatibility.
- * @stable ICU 2.0
- */
- UBool fAreFieldsSet;
-
- /**
- * True if all of the fields have been set. This is initially false, and set to
- * true by computeFields().
- * @stable ICU 2.0
- */
- UBool fAreAllFieldsSet;
-
- /**
- * True if all fields have been virtually set, but have not yet been
- * computed. This occurs only in setTimeInMillis(). A calendar set
- * to this state will compute all fields from the time if it becomes
- * necessary, but otherwise will delay such computation.
- * @stable ICU 3.0
- */
- UBool fAreFieldsVirtuallySet;
-
/**
* Get the current time without recomputing.
*
@@ -1940,14 +1905,7 @@ class U_I18N_API Calendar : public UObject {
*/
int32_t fFields[UCAL_FIELD_COUNT];
-#ifndef U_FORCE_HIDE_DEPRECATED_API
- /**
- * The flags which tell if a specified time field for the calendar is set.
- * @deprecated ICU 2.8 use (fStamp[n]!=kUnset)
- */
- UBool fIsSet[UCAL_FIELD_COUNT];
-#endif // U_FORCE_HIDE_DEPRECATED_API
-
+protected:
/** Special values of stamp[]
* @stable ICU 2.0
*/
@@ -1957,14 +1915,15 @@ class U_I18N_API Calendar : public UObject {
kMinimumUserStamp
};
+private:
/**
* Pseudo-time-stamps which specify when each field was set. There
* are two special values, UNSET and INTERNALLY_SET. Values from
- * MINIMUM_USER_SET to Integer.MAX_VALUE are legal user set values.
- * @stable ICU 2.0
+ * MINIMUM_USER_SET to STAMP_MAX are legal user set values.
*/
- int32_t fStamp[UCAL_FIELD_COUNT];
+ int8_t fStamp[UCAL_FIELD_COUNT];
+protected:
/**
* Subclasses may override this method to compute several fields
* specific to each calendar system. These are:
@@ -2178,7 +2137,7 @@ class U_I18N_API Calendar : public UObject {
/**
* The next available value for fStamp[]
*/
- int32_t fNextStamp;// = MINIMUM_USER_STAMP;
+ int8_t fNextStamp = kMinimumUserStamp;
/**
* Recalculates the time stamp array (fStamp).
@@ -2189,30 +2148,60 @@ class U_I18N_API Calendar : public UObject {
/**
* The current time set for the calendar.
*/
- UDate fTime;
+ UDate fTime = 0;
/**
- * @see #setLenient
+ * Time zone affects the time calculation done by Calendar. Calendar subclasses use
+ * the time zone data to produce the local time. Always set; never nullptr.
*/
- UBool fLenient;
+ TimeZone* fZone = nullptr;
/**
- * Time zone affects the time calculation done by Calendar. Calendar subclasses use
- * the time zone data to produce the local time. Always set; never nullptr.
+ * The flag which indicates if the current time is set in the calendar.
+ */
+ bool fIsTimeSet:1;
+
+ /**
+ * True if the fields are in sync with the currently set time of this Calendar.
+ * If false, then the next attempt to get the value of a field will
+ * force a recomputation of all fields from the current value of the time
+ * field.
+ *
+ * This should really be named areFieldsInSync, but the old name is retained
+ * for backward compatibility.
+ */
+ bool fAreFieldsSet:1;
+
+ /**
+ * True if all of the fields have been set. This is initially false, and set to
+ * true by computeFields().
+ */
+ bool fAreAllFieldsSet:1;
+
+ /**
+ * True if all fields have been virtually set, but have not yet been
+ * computed. This occurs only in setTimeInMillis(). A calendar set
+ * to this state will compute all fields from the time if it becomes
+ * necessary, but otherwise will delay such computation.
*/
- TimeZone* fZone;
+ bool fAreFieldsVirtuallySet:1;
+
+ /**
+ * @see #setLenient
+ */
+ bool fLenient:1;
/**
* Option for repeated wall time
* @see #setRepeatedWallTimeOption
*/
- UCalendarWallTimeOption fRepeatedWallTime;
+ UCalendarWallTimeOption fRepeatedWallTime:3; // Somehow MSVC need 3 bits for UCalendarWallTimeOption
/**
* Option for skipped wall time
* @see #setSkippedWallTimeOption
*/
- UCalendarWallTimeOption fSkippedWallTime;
+ UCalendarWallTimeOption fSkippedWallTime:3; // Somehow MSVC need 3 bits for UCalendarWallTimeOption
/**
* Both firstDayOfWeek and minimalDaysInFirstWeek are locale-dependent. They are
@@ -2222,11 +2211,14 @@ class U_I18N_API Calendar : public UObject {
* out the week count for a specific date for a given locale. These must be set when
* a Calendar is constructed.
*/
- UCalendarDaysOfWeek fFirstDayOfWeek;
- uint8_t fMinimalDaysInFirstWeek;
- UCalendarDaysOfWeek fWeekendOnset;
+ UCalendarDaysOfWeek fFirstDayOfWeek:4; // Somehow MSVC need 4 bits for
+ // UCalendarDaysOfWeek
+ UCalendarDaysOfWeek fWeekendOnset:4; // Somehow MSVC need 4 bits for
+ // UCalendarDaysOfWeek
+ UCalendarDaysOfWeek fWeekendCease:4; // Somehow MSVC need 4 bits for
+ // UCalendarDaysOfWeek
+ uint8_t fMinimalDaysInFirstWeek;
int32_t fWeekendOnsetMillis;
- UCalendarDaysOfWeek fWeekendCease;
int32_t fWeekendCeaseMillis;
/**
@@ -2264,32 +2256,24 @@ class U_I18N_API Calendar : public UObject {
* returned by getGregorianMonth().
* @see #computeGregorianFields
*/
- int32_t fGregorianMonth;
+ int8_t fGregorianMonth;
/**
- * The Gregorian day of the year, as computed by
- * computeGregorianFields() and returned by getGregorianDayOfYear().
+ * The Gregorian day of the month, as computed by
+ * computeGregorianFields() and returned by getGregorianDayOfMonth().
* @see #computeGregorianFields
*/
- int32_t fGregorianDayOfYear;
+ int8_t fGregorianDayOfMonth;
/**
- * The Gregorian day of the month, as computed by
- * computeGregorianFields() and returned by getGregorianDayOfMonth().
+ * The Gregorian day of the year, as computed by
+ * computeGregorianFields() and returned by getGregorianDayOfYear().
* @see #computeGregorianFields
*/
- int32_t fGregorianDayOfMonth;
+ int16_t fGregorianDayOfYear;
/* calculations */
- /**
- * Compute the Gregorian calendar year, month, and day of month from
- * the given Julian day. These values are not stored in fields, but in
- * member variables gregorianXxx. Also compute the DAY_OF_WEEK and
- * DOW_LOCAL fields.
- */
- void computeGregorianAndDOWFields(int32_t julianDay, UErrorCode &ec);
-
protected:
/**
@@ -2359,8 +2343,8 @@ class U_I18N_API Calendar : public UObject {
#endif /* U_HIDE_INTERNAL_API */
private:
- char validLocale[ULOC_FULLNAME_CAPACITY];
- char actualLocale[ULOC_FULLNAME_CAPACITY];
+ CharString* validLocale = nullptr;
+ CharString* actualLocale = nullptr;
public:
#if !UCONFIG_NO_SERVICE
@@ -2563,7 +2547,6 @@ Calendar::internalSet(UCalendarDateFields field, int32_t value)
{
fFields[field] = value;
fStamp[field] = kInternallySet;
- fIsSet[field] = true; // Remove later
}
/**
diff --git a/deps/icu-small/source/i18n/unicode/dcfmtsym.h b/deps/icu-small/source/i18n/unicode/dcfmtsym.h
index 02e12f9c39b2dc..3aecceda03a6ee 100644
--- a/deps/icu-small/source/i18n/unicode/dcfmtsym.h
+++ b/deps/icu-small/source/i18n/unicode/dcfmtsym.h
@@ -48,6 +48,7 @@
U_NAMESPACE_BEGIN
+class CharString;
/**
* This class represents the set of symbols needed by DecimalFormat
* to format numbers. DecimalFormat creates for itself an instance of
@@ -504,8 +505,8 @@ class U_I18N_API DecimalFormatSymbols : public UObject {
Locale locale;
- char actualLocale[ULOC_FULLNAME_CAPACITY];
- char validLocale[ULOC_FULLNAME_CAPACITY];
+ CharString* actualLocale = nullptr;
+ CharString* validLocale = nullptr;
const char16_t* currPattern = nullptr;
UnicodeString currencySpcBeforeSym[UNUM_CURRENCY_SPACING_COUNT];
diff --git a/deps/icu-small/source/i18n/unicode/dtfmtsym.h b/deps/icu-small/source/i18n/unicode/dtfmtsym.h
index df8da36d8153fb..18e2641b588fcd 100644
--- a/deps/icu-small/source/i18n/unicode/dtfmtsym.h
+++ b/deps/icu-small/source/i18n/unicode/dtfmtsym.h
@@ -43,6 +43,7 @@ U_NAMESPACE_BEGIN
/* forward declaration */
class SimpleDateFormat;
class Hashtable;
+class CharString;
/**
* DateFormatSymbols is a public class for encapsulating localizable date-time
@@ -917,8 +918,8 @@ class U_I18N_API DateFormatSymbols final : public UObject {
/** valid/actual locale information
* these are always ICU locales, so the length should not be a problem
*/
- char validLocale[ULOC_FULLNAME_CAPACITY];
- char actualLocale[ULOC_FULLNAME_CAPACITY];
+ CharString* validLocale = nullptr;
+ CharString* actualLocale = nullptr;
DateFormatSymbols() = delete; // default constructor not implemented
diff --git a/deps/icu-small/source/i18n/unicode/format.h b/deps/icu-small/source/i18n/unicode/format.h
index a21e61ad56d85c..3d435f0de7e367 100644
--- a/deps/icu-small/source/i18n/unicode/format.h
+++ b/deps/icu-small/source/i18n/unicode/format.h
@@ -45,6 +45,7 @@
U_NAMESPACE_BEGIN
+class CharString;
/**
* Base class for all formats. This is an abstract base class which
* specifies the protocol for classes which convert other objects or
@@ -297,8 +298,8 @@ class U_I18N_API Format : public UObject {
UParseError& parseError);
private:
- char actualLocale[ULOC_FULLNAME_CAPACITY];
- char validLocale[ULOC_FULLNAME_CAPACITY];
+ CharString* actualLocale = nullptr;
+ CharString* validLocale = nullptr;
};
U_NAMESPACE_END
diff --git a/deps/icu-small/source/i18n/unicode/gregocal.h b/deps/icu-small/source/i18n/unicode/gregocal.h
index 5112548522d557..cd84471c9ba1a6 100644
--- a/deps/icu-small/source/i18n/unicode/gregocal.h
+++ b/deps/icu-small/source/i18n/unicode/gregocal.h
@@ -518,7 +518,7 @@ class U_I18N_API GregorianCalendar: public Calendar {
* default implementation in Calendar.
* @stable ICU 2.0
*/
- virtual int32_t handleGetYearLength(int32_t eyear) const override;
+ virtual int32_t handleGetYearLength(int32_t eyear, UErrorCode& status) const override;
/**
* return the length of the given month.
diff --git a/deps/icu-small/source/i18n/unicode/measunit.h b/deps/icu-small/source/i18n/unicode/measunit.h
index b23897192eb4cb..f0abd4f4f92f44 100644
--- a/deps/icu-small/source/i18n/unicode/measunit.h
+++ b/deps/icu-small/source/i18n/unicode/measunit.h
@@ -105,21 +105,19 @@ typedef enum UMeasurePrefix {
*/
UMEASURE_PREFIX_YOTTA = UMEASURE_PREFIX_ONE + 24,
-#ifndef U_HIDE_DRAFT_API
/**
* SI prefix: ronna, 10^27.
*
- * @draft ICU 75
+ * @stable ICU 75
*/
UMEASURE_PREFIX_RONNA = UMEASURE_PREFIX_ONE + 27,
/**
* SI prefix: quetta, 10^30.
*
- * @draft ICU 75
+ * @stable ICU 75
*/
UMEASURE_PREFIX_QUETTA = UMEASURE_PREFIX_ONE + 30,
-#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_INTERNAL_API
/**
@@ -268,21 +266,19 @@ typedef enum UMeasurePrefix {
*/
UMEASURE_PREFIX_YOCTO = UMEASURE_PREFIX_ONE + -24,
-#ifndef U_HIDE_DRAFT_API
/**
* SI prefix: ronto, 10^-27.
*
- * @draft ICU 75
+ * @stable ICU 75
*/
UMEASURE_PREFIX_RONTO = UMEASURE_PREFIX_ONE + -27,
/**
* SI prefix: quecto, 10^-30.
*
- * @draft ICU 75
+ * @stable ICU 75
*/
UMEASURE_PREFIX_QUECTO = UMEASURE_PREFIX_ONE + -30,
-#endif /* U_HIDE_DRAFT_API */
#ifndef U_HIDE_INTERNAL_API
/**
@@ -430,16 +426,19 @@ class U_I18N_API MeasureUnit: public UObject {
MeasureUnit(MeasureUnit &&other) noexcept;
/**
- * Construct a MeasureUnit from a CLDR Core Unit Identifier, defined in UTS
- * 35. (Core unit identifiers and mixed unit identifiers are supported, long
- * unit identifiers are not.) Validates and canonicalizes the identifier.
+ * Constructs a MeasureUnit from a CLDR Core Unit Identifier, as defined in UTS 35.
+ * This method supports core unit identifiers and mixed unit identifiers.
+ * It validates and canonicalizes the given identifier.
+ *
*
+ * Example usage:
*
- * MeasureUnit example = MeasureUnit::forIdentifier("furlong-per-nanosecond")
+ * MeasureUnit example = MeasureUnit::forIdentifier("meter-per-second", status);
*
*
- * @param identifier The CLDR Unit Identifier.
- * @param status Set if the identifier is invalid.
+ * @param identifier the CLDR Unit Identifier
+ * @param status Set error if the identifier is invalid.
+ * @return the corresponding MeasureUnit
* @stable ICU 67
*/
static MeasureUnit forIdentifier(StringPiece identifier, UErrorCode& status);
@@ -552,6 +551,44 @@ class U_I18N_API MeasureUnit: public UObject {
*/
UMeasurePrefix getPrefix(UErrorCode& status) const;
+#ifndef U_HIDE_DRAFT_API
+
+ /**
+ * Creates a new MeasureUnit with a specified constant denominator.
+ *
+ * This method is applicable only to COMPOUND and SINGLE units. If invoked on a
+ * MIXED unit, an error will be set in the status.
+ *
+ * NOTE: If the constant denominator is set to 0, it means that you are removing
+ * the constant denominator.
+ *
+ * @param denominator The constant denominator to set.
+ * @param status Set if this is not a COMPOUND or SINGLE unit or if another error occurs.
+ * @return A new MeasureUnit with the specified constant denominator.
+ * @draft ICU 77
+ */
+ MeasureUnit withConstantDenominator(uint64_t denominator, UErrorCode &status) const;
+
+ /**
+ * Retrieves the constant denominator for this COMPOUND unit.
+ *
+ * Examples:
+ * - For the unit "liter-per-1000-kiloliter", the constant denominator is 1000.
+ * - For the unit "liter-per-kilometer", the constant denominator is zero.
+ *
+ * This method is applicable only to COMPOUND and SINGLE units. If invoked on
+ * a MIXED unit, an error will be set in the status.
+ *
+ * NOTE: If no constant denominator exists, the method returns 0.
+ *
+ * @param status Set if this is not a COMPOUND or SINGLE unit or if another error occurs.
+ * @return The value of the constant denominator.
+ * @draft ICU 77
+ */
+ uint64_t getConstantDenominator(UErrorCode &status) const;
+
+#endif /* U_HIDE_DRAFT_API */
+
/**
* Creates a MeasureUnit which is this SINGLE unit augmented with the specified dimensionality
* (power). For example, if dimensionality is 2, the unit will be squared.
@@ -591,7 +628,9 @@ class U_I18N_API MeasureUnit: public UObject {
* NOTE: Only works on SINGLE and COMPOUND units. If this is a MIXED unit, an error will
* occur. For more information, see UMeasureUnitComplexity.
*
- * @param status Set if this is a MIXED unit or if another error occurs.
+ * NOTE: An Error will be returned for units that have a constant denominator.
+ *
+ * @param status Set if this is a MIXED unit, has a constant denominator or if another error occurs.
* @return The reciprocal of the target unit.
* @stable ICU 67
*/
@@ -627,6 +666,10 @@ class U_I18N_API MeasureUnit: public UObject {
*
* If this is a SINGLE unit, an array of length 1 will be returned.
*
+ * NOTE: For units with a constant denominator, the returned single units will
+ * not include the constant denominator. To obtain the constant denominator,
+ * retrieve it from the original unit.
+ *
* @param status Set if an error occurs.
* @return A pair with the list of units as a LocalArray and the number of units in the list.
* @stable ICU 68
@@ -1152,6 +1195,24 @@ class U_I18N_API MeasureUnit: public UObject {
*/
static MeasureUnit getPermyriad();
+#ifndef U_HIDE_DRAFT_API
+ /**
+ * Returns by pointer, unit of concentr: portion-per-1e9.
+ * Caller owns returned value and must free it.
+ * Also see {@link #getPortionPer1E9()}.
+ * @param status ICU error code.
+ * @draft ICU 77
+ */
+ static MeasureUnit *createPortionPer1E9(UErrorCode &status);
+
+ /**
+ * Returns by value, unit of concentr: portion-per-1e9.
+ * Also see {@link #createPortionPer1E9()}.
+ * @draft ICU 77
+ */
+ static MeasureUnit getPortionPer1E9();
+#endif /* U_HIDE_DRAFT_API */
+
/**
* Returns by pointer, unit of consumption: liter-per-100-kilometer.
* Caller owns returned value and must free it.
diff --git a/deps/icu-small/source/i18n/unicode/messageformat2.h b/deps/icu-small/source/i18n/unicode/messageformat2.h
index c5459f042f40f8..926d14318d17eb 100644
--- a/deps/icu-small/source/i18n/unicode/messageformat2.h
+++ b/deps/icu-small/source/i18n/unicode/messageformat2.h
@@ -8,6 +8,8 @@
#if U_SHOW_CPLUSPLUS_API
+#if !UCONFIG_NO_NORMALIZATION
+
#if !UCONFIG_NO_FORMATTING
#if !UCONFIG_NO_MF2
@@ -20,6 +22,7 @@
#include "unicode/messageformat2_arguments.h"
#include "unicode/messageformat2_data_model.h"
#include "unicode/messageformat2_function_registry.h"
+#include "unicode/normalizer2.h"
#include "unicode/unistr.h"
#ifndef U_HIDE_DEPRECATED_API
@@ -30,8 +33,8 @@ namespace message2 {
class Environment;
class MessageContext;
- class ResolvedSelector;
class StaticErrors;
+ class InternalValue;
/**
* MessageFormatter is a Technical Preview API implementing MessageFormat 2.0.
@@ -325,6 +328,8 @@ namespace message2 {
private:
friend class Builder;
+ friend class Checker;
+ friend class MessageArguments;
friend class MessageContext;
MessageFormatter(const MessageFormatter::Builder& builder, UErrorCode &status);
@@ -334,9 +339,6 @@ namespace message2 {
// Do not define default assignment operator
const MessageFormatter &operator=(const MessageFormatter &) = delete;
- ResolvedSelector resolveVariables(const Environment& env, const data_model::Operand&, MessageContext&, UErrorCode &) const;
- ResolvedSelector resolveVariables(const Environment& env, const data_model::Expression&, MessageContext&, UErrorCode &) const;
-
// Selection methods
// Takes a vector of FormattedPlaceholders
@@ -346,31 +348,35 @@ namespace message2 {
// Takes a vector of vectors of strings (input) and a vector of PrioritizedVariants (input/output)
void sortVariants(const UVector&, UVector&, UErrorCode&) const;
// Takes a vector of strings (input) and a vector of strings (output)
- void matchSelectorKeys(const UVector&, MessageContext&, ResolvedSelector&& rv, UVector&, UErrorCode&) const;
+ void matchSelectorKeys(const UVector&, MessageContext&, InternalValue* rv, UVector&, UErrorCode&) const;
// Takes a vector of FormattedPlaceholders (input),
// and a vector of vectors of strings (output)
void resolvePreferences(MessageContext&, UVector&, UVector&, UErrorCode&) const;
// Formatting methods
+
+ // Used for normalizing variable names and keys for comparison
+ UnicodeString normalizeNFC(const UnicodeString&) const;
[[nodiscard]] FormattedPlaceholder formatLiteral(const data_model::Literal&) const;
void formatPattern(MessageContext&, const Environment&, const data_model::Pattern&, UErrorCode&, UnicodeString&) const;
- // Formats a call to a formatting function
+ // Evaluates a function call
// Dispatches on argument type
- [[nodiscard]] FormattedPlaceholder evalFormatterCall(FormattedPlaceholder&& argument,
- MessageContext& context,
- UErrorCode& status) const;
+ [[nodiscard]] InternalValue* evalFunctionCall(FormattedPlaceholder&& argument,
+ MessageContext& context,
+ UErrorCode& status) const;
// Dispatches on function name
- [[nodiscard]] FormattedPlaceholder evalFormatterCall(const FunctionName& functionName,
- FormattedPlaceholder&& argument,
- FunctionOptions&& options,
- MessageContext& context,
- UErrorCode& status) const;
- // Formats an expression that appears as a selector
- ResolvedSelector formatSelectorExpression(const Environment& env, const data_model::Expression&, MessageContext&, UErrorCode&) const;
+ [[nodiscard]] InternalValue* evalFunctionCall(const FunctionName& functionName,
+ InternalValue* argument,
+ FunctionOptions&& options,
+ MessageContext& context,
+ UErrorCode& status) const;
// Formats an expression that appears in a pattern or as the definition of a local variable
- [[nodiscard]] FormattedPlaceholder formatExpression(const Environment&, const data_model::Expression&, MessageContext&, UErrorCode&) const;
+ [[nodiscard]] InternalValue* formatExpression(const Environment&,
+ const data_model::Expression&,
+ MessageContext&,
+ UErrorCode&) const;
[[nodiscard]] FunctionOptions resolveOptions(const Environment& env, const OptionMap&, MessageContext&, UErrorCode&) const;
- [[nodiscard]] FormattedPlaceholder formatOperand(const Environment&, const data_model::Operand&, MessageContext&, UErrorCode&) const;
+ [[nodiscard]] InternalValue* formatOperand(const Environment&, const data_model::Operand&, MessageContext&, UErrorCode&) const;
[[nodiscard]] FormattedPlaceholder evalArgument(const data_model::VariableName&, MessageContext&, UErrorCode&) const;
void formatSelectors(MessageContext& context, const Environment& env, UErrorCode &status, UnicodeString& result) const;
@@ -445,6 +451,10 @@ namespace message2 {
// formatting methods return best-effort output.
// The default is false.
bool signalErrors = false;
+
+ // Used for implementing normalizeNFC()
+ const Normalizer2* nfcNormalizer = nullptr;
+
}; // class MessageFormatter
} // namespace message2
@@ -457,6 +467,8 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* #if !UCONFIG_NO_NORMALIZATION */
+
#endif /* U_SHOW_CPLUSPLUS_API */
#endif // MESSAGEFORMAT2_H
diff --git a/deps/icu-small/source/i18n/unicode/messageformat2_arguments.h b/deps/icu-small/source/i18n/unicode/messageformat2_arguments.h
index c43d96191f16f1..07c96f892bcaff 100644
--- a/deps/icu-small/source/i18n/unicode/messageformat2_arguments.h
+++ b/deps/icu-small/source/i18n/unicode/messageformat2_arguments.h
@@ -8,6 +8,8 @@
#if U_SHOW_CPLUSPLUS_API
+#if !UCONFIG_NO_NORMALIZATION
+
#if !UCONFIG_NO_FORMATTING
#if !UCONFIG_NO_MF2
@@ -43,7 +45,7 @@ template class U_I18N_API LocalArray;
namespace message2 {
- class MessageContext;
+ class MessageFormatter;
// Arguments
// ----------
@@ -112,7 +114,9 @@ namespace message2 {
private:
friend class MessageContext;
- const Formattable* getArgument(const data_model::VariableName&, UErrorCode&) const;
+ const Formattable* getArgument(const MessageFormatter&,
+ const data_model::VariableName&,
+ UErrorCode&) const;
// Avoids using Hashtable so that code constructing a Hashtable
// doesn't have to appear in this header file
@@ -131,6 +135,8 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* #if !UCONFIG_NO_NORMALIZATION */
+
#endif /* U_SHOW_CPLUSPLUS_API */
#endif // MESSAGEFORMAT2_ARGUMENTS_H
diff --git a/deps/icu-small/source/i18n/unicode/messageformat2_data_model.h b/deps/icu-small/source/i18n/unicode/messageformat2_data_model.h
index 0c836af1bdfd35..fd9b6432a5d1ee 100644
--- a/deps/icu-small/source/i18n/unicode/messageformat2_data_model.h
+++ b/deps/icu-small/source/i18n/unicode/messageformat2_data_model.h
@@ -8,6 +8,8 @@
#if U_SHOW_CPLUSPLUS_API
+#if !UCONFIG_NO_NORMALIZATION
+
#if !UCONFIG_NO_FORMATTING
#if !UCONFIG_NO_MF2
@@ -2211,7 +2213,7 @@ namespace message2 {
friend class MFDataModel;
- Matcher(Expression* ss, int32_t ns, Variant* vs, int32_t nv);
+ Matcher(VariableName* ss, int32_t ns, Variant* vs, int32_t nv);
Matcher() {}
// A Matcher may have numSelectors=0 and numVariants=0
@@ -2219,8 +2221,8 @@ namespace message2 {
// So we have to keep a separate flag to track failed copies.
bool bogus = false;
- // The expressions that are being matched on.
- LocalArray selectors;
+ // The variables that are being matched on.
+ LocalArray selectors;
// The number of selectors
int32_t numSelectors = 0;
// The list of `when` clauses (case arms).
@@ -2328,13 +2330,13 @@ namespace message2 {
* @internal ICU 75 technology preview
* @deprecated This API is for technology preview only.
*/
- const std::vector getSelectors() const {
+ std::vector getSelectors() const {
if (std::holds_alternative(body)) {
return {};
}
const Matcher* match = std::get_if(&body);
// match must be non-null, given the previous check
- return toStdVector(match->selectors.getAlias(), match->numSelectors);
+ return toStdVector(match->selectors.getAlias(), match->numSelectors);
}
/**
* Accesses the variants. Returns an empty vector if this is a pattern message.
@@ -2462,17 +2464,17 @@ namespace message2 {
*/
Builder& addBinding(Binding&& b, UErrorCode& status);
/**
- * Adds a selector expression. Copies `expression`.
+ * Adds a selector variable.
* If a pattern was previously set, clears the pattern.
*
- * @param selector Expression to add as a selector. Passed by move.
+ * @param selector Variable to add as a selector. Passed by move.
* @param errorCode Input/output error code
* @return A reference to the builder.
*
* @internal ICU 75 technology preview
* @deprecated This API is for technology preview only.
*/
- Builder& addSelector(Expression&& selector, UErrorCode& errorCode) noexcept;
+ Builder& addSelector(VariableName&& selector, UErrorCode& errorCode);
/**
* Adds a single variant.
* If a pattern was previously set using `setPattern()`, clears the pattern.
@@ -2564,7 +2566,7 @@ namespace message2 {
int32_t bindingsLen = 0;
const Binding* getLocalVariablesInternal() const;
- const Expression* getSelectorsInternal() const;
+ const VariableName* getSelectorsInternal() const;
const Variant* getVariantsInternal() const;
int32_t numSelectors() const {
@@ -2592,6 +2594,8 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* #if !UCONFIG_NO_NORMALIZATION */
+
#endif /* U_SHOW_CPLUSPLUS_API */
#endif // MESSAGEFORMAT_DATA_MODEL_H
diff --git a/deps/icu-small/source/i18n/unicode/messageformat2_formattable.h b/deps/icu-small/source/i18n/unicode/messageformat2_formattable.h
index 8a779adb9ab348..d7f4130f493b99 100644
--- a/deps/icu-small/source/i18n/unicode/messageformat2_formattable.h
+++ b/deps/icu-small/source/i18n/unicode/messageformat2_formattable.h
@@ -8,6 +8,8 @@
#if U_SHOW_CPLUSPLUS_API
+#if !UCONFIG_NO_NORMALIZATION
+
#if !UCONFIG_NO_FORMATTING
#if !UCONFIG_NO_MF2
@@ -549,6 +551,7 @@ class U_I18N_API FunctionOptions : public UObject {
*/
FunctionOptions& operator=(const FunctionOptions&) = delete;
private:
+ friend class InternalValue;
friend class MessageFormatter;
friend class StandardFunctions;
@@ -566,12 +569,10 @@ class U_I18N_API FunctionOptions : public UObject {
// that code in the header because it would have to call internal Hashtable methods.
ResolvedFunctionOption* options;
int32_t functionOptionsLen = 0;
-}; // class FunctionOptions
-
- // TODO doc comments
- // Encapsulates either a formatted string or formatted number;
- // more output types could be added in the future.
+ // Returns a new FunctionOptions
+ FunctionOptions mergeOptions(FunctionOptions&& other, UErrorCode&);
+}; // class FunctionOptions
/**
* A `FormattedValue` represents the result of formatting a `message2::Formattable`.
@@ -1010,6 +1011,8 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* #if !UCONFIG_NO_NORMALIZATION */
+
#endif /* U_SHOW_CPLUSPLUS_API */
#endif // MESSAGEFORMAT2_FORMATTABLE_H
diff --git a/deps/icu-small/source/i18n/unicode/messageformat2_function_registry.h b/deps/icu-small/source/i18n/unicode/messageformat2_function_registry.h
index b8429e3b83aa91..37690d5e04a1e3 100644
--- a/deps/icu-small/source/i18n/unicode/messageformat2_function_registry.h
+++ b/deps/icu-small/source/i18n/unicode/messageformat2_function_registry.h
@@ -8,6 +8,8 @@
#if U_SHOW_CPLUSPLUS_API
+#if !UCONFIG_NO_NORMALIZATION
+
#if !UCONFIG_NO_FORMATTING
#if !UCONFIG_NO_MF2
@@ -422,6 +424,8 @@ U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
+#endif /* #if !UCONFIG_NO_NORMALIZATION */
+
#endif /* U_SHOW_CPLUSPLUS_API */
#endif // MESSAGEFORMAT2_FUNCTION_REGISTRY_H
diff --git a/deps/icu-small/source/i18n/unicode/numberformatter.h b/deps/icu-small/source/i18n/unicode/numberformatter.h
index b02d987ce2bcba..28531afeb10fd3 100644
--- a/deps/icu-small/source/i18n/unicode/numberformatter.h
+++ b/deps/icu-small/source/i18n/unicode/numberformatter.h
@@ -2609,12 +2609,11 @@ class U_I18N_API LocalizedNumberFormatter
*/
Format* toFormat(UErrorCode& status) const;
-#ifndef U_HIDE_DRAFT_API
/**
* Disassociate the locale from this formatter.
*
* @return The fluent chain.
- * @draft ICU 75
+ * @stable ICU 75
*/
UnlocalizedNumberFormatter withoutLocale() const &;
@@ -2623,10 +2622,9 @@ class U_I18N_API LocalizedNumberFormatter
*
* @return The fluent chain.
* @see #withoutLocale
- * @draft ICU 75
+ * @stable ICU 75
*/
UnlocalizedNumberFormatter withoutLocale() &&;
-#endif // U_HIDE_DRAFT_API
/**
* Default constructor: puts the formatter into a valid but undefined state.
diff --git a/deps/icu-small/source/i18n/unicode/numberrangeformatter.h b/deps/icu-small/source/i18n/unicode/numberrangeformatter.h
index b8bbc1ba072d5b..bb6e43bed8cf25 100644
--- a/deps/icu-small/source/i18n/unicode/numberrangeformatter.h
+++ b/deps/icu-small/source/i18n/unicode/numberrangeformatter.h
@@ -503,12 +503,11 @@ class U_I18N_API LocalizedNumberRangeFormatter
FormattedNumberRange formatFormattableRange(
const Formattable& first, const Formattable& second, UErrorCode& status) const;
-#ifndef U_HIDE_DRAFT_API
/**
* Disassociate the locale from this formatter.
*
* @return The fluent chain.
- * @draft ICU 75
+ * @stable ICU 75
*/
UnlocalizedNumberRangeFormatter withoutLocale() const &;
@@ -517,10 +516,9 @@ class U_I18N_API LocalizedNumberRangeFormatter
*
* @return The fluent chain.
* @see #withoutLocale
- * @draft ICU 75
+ * @stable ICU 75
*/
UnlocalizedNumberRangeFormatter withoutLocale() &&;
-#endif // U_HIDE_DRAFT_API
/**
* Default constructor: puts the formatter into a valid but undefined state.
diff --git a/deps/icu-small/source/i18n/unicode/rbnf.h b/deps/icu-small/source/i18n/unicode/rbnf.h
index f42d91d776fed9..5a23f723363c9b 100644
--- a/deps/icu-small/source/i18n/unicode/rbnf.h
+++ b/deps/icu-small/source/i18n/unicode/rbnf.h
@@ -88,23 +88,24 @@ enum URBNFRuleSetTag {
};
/**
- * The RuleBasedNumberFormat class formats numbers according to a set of rules. This number formatter is
- * typically used for spelling out numeric values in words (e.g., 25,3476 as
- * "twenty-five thousand three hundred seventy-six" or "vingt-cinq mille trois
+ * The RuleBasedNumberFormat class formats numbers according to a set of rules.
+ *
+ * This number formatter is typically used for spelling out numeric values in words (e.g., 25,3476
+ * as "twenty-five thousand three hundred seventy-six" or "vingt-cinq mille trois
* cents soixante-seize" or
* "fünfundzwanzigtausenddreihundertsechsundsiebzig"), but can also be used for
* other complicated formatting tasks, such as formatting a number of seconds as hours,
- * minutes and seconds (e.g., 3,730 as "1:02:10").
+ * minutes and seconds (e.g., 3,730 as "1:02:10").
*
* The resources contain three predefined formatters for each locale: spellout, which
* spells out a value in words (123 is "one hundred twenty-three"); ordinal, which
* appends an ordinal suffix to the end of a numeral (123 is "123rd"); and
* duration, which shows a duration in seconds as hours, minutes, and seconds (123 is
- * "2:03"). The client can also define more specialized RuleBasedNumberFormats
+ * "2:03"). The client can also define more specialized RuleBasedNumberFormat
s
* by supplying programmer-defined rule sets.
*
- * The behavior of a RuleBasedNumberFormat is specified by a textual description
- * that is either passed to the constructor as a String or loaded from a resource
+ *
The behavior of a RuleBasedNumberFormat
is specified by a textual description
+ * that is either passed to the constructor as a String
or loaded from a resource
* bundle. In its simplest form, the description consists of a semicolon-delimited list of rules.
* Each rule has a string of output text and a value or range of values it is applicable to.
* In a typical spellout rule set, the first twenty rules are the words for the numbers from
@@ -116,7 +117,8 @@ enum URBNFRuleSetTag {
*
For larger numbers, we can use the preceding set of rules to format the ones place, and
* we only have to supply the words for the multiples of 10:
*
- * 20: twenty[->>];
+ *
+ * 20: twenty[->>];
* 30: thirty[->>];
* 40: forty[->>];
* 50: fifty[->>];
@@ -137,7 +139,8 @@ enum URBNFRuleSetTag {
* For even larger numbers, we can actually look up several parts of the number in the
* list:
*
- * 100: << hundred[ >>];
+ *
+ * 100: << hundred[ >>];
*
* The "<<" represents a new kind of substitution. The << isolates
* the hundreds digit (and any digits to its left), formats it using this same rule set, and
@@ -155,13 +158,15 @@ enum URBNFRuleSetTag {
*
*
This rule covers values up to 999, at which point we add another rule:
*
- * 1000: << thousand[ >>];
+ *
+ * 1000: << thousand[ >>];
*
* Again, the meanings of the brackets and substitution tokens shift because the rule's
* base value is a higher power of 10, changing the rule's divisor. This rule can actually be
* used all the way up to 999,999. This allows us to finish out the rules as follows:
*
- * 1,000,000: << million[ >>];
+ *
+ * 1,000,000: << million[ >>];
* 1,000,000,000: << billion[ >>];
* 1,000,000,000,000: << trillion[ >>];
* 1,000,000,000,000,000: OUT OF RANGE!;
@@ -177,30 +182,30 @@ enum URBNFRuleSetTag {
* To see how these rules actually work in practice, consider the following example:
* Formatting 25,430 with this rule set would work like this:
*
- *
+ *
*
- * << thousand >> |
- * [the rule whose base value is 1,000 is applicable to 25,340] |
+ * << thousand >> |
+ * [the rule whose base value is 1,000 is applicable to 25,340] |
*
*
- * twenty->> thousand >> |
- * [25,340 over 1,000 is 25. The rule for 20 applies.] |
+ * twenty->> thousand >> |
+ * [25,340 over 1,000 is 25. The rule for 20 applies.] |
*
*
- * twenty-five thousand >> |
- * [25 mod 10 is 5. The rule for 5 is "five." |
+ * twenty-five thousand >> |
+ * [25 mod 10 is 5. The rule for 5 is "five." |
*
*
- * twenty-five thousand << hundred >> |
- * [25,340 mod 1,000 is 340. The rule for 100 applies.] |
+ * twenty-five thousand << hundred >> |
+ * [25,340 mod 1,000 is 340. The rule for 100 applies.] |
*
*
- * twenty-five thousand three hundred >> |
- * [340 over 100 is 3. The rule for 3 is "three."] |
+ * twenty-five thousand three hundred >> |
+ * [340 over 100 is 3. The rule for 3 is "three."] |
*
*
- * twenty-five thousand three hundred forty |
- * [340 mod 100 is 40. The rule for 40 applies. Since 40 divides
+ * | twenty-five thousand three hundred forty |
+ * [340 mod 100 is 40. The rule for 40 applies. Since 40 divides
* evenly by 10, the hyphen and substitution in the brackets are omitted.] |
*
*
@@ -237,20 +242,20 @@ enum URBNFRuleSetTag {
*
*
*
- * The description of a RuleBasedNumberFormat's behavior consists of one or more rule
+ * The description of a RuleBasedNumberFormat
's behavior consists of one or more rule
* sets. Each rule set consists of a name, a colon, and a list of rules. A rule
* set name must begin with a % sign. Rule sets with names that begin with a single % sign
* are public: the caller can specify that they be used to format and parse numbers.
* Rule sets with names that begin with %% are private: they exist only for the use
* of other rule sets. If a formatter only has one rule set, the name may be omitted.
*
- * The user can also specify a special "rule set" named %%lenient-parse.
- * The body of %%lenient-parse isn't a set of number-formatting rules, but a RuleBasedCollator
+ *
The user can also specify a special "rule set" named %%lenient-parse
.
+ * The body of %%lenient-parse
isn't a set of number-formatting rules, but a RuleBasedCollator
* description which is used to define equivalences for lenient parsing. For more information
- * on the syntax, see RuleBasedCollator. For more information on lenient parsing,
- * see setLenientParse(). Note: symbols that have syntactic meaning
+ * on the syntax, see RuleBasedCollator
. For more information on lenient parsing,
+ * see setLenientParse()
. Note: symbols that have syntactic meaning
* in collation rules, such as '&', have no particular meaning when appearing outside
- * of the lenient-parse rule set.
+ * of the lenient-parse
rule set.
*
* The body of a rule set consists of an ordered, semicolon-delimited list of rules.
* Internally, every rule has a base value, a divisor, rule text, and zero, one, or two substitutions.
@@ -260,42 +265,46 @@ enum URBNFRuleSetTag {
*
A rule descriptor can take one of the following forms (text in italics is the
* name of a token):
*
- *
+ *
*
- * bv: |
- * bv specifies the rule's base value. bv is a decimal
+ * | Descriptor |
+ * Description |
+ *
+ *
+ * bv: |
+ * bv specifies the rule's base value. bv is a decimal
* number expressed using ASCII digits. bv may contain spaces, period, and commas,
* which are ignored. The rule's divisor is the highest power of 10 less than or equal to
* the base value. |
*
- *
- * bv/rad: |
- * bv specifies the rule's base value. The rule's divisor is the
+ * |
+ * bv/rad: |
+ * bv specifies the rule's base value. The rule's divisor is the
* highest power of rad less than or equal to the base value. |
*
- *
- * bv>: |
- * bv specifies the rule's base value. To calculate the divisor,
+ * |
+ * bv>: |
+ * bv specifies the rule's base value. To calculate the divisor,
* let the radix be 10, and the exponent be the highest exponent of the radix that yields a
* result less than or equal to the base value. Every > character after the base value
* decreases the exponent by 1. If the exponent is positive or 0, the divisor is the radix
* raised to the power of the exponent; otherwise, the divisor is 1. |
*
- *
- * bv/rad>: |
- * bv specifies the rule's base value. To calculate the divisor,
+ * |
+ * bv/rad>: |
+ * bv specifies the rule's base value. To calculate the divisor,
* let the radix be rad, and the exponent be the highest exponent of the radix that
* yields a result less than or equal to the base value. Every > character after the radix
* decreases the exponent by 1. If the exponent is positive or 0, the divisor is the radix
* raised to the power of the exponent; otherwise, the divisor is 1. |
*
- *
- * -x: |
- * The rule is a negative-number rule. |
+ *
+ * -x: |
+ * The rule is a negative-number rule. |
*
- *
- * x.x: |
- * The rule is an improper fraction rule. If the full stop in
+ * |
+ * x.x: |
+ * The rule is an improper fraction rule. If the full stop in
* the middle of the rule name is replaced with the decimal point
* that is used in the language or DecimalFormatSymbols, then that rule will
* have precedence when formatting and parsing this rule. For example, some
@@ -304,39 +313,39 @@ enum URBNFRuleSetTag {
* handle the decimal point that matches the language's natural spelling of
* the punctuation of either the full stop or comma. |
*
- *
- * 0.x: |
- * The rule is a proper fraction rule. If the full stop in
+ * |
+ * 0.x: |
+ * The rule is a proper fraction rule. If the full stop in
* the middle of the rule name is replaced with the decimal point
* that is used in the language or DecimalFormatSymbols, then that rule will
* have precedence when formatting and parsing this rule. For example, some
* languages use the comma, and can thus be written as 0,x instead. For example,
* you can use "0.x: point >>;0,x: comma >>;" to
* handle the decimal point that matches the language's natural spelling of
- * the punctuation of either the full stop or comma. |
+ * the punctuation of either the full stop or comma
*
- *
- * x.0: |
- * The rule is a default rule. If the full stop in
+ * |
+ * x.0: |
+ * The rule is a default rule. If the full stop in
* the middle of the rule name is replaced with the decimal point
* that is used in the language or DecimalFormatSymbols, then that rule will
* have precedence when formatting and parsing this rule. For example, some
* languages use the comma, and can thus be written as x,0 instead. For example,
* you can use "x.0: << point;x,0: << comma;" to
* handle the decimal point that matches the language's natural spelling of
- * the punctuation of either the full stop or comma. |
+ * the punctuation of either the full stop or comma
*
- *
- * Inf: |
- * The rule for infinity. |
+ *
+ * Inf: |
+ * The rule for infinity. |
*
- *
- * NaN: |
- * The rule for an IEEE 754 NaN (not a number). |
+ *
+ * NaN: |
+ * The rule for an IEEE 754 NaN (not a number). |
*
- *
- * nothing |
- * If the rule's rule descriptor is left out, the base value is one plus the
+ * |
+ * nothing |
+ * If the rule's rule descriptor is left out, the base value is one plus the
* preceding rule's base value (or zero if this is the first rule in the list) in a normal
* rule set. In a fraction rule set, the base value is the same as the preceding rule's
* base value. |
@@ -352,8 +361,8 @@ enum URBNFRuleSetTag {
* algorithms: If the rule set is a regular rule set, do the following:
*
*