summaryrefslogtreecommitdiff
path: root/cparser/Lexer.mll
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-10-05 08:11:34 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-10-05 08:11:34 +0000
commita6c369cbd63996c1571ae601b7d92070f024b22c (patch)
treedc4f3f5a52ae4ea230f307ce5f442137f014b79b /cparser/Lexer.mll
parentb55147379939553eccd4289fd18e7f161619be4d (diff)
Merge of the "alignas" branch.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2342 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cparser/Lexer.mll')
-rw-r--r--cparser/Lexer.mll5
1 files changed, 5 insertions, 0 deletions
diff --git a/cparser/Lexer.mll b/cparser/Lexer.mll
index 0820e4e..90e4d3c 100644
--- a/cparser/Lexer.mll
+++ b/cparser/Lexer.mll
@@ -123,6 +123,7 @@ let init_lexicon _ =
("for", fun loc -> FOR loc);
("if", fun loc -> IF loc);
("else", fun _ -> ELSE);
+ ("sizeof", fun loc -> SIZEOF loc);
(*** Implementation specific keywords ***)
("__signed__", fun loc -> SIGNED loc);
("__inline__", fun loc -> INLINE loc);
@@ -150,6 +151,7 @@ let init_lexicon _ =
("_Alignof", fun loc -> ALIGNOF loc);
("__alignof", fun loc -> ALIGNOF loc);
("__alignof__", fun loc -> ALIGNOF loc);
+ ("_Alignas", fun loc -> ALIGNAS loc);
("__volatile__", fun loc -> VOLATILE loc);
("__volatile", fun loc -> VOLATILE loc);
@@ -160,6 +162,7 @@ let init_lexicon _ =
(*** weimer: GCC arcana ***)
("__restrict", fun loc -> RESTRICT loc);
("restrict", fun loc -> RESTRICT loc);
+ ("__packed__", fun loc -> PACKED loc);
(* ("__extension__", EXTENSION); *)
(**** MS VC ***)
("__int64", fun loc -> INT64 loc);
@@ -487,7 +490,9 @@ rule initial =
| ';' { (SEMICOLON (currentLoc lexbuf)) }
| ',' {COMMA}
| '.' {DOT}
+(* XL: redundant?
| "sizeof" {SIZEOF (currentLoc lexbuf)}
+*)
| "__asm" { if !msvcMode then
MSASM (msasm lexbuf, currentLoc lexbuf)
else (ASM (currentLoc lexbuf)) }