This is certainly possible, but in my opinion my initial solution isn't very clean (I might think of a better one later): Let $d$ be the first letter of $a$. For every occurrence of $d$ in a right-hand side of a production $A \rightarrow \alpha d \beta$, create a new grammar that only differs from your first one in that your starting production is now $S_{new} \rightarrow d \beta$. Parse $a$ using these new grammars until you run out of characters in $a$. Consider all possible derivations you're in at that moment, and compute the follow set of those using the straightforward method also used to compute First and Follow sets for $LL(1)$ parsing. Parsing $a$, but nothing more, is not too hard if you are using standard parsers such as $LL(1)$ (or recursive descent) or some $LR$ variant. Earley also works.