[tools] Allow for pointer-to-integer types in .def files

The upcoming futex syscalls will be easier to use (and to auto verify)
if passed a pointer instead of an address, this allows for changing a
`Primitive` to a `PrimitiveRef` by adding a `*` to the end.
This commit is contained in:
Justin C. Miller
2023-02-26 11:22:44 -08:00
parent 95627ba43c
commit 1d7d5e8015
3 changed files with 30 additions and 24 deletions

View File

@@ -35,7 +35,7 @@ name: IDENTIFIER
options: "[" ( OPTION | IDENTIFIER )+ "]"
description: COMMENT+
PRIMITIVE: INT_TYPE | "size" | "string" | "buffer" | "address"
PRIMITIVE: INT_TYPE "*"? | "size" | "string" | "buffer" | "address"
INT_TYPE: /u?int(8|16|32|64)?/
NUMBER: /(0x)?[0-9a-fA-F]+/
UID: /[0-9a-fA-F]{16}/