[apparmor] [PATCH 4/9] Simple rename to reflect the ( ) are not always used by flags (in the future)

John Johansen john.johansen at canonical.com
Wed Dec 28 03:01:47 UTC 2011


Signed-off-by: John Johansen <john.johansen at canonical.com>
---
 parser/parser_lex.l  |   16 ++++++++--------
 parser/parser_yacc.y |    8 ++++----
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/parser/parser_lex.l b/parser/parser_lex.l
index 2c503b0..2f2b7fc 100644
--- a/parser/parser_lex.l
+++ b/parser/parser_lex.l
@@ -196,8 +196,8 @@ BOOL_VARIABLE	$(\{{VARIABLE_NAME}\}|{VARIABLE_NAME})
 PATHNAME	(\/|{SET_VARIABLE}{POST_VAR_ID}){ID}*
 QPATHNAME	\"(\/|{SET_VAR_PREFIX})([^\0"]|\\\")*\"
 
-FLAGOPEN_PAREN 	\(
-FLAGCLOSE_PAREN	\)
+OPEN_PAREN 	\(
+CLOSE_PAREN	\)
 FLAGSEP		\,
 EQUALS		=
 ADD_ASSIGN	\+=
@@ -322,16 +322,16 @@ LT_EQUAL	<=
 }
 
 <FLAGS_MODE>{
-	{FLAGOPEN_PAREN}	{
+	{OPEN_PAREN}	{
 			DUMP_PREPROCESS;
 			PDEBUG("FLag (\n");
-			return TOK_FLAG_OPENPAREN;
+			return TOK_OPENPAREN;
 			}
-	{FLAGCLOSE_PAREN}	{
+	{CLOSE_PAREN}	{
 			DUMP_PREPROCESS;
 			PDEBUG("Flag )\n");
 			yy_pop_state();
-			return TOK_FLAG_CLOSEPAREN;
+			return TOK_CLOSEPAREN;
 			}
 
 	{WS}+		{ DUMP_PREPROCESS; /* Eat whitespace */ }
@@ -601,11 +601,11 @@ LT_EQUAL	<=
 			return TOK_COLON;
 			}
 
-{FLAGOPEN_PAREN}	{
+{OPEN_PAREN}	{
 			DUMP_PREPROCESS;
 			PDEBUG("FLag (\n");
 			yy_push_state(FLAGS_MODE);
-			return TOK_FLAG_OPENPAREN;
+			return TOK_OPENPAREN;
 			}
 
 {VARIABLE_NAME}		{
diff --git a/parser/parser_yacc.y b/parser/parser_yacc.y
index 78e9230..b76c69e 100644
--- a/parser/parser_yacc.y
+++ b/parser/parser_yacc.y
@@ -110,6 +110,8 @@ void add_local_entry(struct codomain *cod);
 %token TOK_SET
 %token TOK_ALIAS
 %token TOK_PTRACE
+%token TOK_OPENPAREN
+%token TOK_CLOSEPAREN
 
  /* rlimits */
 %token TOK_RLIMIT
@@ -136,8 +138,6 @@ void add_local_entry(struct codomain *cod);
 
 /* debug flag values */
 %token TOK_FLAGS
-%token TOK_FLAG_OPENPAREN
-%token TOK_FLAG_CLOSEPAREN
 %token TOK_FLAG_SEP
 %token TOK_FLAG_ID
 
@@ -397,12 +397,12 @@ flags:	{ /* nothing */
 		$$ = fv;
 	};
 
-flags:	TOK_FLAGS TOK_EQUALS TOK_FLAG_OPENPAREN flagvals TOK_FLAG_CLOSEPAREN
+flags:	TOK_FLAGS TOK_EQUALS TOK_OPENPAREN flagvals TOK_CLOSEPAREN
 	{
 		$$ = $4;
 	};
 
-flags: TOK_FLAG_OPENPAREN flagvals TOK_FLAG_CLOSEPAREN
+flags: TOK_OPENPAREN flagvals TOK_CLOSEPAREN
 	{
 		$$ = $2;
 	}
-- 
1.7.7.3




More information about the AppArmor mailing list