diff options
Diffstat (limited to 'source/compiler/dtcompilerparser.l')
-rw-r--r-- | source/compiler/dtcompilerparser.l | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/source/compiler/dtcompilerparser.l b/source/compiler/dtcompilerparser.l index 0d68f41e4b2d..28dcf6af84bf 100644 --- a/source/compiler/dtcompilerparser.l +++ b/source/compiler/dtcompilerparser.l @@ -161,18 +161,20 @@ YYSTYPE DtCompilerlval; /* handle locations */ int DtCompilerParsercolumn = 1; +int DtLabelByteOffset = 0; int DtCompilerParserByteOffset = 0; +UINT32 DtTokenFirstLine = 0; +UINT32 DtTokenFirstColumn = 0; + #define YY_USER_ACTION \ - DtCompilerParserlloc.first_line = DtCompilerParserlloc.last_line = DtCompilerParserlineno; \ - DtCompilerParserlloc.first_column = DtCompilerParsercolumn; \ - DtCompilerParserlloc.first_byte_offset = DtCompilerParserByteOffset; \ - DtCompilerParserlloc.last_column = DtCompilerParsercolumn + DtCompilerParserleng-1; \ + DtTokenFirstLine = DtCompilerParserlineno; \ + DtTokenFirstColumn = DtCompilerParsercolumn; \ DtCompilerParsercolumn += DtCompilerParserleng; \ DtCompilerParserByteOffset += DtCompilerParserleng; \ DbgPrint (ASL_PARSE_OUTPUT,\ - "user action occurred. DtCompilerParserlloc.first_line: %u offset: %u\n",\ - DtCompilerParserlloc.first_line, DtCompilerParserlloc.first_byte_offset); + "user action occurred. DtCompilerParserlloc.first_line: %u\n",\ + DtTokenFirstLine); %} %option nounput noinput yylineno @@ -236,7 +238,11 @@ CommentField {LabelName}{WhiteSpace}*:{WhiteSpace}{Comment}?$ int size = strlen (DtCompilerParsertext); s=UtLocalCacheCalloc (size + 1); AcpiUtSafeStrncpy (s, DtCompilerParsertext, size + 1); - DtCompilerParserlval.s = s; + DtCompilerParserlval.u = (DT_TABLE_UNIT *) UtLocalCacheCalloc (sizeof (DT_TABLE_UNIT)); + DtCompilerParserlval.u->Value = s; + DtCompilerParserlval.u->Line = DtCompilerParserlineno; + DtCompilerParserlval.u->Column = DtCompilerParsercolumn; + DtLabelByteOffset = DtCompilerParserByteOffset; DbgPrint (ASL_PARSE_OUTPUT, "Label: %s\n", s); return (DT_PARSEOP_LABEL); } |