def p_assign_err(p): """ void : expression ASSIGN | expression PLUS_EQUAL | expression MINUS_EQUAL """ tell_error(p, 2, "The left-hand-side of :=/+=/-= must be a variable name, not an expression.") raise SyntaxError
def p_expr_block_err(p): "block : '(' error ')'" tell_error(p, 0, "Block doesn't contain valid list of statements")
def p_condition_err(p): "condition : '(' error ')'" tell_error(p, 0, "Condition should be a (single) expression.")
def p_expr_err(p): "expression_list : expression error ','" tell_error(p, 0, "Error while parsing an expression.")
def p_expr_string_err(p): "expression : error STRING" tell_error(p, 2, """Strings can't be used as expressions; they can only appear as part of $...="..." or $...+"...".""")