USG_PG3/usr/source/rc/lil.rc
: creat the "lil" compiler
: lil consists of:
: /usr/bin/lc lc command
: /usr/lib/lil1 lil compiler pass 1
: /usr/lib/lil2 lil compiler pass 2
echo
echo LIL compiler
chdir ../lil
echo /usr/bin/lc ; cc -O -s lc.c ; mv -f a.out /usr/bin/lc
echo grammar ; yacc grammar
: note: expect 3 shift/reduce conflicts
ed - y.tab.c
g/#/d
1;/yyactr/-1d
/nterms/-1,$d
w tables
q
echo /usr/lib/lil1 ; cc -O -s ???.c ; mv -f a.out /usr/lib/lil1
echo /usr/lib/lil2 ; cc -O -s pass2c.c ; mv -f a.out /usr/lib/lil2
rm y.tab.c *.o tables
chdir /usr/lib
chmod 755 lil1 lil2 /usr/bin/lc
chown bin lil1 lil2 /usr/bin/lc