@@ -656,7 +656,7 @@ exprt smt2_parsert::function_application()
656656 if (next_token () != smt2_tokenizert::NUMERAL)
657657 throw error () << " expected numeral after " << id;
658658
659- auto index = std::stoll (smt2_tokenizer.get_buffer ());
659+ auto index = string2integer (smt2_tokenizer.get_buffer ());
660660
661661 if (next_token () != smt2_tokenizert::CLOSE)
662662 throw error () << " expected ')' after " << id << " index" ;
@@ -681,21 +681,21 @@ exprt smt2_parsert::function_application()
681681 // we first convert to a signed type of the original width,
682682 // then extend to the new width, and then go to unsigned
683683 const auto width = to_unsignedbv_type (op[0 ].type ()).get_width ();
684- const signedbv_typet small_signed_type ( width) ;
685- const signedbv_typet large_signed_type ( width + index) ;
686- const unsignedbv_typet unsigned_type ( width + index) ;
684+ const signedbv_typet small_signed_type{ width} ;
685+ const signedbv_typet large_signed_type{ width + index} ;
686+ const unsignedbv_typet unsigned_type{ width + index} ;
687687
688688 return typecast_exprt (
689689 typecast_exprt (
690690 typecast_exprt (op[0 ], small_signed_type), large_signed_type),
691691 unsigned_type);
692692 }
693- else if (id== " zero_extend " )
693+ else if (id == ID_zero_extend )
694694 {
695695 auto width=to_unsignedbv_type (op[0 ].type ()).get_width ();
696- unsignedbv_typet unsigned_type ( width+ index) ;
696+ unsignedbv_typet unsigned_type{ width + index} ;
697697
698- return typecast_exprt ( op[0 ], unsigned_type) ;
698+ return zero_extend_exprt{ op[0 ], unsigned_type} ;
699699 }
700700 else if (id == ID_repeat)
701701 {
0 commit comments