/*
 * This file is part of the Cforall project
 *
 * $Id: parseutility.cc,v 1.2 2005/08/29 20:14:15 rcbilson Exp $
 *
 */

#include "parseutility.h"
#include "SynTree/Type.h"
#include "SynTree/Expression.h"


Expression *
notZeroExpr( Expression *orig )
{
      UntypedExpr *comparison = new UntypedExpr( new NameExpr( "?!=?" ) );
      comparison->get_args().push_back( orig );
      comparison->get_args().push_back( new NameExpr( "0" ) );
      return new CastExpr( comparison, new BasicType( Type::Qualifiers(), BasicType::SignedInt ) );
}
