summary refs log tree commit diff
path: root/bin/c11.l
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-01-13 15:34:31 -0500
committerJune McEnroe <june@causal.agency>2021-01-13 15:34:31 -0500
commitf683b3610b07f6de272e13c18dc442a9208f1a59 (patch)
tree13e679996024ff6f51e29bac9bba57f6058bc57c /bin/c11.l
parentSupport long double in c.sh (diff)
downloadsrc-f683b3610b07f6de272e13c18dc442a9208f1a59.tar.gz
src-f683b3610b07f6de272e13c18dc442a9208f1a59.zip
Fix C lexer to require a digit in a float literal
Otherwise ".l" is matched as Number.
Diffstat (limited to '')
-rw-r--r--bin/c11.l2
1 files changed, 1 insertions, 1 deletions
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;
 }
td> Git upstream bans strncpy() with commit: banned.h: mark strncpy() as banned e488b7aba743d23b830d239dcc33d9ca0745a9ad Signed-off-by: Christian Hesse <mail@eworm.de> 2018-08-28filters: generate anchor links from markdownChristian Hesse This makes the markdown filter generate anchor links for headings. Signed-off-by: Christian Hesse <mail@eworm.de> Tested-by: jean-christophe manciot <actionmystique@gmail.com> 2018-08-03Bump version.Jason A. Donenfeld Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> 2018-08-03clone: fix directory traversalJason A. Donenfeld This was introduced in the initial version of this code, way back when in 2008. $ curl http://127.0.0.1/cgit/repo/objects/?path=../../../../../../../../../etc/passwd root:x:0:0:root:/root:/bin/sh ... Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Reported-by: Jann Horn <jannh@google.com> 2018-08-03config: record repo.snapshot-prefix in the per-repo configKonstantin Ryabitsev