2
0

compile_rfc1918_parser.rl.sh 337 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. which ragel >/dev/null
  3. if [ $? -ne 0 ] ; then
  4. echo "ERROR. Ragel not installed, cannot compile the Ragel grammar." >&2
  5. exit 1
  6. else
  7. ragel -v
  8. echo
  9. fi
  10. set -e
  11. RAGEL_FILE=rfc1918_parser
  12. echo ">>> Compiling Ragel grammar $RAGEL_FILE.rl ..."
  13. ragel -G2 -C $RAGEL_FILE.rl
  14. echo
  15. echo "<<< OK: $RAGEL_FILE.c generated"
  16. echo