%{ /* * $Header: /blue/homes/cowell/src/nec/RCS/nec.lex,v 1.1 1996/04/20 21:06:17 cowell Exp cowell $ * * nec.lex * Copyright Andy Cowell , all rights reserved. * * $Log: nec.lex,v $ * Revision 1.1 1996/04/20 21:06:17 cowell * Initial revision * * */ static char *rcsid = "$Id: nec.lex,v 1.1 1996/04/20 21:06:17 cowell Exp cowell $"; #include "nec.tab.h" int lineno = 1; void yyerror(char *s); /* * shrink() basically removes the current character and compresses the string. */ void shrink(char *s) { int i = 0, end = 0; while (!end) { if (s[i+1] == '\0') end = 1; s[i] = s[i+1]; i++; } } /* * strip() all c's out of string s. */ char * strip(char *s, char c) { int len, i; len = strlen(s); for (i=0; i