Commit f453789d authored by POTTIER Francois's avatar POTTIER Francois

Modified cil-formatparse.mly to pass the test.

This grammar used to contain a start symbol that accepts the empty word!
parent d1e79deb
......@@ -80,6 +80,8 @@ File "cil-formatparse.mly", line 269, characters 10-14:
Warning: the token THEN is unused.
File "cil-formatparse.mly", line 242, characters 19-26:
Warning: the token TYPEDEF is unused.
File "cil-formatparse.mly", line 338, characters 0-10:
Warning: symbol initialize is unreachable from any of the start symbol(s).
%{
open Cil
open Pretty
......@@ -273,7 +275,6 @@ type maybeInit =
%}
%start expression
%start initialize
%start instr
%start lval
%start offset
......@@ -443,10 +444,6 @@ type maybeInit =
%type <((string * Cil.formatArg) list -> Cil.typ) * (Cil.typ -> Cil.formatArg list option)> typename
%%
initialize:
|
{ }
expression:
| ARG_e
{ (* Count arguments eagerly *)
......
......@@ -307,7 +307,7 @@ type maybeInit =
%left DOT ARROW LPAREN LBRACE
%nonassoc IDENT QUEST CST_INT
%start initialize expression typename offset lval instr stmt stmt_list
%start expression typename offset lval instr stmt stmt_list
%type <unit> initialize
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment