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

support multiplication with parentheses #33

Open
kajvans opened this issue Jul 28, 2022 · 1 comment
Open

support multiplication with parentheses #33

kajvans opened this issue Jul 28, 2022 · 1 comment

Comments

@kajvans
Copy link

kajvans commented Jul 28, 2022

how do i make it that 5(2+3) works as 5*(2+3) and (2+3)5 as (2+3)*5 so that if a number is directly connected to a parentheses it multiplies with the end value of the parentheses

@foxypiratecove37350
Copy link

You can try to implement this grammar rule for the term:

term        : factor ((MUL|DIV) factor)*
            : factor LPAREN expr RPAREN

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

No branches or pull requests

2 participants