Fix swig parser by using regex instead of precompilation

Precompilation takes variables into account for
checking whether a path in the graph should be evaluated or not.
This is bad for translations as all paths need to be evaluated.