[DTrace-devel] [PATCH] lexer: allow `-prepended identifiers to start with numerals
Nick Alcock
nick.alcock at oracle.com
Wed Nov 8 19:52:25 UTC 2023
This is necessary to be able to cite names in some modules by explicit
module name, since module names can and do start with numerals.
Signed-off-by: Nick Alcock <nick.alcock at oracle.com>
---
libdtrace/dt_lex.l | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libdtrace/dt_lex.l b/libdtrace/dt_lex.l
index ceebeae5f8e81..85515a304ca01 100644
--- a/libdtrace/dt_lex.l
+++ b/libdtrace/dt_lex.l
@@ -50,7 +50,7 @@ int yydebug;
RGX_AGG "@"[a-zA-Z_][0-9a-zA-Z_]*
RGX_PSPEC [-$:a-zA-Z_.?*\\\[\]!][-$:0-9a-zA-Z_.`?*\\\[\]!]*
-RGX_IDENT [a-zA-Z_`][0-9a-zA-Z_`]*
+RGX_IDENT ([a-zA-Z_`][0-9a-zA-Z_`]*)|([0-9][0-9a-zA-Z_]*`[0-9a-zA-Z_`]*)
RGX_INT ([0-9]+|0[xX][0-9A-Fa-f]+)[uU]?[lL]?[lL]?
RGX_FP ([0-9]+("."?)[0-9]*|"."[0-9]+)((e|E)("+"|-)?[0-9]+)?[fFlL]?
RGX_WS [\f\n\r\t\v ]
base-commit: 2ce445558e99308e9ee18f42c414c013f3a485be
--
2.42.0.271.g85384428f1
More information about the DTrace-devel
mailing list