analyser: lots of changes having to do with symbol lookup

- also added -Wall flag and removed compile warnings
- fixed c-code generation
- bugfixes