(anonymous guest) (logged out)

Copyright (C) by the contributors. Some rights reserved, license BY-SA.

Sponsored by the Wiki Symposium and the Nuveon GmbH.

Add new attachment

Only authorized users are allowed to upload new attachments.

This page (revision-19) was last changed on 10-Oct-2007 01:19 by YvesPiguet

This page was created on 06-Mar-2007 18:47 by RadomirDopieralski

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 33 added 39 lines
Thanks!
It's a parser written in C which performs one pass and generates outputs immediately. Here is a
sketch of its main loop:
{{{
set state to "between par"
while not finished
{
read next token (single char, or markup taking context into account)
switch state
{
case ...
switch token
{
case char
if start and/or end of element, write corresponding fragment
write char, encoding it if necessary
change state if necessary
case some markup token
if start and/or end of element, write corresponding fragment
change state if necessary
...
}
...
}
}
write end of element corresponding to current state, if any
}}}
Styles are pushed in a stack and popped in such a way to always produce matching pairs
in output. I've chosen C to be able to embed it easily into different projects, some of them
running on platforms with very tight resources, such as small embedded systems or PDA.
As you must have guessed with the error message above, for tests, I've compiled it as
a stand-alone command-line app and I run it from a simple CGI script, written in
-sigh- sh.
-- [[YvesPiguet]], 2007-Mar-06
Version Date Modified Size Author Changes ... Change note
19 10-Oct-2007 01:19 14.408 kB YvesPiguet to previous NME-071009
18 06-Oct-2007 10:56 14.168 kB YvesPiguet to previous | to last Star and sharp ambiguities
17 28-Mar-2007 20:44 9.609 kB YvesPiguet to previous | to last Reply
16 28-Mar-2007 19:46 9.476 kB SteffenSchramm to previous | to last
15 20-Mar-2007 23:38 9.338 kB YvesPiguet to previous | to last Source code released
14 20-Mar-2007 18:05 9.107 kB YvesPiguet to previous | to last Opensourced
13 20-Mar-2007 11:18 8.786 kB YvesPiguet to previous | to last Answers
12 20-Mar-2007 10:14 7.25 kB SteffenSchramm to previous | to last
11 20-Mar-2007 01:14 5.678 kB YvesPiguet to previous | to last On opensourcing
10 18-Mar-2007 17:30 5.024 kB SteffenSchramm to previous | to last Why not focus our work to build the one and only Creole reference parser?
9 06-Mar-2007 22:31 3.438 kB RadomirDopieralski to previous | to last
8 06-Mar-2007 22:02 3.201 kB YvesPiguet to previous | to last Parser overview
7 06-Mar-2007 21:12 1.962 kB RadomirDopieralski to previous | to last sorry and details
6 06-Mar-2007 20:56 1.634 kB YvesPiguet to previous | to last Reply (clarification)
5 06-Mar-2007 19:40 1.633 kB YvesPiguet to previous | to last Reply
4 06-Mar-2007 19:23 0.9 kB RadomirDopieralski to previous | to last more errors :)
3 06-Mar-2007 19:20 0.694 kB RadomirDopieralski to previous | to last the ~| doesn't work in tables as expected
2 06-Mar-2007 19:14 0.61 kB YvesPiguet to previous | to last Fixed
1 06-Mar-2007 18:47 0.45 kB RadomirDopieralski to last error
« This page (revision-19) was last changed on 10-Okt-2007 01:19 by YvesPiguet