问题标签 [bcpl]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
1466 浏览

gcc - 哪里有创建 GCC 前端的好文档?

我的任务是为 IT 学生设计一些半年和全年的大学项目,由于希望以前从未做过(而且我有某些虐待狂倾向),其中一个是将 BCPL 前端编译器添加到 GCC 套件。

我在哪里可以找到以下一项或多项:

  • 一些很好的参考类型文档,描述了如何将这样的野兽添加到 GCC?
  • 一个这样做的例子,对于一个简单的语言。
  • 该过程的任何指南。
0 投票
2 回答
287 浏览

objective-c - 在 Objective-C ARC 中,什么是“在外部“BCPL”块中声明的 BPTRs”?

ARC 的 Clang 文档中,它说:

ARC 适用于在 extern "BCPL" 块中声明的 Objective-C 指针类型、块指针类型和 [beginning Apple 8.0, LLVM 3.8] BPTRs。

这些“在外部“BCPL”块中声明的 BPTR”是什么?

0 投票
1 回答
1087 浏览

constants - BCPL octal numerical constants

I've been digging into the history of BCPL due to a question I was asked about the reasoning behind using the prefix "0x" for the representation hexadecimal numbers.

In my search I stumbled upon a really good explanation of the history behind this token. (Why are hexadecimal numbers prefixed with 0x?)

From this post, however, another questions sparked:

For octal constants, did BCPL use 8 <digit> (As per specs: http://cm.bell-labs.com/cm/cs/who/dmr/bcpl.pdf) or did it use #<digit> (As per http://rabbit.eng.miami.edu/info/bcpl_reference_manual.pdf) or were both of these syntaxes valid in different implementations of the language?

I've also been able to find a second answer here that used the # syntax which further intrigued me in the subject. (Why are leading zeroes used to represent octal numbers?)

Any historical insights are greatly appreciated.

0 投票
2 回答
208 浏览

arrays - 如何在 BCPL 中初始化数组?

我尝试let stringArr = newvec(12);然后尝试像这样初始化数组中的每个点:let stringArr!i = newvec(5);但这会返回一个错误,告诉我我不能这样做。这里有没有人可以帮助我学习这种恐龙语言?

0 投票
2 回答
99 浏览

operating-system - BCPL 的 isdigit 函数

我目前正在 BCPL 中为 OS 课程编程,并想在我is_digit()的程序中编写一个简单的验证函数。

我当前代码的代码片段如下:

我知道 BCPL 没有类型的概念,但是我怎么能用这种语言完成这种事情呢?

传入一个数字会产生一个false结果,而不是预期的true

0 投票
1 回答
52 浏览

bcpl - 在 BCPL 中,“of”是做什么的?

我试图从用 BCPL 编写的 DEC PDP10 中理解一些古老的代码。代码示例如下:

在这种情况下,“D7 of temp”和“P1 of word1”结构做了什么?

0 投票
3 回答
727 浏览

c - 怎么可能引导一个 C 编译器(从源代码)?

我正在研究编译器引导,并研究了 Golang 如何从源代码实现引导,即通过构建用 C 实现的最后一个版本的 Golang 并使用生成的可执行文件来编译更新的 Go 版本。这让我很好奇如何用 C 完成同样的事情。你能在计算机上构建一个 C 编译器,而实际上它上面什么都没有吗?如果不是,那么我怎么能相信我使用的编译器的二进制文件不会自动填充它用间谍软件编译的二进制文件?

相关问题,既然第一个 C 编译器是用 B 编写的,而 B 是用 BCPL 编写的,那么 BCPL 是用什么编写的?

0 投票
0 回答
56 浏览

bcpl - 如何在 MacOS 或 Linux 下运行 BCPL

我刚刚用谷歌搜索了这个问题,但我发现的只是在 windows 下。有谁知道如何在 MacOS 或 Linux 下设置 BCPL 的环境?