Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement N0: Process bracket pairs #3

Closed
mbrubeck opened this issue Jun 10, 2015 · 11 comments · Fixed by #85
Closed

Implement N0: Process bracket pairs #3

mbrubeck opened this issue Jun 10, 2015 · 11 comments · Fixed by #85
Assignees

Comments

@mbrubeck
Copy link
Contributor

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).

@vicky-katara
Copy link
Contributor

@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?

@mbrubeck
Copy link
Contributor Author

mbrubeck commented Dec 1, 2015

BD16 has not been implemented, and will need to be implemented as part of this fix.

@vicky-katara
Copy link
Contributor

Ok. We'll implement BD16 as well. Thanks @mbrubeck

@vicky-katara
Copy link
Contributor

@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?

@mbrubeck
Copy link
Contributor Author

mbrubeck commented Dec 2, 2015

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).

@vicky-katara
Copy link
Contributor

@mbrubeck , I'm still working on implementing N0, and I would like some help in converting the test cases to a Rust Table.

@mbrubeck
Copy link
Contributor Author

mbrubeck commented Dec 3, 2015

Okay, I will work on that tomorrow.

@vicky-katara
Copy link
Contributor

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
#3 (comment).

@mbrubeck
Copy link
Contributor Author

mbrubeck commented Dec 3, 2015

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.

@vicky-katara
Copy link
Contributor

Thanks @mbrubeck.

@behnam behnam self-assigned this May 23, 2017
@Manishearth Manishearth assigned Manishearth and unassigned behnam Dec 14, 2022
@Manishearth
Copy link
Member

I'm working on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants