Skip to content

Commit

Permalink
Add hack for parsing version numbers with multiple dots
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Jul 26, 2024
1 parent 453a777 commit f441f54
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/frontc/cparser.mly
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f441f54

Please sign in to comment.