Changeset 944:6cdb2a54aaf6 in freeDiameter
- Timestamp:
- Feb 12, 2013, 7:51:10 PM (11 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- libfdcore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdcore/fdd.l
r740 r944 52 52 yylloc->first_column = yylloc->last_column + 1; \ 53 53 yylloc->last_column = yylloc->first_column + yyleng - 1; \ 54 TRACE_DEBUG(FULL, \ 55 "(%d:%d-%d:%d) matched rule %d, length=%d, txt='%s'\n", \ 54 TRACE_DEBUG_ERROR("(%d:%d-%d:%d) matched rule %d, length=%d, txt='%s'\n", \ 56 55 yylloc->first_line, yylloc->first_column, \ 57 56 yylloc->last_line, yylloc->last_column, \ … … 104 103 if (ret != 1) { 105 104 /* No matching: an error occurred */ 106 fprintf(stderr,"Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));105 TRACE_DEBUG_ERROR("Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno)); 107 106 return LEX_ERROR; /* trig an error in yacc parser */ 108 107 /* Maybe we could REJECT instead of failing here? */ … … 147 146 /* Unrecognized character */ 148 147 <*>. { 149 fprintf(stderr,"Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);148 TRACE_DEBUG_ERROR("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext); 150 149 return LEX_ERROR; 151 150 } -
libfdcore/fdd.y
r808 r944 62 62 void yyerror (YYLTYPE *ploc, struct fd_config * conf, char const *s) 63 63 { 64 if (ploc->first_line != ploc->last_line) 65 fprintf(stderr, "%s:%d.%d-%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); 66 else if (ploc->first_column != ploc->last_column) 67 fprintf(stderr, "%s:%d.%d-%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_column, s); 68 else 69 fprintf(stderr, "%s:%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, s); 64 if (ploc->first_line != ploc->last_line) { 65 TRACE_DEBUG_ERROR("%s:%d.%d-%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); 66 } else if (ploc->first_column != ploc->last_column) { 67 TRACE_DEBUG_ERROR("%s:%d.%d-%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_column, s); 68 } else { 69 TRACE_DEBUG_ERROR("%s:%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, s); 70 } 70 71 } 71 72
Note: See TracChangeset
for help on using the changeset viewer.