Re: trying to understand irb: why does it have its own lexer, instead of forwarding input to ruby ?
- From: Dave Burt <dave@xxxxxxxxxx>
- Date: Sat, 24 Jun 2006 05:34:32 GMT
Joachim (München) wrote:
Robert and Tim, thank you for your clear explanations.
As mentioned before, I want to extend the ruby language.
Specifically, I want to twist the interpreter so that it expands
for instance w8s6ny into w[8].s[6].y.size(). Do you experts
think this can be achieved by modifying IRB's ruby code,
without diving into Ruby's C code?
Yes, easily.
You could put code like Robert's in the RubyLex#buf_input method (in
irb/ruby-lex.rb), for example, after @input.call but before @rests.concat.
Cheers,
Dave
.
- References:
- trying to understand irb: why does it have its own lexer, instead of forwarding input to ruby ?
- From: Joachim (München)
- Re: trying to understand irb: why does it have its own lexer, instead of forwarding input to ruby ?
- From: Joachim (München)
- trying to understand irb: why does it have its own lexer, instead of forwarding input to ruby ?
- Prev by Date: Re: Begginers Rails Issue - destroy method being called out of the blue
- Next by Date: Re: is ruby going to require parentheses for puts, print etc?
- Previous by thread: Re: trying to understand irb: why does it have its own lexer, instead of forwarding input to ruby ?
- Next by thread: Re: coderwiki.com is starting and needs you!
- Index(es):
Relevant Pages
|