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