EBNF - Allow accentuated or Unicode char on EBNF meta-identifier or rule name.

+1 vote
asked Dec 14, 2022 in Wanted features by The-Lu (74,900 points)

Hello PlantUML team,

  • Could you allow accentuated or Unicode char on EBNF meta-identifier or rule name?

Here is an example:

@startebnf
(* Test of accentuated or Unicode char*)
alt = été | hiver;
hiver = 'froid';
été = 'chaud';
@endebnf

It is OK on definition part:


But not on meta-identifier or rule name:


Thanks for the enhancement.
Regards.

related to an answer for: Could we add syntax diagrams?

2 Answers

0 votes
answered Oct 10 by The-Lu (74,900 points)
 
Best answer

Fixed by EBNF better unicode support on V1.2024.8

Thank to PlantUML team.

0 votes
answered Dec 14, 2022 by Todd Musheno (2,680 points)

Technically I think ebnf only requires A-Z|a-z but... I agree this should be allowed.

commented Dec 19, 2022 by Todd Musheno (2,680 points)
Instead of doing [A-Za-z] try \p{L} in the regex to allow any letter character

Otherwise https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/lang/Character.html#isLetter(int)
...