Main URL: https://hacadacompiler.sourceforge.io/
Sources, site #1: HAC Ada Compiler download | SourceForge.net
Sources, site #2: GitHub - zertovitch/hac: HAC Ada Compiler - a small, quick Ada compiler fully in Ada
Alire Crate: Alire - Hac
What’s new:
- You can use a loop’s name for the
exit
statement:exit Loop_Name
. - You can exit multiple, nested, loops, by using
exit Loop_Name
. - Ada semantics are better verified:
- Array indexing
(i)(j)
(array of array) and(i,j)
(multi-dimensional array) are no more treated as equivalent (this feature was a remnant of the Pascal syntax). - Separation between Type and Subtype declarations (anonymous types are allowed only in the few cases foreseen by the language).
- Operators of the HAT package (
+
,-
,&
) are visible without prefix only in the scope of ause HAT;
clause.
- Array indexing
Note that correct Ada programs, in relation to the above points, were already accepted and parsed correctly by HAC before that change.
Finally, a bit of cosmetics in the build messages:
C:\Ada\hac\exm>..\hac -v2 -c pkg_demo.adb
*******[ HAC ]******* HAC is free and open-source. Type "hac" for license.
[ HAC ] HAC Ada Compiler version 0.26, 08-Jul-2023
[ HAC ] Compiling main: pkg_demo.adb
[ HAC ] | Compiling x_pkg_demo_s.ads (specification)
[ HAC ] \ Compiling x_pkg_demo_s1.ads (specification)
[ HAC ] \ Compiling x_pkg_demo_s11.ads (specification)
[ HAC ] / x_pkg_demo_s11.ads: done.
[ HAC ] \ Compiling x_pkg_demo_s12.ads (specification)
[ HAC ] / x_pkg_demo_s12.ads: done.
[ HAC ] \ Compiling x_pkg_demo_s13.ads (specification)
[ HAC ] / x_pkg_demo_s13.ads: done.
[ HAC ] / x_pkg_demo_s1.ads: done.
[ HAC ] \ Compiling x_pkg_demo_s2.ads (specification)
[ HAC ] \ Compiling x_pkg_demo_s21.ads (specification)
[ HAC ] / x_pkg_demo_s21.ads: done.
[ HAC ] \ Compiling x_pkg_demo_s22.ads (specification)
[ HAC ] / x_pkg_demo_s22.ads: done.
[ HAC ] \ Compiling x_pkg_demo_s23.ads (specification)
[ HAC ] / x_pkg_demo_s23.ads: done.
[ HAC ] / x_pkg_demo_s2.ads: done.
[ HAC ] \ Compiling x_pkg_demo_s3.ads (specification)
[ HAC ] \ Compiling x_pkg_demo_s31.ads (specification)
[ HAC ] / x_pkg_demo_s31.ads: done.
[ HAC ] \ Compiling x_pkg_demo_s32.ads (specification)
[ HAC ] / x_pkg_demo_s32.ads: done.
[ HAC ] \ Compiling x_pkg_demo_s33.ads (specification)
[ HAC ] / x_pkg_demo_s33.ads: done.
[ HAC ] / x_pkg_demo_s3.ads: done.
[ HAC ] | x_pkg_demo_s.ads: done.
[ HAC ] | Compiling x_pkg_demo_m.ads (specification)
[ HAC ] | x_pkg_demo_m.ads: done.
[ HAC ] | Compiling x_pkg_demo_b.ads (specification)
[ HAC ] | x_pkg_demo_b.ads: done.
[ HAC ] Compilation of pkg_demo.adb (main) completed
[ HAC ] ------ Compilation of eventual with'ed unit's bodies ------
[ HAC ] | Compiling x_pkg_demo_s.adb (body)
[ HAC ] | x_pkg_demo_s.adb: done.
[ HAC ] | Compiling x_pkg_demo_s1.adb (body)