Skip to content

Make symbol case insensitive#7

Merged
Grillo-0 merged 2 commits intofirst-comp-verfrom
3-make-symbol-case-insensitive
Dec 8, 2024
Merged

Make symbol case insensitive#7
Grillo-0 merged 2 commits intofirst-comp-verfrom
3-make-symbol-case-insensitive

Conversation

@MurilloMMartins
Copy link
Copy Markdown
Collaborator

In the language description we say that symbols are case-insensitive, so this converts every symbol text to lowercase.
This is done by iterating through a SYMBOL node's text and using the C 'tolower' function.

Comment thread src/dry_bison.y Outdated
Copy link
Copy Markdown
Member

@Grillo-0 Grillo-0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the locale commit be the first one, because the other two doesn't work without it. And merge those two commits, (case-insensitive and Unicode support) as the Unicode is a fix for the case-insensitive one.

Comment thread src/dry_bison.y
Comment thread src/dry_bison.y
Comment thread src/dry_bison.y
@Grillo-0
Copy link
Copy Markdown
Member

Also, rebase the branch

@artP2 artP2 force-pushed the 3-make-symbol-case-insensitive branch from bb7fc58 to d30ecd0 Compare December 5, 2024 17:08
Comment thread src/dry_bison.y Outdated
@artP2 artP2 force-pushed the 3-make-symbol-case-insensitive branch from d30ecd0 to 5d4343b Compare December 6, 2024 15:56
@artP2
Copy link
Copy Markdown
Contributor

artP2 commented Dec 6, 2024

Build passing.

Copy link
Copy Markdown
Member

@Grillo-0 Grillo-0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All compiles and seems to work!
Just some nitpicks about the commit messages:

1# commit:

s/Added/Add

The commit message must be in the present tense, writing in a way that the commit modification will be added to the project, not as if it were already present in the project.

2# commit

The commit message body must be wrapped at 72 columns, to not be difficult to read when doing git log.

image

Add locale to support unicode character operations.
This change ensures that symbols are treated as case-insensitive as
described in the language specification. All symbol texts are now
converted to lowercase, including Unicode characters like 'Á' that were
previously unsupported.
@artP2 artP2 force-pushed the 3-make-symbol-case-insensitive branch from 5d4343b to fd20f12 Compare December 7, 2024 20:15
@Grillo-0 Grillo-0 merged commit 88ca035 into first-comp-ver Dec 8, 2024
@Grillo-0 Grillo-0 deleted the 3-make-symbol-case-insensitive branch December 8, 2024 14:23
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 this pull request may close these issues.

3 participants