---------------------------------------------------------------------- Samples of semantic error messages generated by the semantic routines that process attribute values. Also, examples of integer overflow. Line numbers and statement counts are approximate. ---------------------------------------------------------------------- Enter file name for reading: - Successfully opened input stream '-' PARSER: Now parsing '-' to 'STDOUT' scanner_init: The Scanner defines 18 token types scanner_init: Reading from '-'. print 1/0; a.out: File - Line 1: Dividing 1 by zero a.out: File - Line 1: Skipped to Semicolon ';' print 1+"abc"; a.out: File - Line 2: Non-numeric operand(s): Unsigned Integer '1' and/or String 'abc' a.out: File - Line 2: Skipped to Semicolon ';' print -"abc"; a.out: File - Line 3:Cannot negate non-number String 'abc' a.out: File - Line 3: Skipped to Semicolon ';' print 999999999999999999999999999999, " overflow!\n"; 1073741823 overflow! print 000000000000000000000000000001, "\n"; 1 scanner_term: The Scanner terminated in '-' at line 6 PARSER: Parsed 2 statements from '-' to 'STDOUT'. PARSER: File - had 3 errors. Returned from parsing '-' Enter file name for reading: - Successfully opened input stream '-' PARSER: Now parsing '-' to 'STDOUT' scanner_init: The Scanner defines 18 token types scanner_init: Reading from '-'. print "aksdhfkah^Z a.out: Lexical error in file '-' lexeme 'aksdhfkah' on character '' a.out: File - Line 1: Expecting Identifier, Unsigned Integer, or Left Parenthesis; found Error 'aksdhfkah' a.out: File - Line 1: Skipping over Error 'aksdhfkah' a.out: File - Line 1: Skipped to EOF '' scanner_term: The Scanner terminated in '-' at line 1 PARSER: Parsed 0 statements from '-' to 'STDOUT'. PARSER: File - had 1 errors. Returned from parsing '-'