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

nitcc add groups and small improvments #2839

Merged
merged 7 commits into from
Jun 28, 2024
Merged

Conversation

privat
Copy link
Member

@privat privat commented Jun 28, 2024

Add groups in the parser, that are anonymous productions enclosed by parenthesis.

foo = x (bar baz) y | z ;

is equivalent with

foo = x anon0 y | z ;
anon0 = bar baz ;

This becomes handy when combined with the modifies +, ? and *.

foo = x (bar baz)+ y | z ;

is equivalent with

foo = x anon0+ y | z ;
anon0 = bar baz ;

that is equivalent with

foo = x anon1 y | z ;
anon1 = anon1 anon0 | anon0 ;
anon0 = bar baz ;

Note: This PR is a fork of #2836

Copy link

github-actions bot commented Jun 28, 2024

Test Results

    67 files     314 suites   15m 59s ⏱️
14 174 tests 13 633 ✅ 541 💤 0 ❌
14 230 runs  13 674 ✅ 556 💤 0 ❌

Results for commit a82ff72.

♻️ This comment has been updated with latest results.

@privat privat merged commit 97b707e into nitlang:master Jun 28, 2024
21 checks passed
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.

1 participant