From f441f5496b41d249bbe848c9d90a459c9dcf9255 Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Fri, 26 Jul 2024 10:52:13 +0300 Subject: [PATCH] Add hack for parsing version numbers with multiple dots --- src/frontc/cparser.mly | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frontc/cparser.mly b/src/frontc/cparser.mly index 9c010cd80..4983a3c37 100644 --- a/src/frontc/cparser.mly +++ b/src/frontc/cparser.mly @@ -1495,6 +1495,7 @@ primary_attr: | IDENT IDENT { CALL(VARIABLE (fst $1), [VARIABLE (fst $2)]) } | CST_INT { CONSTANT(CONST_INT (fst $1)) } | CST_FLOAT { CONSTANT(CONST_FLOAT (fst $1)) } +| CST_FLOAT CST_FLOAT { CONSTANT(CONST_FLOAT (fst $1 ^ fst $2)) } /* Clang-like hack to parse version numbers like "10.13.4" (https://github.com/goblint/cil/pull/171#issuecomment-2250670652). We lex them as "10.13" and ".4". */ | const_string_or_wstring { CONSTANT(fst $1) } /*(* Const when it appears in attribute lists, is translated