in reply to RecDescent: binary shift in exe block?
I was thinking HERE docs are more likely. Put the bitshift inside a << section or stick it into a subroutine and have *that* do the bitshift.
#badrule : /reg1/i '=' sub_rule ',' /reg2/i '=' sub_rule ';' # { # $main::machineword = eval <<R \$item[3] << 3 | \$item[7]; R # 1 # }
Added: In conslutation on the chatterbox, some other ideas came up that won't step into string-eval which is really quite a hack. I'd use a unary '+' on the right-hand term. So instead of writing $item[3] << 3 it'd be $item << +3. The idea is to distinguish between a string and "other stuff." Another idea is to maybe put a newline between the end of the << and the next term and whatever other whitespace you prefer. Best of luck to you - report back, eh?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: RecDescent: binary shift in exe block?
by bear_hwn (Acolyte) on May 13, 2003 at 02:44 UTC | |
by diotalevi (Canon) on May 13, 2003 at 03:36 UTC | |
by bear_hwn (Acolyte) on May 13, 2003 at 18:11 UTC |