Tute Java PL
Tute Java PL
Tute Java PL
1 Description
In this tutorial, you will practise with the Java programming language syntax through a series of
exercises.
2 Tasks
1. Use the syntax tree to explain the grammar of the following Java code. Be as specific as you can
about the name of the nonterminal (LHS) that matches each code element.
2. Use the grammar syntax tree to explain the grammar of the following Java code. Be as specific
as you can about the name of the nonterminal (LHS) that matches each code element.
3. Use the grammar syntax tree to explain the grammar of the following Java code. Be as specific
as you can about the name of the nonterminal (LHS) that matches each code element.
4. Use the grammar syntax tree to explain the grammar of the following Java code. Be as specific
as you can about the name of the nonterminal (LHS) that matches each code element.
return min;
}
6. Use the grammar syntax tree to explain the grammar of the following Java code. Be as specific
as you can about the name of the nonterminal (LHS) that matches each code element.
7. Use the grammar syntax tree to explain the grammar of the following Java code. Be as specific
as you can about the name of the nonterminal (LHS) that matches each code element.
MethodDeclaration:
MethodModifiers MethodHeader MethodBody
MethodModifiers:
{MethodModifier}
0B001100010
0b001_110_001L
1b0_0_1L
0B012L
1B0L
0B0 0 1L
3 Submission
Submit your work to the home work submission box of this tutorial on the FIT portal. Name the file as
follows: student-id_class_wkno.zip, where student-id is your student id, class is the code of the class
that you attend, and wkno is the week number.