Robin Stocker
8/22/2006 12:20:00 PM
Jonathan Maasland wrote:
> /*%%%*/
> $$ = NEW_FCALL($1, 0);
> /*%
> $$ = method_arg(dispatch1(fcall, $1), arg_new());
> %*/
It's a construct needed for Ripper.
For Bison, the code of the first line is normal code, the second is
comment. So the relevant part for Bison is:
$$ = NEW_FCALL($1, 0);
In Ripper, there needs to be different code, so a script preprocesses
the whole parse.y, removes the text from /*%%% to /*% and removes the
%*/, so the second code line is relevant:
$$ = method_arg(dispatch1(fcall, $1), arg_new());
Have a look at ext/ripper/tools/preproc.rb to see how the preprocessing
works in detail.
Robin Stocker