Updated invitation: gccrs community call @ lun. 16 oct. 2023 1pm - 1:30pm (CEST) (gcc-rust@gcc.gnu.org)

2023-10-16 Thread Arthur Cohen
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:Europe/Paris
X-LIC-LOCATION:Europe/Paris
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T02
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T03
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTART;TZID=Europe/Paris:20231016T13
DTEND;TZID=Europe/Paris:20231016T133000
DTSTAMP:20231016T083301Z
ORGANIZER;CN=gccrs:mailto:7060a0923ffebd3cb52b1afef35a28ff7b64f05962c9af84c
 23b1847f1f5f...@group.calendar.google.com
UID:7l8eqqg6vb8oje0rr87uc5c0i5_r20230410t090...@google.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
 TRUE;CN=pierre-emmanuel.pa...@embecosm.com;X-NUM-GUESTS=0:mailto:pierre-emm
 anuel.pa...@embecosm.com
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
 TRUE;CN=d...@kataplop.net;X-NUM-GUESTS=0:mailto:d...@kataplop.net
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
 TRUE;CN=gcc-rust@gcc.gnu.org;X-NUM-GUESTS=0:mailto:gcc-rust@gcc.gnu.org
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=
 TRUE;CN=maha...@gmail.com;X-NUM-GUESTS=0:mailto:maha...@gmail.com
X-MICROSOFT-CDO-OWNERAPPTID:-1919606440
RECURRENCE-ID;TZID=Europe/Paris:20231016T11
CREATED:20230203T104901Z
DESCRIPTION:https://meet.jit.si/gccrs-community-call-october
LAST-MODIFIED:20231016T083259Z
LOCATION:
SEQUENCE:1
STATUS:CONFIRMED
SUMMARY:gccrs community call
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR


invite.ics
Description: application/ics


Re: [PATCH v3] libcpp: add function to check XID properties

2023-10-16 Thread Arthur Cohen

Ping?

Best,

Arthur

On 9/8/23 16:59, Arthur Cohen wrote:

From: Raiki Tamura 

Fixed to include the enum's name which I had forgotten to commit.

Thanks



This commit adds a new function intended for checking the XID properties
of a possibly unicode character, as well as the accompanying enum
describing the possible properties.

libcpp/ChangeLog:

* charset.cc (cpp_check_xid_property): New.
* include/cpplib.h
(cpp_check_xid_property): New.
(enum cpp_xid_property): New.

Signed-off-by: Raiki Tamura 
---
  libcpp/charset.cc   | 36 
  libcpp/include/cpplib.h |  7 +++
  2 files changed, 43 insertions(+)

diff --git a/libcpp/charset.cc b/libcpp/charset.cc
index 7b625c9956a..a92ba75539e 100644
--- a/libcpp/charset.cc
+++ b/libcpp/charset.cc
@@ -1256,6 +1256,42 @@ _cpp_uname2c_uax44_lm2 (const char *name, size_t len, 
char *canon_name)
return result;
  }
  
+/* Returns flags representing the XID properties of the given codepoint.  */

+unsigned int
+cpp_check_xid_property (cppchar_t c)
+{
+  // fast path for ASCII
+  if (c < 0x80)
+  {
+if (('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z'))
+  return CPP_XID_START | CPP_XID_CONTINUE;
+if (('0' <= c && c <= '9') || c == '_')
+  return CPP_XID_CONTINUE;
+  }
+
+  if (c > UCS_LIMIT)
+return 0;
+
+  int mn, mx, md;
+  mn = 0;
+  mx = ARRAY_SIZE (ucnranges) - 1;
+  while (mx != mn)
+{
+  md = (mn + mx) / 2;
+  if (c <= ucnranges[md].end)
+  mx = md;
+  else
+  mn = md + 1;
+}
+
+  unsigned short flags = ucnranges[mn].flags;
+
+  if (flags & CXX23)
+return CPP_XID_START | CPP_XID_CONTINUE;
+  if (flags & NXX23)
+return CPP_XID_CONTINUE;
+  return 0;
+}
  
  /* Returns 1 if C is valid in an identifier, 2 if C is valid except at

 the start of an identifier, and 0 if C is not valid in an
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index fcdaf082b09..583e3071e90 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -1606,4 +1606,11 @@ bool cpp_valid_utf8_p (const char *data, size_t 
num_bytes);
  bool cpp_is_combining_char (cppchar_t c);
  bool cpp_is_printable_char (cppchar_t c);
  
+enum cpp_xid_property {

+  CPP_XID_START = 1,
+  CPP_XID_CONTINUE = 2
+};
+
+unsigned int cpp_check_xid_property (cppchar_t c);
+
  #endif /* ! LIBCPP_CPPLIB_H */