Bug 89946 - rewrite Pages parser
Summary: rewrite Pages parser
Status: RESOLVED FIXED
Alias: None
Product: Document Liberation Project
Classification: Unclassified
Component: libetonyek (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Anurag Kanungo
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks: 89948
  Show dependency treegraph
 
Reported: 2015-03-11 08:15 UTC by David Tardon
Modified: 2017-10-30 11:25 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Tardon 2015-03-11 08:15:51 UTC
There is a basic recusive descent parser for Pages format. The task is to rewrite this to use a single parser loop and a "context" class for every element. This involves:

* Deriving the parser (source is src/lib/PAGParser.*) from IWORKParser.
* Defining Pages-specific dictionary and parser state--see KEY2ParserState.h and KEYDictionary.h. They will not have any members initially, but they will likely be needed later.
* Defining helper base classes for contexts--see KEY2XMLContextBase.h.
* Replacing every parseFoo function by a context class. These define IWORKXMLContext API and each one of them should be derived from one of the helper base classes from previous point.

Note that sf:text-body element is already handled by IWORKTextBodyContext, so the text-related parser functions do not have to be converted, but just dropped.
Comment 1 Robinson Tryon (qubit) 2015-12-18 10:07:47 UTC
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillCpp)
[NinjaEdit]