GNU bug report logs - #43525
[PATCH] gnu: Add antlr4.

Previous Next

Package: guix-patches;

Reported by: Julien Lepiller <julien <at> lepiller.eu>

Date: Sun, 20 Sep 2020 01:20:01 UTC

Severity: normal

Tags: patch

Done: Julien Lepiller <julien <at> lepiller.eu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43525 in the body.
You can then email your comments to 43525 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#43525; Package guix-patches. (Sun, 20 Sep 2020 01:20:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julien Lepiller <julien <at> lepiller.eu>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 20 Sep 2020 01:20:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add antlr4.
Date: Sun, 20 Sep 2020 03:18:17 +0200
[Message part 1 (text/plain, inline)]
Hi Guix!

I tried to update groovy to its latest version today, so here's a patch
series that adds ANTLR 4 instead :p (it's a build dependency for the
newest version of groovy).
[0001-gnu-Add-java-treelayout.patch (text/x-patch, attachment)]
[0002-gnu-Add-java-antlr4-runtime.patch (text/x-patch, attachment)]
[0003-gnu-Add-antlr4.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#43525; Package guix-patches. (Sun, 20 Sep 2020 06:59:02 GMT) Full text and rfc822 format available.

Message #8 received at 43525 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Julien Lepiller <julien <at> lepiller.eu>
Cc: 43525 <at> debbugs.gnu.org
Subject: Re: [bug#43525] [PATCH] gnu: Add antlr4.
Date: Sun, 20 Sep 2020 08:59:18 +0200
Hi Julien,

> +         (add-before 'check 'remove-graphemes
> +           (lambda _
> +             ;; When running antlr on grahemes.g4, we get a runtime exception:
> +             ;; set is empty. So delete the file that depends on it.
> +             (delete-file "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")))

Please let the phase end on #t.  Please also use double spacing in
comments.

> +         (add-before 'build 'generate-unicode
> +           (lambda _
> +             ;; First: build the generator
> +             (invoke "javac" "-cp" (getenv "CLASSPATH")
> +                     "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
> +                     "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
> +             ;; Then use it
> +             (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
> +                                                 ":tool/src:runtime/Java")
> +                     "org.antlr.v4.unicode.UnicodeRenderer"
> +                     "tool/resources/org/antlr/v4/tool/templates"
> +                     "unicodedata"
> +                     "tool/src/org/antlr/v4/unicode/UnicodeData.java")
> +             (begin
> +               ;; It seems there is a bug with our ST4
> +               (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
> +                 (("\\\\>") ">"))
> +               ;; Remove the additional file
> +               (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
> +               #t)))

Why have a BEGIN here?

> +         (add-before 'build 'generate-grammar
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (with-directory-excursion "tool/src/org/antlr/v4/parse"
> +               (for-each (lambda (file)
> +                           (format #t "~a\n" file)

I’m not sure this actually outputs anything.  Does it?  I’m not a fan of
using FORMAT when DISPLAY would work just fine.

> +                           (system* "antlr3" file))

Why not INVOKE?

> +                         '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
> +                           "GrammarTreeVisitor.g" "ATNBuilder.g"
> +                           "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
> +             (with-directory-excursion "tool/src/org/antlr/v4/codegen"
> +               (copy-file "../parse/ANTLRParser.tokens" "ANTLRParser.tokens")

You can use INSTALL-FILE to avoid having to restate the target file name.

> +               (format #t "SourceGenTriggers.g\n")

How about DISPLAY here?

-- 
Ricardo




Reply sent to Julien Lepiller <julien <at> lepiller.eu>:
You have taken responsibility. (Sun, 20 Sep 2020 12:01:02 GMT) Full text and rfc822 format available.

Notification sent to Julien Lepiller <julien <at> lepiller.eu>:
bug acknowledged by developer. (Sun, 20 Sep 2020 12:01:02 GMT) Full text and rfc822 format available.

Message #13 received at 43525-done <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 43525-done <at> debbugs.gnu.org
Subject: Re: [bug#43525] [PATCH] gnu: Add antlr4.
Date: Sun, 20 Sep 2020 14:00:09 +0200
Pushed as 1d630fe0f64d16d7428a78ee4bf94e8179ce4a94 to
f9a6e3894b1648e32371e1916dfdf820de496050, thank you!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 19 Oct 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 183 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.