Stroustrup“桌面计算器”第6章 [英] Stroustrup "desk calculator" chapter 6

查看:90
本文介绍了Stroustrup“桌面计算器”第6章的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Stroustrup从第6章开始,带有桌面计算器程序:


这里是计算器接受的语言的语法:


程序:

END // END是输入结束

expr_list END

expr_list:

表达式PRINT // PRINT是分号

表达式PRINT expr_list

表达式:

表达式+术语

表达式 - 术语< br $>
term

.................................. ...............

........................... ......................


到底是什么?

Stroustrup starts chapter 6 with a programme for desk-calculator:

here is a grammer for the langugae accepted by the calcualtor:

program:
END // END is end-of-input
expr_list END
expr_list:
expression PRINT // PRINT is semicolon
expression PRINT expr_list
expression:
expression + term
expression - term
term
.................................................
.................................................

what the heck it is?

推荐答案

arnuld写道:
arnuld wrote:

Stroustrup从第6章开始,带有桌面计算器程序:


这里是计算器接受的langugae的语法:


程序:

END // END是输入结束

expr_list END

expr_list:

表达式PRINT // PRINT是分号

表达式PRINT expr_list

表达式:

表达式+期限

表达式 - 期限

期限

................................................

........................................... .....


到底是什么?
Stroustrup starts chapter 6 with a programme for desk-calculator:

here is a grammer for the langugae accepted by the calcualtor:

program:
END // END is end-of-input
expr_list END
expr_list:
expression PRINT // PRINT is semicolon
expression PRINT expr_list
expression:
expression + term
expression - term
term
................................................
................................................

what the heck it is?



这是计算器接受语言的语法,

程序出现在后面的页面中一个你正在寻找

at。


祝你好运,


Tom

It''s the grammar for the language to be accepted by the calculator, the
program for which appears in the pages following the one you''re looking
at.

Best regards,

Tom


它是计算器接受语言的语法,
It''s the grammar for the language to be accepted by the calculator, the

程序出现在你正在寻找的那个页面中的页面

at。
program for which appears in the pages following the one you''re looking
at.



我知道。我已经看过代码,但代码并不意味着像DC程序(DC ==桌面计算器)。


为什么他开始使用'expr_list :"在他做了expr_list END之后在之前的

行?

(他首先结束了这个列表然后开始了它)

i know. i have seen the code but that code does not mean anything like
the DC programme (DC == desk calculcator).

why he started "expr_list:" after he did "expr_list END" on previous
line?
( he ended the list first & then started it)


Stroustrup这样说:


C ++程序 - DC程序(DC ==桌面计算器)


i意味着,我们将编写一个程序,将生成DC程序&我们

将会计算结果(而不是直接用C ++计算结果

)。


我是对的吗? br />
does Stroustrup say this:

C++ programme - DC programme ( DC == Desk Calculator)

i mean, we will write a programme that will generate DC programme & we
will assum that will compute results (rather than computing results
directly with C++).

am i right?


这篇关于Stroustrup“桌面计算器”第6章的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆