PDBC (Palm DataBase Compiler/Decompiler)
Eric's Home  >  Projects  >  Palm  >  PDBC  > 
prev next 


Menu:
Documentation PDBC Documentation
Download PDBC Download
Examples PDBC Examples
Download (PalmGear)

Documents:
pdbc is a compiler than converts a source file into a Palm DataBase (PDB) file or Palm Resource (PRC) file.

The language the pdbc compiler understands is designed to be easy to understand und write.
Yet it is powerful enough to give the freedom to describe the binary content of the database records in a variety of ways.

It is also easy to generate the pdbc source file from another language (e.g. Perl).

In addition to the pdbc tool there is also pdbdec.
pdbdec is a decompiler which converts any PDB or PRC file into a pdbc source file.
This is useful to check the correctness of the pdbc generated file and to analyze other PDB files.

pdbc and pdbdec are command line tools.
To install them you just need to modify the PATH environment variable.

The distribution contains:

  • pdbc.exe for MS Windows
  • pdbdec.exe for MS Windows
  • Source code for pdbc/pdbdec
  • man pages (+ html version)
  • examples
  • testsuite (contains also more examples)
  • emacs mode: pdbc-mode.el

Here is an example for a pdbc source file:


// ====== pdbc source file example ======
file
    filename = "an_example";
    attrib = readonly;            /* symbolic or literal attribute values */
    version = 0100_h;
    creatorid = 'ERIC';
    typeid = 'OBer';
begin
// ------ record #1 ------
    record
        attrib = secret;
    begin
        word hex                  // control over value size and base
        1001 2002 3003 4004
        byte bin
        11110000 01010000
        long dec
        1234 -9876                // values can be negative
        "Zero terminated string"
        'X' 'Y' 'Z'               // chars are not zero-terminated
        'multi chars'             // not zero-terminated either
        include "incfile.pdbc"    // include another source file (can be nested)
        includebin "README.txt"   // includes a file as-is (byte by byte)
        byte hex
        0                         // zero-terminate the data included
    end;
// ------ end of records ------
end;

pdbc is under Gnu Public License (GPL).

There is NO warranty for pdbc. Use it at your own risk.


Revision History

Version 0.9.3

  • pdbc
    • added GNU-style --options
  • pdbdec
    • added GNU-style --options
    • fix -o option (was ignored)
Version 0.9.2
  • pdbc
    • fix byte swapping bug in float/double values
  • pdbdec
    • added float/double to decompilation formats
Version 0.9.1
  • pdbc
    • creates now resource files (.prc) as well as database files (.pdb)
    • allows now C-style /* comments */ as well as C++-style // comments
    • improved float/double handling
    • additional fileheader attributes (resource, stream, hidden)
  • pdbdec
    • improved decompilation formats
      (automatic string recognition, byte/word/long, bin/oct/dec/hex, ...)
  • Distribution
    • regression testsuite no longer in the distribution
      (was about 300KB big)
      If somebody is interested in the testsuite (which contains some interesting source examples) email the author.

Version 0.9.0

  • Initial Release


News:
2002/05/13
     pdbc 0.9.3 released on PalmGear
2002/04/17
     pdbc 0.9.2 released on PalmGear
2001/11/27
     pdbc 0.9.1 released on PalmGear
2001/09/19
     pdbc 0.9.0 released on PalmGear (initial release)

Copyright 2002 by Eric Obermuhlner
Created 2002/08/27 16:02:50 by webdir