PLQ #1Done on:   Tuesday, September 27th

Question 1 @ 2022-09-27 19:10

In this class, the purpose of a BNF (Backus-Naur Form) is used to specify:


Question 2 @ 2022-09-27 19:13

What is the difference between the match form and the cases form?


Question 3 @ 2022-09-27 19:14

Why are we using Racket in this class?


Question 4 @ 2022-09-27 19:16

Which of these language specifications are ambiguous? [Choose all of them!]


Question 5 @ 2022-09-27 19:20

Your friend had a bright idea while looking over your shoulder and seeing the AE grammar:

<AE>  ::= ... <PROD> ...
<PROD> ::= ... <ATOM> ...
<ATOM> ::= <num>
        | ( <AE> )
        | [ <AE> ]
        | { <AE> }

“Why not abstract the parens to make it shorter?” — suggesting this:

<ATOM>  ::= <num>
          | <OPEN> <AE> <CLOSE>

<OPEN>  ::= ( | [ | {
<CLOSE> ::= ) | ] | }

Does this specify the same language?