The v1.0 specification requires catalog component, function and argument names to match ^[\p{XID_Start}_][\p{XID_Continue}]*$. See "Catalog Entity Naming Rules" in specification/v1_0/docs/a2ui_protocol.md. The expression parsers do not follow that rule yet:
- TypeScript, Python and Dart accept only ASCII in paths (
a-z, A-Z, 0-9, /, ., _, -) and identifiers. ${café} fails with Unexpected characters, and an expression cannot call a catalog function named größe.
- Swift uses
Character.isLetter and Character.isNumber. It accepts ${café}, but it also accepts characters outside UAX #31, such as ½.
Proposed change (follow-up to #2807):
- Function and argument names follow UAX
#31: XID_Start or _, then XID_Continue.
- Path segments allow UAX
#31 identifier characters and keep /, ., _ and -.
- After
true, false and null, any XID_Continue character counts as part of the word.
- TypeScript and Dart scan by Unicode code point instead of UTF-16 code unit.
- Reuse
typescript/web_core/src/common/uax31.ts and python/a2ui_core/src/a2ui/core/common/uax31.py. Add UAX #31 helpers for Dart and for Swift (Unicode.Scalar.Properties.isXIDStart and isXIDContinue).
- Add conformance cases in
conformance/core/expressions.yaml for a non-ASCII path, function name, argument name, and rejected non-UAX #31 character.
- Optionally add a specification paragraph that defines the expression grammar, including number literals.
Related: no parser accepts @ in a function name, so ${@index()} fails. Decide whether expressions can call reserved @ functions.
The v1.0 specification requires catalog component, function and argument names to match
^[\p{XID_Start}_][\p{XID_Continue}]*$. See "Catalog Entity Naming Rules" inspecification/v1_0/docs/a2ui_protocol.md. The expression parsers do not follow that rule yet:a-z,A-Z,0-9,/,.,_,-) and identifiers.${café}fails withUnexpected characters, and an expression cannot call a catalog function namedgröße.Character.isLetterandCharacter.isNumber. It accepts${café}, but it also accepts characters outside UAX#31, such as½.Proposed change (follow-up to #2807):
#31:XID_Startor_, thenXID_Continue.#31identifier characters and keep/,.,_and-.true,falseandnull, anyXID_Continuecharacter counts as part of the word.typescript/web_core/src/common/uax31.tsandpython/a2ui_core/src/a2ui/core/common/uax31.py. Add UAX#31helpers for Dart and for Swift (Unicode.Scalar.Properties.isXIDStartandisXIDContinue).conformance/core/expressions.yamlfor a non-ASCII path, function name, argument name, and rejected non-UAX#31character.Related: no parser accepts
@in a function name, so${@index()}fails. Decide whether expressions can call reserved@functions.