From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.user Subject: Re: nyacc support for extension languages Date: Sun, 19 Aug 2018 14:30:49 -0700 Message-ID: <79334008-ef4e-3915-f807-5fe239056177@gmail.com> References: <87r2iut5at.fsf@fastmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1534714154 17462 195.159.176.226 (19 Aug 2018 21:29:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 19 Aug 2018 21:29:14 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Aug 19 23:29:10 2018 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1frVG2-0004Pz-4o for guile-user@m.gmane.org; Sun, 19 Aug 2018 23:29:10 +0200 Original-Received: from localhost ([::1]:44163 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frVI7-0005tS-1L for guile-user@m.gmane.org; Sun, 19 Aug 2018 17:31:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frVHk-0005tK-4T for guile-user@gnu.org; Sun, 19 Aug 2018 17:30:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1frVHh-0004Ao-2I for guile-user@gnu.org; Sun, 19 Aug 2018 17:30:56 -0400 Original-Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]:43168) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1frVHg-0004Aa-SZ for guile-user@gnu.org; Sun, 19 Aug 2018 17:30:53 -0400 Original-Received: by mail-pg1-x535.google.com with SMTP id v66-v6so4450932pgb.10 for ; Sun, 19 Aug 2018 14:30:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=b76RAe5Fef4YcCPeB/rsSUzFKtGVd6xrT6lsgPgj5pk=; b=HRWP2VXL+qfGao7nuY5xW2wzeia2xwjrPAIrv722iMQxYP0CgujPhmGnIiO4YjoovM LBLp3ZVzkhdbf+jq5RM82HEHAbxGa7EWnSzlVkw9IuTIDmcTGZvD8V5ndp6tTCA9k939 UN40h+xkR0SMe8K+5g2K4ZXxdM6DPhq/iXFXSktFHJLWSxvjwkWzcs1RzWr6MCtCA+iy rWkGtXlBEhNYqtO7ltRWBxKtLW5yNYfeTyolUqae8aWWzWhgSgXlo9CgOeRzuhDG8cG/ SniJXWBrDaSdVrURaTaXfUAxJ/XSrBfjM+T0HA0mH0tNfnBIj5JbnB4dKPNmevT3qKbO oNCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=b76RAe5Fef4YcCPeB/rsSUzFKtGVd6xrT6lsgPgj5pk=; b=JrTpjwTdUfTy7T2oa2/n0zjFGAC95U4kUG8uOSdWLBpRbAucV/pN2M1O23rSb9E8Op kJOs+8RkAVs7tUc4YDYKJTvMw5lNrPbdvnU3CD39I+Daf5Tlr+wg5NQbL/U8htE1Dqqd STPUWQe5VpSp6h5WhiSx7nL9QBW7ZEzkY4wpqRUtXZE0EsjuTLqmPf1hdsqtcJePCjAs H7XBlahRrigp/pQpC5fDnjdoLCvpTuu562iD5gGUy0wD2NtwX4WlXzEFS/iIJGi28vOw gvl7cjfFNEjuQAPeuOUzX5lAtk8AWUd8oiiXxWWvJxbGU6+CnmWds2RxGOfnKt1LSsph d8jw== X-Gm-Message-State: AOUpUlFQg/x9UUE7LXObZ/kOGyNAuC/aHO9JUlkZmayxurs6KvoYQCQ1 8IFHJ+oerJYdHS1tbn41BjmeXmAV X-Google-Smtp-Source: AA+uWPzUw+Nd9iMAwpJvaKqo2He1N+YAhzEnTiQIhLt+FhYBn3Yp4bjGz9pzMH+th5gsPEzmsApAsw== X-Received: by 2002:a63:455c:: with SMTP id u28-v6mr40541346pgk.210.1534714250201; Sun, 19 Aug 2018 14:30:50 -0700 (PDT) Original-Received: from [192.168.2.183] (216-165-229-229.championbroadband.com. [216.165.229.229]) by smtp.gmail.com with ESMTPSA id h69-v6sm14008767pfh.13.2018.08.19.14.30.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Aug 2018 14:30:49 -0700 (PDT) In-Reply-To: <87r2iut5at.fsf@fastmail.com> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::535 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:14741 Archived-At: On 08/19/2018 02:28 PM, Joshua Branson wrote: > Matt Wette writes: > >> I am working on providing a module to add to the nyacc distribution for >> the purpose of generating extension languages, and putting together a few >> extensions for demo. So far I'm playing with javascript and matlab. >> These languages use a "nx-" prefix to designate them as "nyacc extension". >> One can interpret "nx" to also mean "not exactly", so "nx-matlab" is not >> exactly MATLAB. It has taken some work to get my yacc like parser to >> parse expressions instead of files, so some work has gone into updating >> the nyacc parser. nyacc/parse.scm now has parser generators that provide >> an #:interactive option and more robust default-reductions for generating >> parsers which work well in interactive mode. >> > This is super cool! Is the goal to eventually make it exactly > matlab/exactly javascript? Or will there always be some portability > issues? > I thought about this a bit. I think hope for 100% compatibility is not there. For example, javascript strings are always 16bit code points, whereas Guile strings are either 8-bit characters or 32-bit code points. Also, I'd like to "fix" some problems in javascript. For example var a = 1; if (1) { var a = 2; } a => 2 if (1) { let a = 3; } a => 2 I have made "var" inside blocks illegal. And "let" is not standard, but I'm adding it. I also want to make the underlying data model consistent among languages, so that may take some "massaging" of the language def's. Matt