R&D, Software, and other expensed/capitalized?

Under GAAP and/or IFRS, I imagine the rules may differ for each, but what are the accounting rules for treating the following items: -Software development -R&D -Are there other items that require immediate expensing or capitalization? I know operating leases should be treated as finance leases, but not sure beyond that. The CFAI samples had questions in this area. Any insight would be much appreciated.