G'day all,

In my quest to get regex support running I have modified parse.y to accept ~ as regex or bitnot depending on context.
I have put #ifdefs around all the regex code and setup an autoconf test for it so it can be compiled out, or is not compiled in if the OS does not support regex.


I really want to be able to compile out the parsing logic for it also if it's not supported or wanted. Can I do this with lemon?

Short of this I guess I can assign it to a noop if regex support is not compiled in.

It currently behaves very much like the regex in postgres but without the anchoring for indexes. At first glance a regex search appears to be faster than a LIKE also. If I can get profiling running I can get some firm numbers. At the moment if I compile with -DVDBE_PROFILE=1 I get a segfault on loading the database

This is with CVS sqlite as of about 30 minutes ago.

(gdb) run
Starting program: /usr/local/bin/sqlite datebook.db

Program received signal SIGSEGV, Segmentation fault.
sqliteVdbeExec (p=0x8054f70) at src/vdbe.c:517
517 pOp = &p->aOp[pc];
(gdb) bt
#0 sqliteVdbeExec (p=0x8054f70) at src/vdbe.c:517
#1 0x4002753f in sqliteExec (pParse=0xbfffe3e0) at src/build.c:97
#2 0x4003c315 in yy_reduce (yypParser=0x8054590, yyruleno=5) at parse.y:78
#3 0x4003f25d in sqliteParser (yyp=0x8054590, yymajor=107, yyminor={z = 0xe6b80a30 <Address 0xe6b80a30 out of bounds>, dyn = 1, n = 251}, pParse=0xe6b80a30) at parse.c:3990
#4 0x400482ca in sqliteRunParser (pParse=0xbfffe3e0, zSql=0x4006a780 "SELECT type, name, rootpage, sql, 1 FROM sqlite_temp_master UNION ALL SELECT type, name, rootpage, sql, 0 FROM sqlite_master", pzErrMsg=0xbfffe5bc)
at src/tokenize.c:458
#5 0x400369e3 in sqliteInitOne (db=0x804e808, iDb=0, pzErrMsg=0xbfffe5bc) at src/main.c:337
#6 0x40036d9e in sqliteInit (db=0x804e808, pzErrMsg=0xbfffe5bc) at src/main.c:386
#7 0x40036fbe in sqlite_open (zFilename=0xbffffc7b "datebook.db", mode=438, pzErrMsg=0xbfffe5bc) at src/main.c:464
#8 0x08049d65 in open_db (p=0xbfffe610) at src/shell.c:510
#9 0x0804c0fb in main (argc=2, argv=0xbffffb84) at src/shell.c:1215


I'll keep working on it anyway.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to