From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: G. B. Newsgroups: comp.lang.ada Subject: Re: Resolving Long Filenames for Packages Date: Wed, 24 Jan 2018 21:18:25 -0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 24 Jan 2018 21:18:25 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="13c9a1c0d0b5539a33ff3c74c0456cd9"; logging-data="9038"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+p1jEbYTTu77kkRm5uVcuqVVTOT6xIOoA=" User-Agent: NewsTap/5.3.1 (iPhone/iPod Touch) Cancel-Lock: sha1:1O/jVGqmIgtAsyVy2FvCma8owB4= sha1:Zy052GR+X+mg1QTpfd4Vr+0Q1Ic= Xref: reader02.eternal-september.org comp.lang.ada:50123 Date: 2018-01-24T21:18:25+00:00 List-Id: wrote: > In my current project, I am making an attempt to elaborate on the means > of which a serie of automata operates (and is structured), by building my > own version of regular expressions (even though not called that, nor > functioning in the exact same way.) > > To compile my code I'm using AdaCore's GNAT by running the command > `gprbuild`. This means I also have a project file associated with the > project, which in and of itself, is looking very basic. It only contains > a means of locating the main procedure and executing it. > > For my experimental implementation of automata, I have ended up with six > different flavors of automata, which I have put in a separate directory, > because the names tend to get extremely long: > > expressions-parser-automata (the directory) > expressions-parser-automata-automaton_x.adb > expressions-parser-automata-automaton_x.ads > (...) > ... > > This brings me to my question. Is there a better way to structure an Ada program than this? Ada compilers do not require this choice of file names. They offer ways of adding compilation units to the Ada library. File names are not part of the program’s text, so the choice is yours, and the possibilities are found in the documentation. That’s the User’s Guide in the case of GNAT; it has a few sections specifically addressing file naming schemes. With compilers using the AdaMagic front end you could place all those _X packages in one file and add this to the library. Gnatchop does something similar to that for GNAT.