The Wiki .NET Parser II
Wiki .NET Parser is available on the Nuget.org :
https://nuget.org/packages/WikiNetParser
Downloads (version 2.5.1)
- WikiNetParser_build.zip - binnaries
- WikiNetParser_source.zip - source code
- Wiki .NET Syntax
var result = new ProjectBase.Tools.Wiki.WikiConverter().ConvertToHtml(sourceText);
License
http://catarsa.com/Articles/Download/Any/License
Example
http://catarsa.com/Articles/Code/Wiki-Example
Wiki .NET Parser - about
The Wiki .NET Parser is written, using and powered by the ANTLR project. This is an ultimate text parser, ready to be used in many scenarios when the written text must be understood and then converted. One of the well known projects using the ANTLR as the HQL parser is the NHibernate (Hibernate) project.
The Wiki .NET Parser is currently targeting the .NET 3.5 framework. There is really a lot of code used to parse the Wiki .NET Syntax. But that all was generated with the ANTLRWorks tool and with a few lines of the Lexer, Parser and AST Parser syntax. In fact these 3 grammar files (and one partial class extender written in C#) make up the complete Wiki .NET Parser.
Test it, and you will be fascinated how easy is to use not only the Wiki .NET Parser (there is in fact only one method:)
var result = new ProjectBase.Tools.Wiki.WikiConverter().ConvertToHtml(sourceText);
but also to adjust that all with the ANTLRWorks tool.
Wiki .NET Syntax
To get started, read this Wiki .NET Syntax revealed.


MismatchedTokenException when running on wikitext
Hi,
I try to run the parser on the below text and get a MismatcherTokenException. What is wrong?
{{Redirect|Anarchist|the fictional character|Anarchist (comics)}}
{{Redirect|Anarchists}}
{{Anarchism sidebar}}
{{Libertarianism sidebar}}
'''Anarchism''' is generally defined as the olitical philosophy]] which holds the tate (polity)|state]] to be undesirable, unnecessary, and harmful,<ref name="definition">