By the time he's done all that, do you think he'll have learned the correct
Ruby grammar?

Gavin


----- Original Message -----
From: "Mike Hall" <mghall / enteract.com>


>
> 0)  Go to your Ruby source directory.
>
> 1)  Add new entries to the 'keywords' file
>
>     elseif, kELSIF, kELSIF, EXPR_BEG
>     elif, kELSIF, kELSIF, EXPR_BEG
>
> 2)  Regenerate the hashed lookup table (see comments at the top of 'lex.c'):
>
>     gperf -p -j1 -i 1 -g -o -t -N rb_reserved_word -k'1,3,$' ./keywords
>lex.c
>
> 3)  Add code to parse.y  (nothing to do in this case)
>     (Optional: generate warning/usage message for synonyms?)
>
> 4)  Re-make 'ruby'
>
>     make
>
> 5)  Test
>
>   a = 3
>   if a == 1
>     puts 'one'
>   elseif a == 2
>     puts 'two'
>   elif a == 3
>     puts 'three'
>   end
>
>   'three'
>
> OK, I've polluted this group enough for this week.
> Take care!
> --
> Mike Hall
> http://www.enteract.com/~mghall