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

Convert Input grammar To LL(1) grammar automatically #36

Merged
merged 16 commits into from
Dec 24, 2023

Conversation

MuhammadKotb
Copy link
Contributor

  • Added LeftRecursionRemover class that has removeLR method that takes a grammar and returns a new grammar that is left recursion free.
  • Added LeftFactorer class that has leftFactor method that takes a grammar and returns a new left factored grammar.

Copy link
Contributor

@Bazina Bazina left a comment

Choose a reason for hiding this comment

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

You used if { } convention and used const auto& which is faster for looping.
The functions can be broken into multiple parts.

Requested changes don't include changing variable names.

Nevertheless, Well done.

include/Parser/LeftRecursionRemover.h Show resolved Hide resolved
include/Parser/LeftFactorer.h Outdated Show resolved Hide resolved
include/constants.h Outdated Show resolved Hide resolved
Copy link
Contributor

@Bazina Bazina left a comment

Choose a reason for hiding this comment

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

Well done

@MuhammadKotb MuhammadKotb requested review from Ahmedelsa3eed and removed request for AbdelrahmanMosly December 24, 2023 15:29
@Bazina Bazina merged commit fb969b1 into phase2 Dec 24, 2023
2 checks passed
@MuhammadKotb MuhammadKotb deleted the ANYCC-28-Convert-to-LL1 branch January 21, 2024 18:37
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