switch_statement
:
SWITCH
(
expression )
{
labeled_statement_list }
labeled_statement_list
: labeled_statement_list labeled_statement
| labeled_statement
;
labeled_statement
: CASE
CONSTANT
:
statement
| DEFAULT
:
statement
;
expression
: additive_expression
;
additive_expression
: multiplicative_expression
| additive_expression +
multiplicative_expression
| additive_expression -
multiplicative_expression
multiplicative_expression
: primary_expression
| multiplicative_expression *
primary_expression
| multiplicative_expression /
primary_expression
;
primary_expression
: IDENTIFIER
| CONSTANT
| (
expression )
;