From 4d9344f1025ee77e24e88249dd3e32f3d4c9a3ba Mon Sep 17 00:00:00 2001 From: CamVan Nguyen Date: Thu, 10 Nov 2011 13:22:16 -0600 Subject: Added initfile compiler support for attribute enums Change-Id: I78a2a85831b545e7213e08a272fec482bd69cdf1 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/493 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES Reviewed-by: Andrew J. Geissler Reviewed-by: A. Patrick Williams III --- src/build/ifcompiler/initCompiler.lex | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/build/ifcompiler/initCompiler.lex') diff --git a/src/build/ifcompiler/initCompiler.lex b/src/build/ifcompiler/initCompiler.lex index 2361272f2..9abdaded3 100755 --- a/src/build/ifcompiler/initCompiler.lex +++ b/src/build/ifcompiler/initCompiler.lex @@ -23,6 +23,7 @@ // dg01 D766229 dgilbert 08/03/10 add check for hex/bin data > 64 bits // dg02 SW058986 dgilbert 02/28/11 More noticeable fail for missing col headers // andrewg 09/19/11 Updates based on review +// camvanng 11/08/11 Added support for attribute enums // End Change Log *********************************************************************************/ /** * @file initCompiler.lex @@ -202,16 +203,19 @@ bits { g_coltype = INIT_BITS; return INIT_BITS;} expr { g_coltype = INIT_EXPR; return INIT_EXPR;} scom_data { g_coltype = INIT_SCOMD; return INIT_SCOMD;} - /*HEX and Binary nubers in the scombody can be up to 64bit, + /*HEX and Binary numbers in the scombody can be up to 64bit, * decimal numbers will always fit in 32bit int */ {BINARY} { yylval.uint64 = bits2int(yytext); return INIT_INT64; } - <*>; { g_coltype = 0; return ';'; } END_INITFILE return INIT_ENDINITFILE; +<*>ENUM_{ID} { + yylval.str_ptr = new std::string(yytext); return ATTRIBUTE_ENUM; + } + <*>{ID} { yylval.str_ptr = new std::string(yytext); return INIT_ID; } -- cgit v1.2.1