now SyntaxAnalyzer.getWarnings(filename) returns a list of warnings, and SyntaxAnalyzer.getWarnings(filename,True) both prints them and returns them.