Mojo for Dark Age of Camelot (DAOC)
Home >  Extras > DAOC Delve Parser
PROGRAM

DAOC Delve Parser

This desktop Windows program extracts information about items from DAOC chat logs and puts the information in XML files in a structured format.

You can download the executable or source code of the program. You can also download input files that contain all the delves from Ethinarg's website or mindkayak.com.


Downloads

Executable

Source code

Ethinarg delves (all of them)

MindKayak delves (all of them)

Details

The program accepts the following types of files as input:

There are two types of delves in DAOC: big ones created when a player clicks "Info" and little ones created when a player drags item icons to a chat window. This program includes only big delves in its XML output. However the program extracts little delves from input and partially parses them. With minor additions to the source code, little delves could be added to the XML output.

Overview of the source code for programmers

The source code is unmanaged C++ designed to be built by Visual Studio 2012 without any third-party libraries.

The program has two threads, a GUI thread and a parsing thread. The parsing thread is recreated fresh each time the user clicks "Do it."

The cpp files are divided into "Talent" and "Support." Talent classes perform parsing and XML generation. Support classes are general purpose classes that provide scaffolding for the talent.

The highest talent class is cConductor. The word is used in the sense of an orchestra conductor. cConductor asks cInput to read an input file and extract one item's worth of information at a time. cConductor then asks cParser to transform (parse) that information and put it into a cItem in structured form. cConductor then asks cItem to serialize itself (write its data in the form of XML) into a string. Finally cConductor asks cFileOutTA to write the data to an output file.

Two types of regexes are used: the compiler's <regex> library (called through my wrapper) and a simpler, faster kind in namespace grep. The faster ones are used wherever possible.

The parser is sort of like a recursive descent parser except it doesn't recurse. Input lines get eaten by get_next_line() which behaves like a typical consume() function.

First place to look

The main file for parsing is cParser_main_loop.cpp. That's the first place to look to see how parsing works.

The main file for structuring and writing XML is cItem_serialize.cpp. That's the first place to look if you want to make changes to the XML.

This page was created on Jaunary 18, 2014 and last revised on February 22, 2014.