fix unclosed token group in Ruby scanner
fix token nesting in PHP scanner