Which sentence is the correct one?
- He parked his BMW directly before the diner.
- He parked his BMW directly in front of the diner.
Your number two is the correct one. You'd use the preposition "in front of."
The first sentence could mean He parked his BMW immediately before the person who was eating parked their car. The second sentence most likely means He parked his BWM at the location directly at the front of the eatery, which is no doubt what is intended.
before in this context is often understood to be time related while in front of is understood to be spatially related.
Changed "means" to "could mean".
You use "in front of" when you have a local relationship in mind. Typical example: in front of the house, behind the house.
You use "before" when you have a temporal relationship in mind as in: before the war, after the war.
And you can use "before" when talking of order or things as in: The letter A stands before B.