On Mon, 01 May 2006, Mirko Stocker defenestrated me: > On Friday 28 April 2006 14:55, Thomas E Enebo wrote: > > ? Yeah it could be. ?Some functions creating nodes in ParserSupport > > are just sticking a position in it. ?Not necesarily the right > > position so much as the current position. > > Ok, thanks. > > I kind of fixed the wrong positions in the assignments. > > I've tried to make my changes in the DefaultRubyParser.y file, but the > generated file wasn't compatible to our jruby-version (we are using the > RDT_0_7_0 tagged version). So I had to change DefaultRubyParser.java > directly. Did I change the right things?
If you could give me a patch for the .y file which would generate the equivalent of what you changed in the .java file (along with the tests I will add it). A newer version of RDT will end up picking up these changes at some point. I believe what you changed is ok for your purposes, but for JRuby we need them in the .y. > Unfortunately, I found other wrong positions in Arrays. I'll see if I can fix > them too. Oh and you could perhaps help me with something I don't understand: > > This code: > "a_string" > > gives me the following nodes: > DStrNode[]: {DStrNode[]: {StrNode[]}}, position -> test.rb:[0,0]:[9,10] > DStrNode[]: {StrNode[]}, position -> test.rb:[0,0]:[9,9] > StrNode[], position -> test.rb:[0,0]:[0,9] > > What are these two DStrNodes doing there? One marks the terminating " of the > string at position 9,9, but why does the other one include the 10th > character, which is just the linebreak? Is this also a bug? I think this is a bug. I also notice our evaluator seems to take into account multiple DStrNodes. I think ParserSupport.literal_concat is adding this extra empty DStrNode when head is null. I will need to consider this a bit more though. It certainly seems wrong from a surface view of the code. -Tom -- + http://www.tc.umn.edu/~enebo +---- mailto:[EMAIL PROTECTED] ----+ | Thomas E Enebo, Protagonist | "Luck favors the prepared | | | mind." -Louis Pasteur | ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel