Ayacc 1.4 and Aflex 1.6

I’ve made new versions for Ayacc and Aflex with several improvements. To summarize:

  • support for reentrant scanner and parser,
  • Bison like options to tune the generated parser,
  • some code block injection (à la Bison) to customize the scanner and parser…

You can use them with Alire as follows:

alr get aflex
cd aflex_1.6.0_b3c21d99
alr build
alr install
alr get ayacc
cd ayacc_1.4.0_c06f997f
alr build
alr install

For a more detailed explanation about the reentrant support, have a look at Reentrant scanner and parser with Aflex and Ayacc

6 Likes

Hi Stéphane,

When I execute the Alire commands, I get older versions:

alr get aflex
Note: Deploying aflex=1.5.2021…

alr get ayacc
Note: Deploying ayacc=1.3.0…

Obviously the Alire catalogue is not up-to-date. How do I get the new versions?

You should probably run the following command:

alr index --update-all

OK. This command did something (100 files updated by git, mostly .toml), and on further runs it displays Already up to date.
Now I still get:

alr show aflex :
aflex=1.5.2021: An Ada Lexical Analyzer Generator [...]

alr show ayacc :
ayacc=1.3.0: An Ada LARL(1) parser generator [...]

So I miss a wave of a magic wand (disclaimer: Google translation of “un coup de baguette magique”) in order to have the 1.6 (aflex) and 1.4 (ayacc) versions

Just tried to get both after running alr index --update-all.
I got aflex_1.6.0_b3c21d99 and ayacc_1.4.0_c06f997f.
Alire version is 1.2.2.
My PC is running Windows 10.

My 2 cents.

Good to know. Same setup on my side, but I have installed 1.2.2 as replacement of 1.2. I’ll try harder, then…

Also, alr version gives the following :

APPLICATION
alr version:               1.2.2
libalire version:          1.2.2
compilation date:          2023-01-12 20:53:29
compiler version:          Community 2021 (20210519-103)

CONFIGURATION
config folder:             C:\Users\Nicolas\.config\alire
force flag:                FALSE
non-interactive flag:      FALSE
community index branch:    stable-1.2.1
compatible index versions: ^1.1 & <=1.2.1
indexes folder:            C:\Users\Nicolas\.config\alire\indexes
indexes metadata:          OK
index #1:                  (community) git+https://github.com/alire-project/alire-index#stable-1.2.1
toolchain assistant:       disabled
tool #1 gnat:              gnat_native=12.1.2
tool #2 gprbuild:          gprbuild=22.0.1

WORKSPACE
root status:               OUTSIDE
root release:              N/A
root load error:           N/A
root folder:               N/A
current folder:            Z:\ada\alire_projects

SYSTEM
distribution:              MSYS2
host-arch:                 X86_64
os:                        WINDOWS
target:                    NATIVE
toolchain:                 USER
word-size:                 BITS_64

Success!

The trick was to delete the cache first (the alire folder in C:\Users\[username]\.config), and then launch alr index --update-all.

NB: alr version 1.2.2 doesn’t know the alr install (answer is ERROR: Unrecognized command: install), but nevermind, the executables aflex.exe and ayacc.exe were built anyway!

Indeed, my fault! I was too happy to see this alr install command, I’m using:

alr --version
alr 2.0-dev