The Gateway to Computer Science Excellence
0 votes
237 views

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

  1. A syntax tree.
  2. Quadruples.
  3. Triples.
  4. Indirect triples
in Compiler Design by | 237 views

1 Answer

+3 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

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
52,345 questions
60,485 answers
201,816 comments
95,291 users