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

Resolving shift/reduce conflicts in Parser #19

Open
ahmetozdemirrr opened this issue Oct 10, 2024 · 2 comments
Open

Resolving shift/reduce conflicts in Parser #19

ahmetozdemirrr opened this issue Oct 10, 2024 · 2 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed Resolving Ambiguity Resolving Shift and Reduce conflicts
Milestone

Comments

@ahmetozdemirrr
Copy link
Owner

In Parser there are some shift/reduce conflicts in conditional expressions, declaration and expression CFGs. These are expected to be resolved in this issue.

@ahmetozdemirrr ahmetozdemirrr added bug Something isn't working help wanted Extra attention is needed Resolving Ambiguity Resolving Shift and Reduce conflicts labels Oct 10, 2024
@ahmetozdemirrr ahmetozdemirrr added this to the Syntax Design milestone Oct 10, 2024
@ahmetozdemirrr ahmetozdemirrr self-assigned this Oct 10, 2024
@animeshjare26
Copy link

I've added the following enhancements to address the concerns raised:

Operator Precedence: Defined precedence rules to resolve conflicts between unary and binary operators. %right is used for operators like assignment and unary minus, while %left handles binary operators such as +, -, *, and /.

If/Else Handling: Implemented clear rules for if, elif, and else to avoid ambiguity in nested conditions, using explicit parts like ELIF_PART and ELSE_PART.

Augmented Assignment: Clarified the precedence for operators like += using %prec, ensuring correct interpretation of augmented assignments.

Let me know if you have any further questions or feedback!

@ahmetozdemirrr
Copy link
Owner Author

I guess you haven't added the additions you are talking about yet. If you have resolved these conflicts, please share them with us as a pull request. Otherwise, I'll add it as an issue when we have a problem, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed Resolving Ambiguity Resolving Shift and Reduce conflicts
Projects
None yet
Development

No branches or pull requests

2 participants