Commit f453789d authored by POTTIER Francois's avatar POTTIER Francois
Browse files

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: ...@@ -80,6 +80,8 @@ File "cil-formatparse.mly", line 269, characters 10-14:
Warning: the token THEN is unused. Warning: the token THEN is unused.
File "cil-formatparse.mly", line 242, characters 19-26: File "cil-formatparse.mly", line 242, characters 19-26:
Warning: the token TYPEDEF is unused. 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 Cil
open Pretty open Pretty
...@@ -273,7 +275,6 @@ type maybeInit = ...@@ -273,7 +275,6 @@ type maybeInit =
%} %}
%start expression %start expression
%start initialize
%start instr %start instr
%start lval %start lval
%start offset %start offset
...@@ -443,10 +444,6 @@ type maybeInit = ...@@ -443,10 +444,6 @@ type maybeInit =
%type <((string * Cil.formatArg) list -> Cil.typ) * (Cil.typ -> Cil.formatArg list option)> typename %type <((string * Cil.formatArg) list -> Cil.typ) * (Cil.typ -> Cil.formatArg list option)> typename
%% %%
initialize:
|
{ }
expression: expression:
| ARG_e | ARG_e
{ (* Count arguments eagerly *) { (* Count arguments eagerly *)
......
...@@ -307,7 +307,7 @@ type maybeInit = ...@@ -307,7 +307,7 @@ type maybeInit =
%left DOT ARROW LPAREN LBRACE %left DOT ARROW LPAREN LBRACE
%nonassoc IDENT QUEST CST_INT %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 %type <unit> initialize
......
Supports Markdown
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