Week 4

JOOS

Explain for the following fragment of joos.l what each of
the rules does, by stating what input character(s) each rule would
accept and what output it would attach to the generated token. (Hint:
Be reminded of "escaping".)

How can you see in the lexer that JOOS will not accept
string constants that contain a " ? (For instance,
JOOS will not accept an assignment s = "\""; .)

Explain why the JOOS compiler constructs lists backwards
(e.g. for arguments), see page 31 here.
(Hint: Parse stack) What effect would a size limit for the call stack
have during the pretty-printing (page 32)?