The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
0 votes
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
syntax tree represented by terminals and symbols

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

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.



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

Then how r u making syntax tree for it?




$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 ??

mam, as you said for parse tree , we need grammar which is not given in question.
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
80,676 users