Grammar is okay. File 'examples/prog.sss' has 2 errors. Line 26: while (n>0) { ^ (continues for another 42 characters) Expected: "BREAK" or "DEF" or "IF" or "RETURN" or "WHILE" or "}" or COMMENT or IDENTIFIER or NUMBER or ROUND or STRING, but not "{ ans = ans * n n = n - 1 }". Line 37: DEF triangle(int numRows) { ^^^^^^^ Expected: ")" or ",", but not "numRows".