Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # 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.

# for free to join this conversation on GitHub. Already have an account? # 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