问题 单项选择题

大多数程序设计语言的语法规则用()描述即可。

A.正规文法

B.上下文无关文法

C.上下文有关文法

D.短语结构文法

答案

参考答案:B

解析:本题考查程序语言基础知识。乔姆斯基文法体系共分为短语结构文法、上下文有关文法、上下文有关文法和正规文法4类。短语结构文法或无限制文法也称为0型文法,其描述能力相当于图灵机,可使用任何的语法描述形式。上下文有关文法也称为1型文法,其描述能力相当于线性有界自动机,语法形式为:xSy->xAy。也就是说,S(非终结符号)推导出A(非终结符号与终结符号的混合串)是和上下文x,y相关的,即S只有在上下文x,y的环境中才能推导出A。上下文无关文法也称为2型文法,其描述能力相当于下推自动机,语法形式如下:S->A,即S可以无条件的推导出A,与上下文无关。正规文法也称为3型文法,等价于正则表达式,其描述能力相当于有穷自动机,语法形式如下:S->Aa,其中最后一个a必须为非终结符。大多数程序语言的语法现象可用上下文无关文法描述。

选择题
阅读理解

第三部分 阅读理解(共20小题;每小题2分,满分40分)

Will it matter if you don't have your breakfast ? A short time ago , a test was given in the United States. People of different ages, from 12 to 83, were asked to have a test . During the test , these people were given all kinds of breakfasts , and sometimes they got no breakfast at all. Scientists wanted to see how well their bodies worked when they had different kinds of breakfasts.

The rules show that if a person eats a right breakfast , he or she will work better than if he or she has no breakfast. If a student has fruit , eggs, bread and milk before going to school ,he or she will learn more quickly and listen more carefully in class.

The result is opposite to what some people think . Having no breakfast will not help them lose weight . This is because they are so hungry at noon that eat too much for lunch . They will gain weight instead of losing it . You will lose weight if you reduce your other meals.

56. During the test , the people were given _________.

A. no breakfast at all          B. different breakfast or sometimes none

C. very rich breakfast         D. little food for breakfast

57. Scientists wanted to know whether __________.

A. breakfast had any effect on work and studies.   B. people were interested in breakfast

C. breakfast did harm to people 's health   D. people would work better without breakfast

58. According to the passage , some people think without breakfast they will ____

A. lose weight      B. get a good result in their work

C. gain weight      D. not be hungry at all.

59. Which of the following sciences is not right?

A. It is bad for your health to have no breakfast.

B. No breakfast and more lunch may make you fatter.

C. The more breakfast you have, the more quickly you will learn in class.

D. If you don't eat much for lunch and supper , you may lose weight.