This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[subbu@earth jruby] java -cp ~/software/jruby/lib/jruby.jar org.jruby.compiler.ir.IR_Builder -e "a = 3; b = [a]; c = [1,a,b]; x,y,z = *c; p = y; i,j=*z;t = c[2][0]+ i*1.5-c[1]/c[0]" | |
------------------ Before local optimization pass --------------------- | |
Script: file: "-e" | |
constants: {__SCRIPT_ROOT__=Class __SCRIPT_ROOT__} | |
Class: __SCRIPT_ROOT__Module: __SCRIPT_ROOT__ | |
Method: :_ROOT_:__SCRIPT_ROOT__ | |
instrs: | |
0 self = RECV_ARG(0) | |
1 a = 3:fixnum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ruby-head] [subbu@earth ~/jruby] cat ir.docs/kwargs.rb | |
def bar(a, defarg=9, *restargs, b, c: 'default', d: 'kwarg', **kwargs) | |
["a=#{a}", "defarg=#{defarg}", "restargs=#{restargs}", "b=#{b}", "c=#{c}", "d=#{d}", "kwargs=#{kwargs}"] | |
end | |
puts bar(1, 2).join('; ') | |
begin | |
puts bar(1, {:x => 32, :y => 'foo'} ).join('; ') | |
rescue Exception => e | |
puts "ERROR: #{e}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------------------- | |
[subbu@earth tests] cat /tmp/refs | |
X <ref>This is a long ref</ref> | |
A <ref name=a /> | |
B <ref name=b /> | |
<references> | |
<ref name=a>foo</ref> | |
<ref name=b>bar</ref> | |
</references> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------------------- | |
Updated handling for templated attributes (links, tables, html tags) | |
typeof: mw:ExpandedAttrs | |
data-mw = { | |
"expandedKeys": { | |
"href": { "html": "..." }, | |
}, | |
"expandedVals": { | |
"href": { "html": "..." }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Test #1: | |
{{echo|b | |
}}{|{{Infobox ship begin}} | |
|- | |
|a | |
|} | |
Test #2: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- without es6 collections --- | |
starting parsing of fr:Coupe_du_pays_de_Galles_de_football | |
completed parsing of fr:Coupe_du_pays_de_Galles_de_football in 12058 ms | |
starting parsing of fr:Coupe_du_pays_de_Galles_de_football | |
completed parsing of fr:Coupe_du_pays_de_Galles_de_football in 4165 ms | |
starting parsing of fr:Coupe_du_pays_de_Galles_de_football | |
completed parsing of fr:Coupe_du_pays_de_Galles_de_football in 9414 ms | |
starting parsing of fr:Coupe_du_pays_de_Galles_de_football | |
completed parsing of fr:Coupe_du_pays_de_Galles_de_football in 4537 ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssastry@parsoid-spof:/data/project/parsoid/js/api$ tail -5000 nohup.out | grep parsing| sort | less | |
... | |
completed parsing of ms:Cacaven in 101054 ms | |
completed parsing of ms:Cacaven in 102503 ms | |
completed parsing of ms:Cacaven in 104788 ms | |
completed parsing of ms:Cacaven in 111757 ms | |
completed parsing of ms:Cacaven in 113038 ms | |
completed parsing of ms:Cacaven in 114799 ms | |
completed parsing of ms:Cacaven in 116453 ms | |
completed parsing of ms:Cacaven in 128306 ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[subbu@earth lib] echo "foo<noinclude>bar baz" | node parse --fetchConfig false | |
<body data-parsoid='{"tmp":{},"dsr":[0,22,0,0]}'><p data-parsoid='{"dsr":[0,21,0,0]}'>foo<meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>","dsr":[3,14,null,null]}'>bar baz</p> | |
</body> | |
[subbu@earth lib] echo "foo</noinclude>bar baz" | node parse --fetchConfig false | |
<body data-parsoid='{"tmp":{},"dsr":[0,23,0,0]}'><p data-parsoid='{"dsr":[0,22,0,0]}'>foo</noinclude>bar baz</p> | |
</body> | |
[subbu@earth lib] echo "foo</noinclude>bar baz" | node parse --fetchConfig false --trace peg-tokens | |
TOKS: ["foo",{"type":"EndTagTk","name":"noinclude","attribs":[],"dataAttribs":{"tsr":[3,15],"stx":"html"}},"bar baz"] | |
TOKS: [{"type":"NlTk","dataAttribs":{"tsr":[22,23]}},""] | |
TOKS: [{"type":"EOFTk"}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subbu@earth:~/work/wmf/Parsoid/js/lib$ ls -lt /tmp/*wt* | grep -v tsp | |
-rw-rw-r-- 1 subbu subbu 381378 Oct 10 13:35 /tmp/wt0 | |
-rw-rw-r-- 1 subbu subbu 381378 Oct 10 13:26 /tmp/wt3 | |
-rw-rw-r-- 1 subbu subbu 381354 Oct 10 13:26 /tmp/wt2 | |
-rw-rw-r-- 1 subbu subbu 381338 Oct 10 13:25 /tmp/wt1 | |
-rw-rw-r-- 1 subbu subbu 1780653 Oct 10 13:13 /tmp/wt.debug3.html | |
-rw-rw-r-- 1 subbu subbu 2276378 Oct 10 12:16 /tmp/wt.debug2.html | |
-rw-rw-r-- 1 subbu subbu 2380992 Oct 10 12:09 /tmp/wt.debug1.html | |
-rw-rw-r-- 1 subbu subbu 2116581 Oct 10 11:59 /tmp/wt.debug.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[subbu@earth lib] node parse --prefix mw --dump dom:pre-dsr < /tmp/x | |
------ DOM: pre-DSR ------- | |
<head data-parsoid="{"tmp":{}}"></head><body data-parsoid="{"tmp":{}}"><meta typeof="mw:Transclusion" about="#mwt1" data-mw-arginfo="{"dict":{"target":{"wt":"Test for noincludes","href":"./Template:Test_for_noincludes"},"params":{}},"paramInfos":[]}" data-parsoid="{"tsr":[0,23],"src":"{{Test for noincludes}}","a":{"id":null},"sa":{"id":"mwt1"},"tagId":1,"tmp":{}}"><div data-parsoid="{"stx":"html","tagId":2,"tmp":{}}">TEST</div> | |
<p data-parsoid="{"tagId":3,"tmp":{}}"><meta typeof="mw:Transclusion/End" about="#mwt1" data-parsoid="{"tsr":[null,23],"tagId":4,"tmp":{}}">Blah number 5</p> | |
<p data-parsoid="{"tagId":5,"tm |