2013 Microsoft Intern Hiring Written Test : 20

来源:互联网 发布:网络人才缺口 编辑:程序博客网 时间:2024/05/29 04:34

20. Aparticular BNF definition for a “word” is by the following rules (13 Points)

 

<word> ::= <letter> | <letter><pairlet>| <letter><pairdig>

<pairlet> ::= <letter><letter> |<pairlet><letter><letter>

<pairdig> ::= <digit><digit> |<pairdig><digit><digit>

<letter> ::= a | b | c | … | y | z

<digit> ::= 0 | 1 | 2 | … | 9

 

Which of the following lexical entities can be derivedfrom <word> ?

I. abcd  II. bcdef  III. d22

A. None

B. I and II only

C. I and III only

D. II and III only

E. I, II and III

原创粉丝点击