summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/compiler/prparser.y
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2016-09-30 22:40:58 +0000
committerjkim <jkim@FreeBSD.org>2016-09-30 22:40:58 +0000
commitdba8c0a565199df70a86f6a036d00c92f0c7675f (patch)
treecf4924274c6e92898c01efb3c8ba31b34f0630f2 /sys/contrib/dev/acpica/compiler/prparser.y
parent0f41551ef9dde560d9d191d7190af02904dbf611 (diff)
downloadFreeBSD-src-dba8c0a565199df70a86f6a036d00c92f0c7675f.zip
FreeBSD-src-dba8c0a565199df70a86f6a036d00c92f0c7675f.tar.gz
MFC: r284583, r285797, r285799, r287168, r298714, r298720, r298838,
r300879 Merge ACPICA up to 20160527. Requested by: mav
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/prparser.y')
-rw-r--r--sys/contrib/dev/acpica/compiler/prparser.y18
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);
}
OpenPOWER on IntegriCloud