本次美国代写是一个编程语言编译程式相关的限时测试
For problems 1 through 10 select the SINGLE (best) answer. Each of these questions is
worth 1 point.
1. When do undeclared identifiers get detected in MFPL?
a. when recognizing the ident token in the flex specification file
b. when processing the ident in EXPR → ident
c. when processing the ident in ID_LIST → ID_LIST ident for a LAMBDA_EXPR
d. when processing the ident in ID_EXPR_LIST → ID_EXPR_LIST ( ident EXPR )
for a LET_EXPR
2. In the MFPL programming language used for HW #3 and #4, a scope is opened
(i.e., a symbol table is created):
a. as soon as we start up the interpreter
b. whenever we process a left parenthesis
c. whenever we process a progn expression
d. whenever we process a let* expression
e. all of the above
3. If processing a production A → B { } C D, bison would refer to C as:
a. $1
b. $2
c. $3
d. $4
e. $$
4. According to the specifications of HW #4, which arg would we flag an error on in the
following MFPL expression:
(<= “Ryan the dog” 150) ; she actually only weighs 110 lbs
a. Arg 1
b. Arg 2
c. Arg 3
d. This is a trick question – there is no error!
5. According to the specifications of HW #4, which arg would we flag an error on in the
following MFPL expression:
(print (print (+ “Hello” “world!”)))
a. Arg 1
b. Arg 2
c. Arg 3
d. Arg 4
e. This is a trick question – there is no error!
6. Based on the way you were supposed to implement HW #4, recursive function
calls are allowed in MFPL.
a. TRUE b. FALSE
7. In the MFPL statement below, how many symbol tables should be open at the
time that (f x) is parsed?
(let* ( (x 1)
(f (lambda (a)
(let* ( (y (input))
)
(print (* a y))
)
)
)
)
(f x)
)
a. 1
b. 2
c. 3
d. none of the above is correct
程序辅导定制C/C++/JAVA/安卓/PYTHON/留学生/PHP/APP开发/MATLAB

本网站支持 Alipay WeChatPay PayPal等支付方式
E-mail: vipdue@outlook.com 微信号:vipnxx
如果您使用手机请先保存二维码,微信识别。如果用电脑,直接掏出手机果断扫描。
