:Semantic rule: .expected_type .actual_type+ = 2. Syntax rule: -→ Semantic rule: .actual_type - .actual_typePredicate: .actual_type == . expected_type3. Syntax rule: → + Semantic rule:...


1. Syntax rule: <assign>:<br>Semantic rule: <expr> .expected_type <var> .actual_type<br>+ <var> =<br><expr><br>2. Syntax rule: <expr> -<br>→ <var><br>Semantic rule: <expr> .actual_type - <var> .actual_type<br>Predicate: <expr> .actual_type == <expr>. expected_type<br>3. Syntax rule: <expr> → <var>+ <term><br>Semantic rule: <expr> .actual_type - <term> .actual_type<br>Predicate: <expr>.actual_type == <expr>. expected_type<br>4. Syntax rule: <term> → <var><br>Semantic rule: <term> .actual_type-<br>+ <var> .actual_type<br>5. Syntax rule: <term> → <var> [2] + <var> [3]<br>Semantic rule: <term> .actual_type – <var> [2] .actual_type<br>Predicate: <var> [2] .actual_type == <var> [3] .actual_type<br>6. Syntax rule: <var> → A |B|C<br>Semantic rule: <var> .actual_type - look-up (<var> .string)<br>Answer the following questions according to the grammar rules specified.<br>a. Create the parser tree structure for the C = B +C+A sentence.<br>b. Is this a correct sentence according to this grammar?<br>

Extracted text: 1. Syntax rule: : Semantic rule: .expected_type

.actual_type +

= 2. Syntax rule: - →

Semantic rule: .actual_type -

.actual_type Predicate: .actual_type == . expected_type 3. Syntax rule:
+ Semantic rule: .actual_type - .actual_type Predicate: .actual_type == . expected_type 4. Syntax rule:

Semantic rule: .actual_type- +

.actual_type 5. Syntax rule:

[2] +

[3] Semantic rule: .actual_type –

[2] .actual_type Predicate:

[2] .actual_type ==

[3] .actual_type 6. Syntax rule:

→ A |B|C Semantic rule:

.actual_type - look-up (
.string) Answer the following questions according to the grammar rules specified. a. Create the parser tree structure for the C = B +C+A sentence. b. Is this a correct sentence according to this grammar?
















Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here