ADA 中的单独程序
我有一个非常大的项目,我正在尝试开始使用 GPS(Gnat 编程工作室)而不是我现有的。
项目的命名约定如下:
Something.1.ada 表示规范
Something.2.ada 表示主体
parents.son.2.ada 表示单独的过程/函数,其中父级是声明单独函数/过程的位置son 是单独函数/过程的名称。 它甚至可能更复杂,如 grandparent.parent.son.2.ada
我的问题是我无法配置 GPS 来将单独的函数/过程识别为项目中的源文件。
这是一个巨大的项目,因此更改文件名或代码本身的任何其他更改对我来说不是一个选择,因为这会带来太多麻烦。
如何正确配置 GPS?
I have a very big project, and I'm trying to start using GPS (Gnat Programming Studio) instead of what I have.
The naming conventions of the proj are as following:
something.1.ada for a spec
something.2.ada for a body
parents.son.2.ada for separate procedure/functions where the parent is where the separate function/procedure is declared and son is the name of the separate function/procedure.
It might even be more complicated, as in grandparent.parent.son.2.ada
My problem is I can't configure GPS to recognize the separate functions/procedures as source files in the project.
It is a huge project so changing the names of the files or any other change in the code itself is not an option for me as it will cause for too much trouble.
How do I configure GPS correctly?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要一个包含
Naming
包的 GNAT 项目文件。您的命名方案听起来像 Apex 命名方案,在 GPRbuild 中讨论用户指南 - 特别是此处。所以
我认为你不需要
因为
You need a GNAT Project file with package
Naming
. Your naming scheme sounds like the Apex naming scheme, discussed in the GPRbuild User's Guide - specifically here.So that would be
I don't think you need
because
西蒙没有提到的另一个选项是运行 gnatchop 在你的程序上。
gnathop
是一个程序,它将把所有文件重命名为 Gnat 默认查找的名称。它确实有一个缺点,即结果不会像以前那样命名和排列文件。然而,与手动构建映射文件或调整项目的命名方案直到一切正常之前相比,这可能要少得多的工作。
Another option Simon didn't mention is to run gnatchop on your program.
gnatchop
is a program that will rename all your files to the names that Gnat by default looks for.It does have the drawback that the result won't have the files named and arranged the way it was before. However, it can be a lot less work than manually building a mapping file or tweaking the project's naming scheme until things work.