From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Newsgroups: gmane.lisp.guile.user Subject: Re: Nyacc: how to lex comments? Date: Tue, 17 Mar 2020 08:46:49 +0100 Message-ID: <20200317074649.GA27693@tuxteam.de> References: <20200316213941.GA5467@tuxteam.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HlL+5n6rz5pIUxbD" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="34817"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.5.21 (2010-09-15) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Tue Mar 17 08:47:07 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jE6wM-0008wk-UY for guile-user@m.gmane-mx.org; Tue, 17 Mar 2020 08:47:06 +0100 Original-Received: from localhost ([::1]:54086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jE6wL-00045Q-US for guile-user@m.gmane-mx.org; Tue, 17 Mar 2020 03:47:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39564) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jE6w8-00043F-DU for guile-user@gnu.org; Tue, 17 Mar 2020 03:46:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jE6w7-0004KE-Cl for guile-user@gnu.org; Tue, 17 Mar 2020 03:46:52 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]:39932) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jE6w6-00043h-RM for guile-user@gnu.org; Tue, 17 Mar 2020 03:46:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:To:Date; bh=8sLghbsFRHQdvWuhgHp/1Xesz2OXVJm9VB9Dbo32QEI=; b=E0hUs8yiDNnxaRLj5A/7SY6M4pWg/b0VzecuOWIFwT8/5UJG29Vfxg3vIP9o5QqUJon2KbD01b7jRlt/C1K+7bro717cdlN2+QupTiAHGxXo2HIM0jSvnCEAZNqBNkUl0H9hQA2IaM8oIFKU8w8d0pt9tAYEwEfAwk+/5t4YjY/zrBcrHssR51hAS5R2eYSeNzbj9f3AtRWvz+Ij2wYjbL8dfVudG7tu7E+A1Pfw6sExxlObIb4/9/XjFDebqTypLaMKtwjIZYmwijqyqOr0kWIpxUzNmxcfdgOJgyRNlEl3iAIeU2HixmMzFWXCHj5sNcrDmR7hbSS9liR5ewDLjA==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1jE6w5-0007Ii-6L for guile-user@gnu.org; Tue, 17 Mar 2020 08:46:49 +0100 Content-Disposition: inline In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 5.199.139.25 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16315 Archived-At: --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 16, 2020 at 05:11:59PM -0700, Matt Wette wrote: > On 3/16/20 2:39 PM, tomas@tuxteam.de wrote: > >Hi, > > > >in my quest to play parsing, I'm failing when I try to cope with > >comments. > > [...] > make-comm-reader will not eat newlines at end of comment by default. > If you want the comment # ... \n to include the newline try adding > #:eat-newline #t. D'oh, thanks. Also, I noticed I've to set #:comm-skipper in 'gen-lexer', instead of #:comm-reader. I didn't quite understand the difference between both. Would I have to include comments explicitly in the grammar if the lexer uses #:comment-reader?=20 Thanks again -- tom=C3=A1s --HlL+5n6rz5pIUxbD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAl5wgGkACgkQBcgs9XrR2kY9pACfecbXPPkHtuOwpzBXkMkyqiRc y58An0zp+EvLv45+xqf+Oh3f5hi6SiYm =0UqM -----END PGP SIGNATURE----- --HlL+5n6rz5pIUxbD--