[apparmor] parser: [patch 2/3] parser: consolidate LIST_VALUE_ID processing

john.johansen at canonical.com john.johansen at canonical.com
Thu Nov 6 01:19:42 UTC 2014


Signed-off-by: John Johansen <john.johansen at canonical.com>
---
 parser/parser_lex.l |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

--- 3.0-diff.orig/parser/parser_lex.l
+++ 3.0-diff/parser/parser_lex.l
@@ -346,11 +346,6 @@
 	{CLOSE_PAREN} { POP_AND_RETURN(TOK_CLOSEPAREN); }
 
 	{COMMA}	{ EAT_TOKEN("listval: ,\n"); }
-
-	({LIST_VALUE_ID}|{QUOTED_ID}) {
-		yylval.id = processid(yytext, yyleng);
-		RETURN_TOKEN(TOK_VALUE);
-	}
 }
 
 <EXTCOND_MODE>{
@@ -376,7 +371,9 @@
 
 <LIST_COND_PAREN_VAL>{
 	{CLOSE_PAREN}	{ POP(); }
+}
 
+<LIST_VAL_MODE,LIST_COND_PAREN_VAL>{
 	({LIST_VALUE_ID}|{QUOTED_ID}) {
 		yylval.id = processid(yytext, yyleng);
 		RETURN_TOKEN(TOK_VALUE);




More information about the AppArmor mailing list