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

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.
......@@ -113,264 +113,178 @@
option_COMMA_:
{let o =
( None )
in
{let o = ( None ) in
( o )}
| x = COMMA
{let o =
( Some x )
in
{let o = ( Some x ) in
( o )}
option_abstract_declarator_parameter_declaration__:
{let o =
( None )
in
{let o = ( None ) in
( o )}
| x = abstract_declarator_parameter_declaration_
{let o =
( Some x )
in
{let o = ( Some x ) in
( o )}
option_abstract_declarator_type_name__:
{let o =
( None )
in
{let o = ( None ) in
( o )}
| x = abstract_declarator_type_name_
{let o =
( Some x )
in
{let o = ( Some x ) in
( o )}
option_argument_expression_list_:
{let o =
( None )
in
{let o = ( None ) in
( o )}
| x = argument_expression_list
{let o =
( Some x )
in
{let o = ( Some x ) in
( o )}
option_block_item_list_:
{let o =
( None )
in
{let o = ( None ) in
( o )}
| x = block_item_list
{let o =
( Some x )
in
{let o = ( Some x ) in
( o )}
option_declarator_:
{let o =
( None )
in
{let o = ( None ) in
( o )}
| x = declarator
{let o =
( Some x )
in
{let o = ( Some x ) in
( o )}
option_designation_:
{let o =
( None )
in
{let o = ( None ) in
( o )}
| x = designation
{let o =
( Some x )
in
{let o = ( Some x ) in
( o )}
option_designator_list_:
{let o =
( None )
in
{let o = ( None ) in
( o )}
| x = designator_list
{let o =
( Some x )
in
{let o = ( Some x ) in
( o )}
option_direct_abstract_declarator_:
{let o =
( None )
in
{let o = ( None ) in
( o )}
| x = direct_abstract_declarator
{let o =
( Some x )
in
{let o = ( Some x ) in
( o )}
option_expression_:
{let o =
( None )
in
{let o = ( None ) in
( o )}
| x = expression
{let o =
( Some x )
in
{let o = ( Some x ) in
( o )}
option_init_declarator_list_:
{let o =
( None )
in
{let o = ( None ) in
( o )}
| x = init_declarator_list
{let o =
( Some x )
in
{let o = ( Some x ) in
( o )}
option_other_identifier_:
{let o =
( None )
in
{let o = ( None ) in
( o )}
| i = general_identifier
{let o =
let x =
( set_id_type i OtherId )
in
let x = ( set_id_type i OtherId ) in
( Some x )
in
( o )}
option_parameter_type_list_:
{let o =
( None )
in
{let o = ( None ) in
( o )}
| x = parameter_type_list
{let o =
( Some x )
in
{let o = ( Some x ) in
( o )}
option_struct_declarator_list_:
{let o =
( None )
in
{let o = ( None ) in
( o )}
| x = struct_declarator_list
{let o =
( Some x )
in
{let o = ( Some x ) in
( o )}
option_type_qualifier_list_:
{let o =
( None )
in
{let o = ( None ) in
( o )}
| x = type_qualifier_list
{let o =
( Some x )
in
{let o = ( Some x ) in
( o )}
option_typedef_declarator_list_:
{let o =
( None )
in
{let o = ( None ) in
( o )}
| x = typedef_declarator_list
{let o =
( Some x )
in
{let o = ( Some x ) in
( o )}