From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 8bee4060ea4 2/2: Add peg.el as a built-in library Date: Sun, 31 Mar 2024 10:33:27 +0300 Message-ID: <86plvac0u0.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24934"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, Stefan Monnier To: Eric Abrahamsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 31 09:34:27 2024 Return-path: Envelope-to: ged-emacs-devel@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 1rqphz-0006H7-HM for ged-emacs-devel@m.gmane-mx.org; Sun, 31 Mar 2024 09:34:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqph8-0002OI-Jw; Sun, 31 Mar 2024 03:33:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqph6-0002Nk-Uq for emacs-devel@gnu.org; Sun, 31 Mar 2024 03:33:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqph5-0001vt-K8; Sun, 31 Mar 2024 03:33:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Subject:To:From:Date:mime-version:in-reply-to: references; bh=311olF3JtY0fsqL3rF94BxdQwDUYhVRNIhW2BqvYkB0=; b=F4J+iRKD+2wJsC Ws9cMWOMDNHepVqIJknUK4hf2Pv4HQDuQFop66ktCn51eLUIDOtfwTYJaMMSSyr6WmwxXqGkxS6A7 xlCMYBqTekFCX24RKh0GD+d49q+w76kJZfxgNA32OgUeciIb7cnnyuChbVvz4L49YnVmn4omR/bT6 hNjbAeQ3xIOVEA3pItwEbCTiPoqNQrOpXU8IT2kbyLlNFFmLvNlVfs0hfsFYs3mL7TzQ6K6HycoFT VyhZqogbGnldgj/9tyukL/avhsh3nKoLUyd6eSSk0tzUJqcrguPJoZGU3l0Gd+347ouEhPgJV24iZ Fxy/0ZJFHpxbmunJAYzA==; X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:317407 Archived-At: > branch: master > commit 8bee4060ea42c61e52ebe6487ff97bc095261050 > Author: Eric Abrahamsen > Commit: Eric Abrahamsen > > Add peg.el as a built-in library > > * lisp/progmodes/peg.el: New file, taken from ELPA package. > * test/lisp/peg-tests.el: Package tests. > * doc/lispref/peg.texi: Documentation. Thanks. A few comments about this: I fixed the manual additions, but there are a few FIXME's there; please take care of them. The doc string of define-peg-rule doesn't reference a mandatory argument ARGS. It also doesn't tell what happens if PEXS is omitted or nil. The doc string of define-peg-rule doesn't say how the NAME argument is used. The doc string of with-peg-rules doesn't explain the meaning of NAME in each rule. Some public functions in peg.el lack doc strings, and others don't mention their arguments in the first line of the doc string. Last, but not least: the test suite fails to compile, even after I moved it to the correct subdirectory of test/: ELC lisp/progmodes/peg-tests.elc In toplevel form: lisp/progmodes/peg-tests.el: Warning: Possible left recursion: r -> r lisp/progmodes/peg-tests.el: Warning: `let' with empty body lisp/progmodes/peg-tests.el: Warning: `let' with empty body In peg-ex-arith: lisp/progmodes/peg-tests.el:210:2: Warning: `peg-rule eol' called with 1 argument, but accepts only 0 lisp/progmodes/peg-tests.el:212:10: Warning: reference to free variable `_' lisp/progmodes/peg-tests.el:212:12: Warning: reference to free variable `sum' lisp/progmodes/peg-tests.el:212:16: Warning: reference to free variable `eol' lisp/progmodes/peg-tests.el:213:9: Warning: reference to free variable `product' lisp/progmodes/peg-tests.el:215:13: Warning: reference to free variable `value' lisp/progmodes/peg-tests.el:217:21: Warning: value from call to `substring' is unused lisp/progmodes/peg-tests.el:217:31: Warning: reference to free variable `number' lisp/progmodes/peg-tests.el: Error: Too many arguments for inlined function (#[0 "l\207" [((guard (eolp)))] 1 peg-function] " ") In peg-ex-uri: lisp/progmodes/peg-tests.el:229:23: Warning: reference to free variable `absoluteURI' lisp/progmodes/peg-tests.el:229:35: Warning: reference to free variable `relativeURI' lisp/progmodes/peg-tests.el:230:43: Warning: reference to free variable `fragment' lisp/progmodes/peg-tests.el:237:28: Warning: reference to free variable `scheme' lisp/progmodes/peg-tests.el:237:44: Warning: reference to free variable `hier-part' lisp/progmodes/peg-tests.el:237:54: Warning: reference to free variable `opaque-part' lisp/progmodes/peg-tests.el:239:9: Warning: reference to free variable `net-path' lisp/progmodes/peg-tests.el:241:14: Warning: reference to free variable `abs-path' lisp/progmodes/peg-tests.el:242:29: Warning: reference to free variable `query' lisp/progmodes/peg-tests.el:244:19: Warning: reference to free variable `authority' lisp/progmodes/peg-tests.el:245:18: Warning: reference to free variable `path-segments' lisp/progmodes/peg-tests.el:246:19: Warning: reference to free variable `segment' lisp/progmodes/peg-tests.el:247:27: Warning: reference to free variable `pchar' lisp/progmodes/peg-tests.el:247:41: Warning: reference to free variable `param' lisp/progmodes/peg-tests.el:249:15: Warning: reference to free variable `unreserved' lisp/progmodes/peg-tests.el:249:26: Warning: reference to free variable `escaped' lisp/progmodes/peg-tests.el:250:14: Warning: reference to free variable `uric' lisp/progmodes/peg-tests.el:252:39: Warning: reference to free variable `rel-path' lisp/progmodes/peg-tests.el:253:14: Warning: reference to free variable `rel-segment' lisp/progmodes/peg-tests.el:255:19: Warning: reference to free variable `server' lisp/progmodes/peg-tests.el:255:26: Warning: reference to free variable `reg-name' lisp/progmodes/peg-tests.el:256:31: Warning: value from call to `substring' is unused lisp/progmodes/peg-tests.el:256:41: Warning: reference to free variable `userinfo' lisp/progmodes/peg-tests.el:258:21: Warning: reference to free variable `hostport' lisp/progmodes/peg-tests.el:261:25: Warning: reference to free variable `host' lisp/progmodes/peg-tests.el:261:55: Warning: reference to free variable `port' lisp/progmodes/peg-tests.el:263:14: Warning: reference to free variable `hostname' lisp/progmodes/peg-tests.el:263:23: Warning: reference to free variable `ipv4address' lisp/progmodes/peg-tests.el:264:17: Warning: reference to free variable `domainlabel' lisp/progmodes/peg-tests.el:264:34: Warning: reference to free variable `toplabel' lisp/progmodes/peg-tests.el:265:17: Warning: reference to free variable `alphanum' lisp/progmodes/peg-tests.el:268:14: Warning: reference to free variable `alpha' lisp/progmodes/peg-tests.el:271:20: Warning: reference to free variable `digit' lisp/progmodes/peg-tests.el:275:17: Warning: reference to free variable `uric-no-slash' lisp/progmodes/peg-tests.el:276:14: Warning: reference to free variable `reserved' lisp/progmodes/peg-tests.el:278:15: Warning: `set' called with 1 arg, but requires 2 lisp/progmodes/peg-tests.el:278:15: Warning: `set' called with 1 argument, but requires 2 lisp/progmodes/peg-tests.el:279:29: Warning: reference to free variable `mark' lisp/progmodes/peg-tests.el:280:17: Warning: reference to free variable `hex' lisp/progmodes/peg-tests.el:282:11: Warning: `set' called with 1 arg, but requires 2 lisp/progmodes/peg-tests.el:282:11: Warning: `set' called with 1 argument, but requires 2 lisp/progmodes/peg-tests.el:284:15: Warning: reference to free variable `lowalpha' lisp/progmodes/peg-tests.el:284:24: Warning: reference to free variable `upalpha' In peg-ex-lisp: lisp/progmodes/peg-tests.el:305:10: Warning: reference to free variable `_' lisp/progmodes/peg-tests.el:305:16: Warning: reference to free variable `string' lisp/progmodes/peg-tests.el:305:23: Warning: reference to free variable `list' lisp/progmodes/peg-tests.el:305:28: Warning: reference to free variable `number' lisp/progmodes/peg-tests.el:305:35: Warning: reference to free variable `symbol' lisp/progmodes/peg-tests.el:309:29: Warning: `set' called with 1 arg, but requires 2 lisp/progmodes/peg-tests.el:309:29: Warning: `set' called with 1 argument, but requires 2 lisp/progmodes/peg-tests.el:309:43: Warning: reference to free variable `digit' lisp/progmodes/peg-tests.el:310:16: Warning: reference to free variable `terminating' lisp/progmodes/peg-tests.el:312:28: Warning: reference to free variable `symchar' lisp/progmodes/peg-tests.el:319:22: Warning: `set' called with 1 arg, but requires 2 lisp/progmodes/peg-tests.el:319:22: Warning: `set' called with 1 argument, but requires 2 In end of data: lisp/progmodes/peg-tests.el:319:42: Warning: the function `eob' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule terminating' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule symchar' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule symbol' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule string' is not known to be defined. lisp/progmodes/peg-tests.el:307:43: Warning: the function `any' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule comment' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule sexp' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule digit' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule upalpha' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule lowalpha' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule alpha' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule alphanum' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule mark' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule hex' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule escaped' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule unreserved' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule reserved' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule uric-no-slash' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule uric' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule opaque-part' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule reg-name' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule scheme' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule port' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule ipv4address' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule toplabel' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule domainlabel' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule hostname' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule host' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule hostport' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule userinfo' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule server' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule authority' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule rel-segment' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule rel-path' is not known to be defined. lisp/progmodes/peg-tests.el:252:50: Warning: the function `opt' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule relativeURI' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule fragment' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule query' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule pchar' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule param' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule segment' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule path-segments' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule abs-path' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule net-path' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule hier-part' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule absoluteURI' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule URI-reference' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule _' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule number' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule value' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule product' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule sum' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule expr' is not known to be defined. lisp/progmodes/peg-tests.el: Warning: the function `peg-rule other' is not known to be defined. Makefile:163: recipe for target `lisp/progmodes/peg-tests.elc' failed make[1]: *** [lisp/progmodes/peg-tests.elc] Error 1