o Remove some unnecessary backslashes

o collapse multiple !'s by using !+ and checking if yyleng is even or odd.
  this allows us to simplify ! handling in parse.yacc
This commit is contained in:
Todd C. Miller
1999-08-04 07:54:34 +00:00
parent 014bd22934
commit d1a6fa810e

View File

@@ -139,13 +139,14 @@ WORD [[:alnum:]_-]+
sawspace = FALSE; sawspace = FALSE;
} /* a command line arg */ } /* a command line arg */
\, { , {
LEXTRACE(", "); LEXTRACE(", ");
return(','); return(',');
} /* return ',' */ } /* return ',' */
\! { !+ {
return('!'); /* return '!' */ if (yyleng % 2 == 1)
return('!'); /* return '!' */
} }
= { = {
@@ -244,9 +245,10 @@ PASSWD[[:blank:]]*: {
if (strcmp(yytext, "ALL") == 0) { if (strcmp(yytext, "ALL") == 0) {
LEXTRACE("ALL "); LEXTRACE("ALL ");
return(ALL); return(ALL);
} else {
LEXTRACE("ALIAS ");
return(ALIAS);
} }
LEXTRACE("ALIAS ");
return(ALIAS);
} }
[[:alnum:]][[:alnum:]_-]* { [[:alnum:]][[:alnum:]_-]* {