Closed mbrubeck closed 1 year ago
@mbrubeck , Step N0 has step BD16 as it's first step. Has this step been implemented already or will this have to be done as well?
BD16 has not been implemented, and will need to be implemented as part of this fix.
Ok. We'll implement BD16 as well. Thanks @mbrubeck
@mbrubeck, to implement BD16, I will need 'pairValues: - unique ID for the pair (or set) of canonically matched brackets' and 'pairTypes: - array of paired bracket type values for each character' where will I find these lists / arrays?
The pairTypes and pairValues arrays can be generated by looking up each input character in a table based on: http://www.unicode.org/Public/UNIDATA/BidiBrackets.txt (Let me know if you'd like any help converting this text file into a Rust-friendly array. The file is simple enough that it could be done either by a script or by hand.)
This table lists bracket characters in pairs; each pair has an "open" character and a "close" character. We can assign an arbitrary unique number to each pair; for example it could be the row number where the "open" character is found.
If the input character at index i
is found in the table, then set pairValues[i]
to the unique number assigned to that pair, and set pairTypes[i]
to Open
or Close
according to the third column of the table. If the character is not found in the table, then set pairTypes[i]
to None
(and pairValues[i]
is unused so we don't care what it's set to).
@mbrubeck , I'm still working on implementing N0, and I would like some help in converting the test cases to a Rust Table.
Okay, I will work on that tomorrow.
Thanks Matt! On Dec 2, 2015 19:23, "Matt Brubeck" notifications@github.com wrote:
Okay, I will work on that tomorrow.
— Reply to this email directly or view it on GitHub https://github.com/servo/unicode-bidi/issues/3#issuecomment-161475114.
https://github.com/mbrubeck/unicode-bidi/blob/brackets/src/brackets.rs contains a Rust module with the table of paired bracket characters. You can merge from my branch into yours if you want to use this code in your branch.
Thanks @mbrubeck.
I'm working on this
In the
resolve_neutral
function, implement step N0: Process bracket pairs in an isolating run sequence.There are test cases for this in BidiCharacterTest.txt (see issue #1).