File: syntax-diff.sh

package info (click to toggle)
xconq 7.1.0-7
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 7,056 kB
  • ctags: 7,960
  • sloc: ansic: 88,493; perl: 2,057; sh: 1,766; makefile: 1,110; csh: 81; awk: 47; lisp: 39
file content (15 lines) | stat: -rwxr-xr-x 670 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

# This script extracts and compares the symbols defined in the syntax chart
# to those defined in the manual.

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

grep '@deffn' $1/../doc/refman.texi | grep '@code' | sed -e 's/^.*@code{\([^{ }]*\)}.*$/\1/' | sed -e 's/@@/@/' | sort | uniq >doc.syms

echo "Differences between symbols in reference manual and in syntax chart:"
echo "('<' - in manual,  '>' - in syntax chart)"

diff -w doc.syms  syntax.syms | grep -v '^[0-9]' | grep -v '^---'

exit 0