2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-30 05:48:18 +00:00

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