![]() |
.. (לתיקייה המכילה) | |
what is the switch's scoping? | |
The scope of switch is the scope it is defined in. A case with a single statement is not a new scope, unless it is a definition. case 1 F: print a ;break; <-- NOT a new scope case 2 F: { print a; } break; <-- a new scope with one statement case 3 F: int b ; break; <-- Also a new scope with one statement |
When should I check the semantic checks: When reducing the rule or as soon as possible (markers)? | |
You should make your semantic checks when you reduce by the rule. This should also spare you some unpleasant R/R conflicts. |
Does switch open a scope? | |
No, but cases inside it might, as per above. |
Is hiding legal? i.e. is | |
No. Hiding is not allowed in this assignment. |