1,746 views
0 votes
0 votes

This grammar generates binary numbers with a "decimal" point:

  • $S\rightarrow L.L\mid L$
  • $L\rightarrow LB\mid B$
  • $B\rightarrow 0\mid 1$ 

Design an L-attributed SDD to compute $S.val$, the decimal-number value of an input string. For example, the translation of string $101.101$ should be the decimal number $5.625$. Hint: use an inherited attribute $L.side$ that tells which side of the decimal point a bit is on. 

Please log in or register to answer this question.

Related questions

5.9k
views
1 answers
0 votes
admin asked Sep 6, 2019
5,851 views
This grammar generates binary numbers with a "decimal" point:$S\rightarrow L.L\mid L$L\rightarrow LB\mid B$B\rightarrow 0\mid 1$ Design an S-attributed SDD to ... , the translation of string $101.101$ should be the decimal number $5.625$.
892
views
0 answers
0 votes
admin asked Sep 6, 2019
892 views
Implement Algorithm $3.23$, which converts a regular expression into a nondeterministic finite automaton, by an L-attributed SDD on a top-down parsable grammar ... . Use any convenient notation to specify the transitions of the $NFA$.
1.9k
views
0 answers
0 votes
admin asked Sep 6, 2019
1,913 views
For the SDD of Fig. $5.8$, give annotated parse trees for the following expressions:int a,b,c.float w,x,y,z.
625
views
0 answers
0 votes
admin asked Sep 6, 2019
625 views
Modify the SDD of Fig. $5.25$ to include superscripts denoted by operator sup between boxes. If box $B_{2}$ is a superscript of box $B_{1}$, then position the ... $5.26$.