Re: Why is BOM required to use unicode in tokens?

2020-09-18 Thread Patrick Schluter via Digitalmars-d-learn
On Wednesday, 16 September 2020 at 00:22:15 UTC, Steven Schveighoffer wrote: On 9/15/20 8:10 PM, James Blachly wrote: On 9/15/20 10:59 AM, Steven Schveighoffer wrote: [...] Steve: It sounds as if the spec is correct but the glyph (codepoint?) range is outdated. If this is the case, it would

Re: Why is BOM required to use unicode in tokens?

2020-09-18 Thread GK via Digitalmars-d-learn
On Tuesday, 15 September 2020 at 16:23:01 UTC, Jon Degenhardt wrote: # The 'Ш' and 'ä' characters are fine. $ echo $'import std.stdio; void Шä() { writeln("Hello World!"); } void main() { Шä(); }' | dmd -run - Hello World! # But not '∂' $ echo $'import std.stdio; void x∂() { writeln("Hello

Re: Why is BOM required to use unicode in tokens?

2020-09-16 Thread wjoe via Digitalmars-d-learn
On Tuesday, 15 September 2020 at 01:49:13 UTC, James Blachly wrote: I wish to write a function including ∂x and ∂y (these are trivial to type with appropriate keyboard shortcuts - alt+d on Mac), but without a unicode byte order mark at the beginning of the file, the lexer rejects the tokens.

Re: Why is BOM required to use unicode in tokens?

2020-09-16 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Wednesday, 16 September 2020 at 07:38:26 UTC, Dominikus Dittes Scherkl wrote: We only need to define which properties a character need to be allowed in an identifier. I think the following change in the grammar would be sufficient: Identifier: IdentifierStart IdentifierStart

Re: Why is BOM required to use unicode in tokens?

2020-09-16 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Wednesday, 16 September 2020 at 00:22:15 UTC, Steven Schveighoffer wrote: Someone should verify that the character you want to use for a symbol name is actually considered a letter or not. Using phobos to prove this is kind of self-defeating, as I'm pretty sure it would be in league with

Re: Why is BOM required to use unicode in tokens?

2020-09-15 Thread James Blachly via Digitalmars-d-learn
On 9/15/20 8:24 PM, James Blachly wrote: Again with the self-reply :/ Forgot the reference: https://www.unicode.org/versions/Unicode13.0.0/ch22.pdf

Re: Why is BOM required to use unicode in tokens?

2020-09-15 Thread James Blachly via Digitalmars-d-learn
On 9/15/20 8:10 PM, James Blachly wrote: Steve: It sounds as if the spec is correct but the glyph (codepoint?) range is outdated. If this is the case, it would be a worthwhile update. Do you really think it would be rejected out of hand? OK interestingly this code point 0x2202 falls within

Re: Why is BOM required to use unicode in tokens?

2020-09-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/15/20 8:10 PM, James Blachly wrote: On 9/15/20 10:59 AM, Steven Schveighoffer wrote: Thanks to Paul, Jon, Dominikus and H.S. for thoughtful responses. What will it take (i.e. order of difficulty) to get this fixed -- will merely a bug report (and PR, not sure if I can tackle or not) do

Re: Why is BOM required to use unicode in tokens?

2020-09-15 Thread James Blachly via Digitalmars-d-learn
On 9/15/20 10:59 AM, Steven Schveighoffer wrote: Thanks to Paul, Jon, Dominikus and H.S. for thoughtful responses. What will it take (i.e. order of difficulty) to get this fixed -- will merely a bug report (and PR, not sure if I can tackle or not) do it, or will this require more in-depth

Re: Why is BOM required to use unicode in tokens?

2020-09-15 Thread starcanopy via Digitalmars-d-learn
On Tuesday, 15 September 2020 at 21:27:25 UTC, Ola Fosheim Grøstad wrote: On Tuesday, 15 September 2020 at 01:49:13 UTC, James Blachly wrote: I wish to write a function including ∂x and ∂y (these are You can use the greek letter delta instead: δ Wouldn't that imply a normal differential?

Re: Why is BOM required to use unicode in tokens?

2020-09-15 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Tuesday, 15 September 2020 at 01:49:13 UTC, James Blachly wrote: I wish to write a function including ∂x and ∂y (these are You can use the greek letter delta instead: δ

Re: Why is BOM required to use unicode in tokens?

2020-09-15 Thread Jon Degenhardt via Digitalmars-d-learn
On Tuesday, 15 September 2020 at 14:59:03 UTC, Steven Schveighoffer wrote: On 9/15/20 10:18 AM, James Blachly wrote: What will it take (i.e. order of difficulty) to get this fixed -- will merely a bug report (and PR, not sure if I can tackle or not) do it, or will this require more in-depth

Re: Why is BOM required to use unicode in tokens?

2020-09-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/15/20 10:18 AM, James Blachly wrote: On 9/15/20 4:36 AM, Dominikus Dittes Scherkl wrote: On Tuesday, 15 September 2020 at 06:49:08 UTC, Jon Degenhardt wrote: On Tuesday, 15 September 2020 at 02:23:31 UTC, Paul Backus wrote: Identifiers start with a letter, _, or universal alpha, and are

Re: Why is BOM required to use unicode in tokens?

2020-09-15 Thread James Blachly via Digitalmars-d-learn
On 9/15/20 4:36 AM, Dominikus Dittes Scherkl wrote: On Tuesday, 15 September 2020 at 06:49:08 UTC, Jon Degenhardt wrote: On Tuesday, 15 September 2020 at 02:23:31 UTC, Paul Backus wrote: Identifiers start with a letter, _, or universal alpha, and are followed by any number of letters, _,

Re: Why is BOM required to use unicode in tokens?

2020-09-15 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Tuesday, 15 September 2020 at 06:49:08 UTC, Jon Degenhardt wrote: On Tuesday, 15 September 2020 at 02:23:31 UTC, Paul Backus wrote: Identifiers start with a letter, _, or universal alpha, and are followed by any number of letters, _, digits, or universal alphas. Universal alphas are as

Re: Why is BOM required to use unicode in tokens?

2020-09-15 Thread Jon Degenhardt via Digitalmars-d-learn
On Tuesday, 15 September 2020 at 02:23:31 UTC, Paul Backus wrote: On Tuesday, 15 September 2020 at 01:49:13 UTC, James Blachly wrote: I wish to write a function including ∂x and ∂y (these are trivial to type with appropriate keyboard shortcuts - alt+d on Mac), but without a unicode byte order

Re: Why is BOM required to use unicode in tokens?

2020-09-14 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Sep 14, 2020 at 09:49:13PM -0400, James Blachly via Digitalmars-d-learn wrote: > I wish to write a function including ∂x and ∂y (these are trivial to > type with appropriate keyboard shortcuts - alt+d on Mac), but without > a unicode byte order mark at the beginning of the file, the lexer

Re: Why is BOM required to use unicode in tokens?

2020-09-14 Thread Paul Backus via Digitalmars-d-learn
On Tuesday, 15 September 2020 at 01:49:13 UTC, James Blachly wrote: I wish to write a function including ∂x and ∂y (these are trivial to type with appropriate keyboard shortcuts - alt+d on Mac), but without a unicode byte order mark at the beginning of the file, the lexer rejects the tokens.