Hi,
I have set up a site for testing my parser implementation:
http://libmwparser.kreablo.se/index.php/Libmwparsertest
Please go ahead and edit.
I have disabled most of the preprocessing, as it seems very hard to lift out the independent preprocessing from the parser preparation stuff. But it should be easy to write a new one with only the required functionality (which is parser functions, magic words, comment removal, and transclusion).
It would still take a lot of work to make a version that could be substituted in place of the current parser with support for all features. But its a solid proof of concept.
Best regards,
Andreas Jonsson
How awesome! Is this code already available? Maybe it's a good idea to write to wikitech-l once you publish the source code, because I think most people don't follow this list. This list has been created to keep away parser discussions from most developers who don't care about that, but a milestone like this should be shared there too.
Again, very nice, can't wait to be able to install this myself. ;-)
Regards, Jan Paul
On 22-Sep-2010, at 19:41, Andreas Jonsson wrote:
Hi,
I have set up a site for testing my parser implementation:
http://libmwparser.kreablo.se/index.php/Libmwparsertest
Please go ahead and edit.
I have disabled most of the preprocessing, as it seems very hard to lift out the independent preprocessing from the parser preparation stuff. But it should be easy to write a new one with only the required functionality (which is parser functions, magic words, comment removal, and transclusion).
It would still take a lot of work to make a version that could be substituted in place of the current parser with support for all features. But its a solid proof of concept.
Best regards,
Andreas Jonsson
Wikitext-l mailing list Wikitext-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitext-l
On 22 September 2010 19:42, Jan Paul Posma jp.posma@gmail.com wrote:
How awesome! Is this code already available? Maybe it's a good idea to write to wikitech-l once you publish the source code, because I think most people don't follow this list. This list has been created to keep away parser discussions from most developers who don't care about that, but a milestone like this should be shared there too.
+1
- d.
2010-09-22 20:42, Jan Paul Posma skrev:
How awesome! Is this code already available? Maybe it's a good idea to write to wikitech-l once you publish the source code, because I think most people don't follow this list. This list has been created to keep away parser discussions from most developers who don't care about that, but a milestone like this should be shared there too.
Yes, the code is available in the repository at
http://svn.wikimedia.org/svnroot/mediawiki/trunk/parsers/libmwparser
Again, very nice, can't wait to be able to install this myself. ;-)
Building and installing it a complex process at the moment, and I'm afraid I haven't documented it very well. But please go ahead and try it, if you like. If you get stuck, just drop me a mail.
Best regards,
Andreas
Regards, Jan Paul
On 22-Sep-2010, at 19:41, Andreas Jonsson wrote:
Hi,
I have set up a site for testing my parser implementation:
http://libmwparser.kreablo.se/index.php/Libmwparsertest
Please go ahead and edit.
I have disabled most of the preprocessing, as it seems very hard to lift out the independent preprocessing from the parser preparation stuff. But it should be easy to write a new one with only the required functionality (which is parser functions, magic words, comment removal, and transclusion).
It would still take a lot of work to make a version that could be substituted in place of the current parser with support for all features. But its a solid proof of concept.
Best regards,
Andreas Jonsson
Wikitext-l mailing list Wikitext-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitext-l
Wikitext-l mailing list Wikitext-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitext-l
Yes, Andreas,
I tried to install it on my local ubuntu, but failed at the installing Antlr and your patch. I will try it again tonight.
Another thing is that I am trying to port your grammar to Javascritp via PegJs. It is just beginning, dozens of rules had been converted; so far I did not meet any difficulty to convert from antlr to peg. But lots of works are needed.
On Thu, Sep 23, 2010 at 3:07 PM, Andreas Jonsson <andreas.jonsson@kreablo.se
wrote:
2010-09-22 20:42, Jan Paul Posma skrev:
How awesome! Is this code already available? Maybe it's a good idea to
write to wikitech-l once you publish the source code, because I think most people don't follow this list. This list has been created to keep away parser discussions from most developers who don't care about that, but a milestone like this should be shared there too.
Yes, the code is available in the repository at
http://svn.wikimedia.org/svnroot/mediawiki/trunk/parsers/libmwparser
Again, very nice, can't wait to be able to install this myself. ;-)
Building and installing it a complex process at the moment, and I'm afraid I haven't documented it very well. But please go ahead and try it, if you like. If you get stuck, just drop me a mail.
Best regards,
Andreas
Regards, Jan Paul
On 22-Sep-2010, at 19:41, Andreas Jonsson wrote:
Hi,
I have set up a site for testing my parser implementation:
http://libmwparser.kreablo.se/index.php/Libmwparsertest
Please go ahead and edit.
I have disabled most of the preprocessing, as it seems very hard to lift out the independent preprocessing from the parser preparation stuff. But it should be easy to write a new one with only the required functionality (which is parser functions, magic words, comment removal, and transclusion).
It would still take a lot of work to make a version that could be substituted in place of the current parser with support for all features. But its a solid proof of concept.
Best regards,
Andreas Jonsson
Wikitext-l mailing list Wikitext-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitext-l
Wikitext-l mailing list Wikitext-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitext-l
Wikitext-l mailing list Wikitext-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitext-l
2010-09-23 10:19, Mingli Yuan skrev:
Yes, Andreas,
I tried to install it on my local ubuntu, but failed at the installing Antlr and your patch. I will try it again tonight.
I don't quite understand the build instruction for antlr myself. I did the following (I think):
git clone git://github.com/antlr/antlr.git antlr cd antlr patch -p 0 < ${path to libmwparser}/antlr.patch mvn -N install cd antlr3-maven-archetype mvn -Dmaven.test.skip=true install cd ../antlr3-maven-plugin mvn -Dmaven.test.skip=true install cd ../runtime/Java mvn -Dmaven.test.skip=true install cd ../../tool mvn -Dmaven.test.skip=true install
I dont know if there is any install script, but you should place the antlr, antlr-runtime, and stringtemplate jar files somewhere appropriate and create a script called 'antlr3' somewhere in your path:
#!/bin/sh
CLASSPATH=/usr/share/java/stringtemplate.jar:/usr/share/java/antlr3.jar:/usr/share/java/antlr3-runtime.jar
exec java -cp $CLASSPATH org.antlr.Tool "$@"
As for the C runtime, something like this should work:
cd ../runtime/C aclocal automake --add-missing autoconf ./configure make make install
Another thing is that I am trying to port your grammar to Javascritp via PegJs. It is just beginning, dozens of rules had been converted; so far I did not meet any difficulty to convert from antlr to peg. But lots of works are needed.
There is a Javascript backend available for Antlr. Have you tried it? Of course, there would still be a lot of work in porting the supporting C code that implements, for instance, the contexts.
Best regards,
Andreas
Thanks very much.
On Thu, Sep 23, 2010 at 5:16 PM, Andreas Jonsson <andreas.jonsson@kreablo.se
wrote:
2010-09-23 10:19, Mingli Yuan skrev:
Yes, Andreas,
I tried to install it on my local ubuntu, but failed at the installing Antlr and your patch. I will try it again tonight.
I don't quite understand the build instruction for antlr myself. I did the following (I think):
git clone git://github.com/antlr/antlr.git antlr cd antlr patch -p 0 < ${path to libmwparser}/antlr.patch mvn -N install cd antlr3-maven-archetype mvn -Dmaven.test.skip=true install cd ../antlr3-maven-plugin mvn -Dmaven.test.skip=true install cd ../runtime/Java mvn -Dmaven.test.skip=true install cd ../../tool mvn -Dmaven.test.skip=true install
I dont know if there is any install script, but you should place the antlr, antlr-runtime, and stringtemplate jar files somewhere appropriate and create a script called 'antlr3' somewhere in your path:
#!/bin/sh
CLASSPATH=/usr/share/java/stringtemplate.jar:/usr/share/java/antlr3.jar:/usr/share/java/antlr3-runtime.jar
exec java -cp $CLASSPATH org.antlr.Tool "$@"
As for the C runtime, something like this should work:
cd ../runtime/C aclocal automake --add-missing autoconf ./configure make make install
Another thing is that I am trying to port your grammar to Javascritp via PegJs. It is just beginning, dozens of rules had been converted; so far I did not meet any difficulty to convert from antlr to peg. But lots of works are needed.
There is a Javascript backend available for Antlr. Have you tried it? Of course, there would still be a lot of work in porting the supporting C code that implements, for instance, the contexts.
Best regards,
Andreas
Wikitext-l mailing list Wikitext-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitext-l
wikitext-l@lists.wikimedia.org