In a large heavy pot, heat olive oil over medium high heat. Stir in onion and cook for 2 minutes. Stir in garlic, celery, and carrots and cook for 3 minutes. Add dried basil, oregano, and red pepper flakes and toss to coat. Stir in tomatoes and stock and bring to a boil. Reduce heat and simmer for 30 minutes. If necessary add an additional cup of stock or water and stir in beans and tiny pasta. Simmer for 6-8 minutes or until pasta is tender. Stir in parsley and serve hot with grated Parmesan and ground black pepper.