diff options
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/prparser.y')
-rw-r--r-- | sys/contrib/dev/acpica/compiler/prparser.y | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sys/contrib/dev/acpica/compiler/prparser.y b/sys/contrib/dev/acpica/compiler/prparser.y index 20d6e6a..749f7d5 100644 --- a/sys/contrib/dev/acpica/compiler/prparser.y +++ b/sys/contrib/dev/acpica/compiler/prparser.y @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2015, Intel Corp. + * Copyright (C) 2000 - 2016, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -48,6 +48,13 @@ #define _COMPONENT ASL_PREPROCESSOR ACPI_MODULE_NAME ("prparser") +void * AslLocalAllocate (unsigned int Size); + +/* Bison/yacc configuration */ + +#undef alloca +#define alloca AslLocalAllocate + int PrParserlex (void); int PrParserparse (void); void PrParsererror (char const *msg); @@ -175,11 +182,11 @@ Expression /* Default base for a non-prefixed integer is 10 */ - | EXPOP_NUMBER { UtStrtoul64 (PrParsertext, 10, &$$);} + | EXPOP_NUMBER { AcpiUtStrtoul64 (PrParsertext, 10, ACPI_MAX64_BYTE_WIDTH, &$$);} /* Standard hex number (0x1234) */ - | EXPOP_HEX_NUMBER { UtStrtoul64 (PrParsertext, 16, &$$);} + | EXPOP_HEX_NUMBER { AcpiUtStrtoul64 (PrParsertext, 16, ACPI_MAX64_BYTE_WIDTH, &$$);} ; %% @@ -206,8 +213,11 @@ void PrParsererror ( char const *Message) { + + sprintf (StringBuffer, "Preprocessor Parser : %s (near line %u)", + Message, Gbl_CurrentLineNumber); DtError (ASL_ERROR, ASL_MSG_SYNTAX, - NULL, (char *) Message); + NULL, (char *) StringBuffer); } |