The DejaVU Framework -- hush 3.0
[.] Papers Tutorials Examples Manuals Interfaces Sources Packages Resources ?

script: ooyacc.sh hush-3.1/grammar/filters/templates


[.] - [up] [top] - index README make scripts slides talks
  #!/bin/sh
  

ooyacc


  A=
  B=false
  T=@tmpyacc.c
  N=@tmpout
  YACC=yacc
  while test \$# -ge 1
  do
          case $1 in
  	*.y) IN=$1;;
          -n) B=true; N=$2; shift;;
          -yacc) YACC=$2; shift;;
          -bison|-DGNU|-gnu) YACC=yacc;;
  	*) A="\$A $1";;
          esac
          shift
  done
  
  N=`basename \$IN .y`
  
  rm -f @tmp* y.tab.h y.tab.c y.output \$N.tab.c \$N.tab.h
  cat \$IN | \
      @BIN/ooly.flt >  @tmpyacc.y
  \$YACC \$A @tmpyacc.y
  if [ -f @tmpyacc.tab.c ]; then cp @tmpyacc.tab.c y.tab.c; fi
  if [ -f @tmpyacc.tab.h ]; then cp @tmpyacc.tab.h y.tab.h; fi
  if [ -f y.tab.h ]; then cp y.tab.h \$N.tab.h; fi
  if [ -f y.tab.c ]; then cp y.tab.c \$N.tab.c; fi
  cat \$N.tab.c |  \
          @BIN/ooyacc.flt > \$T
  cp \$T \$N.tab.c;
  cp \$T y.tab.c;
  if [ -f \$N.tab.h ]; then cp \$N.tab.h y.tab.h; fi;
  if [ \$B = "true" ]; then cp y.tab.c \$N.y.c; fi 
  #rm -f @tmp*
  

slide: ooyacc

  

[.] Papers Tutorials Examples Manuals Interfaces Sources Packages Resources ?
Hush Online Technology
hush@cs.vu.nl
11/03/98