diff options
author | CamVan Nguyen <ctnguyen@us.ibm.com> | 2011-11-10 13:22:16 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2011-11-15 18:13:18 -0600 |
commit | 4d9344f1025ee77e24e88249dd3e32f3d4c9a3ba (patch) | |
tree | d3d41ed886b43bf0a0f955702d207b31c3050510 /src/build/ifcompiler/initCompiler.lex | |
parent | 22b8b1dc178665eb32f923e47211f549b4d1913f (diff) | |
download | talos-hostboot-4d9344f1025ee77e24e88249dd3e32f3d4c9a3ba.tar.gz talos-hostboot-4d9344f1025ee77e24e88249dd3e32f3d4c9a3ba.zip |
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 <mjjones@us.ibm.com>
Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build/ifcompiler/initCompiler.lex')
-rwxr-xr-x | src/build/ifcompiler/initCompiler.lex | 8 |
1 files changed, 6 insertions, 2 deletions
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; } |