The Gateway to Computer Science Excellence
0 votes
21 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 (54k points) | 21 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 (5k 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,650 questions
56,208 answers
194,081 comments
95,117 users