Commit 40b38929 authored by POTTIER Francois's avatar POTTIER Francois

Removed [Action.parenthesize] and [Action.parenthesize_stretch].

Every semantic action stretch was already parenthesized by the lexer,
so this led only to redundant parentheses.
parent 20e29e92
......@@ -21,7 +21,7 @@ list___anonymous_1_:
{let x =
let y = y0 in
let x = x0 in
( ( x + y ))
( x + y )
in
( x :: xs )}
......@@ -31,19 +31,19 @@ list___anonymous_0_:
| x0 = A xs = list___anonymous_0_
{let x =
let x = x0 in
( ( x ))
( x )
in
( x :: xs )}
| x0 = B xs = list___anonymous_0_
{let x =
let x = x0 in
( ( x ))
( x )
in
( x :: xs )}
| x0 = C xs = list___anonymous_0_
{let x =
let x = x0 in
( ( x ))
( x )
in
( x :: xs )}
......
......@@ -20,7 +20,7 @@ clauses:
| xs0 = loption_separated_nonempty_list_DOT_clause__ _2 = EOF
{let clauses =
let xs = xs0 in
( ( xs ))
( xs )
in
( clauses )}
......@@ -41,9 +41,9 @@ params:
let _1 = _10 in
let x =
let xs = xs0 in
( ( xs ))
( xs )
in
( ( x ))
( x )
in
( terms )}
......@@ -81,7 +81,7 @@ clause:
| tm = term _2 = INFERS xs0 = loption_separated_nonempty_list_COMMA_term__
{let ts =
let xs = xs0 in
( ( xs ))
( xs )
in
( (tm, ts) )}
| fact = term
......
......@@ -29,9 +29,9 @@ expr:
let _10 = _100 in
let x =
let _1 = _10 in
( ( (+) ))
( (+) )
in
( ( x ))
( x )
in
( op e1 e2 )}
| e1 = expr _100 = MINUS e2 = expr
......@@ -39,9 +39,9 @@ in
let _10 = _100 in
let x =
let _1 = _10 in
( ( (-) ))
( (-) )
in
( ( x ))
( x )
in
( op e1 e2 )}
| e1 = expr _100 = TIMES e2 = expr
......@@ -49,9 +49,9 @@ in
let _10 = _100 in
let x =
let _1 = _10 in
( ( ( * ) ))
( ( * ) )
in
( ( x ))
( x )
in
( op e1 e2 )}
| e1 = expr _100 = DIV e2 = expr
......@@ -59,9 +59,9 @@ in
let _10 = _100 in
let x =
let _1 = _10 in
( ( (/) ))
( (/) )
in
( ( x ))
( x )
in
( op e1 e2 )}
| _1 = MINUS e = expr %prec UMINUS
......
......@@ -137,7 +137,7 @@ definitiveIdentifier:
{ ()}
|
{let _1 =
( ())
()
in
()}
......@@ -172,7 +172,7 @@ tagDefault:
{ ()}
|
{let _1 =
( ())
()
in
()}
......@@ -181,7 +181,7 @@ extensionDefault:
{ ()}
|
{let _1 =
( ())
()
in
()}
......@@ -190,7 +190,7 @@ moduleBody:
{ ()}
|
{let _1 =
( ())
()
in
()}
......@@ -201,7 +201,7 @@ exports:
{ ()}
|
{let _1 =
( ())
()
in
()}
......@@ -210,7 +210,7 @@ symbolsExported:
{ ()}
|
{let _1 =
( ())
()
in
()}
......@@ -219,7 +219,7 @@ imports:
{ ()}
|
{let _1 =
( ())
()
in
()}
......@@ -228,7 +228,7 @@ symbolsImported:
{ ()}
|
{let _1 =
( ())
()
in
()}
......@@ -253,7 +253,7 @@ assignedIdentifier:
{ ()}
|
{let _1 =
( ())
()
in
()}
......@@ -568,14 +568,14 @@ optionalExtensionMarker:
{ ()}
|
{let _1 =
( ())
()
in
()}
versionNumber:
|
{let _1 =
( ())
()
in
()}
| _1 = Number _2 = Colon
......@@ -796,7 +796,7 @@ extensionAdditionAlternatives:
{ ()}
|
{let _1 =
( ())
()
in
()}
......@@ -841,7 +841,7 @@ class_x:
{ ()}
|
{let _1 =
( ())
()
in
()}
......@@ -878,7 +878,7 @@ extensionAdditions:
{ ()}
|
{let _1 =
( ())
()
in
()}
......@@ -1173,7 +1173,7 @@ valueConstraint:
{ ()}
|
{let _1 =
( ())
()
in
()}
......@@ -1340,7 +1340,7 @@ exceptionSpec:
{ ()}
|
{let _1 =
( ())
()
in
()}
......@@ -1417,7 +1417,7 @@ includes:
{ ()}
|
{let _1 =
( ())
()
in
()}
......@@ -1466,7 +1466,7 @@ presenceConstraint:
{ ()}
|
{let _1 =
( ())
()
in
()}
......@@ -1614,7 +1614,7 @@ defaultSyntax:
| _1 = LeftBrace xs0 = loption_separated_nonempty_list_Comma_fieldSetting__ _3 = RightBrace
{let _2 =
let xs = xs0 in
( ( xs ))
( xs )
in
()}
......@@ -1740,7 +1740,7 @@ userDefinedConstraint:
| _1 = CONSTRAINED _2 = BY _3 = LeftBrace xs0 = loption_separated_nonempty_list_Comma_userDefinedConstraintParameter__ _5 = RightBrace
{let _4 =
let xs = xs0 in
( ( xs ))
( xs )
in
()}
......@@ -1783,7 +1783,7 @@ level:
{ ()}
|
{let _1 =
( ())
()
in
()}
......
This diff is collapsed.
This diff is collapsed.
......@@ -475,89 +475,89 @@ text_element:
{ ( Documentation.Raw data )}
| _1 = CODE _3 = CLOSE
{let str =
( ( "" ))
( "" )
in
( Documentation.Code str )}
| _1 = CODE data0 = Data _3 = CLOSE
{let str =
let data = data0 in
( ( data))
( data)
in
( Documentation.Code str )}
| _1 = PRECODE _3 = CLOSE
{let str =
( ( "" ))
( "" )
in
( Documentation.PreCode str )}
| _1 = PRECODE data0 = Data _3 = CLOSE
{let str =
let data = data0 in
( ( data))
( data)
in
( Documentation.PreCode str )}
| _1 = VERBATIM _3 = CLOSE
{let str =
( ( "" ))
( "" )
in
( Documentation.Verbatim str )}
| _1 = VERBATIM data0 = Data _3 = CLOSE
{let str =
let data = data0 in
( ( data))
( data)
in
( Documentation.Verbatim str )}
| _1 = BOLD elems0 = list_text_element_ _3 = CLOSE
{let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( Documentation.(Style(Bold, text)) )}
| _1 = ITALIC elems0 = list_text_element_ _3 = CLOSE
{let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( Documentation.(Style(Italic, text)) )}
| _1 = EMPHASIZE elems0 = list_text_element_ _3 = CLOSE
{let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( Documentation.(Style(Emphasize, text)) )}
| _1 = CENTER elems0 = list_text_element_ _3 = CLOSE
{let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( Documentation.(Style(Center, text)) )}
| _1 = LEFT elems0 = list_text_element_ _3 = CLOSE
{let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( Documentation.(Style(Left, text)) )}
| _1 = RIGHT elems0 = list_text_element_ _3 = CLOSE
{let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( Documentation.(Style(Right, text)) )}
| _1 = SUPERSCRIPT elems0 = list_text_element_ _3 = CLOSE
{let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( Documentation.(Style(Superscript, text)) )}
| _1 = SUBSCRIPT elems0 = list_text_element_ _3 = CLOSE
{let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( Documentation.(Style(Subscript, text)) )}
| tag = Custom elems0 = list_text_element_ _3 = CLOSE
{let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( Documentation.(Style(Custom tag, text)) )}
| _1 = LIST i = nonempty_list_item_ _3 = CLOSE
......@@ -569,29 +569,29 @@ in
| level = Title label = option_label_identifier_ elems0 = list_text_element_ _4 = CLOSE
{let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( Documentation.Title(level, label, text) )}
| _1 = REFERENCE rf = reference _4 = CLOSE
{let text =
( ( None ))
( None )
in
( Documentation.Reference(rf, text) )}
| _1 = REFERENCE rf = reference elems0 = nonempty_list_text_element_ _4 = CLOSE
{let text =
let elems = elems0 in
( ( Some elems ))
( Some elems )
in
( Documentation.Reference(rf, text) )}
| target = Target _3 = CLOSE
{let str =
( ( "" ))
( "" )
in
( Documentation.Target(target, str) )}
| target = Target data0 = Data _3 = CLOSE
{let str =
let data = data0 in
( ( data))
( data)
in
( Documentation.Target(target, str) )}
| _1 = SPECIAL special = special _3 = CLOSE
......@@ -613,7 +613,7 @@ tag:
| _1 = SEE see = see elems0 = list_text_element_ _4 = CLOSE
{let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( Documentation.See(see, text) )}
| _1 = SINCE data = Data _3 = CLOSE
......@@ -621,37 +621,37 @@ in
| _1 = BEFORE name = name elems0 = list_text_element_ _4 = CLOSE
{let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( Documentation.Before(name, text) )}
| _1 = DEPRECATED elems0 = list_text_element_ _3 = CLOSE
{let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( Documentation.Deprecated text )}
| _1 = PARAM name = name elems0 = list_text_element_ _4 = CLOSE
{let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( Documentation.Param(name, text) )}
| _1 = RAISE name = name elems0 = list_text_element_ _4 = CLOSE
{let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( Documentation.Raise(name, text) )}
| _1 = RETURN elems0 = list_text_element_ _3 = CLOSE
{let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( Documentation.Return text )}
| _1 = TAG name = name elems0 = list_text_element_ _4 = CLOSE
{let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( Documentation.Tag(name, text) )}
......@@ -1273,7 +1273,7 @@ item:
| _1 = ITEM elems0 = list_text_element_ _3 = CLOSE
{let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( text )}
......@@ -1309,11 +1309,11 @@ doc:
| _1 = DOC elems0 = list_text_element_ tags0 = list_tag_ _4 = CLOSE
{let tags =
let tags = tags0 in
( ( tags ))
( tags )
in
let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( Documentation.(Ok {text; tags}) )}
| _1 = DOC err = doc_error _3 = CLOSE
......@@ -1323,11 +1323,11 @@ comment:
| _1 = COMMENT elems0 = list_text_element_ tags0 = list_tag_ _4 = CLOSE
{let tags =
let tags = tags0 in
( ( tags ))
( tags )
in
let text =
let elems = elems0 in
( ( elems ))
( elems )
in
( Documentation.(Documentation (Ok {text; tags})) )}
| _1 = COMMENT err = doc_error _3 = CLOSE
......
......@@ -10,7 +10,7 @@ a:
| _10 = A _2 = c
{let _1 =
let _1 = _10 in
( ())
()
in
()}
......
This diff is collapsed.
This diff is collapsed.
......@@ -15,9 +15,9 @@ a:
let x =
let _2 = _20 in
let x = x0 in
( ( f_c x ))
( f_c x )
in
( ( f_b x ))
( f_b x )
in
let x =
let _2 = _21 in
......@@ -26,9 +26,9 @@ let x =
let x =
let _2 = _20 in
let x = x0 in
( ( f_c x ))
( f_c x )
in
( ( f_b x ))
( f_b x )
in
( f_a x )}
......
......@@ -11,7 +11,7 @@ recommend switching on --infer in order to avoid obscure type error messages.
s:
| _2 = EOF
{let _1 =
( ( None ))
( None )
in
( 0 )}
| _1000 = A x000 = B _3000 = A _2 = EOF
......@@ -27,14 +27,14 @@ in
let _3 = _30 in
let x = x0 in
let _1 = _10 in
( ( x ))
( x )
in
let x =
( ( None ))
( None )
in
( ( (x, y) ))
( (x, y) )
in
( ( Some x ))
( Some x )
in
( 0 )}
| x000 = A _1000 = A x100 = B _3000 = A _2 = EOF
......@@ -52,15 +52,15 @@ in
let _3 = _30 in
let x = x1 in
let _1 = _10 in
( ( x ))
( x )
in
let x =
let x = x0 in
( ( Some x ))
( Some x )
in
( ( (x, y) ))
( (x, y) )
in
( ( Some x ))
( Some x )
in
( 0 )}
......
......@@ -10,7 +10,7 @@ a:
| x = c x0 = c
{let y =
let x = x0 in
( ( x ))
( x )
in
( x + y )}
......
......@@ -20,13 +20,13 @@ exp:
| lhs = exp _10 = PLUS rhs = exp
{let op =
let _1 = _10 in
( ( fun x y -> x + y ))
( fun x y -> x + y )
in
( op lhs rhs )}
| lhs = exp _10 = TIMES rhs = exp
{let op =
let _1 = _10 in
( ( fun x y -> x * y ))
( fun x y -> x * y )
in
( op lhs rhs )}
......
......@@ -10,15 +10,15 @@ s:
| _10 = A _2 = A _11 = A
{let y =
let _1 = _11 in
( (
(
_1
))
)
in
let x =
let _1 = _10 in
( (
(
_1
))
)
in
(
x; y
......
......@@ -395,7 +395,7 @@ expr:
| _1 = CONDACT _2 = LPAREN e1 = expr _4 = COMMA s = ident _6 = LPAREN xs0 = loption_separated_nonempty_list_COMMA_expr__ _8 = RPAREN _9 = COMMA v = expr_list _11 = RPAREN
{let a =
let xs = xs0 in
( ( xs ))
( xs )
in
( A.Condact (mk_pos _startpos, e1, s, a, v) )}
| _1 = PRE e = expr
......@@ -415,13 +415,13 @@ node_call:
| s = ident _2 = LPAREN xs0 = loption_separated_nonempty_list_COMMA_expr__ _4 = RPAREN
{let a =
let xs = xs0 in
( ( xs ))
( xs )
in
( A.Call (mk_pos _startpos, s, a) )}
| s = ident p = tlist_LPARAMBRACKET_SEMICOLON_RPARAMBRACKET_node_call_static_param_ _3 = LPAREN xs0 = loption_separated_nonempty_list_COMMA_expr__ _5 = RPAREN
{let a =
let xs = xs0 in
( ( xs ))
( xs )
in
( A.CallParam (mk_pos _startpos, s, p, a) )}
......
This diff is collapsed.
......@@ -334,7 +334,7 @@ list_preceded_COMMA_option_lexpr___:
{let x =
let x = x0 in
let _1 = _10 in
( ( x ))
( x )
in
( x :: xs )}
......@@ -494,7 +494,7 @@ array_args:
| xs0 = loption_separated_nonempty_list_COMMA_expr__
{let es =
let xs = xs0 in
( ( xs ))
( xs )
in
( es )}
| exp = expr _2 = FOR idxs = separated_nonempty_list_COMMA_index_
......@@ -565,7 +565,7 @@ option_preceded_COLON_simple_expr__:
{let x =
let x = x0 in
let _1 = _10 in
( ( x ))
( x )
in
( Some x )}
......@@ -584,9 +584,9 @@ option_preceded_binder_expr__:
let _10 = _100 in
let _1 =
let _1 = _10 in
( ())
()
in
( ( x ))
( x )
in
( Some x )}
| _100 = COLONEQ x0 = expr
......@@ -595,9 +595,9 @@ in
let _10 = _100 in
let _1 =
let _1 = _10 in
( ())
()
in
( ( x ))
( x )
in
( Some x )}
......@@ -873,7 +873,7 @@ array_subscripts:
| _1 = LBRACKET xs0 = loption_separated_nonempty_list_COMMA_expr__ _3 = RBRACKET
{let dims =
let xs = xs0 in
( ( xs ))
( xs )
in
( dims )}
......@@ -967,20 +967,20 @@ equation_section:
{let rest =
let rest = rest0 in
let _1 = _10 in
( ( rest ))
( rest )
in
( rest )}
| _10 = PROTECTED rest0 = public_composition_elements
{let rest =
let rest = rest0 in
let _1 = _10 in
( ( rest ))
( rest )
in
( rest )}
| rest0 = cargo_sections
{let rest =
let rest = rest0 in
( ( rest ))
( rest )
in
( rest )}
......@@ -991,20 +991,20 @@ initial_equation_section:
{let rest =
let rest = rest0 in
let _1 = _10 in
( ( rest ))
( rest )
in
( rest )}
| _10 = PROTECTED rest0 = public_composition_elements
{let rest =
let rest = rest0 in
let _1 = _10 in
( ( rest ))
( rest )
in
( rest )}
| rest0 = cargo_sections
{let rest =
let rest = rest0 in
( ( rest ))
( rest )
in
( rest )}
......@@ -1017,40 +1017,40 @@ algorithm_section:
{let rest =
let rest = rest0 in
let _1 = _10 in