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

# Run the ayacc modified specifically for the Ada83 part of SCATC Kit
scayacc a83p.y

# Convert the Parser for GNAT
gnatchop -w a83p_tokens.a
gnatchop -w a83p_goto.a
gnatchop -w a83p_shift_reduce.a
gnatchop -w a83p.a

# Compile the Parser using GNAT
gcc -c a83p.ads
gcc -c a83p.adb
gcc -c a83p_goto.ads
gcc -c a83p_shift_reduce.ads
gcc -c a83p_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
