guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: more on nyacc extension languages


From: Matt Wette
Subject: Re: more on nyacc extension languages
Date: Sat, 1 Sep 2018 12:38:02 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Working on nx-tcl now.  I am working to extract common utilities for
generating language extensions based on the three I have now:
nx-tcl, nx-octave (was nx-matlab) and nx-javascript.

scheme@(guile-user)> ,L nx-tcl
Happy hacking with nx-tcl!  To switch back, type `,L scheme'.

nx-tcl@(guile-user)> proc foo {a {b 1} args} { set c 1; return [expr $a+$b+$c] }

nx-tcl@(guile-user)> ,L scheme
Happy hacking with Scheme!  To switch back, type `,L nx-tcl'.

scheme@(guile-user)> (foo "5" "6")
$1 = 12

scheme@(guile-user)> (foo 5 6)
$2 = 12

scheme@(guile-user)> (foo 5)
$3 = 7

Making nx-tcl compatible with other languages is still something I'm thinking
about.  In Tcl all values are strings, but some items are intended to be non-
strings.  So the implementation needs to deal with converting to strings.  I
am trying to be lazy about that and see where it turns out.

Matt





reply via email to

[Prev in Thread] Current Thread [Next in Thread]