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