Intersection between regular language and context-free language In general, context-free algorithm are not closed under intersection but the intersection between a regular language and a CF language is known to be context-free.

My question is: does exist an algorithm to compute intersection in these special cases?

Thanks.
Yes, there does.

The key is to represent your CFL as a pushdown automaton, and the regular language as a DFA. Then compute the product automaton of the CFL's states and the DFA's states, keeping the stack operations from the CFL.

In essence, what you're doing is running your pushdown machine, and keeping track of what state you would be in in the DFA if you were running it in parallel. Then, when you reach the end, you only accept if both machines would accept.