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 patches for Mes to avoid bundling? Date: Sat, 6 May 2017 08:21:12 -0700 Message-ID: References: <87bmr93jot.fsf@gnu.org> <1B4686A9-DAC0-4DD4-B11B-78629E0C5339@gmail.com> <20B29595-EC72-4660-815A-0261AD88B519@gmail.com> <87shkj96qi.fsf@gnu.org> <500F7340-E32F-4F6D-89EB-66B94DFF1754@gmail.com> <87o9v78m2y.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1494084107 23391 195.159.176.226 (6 May 2017 15:21:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 6 May 2017 15:21:47 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat May 06 17:21:43 2017 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 1d71Wg-0005yc-AT for guile-user@m.gmane.org; Sat, 06 May 2017 17:21:42 +0200 Original-Received: from localhost ([::1]:51761 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d71Wl-0006dS-PD for guile-user@m.gmane.org; Sat, 06 May 2017 11:21:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d71WN-0006bx-Bp for guile-user@gnu.org; Sat, 06 May 2017 11:21:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d71WJ-00025r-B0 for guile-user@gnu.org; Sat, 06 May 2017 11:21:23 -0400 Original-Received: from mail-pg0-x22a.google.com ([2607:f8b0:400e:c05::22a]:36805) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d71WJ-00025V-3z; Sat, 06 May 2017 11:21:19 -0400 Original-Received: by mail-pg0-x22a.google.com with SMTP id q4so15753132pga.3; Sat, 06 May 2017 08:21:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=nyHfeiXG6tChRw+7c6Z+PwWEoZogYuY4+oBpAacOL4g=; b=jzolpFb/15sanGlJ8pL8DhYe6JY5HyQ1m4JkMVPhvn42SMJQZSa8iE0XqmuBUCRUa4 2iRwvbNHYE5r43HCdM3a+AJwkcuqRyAGVCGKCnrnlaUTFKprICercq0RYIwkdIYTfT7Z zrTox6u627BkVaKPOOSDU1Egudb23EUsc+jFCbJibiOMbi3JtgrqVf6QixsYi4p3/iHI O2GT1fiZFDuT3/s1I2UJTO12c+V0Ckb1EFIu59K2oMjqQT6avB6p5FSM3JsK44I1aKWQ +82lj4OpY9cOpLlxQOwRv2M8aoHOwXYqNUjTFA0fFLGNJjuxUNUhSKtpNEzuyP7ewTpC BU2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=nyHfeiXG6tChRw+7c6Z+PwWEoZogYuY4+oBpAacOL4g=; b=hxQYdOy8PxocXg58Zru/mwmh2069/PV0Vl3Z4AR9z0UTmO1mAbgELBOUng4Rv+8uX5 KDqNd0/sfL259n7nYo9cdPyDSYx9WRhGWk/mURNHYZchrDwDmHv2hnvJ5zTbbykBSWMM LlTruwoBbiIvzQgn7gwjxXUeavaAceUL3Sx7H4pTmarCrD239eTJIwuIlelIfILSDMIz M3hSLcgqTpWUj3j1TtHJBF51y85wUZz11Ga+qDj17x7CH/2ZeFhSYI5Fvjc5P+KqRV7L JS3pLszwJyf8CXArcxFBt8gZKL/LxttFXkpdQkIIIDNjGj3wAjoN3cTssgZ+ryGi033R qeYQ== X-Gm-Message-State: AN3rC/5tmQ7IQTMb7FzWe9u40PHuPqOdGQUlT1wk1310FVletHWW5/cF bFMD6Npku5QmsGYVl3g= X-Received: by 10.99.149.8 with SMTP id p8mr9624854pgd.154.1494084075847; Sat, 06 May 2017 08:21:15 -0700 (PDT) Original-Received: from [192.168.2.114] (216-165-236-44.championbroadband.com. [216.165.236.44]) by smtp.gmail.com with ESMTPSA id s7sm8746818pgs.52.2017.05.06.08.21.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 May 2017 08:21:14 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3273) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::22a 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:13679 Archived-At: > On May 5, 2017, at 3:59 PM, Matt Wette wrote: >=20 >=20 >> On May 5, 2017, at 6:33 AM, Jan Nieuwenhuizen = wrote: >>=20 >> Matt Wette writes: >>=20 >>> I see that you have PEG parser. You could use that to implement = regexps I believe.=20 >>=20 >> That's an interesting suggestion...however PEG is currently terribly >> slow with Mes. I added it before adding Nyacc to give me the option >> to write the C parser in. >=20 > Fine. The tiny bit of code I use regexp for can be done easily with a = finite state machine and charsets. >=20 Split-cppdef is now sing just string functions: (define (split-cppdef defstr) (let ((x2st (string-index defstr #\()) ; start of args (x2nd (string-index defstr #\))) ; end of args (x3 (string-index defstr #\=3D))) ; start of replacement (cond ((not x3) #f) ((and x2st x3) ;;(if (not (eq? (1+ x2nd) x3)) (c99-err "bad CPP def: ~S" defstr)) (cons* (substring defstr 0 x2st) (string-split (string-delete #\space (substring defstr (1+ x2st) x2nd)) #\,) (substring defstr (1+ x3)))) (else (cons (substring defstr 0 x3) (substring defstr (1+ x3))))))) And with regard to your name clashes I have added prefixes. Here is the = call to generate the table and action files: (write-lalr-actions c99-mach (xtra-dir "c99act.scm.new") #:prefix = "c99-") (write-lalr-tables c99-mach (xtra-dir "c99tab.scm.new") #:prefix = "c99-=E2=80=9C) These should show up in the first nyacc release after 0.77.0. Matt