[DTrace-devel] [PATCH] lexer: allow `-prepended identifiers to start with numerals

Kris Van Hees kris.van.hees at oracle.com
Fri Jan 26 05:23:48 UTC 2024


On Wed, Nov 08, 2023 at 07:52:25PM +0000, Nick Alcock wrote:
> 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>

Reviewed-by: Kris Van Hees <kris.van.hees 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