Navigation


Changeset 918:46f9982b7d26 in freeDiameter for libfdcore/fdd.l


Ignore:
Timestamp:
Feb 12, 2013, 10:57:32 PM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Use logging routines for configuration file parsing (based on patch by Thomas)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/fdd.l

    r740 r918  
    5252        yylloc->first_column = yylloc->last_column + 1;                 \
    5353        yylloc->last_column = yylloc->first_column + yyleng - 1;        \
    54         TRACE_DEBUG(FULL,                                               \
     54        TRACE_DEBUG_ERROR(                                              \
    5555                "(%d:%d-%d:%d) matched rule %d, length=%d, txt='%s'\n", \
    5656                yylloc->first_line, yylloc->first_column,               \
     
    104104                                if (ret != 1) {
    105105                                        /* No matching: an error occurred */
    106                                         fprintf(stderr, "Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
     106                                        TRACE_DEBUG_ERROR("Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
    107107                                        return LEX_ERROR; /* trig an error in yacc parser */
    108108                                        /* Maybe we could REJECT instead of failing here? */
     
    146146<*>[[:alnum:]]+         |       /* This rule is only useful to print a complete token in error messages */
    147147        /* Unrecognized character */
    148 <*>.                    { 
    149                                 fprintf(stderr, "Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
     148<*>.                    {
     149                                TRACE_DEBUG_ERROR("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
    150150                                return LEX_ERROR;
    151151                        }
Note: See TracChangeset for help on using the changeset viewer.