ref: 5b1296ecf83f725c895e2e43c1b86a93ca16bfdc
parent: ee7692fd4fc467cedfa28b4e59ef8242143ab0b2
	author: Jacob Moody <moody@posixcafe.org>
	date: Fri Mar  7 22:48:02 EST 2025
	
yacc: allow unicode in identifiers
--- a/sys/src/cmd/yacc.c
+++ b/sys/src/cmd/yacc.c
@@ -3,8 +3,6 @@
#include <bio.h>
#include <ctype.h>
-#define Bungetrune Bungetc /* ok for now. */
-
/*
* all these are 32 bit
*/
@@ -1756,9 +1754,9 @@
Bungetrune(finput);
return NUMBER;
}
-		if(islower(c) || isupper(c) || c=='_' || c=='.' || c=='$')  {+		if(isalpharune(c) || c=='_' || c=='.' || c=='$')  {i = 0;
- while(islower(c) || isupper(c) || isdigit(c) ||
+ while(isalpharune(c) || isdigit(c) ||
 			    c == '-' || c=='_' || c=='.' || c=='$') {if(reserve && isupper(c))
c += 'a'-'A';
@@ -2023,7 +2021,7 @@
}
goto loop;
}
-		if(isupper(c) || islower(c) || c == '_' || c == '.') {+		if(isalpharune(c) || c == '_' || c == '.') {int tok; /* tok used oustide for type info */
/* look for $name */
--
⑨