Skip to content

Commit

Permalink
lexer: allow `-prepended identifiers to start with numerals
Browse files Browse the repository at this point in the history
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@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
  • Loading branch information
nickalcock authored and kvanhees committed Jan 26, 2024
1 parent 95140da commit d21ee3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libdtrace/dt_lex.l
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand Down

0 comments on commit d21ee3d

Please sign in to comment.