What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » General » Forum & Website » Strikethrough text and quotes

Strikethrough text and quotes
Author: Message:
TheBlasphemer
Senior Member
****

Avatar

Posts: 714
Reputation: 47
36 / – / –
Joined: Mar 2004
RE: Strikethrough text and quotes
quote:
Originally posted by WDZ
Why should the parser be expected to fix mistakes like that? It's possible to produce invalid HTML with just about any BBCode parser that doesn't use a state machine or some other complicated and slow solution like that.
What? calling a state-machine slower than a string replace :p? With string replacing, you're already looping through the string several times, why would doing it once but slightly different be any slower?
Actually, with algorithms like Aho-Corasick, you could probably suffice with looping through it just once and doing all the BBCode replaces properly with a stack and all.

The fact that implementing a state machine in PHP is slower than using the built-in regexp or string replacing functions doesn't mean it's slower by definition ;)

In theory (and probably also in practice, if you'd write a PHP module for it) a state machine would probably be one of the fastest and most elegant way to implement BBCode parsing :p

(Sorry mate, just couldn't resist ;))
[Image: theblasp.png]
12-18-2008 01:13 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Strikethrough text and quotes - by Mike on 12-13-2008 at 09:43 AM
RE: Strikethrough text and quotes - by Volv on 12-13-2008 at 09:46 AM
RE: Strikethrough text and quotes - by Th3rmal on 12-13-2008 at 02:53 PM
RE: Strikethrough text and quotes - by NanaFreak on 12-13-2008 at 02:54 PM
RE: Strikethrough text and quotes - by MeEtc on 12-13-2008 at 05:51 PM
RE: Strikethrough text and quotes - by WDZ on 12-13-2008 at 07:30 PM
RE: Strikethrough text and quotes - by TheBlasphemer on 12-18-2008 at 01:13 PM
RE: Strikethrough text and quotes - by WDZ on 12-19-2008 at 06:25 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On