• Ann: HAC v.0.0996

    From Gautier write-only address@21:1/5 to All on Sat Jan 22 01:41:09 2022
    HAC (HAC Ada Compiler) is a small, quick, open-source Ada compiler,
    covering a subset of the Ada language.
    HAC is itself fully programmed in Ada.

    Web site: http://hacadacompiler.sf.net/

    Source repositories:
    #1 svn: https://sf.net/p/hacadacompiler/code/HEAD/tree/trunk/
    #2 git: https://github.com/zertovitch/hac

    * Main improvements since v.0.095:

    - range checks on discrete subtype assignment (:=) and
    conversion
    - short-circuit logical operators: "and then", "or else"
    - for S = Scalar subtype: S'First, S'Last, S'Succ, S'Pred, S'Pos,
    S'Val, S'Image, S'Value, S'Range attributes
    - for A = array object or array subtype: A'First [(N)],
    A'Last [(N)], A'Range [(N)], A'Length [(N)] attributes
    - "&", "<", ">", "=", "/=" operators defined for the String type
    (additionally to HAL.VString type)
    - CASE choices admit ranges
    - forward declarations for subprograms

    Enjoy!

    Gautier

    PS: for Windows there is an integrated editor that embeds HAC:
    LEA: http://l-e-a.sf.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Leo Brewin@21:1/5 to All on Sun Jan 23 11:51:25 2022
    Thanks Gautier for the latest updates to HAC.

    I just ran the gallery test on my macOS and I got a constraint error
    while running attributes.adb. Here is the output:

    Attributes Standard subtypes are indicated with '*'
    ========== HAL subtypes are indicated with '#'

    S'First and S'Last attributes for scalar subtype S:

    * Integer's bounds : -9223372036854775808 .. 9223372036854775807
    * Natural's bounds : 0 .. 9223372036854775807
    * Positive's bounds : 1 .. 9223372036854775807
    Some_Range's bounds : -123 .. 456
    * Boolean's bounds : False .. True
    A_to_Z's bounds : A .. Z

    Execution of ../hac terminated by unhandled exception
    raised CONSTRAINT_ERROR : erroneous memory access
    Load address: 0x10f8a0000
    Call stack traceback locations:
    0x10f9d02a7 0x7ff80fc2ae2b 0x10f9bcee4

    If I comment out line number 47 (which uses Real'First and Real'Last)
    then the code runs without error.

    For gnatmake I used the AdaCore 2019 version,

    GNATMAKE Community 2019 (20190517-83)
    Copyright (C) 1995-2019, Free Software Foundation, Inc.

    and I'm running this on macOS 12.1

    Cheers,
    Leo

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gautier write-only address@21:1/5 to All on Sun Jan 23 04:09:41 2022
    Hi Leo,
    Thanks for the feedback. I ran into issues using an old version of GNAT (not the same year, for another machine, ...) so hopefully my fix solves your issue(s) as well.
    The fix is commit d523657 on git/github, 588 on svn/sourceforge.
    One issue involves the HAC_Image function (a "nice image" for floating-point numbers) and is not yet resolved (might be in that old GNAT's run-time library), but the attributes.adb examples turns around that one.
    Cheers,
    Gautier

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gautier write-only address@21:1/5 to All on Sun Jan 23 04:58:45 2022
    One issue involves the HAC_Image function (a "nice image" for floating-point numbers) and is not yet resolved (might be in that old GNAT's run-time library), but the attributes.adb examples turns around that one.

    Issue was in System.Img_Real, procedure Set_Image_Real, as in GNAT GPL 2017. Obviously it has been fixed since then.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Leo Brewin@21:1/5 to Gautier on Mon Jan 24 10:13:19 2022
    Thanks Gautier, it all works fine now.
    Keep up the great work :)
    Cheers, Leo

    On 23/1/2022 11:58 pm, Gautier write-only address wrote:
    One issue involves the HAC_Image function (a "nice image" for floating-point numbers) and is not yet resolved (might be in that old GNAT's run-time library), but the attributes.adb examples turns around that one.

    Issue was in System.Img_Real, procedure Set_Image_Real, as in GNAT GPL 2017. Obviously it has been fixed since then.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)