10 stdenv.mkDerivation rec {
14 url = "https://www.antlr3.org/download/antlr-${version}-complete.jar";
15 sha256 = "0srjwxipwsfzmpi0v32d1l5lzk9gi5in8ayg33sq8wyp8ygnbji6";
17 src = fetchFromGitHub {
20 rev = "5c2a916a10139cdb5c7c8851ee592ed9c3b3d4ff";
21 sha256 = "1i0w2v9prrmczlwkfijfp4zfqfgrss90a7yk2hg3y0gkg2s4abbk";
26 url = "https://src.fedoraproject.org/rpms/antlr3/raw/f1bb8d639678047935e1761c3bf3c1c7da8d0f1d/f/0006-antlr3memory.hpp-fix-for-C-20-mode.patch";
27 sha256 = "0apk904afjqbad6c7z9r72a9lkbz69vwrl8j2a6zgxjn8dfb2p8b";
32 mkdir -p "$out"/{lib/antlr,bin,include}
33 cp "$jar" "$out/lib/antlr/antlr-${version}-complete.jar"
34 cp runtime/Cpp/include/* $out/include/
36 echo "#! ${stdenv.shell}" >> "$out/bin/antlr"
37 echo "'${jre}/bin/java' -cp '$out/lib/antlr/antlr-${version}-complete.jar' -Xms200M -Xmx400M org.antlr.Tool \"\$@\"" >> "$out/bin/antlr"
39 chmod a+x "$out/bin/antlr"
40 ln -s "$out/bin/antlr"{,3}
46 description = "Powerful parser generator";
48 ANTLR (ANother Tool for Language Recognition) is a powerful parser
49 generator for reading, processing, executing, or translating structured
50 text or binary files. It's widely used to build languages, tools, and
51 frameworks. From a grammar, ANTLR generates a parser that can build and
54 homepage = "https://www.antlr.org/";
55 sourceProvenance = with sourceTypes; [ binaryBytecode ];
56 license = licenses.bsd3;
57 platforms = platforms.linux;
58 maintainers = [ lib.maintainers.farlion ];