Rust-GCC / Rust-GCC/gccrs

Unicode Normalization of Identifiers

Open
#2,379 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
2.9k
Forks
231
Avg merge
19h 55m
Merged PRs (30d)
67

Description

Related to #2287

All identifiers must be normalized to the NFC form.
Normalization is used to treat equally strings which consists of different codepoints but practiaclly the same.
It is useful when a program is linked to other Rust libraries,

NFC Normalization takes two steps:

  1. Some kinds of characters are decomposed to one or multiple chatacters. (This is called NFD form)
  2. Then, some kinds of chatacters are composed to a single character. (This is called NFC form)

For example,
https://unicode.org/reports/tr15/images/UAX15-NormFig4.jpg

Implementation

Unicode data file parser
Decomposition
Composition
Optimization
  • quick check
  • use trie for composition mapping table
    • but the current implementation is not so slow
Tests

many testcases are needed!

Ref

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the Unicode data file parser and the decomposition and composition work described in the issue, including the linked implementation pull requests. Then assess the remaining optimization items, especially the quick check and composition mapping trie, and expand the unspecified test coverage. Done means identifiers are normalized to NFC and the needed normalization tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python, rust
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.