commit ab51127d27ae8e937900c3dc3f7a15555dc0d71f from: Omar Polo date: Wed Aug 04 15:56:23 2021 UTC add a mean to debug yylex commit - abebcc030ec0a51316876d7a87fcd02cef27fbc0 commit + ab51127d27ae8e937900c3dc3f7a15555dc0d71f blob - a1a93b781e833db03ec3a10b50258280c7556089 blob + ef6b83f3d477bbede6eaa6834f5fb75527eece23 --- parse.y +++ parse.y @@ -463,10 +463,81 @@ findeol(void) } return ERROR; } + +#if 0 +int my_yylex(void); int yylex(void) { + int x; + + switch (x = my_yylex()) { + case AUTH: + puts("auth"); + break; + case CERT: + puts("cert"); + break; + case ERROR: + puts("error"); + break; + case INCLUDE: + puts("include"); + break; + case KEY: + puts("key"); + break; + case LISTEN: + puts("listen"); + break; + case NO: + puts("no"); + break; + case ON: + puts("on"); + break; + case PKI: + puts("pki"); + break; + case PORT: + puts("port"); + break; + case TABLE: + puts("table"); + break; + case TLS: + puts("tls"); + break; + case YES: + puts("yes"); + break; + case STRING: + printf("string \"%s\"\n", yylval.v.string); + break; + case NUMBER: + printf("number %"PRIi64"\n", yylval.v.number); + default: + printf("character "); + if (x == '\n') + printf("\\n"); + else + printf("%c", x); + printf(" [0x%x]", x); + printf("\n"); + break; + } + + return x; +} + +int +my_yylex(void) +#else +int +yylex(void) +#endif +{ unsigned char buf[8096]; unsigned char *p, *val; int quotec, next, c;