aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Lexer.mll
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2021-09-17 18:28:55 +0100
committerYann Herklotz <git@yannherklotz.com>2021-09-17 18:28:55 +0100
commita1c401a4eba5fc9fcf42933f70005ecb679a4c1c (patch)
tree26637fca5d1da9b3d049234721d593a60b03a6d3 /cparser/Lexer.mll
parentc49caca4b5f0239b43610fbfe012d6ba0211b364 (diff)
parent1daf96cdca4d828c333cea5c9a314ef861342984 (diff)
downloadcompcert-dev/michalis.tar.gz
compcert-dev/michalis.zip
Merge branch 'master' into dev/michalisdev/michalis
Diffstat (limited to 'cparser/Lexer.mll')
-rw-r--r--cparser/Lexer.mll14
1 files changed, 8 insertions, 6 deletions
diff --git a/cparser/Lexer.mll b/cparser/Lexer.mll
index 881d411a..42980d30 100644
--- a/cparser/Lexer.mll
+++ b/cparser/Lexer.mll
@@ -6,10 +6,11 @@
(* *)
(* Copyright Institut National de Recherche en Informatique et en *)
(* Automatique. All rights reserved. This file is distributed *)
-(* under the terms of the GNU General Public License as published by *)
-(* the Free Software Foundation, either version 2 of the License, or *)
-(* (at your option) any later version. This file is also distributed *)
-(* under the terms of the INRIA Non-Commercial License Agreement. *)
+(* under the terms of the GNU Lesser General Public License as *)
+(* published by the Free Software Foundation, either version 2.1 of *)
+(* the License, or (at your option) any later version. *)
+(* This file is also distributed under the terms of the *)
+(* INRIA Non-Commercial License Agreement. *)
(* *)
(* *********************************************************************)
@@ -95,7 +96,8 @@ let () =
(* We can ignore the __extension__ GCC keyword. *)
ignored_keywords := SSet.add "__extension__" !ignored_keywords
-let init_ctx = SSet.singleton "__builtin_va_list"
+let init_ctx = SSet.of_list (List.map fst CBuiltins.builtins.C.builtin_typedefs)
+
let types_context : SSet.t ref = ref init_ctx
let _ =
@@ -391,7 +393,7 @@ and string_literal startp accu = parse
(* We assume gcc -E syntax but try to tolerate variations. *)
and hash = parse
| whitespace_char_no_newline +
- (decimal_constant as n)
+ (digit + as n)
whitespace_char_no_newline *
"\"" ([^ '\n' '\"']* as file) "\""
[^ '\n']* '\n'