Commit 41a969d9 authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Re-generated expected output.

parent f5c9c650
......@@ -13,30 +13,6 @@ recommend switching on --infer in order to avoid obscure type error messages.
%type <(int, int) either> phrase
%%
phrase:
_10 = C _20 = list___anonymous_0_A_B__ _11 = D _21 = list___anonymous_0_A_B__ _3 = EOF
{let ys =
let _2 = _21 in
let _1 = _11 in
( _1 )
in
let xs =
let _2 = _20 in
let _1 = _10 in
( _1 )
in
( xs @ ys )}
other:
_1 = seplist_A_ _2 = EOF
{ ()}
seplist_A_:
_1 = A
{ ()}
| _1 = A _2 = embedded___anonymous_1_ _3 = seplist_A_
{ ()}
embedded___anonymous_1_:
_10 = C
{let x =
......@@ -67,6 +43,30 @@ in
in
( x :: xs )}
phrase:
_10 = C _20 = list___anonymous_0_A_B__ _11 = D _21 = list___anonymous_0_A_B__ _3 = EOF
{let ys =
let _2 = _21 in
let _1 = _11 in
( _1 )
in
let xs =
let _2 = _20 in
let _1 = _10 in
( _1 )
in
( xs @ ys )}
other:
_1 = seplist_A_ _2 = EOF
{ ()}
seplist_A_:
_1 = A
{ ()}
| _1 = A _2 = embedded___anonymous_1_ _3 = seplist_A_
{ ()}
%%
......
......@@ -11,50 +11,50 @@ recommend switching on --infer in order to avoid obscure type error messages.
%type <(int, int) either> phrase
%%
mixed_list_C_D_:
_1 = list___anonymous_0_C_D__
{ ( _1 )}
mixed_list_A_B_:
_1 = list___anonymous_0_A_B__
{ ( _1 )}
phrase:
xs = mixed_list_A_B_ ys = mixed_list_C_D_ _3 = EOF
{ ( xs @ ys )}
list___anonymous_0_C_D__:
list___anonymous_0_A_B__:
{ ( [] )}
| x0 = C xs = list___anonymous_0_C_D__
| x0 = A xs = list___anonymous_0_A_B__
{let x =
let x = x0 in
( Left x )
in
( x :: xs )}
| y0 = D xs = list___anonymous_0_C_D__
| y0 = B xs = list___anonymous_0_A_B__
{let x =
let y = y0 in
( Right y )
in
( x :: xs )}
list___anonymous_0_A_B__:
list___anonymous_0_C_D__:
{ ( [] )}
| x0 = A xs = list___anonymous_0_A_B__
| x0 = C xs = list___anonymous_0_C_D__
{let x =
let x = x0 in
( Left x )
in
( x :: xs )}
| y0 = B xs = list___anonymous_0_A_B__
| y0 = D xs = list___anonymous_0_C_D__
{let x =
let y = y0 in
( Right y )
in
( x :: xs )}
mixed_list_A_B_:
_1 = list___anonymous_0_A_B__
{ ( _1 )}
mixed_list_C_D_:
_1 = list___anonymous_0_C_D__
{ ( _1 )}
phrase:
xs = mixed_list_A_B_ ys = mixed_list_C_D_ _3 = EOF
{ ( xs @ ys )}
%%
......
......@@ -10,21 +10,6 @@ recommend switching on --infer in order to avoid obscure type error messages.
%type <int list> phrase
%%
phrase:
xs = list___anonymous_0_ ys = list___anonymous_1_ _3 = EOF
{ ( xs @ ys )}
list___anonymous_1_:
{ ( [] )}
| x0 = D y0 = D xs = list___anonymous_1_
{let x =
let y = y0 in
let x = x0 in
( x + y )
in
( x :: xs )}
list___anonymous_0_:
{ ( [] )}
......@@ -47,6 +32,21 @@ in
in
( x :: xs )}
list___anonymous_1_:
{ ( [] )}
| x0 = D y0 = D xs = list___anonymous_1_
{let x =
let y = y0 in
let x = x0 in
( x + y )
in
( x :: xs )}
phrase:
xs = list___anonymous_0_ ys = list___anonymous_1_ _3 = EOF
{ ( xs @ ys )}
%%
......
......@@ -16,66 +16,43 @@ recommend switching on --infer in order to avoid obscure type error messages.
%type <Prolog.clause list> clauses
%%
clauses:
xs0 = loption_separated_nonempty_list_DOT_clause__ _2 = EOF
{let clauses =
let xs = xs0 in
( xs )
in
( clauses )}
term:
name = IDENTIFIER p = option_params_
{ (
let ts = match p with None -> [] | Some l -> l in
Struct (name, ts)
)}
| v = VARIABLE
{ ( Var (0, v) )}
params:
_10 = LPARENT xs00 = loption_separated_nonempty_list_COMMA_term__ _30 = RPARENT
{let terms =
let _3 = _30 in
let xs0 = xs00 in
let _1 = _10 in
let x =
let xs = xs0 in
( xs )
in
( x )
in
( terms )}
option_params_:
{ ( None )}
| x = params
{ ( Some x )}
loption_separated_nonempty_list_DOT_clause__:
loption_separated_nonempty_list_COMMA_term__:
{ ( [] )}
| x = separated_nonempty_list_DOT_clause_
| x = separated_nonempty_list_COMMA_term_
{ ( x )}
loption_separated_nonempty_list_COMMA_term__:
loption_separated_nonempty_list_DOT_clause__:
{ ( [] )}
| x = separated_nonempty_list_COMMA_term_
| x = separated_nonempty_list_DOT_clause_
{ ( x )}
separated_nonempty_list_COMMA_term_:
x = term
{ ( [ x ] )}
| x = term _2 = COMMA xs = separated_nonempty_list_COMMA_term_
{ ( x :: xs )}
separated_nonempty_list_DOT_clause_:
x = clause
{ ( [ x ] )}
| x = clause _2 = DOT xs = separated_nonempty_list_DOT_clause_
{ ( x :: xs )}
separated_nonempty_list_COMMA_term_:
x = term
{ ( [ x ] )}
| x = term _2 = COMMA xs = separated_nonempty_list_COMMA_term_
{ ( x :: xs )}
clauses:
xs0 = loption_separated_nonempty_list_DOT_clause__ _2 = EOF
{let clauses =
let xs = xs0 in
( xs )
in
( clauses )}
clause:
tm = term _2 = INFERS xs0 = loption_separated_nonempty_list_COMMA_term__
......@@ -87,6 +64,29 @@ in
| fact = term
{ ( (fact, []) )}
term:
name = IDENTIFIER p = option_params_
{ (
let ts = match p with None -> [] | Some l -> l in
Struct (name, ts)
)}
| v = VARIABLE
{ ( Var (0, v) )}
params:
_10 = LPARENT xs00 = loption_separated_nonempty_list_COMMA_term__ _30 = RPARENT
{let terms =
let _3 = _30 in
let xs0 = xs00 in
let _1 = _10 in
let x =
let xs = xs0 in
( xs )
in
( x )
in
( terms )}
%%
......
......@@ -6,6 +6,12 @@
%type <unit> def
%%
separated_nonempty_list_COMMA_name_:
x = name
{ ( [ x ] )}
| x = name _2 = COMMA xs = separated_nonempty_list_COMMA_name_
{ ( x :: xs )}
def:
_1 = param_spec _2 = return_spec _3 = COMMA
{ ( () )}
......@@ -30,12 +36,6 @@ name:
_1 = ID
{ ( () )}
separated_nonempty_list_COMMA_name_:
x = name
{ ( [ x ] )}
| x = name _2 = COMMA xs = separated_nonempty_list_COMMA_name_
{ ( x :: xs )}
%%
......
......@@ -560,14 +560,6 @@ statement_safe:
| _1 = jump_statement
{ ()}
labeled_statement_statement_safe_:
_1 = IDENTIFIER _2 = COLON _3 = statement_safe
{ ()}
| _1 = CASE _2 = constant_expression _3 = COLON _4 = statement_safe
{ ()}
| _1 = DEFAULT _2 = COLON _3 = statement_safe
{ ()}
labeled_statement_statement_dangerous_:
_1 = IDENTIFIER _2 = COLON _3 = statement_dangerous
{ ()}
......@@ -576,6 +568,14 @@ labeled_statement_statement_dangerous_:
| _1 = DEFAULT _2 = COLON _3 = statement_dangerous
{ ()}
labeled_statement_statement_safe_:
_1 = IDENTIFIER _2 = COLON _3 = statement_safe
{ ()}
| _1 = CASE _2 = constant_expression _3 = COLON _4 = statement_safe
{ ()}
| _1 = DEFAULT _2 = COLON _3 = statement_safe
{ ()}
compound_statement:
_1 = LBRACE _2 = RBRACE
{ ()}
......@@ -618,24 +618,24 @@ selection_statement_safe:
| _1 = SWITCH _2 = LPAREN _3 = expression _4 = RPAREN _5 = statement_safe
{ ()}
iteration_statement_statement_safe_:
_1 = WHILE _2 = LPAREN _3 = expression _4 = RPAREN _5 = statement_safe
iteration_statement_statement_dangerous_:
_1 = WHILE _2 = LPAREN _3 = expression _4 = RPAREN _5 = statement_dangerous
{ ()}
| _1 = DO _2 = statement_dangerous _3 = WHILE _4 = LPAREN _5 = expression _6 = RPAREN _7 = SEMICOLON
{ ()}
| _1 = FOR _2 = LPAREN _3 = expression_statement _4 = expression_statement _5 = RPAREN _6 = statement_safe
| _1 = FOR _2 = LPAREN _3 = expression_statement _4 = expression_statement _5 = RPAREN _6 = statement_dangerous
{ ()}
| _1 = FOR _2 = LPAREN _3 = expression_statement _4 = expression_statement _5 = expression _6 = RPAREN _7 = statement_safe
| _1 = FOR _2 = LPAREN _3 = expression_statement _4 = expression_statement _5 = expression _6 = RPAREN _7 = statement_dangerous
{ ()}
iteration_statement_statement_dangerous_:
_1 = WHILE _2 = LPAREN _3 = expression _4 = RPAREN _5 = statement_dangerous
iteration_statement_statement_safe_:
_1 = WHILE _2 = LPAREN _3 = expression _4 = RPAREN _5 = statement_safe
{ ()}
| _1 = DO _2 = statement_dangerous _3 = WHILE _4 = LPAREN _5 = expression _6 = RPAREN _7 = SEMICOLON
{ ()}
| _1 = FOR _2 = LPAREN _3 = expression_statement _4 = expression_statement _5 = RPAREN _6 = statement_dangerous
| _1 = FOR _2 = LPAREN _3 = expression_statement _4 = expression_statement _5 = RPAREN _6 = statement_safe
{ ()}
| _1 = FOR _2 = LPAREN _3 = expression_statement _4 = expression_statement _5 = expression _6 = RPAREN _7 = statement_dangerous
| _1 = FOR _2 = LPAREN _3 = expression_statement _4 = expression_statement _5 = expression _6 = RPAREN _7 = statement_safe
{ ()}
jump_statement:
......
This diff is collapsed.
This diff is collapsed.
......@@ -143,36 +143,40 @@ pop_context:
{ ( !pop_context () )}
in_context_declaration_list_:
_1 = push_context x = declaration_list _3 = pop_context
{ ( x )}
in_context_compcert_pre_parser_option_parameter_type_list__:
in_context_compcert_pre_parser_option_block_item_list__:
_1 = push_context _3 = pop_context
{let x =
( None )
in
( x )}
| _1 = push_context x0 = parameter_type_list _3 = pop_context
| _1 = push_context x0 = block_item_list _3 = pop_context
{let x =
let x = x0 in
( Some x )
in
( x )}
in_context_compcert_pre_parser_option_block_item_list__:
in_context_compcert_pre_parser_option_parameter_type_list__:
_1 = push_context _3 = pop_context
{let x =
( None )
in
( x )}
| _1 = push_context x0 = block_item_list _3 = pop_context
| _1 = push_context x0 = parameter_type_list _3 = pop_context
{let x =
let x = x0 in
( Some x )
in
( x )}
in_context_declaration_list_:
_1 = push_context x = declaration_list _3 = pop_context
{ ( x )}
declare_varname_enumerator_:
i = enumerator
{ ( declare_varname i; i )}
declare_varname_fst_declarator__:
x0 = declarator
{let i =
......@@ -181,10 +185,6 @@ declare_varname_fst_declarator__:
in
( declare_varname i; i )}
declare_varname_enumerator_:
i = enumerator
{ ( declare_varname i; i )}
declare_typename_fst_declarator__:
x0 = declarator
{let i =
......@@ -1743,14 +1743,6 @@ statement_intern:
| _1 = asm_statement
{ ()}
labeled_statement_statement_intern_:
i = general_identifier _2 = COLON _3 = statement_intern
{ ( set_id_type i OtherId )}
| _1 = CASE _2 = constant_expression _3 = COLON _4 = statement_intern
{ ()}
| _1 = DEFAULT _2 = COLON _3 = statement_intern
{ ()}
labeled_statement_statement_finish_:
i = general_identifier _2 = COLON _3 = statement_finish
{ ( set_id_type i OtherId )}
......@@ -1759,6 +1751,14 @@ labeled_statement_statement_finish_:
| _1 = DEFAULT _2 = COLON _3 = statement_finish
{ ()}
labeled_statement_statement_intern_:
i = general_identifier _2 = COLON _3 = statement_intern
{ ( set_id_type i OtherId )}
| _1 = CASE _2 = constant_expression _3 = COLON _4 = statement_intern
{ ()}
| _1 = DEFAULT _2 = COLON _3 = statement_intern
{ ()}
compound_statement:
_1 = LBRACE _2 = in_context_compcert_pre_parser_option_block_item_list__ _3 = RBRACE
{ ()}
......@@ -1814,12 +1814,12 @@ selection_statement_intern:
| _1 = SWITCH _2 = LPAREN _3 = expression _4 = RPAREN _5 = statement_intern
{ ()}
iteration_statement_statement_intern_:
_1 = WHILE _2 = LPAREN _3 = expression _4 = RPAREN _5 = statement_intern
iteration_statement_statement_finish_:
_1 = WHILE _2 = LPAREN _3 = expression _4 = RPAREN _5 = statement_finish
{ ()}
| _1 = DO _2 = statement_finish _3 = WHILE _4 = LPAREN _5 = expression _6 = RPAREN _7 = SEMICOLON
{ ()}
| _1 = FOR _2 = LPAREN _4 = SEMICOLON _6 = SEMICOLON _8 = RPAREN _9 = statement_intern
| _1 = FOR _2 = LPAREN _4 = SEMICOLON _6 = SEMICOLON _8 = RPAREN _9 = statement_finish
{let _7 =
( None )
in
......@@ -1830,7 +1830,7 @@ let _3 =
( None )
in
()}
| _1 = FOR _2 = LPAREN _4 = SEMICOLON _6 = SEMICOLON x0 = expression _8 = RPAREN _9 = statement_intern
| _1 = FOR _2 = LPAREN _4 = SEMICOLON _6 = SEMICOLON x0 = expression _8 = RPAREN _9 = statement_finish
{let _7 =
let x = x0 in
( Some x )
......@@ -1842,7 +1842,7 @@ let _3 =
( None )
in
()}
| _1 = FOR _2 = LPAREN _4 = SEMICOLON x0 = expression _6 = SEMICOLON _8 = RPAREN _9 = statement_intern
| _1 = FOR _2 = LPAREN _4 = SEMICOLON x0 = expression _6 = SEMICOLON _8 = RPAREN _9 = statement_finish
{let _7 =
( None )
in
......@@ -1854,7 +1854,7 @@ let _3 =
( None )
in
()}
| _1 = FOR _2 = LPAREN _4 = SEMICOLON x0 = expression _6 = SEMICOLON x1 = expression _8 = RPAREN _9 = statement_intern
| _1 = FOR _2 = LPAREN _4 = SEMICOLON x0 = expression _6 = SEMICOLON x1 = expression _8 = RPAREN _9 = statement_finish
{let _7 =
let x = x1 in
( Some x )
......@@ -1867,7 +1867,7 @@ let _3 =
( None )
in
()}
| _1 = FOR _2 = LPAREN x0 = expression _4 = SEMICOLON _6 = SEMICOLON _8 = RPAREN _9 = statement_intern
| _1 = FOR _2 = LPAREN x0 = expression _4 = SEMICOLON _6 = SEMICOLON _8 = RPAREN _9 = statement_finish
{let _7 =
( None )
in
......@@ -1879,7 +1879,7 @@ let _3 =
( Some x )
in
()}
| _1 = FOR _2 = LPAREN x0 = expression _4 = SEMICOLON _6 = SEMICOLON x1 = expression _8 = RPAREN _9 = statement_intern
| _1 = FOR _2 = LPAREN x0 = expression _4 = SEMICOLON _6 = SEMICOLON x1 = expression _8 = RPAREN _9 = statement_finish
{let _7 =
let x = x1 in
( Some x )
......@@ -1892,7 +1892,7 @@ let _3 =
( Some x )
in
()}
| _1 = FOR _2 = LPAREN x0 = expression _4 = SEMICOLON x1 = expression _6 = SEMICOLON _8 = RPAREN _9 = statement_intern
| _1 = FOR _2 = LPAREN x0 = expression _4 = SEMICOLON x1 = expression _6 = SEMICOLON _8 = RPAREN _9 = statement_finish
{let _7 =
( None )
in
......@@ -1905,7 +1905,7 @@ let _3 =
( Some x )
in
()}
| _1 = FOR _2 = LPAREN x0 = expression _4 = SEMICOLON x1 = expression _6 = SEMICOLON x2 = expression _8 = RPAREN _9 = statement_intern
| _1 = FOR _2 = LPAREN x0 = expression _4 = SEMICOLON x1 = expression _6 = SEMICOLON x2 = expression _8 = RPAREN _9 = statement_finish
{let _7 =
let x = x2 in
( Some x )
......@@ -1919,7 +1919,7 @@ let _3 =
( Some x )
in
()}
| _1 = FOR _2 = LPAREN _3 = push_context _4 = declaration _6 = SEMICOLON _8 = RPAREN _9 = statement_intern _10 = pop_context
| _1 = FOR _2 = LPAREN _3 = push_context _4 = declaration _6 = SEMICOLON _8 = RPAREN _9 = statement_finish _10 = pop_context
{let _7 =
( None )
in
......@@ -1927,7 +1927,7 @@ let _5 =
( None )
in
()}
| _1 = FOR _2 = LPAREN _3 = push_context _4 = declaration _6 = SEMICOLON x0 = expression _8 = RPAREN _9 = statement_intern _10 = pop_context
| _1 = FOR _2 = LPAREN _3 = push_context _4 = declaration _6 = SEMICOLON x0 = expression _8 = RPAREN _9 = statement_finish _10 = pop_context
{let _7 =
let x = x0 in
( Some x )
......@@ -1936,7 +1936,7 @@ let _5 =
( None )
in
()}
| _1 = FOR _2 = LPAREN _3 = push_context _4 = declaration x0 = expression _6 = SEMICOLON _8 = RPAREN _9 = statement_intern _10 = pop_context
| _1 = FOR _2 = LPAREN _3 = push_context _4 = declaration x0 = expression _6 = SEMICOLON _8 = RPAREN _9 = statement_finish _10 = pop_context
{let _7 =
( None )
in
......@@ -1945,7 +1945,7 @@ let _5 =
( Some x )
in
()}
| _1 = FOR _2 = LPAREN _3 = push_context _4 = declaration x0 = expression _6 = SEMICOLON x1 = expression _8 = RPAREN _9 = statement_intern _10 = pop_context
| _1 = FOR _2 = LPAREN _3 = push_context _4 = declaration x0 = expression _6 = SEMICOLON x1 = expression _8 = RPAREN _9 = statement_finish _10 = pop_context
{let _7 =
let x = x1 in
( Some x )
......@@ -1956,12 +1956,12 @@ let _5 =
in
()}
iteration_statement_statement_finish_:
_1 = WHILE _2 = LPAREN _3 = expression _4 = RPAREN _5 = statement_finish
iteration_statement_statement_intern_:
_1 = WHILE _2 = LPAREN _3 = expression _4 = RPAREN _5 = statement_intern
{ ()}
| _1 = DO _2 = statement_finish _3 = WHILE _4 = LPAREN _5 = expression _6 = RPAREN _7 = SEMICOLON
{ ()}
| _1 = FOR _2 = LPAREN _4 = SEMICOLON _6 = SEMICOLON _8 = RPAREN _9 = statement_finish
| _1 = FOR _2 = LPAREN _4 = SEMICOLON _6 = SEMICOLON _8 = RPAREN _9 = statement_intern
{let _7 =
( None )
in
......@@ -1972,7 +1972,7 @@ let _3 =
( None )
in
()}
| _1 = FOR _2 = LPAREN _4 = SEMICOLON _6 = SEMICOLON x0 = expression _8 = RPAREN _9 = statement_finish
| _1 = FOR _2 = LPAREN _4 = SEMICOLON _6 = SEMICOLON x0 = expression _8 = RPAREN _9 = statement_intern
{let _7 =
let x = x0 in
( Some x )
......@@ -1984,7 +1984,7 @@ let _3 =
( None )
in
()}
| _1 = FOR _2 = LPAREN _4 = SEMICOLON x0 = expression _6 = SEMICOLON _8 = RPAREN _9 = statement_finish
| _1 = FOR _2 = LPAREN _4 = SEMICOLON x0 = expression _6 = SEMICOLON _8 = RPAREN _9 = statement_intern
{let _7 =
( None )
in
......@@ -1996,7 +1996,7 @@ let _3 =
( None )
in
()}
| _1 = FOR _2 = LPAREN _4 = SEMICOLON x0 = expression _6 = SEMICOLON x1 = expression _8 = RPAREN _9 = statement_finish
| _1 = FOR _2 = LPAREN _4 = SEMICOLON x0 = expression _6 = SEMICOLON x1 = expression _8 = RPAREN _9 = statement_intern
{let _7 =
let x = x1 in
( Some x )
......@@ -2009,7 +2009,7 @@ let _3 =
( None )
in
()}
| _1 = FOR _2 = LPAREN x0 = expression _4 = SEMICOLON _6 = SEMICOLON _8 = RPAREN _9 = statement_finish
| _1 = FOR _2 = LPAREN x0 = expression _4 = SEMICOLON _6 = SEMICOLON _8 = RPAREN _9 = statement_intern
{let _7 =
( None )
in
......@@ -2021,7 +2021,7 @@ let _3 =
( Some x )
in
()}
| _1 = FOR _2 = LPAREN x0 = expression _4 = SEMICOLON _6 = SEMICOLON x1 = expression _8 = RPAREN _9 = statement_finish
| _1 = FOR _2 = LPAREN x0 = expression _4 = SEMICOLON _6 = SEMICOLON x1 = expression _8 = RPAREN _9 = statement_intern
{let _7 =
let x = x1 in
( Some x )
......@@ -2034,7 +2034,7 @@ let _3 =
( Some x )
in
()}
| _1 = FOR _2 = LPAREN x0 = expression _4 = SEMICOLON x1 = expression _6 = SEMICOLON _8 = RPAREN _9 = statement_finish
| _1 = FOR _2 = LPAREN x0 = expression _4 = SEMICOLON x1 = expression _6 = SEMICOLON _8 = RPAREN _9 = statement_intern
{let _7 =
( None )
in
......@@ -2047,7 +2047,7 @@ let _3 =
( Some x )
in
()}