|
From: Benedikt F. <b.f...@gm...> - 2025-10-22 18:34:02
|
Am 22.10.25 um 20:31 schrieb Philipp Klaus Krause: > Am 22.10.25 um 20:16 schrieb Benedikt Freisen via sdcc-devel: >> >> In this case, I would like to suggest to specify that SDCC requires >> that all identifiers are provided in normalization form C. SDCC would >> then likely already supports all valid identifiers (and then some) >> and we can then use a 3rd party library to generate the diagnostic >> messages the standard demands. This library could then even be made >> optional. > > But if we have the external library for the check for normalization, > we could also just normalize, which IMO would be more user-friendly. > > How about the following? > > * The dependency on the unicode library becomes a configure option > (default to on), or it just gets used if found at configure time (like > we already do for treedec). > > * If the library is not present: check identifier if there are any > non-ASCII characters in it. If one is found, emit a warning, stating > that SDCC built without the library has incomplete support for > non-ASCII identifiers. > > * If the library is present: normalize identifiers to normalization > form C, and do the full check for XID_Start/XID_Continue. > > Philipp That sounds like a sensible approach. |