Commit d723cc3b authored by POTTIER Francois's avatar POTTIER Francois

Replace two uses of [IL.ELet] with [CodeBits.blet].

This seems to change nothing except whitespace in
the output, perhaps because [ELet] constructs that
bind 0 values are eliminated.
parent 5f77e9ae
......@@ -55,7 +55,7 @@ let compose x a1 a2 =
not necessary, as far as I can see, since every stretch that represents
a semantic action is already parenthesized by the lexer. *)
{
expr = IL.ELet ([ IL.PVar x, a1.expr ], a2.expr);
expr = CodeBits.blet ([ IL.PVar x, a1.expr ], a2.expr);
keywords = KeywordSet.union a1.keywords a2.keywords;
filenames = a1.filenames @ a2.filenames;
}
......@@ -131,7 +131,7 @@ let rename f phi a =
(* Construct a new semantic action, where [phi] is translated into
a series of [let] bindings. *)
let phi = List.map (fun (x, y) -> IL.PVar x, IL.EVar y) phi in
let expr = IL.ELet (phi, a.expr) in
let expr = CodeBits.blet (phi, a.expr) in
{
expr = expr;
......
......@@ -40,9 +40,7 @@ in
{let t =
let x =
let _1 =
let x =
( z )
in
let x = ( z ) in
( x )
in
( 2 )
......@@ -70,9 +68,7 @@ in
in
let y =
let x =
let x =
( z )
in
let x = ( z ) in
( x )
in
( x )
......@@ -83,9 +79,7 @@ in
let z = z' in
let x =
let _1 =
let x =
( z )
in
let x = ( z ) in
( x )
in
( 2 )
......@@ -94,9 +88,7 @@ in
in
let y =
let x =
let x =
( z )
in
let x = ( z ) in
( x )
in
( x )
......
......@@ -12,14 +12,10 @@
midrule___anonymous_1_:
_1 = C
{let x =
()
in
{let x = () in
( x )}
| _1 = D
{let x =
()
in
{let x = () in
( x )}
list___anonymous_0_A_B__:
......@@ -32,9 +28,7 @@ list___anonymous_0_A_B__:
in
( x :: xs )}
| y = B xs = list___anonymous_0_A_B__
{let x =
( Right y )
in
{let x = ( Right y ) in
( x :: xs )}
phrase:
......@@ -44,9 +38,7 @@ phrase:
let _1 = _1' in
( _1 )
in
let xs =
( _1 )
in
let xs = ( _1 ) in
( xs @ ys )}
other:
......
......@@ -18,9 +18,7 @@ list___anonymous_0_A_B__:
in
( x :: xs )}
| y = B xs = list___anonymous_0_A_B__
{let x =
( Right y )
in
{let x = ( Right y ) in
( x :: xs )}
list___anonymous_0_C_D__:
......@@ -33,9 +31,7 @@ list___anonymous_0_C_D__:
in
( x :: xs )}
| y = D xs = list___anonymous_0_C_D__
{let x =
( Right y )
in
{let x = ( Right y ) in
( x :: xs )}
mixed_list_A_B_:
......
......@@ -45,16 +45,12 @@ separated_nonempty_list_DOT_clause_:
clauses:
xs = loption_separated_nonempty_list_DOT_clause__ _2 = EOF
{let clauses =
( xs )
in
{let clauses = ( xs ) in
( clauses )}
clause:
tm = term _2 = INFERS xs = loption_separated_nonempty_list_COMMA_term__
{let ts =
( xs )
in
{let ts = ( xs ) in
( (tm, ts) )}
| fact = term
{ ( (fact, []) )}
......@@ -71,9 +67,7 @@ term:
params:
_1 = LPARENT xs = loption_separated_nonempty_list_COMMA_term__ _3 = RPARENT
{let terms =
let x =
( xs )
in
let x = ( xs ) in
( x )
in
( terms )}
......
......@@ -24,33 +24,25 @@ expr:
{ ( e )}
| e1 = expr _1 = PLUS e2 = expr
{let op =
let x =
( (+) )
in
let x = ( (+) ) in
( x )
in
( op e1 e2 )}
| e1 = expr _1 = MINUS e2 = expr
{let op =
let x =
( (-) )
in
let x = ( (-) ) in
( x )
in
( op e1 e2 )}
| e1 = expr _1 = TIMES e2 = expr
{let op =
let x =
( ( * ) )
in
let x = ( ( * ) ) in
( x )
in
( op e1 e2 )}
| e1 = expr _1 = DIV e2 = expr
{let op =
let x =
( (/) )
in
let x = ( (/) ) in
( x )
in
( op e1 e2 )}
......
......@@ -241,9 +241,7 @@ definitiveIdentifier:
_1 = LeftBrace _2 = definitiveObjIdComponentList _3 = RightBrace
{ ()}
|
{let _1 =
()
in
{let _1 = () in
()}
definitiveObjIdComponentList:
......@@ -276,27 +274,21 @@ tagDefault:
| _1 = AUTOMATIC _2 = TAGS
{ ()}
|
{let _1 =
()
in
{let _1 = () in
()}
extensionDefault:
_1 = EXTENSIBILITY _2 = IMPLIED
{ ()}
|
{let _1 =
()
in
{let _1 = () in
()}
moduleBody:
_1 = exports _2 = imports _3 = assignmentList
{ ()}
|
{let _1 =
()
in
{let _1 = () in
()}
exports:
......@@ -305,36 +297,28 @@ exports:
| _1 = EXPORTS _2 = ALL _3 = SemiColon
{ ()}
|
{let _1 =
()
in
{let _1 = () in
()}
symbolsExported:
_1 = symbolList
{ ()}
|
{let _1 =
()
in
{let _1 = () in
()}
imports:
_1 = IMPORTS _2 = symbolsImported _3 = SemiColon
{ ()}
|
{let _1 =
()
in
{let _1 = () in
()}
symbolsImported:
_1 = symbolsFromModuleList
{ ()}
|
{let _1 =
()
in
{let _1 = () in
()}
symbolsFromModuleList:
......@@ -357,9 +341,7 @@ assignedIdentifier:
| _1 = definedValue
{ ()}
|
{let _1 =
()
in
{let _1 = () in
()}
symbolList:
......@@ -738,9 +720,7 @@ optionalExtensionMarker:
_1 = Comma _2 = Ellipsis
{ ()}
|
{let _1 =
()
in
{let _1 = () in
()}
componentTypeLists:
......@@ -767,9 +747,7 @@ extensionAdditions:
_1 = Comma _2 = extensionAdditionList
{ ()}
|
{let _1 =
()
in
{let _1 = () in
()}
extensionAdditionList:
......@@ -790,9 +768,7 @@ extensionAdditionGroup:
versionNumber:
{let _1 =
()
in
{let _1 = () in
()}
| _1 = Number _2 = Colon
{ ()}
......@@ -897,9 +873,7 @@ extensionAdditionAlternatives:
_1 = Comma _2 = extensionAdditionAlternativesList
{ ()}
|
{let _1 =
()
in
{let _1 = () in
()}
extensionAdditionAlternativesList:
......@@ -958,9 +932,7 @@ class_x:
| _1 = PRIVATE
{ ()}
|
{let _1 =
()
in
{let _1 = () in
()}
embeddedPDVType:
......@@ -1197,9 +1169,7 @@ exceptionSpec:
_1 = Bang _2 = exceptionIdentification
{ ()}
|
{let _1 =
()
in
{let _1 = () in
()}
exceptionIdentification:
......@@ -1320,9 +1290,7 @@ includes:
_1 = INCLUDES
{ ()}
|
{let _1 =
()
in
{let _1 = () in
()}
valueRange:
......@@ -1407,9 +1375,7 @@ valueConstraint:
_1 = constraint_x
{ ()}
|
{let _1 =
()
in
{let _1 = () in
()}
presenceConstraint:
......@@ -1420,9 +1386,7 @@ presenceConstraint:
| _1 = OPTIONAL
{ ()}
|
{let _1 =
()
in
{let _1 = () in
()}
patternConstraint:
......@@ -1609,9 +1573,7 @@ objectDefn:
defaultSyntax:
_1 = LeftBrace xs = loption_separated_nonempty_list_Comma_fieldSetting__ _3 = RightBrace
{let _2 =
( xs )
in
{let _2 = ( xs ) in
()}
fieldSetting:
......@@ -1734,9 +1696,7 @@ generalConstraint:
userDefinedConstraint:
_1 = CONSTRAINED _2 = BY _3 = LeftBrace xs = loption_separated_nonempty_list_Comma_userDefinedConstraintParameter__ _5 = RightBrace
{let _4 =
( xs )
in
{let _4 = ( xs ) in
()}
userDefinedConstraintParameter:
......@@ -1777,9 +1737,7 @@ level:
_1 = Dot _2 = level
{ ()}
|
{let _1 =
()
in
{let _1 = () in
()}
componentIdList:
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -932,88 +932,56 @@ special:
item:
_1 = ITEM elems = list_text_element_ _3 = CLOSE
{let text =
( elems )
in
{let text = ( elems ) in
( text )}
text_element:
data = Data
{ ( Documentation.Raw data )}
| _1 = CODE _3 = CLOSE
{let str =
( "" )
in
{let str = ( "" ) in
( Documentation.Code str )}
| _1 = CODE data = Data _3 = CLOSE
{let str =
( data)
in
{let str = ( data) in
( Documentation.Code str )}
| _1 = PRECODE _3 = CLOSE
{let str =
( "" )
in
{let str = ( "" ) in
( Documentation.PreCode str )}
| _1 = PRECODE data = Data _3 = CLOSE
{let str =
( data)
in
{let str = ( data) in
( Documentation.PreCode str )}
| _1 = VERBATIM _3 = CLOSE
{let str =
( "" )
in
{let str = ( "" ) in
( Documentation.Verbatim str )}
| _1 = VERBATIM data = Data _3 = CLOSE
{let str =
( data)
in
{let str = ( data) in
( Documentation.Verbatim str )}
| _1 = BOLD elems = list_text_element_ _3 = CLOSE
{let text =
( elems )
in
{let text = ( elems ) in
( Documentation.(Style(Bold, text)) )}
| _1 = ITALIC elems = list_text_element_ _3 = CLOSE
{let text =
( elems )
in
{let text = ( elems ) in
( Documentation.(Style(Italic, text)) )}
| _1 = EMPHASIZE elems = list_text_element_ _3 = CLOSE
{let text =
( elems )
in
{let text = ( elems ) in
( Documentation.(Style(Emphasize, text)) )}
| _1 = CENTER elems = list_text_element_ _3 = CLOSE
{let text =
( elems )
in
{let text = ( elems ) in
( Documentation.(Style(Center, text)) )}
| _1 = LEFT elems = list_text_element_ _3 = CLOSE
{let text =
( elems )
in
{let text = ( elems ) in
( Documentation.(Style(Left, text)) )}
| _1 = RIGHT elems = list_text_element_ _3 = CLOSE
{let text =
( elems )
in
{let text = ( elems ) in
( Documentation.(Style(Right, text)) )}
| _1 = SUPERSCRIPT elems = list_text_element_ _3 = CLOSE
{let text =
( elems )
in
{let text = ( elems ) in
( Documentation.(Style(Superscript, text)) )}
| _1 = SUBSCRIPT elems = list_text_element_ _3 = CLOSE
{let text =
( elems )
in
{let text = ( elems ) in
( Documentation.(Style(Subscript, text)) )}
| tag = Custom elems = list_text_element_ _3 = CLOSE
{let text =
( elems )
in
{let text = ( elems ) in
( Documentation.(Style(Custom tag, text)) )}
| _1 = LIST i = nonempty_list_item_ _3 = CLOSE
{ ( Documentation.List i )}
......@@ -1022,29 +990,19 @@ in
| _1 = NEWLINE _2 = CLOSE
{ ( Documentation.Newline )}
| level = Title label = option_label_identifier_ elems = list_text_element_ _4 = CLOSE
{let text =
( elems )
in
{let text = ( elems ) in
( Documentation.Title(level, label, text) )}
| _1 = REFERENCE rf = reference _4 = CLOSE
{let text =
( None )
in
{let text = ( None ) in
( Documentation.Reference(rf, text) )}
| _1 = REFERENCE rf = reference elems = nonempty_list_text_element_ _4 = CLOSE
{let text =
( Some elems )
in
{let text = ( Some elems ) in
( Documentation.Reference(rf, text) )}
| target = Target _3 = CLOSE
{let str =
( "" )
in
{let str = ( "" ) in
( Documentation.Target(target, str) )}
| target = Target data = Data _3 = CLOSE
{let str =
( data)
in
{let str = ( data) in
( Documentation.Target(target, str) )}
| _1 = SPECIAL special = special _3 = CLOSE
{ ( Documentation.Special special )}
......@@ -1063,41 +1021,27 @@ tag:
| _1 = VERSION data = Data _3 = CLOSE
{ ( Documentation.Version data )}
| _1 = SEE see = see elems = list_text_element_ _4 = CLOSE
{let text =
( elems )
in
{let text = ( elems ) in
( Documentation.See(see, text) )}
| _1 = SINCE data = Data _3 = CLOSE
{ ( Documentation.Since data )}
| _1 = BEFORE name = name elems = list_text_element_ _4 = CLOSE
{let text =
( elems )
in
{let text = ( elems ) in
( Documentation.Before(name, text) )}
| _1 = DEPRECATED elems = list_text_element_ _3 = CLOSE
{let text =
( elems )
in
{let text = ( elems ) in
( Documentation.Deprecated text )}
| _1 = PARAM name = name elems = list_text_element_ _4 = CLOSE
{let text =
( elems )
in
{let text = ( elems ) in
( Documentation.Param(name, text) )}
| _1 = RAISE name = name elems = list_text_element_ _4 = CLOSE
{let text =
( elems )
in
{let text = ( elems ) in
( Documentation.Raise(name, text) )}
| _1 = RETURN elems = list_text_element_ _3 = CLOSE
{let text =
( elems )
in
{let text = ( elems ) in
( Documentation.Return text )}
| _1 = TAG name = name elems = list_text_element_ _4 = CLOSE
{let text =
( elems )
in
{let text = ( elems ) in
( Documentation.Tag(name, text) )}
int:
......@@ -1142,9 +1086,7 @@ doc:
let tags = tags' in
( tags )
in
let text =
( elems )
in
let text = ( elems ) in
( Documentation.(Ok {text; tags}) )}
| _1 = DOC err = doc_error _3 = CLOSE
{ ( Documentation.Error err )}
......@@ -1155,9 +1097,7 @@ comment:
let tags = tags' in
( tags )
in
let text =
( elems )
in
let text = ( elems ) in
( Documentation.(Documentation (Ok {text; tags})) )}
| _1 = COMMENT err = doc_error _3 = CLOSE
{ ( Documentation.(Documentation (Error err)) )}
......
......@@ -16,9 +16,7 @@ expr_eoi:
type_expr:
_1 = Ident %prec type_
{let _2 =
( None )
in
{let _2 = ( None ) in
()}
| _1 = Ident _1' = Lparen x' = type_expr _3 = Rparen %prec type_
{let _2 =
......
......@@ -188,9 +188,7 @@ let ty =
let _endpos_ty_ = _endpos_ty'_ in
let _startpos_ty_ = _startpos_ty'_ in
let ty = ty' in
let x =
( ty )
in
let x = ( ty ) in
let _endpos_x_ = _endpos_ty_ in
let _startpos_x_ = _startpos_ty_ in
let _endpos = _endpos_x_ in
......@@ -203,9 +201,7 @@ in
let _endpos_ty_ = _endpos_ty'_ in
let _startpos_ty_ = _startpos_ty'_ in
let ty = ty' in
let x =
( ty )
in
let x = ( ty ) in
let _endpos_x_ = _endpos_ty_ in
let _startpos_x_ = _startpos_ty_ in
let _endpos = _endpos_x_ in
......@@ -213,9 +209,7 @@ in
( ((_startpos, _endpos), x) )
in
let ty1 =
let x =
( ty )
in
let x = ( ty ) in
let _endpos_x_ = _endpos_ty_ in
let _startpos_x_ = _startpos_ty_ in
let _endpos = _endpos_x_ in
......@@ -345,9 +339,7 @@ term_binder:
let _endpos_ty_ = _endpos_ty'_ in
let _startpos_ty_ = _startpos_ty'_ in
let ty = ty' in
let x =
( ty )
in
let x = ( ty ) in
let _endpos_x_ = _endpos_ty_ in
let _startpos_x_ = _startpos_ty_ in
let _endpos = _endpos_x_ in
......@@ -372,9 +364,7 @@ in
let _endpos_ty_ = _endpos_ty'_ in
let _startpos_ty_ = _startpos_ty'_ in
let ty = ty' in
let x =
( ty )
in
let x = ( ty ) in
let _endpos_x_ = _endpos_ty_ in
let _startpos_x_ = _startpos_ty_ in
let _endpos = _endpos_x_ in
......@@ -385,9 +375,7 @@ let t =
let _endpos_t_ = _endpos_t'_ in
let _startpos_t_ = _startpos_t'_ in
let t = t' in
let x =
( t )
in
let x = ( t ) in
let _endpos_x_ = _endpos_t_ in
let _startpos_x_ = _startpos_t_ in
let _endpos = _endpos_x_ in
......@@ -400,9 +388,7 @@ in
let _endpos_t_ = _endpos_t'_ in
let _startpos_t_ = _startpos_t'_ in
let t = t' in
let x =
( t )
in
let x = ( t ) in
let _endpos_x_ = _endpos_t_ in
let _startpos_x_ = _startpos_t_ in
let _endpos = _endpos_x_ in
......@@ -410,9 +396,7 @@ in
( ((_startpos, _endpos), x) )
in
let t1 =
let x =
( t )
in
let x = ( t ) in
let _endpos_x_ = _endpos_t_ in
let _startpos_x_ = _startpos_t_ in
let _endpos = _endpos_x_ in
......@@ -444,9 +428,7 @@ in
let _endpos_ty_ = _endpos_ty'_ in
let _startpos_ty_ = _startpos_ty'_ in
let ty = ty' in
let x =
( ty )
in
let x = ( ty ) in
let _endpos_x_ = _endpos_ty_ in
let _startpos_x_ = _startpos_ty_ in
let _endpos = _endpos_x_ in
......@@ -513,9 +495,7 @@ in
let _endpos_ty_ = _endpos_ty'_ in
let _startpos_ty_ = _startpos_ty'_ in
let ty = ty' in
let x =
( ty )
in
let x = ( ty ) in
let _endpos_x_ = _endpos_ty_ in
let _startpos_x_ = _startpos_ty_ in
let _endpos = _endpos_x_ in
......@@ -526,9 +506,7 @@ let t =
let _endpos_t_ = _endpos_t'_ in
let _startpos_t_ = _startpos_t'_ in
let t = t' in
let x =
( t )
in
let x = ( t ) in
let _endpos_x_ = _endpos_t_ in
let _startpos_x_ = _startpos_t_ in
let _endpos = _endpos_x_ in
......@@ -536,9 +514,7 @@ let t =
( ((_startpos, _endpos), x) )
in
let ty2 =
let x =
( ty )
in
let x = ( ty ) in
let _endpos_x_ = _endpos_ty_ in
let _startpos_x_ = _startpos_ty_ in
let _endpos = _endpos_x_ in
......@@ -551,9 +527,7 @@ in
let _endpos_t_ = _endpos_t'_ in
let _startpos_t_ = _startpos_t'_ in
let t = t' in
let x =
( t )
in
let x = ( t ) in
let _endpos_x_ = _endpos_t_ in
let _startpos_x_ = _startpos_t_ in
let _endpos = _endpos_x_ in
......@@ -561,9 +535,7 @@ in
( ((_startpos, _endpos), x) )
in
let t1 =
let x =
( t )
in