home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Games / Xconq 7.1.0 / src / xconq-7.1.0 / test / syntax-diff.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  1996-07-07  |  670 b   |  16 lines  |  [TEXT/R*ch]

  1. #!/bin/sh
  2.  
  3. # This script extracts and compares the symbols defined in the syntax chart
  4. # to those defined in the manual.
  5.  
  6. sed -e '/^@c Syntax/,/^@example/d' -e 's/end example/end_example/' $1/../doc/syntax.texi | tr ' |()[]' '\012' | grep -v '^@[^@]' | sed -e 's/@@/@/' | grep -v '::=' | grep -v '\.\.\.' | sort | uniq >syntax.syms
  7.  
  8. grep '@deffn' $1/../doc/refman.texi | grep '@code' | sed -e 's/^.*@code{\([^{ }]*\)}.*$/\1/' | sed -e 's/@@/@/' | sort | uniq >doc.syms
  9.  
  10. echo "Differences between symbols in reference manual and in syntax chart:"
  11. echo "('<' - in manual,  '>' - in syntax chart)"
  12.  
  13. diff -w doc.syms  syntax.syms | grep -v '^[0-9]' | grep -v '^---'
  14.  
  15. exit 0
  16.