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:
12
parse.lex
12
parse.lex
@@ -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:]_-]* {
|
||||||
|
Reference in New Issue
Block a user