summaryrefslogtreecommitdiff
path: root/source/compiler/dtparser.y
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2017-08-31 17:21:06 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2017-08-31 17:21:06 +0000
commit0810e26699e1b40b9384eca2137be6155de0a5ba (patch)
tree2f9f57dbc41ae321c10f66c7d7985e328edbdec8 /source/compiler/dtparser.y
parent834d4c5613e9c57c0b9fba46fa717fd7fb9d5891 (diff)
Import ACPICA 20170831.vendor/acpica/20170831
Notes
svn path=/vendor-sys/acpica/dist/; revision=323060 svn path=/vendor-sys/acpica/20170831/; revision=323061; tag=vendor/acpica/20170831
Diffstat (limited to 'source/compiler/dtparser.y')
-rw-r--r--source/compiler/dtparser.y17
1 files changed, 12 insertions, 5 deletions
diff --git a/source/compiler/dtparser.y b/source/compiler/dtparser.y
index a2943cccec74..d5990fe45fe5 100644
--- a/source/compiler/dtparser.y
+++ b/source/compiler/dtparser.y
@@ -275,17 +275,24 @@ Expression
| EXPOP_LABEL { $$ = DtResolveLabel (DtParsertext);}
- /* Default base for a non-prefixed integer is 16 */
+ /*
+ * All constants for the data table compiler are in hex, whether a (optional) 0x
+ * prefix is present or not. For example, these two input strings are equivalent:
+ * 1234
+ * 0x1234
+ */
- | EXPOP_NUMBER { AcpiUtStrtoul64 (DtParsertext, (ACPI_STRTOUL_BASE16 | ACPI_STRTOUL_64BIT), &$$);}
+ /* Non-prefixed hex number */
+
+ | EXPOP_NUMBER { $$ = DtDoConstant (DtParsertext);}
/* Standard hex number (0x1234) */
- | EXPOP_HEX_NUMBER { AcpiUtStrtoul64 (DtParsertext, (ACPI_STRTOUL_BASE16 | ACPI_STRTOUL_64BIT), &$$);}
+ | EXPOP_HEX_NUMBER { $$ = DtDoConstant (DtParsertext);}
- /* TBD: Decimal number with prefix (0d1234) - Not supported by strtoul64 at this time */
+ /* Possible TBD: Decimal number with prefix (0d1234) - Not supported this time */
- | EXPOP_DECIMAL_NUMBER { AcpiUtStrtoul64 (DtParsertext, ACPI_STRTOUL_64BIT, &$$);}
+ | EXPOP_DECIMAL_NUMBER { $$ = DtDoConstant (DtParsertext);}
;
%%