Factorize more code into AbstractSyntaxChecker

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>