coatl / redparse

RedParse is a ruby parser written in pure ruby.
redparse.rubyforge.org
GNU Lesser General Public License v2.1
24 stars 2 forks source link

not 1.9 happy #5

Open rdp opened 15 years ago

rdp commented 15 years ago

when run from 1.9...

                   ^

C:/dev/ruby/downloads/redparse/lib/redparse.rb:2885: syntax error, unexpected ':', expecting keyword_then or ';' or '\n' rescue NeverExecThis:

and many other syntax issues. Wow wonder what changed to drastically in the 1.9 parser?

rdp commented 15 years ago

http://github.com/rogerdpack/redparse/commit/4e11a6f6af1c8ac0587730be8f733305f45cb120 might be a way

coatl commented 15 years ago

in 1.9, colon is no longer allowed as a substitute for then. You seem to have found my favored fix for these issues: change the colons to semicolons.

However, I'm not at all sure about where you changed 'not if' to 'if not'. I'm pretty certain that's not semantically equivalent to the original. If you can please take that change out, I'll merge the rest of it.

rdp commented 14 years ago

is there a new version of this that is 1.9 compat? Just wondering. -r

coatl commented 14 years ago

Ss it happens, I have been working to make redparse work better within 1.9 recently. The diffs I committed a couple hours ago should bring it into a pretty-much 1.9-compatible state. There are still a few little corners to clean up, and a pile of warnings to get rid of, (and a bug in 1.9, which prevents some here documents from lexing right...) but otherwise, the tests are all passing.

coatl commented 14 years ago

Mostly fixed in latest release. I'm leaving this open, because there are stilla few minor issues under 1.9.