86 views
How to represent array expressions using DAG?

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

how to represent this using DAG?

edited | 86 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

@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

+1 vote