From f683b3610b07f6de272e13c18dc442a9208f1a59 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Wed, 13 Jan 2021 15:34:31 -0500 Subject: Fix C lexer to require a digit in a float literal Otherwise ".l" is matched as Number. --- bin/c11.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/c11.l b/bin/c11.l index 21e7d44b..dec4cce5 100644 --- a/bin/c11.l +++ b/bin/c11.l @@ -44,7 +44,7 @@ sizeof|(_A|alignof) { } ([1-9][0-9]*|"0"[0-7]*|"0x"[[:xdigit:]]+)([ulUL]{0,3}) | -[0-9]*("."[0-9]*)?([eE][+-]?[0-9]+)?[flFL]? | +([0-9]+("."[0-9]*)?|[0-9]*"."[0-9]+)([eE][+-]?[0-9]+)?[flFL]? | "0x"[[:xdigit:]]*("."[[:xdigit:]]*)?([pP][+-]?[0-9]+)[flFL]? { return Number; } -- cgit 1.4.1 label='branches'> dontfiles
summary refs log tree commit diff
path: root/doc (unfollow)
Commit message (Collapse)Author
2021-01-19Don't use a pager if reading standard inputJune McEnroe
2021-01-19Support BSD make syntax and match *.amJune McEnroe
These don't really go together, but...
2021-01-19Match tab following escaped newline in make assignmentsJune McEnroe
Otherwise it ends up going into Shell state.
2021-01-18Allow matching lexers using first input lineJune McEnroe