summaryrefslogtreecommitdiff
path: root/cparser/pre_parser.mly
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2014-05-12 15:52:42 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2014-05-12 15:52:42 +0000
commitedc00e0c90a5598f653add89f42a095d8ee1b629 (patch)
tree2d2539335cc7e916a8964847b2ed7489f9340d00 /cparser/pre_parser.mly
parent951bf7bdb208f500c86e8d45c45247cd25adb4ab (diff)
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
Diffstat (limited to 'cparser/pre_parser.mly')
-rw-r--r--cparser/pre_parser.mly5
1 files changed, 3 insertions, 2 deletions
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<string * Pre_parser_aux.identifier_type ref * Cabs.cabsloc>
VAR_NAME TYPEDEF_NAME
%token<Cabs.constant * Cabs.cabsloc> CONSTANT
-%token<string * Cabs.cabsloc> STRING_LITERAL PRAGMA
+%token<bool * int64 list * Cabs.cabsloc> STRING_LITERAL
+%token<string * Cabs.cabsloc> PRAGMA
%token<Cabs.cabsloc> 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: