kschiess / parslet

A small PEG based parser library. See the Hacking page in the Wiki as well.
kschiess.github.com/parslet
MIT License
805 stars 95 forks source link

Use + instead of << in Slice#inspect #137

Closed meh closed 9 years ago

meh commented 9 years ago

Makes it run on Opal, which doesn't support mutable strings.

kschiess commented 9 years ago

Is this the only change we need to make for opal? It seems to me as if I was modifying strings all over the place...

kschiess commented 9 years ago

Care to comment?

meh commented 9 years ago

Ah snap, didn't see the comment, sorry.

With that change I got it to compile and run a simple parser, there are some standing issues in Opal that end up in an infinite loop with more complex parser, so I don't know yet.

rubydesign commented 9 years ago

@meh infinite loops are relatively easy to get, even without opal. It's a common grammar mistake (that recursive descent is prone to), worth checking that it works under mri.

but great to hear even the simple one work.

meh commented 9 years ago

@dancinglightning it was with one of the example parsers, so that wasn't the case.