Discussion:
handling paragraphs as long lines
Werner LEMBERG
2005-06-02 05:38:25 UTC
Permalink
IMHO one of the weakest points in MoinMoin is how wiki.py parses the
input. Using regular expressions simply doesn't work properly for
nested balanced expressions, and we have already far too many
exceptions which nested expressions work, and which not.

What do you think of using a completely different paradigm, namely to
do bison-like parsing of the input data to get the appropriate tokens?

To use a solution in pure Python the following looks very promising:

http://lava.net/~newsham/pyggy/html/pyggy.html

BTW, is any other part of MoinMoin dependent on wiki.py? I mean, can
I simply replace the HTML generating engine with a different one,
similar to the `colorizing' parsers for other languages like C or C++?
Where can I find the documentation of the affected interface?


Werner


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
Thomas Waldmann
2005-06-06 05:16:31 UTC
Permalink
Hi Werner,
Post by Werner LEMBERG
What do you think of using a completely different paradigm, namely to
do bison-like parsing of the input data to get the appropriate tokens?
One of the problems might be that you don't want to be as strict in a
wiki as you want to be when parsing a programming language.

E.g. there never should be a "syntax error" in a wiki.
Post by Werner LEMBERG
BTW, is any other part of MoinMoin dependent on wiki.py?
Maybe don't touch wiki.py for starting. Just call it wiki2.py and use
#format wiki2 in your page header (like already possible for rst and
other stuff).
Post by Werner LEMBERG
Where can I find the documentation of the affected interface?
Maybe reading wiki.py is the best and most current "documentation".
It is important to use the formatter to generate output.

greetings, Thomas


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
Loading...