#!/bin/csh
# COMPILE Ada95 Generic Architecture for SCATC DSK by Rick Conn
# Run scayacc and then compile the system
set verbose

# Run the ayacc modified specifically for the Ada95 part of SCATC DSK
scayacc a95p.y

# Convert the Parser for GNAT
gnatchop -w a95p_tokens.a
gnatchop -w a95p_goto.a
gnatchop -w a95p_shift_reduce.a
gnatchop -w a95p.a

# Compile the Parser using GNAT
gcc -c a95p.ads
gcc -c a95p.adb
gcc -c a95p_goto.ads
gcc -c a95p_shift_reduce.ads
gcc -c a95p_tokens.ads

# Compile and bind the Mainline
gcc -c tool.adb
gnatbind -x tool.ali
gnatlink tool.ali

# Cleanup
rm -f *.ali *.o

unset verbose
