"a", "de", and "para"
How do you know when to use "a", "de", "para", or nothing at all before an infinitive verb?
Before infinitive verbs, you can try this (not a strict rule, but a good start, please notice that there is a biiiig range of possibilities, here are a few)
A + infinitive: turns it into some kind of gerund action.
Estou a andar = I'm walking
De + infinitive: it can be the cause of something, generally you can use "of/from" to replace it. And it's used to tell the usage of somethings:
Estou cansado de andar = I'm tired from walking
Essa barriga grande é de comer demais = this big belly comes from eating too much
Essa fruta é de comer? = Can this fruit be eaten? (is it real or plastic?)
Para + infinitive: indicates an objective or goal:
É para comer = It's to be eaten (I made these breads for you to eat)
Vim aqui para falar = I came here to speak.
Hint: Ask "what for?" (para que?)
Hint 2: You can see it as "in order to".
No preposition : normally a direct object just being itself.
Quero andar = I want to walk (WHAT do I want? I want to walk)
Please BE AWARE that MANY times, the other verb or the thing coming before the infinitive verb will define the preposition:
Gosto de andar = I like walking (this preposition is demanded by the verb "gostar", so it has nothing to do with the given explanation about "de")
Ele começou a falar = He started to speak (Like "started to" in English. You always use "start to" or "start gerund", but gerund cannot be used that way in Portuguese)
What is the function of “a” (before fazer) in this sentence please?
O melhor que você tem a fazer é aceitar
I’m guessing it’s that “tem” takes a noun-like object, so requires “a fazer” as it’s a gerund.
So literally, something like: “The best that you have ‘for doing’, is to accept.
Am I close?!