mirror of
https://github.com/erlang/spec.git
synced 2026-04-17 10:23:53 +00:00
9 lines
335 B
Bash
Executable File
9 lines
335 B
Bash
Executable File
#! /bin/sh
|
|
|
|
# Extract grammer rules from files in command line arguments.
|
|
# I.e. extract all lines BETWEEN \begin{rules} and \end{rules}.
|
|
|
|
##awk '/^\\begin{rules}/, /^\\end{rules}/' $@
|
|
|
|
awk 'BEGIN { copy = 0 } { if ( $1 ~ /^\\begin{rules}/ ) { copy = 1 } else if ( $1 ~ /^\\end{rules}/ ) { copy = 0 } else if ( copy == 1 ) print }' $@
|