develooper Front page | perl.perl6.internals.api.parser | Postings from December 2000

Re: Now, to try again...

Thread Previous | Thread Next
Nick Ing-Simmons
December 19, 2000 02:22
Re: Now, to try again...
Message ID:
Sam Tregar <> 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 



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

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About