Redefine Gem C Base Code from Gem

For experimentation, I'm looking for a way to modify some of the basic Ruby codes, in particular the parser. I was wondering if this can be done at all, not to mention the use of the gem.

I narrowed down the code I need to change to static int yylex()inside parser.c. I was going to try to use an alias, but it seems to me that I am changing parser.h, which, as I understand it, cannot be done inside the Gem.

Can this be done from Gem?

+4
source share
1 answer

No.

The only basic C code this code has access to is that the Ruby headers are displayed . The parsing / lexing code is not displayed there.

, ( ):

  • DSL. Ruby , , script,
  • Ruby Ruby, eval. , , , , , .
  • mruby. mruby , . , , , .
+1
source

Source: https://habr.com/ru/post/1689656/


All Articles