题目内容 (请给出正确答案)

给定以下文法 factor → digit | (expr ) term → term × factor | term / factor | factor expr

8.给定以下文法 factor → digit | (expr ) term → term × factor | term / factor | factor expr → expr + term | expr – term | termdigit → 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 (1)构建以下表达式的语法树 (a)1+2-3 (b)1+2×3/4 (2)添加(a)的语法树的属性值(term.t=…) (3)添加(a)的语义动作(print …)

暂无答案
您可能会需要:
更多“给定以下文法 factor → digit | (expr ”相关的问题

第1题

下面哪些属性文法是L-属性文法。

A、G(S): 产 生 式 语 义 规 则 S→XYZ Z.h := S.a X.c := Z.g S.b := X.d -2 Y.e := S.b X→x X.d :=2*X.c Y→y Y.f := Y.e*3 Z→z Z.g :=Z.h+1

B、G(S): 产 生 式 语 义 规 则 S→B B.ps :=10 S.ht :=B.ht B→ sub .ps :=B.ps .ps :=shrink(B.ps) B.ht :=disp(.ht, .ht) B→text B.ht :=text.h×B.ps

C、G(L): 产 生 式 语 义 规 则 L→E n print(E.val) E→+T E.val := .val+T.val E→T E.val :=T.val T→*F T.val :=.val* F.val T→F T.val :=F.val F→ (E) F.val :=E.val F→digit F.val :=digit.lexval

D、G(D): 产 生 式 语 义 规 则 D→TL L.in := T.type T→int T.type := integer T→real T.type := real L→, id .in :=L.in addtype(id.entry, L.in) L→id addtype(id.entry, L.in)

点击查看答案

第2题

【T8】
A.INFLATION
B.SHORT
C.UP TO A.PREVIOUS SHOCKS RESULTED IN DOUBLE-DIGIT【T7】______AND GLOBAL ECONOMIC DECLINE
B.TAXES ACCOUNT FOR【T8】______FOUR-FIFTHS OF THE RETAIL PRICE
C.PUSH THE PRICE HIGHER STILL IN THE【T9】______TERM COULD THE BAD OLD DAYS OF ECONOMIC DECLINE BE ABOUT TO RETURN? SINCE OPEC AGREED TO SUPPLY-CUTS IN MARCH, THE PRICE OF CRUDE OIL HAS JUMPED TO ALMOST $ 26 A BARREL, UP FROM LESS THAN $ 10 LAST DECEMBER.THIS NEAR-TRIPLING OF OIL PRICES CALLS UP SCARY MEMORIES OF THE 1973 OIL SHOCK, WHEN PRICES QUADRUPLED, AND 1979—1980, WHEN THEY ALSO ALMOST TRIPLE
D.BOTH【T10】______.SO WHERE ARE THE HEADLINES WARNING OF GLOOM AND DOOM THIS TIME? THE OIL PRICE WAS GIVEN ANOTHER PUSH UP THIS WEEK WHEN IRAQ SUSPENDED OIL EXPORTS.STRENGTHENING ECONOMIC GROWTH, AT THE SAME TIME AS WINTER GRIPS THE NORTHERN HEMISPHERE, COULD【T11】______. YET THERE ARE GOOD REASONS TO EXPECT THE ECONOMIC CONSEQUENCES NOW TO BE LESS SEVERE THAN IN THE 1970S.IN MOST COUNTRIES THE COST OF CRUDE OIL NOW ACCOUNTS FOR A SMALLER SHAREOF THE PRICE OF PETROL THAN IT DID IN THE 1970S.IN EUROPE,【T12】_______, SO EVEN QUITE BIGCHANGES IN THE PRICE OF CRUDE HAVE A MORE MUTED EFFECT ON PUMP PRICES THAN IN THE PAST.

此题为多项选择题。请帮忙给出正确答案和分析,谢谢!
点击查看答案

第3题

In a certain two-digit number, the units' digit is twice the tens' digit.
Column A Column B
The tens' digit 5
A.if the quantity in Column A is greater
B.if the quantity in Column B is greater
C.if the two quantity are equal
D.if the relationship cannot be determined from the information given

请帮忙给出正确答案和分析,谢谢!
点击查看答案

第4题

Over the next 5 years, every phone number in the city will gain an extra
A.8 digits.
B.2 digits.
C.1 or 2 digits.

请帮忙给出正确答案和分析,谢谢!
点击查看答案

第5题

【T10】
A.INFLATION
B.SHORT
C.UP TO A.PREVIOUS SHOCKS RESULTED IN DOUBLE-DIGIT【T7】______AND GLOBAL ECONOMIC DECLINE
B.TAXES ACCOUNT FOR【T8】______FOUR-FIFTHS OF THE RETAIL PRICE
C.PUSH THE PRICE HIGHER STILL IN THE【T9】______TERM COULD THE BAD OLD DAYS OF ECONOMIC DECLINE BE ABOUT TO RETURN? SINCE OPEC AGREED TO SUPPLY-CUTS IN MARCH, THE PRICE OF CRUDE OIL HAS JUMPED TO ALMOST $ 26 A BARREL, UP FROM LESS THAN $ 10 LAST DECEMBER.THIS NEAR-TRIPLING OF OIL PRICES CALLS UP SCARY MEMORIES OF THE 1973 OIL SHOCK, WHEN PRICES QUADRUPLED, AND 1979—1980, WHEN THEY ALSO ALMOST TRIPLE
D.BOTH【T10】______.SO WHERE ARE THE HEADLINES WARNING OF GLOOM AND DOOM THIS TIME? THE OIL PRICE WAS GIVEN ANOTHER PUSH UP THIS WEEK WHEN IRAQ SUSPENDED OIL EXPORTS.STRENGTHENING ECONOMIC GROWTH, AT THE SAME TIME AS WINTER GRIPS THE NORTHERN HEMISPHERE, COULD【T11】______. YET THERE ARE GOOD REASONS TO EXPECT THE ECONOMIC CONSEQUENCES NOW TO BE LESS SEVERE THAN IN THE 1970S.IN MOST COUNTRIES THE COST OF CRUDE OIL NOW ACCOUNTS FOR A SMALLER SHAREOF THE PRICE OF PETROL THAN IT DID IN THE 1970S.IN EUROPE,【T12】_______, SO EVEN QUITE BIGCHANGES IN THE PRICE OF CRUDE HAVE A MORE MUTED EFFECT ON PUMP PRICES THAN IN THE PAST.

请帮忙给出正确答案和分析,谢谢!
点击查看答案

第6题

【T9】
A.INFLATION
B.SHORT
C.UP TO A.PREVIOUS SHOCKS RESULTED IN DOUBLE-DIGIT【T7】______AND GLOBAL ECONOMIC DECLINE
B.TAXES ACCOUNT FOR【T8】______FOUR-FIFTHS OF THE RETAIL PRICE
C.PUSH THE PRICE HIGHER STILL IN THE【T9】______TERM COULD THE BAD OLD DAYS OF ECONOMIC DECLINE BE ABOUT TO RETURN? SINCE OPEC AGREED TO SUPPLY-CUTS IN MARCH, THE PRICE OF CRUDE OIL HAS JUMPED TO ALMOST $ 26 A BARREL, UP FROM LESS THAN $ 10 LAST DECEMBER.THIS NEAR-TRIPLING OF OIL PRICES CALLS UP SCARY MEMORIES OF THE 1973 OIL SHOCK, WHEN PRICES QUADRUPLED, AND 1979—1980, WHEN THEY ALSO ALMOST TRIPLE
D.BOTH【T10】______.SO WHERE ARE THE HEADLINES WARNING OF GLOOM AND DOOM THIS TIME? THE OIL PRICE WAS GIVEN ANOTHER PUSH UP THIS WEEK WHEN IRAQ SUSPENDED OIL EXPORTS.STRENGTHENING ECONOMIC GROWTH, AT THE SAME TIME AS WINTER GRIPS THE NORTHERN HEMISPHERE, COULD【T11】______. YET THERE ARE GOOD REASONS TO EXPECT THE ECONOMIC CONSEQUENCES NOW TO BE LESS SEVERE THAN IN THE 1970S.IN MOST COUNTRIES THE COST OF CRUDE OIL NOW ACCOUNTS FOR A SMALLER SHAREOF THE PRICE OF PETROL THAN IT DID IN THE 1970S.IN EUROPE,【T12】_______, SO EVEN QUITE BIGCHANGES IN THE PRICE OF CRUDE HAVE A MORE MUTED EFFECT ON PUMP PRICES THAN IN THE PAST.

此题为多项选择题。请帮忙给出正确答案和分析,谢谢!
点击查看答案

第7题

【T7】
A.INFLATION
B.SHORT
C.UP TO A.PREVIOUS SHOCKS RESULTED IN DOUBLE-DIGIT【T7】______AND GLOBAL ECONOMIC DECLINE
B.TAXES ACCOUNT FOR【T8】______FOUR-FIFTHS OF THE RETAIL PRICE
C.PUSH THE PRICE HIGHER STILL IN THE【T9】______TERM COULD THE BAD OLD DAYS OF ECONOMIC DECLINE BE ABOUT TO RETURN? SINCE OPEC AGREED TO SUPPLY-CUTS IN MARCH, THE PRICE OF CRUDE OIL HAS JUMPED TO ALMOST $ 26 A BARREL, UP FROM LESS THAN $ 10 LAST DECEMBER.THIS NEAR-TRIPLING OF OIL PRICES CALLS UP SCARY MEMORIES OF THE 1973 OIL SHOCK, WHEN PRICES QUADRUPLED, AND 1979—1980, WHEN THEY ALSO ALMOST TRIPLE
D.BOTH【T10】______.SO WHERE ARE THE HEADLINES WARNING OF GLOOM AND DOOM THIS TIME? THE OIL PRICE WAS GIVEN ANOTHER PUSH UP THIS WEEK WHEN IRAQ SUSPENDED OIL EXPORTS.STRENGTHENING ECONOMIC GROWTH, AT THE SAME TIME AS WINTER GRIPS THE NORTHERN HEMISPHERE, COULD【T11】______. YET THERE ARE GOOD REASONS TO EXPECT THE ECONOMIC CONSEQUENCES NOW TO BE LESS SEVERE THAN IN THE 1970S.IN MOST COUNTRIES THE COST OF CRUDE OIL NOW ACCOUNTS FOR A SMALLER SHAREOF THE PRICE OF PETROL THAN IT DID IN THE 1970S.IN EUROPE,【T12】_______, SO EVEN QUITE BIGCHANGES IN THE PRICE OF CRUDE HAVE A MORE MUTED EFFECT ON PUMP PRICES THAN IN THE PAST.

此题为多项选择题。请帮忙给出正确答案和分析,谢谢!
点击查看答案

第8题

根据给出的短语,写出中文意思:binary digit
点击查看答案

第9题

【C6】
A.food
B.grocery
C.digit
D.automation

请帮忙给出正确答案和分析,谢谢!
点击查看答案

第10题

【单选题】digit

A、汇编语言

B、n.数字; 手指,足趾; 一指宽

C、n.内核

D、adj.手持的

点击查看答案
热门考试 全部 >
找答案
账号:
你好,尊敬的上学吧用户
粘贴 取消
搜索
如搜索结果不匹配,请 联系老师上传试题 获取答案
发送账号至手机
看不清?点击更换
发送
谢谢您的反馈

您认为本题答案有误,我们将认真、仔细核查,
如果您知道正确答案,欢迎您来纠错

警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
上学吧
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反上学吧会员政策被冻结。您可在“上学吧”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
上学吧
点击打开微信
温馨提示

您的免费查看次数已用完,

需要开通会员才能继续使用。

马上开通会员 我已开通会员,登录会员账号继续查看答案
重置密码
确认修改