The question is just out of curiosity. Does Graal & Truffle support making a programming language in a new character set? That is, if I want to implement a new programming language in a character set which is neither Unicode nor ASCII, like EBCDIC, or TRON or something entirely new, can that be done in Graal & Truffle? There is no mention of this possibility anywhere in the documentation.
Asked
Active
Viewed 84 times
1 Answers
1
Well, as long as your parser can parse it it should not be a problem for the language itself, but one might run into problems integrating with tools that, for example, expect source code to be expressible as a CharSequence

BoriS
- 907
- 5
- 13
-
Thanks for responding. Can you please elaborate the answer? What is "expressible as a CharSequence"? Does it mean that “if we have all the characters in any arbitrary character-set encoded as [16-bit unsigned integers](https://stackoverflow.com/a/24095210), then Truffle can handle it”? – Jayadevan Vijayan Oct 31 '19 at 23:52
-
I don't have any experience with arbitrary character-set encoding so all of this is an educated guess: GraalVM offers a CLI tool that counts how many times each function was called and prints this info to stdout. if the names of the functions are "encoded in any arbitrary character-set" the output might not be readable. – BoriS Nov 01 '19 at 17:09
-
That is correct. But readability is probably a matter of having a font, which is orthogonal to making a language. Anyway, since nobody in the internet seems to know the answer, I have asked this question officially in their Github page. Hopefully we will get a response from the GraalVM developers. My guess is that even if arbitrary character sets are supported, that will be a hack, rather than an intentional feature. (I have upvoted, but it does not show in the counts since I am new to this site). – Jayadevan Vijayan Nov 02 '19 at 19:12