The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
79 views
How to represent array expressions using DAG?

for example a=b[i]+c[j]

how to represent this using DAG?
in Compiler Design by Active (4k points)
edited by | 79 views
0
syntax tree represented by terminals and symbols

For that we need the grammar first. I mean what is syntax directed definition here?
0
why do we need SDD here? I'm asking how to represent this expression using syntax tree
0

if you mean expression tree then it will be like this :-

In-order traversal of an expression tree gives infix notation which is mentioned in the question.

0

@ankitgupta.1729

is $b\left [ i \right ]$ and $c\left [ j \right ]$ is in terminal form?

Then how r u making syntax tree for it?

0

@aditi19

@ankitgupta.1729

$b\left [ i \right ]+$ cannot be parse to a grammar, because it is not a handle

So, parse tree is not possible with it

ok ??

+1
mam, as you said for parse tree , we need grammar which is not given in question.
0
sorry! it'll be DAG.. not syntax tree... I'm updating the question

Please log in or register to answer this question.

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
49,839 questions
54,799 answers
189,490 comments
80,676 users