Downloads
release
dev builds
extras
themes
Documentation
manual
wiki
device status
Support
forums
mailing lists
IRC
Development
bugs
patches
dev guide
Search
Search
| Go
Wiki
>
Main
>
WpsTokenizerDEPRECATED
---+!! WPS tokenizer %TOC% ---++Introduction %W% This article is Work-in-progress This page aims to explain the principles of the WPS tokenizer and give all the information needed to maintain and extend it. ---++Code structure explanation ---+++The parser The main function for WPS loading and parsing is =wps_data_load()=. It does the following: * reset the WPS data structure * copy the WPS source to the plugin buffer * parses the source * load the bitmaps <img src="%ATTACHURLPATH%/call_graph_parser.png" alt="call_graph_parser.png" width='684' height='533' /> ---+++The renderer <img src="%ATTACHURLPATH%/call_graph_display.png" alt="call_graph_display.png" width='1076' height='519' /> ---++ How to add a WPS tag * Add a new token to ==enum wps_token_type== in =gwps.h=. * Add your token and the corresponding WPS tag to the ==all_tags== array in =wps_parser.c=. If necessary, add a special parsing function that will be called when the tag is encountered. * Add a case for the new token to the switch in ==get_tag()== in =gwps-common.c=. * Add a case for the new token to the switch in ==dump_wps_tokens()== in =wps_debug.c= (this isn't vital but helpful).
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r2
<
r1
|
B
acklinks
|
V
iew topic
|
M
ore topic actions
r2 - 06 Sep 2010 - 12:04:06 -
JonathanGordon
Copyright © by the contributing authors.