First of all given grammer is unambiguous. Right?
Here the highlighted - and * are on same level but at different children. So for precedence these kind of cases should not be considered. Right??
Besides this, want to confirm :-
* left associative
+ right associative
* and + has same precedence.
But bcz of associativity * placed in stack should be performed first.
How far the following table is right? (dont consider id and $ cases)
|
id |
+ |
* |
- |
Id |
|
|
|
|
+ |
|
< |
< |
< |
* |
|
> |
> |
< |
- |
|
> |
> |
> |
- Will be left associative or not.
I think it should be left associative in this way only it can have highest precedence.