diff options
author | Teddy <[email protected]> | 2014-03-25 06:57:44 +0800 |
---|---|---|
committer | Teddy <[email protected]> | 2014-03-25 06:57:44 +0800 |
commit | 79b8219a7b8a786740a6c57b2d819953bcf261de (patch) | |
tree | a0e81987d32f5748ff99de2c67dd543abd42417f /cibic.y | |
parent | 04ee9c8bef572f4351090b768413e5b6a3ac4a77 (diff) |
verbose error reporting
Diffstat (limited to 'cibic.y')
-rw-r--r-- | cibic.y | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -7,7 +7,7 @@ char *strval; struct CNode *cnode; } - +%error-verbose %token IDENTIFIER INT_CONST CHAR_CONST STR_CONST %token KW_VOID KW_CHAR KW_INT KW_STRUCT KW_UNION KW_IF KW_ELSE KW_WHILE %token KW_FOR KW_CONT KW_BREAK KW_RET KW_SIZEOF @@ -161,7 +161,10 @@ jump_statement expression : assignment_expression - | expression ',' assignment_expression { $$ = cnode_create_exp(',', 2, $1, $3); } + | expression ',' assignment_expression { + printf("%d, %d\n", @$.first_line, @$.first_column); + $$ = cnode_create_exp(',', 2, $1, $3); + } assignment_expression : logical_or_expression |