gougou 的blog

发布Sqlite Developer Preview 0.89

更新历史:

  • Updated:Now we can switch opened database in query form.
  • Updated:Upgrade sqlite dll to 3.26.
  • New: Added Log Tab to Query Form
  • Updated: after executing create and drop table, view, trigger, index sql , db explorer will automatically be refreshed.
  • New: Basic db schema extract function.
  • New: View and Edit Blob Field.
  • New: implement Database MainMenu.
  • Fixed: Do not invoke autocomplete in comment block.
  • Fixed: when clear sql monitor sql edit was not cleared.
  • Fixed: now sql parser can correctly process sql which contains mulit-line comment.
  • Fixed: DB Explorer will show plus sign before node even child node count=0.
  • New: Add Explain Query Plan Function.

下载:这里

vxworks 和 vmware

因为VxSim模拟器支持的VxWorks功能有限,因此想装一个真正的VxWorks的运行环境,最开始想到的是在vmware上装一个,这样可以比较省事,但是花了一下午的时间,在MS—DOS虚机上装出来的VxWorks一启动就崩溃了,总是不行,后来在Google上查了一下,才发现Vmware不支持VxWorks,据说Wind River开发组的人内部是用修改过的Vmware和特殊的BSP以及驱动进行的开发,可惜我拿不到那样的版本,郁闷。看来只能老老实实的找台破电脑。

发布Sqlite Developer Preview 0.84

更新历史

  • Fixed:switch system objects and non-sys objects does not hide the system index(Which was introduced in ver0.75).
  • Fixed: disable Edit Table for System Table schema and data.
  • Updated: Now you can double click on field to view multi-line memo field data.
  • New: basic sql autocomplete function.
  • New: Add SQL monitor.
  • New: Add SQL history.
  • Fixed: some quirk focus problem.
  • Fixed: does not show explain results.(which was introduced in ver 0.75)
  • Updated: executing setting pragma command(pragma name=value) will not show data grid.

下载 这里

系统移植的一个常见问题

最近要把一个其他系统上的程序移植到Windows,其中用到一个数据文件,用原来的程序在Windows上编译后,一运行就访问越界,跟踪后发现,解析文件数据时,凡是读取ULong的地方,数据都取反了,问了一下,原来系统是基于Motorola的CPU的,而motorola CPU同Intel CPU的Word中高低位字节存放顺序正好是反的,因此ULong转换失败,写了一个高低字节转换程序就OK了。这应该是异构系统移植一个常见问题

发布Sqlite Developer Preview 0.8

更新历史

  • Fixed:Registered Db was not loaded after starting program(Which was not corrected as expected in ver0.75).
  • New: Basic index management (drop , reindex, create, view).
  • Updated: Added Data Edit Tab to Edit Table Dialog.
  • Update: Add Hints to toolbar button.
  • New: Add reindex function to table.
  • Fixed: Trigger display order was not correct.
  • Fixed: created table display order was not correct.
  • Fixed: options dialog always show the data export options even select sql editor option node. (Introduced in ver0.75)
  • New: Add View SQL command to View node.
  • Fixed:Does not show pragma command execute result(introduced in ver0.75)

    下载地址:这里

发布Sqlite Developer Preview 0.75

更新历史

  • Fixed: now sqlite system table can not be dropped.
  • Fixed: when created a database, the treeview was meshed.
  • New: update to
    support sqlite 3.25 analyze command.
  • Fixed: judge sql type and only show data grid for select sql.
  • Fixed: display order was not correct for the last item.
  • Update: update liveupdate
  • New: basic trigger edit function.
  • Update: now modified config is wrotten to file at once.

    下载地址:这里

Antlr的贪婪模式语法

.-noscript-blocked { border: 1px solid red !important; background: white url("chrome://noscript/skin/icon32.png") no-repeat left top !important; opacity: 0.6 !important; }

下面的规则是非贪婪模式的语法,它会匹配{之后的任意字符而不会匹配}符号,


CURLY_BLOCK_SCARF
: '{' (.)* '}'
;

 

要想让Antlr能够匹配},我们需要将规则改为

在DLL中使用Antlr

.-noscript-blocked { border: 1px solid red !important; background: white url("chrome://noscript/skin/icon32.png") no-repeat left top !important; opacity: 0.6 !important; }

新建一个Win32 DLL项目,设置如下

Delphi调用VC生成用于C程序调用的DLL的注意事项

在VC中可以Export DLL函数供C程序调用

#define PARSERDLL_API __declspec(dllexport)

extern "C" {
PARSERDLL_API int GetSqlType(LPCTSTR szSql);
}

Delphi要想调用这样的针对C输出的函数,不能使用stdcall的调用规范,而应使用cdecl的调用规范

如何include预编译头文件到antlr生成的cpp中

在Antlr生成cpp文件时,我们可能希望添加预编译头文件StdAfx.h到cpp文件中,标准的Header开关只能把头文件include到生成的头文件,而不能是cpp文件。

要想添加头文件到cpp中,需要使用antlr cpp生成器特殊控制开关关键字pre_include_cpp,示意如下
header "pre_include_cpp" {
#include "StdAfx.h"
}

同步内容