ruby / racc

Racc is an LALR(1) parser generator. It is written in Ruby itself, and generates ruby programs.
Other
542 stars 88 forks source link

Split/fork off racc-compiler #152

Open zenspider opened 3 years ago

zenspider commented 3 years ago

Right now dependencies on the compiler are screwed over by racc (runtime) having a faux-gemspec that ships with ruby. Splitting out the compiler would make it trivial to have a developer dependency on the compiler and a runtime dependency on the regular racc gem.

I'm (very) happy to do the work to split it out if this is approved.

joshcooper commented 2 months ago

We generate a parser during development and commit it. Later we run tests in bundler. Prior to Ruby 3.3, the generated parser could always require racc since it was a default gem. But in 3.3 it's a bundled gem. So it needs to be added to our Gemfile when running tests.

One possible workaround I found is to use racc --embedded so that the racc runtime is inlined into the generated parser and we no longer have a runtime dependency on racc

zenspider commented 2 months ago

@joshcooper that is hellishly slow compared to using the C extension.

joshcooper commented 2 months ago

Yep just was mentioning that as a possible workaround (in our case we just need to run some tests).