Magnus Manske wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I have uploaded a new version with bugfixes and major speed improvements. It now parses about 20KB of wiki text per second on my machine (which is still slower than out current parser, as I am well aware).
Jim Higson schrieb:
A suggestion on this kind of error:
I think the best behaviour is to try to work out what the user intended, but not correct it in the parser, because without formal definition and when a parser is used as the reference of the language anything it doesn't mark as an error becomes valid syntax.
That is a good idea, but it depends on the user getting direct feedback from the parser. But unless I can make mine orders of magnitudes faster, it probably won't becom out "live" default parser.
On the subject of speed you might be interested in some of the optimisations I made to my parser, which made it 3 times as fast. I've uploaded a small section from my writing here:
http://users.aber.ac.uk/jqh1/optimisations.pdf
Basically, I'm subsetting the language based on some quick-to-run tests and only using possible grammars at each stage.
That means for whatever purpose it will be used, the result should look like the one from out "official" parser. When you export a nice-looking wiki page into (e.g.) PDF, you don't want to lose headings in the process. You'd have to look through all of the output carefully (bugs might be less visible than missing headings), verifying the parser.
I'm not saying errors shouldn't be corrected, just that they shouldn't be corrected in the parser. A "parser -> corrector -> PDF maker" archicture wouldn't loose the headings.
Marking syntax errors visually would just be for the website, and then only for people who want to see them (so being a janitor is easy!)
Of course, if this would ever be adopted as the "official machine", it would be a different situation altogether.
Magnus -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCVmEjCZKBJbEFcz0RAtN8AJ0S6OYBV1d9ooLK1EVS1EkLbfvvWACeLiLC jVrcr3kQsgMDiLaSRbqZNLs= =KBvd -----END PGP SIGNATURE-----