From edc00e0c90a5598f653add89f42a095d8ee1b629 Mon Sep 17 00:00:00 2001 From: xleroy Date: Mon, 12 May 2014 15:52:42 +0000 Subject: Assorted fixes to fix parsing issues and be more GCC-like: - Moved scanning of char constants and string literals entirely to Lexer - Parser: separate STRING_LITERAL from CONSTANT to be closer to ISO C99 grammar - pre_parser: adapted + "asm" takes string_literal, not CONSTANT - Revised errors "inline doesnt belong here" git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2492 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- cparser/pre_parser.mly | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cparser/pre_parser.mly') diff --git a/cparser/pre_parser.mly b/cparser/pre_parser.mly index 117d20d..0a43df7 100644 --- a/cparser/pre_parser.mly +++ b/cparser/pre_parser.mly @@ -40,7 +40,8 @@ %token VAR_NAME TYPEDEF_NAME %token CONSTANT -%token STRING_LITERAL PRAGMA +%token STRING_LITERAL +%token PRAGMA %token SIZEOF PTR INC DEC LEFT RIGHT LEQ GEQ EQEQ EQ NEQ LT GT ANDAND BARBAR PLUS MINUS STAR TILDE BANG SLASH PERCENT HAT BAR QUESTION @@ -614,7 +615,7 @@ jump_statement: {} asm_statement: -| ASM LPAREN CONSTANT RPAREN SEMICOLON +| ASM LPAREN string_literals_list RPAREN SEMICOLON {} translation_unit_file: -- cgit v1.2.3