The Gateway to Computer Science Excellence
0 votes
22 views

Translate the arithmetic expression $a + -(b + c)$ into:

  1. A syntax tree.
  2. Quadruples.
  3. Triples.
  4. Indirect triples
in Compiler Design by Veteran (54.8k points) | 22 views

1 Answer

+2 votes

Syntax Tree

Quadruples

  operator Argument1 Argument2 Result
0 + b c t1
1 unary minus t1   t2
2 + a t2 t3

Triples

  operator Argument1 Argument2
0 + b c
1 unary minus (0)  
2 + a (1)

Indirect Triples

0 (0)
1 (1)
2 (2)

 

by Active (5.1k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,648 questions
56,422 answers
195,193 comments
99,823 users