mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-21 22:54:45 +00:00
add debug
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@868 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
c1f66f5b49
commit
c260d30cc8
2 changed files with 419 additions and 105 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -96,9 +96,6 @@
|
|||
/* return a token, setting the nextpos value back to the bufpos */
|
||||
#define RETURN(tok) yyextra->nextpos = yyextra->bufpos; return tok
|
||||
|
||||
/* XXX todo */
|
||||
#define SET_ERROR(s)
|
||||
|
||||
/* use Pythons memory management */
|
||||
void* yyalloc (yy_size_t bytes, void* yyscanner) {
|
||||
return PyMem_Malloc(bytes);
|
||||
|
|
@ -172,7 +169,7 @@ static PyObject* quote_string (PyObject* val) {
|
|||
%option 8bit outfile="htmllex.c"
|
||||
%option align full
|
||||
/* uncomment the next line for debugging */
|
||||
/*%option debug*/
|
||||
%option debug
|
||||
%option nounput nomain noyywrap noyymore noreject
|
||||
%option bison-bridge reentrant never-interactive
|
||||
%option warn
|
||||
|
|
@ -901,12 +898,16 @@ RX_DATA [-a-zA-Z0-9_]+
|
|||
|
||||
int htmllexInit (void** scanner, UserData* data) {
|
||||
yylex_init(scanner);
|
||||
/* uncomment the next line for debugging */
|
||||
/*yyset_debug(1, *scanner);*/
|
||||
yyset_extra(data, *scanner);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int htmllexDebug (void** scanner, int debug) {
|
||||
int old = yyget_debug(*scanner);
|
||||
yyset_debug(debug, *scanner);
|
||||
return old;
|
||||
}
|
||||
|
||||
/* prepare scanner for calls to yylex() */
|
||||
int htmllexStart (void* scanner, UserData* data, const char* s, int slen) {
|
||||
/* append s to data buffer and scan those bytes.
|
||||
|
|
|
|||
Loading…
Reference in a new issue