www.pudn.com > flex_bingle.rar > debflex.awk


# Clarify the flex debug trace by substituting first line of each rule. 
# Francois Pinard , July 1990. 
# 
# Rewritten to process correctly \n's in scanner input. 
# BEGIN section modified to correct a collection of rules. 
# Michal Jaegermann , December 1993 
# 
# Sample usage: 
#	flex -d PROGRAM.l 
#	gcc -o PROGRAM PROGRAM.c -lfl 
#	PROGRAM 2>&1 | gawk -f debflex.awk PROGRAM.l 
# 
# (VP's note: this script presently does not work with either "old" or 
#  "new" awk; fixes so it does will be welcome) 
 
BEGIN { 
    # Insure proper usage. 
 
    if (ARGC != 2) { 
	print "usage: gawk -f debflex.awk FLEX_SOURCE