Sam Tregar <[EMAIL PROTECTED]> writes:
>
>It comes down to what is meant by "little language".  When I hear that
>term I immediately think Scheme and TCL.  They both have a small core and
>extremely regular syntax.  I can imagine writing a smallish parser that
>spits out Perl bytecode for either.  

TCL is surprisingly hard to get right. The parse is trivial
but typical Tcl code uses the quoting mechanisms to creatively 
create variable names at the various interpolation times.

This kind of mess (syntax from rusty memory):

proc messy {name suffix level value} {
  set command "$name$suffix"
  upvar $command [expr $level-2] 
  set command "$command {$value}"
  set $command
}

messy foo "[$index]" 3 {expr $command+1}

That "obviously" compiles to the bytecode for 

$foo{$index}++  

;-)

-- 
Nick Ing-Simmons <[EMAIL PROTECTED]>
Via, but not speaking for: Texas Instruments Ltd.

Reply via email to