The Gateway to Computer Science Excellence
0 votes
228 views

Consider the following grammar for variable declarations:

  • <vardecl> $\rightarrow$ <vardecl><idlist> : <type>;
  • <vardecl> $\rightarrow \in$
  • <idlist> $\rightarrow$ <idlist>, id
  • <idlist> $\rightarrow$ id
  • <type> $\rightarrow$ integer
  • <type> $\rightarrow$ real

Write a syntax - directed translation scheme to install the identifiers into the symbol table. You must also issue appropriate error messages wherever necessary. Make suitable assumptions regarding procedures operating on the symbol table; you need not elaborate upon these procedures.

in Compiler Design by Boss (30.7k points)
edited by | 228 views

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
50,741 questions
57,253 answers
198,062 comments
104,698 users