From: Todd C. Miller Date: Wed, 4 Aug 1999 07:54:34 +0000 (+0000) Subject: o Remove some unnecessary backslashes X-Git-Tag: SUDO_1_6_0~170 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d1a6fa810ef41484dcf67c1f01d9ea2a1ba319e4;p=sudo 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 --- diff --git a/parse.lex b/parse.lex index cede10671..221ce413b 100644 --- a/parse.lex +++ b/parse.lex @@ -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:]_-]* {