trealla-prolog / trealla

A compact, efficient Prolog interpreter written in plain-old C.
MIT License
268 stars 13 forks source link

Callligraphic script not unparsed like it is parsed? #556

Closed Jean-Luc-Picard-2021 closed 2 months ago

Jean-Luc-Picard-2021 commented 3 months ago

Strange SWI-Prolog probably uses other C-calls to classify character codes, especially Unicode code points. I get the following result:

/* SWI-Prolog 9.3.2 and Scryer Prolog 0.9.4 */
?- X = (-𝒶𝒶 + 𝒶𝒶).
X = -𝒶𝒶+𝒶𝒶

The good news is Trealla Prolog accepts it, but then it puts quotes during output. Maybe it thinks the calligraphy is graphic symbols?

/* Trealla Prolog 2.53.1 */
?- X = (-𝒶𝒶 + 𝒶𝒶).
   X = - '𝒶𝒶'+'𝒶𝒶'.

At least in the input I guess it doesn't thing its graphic symbols, since the minus sign is separated from the calligraphic input.

So maybe its only a small glitch, small difference between parser and unparser somewhere?

Jean-Luc-Picard-2021 commented 2 months ago

Its ok now?

$ ./tpl -v
Trealla Prolog (c) Infradig 2020-2024, v2.55.13

$ ./tpl
?- X = (-𝒶𝒶 + 𝒶𝒶).
   X = -𝒶𝒶+𝒶𝒶.

So you could close it?