diff --git a/src/parser/parser.l b/src/parser/parser.l index f1748b7..d418bcc 100644 --- a/src/parser/parser.l +++ b/src/parser/parser.l @@ -121,6 +121,7 @@ break return BREAK; continue return CONTINUE; sizeof return SIZEOF; +__alignof__ return ALIGNOF; __attribute__ return ATTRIBUTE; __restrict return RESTRICT; diff --git a/src/parser/parser.yc b/src/parser/parser.yc index 47251c6..063c25b 100644 --- a/src/parser/parser.yc +++ b/src/parser/parser.yc @@ -103,7 +103,7 @@ int yylex(YYSTYPE *, YYLTYPE *); %token CONTINUE; %token SIZEOF; - +%token ALIGNOF; %token CHAR_CONST; %token INT_CONST; @@ -162,6 +162,8 @@ unary_expression | unary_operator cast_expression | SIZEOF unary_expression | SIZEOF LPAREN type_name RPAREN + | ALIGNOF unary_expression + | ALIGNOF LPAREN type_name RPAREN ; unary_operator