Rinse and drain lentils. Set aside. In a large saucepan cook the onion, celery, and garlic in margarine or butter until tender but not brown. Stir in the lentils, water, dried oregano and basil (if using), bouillon granules, dried rosemary (if using), and pepper. Bring to boiling; reduce heat. Simmer, covered, for 30 minutes.
Stir in the ham, carrot, and uncooked barley. Simmer, covered, about 20 minutes more or just until carrot slices are tender. Stir in the undrained tomatoes and fresh herbs, if using. Heat through. Makes 4 servings.